smbls 3.14.837 → 3.14.839
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/CHANGELOG.md +25 -0
- package/README.md +73 -0
- package/core.js +52 -0
- package/dist/smbls.cjs +52 -51
- package/dist/smbls.cjs.map +6 -0
- package/dist/smbls.core.analyze-PPLS2PAN.esm.js +2 -0
- package/dist/smbls.core.analyze-PPLS2PAN.esm.js.map +6 -0
- package/dist/smbls.core.chunk-22BLOP75.esm.js +36 -0
- package/dist/smbls.core.chunk-22BLOP75.esm.js.map +6 -0
- package/dist/smbls.core.chunk-7JOJ6YVP.esm.js +22 -0
- package/dist/smbls.core.chunk-7JOJ6YVP.esm.js.map +6 -0
- package/dist/smbls.core.chunk-I5EGBLTJ.esm.js +2 -0
- package/dist/smbls.core.chunk-I5EGBLTJ.esm.js.map +6 -0
- package/dist/smbls.core.chunk-ITZIHIXJ.esm.js +2 -0
- package/dist/smbls.core.chunk-ITZIHIXJ.esm.js.map +6 -0
- package/dist/smbls.core.chunk-NJZRPU6B.esm.js +3 -0
- package/dist/smbls.core.chunk-NJZRPU6B.esm.js.map +6 -0
- package/dist/smbls.core.chunk-PAAPLH2M.esm.js +38 -0
- package/dist/smbls.core.chunk-PAAPLH2M.esm.js.map +6 -0
- package/dist/smbls.core.chunk-PDZOHW5Y.esm.js +2 -0
- package/dist/smbls.core.chunk-PDZOHW5Y.esm.js.map +6 -0
- package/dist/smbls.core.chunk-WFARPHWF.esm.js +2 -0
- package/dist/smbls.core.chunk-WFARPHWF.esm.js.map +6 -0
- package/dist/smbls.core.chunk-ZCSKJHNR.esm.js +2 -0
- package/dist/smbls.core.chunk-ZCSKJHNR.esm.js.map +6 -0
- package/dist/smbls.core.dropdown-6BUJ7B4T.esm.js +69 -0
- package/dist/smbls.core.dropdown-6BUJ7B4T.esm.js.map +6 -0
- package/dist/smbls.core.esm.js +2 -0
- package/dist/smbls.core.esm.js.map +6 -0
- package/dist/smbls.core.fetch-CCNEQJHY.esm.js +2 -0
- package/dist/smbls.core.fetch-CCNEQJHY.esm.js.map +6 -0
- package/dist/smbls.core.fetchOnCreate-QRFDUMYQ.esm.js +2 -0
- package/dist/smbls.core.fetchOnCreate-QRFDUMYQ.esm.js.map +6 -0
- package/dist/smbls.core.inspect-LT4KISKW.esm.js +8 -0
- package/dist/smbls.core.inspect-LT4KISKW.esm.js.map +6 -0
- package/dist/smbls.core.local-ITIODLSE.esm.js +2 -0
- package/dist/smbls.core.local-ITIODLSE.esm.js.map +6 -0
- package/dist/smbls.core.shorthand-CY4EDSP4.esm.js +2 -0
- package/dist/smbls.core.shorthand-CY4EDSP4.esm.js.map +6 -0
- package/dist/smbls.core.sync-MZGPA246.esm.js +2 -0
- package/dist/smbls.core.sync-MZGPA246.esm.js.map +6 -0
- package/dist/smbls.core.tooltip-PBREERMR.esm.js +2 -0
- package/dist/smbls.core.tooltip-PBREERMR.esm.js.map +6 -0
- package/dist/smbls.core.windows-NGKITYP7.esm.js +2 -0
- package/dist/smbls.core.windows-NGKITYP7.esm.js.map +6 -0
- package/dist/smbls.embed.iife.js +1 -20
- package/dist/smbls.embed.iife.js.map +1 -0
- package/dist/smbls.esm.js +67 -66
- package/dist/smbls.esm.js.map +6 -0
- package/dist/smbls.iife-string.js +2 -2
- package/dist/smbls.iife.js +2 -175
- package/dist/smbls.iife.js.map +1 -0
- package/dist/smbls.socket-io-client.esm.js +1 -0
- package/dist/smbls.socket-io-client.esm.js.map +6 -0
- package/embed.js +14 -2
- package/index.js +9 -5
- package/package.json +19 -13
package/dist/smbls.cjs
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
"use strict";var bM=Object.create;var Hf=Object.defineProperty;var _M=Object.getOwnPropertyDescriptor;var wM=Object.getOwnPropertyNames;var SM=Object.getPrototypeOf,xM=Object.prototype.hasOwnProperty;var P=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var Cg=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},j=(t,e)=>{for(var n in e)Hf(t,n,{get:e[n],enumerable:!0})},Dk=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of wM(e))!xM.call(t,o)&&o!==n&&Hf(t,o,{get:()=>e[o],enumerable:!(r=_M(e,o))||r.enumerable});return t};var kM=(t,e,n)=>(n=t!=null?bM(SM(t)):{},Dk(e||!t||!t.__esModule?Hf(n,"default",{value:t,enumerable:!0}):n,t)),vM=t=>Dk(Hf({},"__esModule",{value:!0}),t);var Ig={};j(Ig,{WRITE_JOURNAL:()=>da,batch:()=>ga,createComputed:()=>CM,createEffect:()=>TM,createSignal:()=>ln,getObserver:()=>Pg,journalWrite:()=>ha,setObserver:()=>EM,settled:()=>Dg,untrack:()=>AM});function AM(t){let e=Ht;if(!e)return t();Ht=null;try{return t()}finally{Ht=e}}function ln(t){let e=new Set;function n(){return Ht&&(e.add(Ht),Ht._sources.add(s)),t}function r(i){i!==t&&(t=i,MM(e))}function o(){return t}let s={get:n,set:r,peek:o,_subscribers:e,_type:"signal"};return s}function CM(t){let e,n=!0,r=new Set,o={_sources:new Set,_type:"computed",_subscribers:r,_execute(){Rg(o);let s=Ht;Ht=o;try{e=t(),n=!1}finally{Ht=s}},_notify(){n=!0,r.size>0&&Nk(r)},get(){return Ht&&(r.add(Ht),Ht._sources.add(o)),n&&o._execute(),e},peek(){return n&&o._execute(),e}};return o._execute(),o}function ha(t){da.push(t),da.length>32&&da.shift()}function TM(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;Rg(r);let o=Ht;Ht=r;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Ht=o}},_notify(){r._disposed||(fa>0?ua.push(r):Wf>0?Tg.push(r):Lg(r))},dispose(){r._disposed=!0,Rg(r)}};return r._execute(),r}function ga(t){fa++;try{t()}finally{fa--,fa===0&&IM()}}function Mk(){return typeof performance<"u"?performance.now():Date.now()}function Lg(t){Pe.add(t),!Kf&&(qf||(qf=!0,queueMicrotask($k)))}function LM(){if(Pe.size===1){let[e]=Pe;return Pe.clear(),e._disposed?0:(e._execute(),1)}fs.length=0;for(let e of Pe)fs.push(e);Pe.clear(),fs.sort((e,n)=>e._depth-n._depth);let t=0;for(let e=0;e<fs.length;e++){let n=fs[e];n._disposed||(n._execute(),t++)}return fs.length=0,t}function $k(t=0,e=0){if(qf=!1,Pe.size===0){pa.length&&Og();return}Kf=!0;let n=Mk(),r=!1;try{for(;Pe.size>0;){if(++t>Ik){let o=new Map;for(let c of Pe){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 da)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",Ik,"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>"),Pe.clear();break}if(e+=LM(),Pe.size>0&&(e>=RM||t>=PM)&&Mk()-n>OM){r=!0,setTimeout(()=>$k(t,e),0);break}}}finally{r||(Kf=!1,pa.length&&Og())}}function DM(){return Pe.size===0&&!qf&&!Kf&&ua.length===0&&fa===0}function Og(){if(pa.length===0||!DM())return;let t=pa.splice(0);for(let e=0;e<t.length;e++)t[e]()}function Dg(){return new Promise(t=>{pa.push(t),queueMicrotask(Og)})}function IM(){for(let t=0;t<ua.length;t++)Lg(ua[t]);ua.length=0}function Nk(t){Wf++;try{for(let e of t)e._notify()}finally{if(Wf--,Wf===0&&Tg.length>0){let e=Tg.splice(0);for(let n=0;n<e.length;n++)Lg(e[n])}}}function MM(t){Nk(t)}function Rg(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Ht,fa,ua,Pg,EM,Wf,Tg,Pe,qf,da,Kf,Ik,OM,RM,PM,fs,pa,Mg=P(()=>{Ht=null,fa=0,ua=[],Pg=()=>Ht,EM=t=>{Ht=t};Wf=0,Tg=[];Pe=new Set,qf=!1,da=[];Kf=!1,Ik=1e3,OM=8,RM=256,PM=4;fs=[];pa=[]});var Ug={};j(Ug,{RESERVED_STORE_METHODS:()=>ma,STORE_METHOD_NAMES:()=>Bg,__resetStateShadowWarnings:()=>$M,createScopeStore:()=>BM,createStore:()=>Yf,getSignals:()=>jM,isStore:()=>FM,warnStateKeyShadowsMethod:()=>jg});function jg(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: ${Bg.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function $M(){Fg.clear()}function Qf(t,e,n){if(t===e)return!0;if(n>NM)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(!Qf(t[r],e[r],n+1))return!1;return!0}if(Zf(t)&&Zf(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)||!Qf(t[s],e[s],n+1))return!1;return!0}return!1}function Yf(t,e,n,r){n===void 0&&(n=0),r===void 0&&(r="");let o={},s={},i=w=>Object.prototype.hasOwnProperty.call(o,w)&&Object.prototype.hasOwnProperty.call(s,w),a=w=>{if(!r||!e||typeof e.isDataOnlyKey!="function")return!1;let _=r.indexOf(".");return!!e.isDataOnlyKey(_===-1?r:r.slice(0,_),w)},c=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let w in t){if(w==="__proto__"||!Object.prototype.hasOwnProperty.call(t,w))continue;if(w.startsWith("__")){s[w]=t[w];continue}ma.has(w)&&!a(w)&&jg(w,r);let _=t[w];n<c&&_&&typeof _=="object"&&!Ng(_)?(s[w]=_,o[w]=ln(Yf(_,e,n+1,$g(r,w)))):(s[w]=_,o[w]=ln(_))}let l=new Proxy(s,{get(w,_){if(_===Ke)return!0;if(_===Xf)return o;if(_==="__raw")return w;if(_==="$update")return u;if(_==="$parse")return g;if(_==="$clean")return p;if(_==="$keys")return m;if(_==="$values")return y;if(_==="$replace")return S;if(_==="$add")return b;if(_==="$remove")return k;if(_==="$destroy")return x;if(_==="$quietUpdate")return d;if(_==="$settled")return h;if(ma.has(_)&&!Object.prototype.hasOwnProperty.call(o,_))switch(_){case"update":return u;case"parse":return g;case"clean":return p;case"keys":return m;case"values":return y;case"replace":return S;case"add":return b;case"remove":return k;case"destroy":return x;case"quietUpdate":return d}if(_==="__element")return w.__element;if(_==="parent")return w.parent;if(_==="root")return w.root;if(Object.prototype.hasOwnProperty.call(o,_)){let C=o[_].get();if(C!==void 0||!(_!=="root"&&w.root&&w.root!==l))return C}if(w[_]!==void 0)return w[_];let A=typeof _=="string"&&!_.startsWith("__")&&_!=="then"&&_!=="constructor"&&Pg()!=null;if(_!=="root"&&w.root&&w.root!==l){let C=w.root[_];return A&&!Object.prototype.hasOwnProperty.call(o,_)&&(o[_]=ln(void 0),o[_].get()),C}if(A)return o[_]=ln(void 0),o[_].get()},set(w,_,A){if(_==="__proto__")return!1;if(_==="__element"||_==="parent"||_==="root"||typeof _=="string"&&_.startsWith("__")&&!Object.prototype.hasOwnProperty.call(o,_))return w[_]=A,!0;ma.has(_)&&!a(_)&&jg(_,r);let C=$g(r,_);if(Object.prototype.hasOwnProperty.call(o,_))if(A&&typeof A=="object"&&!Ng(A)){if(A===w[_])return!0;let D=o[_].peek(),$=D&&D[Ke]?D.$parse():D;if(Qf(A,$,0))return!0;w[_]=A,ha(C),o[_].set(Yf(A,e,n+1,C))}else{if(Array.isArray(A)&&A!==w[_]&&Array.isArray(o[_].peek())&&Qf(A,o[_].peek(),0))return!0;o[_].peek()!==A&&ha(C),w[_]=A,o[_].set(A)}else w[_]=A,A&&typeof A=="object"&&!Ng(A)?o[_]=ln(Yf(A,e,n+1,C)):o[_]=ln(A);return!0},has(w,_){return typeof _=="string"&&_.charCodeAt(0)===36&&ma.has(_.slice(1))?!0:_ in w},ownKeys(w){return Object.keys(o).filter(i)},getOwnPropertyDescriptor(w,_){return i(_)?{enumerable:!0,configurable:!0,value:o[_].peek()}:Object.getOwnPropertyDescriptor(w,_)},deleteProperty(w,_){return o[_]&&(o[_].peek()!==void 0&&ha($g(r,_)),o[_].set(void 0),delete o[_]),delete w[_],!0}});function f(w,_){let A=s.__element;return!A||typeof A.onBeforeStateUpdate!="function"||_?.preventBeforeStateUpdateListener?!0:A.onBeforeStateUpdate(A,l,A.context,{changes:w,options:_})!==!1}function u(w,_){if(w&&typeof w=="object"&&!f(w,_))return l;ga(()=>{for(let C in w)C!=="__proto__"&&(l[C]=w[C])});let A=s.__element;return A&&A.onUpdate&&!_?.quiet&&A.onUpdate(A,l,A.context),l}function d(w){return u(w,{quiet:!0})}function h(){return Dg().then(()=>l)}function g(w){if(w||(w=new Set),w.has(l))return"[Circular]";w.add(l);let _={};for(let A in o){if(A==="parent"||A==="root"||A.startsWith("__")||!Object.prototype.hasOwnProperty.call(s,A))continue;let C=o[A].peek();C&&C[Ke]?_[A]=C.$parse(w):_[A]=C}return _}function p(){return ga(()=>{for(let w in o)delete l[w]}),l}function m(){return Object.keys(o).filter(i)}function y(){return Object.keys(o).filter(i).map(w=>o[w].peek())}function S(w,_){return w&&typeof w=="object"&&!f(w,_)||ga(()=>{for(let A in o)A in w||delete l[A];for(let A in w)A!=="__proto__"&&(l[A]=w[A])}),l}function b(w,_){let A=Object.prototype.hasOwnProperty.call(o,w)?o[w].peek():s[w];if(Array.isArray(A))return l[w]=[...A,_],l;if(A&&typeof A=="object"&&!Array.isArray(A)){if(Zf(_))A[Ke]?A.$update(_):l[w]={...A,..._};else{let C=String(Object.keys(A).length);A[Ke]?A.$update({[C]:_}):l[w]={...A,[C]:_}}return l}return l[w]=_,l}function k(w){return delete l[w],l}function x(){p(),s.__element=null,s.parent=null}return l}function FM(t){return t&&t[Ke]===!0}function jM(t){return t[Xf]}function BM(t,e){let n={},r={};if(t&&typeof t=="object")for(let a in t)r[a]=t[a],n[a]=ln(t[a]);let o=a=>{if(Object.prototype.hasOwnProperty.call(n,a))return n;let c=e;for(;c;){let l=c[Xf];if(l&&Object.prototype.hasOwnProperty.call(l,a))return l;c=c[Ke]?c[Gf]:null}return null},s=()=>{let a=e;for(;a&&a[Ke];)a=a[Gf];return a&&typeof a=="object"?a:null};return new Proxy(r,{get(a,c){return c===Ke?!0:c===Xf?n:c===Gf?e:c==="__raw"?a:Object.prototype.hasOwnProperty.call(n,c)?n[c].get():e&&c!=="then"&&c!=="constructor"?e[c]:a[c]},set(a,c,l){let f=o(c);if(f)return f===n&&(a[c]=l),f[c].set(l),!0;let u=s();return u&&Object.prototype.hasOwnProperty.call(u,c)?(u[c]=l,!0):(a[c]=l,n[c]=ln(l),!0)},has(a,c){if(c in n||c in a)return!0;let l=e;for(;l;){if(c in l)return!0;l=l[Ke]?l[Gf]:null}return!1},ownKeys(){return Object.keys(n)},getOwnPropertyDescriptor(a,c){return c in n?{enumerable:!0,configurable:!0,value:n[c].peek()}:Object.getOwnPropertyDescriptor(a,c)}})}var Ke,Xf,Bg,ma,Fg,$g,Ng,NM,Zf,Gf,Fk=P(()=>{Mg();Ke=Symbol("store"),Xf=Symbol("signals"),Bg=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],ma=new Set(Bg),Fg=new Set,$g=(t,e)=>t?t+"."+e:String(e);Ng=t=>!t||typeof t!="object"||Array.isArray(t)||t[Ke]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!Zf(t),NM=12,Zf=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};Gf=Symbol("scope.parent")});var Xr,Jf=P(()=>{Xr="3.14.788"});var us,ds,Vg,zg=P(()=>{Jf();us="__SMBLS_SIGNAL_INSTANCES__",ds=(t,e,n)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r)return null;let o=r[us]||(r[us]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(t||Xr),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},Vg=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[us]}});var ps,jk,Hg,Bk=P(()=>{Jf();zg();ps="__SMBLS_SIGNAL_ENGINE__",jk=(t,e,n)=>{let r=e||Xr,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[ps];return s&&s.engine&&s.version===r?(ds(r,o,!0),s.engine):(s||(o[ps]={version:r,engine:t}),ds(r,o,!1),t)},Hg=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[ps]}});var Pt,Zr,Uk,Y,tu,fn,ya,eu,nu,An,ru,wt,Vk,zk,Hk,ou,Wk,qk,Kk=P(()=>{Mg();Fk();Bk();Jf();zg();Pt=jk({...Ig,...Ug,VERSION:Xr},Xr),Zr=Pt.createSignal,Uk=Pt.createComputed,Y=Pt.createEffect,tu=Pt.batch,fn=Pt.getObserver,ya=Pt.setObserver,eu=Pt.untrack||(t=>{let e=Pt.getObserver();if(!e)return t();Pt.setObserver(null);try{return t()}finally{Pt.setObserver(e)}}),nu=Pt.settled||(()=>Promise.resolve()),An=Pt.createStore,ru=Pt.createScopeStore,wt=Pt.isStore,Vk=Pt.getSignals,zk=Pt.STORE_METHOD_NAMES,Hk=Pt.RESERVED_STORE_METHODS,ou=Pt.warnStateKeyShadowsMethod,Wk=Pt.__resetStateShadowWarnings,qk=Pt.VERSION});var su={};j(su,{RESERVED_STORE_METHODS:()=>Hk,SIGNAL_ENGINE_KEY:()=>ps,SIGNAL_INSTANCES_KEY:()=>us,STORE_METHOD_NAMES:()=>zk,VERSION:()=>qk,__resetSignalEngine:()=>Hg,__resetSignalInstances:()=>Vg,__resetStateShadowWarnings:()=>Wk,batch:()=>tu,createComputed:()=>Uk,createEffect:()=>Y,createScopeStore:()=>ru,createSignal:()=>Zr,createStore:()=>An,getObserver:()=>fn,getSignals:()=>Vk,isStore:()=>wt,registerSignalInstance:()=>ds,setObserver:()=>ya,settled:()=>nu,untrack:()=>eu,warnStateKeyShadowsMethod:()=>ou});var Mt=P(()=>{Kk()});var qg,Kg,T,ut,_a=P(()=>{"use strict";qg=globalThis,Kg=globalThis,T=globalThis,ut=T.document});var On,wa,re,Sa=P(()=>{"use strict";_a();On=t=>(typeof Node=="object"?t instanceof T.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,wa=t=>(typeof HTMLElement=="object"?t instanceof T.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,re=t=>typeof T<"u"&&(T.Node&&t instanceof T.Node||T.Window&&t instanceof T.Window||t===T||ut!==void 0&&t===ut)});var E,v,oe,R,iu,au,L,cu,q,Lt,$t,xa,se,Gg,Nt=P(()=>{"use strict";Sa();E=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,v=t=>typeof t=="string",oe=t=>typeof t=="number",R=t=>typeof t=="function",iu=t=>t===!0||t===!1,au=t=>t===null,L=t=>Array.isArray(t),cu=t=>t instanceof Date,q=t=>t===null?!1:typeof t=="object",Lt=t=>t!==void 0,$t=t=>t===void 0,xa={boolean:iu,array:L,object:E,string:v,date:cu,number:oe,null:au,function:R,objectLike:q,node:On,htmlElement:wa,defined:Lt},se=t=>(...e)=>e.some(n=>xa[n](t)),Gg=t=>(...e)=>!e.some(n=>xa[n](t))});var Yg,Xg,Zg,Qg,ms,ka,Jg,tm,va,em,nm,rm,om,sm,im,am,ys,Ea,bs=P(()=>{"use strict";un();Nt();Yg=(t,e)=>e.every(n=>t.includes(n)),Xg=(t,e)=>{let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n},Zg=(t,e)=>{if(v(e)&&(e=parseInt(e)),oe(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},Qg=(t,e,n)=>{e<0||n<0||e>=t.length||n>=t.length||([t[e],t[n]]=[t[n],t[e]])},ms=(...t)=>[].concat(...t),ka=(t,e=[])=>t.reduce((n,r)=>ct(n,ft(r,{exclude:e}),e),{}),Jg=(t,e)=>{let n=t.indexOf(e);return n!==-1?t.slice(0,n):t},tm=(t,e)=>{if(!L(t))return;let n=t.indexOf(e);return n!==-1?t.slice(n+1):t},va=(t,e)=>{let n=t.indexOf(e);if(n>-1){let r=[...t];return r.splice(n,1),r}return t},em=(t,e)=>t.filter(n=>n!==e),nm=(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},rm=(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},om=(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},sm=(t,e)=>t.filter(n=>!e.includes(n)),im=(t,e)=>{let n=new Set(e);return t.filter(r=>!n.has(r))},am=(t,e)=>{if(!t)return 0;let n=0;for(let r=0;r<e.length;r++)t.includes(e[r])&&n++;return n},ys=t=>L(t)?[...new Set(t)]:t,Ea=(t,e)=>{for(let n in e)Object.defineProperty(t,n,{value:e[n],enumerable:!1,configurable:!0,writable:!0})}});function Ft(t,e,n={}){let{bracketsLength:r=2,authored:o=!1}=n,s=r===3?"{{{":"{{";if(!t.includes(s)||o!==!0&&!HM(this,t))return t;let i=zM[r],a=e||this.state||{},c=this;return t.replace(i,(l,f,u,d)=>{let h=u.trim();if(d){let g=c?.context,p=g?.functions?.[d]||g?.utils?.[d]||g?.methods?.[d]||g?.snippets?.[d]||c?.[d];if(p&&typeof p=="function")try{return String(p.call(c,h)??"")}catch{return""}return""}if(f){let g=(f.match(/\.\.\//g)||[]).length,p=a;for(let y=0;y<g;y++){if(!p||!p.parent)return"";p=p.parent}if(h==="parent")return String(p.value??"");let m=Aa(p,h);return m!=null&&typeof m=="object"?"":String(m??"")}else{let g=Aa(a,h);if(g!=null&&typeof g!="object")return String(g);let p=c?.context?.polyglot;if(p?.translations){let m=a?.root?.lang||a?.lang||c?.context?.state?.lang||p.defaultLang||"en",y=p.translations[m];if(y){let b=Aa(y,h);if(b!=null&&typeof b!="object")return String(b);for(let k in y){let x=y[k];if(x&&typeof x=="object"&&!Array.isArray(x)){let w=Aa(x,h);if(w!=null&&typeof w!="object")return String(w)}}}let S=Aa(p.translations,h);if(S!=null&&typeof S!="object")return String(S)}return""}})}var Ca,cm,zM,Aa,HM,Jr,lm,WM,fm,um,dm,qM,pm,hm,Ta=P(()=>{"use strict";Ca=(t,e)=>{for(let n of e)if(t.includes(n))return!0;return!1},cm=(t,e)=>{let n=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(n,"")},zM={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},Aa=(t,e)=>e.split(".").reduce((n,r)=>n?.[r],t),HM=(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};Jr=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,lm=(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,"$"),
|
|
4
|
-
`,"'"])?"`"+e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")+"`":"'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r")+"'"},
|
|
5
|
-
`;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=
|
|
1
|
+
"use strict";var RF=Object.create;var sd=Object.defineProperty;var PF=Object.getOwnPropertyDescriptor;var DF=Object.getOwnPropertyNames;var LF=Object.getPrototypeOf,IF=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 Sy=(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)sd(t,n,{get:e[n],enumerable:!0})},kA=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of DF(e))!IF.call(t,o)&&o!==n&&sd(t,o,{get:()=>e[o],enumerable:!(r=PF(e,o))||r.enumerable});return t};var MF=(t,e,n)=>(n=t!=null?RF(LF(t)):{},kA(e||!t||!t.__esModule?sd(n,"default",{value:t,enumerable:!0}):n,t)),$F=t=>kA(sd({},"__esModule",{value:!0}),t);var Oy={};F(Oy,{WRITE_JOURNAL:()=>ac,batch:()=>fc,countUntrackedReads:()=>jF,createComputed:()=>BF,createEffect:()=>UF,createSignal:()=>wn,getObserver:()=>Ay,journalWrite:()=>lc,noteUntrackedRead:()=>Ce,setObserver:()=>NF,settled:()=>Ty,untrack:()=>FF});function FF(t){let e=Xt;if(!e)return t();Xt=null;try{return t()}finally{Xt=e}}function Ce(){xy!==0&&id++}function jF(t){let e=id;xy++;let n;try{t()}finally{n=id-e,--xy===0&&(id=0)}return n}function wn(t){let e=new Set;function n(){return Xt&&(e.add(Xt),Xt._sources.add(s)),t}function r(i){i!==t&&(t=i,GF(e))}function o(){return t}let s={get:n,set:r,peek:o,_subscribers:e,_type:"signal"};return s}function BF(t){let e,n=!0,r=new Set,o={_sources:new Set,_type:"computed",_subscribers:r,_execute(){Ey(o);let s=Xt;Xt=o;try{e=t(),n=!1}finally{Xt=s}},_notify(){n=!0,r.size>0&&CA(r)},get(){return Xt&&(r.add(Xt),Xt._sources.add(o)),n&&o._execute(),e},peek(){return n&&o._execute(),e}};return o._execute(),o}function lc(t){ac.push(t),ac.length>32&&ac.shift()}function UF(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;Ey(r);let o=Xt;Xt=r;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Xt=o}},_notify(){r._disposed||(sc>0?ic.push(r):ad>0?ky.push(r):Cy(r))},dispose(){r._disposed=!0,Ey(r)}};return r._execute(),r}function fc(t){sc++;try{t()}finally{sc--,sc===0&&KF()}}function EA(){return typeof performance<"u"?performance.now():Date.now()}function Cy(t){Fe.add(t),!ld&&(cd||(cd=!0,queueMicrotask(AA)))}function WF(){if(Fe.size===1){let[e]=Fe;return Fe.clear(),e._disposed?0:(e._execute(),1)}Zs.length=0;for(let e of Fe)Zs.push(e);Fe.clear(),Zs.sort((e,n)=>e._depth-n._depth);let t=0;for(let e=0;e<Zs.length;e++){let n=Zs[e];n._disposed||(n._execute(),t++)}return Zs.length=0,t}function AA(t=0,e=0){if(cd=!1,Fe.size===0){cc.length&&vy();return}ld=!0;let n=EA(),r=!1;try{for(;Fe.size>0;){if(++t>vA){let o=new Map;for(let c of Fe){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 ac)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",vA,"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>"),Fe.clear();break}if(e+=WF(),Fe.size>0&&(e>=HF||t>=zF)&&EA()-n>VF){r=!0,setTimeout(()=>AA(t,e),0);break}}}finally{r||(ld=!1,cc.length&&vy())}}function qF(){return Fe.size===0&&!cd&&!ld&&ic.length===0&&sc===0}function vy(){if(cc.length===0||!qF())return;let t=cc.splice(0);for(let e=0;e<t.length;e++)t[e]()}function Ty(){return new Promise(t=>{cc.push(t),queueMicrotask(vy)})}function KF(){for(let t=0;t<ic.length;t++)Cy(ic[t]);ic.length=0}function CA(t){ad++;try{for(let e of t)e._notify()}finally{if(ad--,ad===0&&ky.length>0){let e=ky.splice(0);for(let n=0;n<e.length;n++)Cy(e[n])}}}function GF(t){CA(t)}function Ey(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Xt,sc,ic,Ay,NF,xy,id,ad,ky,Fe,cd,ac,ld,vA,VF,HF,zF,Zs,cc,Ry=L(()=>{Xt=null,sc=0,ic=[],Ay=()=>Xt,NF=t=>{Xt=t};xy=0,id=0;ad=0,ky=[];Fe=new Set,cd=!1,ac=[];ld=!1,vA=1e3,VF=8,HF=256,zF=4;Zs=[];cc=[]});var $y={};F($y,{RESERVED_STORE_METHODS:()=>uc,STORE_METHOD_NAMES:()=>My,__resetStateShadowWarnings:()=>YF,createScopeStore:()=>QF,createStore:()=>ud,getSignals:()=>JF,isStore:()=>ZF,warnStateKeyShadowsMethod:()=>Iy});function Iy(t,e){let n=(e||"")+"::"+t;if(Ly.has(n))return;Ly.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: ${My.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function YF(){Ly.clear()}function hd(t,e,n){if(t===e)return!0;if(n>XF)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(!hd(t[r],e[r],n+1))return!1;return!0}if(pd(t)&&pd(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)||!hd(t[s],e[s],n+1))return!1;return!0}return!1}function ud(t,e,n,r){n===void 0&&(n=0),r===void 0&&(r="");let o={},s={},i=w=>Object.prototype.hasOwnProperty.call(o,w)&&Object.prototype.hasOwnProperty.call(s,w),a=w=>{if(!r||!e||typeof e.isDataOnlyKey!="function")return!1;let b=r.indexOf(".");return!!e.isDataOnlyKey(b===-1?r:r.slice(0,b),w)},c=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let w in t){if(w==="__proto__"||!Object.prototype.hasOwnProperty.call(t,w))continue;if(w.startsWith("__")){s[w]=t[w];continue}uc.has(w)&&!a(w)&&Iy(w,r);let b=t[w];n<c&&b&&typeof b=="object"&&!Dy(b)?(s[w]=b,o[w]=wn(ud(b,e,n+1,Py(r,w)))):(s[w]=b,o[w]=wn(b))}let l=new Proxy(s,{get(w,b){if(b===en)return!0;if(b===dd)return o;if(b==="__raw")return w;if(b==="$update")return u;if(b==="$parse")return g;if(b==="$clean")return h;if(b==="$keys")return m;if(b==="$values")return y;if(b==="$replace")return _;if(b==="$add")return S;if(b==="$remove")return v;if(b==="$destroy")return x;if(b==="$quietUpdate")return d;if(b==="$settled")return p;if(uc.has(b)&&!Object.prototype.hasOwnProperty.call(o,b))switch(b){case"update":return u;case"parse":return g;case"clean":return h;case"keys":return m;case"values":return y;case"replace":return _;case"add":return S;case"remove":return v;case"destroy":return x;case"quietUpdate":return d}if(b==="__element")return w.__element;if(b==="parent")return w.parent;if(b==="root")return w.root;if(Object.prototype.hasOwnProperty.call(o,b)){let C=o[b].get();if(C!==void 0||!(b!=="root"&&w.root&&w.root!==l))return C}if(w[b]!==void 0)return typeof b=="string"&&Ce(),w[b];let k=typeof b=="string"&&!b.startsWith("__")&&b!=="then"&&b!=="constructor"&&Ay()!=null;if(b!=="root"&&w.root&&w.root!==l){let C=w.root[b];return k&&!Object.prototype.hasOwnProperty.call(o,b)&&(o[b]=wn(void 0),o[b].get()),C}if(k)return o[b]=wn(void 0),o[b].get();typeof b=="string"&&b.charCodeAt(0)===95&&b.charCodeAt(1)===95&&Ce()},set(w,b,k){if(b==="__proto__")return!1;if(b==="__element"||b==="parent"||b==="root"||typeof b=="string"&&b.startsWith("__")&&!Object.prototype.hasOwnProperty.call(o,b))return w[b]=k,!0;uc.has(b)&&!a(b)&&Iy(b,r);let C=Py(r,b);if(Object.prototype.hasOwnProperty.call(o,b))if(k&&typeof k=="object"&&!Dy(k)){if(k===w[b])return!0;let D=o[b].peek(),R=D&&D[en]?D.$parse():D;if(hd(k,R,0))return!0;w[b]=k,lc(C),o[b].set(ud(k,e,n+1,C))}else{if(Array.isArray(k)&&k!==w[b]&&Array.isArray(o[b].peek())&&hd(k,o[b].peek(),0))return!0;o[b].peek()!==k&&lc(C),w[b]=k,o[b].set(k)}else w[b]=k,k&&typeof k=="object"&&!Dy(k)?o[b]=wn(ud(k,e,n+1,C)):o[b]=wn(k);return!0},has(w,b){return Ce(),typeof b=="string"&&b.charCodeAt(0)===36&&uc.has(b.slice(1))?!0:b in w},ownKeys(w){return Ce(),Object.keys(o).filter(i)},getOwnPropertyDescriptor(w,b){return Ce(),i(b)?{enumerable:!0,configurable:!0,value:o[b].peek()}:Object.getOwnPropertyDescriptor(w,b)},deleteProperty(w,b){if(Object.prototype.hasOwnProperty.call(o,b)){let k=o[b];k.peek()!==void 0&&lc(Py(r,b)),k.set(void 0),k._subscribers.size===0&&delete o[b]}return delete w[b],!0}});function f(w,b){let k=s.__element;return!k||typeof k.onBeforeStateUpdate!="function"||b?.preventBeforeStateUpdateListener?!0:k.onBeforeStateUpdate(k,l,k.context,{changes:w,options:b})!==!1}function u(w,b){if(w&&typeof w=="object"&&!f(w,b))return l;fc(()=>{for(let C in w)C!=="__proto__"&&(l[C]=w[C])});let k=s.__element;return k&&k.onUpdate&&!b?.quiet&&k.onUpdate(k,l,k.context),l}function d(w){return u(w,{quiet:!0})}function p(){return Ty().then(()=>l)}function g(w){if(Ce(),w||(w=new Set),w.has(l))return"[Circular]";w.add(l);let b={};for(let k in o){if(k==="parent"||k==="root"||k.startsWith("__")||!Object.prototype.hasOwnProperty.call(s,k))continue;let C=o[k].peek();C&&C[en]?b[k]=C.$parse(w):b[k]=C}return b}function h(){return fc(()=>{for(let w in o)delete l[w]}),l}function m(){return Ce(),Object.keys(o).filter(i)}function y(){return Ce(),Object.keys(o).filter(i).map(w=>o[w].peek())}function _(w,b){return w&&typeof w=="object"&&!f(w,b)||fc(()=>{for(let k in o)k in w||delete l[k];for(let k in w)k!=="__proto__"&&(l[k]=w[k])}),l}function S(w,b){let k=Object.prototype.hasOwnProperty.call(o,w)?o[w].peek():s[w];if(Array.isArray(k))return l[w]=[...k,b],l;if(k&&typeof k=="object"&&!Array.isArray(k)){if(pd(b))k[en]?k.$update(b):l[w]={...k,...b};else{let C=String(Object.keys(k).length);k[en]?k.$update({[C]:b}):l[w]={...k,[C]:b}}return l}return l[w]=b,l}function v(w){return delete l[w],l}function x(){h(),s.__element=null,s.parent=null}return l}function ZF(t){return t&&t[en]===!0}function JF(t){return t[dd]}function QF(t,e){let n={},r={};if(t&&typeof t=="object")for(let a in t)r[a]=t[a],n[a]=wn(t[a]);let o=a=>{if(Object.prototype.hasOwnProperty.call(n,a))return n;let c=e;for(;c;){let l=c[dd];if(l&&Object.prototype.hasOwnProperty.call(l,a))return l;c=c[en]?c[fd]:null}return null},s=()=>{let a=e;for(;a&&a[en];)a=a[fd];return a&&typeof a=="object"?a:null};return new Proxy(r,{get(a,c){return c===en?!0:c===dd?n:c===fd?e:c==="__raw"?a:Object.prototype.hasOwnProperty.call(n,c)?n[c].get():e&&c!=="then"&&c!=="constructor"?e[c]:a[c]},set(a,c,l){let f=o(c);if(f)return f===n&&(a[c]=l),f[c].set(l),!0;let u=s();return u&&Object.prototype.hasOwnProperty.call(u,c)?(u[c]=l,!0):(a[c]=l,n[c]=wn(l),!0)},has(a,c){if(Ce(),c in n||c in a)return!0;let l=e;for(;l;){if(c in l)return!0;l=l[en]?l[fd]:null}return!1},ownKeys(){return Ce(),Object.keys(n)},getOwnPropertyDescriptor(a,c){return Ce(),c in n?{enumerable:!0,configurable:!0,value:n[c].peek()}:Object.getOwnPropertyDescriptor(a,c)}})}var en,dd,My,uc,Ly,Py,Dy,XF,pd,fd,TA=L(()=>{Ry();en=Symbol("store"),dd=Symbol("signals"),My=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],uc=new Set(My),Ly=new Set,Py=(t,e)=>t?t+"."+e:String(e);Dy=t=>!t||typeof t!="object"||Array.isArray(t)||t[en]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!pd(t),XF=12,pd=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};fd=Symbol("scope.parent")});var wo,gd=L(()=>{wo="3.14.789"});var Js,Qs,Ny,Fy=L(()=>{gd();Js="__SMBLS_SIGNAL_INSTANCES__",Qs=(t,e,n)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r)return null;let o=r[Js]||(r[Js]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(t||wo),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},Ny=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Js]}});var ti,OA,jy,RA=L(()=>{gd();Fy();ti="__SMBLS_SIGNAL_ENGINE__",OA=(t,e,n)=>{let r=e||wo,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[ti];return s&&s.engine&&s.version===r?(Qs(r,o,!0),s.engine):(s||(o[ti]={version:r,engine:t}),Qs(r,o,!1),t)},jy=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[ti]}});var Mt,nn,PA,z,md,Te,dc,ei,yd,bd,Hn,_d,wt,DA,LA,IA,wd,MA,$A,NA=L(()=>{Ry();TA();RA();gd();Fy();Mt=OA({...Oy,...$y,VERSION:wo},wo),nn=Mt.createSignal,PA=Mt.createComputed,z=Mt.createEffect,md=Mt.batch,Te=Mt.getObserver,dc=Mt.setObserver,ei=Mt.untrack||(t=>{let e=Mt.getObserver();if(!e)return t();Mt.setObserver(null);try{return t()}finally{Mt.setObserver(e)}}),yd=Mt.settled||(()=>Promise.resolve()),bd=Mt.countUntrackedReads||(t=>(t(),0)),Hn=Mt.createStore,_d=Mt.createScopeStore,wt=Mt.isStore,DA=Mt.getSignals,LA=Mt.STORE_METHOD_NAMES,IA=Mt.RESERVED_STORE_METHODS,wd=Mt.warnStateKeyShadowsMethod,MA=Mt.__resetStateShadowWarnings,$A=Mt.VERSION});var pc={};F(pc,{RESERVED_STORE_METHODS:()=>IA,SIGNAL_ENGINE_KEY:()=>ti,SIGNAL_INSTANCES_KEY:()=>Js,STORE_METHOD_NAMES:()=>LA,VERSION:()=>$A,__resetSignalEngine:()=>jy,__resetSignalInstances:()=>Ny,__resetStateShadowWarnings:()=>MA,batch:()=>md,countUntrackedReads:()=>bd,createComputed:()=>PA,createEffect:()=>z,createScopeStore:()=>_d,createSignal:()=>nn,createStore:()=>Hn,getObserver:()=>Te,getSignals:()=>DA,isStore:()=>wt,registerSignalInstance:()=>Qs,setObserver:()=>dc,settled:()=>yd,untrack:()=>ei,warnStateKeyShadowsMethod:()=>wd});var Rt=L(()=>{NA()});var Uy,Vy,T,yt,gc=L(()=>{"use strict";Uy=globalThis,Vy=globalThis,T=globalThis,yt=T.document});var qn,mc,de,yc=L(()=>{"use strict";gc();qn=t=>(typeof Node=="object"?t instanceof T.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,mc=t=>(typeof HTMLElement=="object"?t instanceof T.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,de=t=>typeof T<"u"&&(T.Node&&t instanceof T.Node||T.Window&&t instanceof T.Window||t===T||yt!==void 0&&t===yt)});var A,E,pe,P,Sd,xd,I,kd,V,jt,Wt,bc,he,Hy,qt=L(()=>{"use strict";yc();A=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,E=t=>typeof t=="string",pe=t=>typeof t=="number",P=t=>typeof t=="function",Sd=t=>t===!0||t===!1,xd=t=>t===null,I=t=>Array.isArray(t),kd=t=>t instanceof Date,V=t=>t===null?!1:typeof t=="object",jt=t=>t!==void 0,Wt=t=>t===void 0,bc={boolean:Sd,array:I,object:A,string:E,date:kd,number:pe,null:xd,function:P,objectLike:V,node:qn,htmlElement:mc,defined:jt},he=t=>(...e)=>e.some(n=>bc[n](t)),Hy=t=>(...e)=>!e.some(n=>bc[n](t))});var zy,Wy,qy,Ky,oi,_c,Gy,Yy,wc,Xy,Zy,Jy,Qy,tb,eb,nb,si,Sc,ii=L(()=>{"use strict";Sn();qt();zy=(t,e)=>e.every(n=>t.includes(n)),Wy=(t,e)=>{let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n},qy=(t,e)=>{if(E(e)&&(e=parseInt(e)),pe(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},Ky=(t,e,n)=>{e<0||n<0||e>=t.length||n>=t.length||([t[e],t[n]]=[t[n],t[e]])},oi=(...t)=>[].concat(...t),_c=(t,e=[])=>t.reduce((n,r)=>dt(n,pt(r,{exclude:e}),e),{}),Gy=(t,e)=>{let n=t.indexOf(e);return n!==-1?t.slice(0,n):t},Yy=(t,e)=>{if(!I(t))return;let n=t.indexOf(e);return n!==-1?t.slice(n+1):t},wc=(t,e)=>{let n=t.indexOf(e);if(n>-1){let r=[...t];return r.splice(n,1),r}return t},Xy=(t,e)=>t.filter(n=>n!==e),Zy=(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},Jy=(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},Qy=(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},tb=(t,e)=>t.filter(n=>!e.includes(n)),eb=(t,e)=>{let n=new Set(e);return t.filter(r=>!n.has(r))},nb=(t,e)=>{if(!t)return 0;let n=0;for(let r=0;r<e.length;r++)t.includes(e[r])&&n++;return n},si=t=>I(t)?[...new Set(t)]:t,Sc=(t,e)=>{for(let n in e)Object.defineProperty(t,n,{value:e[n],enumerable:!1,configurable:!0,writable:!0})}});function Kt(t,e,n={}){let{bracketsLength:r=2,authored:o=!1}=n,s=r===3?"{{{":"{{";if(!t.includes(s)||o!==!0&&!rj(this,t))return t;let i=nj[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=xc(h,p);return m!=null&&typeof m=="object"?"":String(m??"")}else{let g=xc(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 S=xc(y,p);if(S!=null&&typeof S!="object")return String(S);for(let v in y){let x=y[v];if(x&&typeof x=="object"&&!Array.isArray(x)){let w=xc(x,p);if(w!=null&&typeof w!="object")return String(w)}}}let _=xc(h.translations,p);if(_!=null&&typeof _!="object")return String(_)}return""}})}var rb,kc,ob,nj,xc,rj,xo,sb,oj,ib,ab,cb,sj,lb,fb,vc=L(()=>{"use strict";rb=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),kc=(t,e)=>{for(let n of e)if(t.includes(n))return!0;return!1},ob=(t,e)=>{let n=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(n,"")},nj={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},xc=(t,e)=>e.split(".").reduce((n,r)=>n?.[r],t),rj=(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};xo=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,sb=(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}},oj=/\\([0-7]{1,3})/g,ib=t=>t.replace(oj,(e,n)=>String.fromCharCode(parseInt(n,8))),ab=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),cb=t=>t.replace(/\/\/\/\/\/n/g,`
|
|
3
|
+
`).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),sj=/[^a-zA-Z0-9\s]/g,lb=t=>t.replace(sj,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),fb=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var Cr,Ec,ub,ko,Tr,Or,db,ai,vo,Ac,pb,Eo=L(()=>{"use strict";Cr=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"]),Ec=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),ub=["ref","parent","__element","__depends","__ref","__children","root"],ko=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"]),Tr=new Set(["update","__element"]),Or=new Set(["set","reset","update","remove","updateContent","removeContent","lookup","lookdown","lookdownAll","whenConnected","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"]),db=t=>Or.has(t),ai=new Set(["log","warn","error","verbose"]),vo=t=>Or.has(t)&&!ai.has(t),Ac=new Set(["node","context","extends","__element","__ref",...Or,...ko,...Tr]),pb=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var gb,mb,ij,yb,hb,aj,cj,lj,ci,vd,Cc,bb=L(()=>{"use strict";gb=["$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 : {}); })()"],mb=(t,e)=>t.split("$R").join(e),ij=gb.map(t=>[mb(t,"this"),t]),yb=t=>mb(gb[gb.length-1],t),hb="const __scope = ",aj=/^\(globalThis\[Symbol\.for\('smbls\.libraryScope'\)\] \|\| \(\(_, v\) => v\)\)\("(?:[^"\\]|\\.)*", /,cj=/^\s*(?:async\s*)?(?:\(([^()[\]{}'"`/]*)\)|([A-Za-z_$][\w$]*))\s*=>\s*\{\s*/,lj=/^[A-Za-z_$][\w$]*$/,ci=(t,e)=>typeof t=="string"&&new RegExp("^"+e+"\\d*$").test(t),vd=(t,e)=>{if(t.length>=2&&ci(t[0],"el"))return t[0];if(t.length>=2&&ci(t[1],"el"))return t[1];if(t.length>=1&&ci(t[0],"el")||ci(t[0],"element")||ci(t[0],"node"))return t[0];if(typeof e=="function"){let n=e();if(n&&t.includes(n))return n}return t.find(n=>ci(n,"element"))||null},Cc=t=>{if(typeof t!="string"||t.indexOf(hb)===-1||t.indexOf("this")===-1)return t;let e=cj.exec(t);if(!e)return t;let n=e[0].length;if(!t.startsWith(hb,n))return t;n+=hb.length;let r=aj.exec(t.slice(n,n+400));r&&(n+=r[0].length);let o=ij.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=>!lj.test(l)))return t;let c=vd(a);return c?t.slice(0,n)+mb(o[1],c)+t.slice(s):t}});function vj(){let t=Ao.get(this);return t?t.src.trim():Function.prototype.toString.call(this)}var FA,Co,St,wb,Tt,dt,qA,Sb,pt,Oc,fj,uj,jA,Rc,dj,pj,hj,se,KA,gj,Ed,GA,_b,Ao,mj,yj,bj,_j,wj,BA,Sj,UA,xj,VA,Ad,kj,Ej,Aj,Cj,HA,xb,Oe,To,Tj,Oj,ge,YA,XA,ZA,JA,QA,tC,eC,Pc,Dc,li,Oo,zA,Tc,WA,Ro,kb,vb,Cd,Eb,Ab,Lc,Po,ie,Td,Rj,Cb,Tb,Od,Ob,Rb,Pb,Db,Lb,Ib,Mb,Sn=L(()=>{"use strict";gc();qt();ii();vc();yc();Eo();bb();FA="production",Co=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,St=(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&&(I(t)||A(t)&&!de(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 St(i,e,n,r)}}return t},wb=(t,e,n)=>{for(let r in e)t[r]=St(e[r],n)},Tt=(t,e,n=[])=>{let r=n instanceof Set;for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(Co(o)||(r?n.has(o):n.includes(o))||t[o]===void 0&&(t[o]=e[o]));return t},dt=(t,e,n=Ac)=>qA(t,e,n,null),qA=(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)||Co(s)||s==="constructor"||s==="prototype"||(o?n.has(s):n.includes(s)))continue;let i=t[s],a=e[s];if(V(i)&&V(a)){let c=r||[];c.push(t,e),qA(i,a,n,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},Sb=(t,e=[])=>{let n=e instanceof Set,r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(Co(o)||(n?e.has(o):e.includes(o))||(r[o]=t[o]));return r},pt=(t,e={})=>{let{exclude:n=[],cleanUndefined:r=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!V(t)||de(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=I(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)||Co(p)||p==="__proto__"||c(p))continue;let g=u[p];if(!(r&&g===void 0)&&!(o&&g===null)){if(de(g)){d[p]=g;continue}if(i&&p==="extends"&&I(g)){d[p]=_c(g,n);continue}if(P(g)){d[p]=g;continue}if(V(g))if(s.has(g))d[p]=s.get(g);else{let h=I(g)?[]:{};s.set(g,h),d[p]=h,f.push([g,h])}else d[p]=g}}}return l},Oc=(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]={},Oc(r,e[n]);else if(I(r)){let o=e[n]=[];for(let s=0;s<r.length;s++){let i=r[s];A(i)?(o[s]={},Oc(i,o[s])):P(i)?o[s]=i.toString():o[s]=i}}else e[n]=r}return e},fj=/^[A-Za-z_$][A-Za-z0-9_$]*$/,uj=t=>`'${String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r").replace(/\n/g,"\\n")}'`,jA=t=>{let e=String(t);return kc(e,[`
|
|
4
|
+
`,"'"])?"`"+e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")+"`":"'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r")+"'"},Rc=(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=fj.test(s)?s:uj(s);if(o+=`${r} ${a}: `,i instanceof RegExp)o+=String(i);else if(I(i)){o+=`[
|
|
6
6
|
`;for(let c of i)c instanceof RegExp?o+=`${r} ${String(c)},
|
|
7
|
-
`:
|
|
8
|
-
`:
|
|
7
|
+
`:V(c)&&c!==null?o+=`${r} ${Rc(c,e+2)},
|
|
8
|
+
`:E(c)?o+=`${r} ${jA(c)},
|
|
9
9
|
`:o+=`${r} ${c},
|
|
10
|
-
`;o+=`${r} ]`}else
|
|
11
|
-
`}return o+=`${r}}`,o},
|
|
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
|
|
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},
|
|
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},
|
|
10
|
+
`;o+=`${r} ]`}else V(i)?o+=Rc(i,e+1):E(i)?o+=jA(i):o+=i;o+=`,
|
|
11
|
+
`}return o+=`${r}}`,o},dj=[/^\(\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]*\}$/],pj=/^["[{]/,hj=/^(export|import)\s/,se=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("("))||hj.test(e)||!dj.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0);return!(o===123&&!n||o===91||pj.test(e)&&!n)},KA=t=>(0,eval)(t),gj=(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
|
+
`,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},Ed=(t,e,n,r)=>{let o=String(t).trimStart();if(/^(export|import)\s/.test(o))return t;t=Cc(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=gj(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)}},GA=1,_b=2,Ao=new WeakMap,mj=/^(async\s+)?function(?![\w$])\s*(\*)?\s*([A-Za-z_$][\w$]*)?\s*\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*\{/,yj=/^(async\s+)?[A-Za-z_$][\w$]*\s*=>/,bj=/^(async\s*)?\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*=>/,_j=/^(async\s+)?([A-Za-z_$][\w$]*)\s*\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*\{/,wj=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"]),BA=t=>t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===36||t===95,Sj=(t,e,n)=>{let r=t.indexOf(e,n);for(;r!==-1;){let o=r+e.length;if((r===0||!BA(t.charCodeAt(r-1)))&&(o>=t.length||!BA(t.charCodeAt(o))))return!0;r=t.indexOf(e,o)}return!1},UA=t=>{let e=t.length-1;for(;e>=0&&t.charCodeAt(e)<=32;)e--;return e<0?-1:t.charCodeAt(e)},xj=t=>{let e=t,n=0;for(;n<e.length&&e.charCodeAt(n)<=32;)n++;n&&(e=e.slice(n));let r=mj.exec(e);if(r){if(r[2]||UA(e)!==125)return null;let o=r[3]||"";return o&&Sj(e,o,r[0].indexOf("("))||e.indexOf("arguments.callee")!==-1?null:{src:t,name:o,kind:r[1]?_b:GA,async:!!r[1],fn:void 0}}return r=yj.exec(e)||bj.exec(e),r?{src:t,name:"",kind:_b,async:!!r[1],fn:void 0}:(r=_j.exec(e),r&&!wj.has(r[2])&&UA(e)===125?e.indexOf("arguments.callee")!==-1?null:{src:t,name:r[2],kind:_b,async:!!r[1],fn:void 0}:null)},VA=t=>t.index===-1?`"${t.key}"`:`array index ${t.index} (prop "${t.key}")`,Ad=t=>{let e=Ed(t.src,VA(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: ${VA(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},kj=(t,e,n)=>Reflect.construct(t,e,n);Ej={length:{get(){let t=Ao.get(this);if(!t)return 0;let e=t.fn===void 0?Ad(t):t.fn;return e?e.length:0},configurable:!0},name:{get(){let t=Ao.get(this);return t?t.name:""},configurable:!0},toString:{value:vj,writable:!0,configurable:!0}},Aj=Object.getPrototypeOf(async function(){}),Cj=t=>{let e;return t.kind===GA?e=function(){let n=t.fn===void 0?Ad(t):t.fn;return n===null?t.value:new.target?kj(n,arguments,new.target):n.apply(this,arguments)}:e={lazy(){let n=t.fn===void 0?Ad(t):t.fn;return n===null?t.value:n.apply(this,arguments)}}.lazy,Ao.set(e,t),Object.defineProperties(e,Ej),t.async&&Object.setPrototypeOf(e,Aj),e},HA=(t,e,n,r)=>{let o=xj(t);return o?(o.key=e,o.index=n,o.opts=r,Cj(o)):Ed(t,n===-1?`"${e}"`:`array index ${n} (prop "${e}")`,r)},xb=t=>typeof t=="function"&&Ao.has(t),Oe=t=>{let e=Ao.get(t);return e?e.src.trim():Function.prototype.toString.call(t)},To=t=>{let e=typeof t=="function"?Ao.get(t):void 0;return e?(e.fn===void 0?Ad(e):e.fn)===null:!1},Tj=new Set(["components","pages","functions","methods","snippets","app","globalScope"]),Oj={window:{eval:KA}},ge=(t,e={},n=Oj)=>{if(!t||typeof t!="object")return e;(!n||!n.window||typeof n.window.eval!="function")&&(n={...n,window:{eval:KA}});let r=n.lazy===!0,o=n.lazy==="context",s=(a,c,l)=>r||o&&(a===t?Tj.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(E(u))se(u)?c[f]=l?HA(u,f,-1,n):Ed(u,`"${f}"`,n):c[f]=u;else if(I(u)){let d=c[f]=[],p=s(a,f,l);for(let g=0;g<u.length;g++){let h=u[g];if(E(h))d.push(se(h)?p?HA(h,f,g,n):Ed(h,`array index ${g} (prop "${f}")`,n):h);else if(A(h)){let m=WA(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=WA(u);if(d!==null){c[f]=d;continue}let p=c[f]&&typeof c[f]=="object"&&!I(c[f])?c[f]:c[f]={};i.push([u,p,s(a,f,l)])}else c[f]=u}}return li(e)},YA="Set",XA="Map",ZA="RegExp",JA="WeakMap",QA="WeakSet",tC="String",eC=t=>{if(!t||typeof t!="object"||t.__type!==tC||!E(t.value))return!1;let e=Object.keys(t);return e.length===2&&e.includes("value")},Pc=eC,Dc=Symbol.for("smbls.revived"),li=t=>{if(t&&typeof t=="object")try{t[Dc]=!0}catch{}return t},Oo=t=>!!(t&&typeof t=="object"&&t[Dc]===!0),zA=t=>{let e=Object.keys(t);return e.length===1&&e[0]==="__type"},Tc=(t,e)=>{if(!t||typeof t!="object")return t;if(eC(t))return t.value;let n=s=>Tc(s,e||(e=new WeakMap));if(t.__type===YA&&I(t.values))return new Set(t.values.map(n));if(t.__type===XA&&I(t.entries))return new Map(t.entries.map(s=>I(s)?[n(s[0]),n(s[1])]:s));if(t.__type===JA&&zA(t))return new WeakMap;if(t.__type===QA&&zA(t))return new WeakSet;if(t.__type===ZA&&E(t.source))try{return new RegExp(t.source,E(t.flags)?t.flags:"")}catch{return t}if(e||(e=new WeakMap),e.has(t))return e.get(t);let r=!1;if(I(t)){let s=new Array(t.length);e.set(t,s);for(let i=0;i<t.length;i++)s[i]=Tc(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]=Tc(t[s],e),o[s]!==t[s]&&(r=!0);return r||e.set(t,t),r?o:t},WA=t=>{if(!t||typeof t!="object")return null;let e=t.__type;if(e!==ZA&&e!==YA&&e!==XA&&e!==JA&&e!==QA&&e!==tC)return null;let n=Tc(t);return n===t?null:n},Ro=t=>{if(!t||typeof t!="object")return t;let e={},n=[];for(let i of Object.keys(t)){let a=t[i];E(a)&&se(a)?n.push([i,a]):e[i]=Tc(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
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
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},Cm=(t,e={verbose:!0})=>{try{return t?T.eval("("+t+")"):{}}catch(n){e.verbose&&console.warn(n)}},Tm=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),du=t=>{for(let e in t)return!1;return!0},Om=t=>E(t)&&du(t),Rm=()=>Object.create(null),Na=(t,e,n={})=>{let r=n.exclude||[],o=n.preventUnderscore;for(let s in e)r.includes(s)||!o&&oo(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},co=(t,e,n=[])=>{let r=n instanceof Set;for(let o in e)oo(o)||o==="constructor"||o==="prototype"||(r?n.has(o):n.includes(o))||(t[o]=e[o]);return t},Jt=(t,e,n={},r=new WeakMap)=>{if(!q(t)||!q(e)||re(t)||re(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&&oo(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];re(l)?t[a]=l:q(c)&&q(l)?t[a]=Jt(c,l,n,r):l!==void 0&&(t[a]=l)}return t},pu=(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)||!pu(t[i],e[i],n))return!1}return!0},y2=new Set(["node","__ref"]),Pm=(t,e,n=y2)=>{if(t===e)return!0;if(!q(t)||!q(e)||re(t)||re(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(re(l)||re(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)},Lm=(t,e)=>{if(e==null)return t;if(se(e)("string","number"))delete t[e];else if(L(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},hu=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]=hu(t[n]));return e},Dm=(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},Im=(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]},Mm=(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},$m=(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},Nm=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(Gk==="test"||Gk==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",n),!0},Fm=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)},jm=(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 Fa,ja,Ba,gu=P(()=>{"use strict";un();Fa=(function(){let t=0;function e(){return t++,t}return e})(),ja=Fa,Ba=(t,e,n)=>(ht(n,t)||n||t.key||Fa()).toString()});var Ge,Bm,ur,mu,Um,Vm,zm,dr,Hm,Rn,J,yu=P(()=>{"use strict";Ge="production",Bm=Ge,ur=(t=Ge)=>t==="production",mu=(t=Ge)=>t==="testing"||t==="test",Um=mu,Vm=(t=Ge)=>t==="staging",zm=(t=Ge)=>t==="local",dr=(t=Ge)=>t==="development"||t==="dev"||t==="local",Hm=(t,e=Ge)=>e[t],Rn=(t=Ge)=>!ur(t),J=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 Ua(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 Km(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 Wm,qm,b2,xs,ks,vs,pr,Es=P(()=>{"use strict";Wm=(t,e,n=300)=>{let r;return(...o)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(t,o)},n)}},qm=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}}},b2=/^\s*(?:async\s+)?(?:function\b|\([^)]*\)\s*=>|[a-zA-Z_$][\w$]*\s*=>)/,xs=t=>b2.test(t),ks=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let n of e)if(n.resolveHandler)return!0;return!1},vs=(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},pr=(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 Gm,dv=P(()=>{"use strict";Nt();un();Gm=(t,e)=>{let{__ref:n}=t,r=t.if;if(R(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"?ht(r,t)?n.__if=!0:delete n.__if:n.__if=!0}});var Ym,Xm,pv=P(()=>{"use strict";Ym=(t,...e)=>{t&&e.map(n=>console.log(n))},Xm=(t,e,...n)=>{t&&(console.group(e),n.map(r=>console.log(r)),console.groupEnd(e))}});function ey(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 ny(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 Zm,Qm,Jm,ty,hv=P(()=>{"use strict";Nt();_a();Zm=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),Qm=(t,e,n=365)=>{if($t(ut)||$t(ut.cookie))return;let r=new Date;r.setTime(r.getTime()+n*24*60*60*1e3);let o=`expires=${r.toUTCString()}`;ut.cookie=`${t}=${e};${o};path=/`},Jm=t=>{if($t(ut)||$t(ut.cookie))return;let e=`${t}=`,r=decodeURIComponent(ut.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""},ty=t=>{$t(ut)||$t(ut.cookie)||(ut.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var As,gv,ry,oy=P(()=>{"use strict";As={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"])},gv=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"]),ry=t=>As.body.has(t)});var sy,mv,Cs,Le,Ts,Ha,dn,iy,bu,Wa,ay,qa,_u,wu,Ka,Su,Os,_2,pn,yv,Va,Ga,cy,za,ly,fy,xu,ku,vu,Eu,Au,Cu,bv,Tu=P(()=>{"use strict";bs();uy();un();Nt();sy="production",mv=t=>t.sourcemap!==!1&&sy!=="production",Cs=t=>{if(!t)return[];let e=[],n=t.extends;n&&(L(n)?e.push(...n):e.push(n));let r=t.extend;return r&&(L(r)?e.push(...r):e.push(r)),e},Le=t=>{if(!L(t))return t;let e=[];for(let n=t.length-1;n>=0;n--){let r=t[n];e.push(L(r)?Le(r):r)}return e},Ts=t=>{if(t.includes("+"))return t.split("+").filter(hn);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!hn(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},Ha=(t,e,n)=>{let r=[],o=Ts(n);o&&(r=[...o]);let s=Le(Cs(t));return s.length&&(r=[...r,...s]),r},dn=(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},iy=(t,e)=>{if(!t)return e;let{extends:n}=e,r=L(n)?n:[n],o=L(t)?t:[t];return{...e,extends:ms(o,r)}},bu=()=>Math.random().toString(36).substring(2),Wa={},ay={},qa=t=>Wa[t.__hash],_u=(t,e)=>{let n=bu();return v(t)||(t.__hash=n),n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(Wa[n]=e),e},wu=(t,e)=>t.__hash?e.concat(qa(t)):_u(t,e),Ka=(t,e,n,r=new Set,o,s)=>{for(let i of t)L(i)?Ka(i,e,n,r,o,s):Os(i,e,n,r,o,void 0,s);return e},Su=(t,e,n,r=new Set,o,s,i)=>{let a=Cs(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&&Os(Le(a),e,n,r,o,s,i),e},Os=(t,e,n,r=new Set,o,s,i)=>{if(!t||r.has(t))return e;if(L(t))return Ka(t,e,n,r,o,i);let a=s;return v(t)?(a=t,t=Ga(t,n)):i&&E(t)&&i.has(t)&&(a=i.get(t)),r.has(t)||(r.add(t),t?.extends||t?.extend?Su(t,e,n,r,o,a,i):t&&(e.push(t),o&&o.push(a))),e},_2=new Set(["parent","node","__ref","__proto__","extends","extend","childExtends","childExtendsRecursive"]),pn=(t,e,n,r,o)=>{e=ft(e);for(let s in e){if(_2.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)&&!L(a)?(n[s]=n[s]||{},yv(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];hn(s)?t[s]=pn(i,a,c,r,l):pn(i,a,c,r,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(L(i)&&L(a))t[s]=i.concat(a);else if(L(i)&&E(a)){let c=pn({},i);t[s]=pn(c,a)}}}}return t},yv=(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)&&!L(s)?(t[o]=t[o]||{},yv(t[o],s,n,r)):t[o]=n}}},Va=(t,e,n)=>t.reduce((r,o,s)=>{let i=ft(o),a=n?n[s]:void 0;return pn(r,i,e,a)},{}),Ga=(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&&(sy==="test"||sy==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},cy=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),za=(t,e,n,r)=>{if(!t)return[];if(t.__hash)return qa(t)||[];let s=Os(t,[],e,new Set,n,void 0,r);return n?s:wu(t,s)},ly=(t,e)=>{if(!t)return e;let n=L(t)?t:[t];return ms(n,e)},fy=t=>{let e=[];function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&(hn(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},xu=(t,e,n={})=>{let{__ref:r}=t,o=t.context||e.context,s=t.variant,i=Cs(t);if(i.length){let a=Le(i),[c,...l]=a,f=typeof c=="string"&&s&&o?.components?`${c}.${s}`:null;f&&o.components[f]?dn([f,...l],t):dn(a,t)}return ku(t,e,n),vu(t,e,n),Eu(t,e,n),t.component&&dn(Le(ht(t.component,t)),t),o.defaultExtends&&dn(Le(o.defaultExtends),t),ys(r.__extends)},ku=(t,e,n={})=>{let{__ref:r}=t;return n.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&dn(Le(e.childProps.extends),t),r.__extends},vu=(t,e,n={})=>{let{__ref:r}=t,o=n.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!o&&s&&dn(Le(s),t),r.__extends},Eu=(t,e,n={})=>{let{__ref:r}=t,o=e.childExtendsRecursive,s=n.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return o&&!i&&!s&&dn(Le(o),t),r.__extends},Au=(t,e,n={})=>{let{__ref:r}=t,o=t.context||e.context,s=t.variant,i=mv(n),a=i?[...r.__extends]:null,c=ys(r.__extends.map((l,f)=>Ga(l,o,n,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let h=c[d],g=a[d];h&&E(h)&&v(g)&&l.set(h,g)}let f=[],u=za(c,o,f,l);r.__extendsStack=u,r.__extendsNames=f}else{let l=za(c,o);r.__extendsStack=l}return r.__extendsStack},Cu=(t,e,n={})=>{let{__ref:r}=t,{__extendsStack:o}=r;if(mv(n)){let s={},i=r.__extendsNames||[],a=Va(o,s,i),c={};pn(t,a,c,void 0,s),r.__sourcemap=c}else{let s=Va(o);pn(t,s)}return t},bv=(t,e,n={})=>(xu(t,e,n),Au(t,e,n),Cu(t,e,n),t)});function dy(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function py(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function hy(t,e,n){let{context:r}=e||{},[o]=Ts(n),s=n||o;return r?.components?.[s]||r?.pages?.[s]}var hn,uy=P(()=>{"use strict";Tu();Nt();hn=t=>{if(!v(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function _v(t,e){let{props:n,on:r}=e,o=Jr(t.split("on")[1]),s=r[o],i=n[t];R(s)?r[o]=(...a)=>{if(s(...a)!==!1&&R(i))return i(...a)}:r[o]=i}var wv=P(()=>{"use strict";Ta();Nt()});function Ou(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()&&(R(o)||o!=null&&ks(this.context))){let g=Jr(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)||R(a),f=E(c)||R(c);if(l||f)continue;let u=r.charAt(0);if(xv.has(u)){t.props[r]=o,delete t[r],n.push(r);continue}let d=gy.test(r)||Sv.test(r)||S2(o),h=cr.has(r);!d&&!h&&(r in t.props||(t.props[r]=o),delete t[r],n.push(r))}return t}function Ru(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=R(o)||o!=null&&ks(this.context);if(s&&i){_v(r,t),delete t.props[r];continue}if(n.includes(r)||r==="childProps")continue;let a=r.charAt(0);if(xv.has(a))continue;let c=this.define?.[r],l=this.context?.define?.[r],f=E(c)||R(c),u=E(l)||R(l),d=gy.test(r)||Sv.test(r),h=cr.has(r);(d||h||f||u)&&(t[r]===void 0||o===null)&&(t[r]=o,t.props&&delete t.props[r])}return t}function Pu(t=this){let e=[];return Ou.call(this,t,{cachedKeys:e}),Ru.call(this,t,{cachedKeys:e}),t}function my(t={}){return t.on||(t.on={}),t.props||(t.props={}),Pu.call(this,t)}function by(t,e){this.__element.update({props:t},e)}function Ja(t){let e={update:by.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var gy,Sv,xv,w2,S2,Za,Ya,yy,Qa,tc,ec,Lu,Xa,_y,wy,Sy=P(()=>{"use strict";no();wv();un();Nt();Ta();Es();gy=/^[A-Z]/,Sv=/^\d+$/,xv=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),w2=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),S2=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(w2.has(e)||gy.test(e))return!0;return!1},Za=(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),{})};Ya=t=>se(t)("string","number")?{inheritedString:t}:t,yy=(t,e)=>!t||!e.length?!1:e.includes(t),Qa=(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=Ya(i);r.unshift(c)}if(s){let c=Ya(s);r.unshift(c)}return r};tc=t=>{let e=new Set;return t.filter(n=>!n||lr.has(n)||e.has(n)?!1:(e.add(n),!0))},ec=(t,e,n)=>(e.props=t.reduce((r,o)=>{if(lr.has(o))return r;for(;R(o);)o=ht(o,e);return ct(r,ft(o,{exclude:lr}))},{}),Ja(e),e.props),Lu=(t,e)=>{let{props:n,__ref:r}=t,o=r.__propsStack||[];if(e?.props&&(o=[...Qa(t,e)]),E(n)?o.push(n):n==="inherit"&&e?.props?o.push(e.props):n&&o.push(n),L(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=tc(o),r.__propsStack},Xa=(t,e)=>{let{__ref:n}=t,r=Lu(t,e);r.length?ec(r,t):(n.__propsStack=[],t.props={})},_y=function(t,e,n){let{__ref:r}=t;if(r.__if)Xa(t,e);else try{Xa(t,e)}catch(o){t.context?.designSystem?.verbose&&console.warn("initProps error at",r.path?.join("."),o),t.props={},r.__propsStack=[]}return Ja(t),t},wy=(t,e,n)=>{let{__ref:r}=e,s=[...r.__propsStack||[]],i=Qa(e,n);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),r.__propsStack=tc(s),r.__propsStack.length&&ec(r.__propsStack,e),e}});var kv,Du,Iu,Mu,$u,xy,Nu,Fu,ju,ky,vv=P(()=>{"use strict";Tu();gu();Sa();Sy();oy();Nt();kv="production",Du=(t,e,n)=>{let r=e.childExtends&&e.childExtends.tag,o=e.childProps&&e.childProps.tag,s=As.body.has(n)&&n;return{text:t,tag:r||o||s||"string"}},Iu=(t,e,n)=>{if(t===void 0)return(kv==="test"||kv==="development")&&console.warn(n,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:se(t)("string","number")?Du(t,e,n):R(t)?{props:t}:t},Mu=(t,e)=>{let n={};return n.origin=t,n.parent=e,n},$u=(t,e,n,r,o)=>{if(!e)return o;if(On(e)){let s={key:":root",node:e};return o[`${n}_parent`]=s,s}return e},xy=(t,e)=>{let{__ref:n}=t,{__ref:r}=e,o=e&&e.key===":root";n?.root||(n.root=o?t:r?.root)},Nu=(t,e,n)=>{let{__ref:r}=e;return r||(r=e.ref={}),r.path||(r.path=[]),r.path.concat(n)},Fu=(t,e,n,r,o)=>(r.context&&!o.context&&!t.context&&(o.context=r.context),r.context||e.context||o.context||t.context),ju=(t,e,n)=>{let r=Mu(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=Ha(t,e,n),r.path=Nu(t,e,n),r},ky=(t,e,n,r,o)=>{let i=t?.__hash?{extends:[t]}:Iu(t,e,n);if(!i)return;let a=$u(i,e,n,r,o),c=Ba(i,a,n);ju(i,a,c);let l=Za(i,a,c),f=Fu(i,a,c,r,o),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var vy,Bu,Uu,Vu,zu,Ey,Hu,Ay,Cy,Ty,Oy,Ev,hr,lo,Av,Cv,Tv,nc,gn,Ov=P(()=>{"use strict";bs();no();un();Nt();vy=t=>{let{state:e,props:n,__ref:r}=t,o=n?.state||e;return se(o)("string","number")?(r.__state=o,{value:o}):o===!0?(r.__state=t.key,{}):o?(r.__hasRootState=!0,o):!1},Bu=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},Uu=(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},Vu=(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]},zu=(t,e,n={})=>{let o=t.__ref.__state;if(!Hu(t))return;let s=Bu(o,e.state),i=e.state;if(s)i=s,o=o.replaceAll("~/","");else{let a=Uu(o,e.state);a&&(i=a,o=o.replaceAll("../",""))}if(i)return Vu(o,i,n)},Ey=(t,e)=>{let n=t.__ref,r=zu(t,e);if(r===void 0)return t.state;if(se(r)("object","array"))return ft(r);if(se(r)("string","number","boolean"))return n.__stateType=typeof r,{value:r};console.warn(n.__state,"is not present. Replacing with",{})},Hu=t=>{let{__ref:e}=t,n=e?.__state;return!!(n&&se(n)("number","string","boolean"))},Ay=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},Cy=(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},Ty=(t,e)=>{let{__element:n}=e,r=n?.state;if(!r)return;let o=ft(r,to),s={[t.key]:o},i=E(r.__depends)?{...r.__depends,...s}:s;return Array.isArray(r)?Ea(r,{...Object.getPrototypeOf(r),__depends:i}):Object.setPrototypeOf(r,{...Object.getPrototypeOf(r),__depends:i}),o},Oy=(t,e,n={})=>{let{overwrite:r}=n;if(!r)return;let o=r==="shallow";if(r==="merge"){ct(t,e,to);return}(o?co:Jt)(t,e,to)},Ev="__polyglotSeededKeys",hr=t=>{if(!E(t))return new Set;let e=t[Ev];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,Ev,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},lo=(t,e,n)=>hr(t).has(e)?!0:!E(n)||n[e]===void 0,Av="__polyglotSeededValues",Cv=t=>{if(!E(t))return new Map;let e=t[Av];if(!(e instanceof Map)){e=new Map;try{Object.defineProperty(t,Av,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},Tv=t=>{if(t===null||typeof t!="object")return typeof t+":"+String(t);try{return"json:"+JSON.stringify(t)}catch{return null}},nc=(t,e,n)=>{if(!hr(t).has(e))return!1;let r=Cv(t);if(!r.has(e))return!0;let o=E(n)||Array.isArray(n)?n[e]:void 0,s=Tv(o);return s!==null&&s===r.get(e)},gn=(t,e,...n)=>(hr(t).add(e),n.length&&Cv(t).set(e,Tv(n[0])),e)});var x2,Ry,Rv=P(()=>{"use strict";x2=(t,e)=>{let n=e;for(;n;){if(n===t)return!0;n=Object.getPrototypeOf(n)}return!1},Ry=(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&&!x2(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var Pv,Wu,Pn,qu,Py,Ly=P(()=>{"use strict";Nt();Es();Pv=(t,e)=>{let n="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[n]},Wu=(t,e,n,r,o)=>{if(t=vs(t,e),!!R(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}},Pn=(t,e,n)=>{if(!e)throw new Error("Element is required");pr(t,e,n);let r=Pv(t,e);if(r){let{state:o,context:s}=e;return Wu(r,e,o,s,n)}},qu=(t,e,n,r,o,s)=>{if(t=vs(t,n),!!R(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}},Py=(t,e,n,r)=>{pr(t,n,e,r);let o=Pv(t,n);if(o){let{state:s,context:i}=n;return qu(o,e,n,s,i,r)}}});var Dy,rc,Iy=P(()=>{"use strict";Dy={},rc={}});var Ku,My,oc,Lv,$y,Ny,Dv,Iv,Mv,$v,Nv,Gu=P(()=>{"use strict";M();Ku="@symbo.ls/fetch:EARLY",My=3e4,oc=(t,e)=>{let n=new URL(t);return n.searchParams.sort(),n.toString()+" "+(e||"")},Lv=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},$y=()=>Symbol.for(Ku),Ny=(t,e)=>{let n=[];for(let r in t||{}){let o=r.toLowerCase(),s={name:r,header:o,param:t[r],found:!1,value:void 0};for(let i in e||{})i.toLowerCase()===o&&(s.found=!0,s.value=e[i]);n.push(s)}return n},Dv=(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},Iv=(t,e)=>{let n=$y();if(!t||typeof t!="object"){let s=globalThis[n];return s&&s.seeded?{carried:{},rpc:!1,maxAge:My}:null}globalThis[n]||(globalThis[n]={entries:{}});let r={};for(let{header:s,found:i,value:a}of Ny(t.query,e))i&&(r[s]=a);let o=typeof t.maxAge=="number"&&t.maxAge>=0?t.maxAge:My;return{carried:r,rpc:t.rpc==="get",maxAge:o}},Mv=(t,e=My)=>{let n=globalThis[$y()],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)},$v=()=>{let t=globalThis[$y()];t&&t.entries&&(t.entries={})},Nv=t=>{let e=(Array.isArray(t)?t:[]).filter(r=>r&&typeof r.url=="string"&&typeof r.body=="string");if(!e.length)return"";let n=sc(e.map(r=>({k:oc(r.url,r.lang||""),s:r.status||200,t:r.type||"application/json",b:r.body})));return"<script>(function(){try{var k=Symbol.for("+JSON.stringify(Ku)+"),r=globalThis[k]||(globalThis[k]={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 Hv={};j(Hv,{buildUrl:()=>jy,headerEntries:()=>Vv,restAdapter:()=>zv,selectQuery:()=>Bv,setup:()=>L2,withQuery:()=>By});var jy,Bv,Uv,Fv,k2,v2,E2,jv,Ye,A2,C2,Vv,Fy,T2,O2,R2,P2,By,L2,zv,Wv=P(()=>{"use strict";Gu();jy=(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()},Bv=({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},Uv=t=>Object.prototype.toString.call(t).slice(8,-1),Fv=["auto","json","text","blob","arrayBuffer","stream","response"],k2={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},v2=t=>{let e=t.headers.get("content-type");return e&&e.includes("json")?t.json():t.text()},E2=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},jv=(t,e)=>t?.message||t?.error||e.statusText||`HTTP ${e.status}`,Ye=async(t,e,n,r)=>{let o=n??"auto";if(!Fv.includes(o))throw new TypeError(`@symbo.ls/fetch rest: unknown responseType "${o}" \u2014 use one of: ${Fv.join(", ")}`);let s=r&&await r||await globalThis.fetch(t,e);if(o==="auto"){let i=await v2(s);return{data:i,error:s.ok?null:jv(i,s),status:s.status}}if(!s.ok){let i=await E2(o==="response"?s.clone():s);return{data:o==="response"?s:i,error:jv(i,s),status:s.status}}return{data:await k2[o](s),error:null,status:s.status}},A2=["FormData","Blob","File","URLSearchParams","ReadableStream","ArrayBuffer"],C2=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||A2.includes(Uv(t))),Vv=t=>Array.isArray(t)?t:typeof t.entries=="function"?t.entries():Object.entries(t),Fy=(...t)=>{let e={},n=new Map;for(let r of t)if(r)for(let[o,s]of Vv(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},T2={"Content-Type":"application/json"},O2={"Content-Type":void 0},R2=t=>{if(!t||typeof t!="object")return null;let e={};for(let{header:n,param:r}of Ny(t.query))e[n]=r;return{params:e,rpc:t.rpc==="get"}},P2="content-type",By=(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()},L2=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 zv(t,e,n,r,o,s)},zv=(t,e={},n,r={},o,s)=>{let i=n?.token||null,a=Iv(Dv(o,s),e),c=R2(s),l=y=>{if(!c)return null;let S={},b={},k={};for(let x in y){let w=x.toLowerCase();if(w==="authorization")return null;if(w===P2)continue;b[x]=y[x];let _=c.params[w];_?k[_]=y[x]:S[x]=y[x]}return{headers:S,adoptHeaders:b,query:k}},f=(y,S)=>{if(!a)return null;let b="";for(let k in S){let x=k.toLowerCase();if(x==="accept-language")b=String(S[k]);else if(a.carried[x]!==S[k])return null}try{return Mv(oc(y(),b),a.maxAge)}catch{return null}},u=()=>i?{Authorization:`Bearer ${i}`}:null,d=y=>Fy(e,u(),y),h=y=>({...r,...y}),g=(y,S,b)=>{if(!C2(S))return h({method:y,headers:Fy(e,u(),T2,b),body:JSON.stringify(S)});let k={method:y,headers:Fy(e,u(),O2,b),body:S};return Uv(S)==="ReadableStream"&&(k.duplex="half"),h(k)},p=(y,S)=>{let b=S||t;if(y&&(y.startsWith("http://")||y.startsWith("https://")))return y;let k=y&&!y.startsWith("/")?"/":"";return`${b}${k}${y||""}`};return{name:"rest",setToken:y=>{i=y},getSession:async()=>{if(!n?.sessionUrl)return i?{token:i}:null;let y=await Ye(p(n.sessionUrl,n.baseUrl),h({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 Ye(p(n.signInUrl,n.baseUrl),g("POST",y));return S.data?.token&&(i=S.data.token),S},signOut:async()=>(n?.signOutUrl&&await Ye(p(n.signOutUrl,n.baseUrl),h({method:"POST",headers:d()})),i=null,{error:null}),select:({from:y,params:S,select:b,limit:k,offset:x,order:w,single:_,headers:A,baseUrl:C,responseType:D})=>{let $=jy(C||t,y||"",Bv({params:S,select:b,limit:k,offset:x,order:w,single:_})),I=d(A),N=l(I);if(N){let et=h({headers:N.headers});return Ye(By($,N.query),et,D,f(()=>$,N.adoptHeaders))}let K=h({headers:I});return Ye($,K,D,f(()=>$,K.headers))},rpc:async({from:y,params:S,headers:b,baseUrl:k,responseType:x,read:w})=>{let _=Lv(S),A=()=>jy(k||t,`rpc/${y}`,S),C=et=>Ye(p(`rpc/${y}`,k),g("POST",S,b),x,et),D=d(b),$=w===!0&&c&&c.rpc&&_?l(D):null,I=null;if($)try{I=A()}catch{I=null}if(!I)return C(a&&a.rpc&&_?f(A,D):null);let N=h({method:"GET",headers:$.headers}),K=await Ye(By(I,$.query),N,x,f(()=>I,$.adoptHeaders));return K.status===405?C(null):K},insert:({from:y,data:S,headers:b,baseUrl:k,responseType:x})=>Ye(p(y,k),g("POST",S,b),x),update:({from:y,data:S,params:b,method:k,headers:x,baseUrl:w,responseType:_})=>{let A=b?.id||S?.id,C=A?`${y}/${A}`:y;return Ye(p(C,w),g(k||"PATCH",S,x),_)},upsert:({from:y,data:S,params:b,method:k,headers:x,baseUrl:w,responseType:_})=>{let A=b?.id||S?.id,C=A?`${y}/${A}`:y;return Ye(p(C,w),g(k||"PUT",S,x),_)},delete:({from:y,params:S,headers:b,baseUrl:k,responseType:x})=>{let w=S?.id,_=w?`${y}/${w}`:y;return Ye(p(_,k),h({method:"DELETE",headers:d(b)}),x)}}}});var Kv={};j(Kv,{localAdapter:()=>qv,setup:()=>I2});var Yu,D2,I2,qv,Gv=P(()=>{"use strict";Yu=(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},D2=(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}},I2=async({data:t,...e})=>qv(t,e),qv=(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,h)=>{let g=r[f];if(g)for(let p of g)p(d,h,{event:u,table:f})},l=Date.now();return{name:"local",store:n,select:async({from:f,params:u,...d})=>{let g=i(f).filter(p=>Yu(p,u));return D2(g,d)},insert:async({from:f,data:u})=>{let d=i(f),g=(Array.isArray(u)?u:[u]).map(p=>{let m={id:p.id||++l,...p};return d.push(m),m});a(f);for(let p of g)c(f,"INSERT",p,null);return{data:Array.isArray(u)?g:g[0],error:null}},update:async({from:f,data:u,params:d})=>{let h=i(f),g=[];for(let p=0;p<h.length;p++)if(Yu(h[p],d)){let m={...h[p]};Object.assign(h[p],u),g.push(h[p]),c(f,"UPDATE",h[p],m)}return a(f),{data:g,error:null}},upsert:async({from:f,data:u,params:d})=>{let h=i(f),g=Array.isArray(u)?u:[u],p=[];for(let m of g){let y=d||(m.id!==void 0?{id:m.id}:null),S=y?h.findIndex(b=>Yu(b,y)):-1;if(S>-1){let b={...h[S]};Object.assign(h[S],m),p.push(h[S]),c(f,"UPDATE",h[S],b)}else{let b={id:m.id||++l,...m};h.push(b),p.push(b),c(f,"INSERT",b,null)}}return a(f),{data:Array.isArray(u)?p:p[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),h=[];for(let g=d.length-1;g>=0;g--)Yu(d[g],u)&&(h.push(d[g]),d.splice(g,1),c(f,"DELETE",null,h[h.length-1]));return a(f),{data:h,error:null}},subscribe:({from:f,on:u},d)=>{r[f]||(r[f]=[]);let h=(g,p,m)=>{u&&u!=="*"&&u!==m.event||d(g,p,m)};return r[f].push(h),()=>{let g=r[f].indexOf(h);g>-1&&r[f].splice(g,1)}}}}});var cd={};j(cd,{EARLY_KEY:()=>Ku,createAdapter:()=>B2,createEarlySeedScript:()=>Nv,default:()=>J2,earlyKey:()=>oc,executeFetch:()=>pc,fetchFunctions:()=>ad,fetchPlugin:()=>eb,hasAdapter:()=>j2,initAdapterAuth:()=>td,parseDuration:()=>ac,queryClient:()=>ic,registerAdapter:()=>F2,resolveDb:()=>rE});var M2,nE,Xu,Ps,Zu,Hy,$2,N2,F2,j2,B2,rE,ac,De,oE,mr,od,ed,Uy,Xy,fc,cc,Ju,Wy,nd,sE,Zy,fo,iE,U2,Qu,V2,Yv,Vy,aE,cE,Rs,Xv,z2,Zv,H2,lE,Qy,uc,rd,sd,dc,Jy,td,tb,mn,Ln,lc,id,W2,qy,gr,Ky,Gy,yr,Qv,Dn,q2,K2,G2,Y2,zy,Yy,X2,fE,uE,Jv,tE,Z2,Q2,pc,ic,eE,ad,eb,J2,hc=P(()=>{"use strict";M();Mt();Gu();Gu();M2=["select","rpc","insert","update","upsert","delete","subscribe"],nE={rest:()=>Promise.resolve().then(()=>(Wv(),Hv)),local:()=>Promise.resolve().then(()=>(Gv(),Kv))},Xu=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),Ps=(()=>{if(typeof globalThis<"u"&&globalThis[Xu])return globalThis[Xu];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Xu,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Xu]}catch{}return t})(),Zu=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),Hy=(()=>{if(typeof globalThis<"u"&&globalThis[Zu])return globalThis[Zu];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Zu,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Zu]}catch{}return t})(),$2=5e3,N2=t=>new Promise(e=>{if(Ps[t])return e(Ps[t]);let n=Hy[t]||=[],r=!1,o=()=>{r||(r=!0,e(Ps[t]||null))};n.push(o),setTimeout(o,$2)}),F2=(t,e)=>{Ps[t]=e;let n=Hy[t];if(n&&n.length){Hy[t]=[];for(let r of n)r()}},j2=t=>typeof t=="string"&&!!(Ps[t]||nE[t]),B2=t=>{let e={};for(let n of M2)t[n]&&(e[n]=t[n]);return e.name=t.name||"custom",e},rE=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=Ps[r]||nE[r];if(!o&&(o=await N2(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)},ac=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},De=new Map,oE=new Map,mr=new Map,od=0,ed=new Map,Uy=new WeakMap,Xy=(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}`},fc=t=>De.get(t)||null,cc=(t,e,n,r=++od,o=!1)=>{let s={data:e,error:n,time:Date.now(),stale:o,seq:r};De.set(t,s);let i=oE.get(t);if(i)for(let a of i)R(a)&&a(s);return s},Ju=(t,e)=>{let n=t?De.get(t):null;return n&&!n.error&&n.seq>e?n:null},Wy=(t,e)=>(ed.get(t)||0)>e,nd=t=>{ed.set(t,++od)},sE=t=>{De.delete(t),nd(t)},Zy=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:ac(t),gcTime:3e5}:{staleTime:ac(t.stale||t.staleTime)||6e4,gcTime:ac(t.gc||t.gcTime||t.expire)||3e5,key:t.key},fo=new Set,iE=t=>!!t.ref&&t.element.__ref===t.ref,U2=({config:t,element:e,context:n})=>{try{return Jy(t,e,n)}catch{return null}},Qu=null,V2=()=>{Qu||(Qu=setInterval(()=>{let t=Date.now();for(let[e,n]of De){let r=oE.get(e);!(r&&r.size>0)&&t-n.time>(n.gcTime||3e5)&&De.delete(e)}for(let[e]of ed)!De.has(e)&&!mr.has(e)&&ed.delete(e);for(let e of fo)iE(e)||fo.delete(e)},3e4),Qu.unref&&Qu.unref())};V2();Yv=3,Vy=t=>Math.min(1e3*2**t,3e4),aE=(t,e)=>{let n=t.retry;return n===void 0&&e?{count:0}:n===!1?{count:0}:n===!0||n===void 0?{count:Yv,delay:Vy}:typeof n=="number"?{count:n,delay:Vy}:{count:n.count??Yv,delay:R(n.delay)?n.delay:typeof n.delay=="number"?()=>n.delay:Vy}},cE=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=R(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=R(r)?r(s,i):r;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:o}},Rs={focus:new Set,online:new Set},Xv=!1,z2=()=>{if(Xv||typeof window>"u")return;Xv=!0;let t=()=>{for(let n of Rs.focus)n()},e=()=>{for(let n of Rs.online)n()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},Zv=(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},H2=["insert","update","upsert","delete"],lE=t=>H2.includes(t),Qy=t=>t.mutation===!0?!0:t.mutation===!1||t.method!=="rpc"?!1:t.on==="submit"||t.on==="click"||t.invalidates!=null,uc=(t,e)=>{let n=t?.state?.root||e?.state?.root;if(n?.lang)return n.lang},rd=(t,e)=>{let r=(t?.state?.root||e?.state?.root)?.__fetchScope;return r?String(r):void 0},sd=(t,e,n)=>{let r;if(!t)r=void 0;else if(R(t))r=t(e,e.state);else{r={};for(let o in t){let s=t[o];r[o]=R(s)?s(e,e.state):s}}return r},dc=(t,e)=>R(t)?t(e,e.state):t,Jy=(t,e,n)=>Xy(t,sd(t.params,e,n),rd(e,n),uc(e,n),dc(t.page,e),dc(t.cursor,e)),td=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)})},tb=async(t,e)=>{if(R(t.select))return t.auth!==!1&&await td(t,e),t;if(t.__resolved)return t.auth!==!1&&await td(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=rE(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 td(n,e),n):null},mn=(t,e,...n)=>{let r=R(t[e])?t[e]:null;r&&r.call(t,...n,t,t.state,t.context)},Ln=(t,e,n,...r)=>{let o=t&&R(t[n])?t[n]:null;o&&o.call(e,...r,e,e.state,e.context)},lc=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},id=t=>t.responseType==="stream"||t.responseType==="response",W2=["Blob","File","ArrayBuffer","ReadableStream","Response"],qy=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||W2.includes(Object.prototype.toString.call(t).slice(8,-1))),gr=(t,e,n,r={})=>{if(!n&&qy(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)&&!qy(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})}},Ky=Object.freeze({isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),Gy=t=>({isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:t,status:"error",fetchStatus:"idle"}),yr=(t,e)=>{let n=t?.__ref;n&&(n.__fetchStatus={...e,isError:!!e.error},n.__fetching=e.isFetching,n.__fetchError=e.error)},Qv=(t,e,n)=>{let r=t.__pages&&t.__pages.length?t.__pages:[n];R(e.getNextPageParam)&&(t.__nextPageParam=e.getNextPageParam(r[r.length-1],r),t.__hasNextPage=t.__nextPageParam!=null),R(e.getPreviousPageParam)&&(t.__prevPageParam=e.getPreviousPageParam(r[0],r),t.__hasPreviousPage=t.__prevPageParam!=null)},Dn=async(t,e,n,r={})=>{let o=n?.fetch;if(!o||!e||!e.__ref)return;let s=e.__ref,i=rd(e,n);(!s.__fetchScopeOwner||s.__fetchScopeOwner.scope!==i)&&(s.__fetchScopeOwner={scope:i});let a=s.__fetchScopeOwner,c=()=>e.__ref===s&&s.__fetchScopeOwner===a&&rd(e,n)===i;if(t.enabled===!1||R(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||R(t.skip)&&t.skip(e,e.state))return;let l=await tb(o,n);if(!l||!c())return;let{from:f,method:u,query:d,params:h,cache:g,transform:p,single:m,auth:y,fields:S,as:b,limit:k,offset:x,order:w,headers:_,baseUrl:A,responseType:C,page:D,cursor:$,infinite:I,placeholderData:N,initialData:K,select:et,keepPreviousData:st}=t,xt=B=>(R(et)&&(B=et(B,e,e.state)),p&&(B=p(B,e,e.state)),B),kt=B=>{yr(e,Gy(B)),mn(e,"onFetchError",B),Ln(t,e,"onFetchError",B)},Rt=v(et)?et:void 0;if(d&&R(e.getQuery)){let B=e.getQuery(l.name||"paths");B&&(Rt=B.select||B.length&&B.join(",")||Rt)}let Zt=sd(h,e,n),U=dc(D,e),it=dc($,e),H=Qy(t),z=id(t)||H?null:Zy(g),W=aE(t,H||lE(u)),Q=uc(e,n),Z=z?Xy(t,Zt,i,Q,U,it):null;if(!s.__fetchInitialized&&Z&&(s.__fetchInitialized=!0,K!==void 0)){let B=R(K)?K():K;cc(Z,B,null)}if((u==="select"||u==="rpc")&&Z&&z&&!r.refresh&&!r.force){let B=fc(Z);if(B&&!B.error){let tt=Date.now()-B.time,Gt=B.stale||tt>(z.staleTime||0);I&&L(B.data)&&!s.__pages&&(s.__pages=[B.data],Qv(s,t,B.data));let pt=xt(B.data);if(!c())return;if(!Gt){yr(e,Ky),gr(e,pt,b);return}gr(e,pt,b)}else if(N!==void 0){let tt=R(N)?N(e,e.state):N;tt!==void 0&&gr(e,tt,b)}}let be=Z&&!r.force?mr.get(Z):null;if(be&&!Wy(Z,Uy.get(be)||0)){try{let B=await Promise.race([be,new Promise((tt,Gt)=>setTimeout(()=>Gt("DEDUP_TIMEOUT"),15e3))]);if(!c())return;if(B?.error)kt(B.error);else if(B?.data!==void 0){let tt=!I&&Ju(Z,Uy.get(be)||0),Gt=xt(tt?tt.data:B.data);if(!c())return;gr(e,Gt,b),mn(e,"onFetchComplete",Gt),Ln(t,e,"onFetchComplete",Gt)}}catch(B){if(!c())return;B!=="DEDUP_TIMEOUT"&&kt(B)}return}let Vt=!fc(Z)?.data;yr(e,{isFetching:!0,isLoading:Vt,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),mn(e,"onFetchStart"),Ln(t,e,"onFetchStart");let _e=n?.analyze?.emitNetwork,zt=_e?typeof performance<"u"?performance.now():Date.now():0;_e&&_e({phase:"start",mode:"query",from:f,method:u,cacheKey:Z,lang:Q});let bt=async()=>{if(!c())return;if(y!==!1&&l.auth!==!1&&l.getSession){let pt=await l.getSession();if(!c())return;if(y===!0&&!pt){let Ct={message:"Not authenticated"};return kt(Ct),{data:null,error:Ct}}}let B=l[u];if(!R(B))return{data:null,error:{message:`Method "${u}" not found on adapter`}};let tt={from:f,select:Rt,params:Zt,single:m,limit:k,offset:x,order:w,headers:_,baseUrl:A};C!==void 0&&(tt.responseType=C);let Gt=uc(e,n);if(Gt&&(tt.headers={...tt.headers,"Accept-Language":Gt}),U!==void 0){if(E(U))U.offset!==void 0&&(tt.offset=U.offset),U.limit!==void 0&&(tt.limit=U.limit),U.cursor!==void 0&&(tt.params={...tt.params,cursor:U.cursor});else if(typeof U=="number"){let pt=t.pageSize||k||20;tt.offset=(U-1)*pt,tt.limit=pt}}if(it!==void 0&&(tt.params={...tt.params,cursor:it}),u==="insert"||u==="update"||u==="upsert"){let pt;if(S===!0||t.on==="submit")pt=lc(e);else if(L(S)){let Ct=lc(e);pt={};for(let Yr of S)pt[Yr]=Ct[Yr]}else e.state?.parse?pt=e.state.parse():E(e.state)&&(pt={...e.state});p&&(pt=p(pt,e,e.state)),tt.data=pt}if(u==="rpc"){let pt=Zt;if(t.on==="submit"){let Ct=lc(e);pt=t.transformParams?t.transformParams(Ct,e,e.state):Ct}tt.params=pt,tt.read=!H&&t.read!==!1}if(u==="subscribe"){if(R(s.__unsubscribe)){let Ct=s.__unsubscribe;s.__unsubscribe=null;try{Ct()}catch{}}let pt=l.subscribe({from:f,params:Zt,on:t.subscribeOn},(Ct,Yr,Lk)=>{c()&&(gr(e,Ct,b),mn(e,"onFetchComplete",Ct),Ln(t,e,"onFetchComplete",Ct))});return c()?(s.__unsubscribe=pt,{data:null,error:null,subscribed:!0}):(R(pt)&&pt(),{data:null,error:null,subscribed:!0})}return B(tt)},we=++od,Gr=cE(bt,W);Uy.set(Gr,we),Z&&mr.set(Z,Gr);try{let B=await Gr;if(H&&t.invalidates&&B&&!B.error&&!B.subscribed&&uE(t.invalidates,f),!c()||B?.subscribed)return;let{data:tt,error:Gt}=B||{};if(Gt){Z&&!Ju(Z,we)&&cc(Z,null,Gt,we),kt(Gt),_e&&_e({phase:"error",mode:"query",from:f,method:u,cacheKey:Z,error:Gt.message||Gt,durationMs:(typeof performance<"u"?performance.now():Date.now())-zt});return}if(tt!==void 0){let pt=tt;if((u==="select"||u==="rpc")&&Z){let Yr=!I&&Ju(Z,we);if(Yr)pt=Yr.data;else{let Lk=cc(Z,tt,null,we,Wy(Z,we));Lk.gcTime=z?.gcTime||3e5}}let Ct=pt;if(I&&L(tt)&&((!s.__pages||!r.direction)&&(s.__pages=[]),r.direction==="previous"?s.__pages.unshift(tt):s.__pages.push(tt),Ct=s.__pages.flat(),Qv(s,t,tt)),Ct=xt(Ct),!c())return;yr(e,Ky),(!st||Ct!==void 0)&&gr(e,Ct,b),mn(e,"onFetchComplete",Ct),Ln(t,e,"onFetchComplete",Ct),_e&&_e({phase:"success",mode:"query",ok:!0,from:f,method:u,cacheKey:Z,durationMs:(typeof performance<"u"?performance.now():Date.now())-zt})}}catch(B){if(!c())return;kt(B),_e&&_e({phase:"error",mode:"query",from:f,method:u,cacheKey:Z,error:B.message||String(B),durationMs:(typeof performance<"u"?performance.now():Date.now())-zt})}finally{Z&&mr.get(Z)===Gr&&mr.delete(Z)}},q2=(t,e,n)=>{let r=t.on,o=e.__ref;if(!o)return;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||Dn;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"&&K2(t,e,n,s)},K2=(t,e,n,r)=>{let o=e.__ref,s,i=Y(()=>{let a;try{a=JSON.stringify([sd(t.params,e,n)??null,R(t.enabled)?!!t.enabled(e,e.state):t.enabled!==!1,R(t.skip)?!!t.skip(e,e.state):t.skip===!0,dc(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())},G2=(t,e,n)=>{let r=e.__ref;r.__fetchCleanups||(r.__fetchCleanups=[]),z2();let o=t.refetchInterval;if(o){let c=typeof o=="number"?o:ac(o);if(c>0){let l=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&Dn(t,e,n,{force:!0})},c);r.__fetchCleanups.push(()=>clearInterval(l))}}let s=id(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=Jy(t,e,n),f=fc(l),u=Zy(t.cache);(!f||f.stale||Date.now()-f.time>(u?.staleTime||0))&&Dn(t,e,n,{force:!0})};Rs.focus.add(c),r.__fetchCleanups.push(()=>Rs.focus.delete(c))}if(a){let c=()=>Dn(t,e,n,{force:!0});Rs.online.add(c),r.__fetchCleanups.push(()=>Rs.online.delete(c))}},Y2=(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=R(e.optimistic)?e.optimistic(n,s,t):e.optimistic;return i!==void 0&&gr(t,i,o),s},zy=(t,e)=>{let n=t.__ref;if(!n||!e.optimistic)return;let r=n.__optimisticSnapshot;r!==void 0&&(gr(t,r,e.as),delete n.__optimisticSnapshot)},Yy=t=>{if(!t)return()=>!0;if(v(t))return e=>e.includes(t);if(L(t)){let e=t.join(":");return n=>n.includes(e)}return t instanceof RegExp?e=>(t.lastIndex=0,t.test(e)):R(t)?e=>{try{return!!t(e)}catch{return!1}}:()=>!1},X2=t=>{let e=[];for(let n of fo){if(!iE(n)){fo.delete(n);continue}let r=U2(n);r&&t(r)&&e.push(Dn(n.config,n.element,n.context,{refresh:!0}))}return Promise.allSettled(e).then(()=>{})},fE=t=>{$v();for(let[e,n]of De)t(e)&&(n.stale=!0,nd(e));for(let[e]of mr)!De.has(e)&&t(e)&&nd(e);return X2(t)},uE=(t,e)=>{let n=(L(t)?t:[t]).map(r=>r===!0||r==="*"?o=>o.startsWith(e+":"):r?Yy(r):()=>!1);return fE(r=>n.some(o=>o(r)))},Jv=t=>{for(let[e]of De)t(e)&&sE(e);for(let[e]of mr)t(e)&&nd(e)},tE=()=>!0,Z2=async(t,e,n)=>{let r=n?.fetch;if(!r)return;let o=await tb(r,n);if(!o)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:h,baseUrl:g,responseType:p,invalidates:m,optimistic:y,onMutate:S,onSuccess:b,onError:k,onSettled:x}=t,w;if(c===!0||u==="submit")w=lc(e);else if(L(c)){let D=lc(e);w={};for(let $ of c)w[$]=D[$]}else e.state?.parse?w=e.state.parse():E(e.state)&&(w={...e.state});l&&(w=l(w,e,e.state)),R(S)&&S(w,e,e.state);let _=y?Y2(e,t,w):null;yr(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),mn(e,"onFetchStart"),Ln(t,e,"onFetchStart");let A=n?.analyze?.emitNetwork,C=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 xt=await o.getSession();if(d===!0&&!xt){_!==void 0&&zy(e,t);let kt={message:"Not authenticated"};mn(e,"onFetchError",kt),Ln(t,e,"onFetchError",kt);return}}let D=o[i];if(!R(D))return;let $={from:a,data:w,headers:h,baseUrl:g};p!==void 0&&($.responseType=p),t.params&&($.params=sd(t.params,e,n));let I=uc(e,n);I&&($.headers={...$.headers,"Accept-Language":I});let N=aE(t,!0),K=await cE(()=>D($),N),{data:et,error:st}=K||{};if(st){_!==void 0&&zy(e,t),yr(e,Gy(st)),mn(e,"onFetchError",st),R(k)&&k(st,w,e),R(x)&&x(null,st,w,e),A&&A({phase:"error",mode:"mutation",from:a,method:i,error:st.message||String(st),durationMs:(typeof performance<"u"?performance.now():Date.now())-C});return}if(delete s.__optimisticSnapshot,yr(e,Ky),et!==void 0&&(f||!qy(et))){let xt=f?{[f]:et}:et;e.state?.update&&e.state.update(xt,{preventFetch:!0})}mn(e,"onFetchComplete",et),Ln(t,e,"onFetchComplete",et),R(b)&&b(et,w,e),R(x)&&x(et,null,w,e),A&&A({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-C}),m&&uE(m,a)}catch(D){_!==void 0&&zy(e,t),yr(e,Gy(D)),mn(e,"onFetchError",D),Ln(t,e,"onFetchError",D),R(k)&&k(D,w,e),R(x)&&x(null,D,w,e),A&&A({phase:"error",mode:"mutation",from:a,method:i,error:D.message||String(D),durationMs:(typeof performance<"u"?performance.now():Date.now())-C})}finally{s.__fetching=!1}},Q2=t=>{let e=n=>{try{n()}catch{}};for(let n of t.__fetchCleanups||[])e(n);for(let n of t.__fetchListeners||[])e(n);R(t.__unsubscribe)&&e(t.__unsubscribe);for(let n of t.__fetchMounted||[])fo.delete(n);t.__fetchCleanups=[],t.__fetchListeners=[],t.__unsubscribe=null,t.__fetchMounted=[]},pc=(t,e,n,r)=>{if(!t||!r?.fetch)return;let s=ht(t,e);if(!s)return;let i=L(s)?s.map(c=>Zv(ht(c,e),e)).filter(Boolean):[Zv(s,e)].filter(Boolean),a=e.__ref;if(a.__fetchMounted)for(let c of a.__fetchMounted)fo.delete(c);a.__fetchMounted=[],!a.__fetchDisposer&&L(a.__effects)&&(a.__fetchDisposer={dispose:()=>Q2(a)},a.__effects.push(a.__fetchDisposer));for(let c of i){let l=lE(c.method),f=l?Z2:Dn,u=!l&&!Qy(c)&&c.method!=="subscribe";if(c.on==="create"?f(c,e,r):Promise.resolve().then(()=>{q2({...c,__runner:f},e,r)}),u&&c.on==="create"&&((c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&G2(c,e,r),!id(c))){let d={element:e,ref:a,config:c,context:r};fo.add(d),a.__fetchMounted.push(d)}}a.refetch=c=>{for(let l of i)Dn(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};Dn(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};Dn(f,e,r,{direction:"previous",force:!0})}},ic={invalidateQueries:t=>fE(Yy(t)),removeQueries:t=>{Jv(t?Yy(t):tE)},getQueryData:t=>fc(t)?.data??void 0,setQueryData:(t,e)=>{let n=fc(t),r=R(e)?e(n?.data):e;cc(t,r,null)},prefetchQuery:async(t,e)=>{let n=e?.fetch;if(!n)return;let r=await tb(n,e);if(!r)return;let o=t.method||"select",s=rd(null,e),i=uc(null,e),a=Xy({...t,method:o},t.params,s,i),c=r[o];if(!R(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=!Qy(t)&&t.read!==!1);let f=++od,u=await c(l);if(u?.data!==void 0&&!u?.error&&!id(t)&&!Ju(a,f)){let d=cc(a,u.data,null,f,Wy(a,f));d.gcTime=Zy(t.cache)?.gcTime||3e5}return u},getCache:()=>De,clear:()=>Jv(tE),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[n]of De)n.match(/:([a-z]{2,3})$/i)&&(n.endsWith(e)||sE(n))}},eE=(t,e)=>E(t)?Jy({method:"select",...t},e,e?.context):t,ad={invalidateQueries(t){return ic.invalidateQueries(t)},removeQueries(t){return ic.removeQueries(t)},getQueryData(t){return ic.getQueryData(eE(t,this))},setQueryData(t,e){return ic.setQueryData(eE(t,this),e)}},eb={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||mr.clear(),pc(e,t,t.state,t.context))}},J2=pc});function mc(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 rb(t){let e=this,{parent:n}=e;if(R(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 ob(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(R(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 sb(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(R(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 ud(t={}){let e=this;if(e.node?.style){for(let n in t){let r=t[n],o=e[n];if(E(r)&&o)ud.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 pE(t){let e=this;if(Pn("beforeRemove",e,t)===!1)return e;R(e.node.remove)?e.node.remove():ur()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=va(e.parent.__ref.__children,e.key)),Pn("remove",e,t)}function ib(t){return this[t]}function ab(t,e){let n=this;if(t)return n.update(t,e),n}function cb(t){return t?this.__ref&&this.__ref[t]:this.__ref}function lb(){let t=this.getRef("__children");return Array.isArray(t)?t.map(e=>this[e]):[]}function yc(){return this.getRef().path}function _c(t){let e=null,n=r=>r.__element&&r.root?.isRootState;if(!this)e=dE();else if(n(this))e=this.root;else if(this.__ref&&this.__ref.path){let r=this.state&&n(this.state),o=R(this.state)&&this.parent.state&&n(this.parent.state);(r||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=dE()),t?e?.[t]:e}function wc(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 Sc(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function xc(t){let e=this.getRoot()?.context;return t?e[t]:e}function kc(t){let e=this.context;return t?e[t]:e}function dd(){let t=this,e=[];for(let n in t)!Object.prototype.hasOwnProperty.call(t,n)||cr.has(n)&&!Oa.has(n)||e.push(n);return e}function pd(t=[]){let e=this,n={},r=dd.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=R(c&&c.parse)?c.parse():c;n[a]=R(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 Lt(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=c)}return n}function gc(t=[],e=new WeakSet){let n=this;if(e.has(n))return;e.add(n);let r=pd.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)?gc.call(a,t,e):a):q(i)&&(r[s]=gc.call(i,t,e))}return r}function Ds(...t){if(br!=="test"&&br!=="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
|
|
23
|
-
${
|
|
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},kb=(t,e={verbose:!0})=>{try{return t?T.eval("("+t+")"):{}}catch(n){e.verbose&&console.warn(n)}},vb=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),Cd=t=>{for(let e in t)return!1;return!0},Eb=t=>A(t)&&Cd(t),Ab=()=>Object.create(null),Lc=(t,e,n={})=>{let r=n.exclude||[],o=n.preventUnderscore;for(let s in e)r.includes(s)||!o&&Co(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},Po=(t,e,n=[])=>{let r=n instanceof Set;for(let o in e)Co(o)||o==="constructor"||o==="prototype"||(r?n.has(o):n.includes(o))||(t[o]=e[o]);return t},ie=(t,e,n={},r=new WeakMap)=>{if(!V(t)||!V(e)||de(t)||de(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&&Co(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];de(l)?t[a]=l:V(c)&&V(l)?t[a]=ie(c,l,n,r):l!==void 0&&(t[a]=l)}return t},Td=(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)||!Td(t[i],e[i],n))return!1}return!0},Rj=new Set(["node","__ref"]),Cb=(t,e,n=Rj)=>{if(t===e)return!0;if(!V(t)||!V(e)||de(t)||de(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(de(l)||de(f)){if(l!==f)return!1}else if(V(l)&&V(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},Tb=(t,e)=>{if(e==null)return t;if(he(e)("string","number"))delete t[e];else if(I(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},Od=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]=Od(t[n]));return e},Ob=(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},Rb=(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]},Pb=(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},Db=(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},Lb=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(FA==="test"||FA==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",n),!0},Ib=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)},Mb=(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 Ic,Mc,$c,Rd=L(()=>{"use strict";Sn();Ic=(function(){let t=0;function e(){return t++,t}return e})(),Mc=Ic,$c=(t,e,n)=>(St(n,t)||n||t.key||Ic()).toString()});var rn,$b,Rr,Pd,Nb,Fb,jb,Pr,Bb,Kn,tt,Dd=L(()=>{"use strict";rn="production",$b=rn,Rr=(t=rn)=>t==="production",Pd=(t=rn)=>t==="testing"||t==="test",Nb=Pd,Fb=(t=rn)=>t==="staging",jb=(t=rn)=>t==="local",Pr=(t=rn)=>t==="development"||t==="dev"||t==="local",Bb=(t,e=rn)=>e[t],Kn=(t=rn)=>!Rr(t),tt=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 Nc(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 Hb(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 Ub,Vb,Pj,fi,ui,di,Dr,pi=L(()=>{"use strict";Ub=(t,e,n=300)=>{let r;return(...o)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(t,o)},n)}},Vb=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}}},Pj=/^\s*(?:async\s+)?(?:function\b|\([^)]*\)\s*=>|[a-zA-Z_$][\w$]*\s*=>)/,fi=t=>Pj.test(t),ui=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let n of e)if(n.resolveHandler)return!0;return!1},di=(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},Dr=(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 zb,nC=L(()=>{"use strict";qt();Sn();zb=(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"?St(r,t)?n.__if=!0:delete n.__if:n.__if=!0}});var Wb,qb,rC=L(()=>{"use strict";Wb=(t,...e)=>{t&&e.map(n=>console.log(n))},qb=(t,e,...n)=>{t&&(console.group(e),n.map(r=>console.log(r)),console.groupEnd(e))}});function Zb(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 Jb(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 Kb,Gb,Yb,Xb,oC=L(()=>{"use strict";qt();gc();Kb=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),Gb=(t,e,n=365)=>{if(Wt(yt)||Wt(yt.cookie))return;let r=new Date;r.setTime(r.getTime()+n*24*60*60*1e3);let o=`expires=${r.toUTCString()}`;yt.cookie=`${t}=${e};${o};path=/`},Yb=t=>{if(Wt(yt)||Wt(yt.cookie))return;let e=`${t}=`,r=decodeURIComponent(yt.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""},Xb=t=>{Wt(yt)||Wt(yt.cookie)||(yt.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var hi,sC,Qb,t_=L(()=>{"use strict";hi={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"])},sC=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"]),Qb=t=>hi.body.has(t)});var e_,iC,gi,je,mi,Bc,xn,n_,Ld,Uc,r_,Vc,Id,Md,Hc,$d,yi,Dj,kn,aC,Fc,zc,o_,jc,s_,i_,Nd,Fd,jd,Bd,Ud,Vd,cC,Hd=L(()=>{"use strict";ii();a_();Sn();qt();e_="production",iC=t=>t.sourcemap!==!1&&e_!=="production",gi=t=>{if(!t)return[];let e=[],n=t.extends;n&&(I(n)?e.push(...n):e.push(n));let r=t.extend;return r&&(I(r)?e.push(...r):e.push(r)),e},je=t=>{if(!I(t))return t;let e=[];for(let n=t.length-1;n>=0;n--){let r=t[n];e.push(I(r)?je(r):r)}return e},mi=t=>{if(t.includes("+"))return t.split("+").filter(vn);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!vn(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},Bc=(t,e,n)=>{let r=[],o=mi(n);o&&(r=[...o]);let s=je(gi(t));return s.length&&(r=[...r,...s]),r},xn=(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},n_=(t,e)=>{if(!t)return e;let{extends:n}=e,r=I(n)?n:[n],o=I(t)?t:[t];return{...e,extends:oi(o,r)}},Ld=()=>Math.random().toString(36).substring(2),Uc={},r_={},Vc=t=>Uc[t.__hash],Id=(t,e)=>{let n=Ld();return E(t)||(t.__hash=n),n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(Uc[n]=e),e},Md=(t,e)=>t.__hash?e.concat(Vc(t)):Id(t,e),Hc=(t,e,n,r=new Set,o,s)=>{for(let i of t)I(i)?Hc(i,e,n,r,o,s):yi(i,e,n,r,o,void 0,s);return e},$d=(t,e,n,r=new Set,o,s,i)=>{let a=gi(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&&yi(je(a),e,n,r,o,s,i),e},yi=(t,e,n,r=new Set,o,s,i)=>{if(!t||r.has(t))return e;if(I(t))return Hc(t,e,n,r,o,i);let a=s;return E(t)?(a=t,t=zc(t,n)):i&&A(t)&&i.has(t)&&(a=i.get(t)),r.has(t)||(r.add(t),t?.extends||t?.extend?$d(t,e,n,r,o,a,i):t&&(e.push(t),o&&o.push(a))),e},Dj=new Set(["parent","node","__ref","__proto__","extends","extend","childExtends","childExtendsRecursive"]),kn=(t,e,n,r,o)=>{e=pt(e);for(let s in e){if(Dj.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)&&!I(a)?(n[s]=n[s]||{},aC(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];vn(s)?t[s]=kn(i,a,c,r,l):kn(i,a,c,r,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(I(i)&&I(a))t[s]=i.concat(a);else if(I(i)&&A(a)){let c=kn({},i);t[s]=kn(c,a)}}}}return t},aC=(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)&&!I(s)?(t[o]=t[o]||{},aC(t[o],s,n,r)):t[o]=n}}},Fc=(t,e,n)=>t.reduce((r,o,s)=>{let i=pt(o),a=n?n[s]:void 0;return kn(r,i,e,a)},{}),zc=(t,e,n={},r)=>{let o=e?.components||n.components,s=e?.pages||n.pages;if(E(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&&(e_==="test"||e_==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},o_=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),jc=(t,e,n,r)=>{if(!t)return[];if(t.__hash)return Vc(t)||[];let s=yi(t,[],e,new Set,n,void 0,r);return n?s:Md(t,s)},s_=(t,e)=>{if(!t)return e;let n=I(t)?t:[t];return oi(n,e)},i_=t=>{let e=[];function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&(vn(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},Nd=(t,e,n={})=>{let{__ref:r}=t,o=t.context||e.context,s=t.variant,i=gi(t);if(i.length){let a=je(i),[c,...l]=a,f=typeof c=="string"&&s&&o?.components?`${c}.${s}`:null;f&&o.components[f]?xn([f,...l],t):xn(a,t)}return Fd(t,e,n),jd(t,e,n),Bd(t,e,n),t.component&&xn(je(St(t.component,t)),t),o.defaultExtends&&xn(je(o.defaultExtends),t),si(r.__extends)},Fd=(t,e,n={})=>{let{__ref:r}=t;return n.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&xn(je(e.childProps.extends),t),r.__extends},jd=(t,e,n={})=>{let{__ref:r}=t,o=n.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!o&&s&&xn(je(s),t),r.__extends},Bd=(t,e,n={})=>{let{__ref:r}=t,o=e.childExtendsRecursive,s=n.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return o&&!i&&!s&&xn(je(o),t),r.__extends},Ud=(t,e,n={})=>{let{__ref:r}=t,o=t.context||e.context,s=t.variant,i=iC(n),a=i?[...r.__extends]:null,c=si(r.__extends.map((l,f)=>zc(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)&&E(g)&&l.set(p,g)}let f=[],u=jc(c,o,f,l);r.__extendsStack=u,r.__extendsNames=f}else{let l=jc(c,o);r.__extendsStack=l}return r.__extendsStack},Vd=(t,e,n={})=>{let{__ref:r}=t,{__extendsStack:o}=r;if(iC(n)){let s={},i=r.__extendsNames||[],a=Fc(o,s,i),c={};kn(t,a,c,void 0,s),r.__sourcemap=c}else{let s=Fc(o);kn(t,s)}return t},cC=(t,e,n={})=>(Nd(t,e,n),Ud(t,e,n),Vd(t,e,n),t)});function c_(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function l_(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function f_(t,e,n){let{context:r}=e||{},[o]=mi(n),s=n||o;return r?.components?.[s]||r?.pages?.[s]}var vn,a_=L(()=>{"use strict";Hd();qt();vn=t=>{if(!E(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function lC(t,e){let{props:n,on:r}=e,o=xo(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 fC=L(()=>{"use strict";vc();qt()});function zd(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&&ui(this.context))){let g=xo(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(dC.has(u)){t.props[r]=o,delete t[r],n.push(r);continue}let d=u_.test(r)||uC.test(r)||Ij(o),p=Cr.has(r);!d&&!p&&(r in t.props||(t.props[r]=o),delete t[r],n.push(r))}return t}function Wd(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&&ui(this.context);if(s&&i){lC(r,t),delete t.props[r];continue}if(n.includes(r)||r==="childProps")continue;let a=r.charAt(0);if(dC.has(a))continue;let c=this.define?.[r],l=this.context?.define?.[r],f=A(c)||P(c),u=A(l)||P(l),d=u_.test(r)||uC.test(r),p=Cr.has(r);(d||p||f||u)&&(t[r]===void 0||o===null)&&(t[r]=o,t.props&&delete t.props[r])}return t}function qd(t=this){let e=[];return zd.call(this,t,{cachedKeys:e}),Wd.call(this,t,{cachedKeys:e}),t}function d_(t={}){return t.on||(t.on={}),t.props||(t.props={}),qd.call(this,t)}function h_(t,e){this.__element.update({props:t},e)}function Yc(t){let e={update:h_.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var u_,uC,dC,Lj,Ij,Kc,Wc,p_,Gc,Xc,Zc,Kd,qc,g_,m_,y_=L(()=>{"use strict";Eo();fC();Sn();qt();vc();pi();u_=/^[A-Z]/,uC=/^\d+$/,dC=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),Lj=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),Ij=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(Lj.has(e)||u_.test(e))return!0;return!1},Kc=(t,e,n)=>{let{props:r,__ref:o}=t;if(o.__propsStack=[],r)o.__initialProps=r;else return{};return V(r)?{...r}:(o.__propsStack.push(r),{})};Wc=t=>he(t)("string","number")?{inheritedString:t}:t,p_=(t,e)=>!t||!e.length?!1:e.includes(t),Gc=(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=Wc(i);r.unshift(c)}if(s){let c=Wc(s);r.unshift(c)}return r};Xc=t=>{let e=new Set;return t.filter(n=>!n||Tr.has(n)||e.has(n)?!1:(e.add(n),!0))},Zc=(t,e,n)=>(e.props=t.reduce((r,o)=>{if(Tr.has(o))return r;for(;P(o);)o=St(o,e);return dt(r,pt(o,{exclude:Tr}))},{}),Yc(e),e.props),Kd=(t,e)=>{let{props:n,__ref:r}=t,o=r.__propsStack||[];if(e?.props&&(o=[...Gc(t,e)]),A(n)?o.push(n):n==="inherit"&&e?.props?o.push(e.props):n&&o.push(n),I(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=Xc(o),r.__propsStack},qc=(t,e)=>{let{__ref:n}=t,r=Kd(t,e);r.length?Zc(r,t):(n.__propsStack=[],t.props={})},g_=function(t,e,n){let{__ref:r}=t;if(r.__if)qc(t,e);else try{qc(t,e)}catch(o){t.context?.designSystem?.verbose&&console.warn("initProps error at",r.path?.join("."),o),t.props={},r.__propsStack=[]}return Yc(t),t},m_=(t,e,n)=>{let{__ref:r}=e,s=[...r.__propsStack||[]],i=Gc(e,n);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),r.__propsStack=Xc(s),r.__propsStack.length&&Zc(r.__propsStack,e),e}});var pC,Gd,Yd,Xd,Zd,b_,Jd,Qd,tp,__,hC=L(()=>{"use strict";Hd();Rd();yc();y_();t_();qt();pC="production",Gd=(t,e,n)=>{let r=e.childExtends&&e.childExtends.tag,o=e.childProps&&e.childProps.tag,s=hi.body.has(n)&&n;return{text:t,tag:r||o||s||"string"}},Yd=(t,e,n)=>{if(t===void 0)return(pC==="test"||pC==="development")&&console.warn(n,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:he(t)("string","number")?Gd(t,e,n):P(t)?{props:t}:t},Xd=(t,e)=>{let n={};return n.origin=t,n.parent=e,n},Zd=(t,e,n,r,o)=>{if(!e)return o;if(qn(e)){let s={key:":root",node:e};return o[`${n}_parent`]=s,s}return e},b_=(t,e)=>{let{__ref:n}=t,{__ref:r}=e,o=e&&e.key===":root";n?.root||(n.root=o?t:r?.root)},Jd=(t,e,n)=>{let{__ref:r}=e;return r||(r=e.ref={}),r.path||(r.path=[]),r.path.concat(n)},Qd=(t,e,n,r,o)=>(r.context&&!o.context&&!t.context&&(o.context=r.context),r.context||e.context||o.context||t.context),tp=(t,e,n)=>{let r=Xd(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=Bc(t,e,n),r.path=Jd(t,e,n),r},__=(t,e,n,r,o)=>{let i=t?.__hash?{extends:[t]}:Yd(t,e,n);if(!i)return;let a=Zd(i,e,n,r,o),c=$c(i,a,n);tp(i,a,c);let l=Kc(i,a,c),f=Qd(i,a,c,r,o),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var w_,ep,np,rp,op,S_,sp,x_,k_,v_,E_,gC,Lr,Do,mC,yC,bC,Jc,En,_C=L(()=>{"use strict";ii();Eo();Sn();qt();w_=t=>{let{state:e,props:n,__ref:r}=t,o=n?.state||e;return he(o)("string","number")?(r.__state=o,{value:o}):o===!0?(r.__state=t.key,{}):o?(r.__hasRootState=!0,o):!1},ep=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},np=(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},rp=(t,e,n={})=>{let r=E(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]},op=(t,e,n={})=>{let o=t.__ref.__state;if(!sp(t))return;let s=ep(o,e.state),i=e.state;if(s)i=s,o=o.replaceAll("~/","");else{let a=np(o,e.state);a&&(i=a,o=o.replaceAll("../",""))}if(i)return rp(o,i,n)},S_=(t,e)=>{let n=t.__ref,r=op(t,e);if(r===void 0)return t.state;if(he(r)("object","array"))return pt(r);if(he(r)("string","number","boolean"))return n.__stateType=typeof r,{value:r};console.warn(n.__state,"is not present. Replacing with",{})},sp=t=>{let{__ref:e}=t,n=e?.__state;return!!(n&&he(n)("number","string","boolean"))},x_=function(t){return V(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},k_=(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},v_=(t,e)=>{let{__element:n}=e,r=n?.state;if(!r)return;let o=pt(r,ko),s={[t.key]:o},i=A(r.__depends)?{...r.__depends,...s}:s;return Array.isArray(r)?Sc(r,{...Object.getPrototypeOf(r),__depends:i}):Object.setPrototypeOf(r,{...Object.getPrototypeOf(r),__depends:i}),o},E_=(t,e,n={})=>{let{overwrite:r}=n;if(!r)return;let o=r==="shallow";if(r==="merge"){dt(t,e,ko);return}(o?Po:ie)(t,e,ko)},gC="__polyglotSeededKeys",Lr=t=>{if(!A(t))return new Set;let e=t[gC];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,gC,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},Do=(t,e,n)=>Lr(t).has(e)?!0:!A(n)||n[e]===void 0,mC="__polyglotSeededValues",yC=t=>{if(!A(t))return new Map;let e=t[mC];if(!(e instanceof Map)){e=new Map;try{Object.defineProperty(t,mC,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},bC=t=>{if(t===null||typeof t!="object")return typeof t+":"+String(t);try{return"json:"+JSON.stringify(t)}catch{return null}},Jc=(t,e,n)=>{if(!Lr(t).has(e))return!1;let r=yC(t);if(!r.has(e))return!0;let o=A(n)||Array.isArray(n)?n[e]:void 0,s=bC(o);return s!==null&&s===r.get(e)},En=(t,e,...n)=>(Lr(t).add(e),n.length&&yC(t).set(e,bC(n[0])),e)});var Mj,A_,wC=L(()=>{"use strict";Mj=(t,e)=>{let n=e;for(;n;){if(n===t)return!0;n=Object.getPrototypeOf(n)}return!1},A_=(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&&!Mj(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var SC,ip,Gn,ap,C_,T_=L(()=>{"use strict";qt();pi();SC=(t,e)=>{let n="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[n]},ip=(t,e,n,r,o)=>{if(t=di(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}},Gn=(t,e,n)=>{if(!e)throw new Error("Element is required");Dr(t,e,n);let r=SC(t,e);if(r){let{state:o,context:s}=e;return ip(r,e,o,s,n)}},ap=(t,e,n,r,o,s)=>{if(t=di(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}},C_=(t,e,n,r)=>{Dr(t,n,e,r);let o=SC(t,n);if(o){let{state:s,context:i}=n;return ap(o,e,n,s,i,r)}}});var O_,Qc,R_=L(()=>{"use strict";O_={},Qc={}});var cp,P_,bi,xC,lp,D_,kC,vC,L_,EC,AC,I_,CC,$j,TC,fp=L(()=>{"use strict";M();cp="@symbo.ls/fetch:EARLY",P_=3e4,bi=(t,e)=>{let n=new URL(t);return n.searchParams.sort(),n.toString()+" "+(e||"")},xC=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},lp=()=>Symbol.for(cp),D_=(t,e)=>{let n=[];for(let r in t||{}){let o=r.toLowerCase(),s={name:r,header:o,param:t[r],found:!1,value:void 0};for(let i in e||{})i.toLowerCase()===o&&(s.found=!0,s.value=e[i]);n.push(s)}return n},kC=(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},vC=(t,e)=>{let n=lp();if($j(),!t||typeof t!="object"){let s=globalThis[n];return s&&s.seeded?{carried:{},rpc:!1,maxAge:P_,seeded:!0}:null}globalThis[n]||(globalThis[n]={entries:{}});let r={};for(let{header:s,found:i,value:a}of D_(t.query,e))i&&(r[s]=a);let o=typeof t.maxAge=="number"&&t.maxAge>=0?t.maxAge:P_;return{carried:r,rpc:t.rpc==="get",maxAge:o,seeded:!!globalThis[n].seeded}},L_=(t,e=P_)=>{let n=globalThis[lp()],r=n&&n.entries&&n.entries[t];return!r||(delete n.entries[t],!(Date.now()-r.time<=e))?null:r.seeded?Promise.resolve(r.seeded):Promise.resolve(r.answer).then(o=>o&&o.ok&&!o.bodyUsed?o:null,()=>null)},EC=()=>{let t=globalThis[lp()];t&&t.entries&&(t.entries={})},AC=t=>(Array.isArray(t)?t:[]).filter(e=>e&&typeof e.url=="string"&&typeof e.body=="string").map(e=>({k:bi(e.url,e.lang||""),s:e.status||200,t:e.type||"application/json",b:e.body})),I_='script[type="application/json"][data-fetch-seed]',CC=t=>{let e=AC(t);return e.length?'<script type="application/json" data-fetch-seed>'+Lo(e)+"<\/script>":""},$j=()=>{let t=Io(globalThis.document,I_,{remove:!0}),e=t&&t.value;if(!Array.isArray(e)||!e.length)return;let n=lp(),r=globalThis[n]||(globalThis[n]={entries:{}});r.entries||(r.entries={}),r.seeded=!0;let o=Date.now();for(let s of e)!s||typeof s.k!="string"||typeof s.b!="string"||r.entries[s.k]||(r.entries[s.k]={time:o,seeded:{seeded:!0,status:s.s||200,type:s.t||"application/json",body:s.b}})},TC=t=>{let e=AC(t);if(!e.length)return"";let n=Lo(e);return"<script>(function(){try{var k=Symbol.for("+JSON.stringify(cp)+"),r=globalThis[k]||(globalThis[k]={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 OC,up,RC,PC,DC,LC,M_=L(()=>{"use strict";OC=Symbol.for("@symbo.ls/fetch:IN_FLIGHT"),up=()=>globalThis[OC]||(globalThis[OC]={count:0,waiters:[]}),RC=()=>{up().count++},PC=()=>{let t=up();if(t.count=t.count>0?t.count-1:0,t.count===0&&t.waiters.length){let e=t.waiters;t.waiters=[];for(let n of e)n()}},DC=()=>up().count,LC=()=>{let t=up();return t.count===0?Promise.resolve():new Promise(e=>{t.waiters.push(e)})}});var j_={};F(j_,{buildUrl:()=>N_,headerEntries:()=>FC,restAdapter:()=>jC,selectQuery:()=>$C,setup:()=>Gj,withQuery:()=>F_});var N_,$C,NC,IC,Nj,Fj,jj,MC,Bj,on,Uj,Vj,Hj,FC,$_,zj,Wj,qj,Kj,F_,Gj,jC,BC=L(()=>{"use strict";fp();M_();N_=(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()},$C=({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},NC=t=>Object.prototype.toString.call(t).slice(8,-1),IC=["auto","json","text","blob","arrayBuffer","stream","response"],Nj={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},Fj=t=>{let e=t.headers.get("content-type");return e&&e.includes("json")?t.json():t.text()},jj=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},MC=(t,e)=>t?.message||t?.error||e.statusText||`HTTP ${e.status}`,Bj=(t,e)=>{let n=t.body,r=e==="json"||e==="auto"&&/json/i.test(t.type);if(!r&&e!=="auto"&&e!=="text")return null;let o;try{o=r?n?JSON.parse(n):null:n}catch{return!1}return{data:o,error:null,status:t.status}},on=async(t,e,n,r)=>{let o=n??"auto";if(!IC.includes(o))throw new TypeError(`@symbo.ls/fetch rest: unknown responseType "${o}" \u2014 use one of: ${IC.join(", ")}`);RC();try{return await Uj(t,e,o,r)}finally{PC()}},Uj=async(t,e,n,r)=>{let o=r?await r:null;if(o&&o.seeded===!0){let i=Bj(o,n);if(i)return i;o=i===!1?null:new Response(o.body,{status:o.status,headers:{"content-type":o.type}})}let s=o||await globalThis.fetch(t,e);if(n==="auto"){let i=await Fj(s);return{data:i,error:s.ok?null:MC(i,s),status:s.status}}if(!s.ok){let i=await jj(n==="response"?s.clone():s);return{data:n==="response"?s:i,error:MC(i,s),status:s.status}}return{data:await Nj[n](s),error:null,status:s.status}},Vj=["FormData","Blob","File","URLSearchParams","ReadableStream","ArrayBuffer"],Hj=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||Vj.includes(NC(t))),FC=t=>Array.isArray(t)?t:typeof t.entries=="function"?t.entries():Object.entries(t),$_=(...t)=>{let e={},n=new Map;for(let r of t)if(r)for(let[o,s]of FC(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},zj={"Content-Type":"application/json"},Wj={"Content-Type":void 0},qj=t=>{if(!t||typeof t!="object")return null;let e={};for(let{header:n,param:r}of D_(t.query))e[n]=r;return{params:e,rpc:t.rpc==="get"}},Kj="content-type",F_=(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()},Gj=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 jC(t,e,n,r,o,s)},jC=(t,e={},n,r={},o,s)=>{let i=n?.token||null,a=vC(kC(o,s),e),c=qj(s),l=_=>{if(!c)return null;let S={},v={},x={};for(let w in _){let b=w.toLowerCase();if(b==="authorization")return null;if(b===Kj)continue;v[w]=_[w];let k=c.params[b];k?x[k]=_[w]:S[w]=_[w]}return{headers:S,adoptHeaders:v,query:x}},f=(_,S)=>{if(!a)return null;let v="";for(let x in S){let w=x.toLowerCase();if(w==="accept-language")v=String(S[x]);else if(a.carried[w]!==S[x])return null}try{return L_(bi(_(),v),a.maxAge)}catch{return null}},u=(_,S)=>{if(!a||!a.seeded)return null;let v="";for(let x in S){let w=x.toLowerCase();if(w==="accept-language")v=String(S[x]);else if(w!=="accept")return null}try{return L_(bi(_,v),a.maxAge)}catch{return null}},d=()=>i?{Authorization:`Bearer ${i}`}:null,p=_=>$_(e,d(),_),g=_=>({...r,..._}),h=(_,S,v)=>{if(!Hj(S))return g({method:_,headers:$_(e,d(),zj,v),body:JSON.stringify(S)});let x={method:_,headers:$_(e,d(),Wj,v),body:S};return NC(S)==="ReadableStream"&&(x.duplex="half"),g(x)},m=(_,S)=>{let v=S||t;if(_&&(_.startsWith("http://")||_.startsWith("https://")))return _;let x=_&&!_.startsWith("/")?"/":"";return`${v}${x}${_||""}`};return{name:"rest",setToken:_=>{i=_},getSession:async()=>{if(!n?.sessionUrl)return i?{token:i}:null;let _=await on(m(n.sessionUrl,n.baseUrl),g({headers:p()}));return _.error?null:_.data},signIn:async _=>{if(!n?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let S=await on(m(n.signInUrl,n.baseUrl),h("POST",_));return S.data?.token&&(i=S.data.token),S},signOut:async()=>(n?.signOutUrl&&await on(m(n.signOutUrl,n.baseUrl),g({method:"POST",headers:p()})),i=null,{error:null}),select:({from:_,params:S,select:v,limit:x,offset:w,order:b,single:k,headers:C,baseUrl:D,responseType:R})=>{let $=N_(D||t,_||"",$C({params:S,select:v,limit:x,offset:w,order:b,single:k})),N=p(C),B=l(N);if(B){let X=g({headers:B.headers}),st=F_($,B.query);return on(st,X,R,u(st,B.headers)||f(()=>$,B.adoptHeaders))}let et=g({headers:N});return on($,et,R,u($,et.headers)||f(()=>$,et.headers))},rpc:async({from:_,params:S,headers:v,baseUrl:x,responseType:w,read:b})=>{let k=xC(S),C=()=>N_(x||t,`rpc/${_}`,S),D=st=>on(m(`rpc/${_}`,x),h("POST",S,v),w,st),R=p(v),$=b===!0&&c&&c.rpc&&k?l(R):null,N=null;if($)try{N=C()}catch{N=null}if(!N)return D(a&&a.rpc&&k?f(C,R):null);let B=g({method:"GET",headers:$.headers}),et=F_(N,$.query),X=await on(et,B,w,u(et,$.headers)||f(()=>N,$.adoptHeaders));return X.status===405?D(null):X},insert:({from:_,data:S,headers:v,baseUrl:x,responseType:w})=>on(m(_,x),h("POST",S,v),w),update:({from:_,data:S,params:v,method:x,headers:w,baseUrl:b,responseType:k})=>{let C=v?.id||S?.id,D=C?`${_}/${C}`:_;return on(m(D,b),h(x||"PATCH",S,w),k)},upsert:({from:_,data:S,params:v,method:x,headers:w,baseUrl:b,responseType:k})=>{let C=v?.id||S?.id,D=C?`${_}/${C}`:_;return on(m(D,b),h(x||"PUT",S,w),k)},delete:({from:_,params:S,headers:v,baseUrl:x,responseType:w})=>{let b=S?.id,k=b?`${_}/${b}`:_;return on(m(k,x),g({method:"DELETE",headers:p(v)}),w)}}}});var VC={};F(VC,{localAdapter:()=>UC,setup:()=>Xj});var dp,Yj,Xj,UC,HC=L(()=>{"use strict";dp=(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},Yj=(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}},Xj=async({data:t,...e})=>UC(t,e),UC=(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=>dp(h,u));return Yj(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(dp(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),_=y?p.findIndex(S=>dp(S,y)):-1;if(_>-1){let S={...p[_]};Object.assign(p[_],m),h.push(p[_]),c(f,"UPDATE",p[_],S)}else{let S={id:m.id||++l,...m};p.push(S),h.push(S),c(f,"INSERT",S,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--)dp(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 Si={};F(Si,{EARLY_KEY:()=>cp,SEED_BLOCK:()=>I_,createAdapter:()=>nB,createEarlySeedBlock:()=>CC,createEarlySeedScript:()=>TC,default:()=>bB,earlyKey:()=>bi,executeFetch:()=>nw,fetchFunctions:()=>mB,fetchPlugin:()=>yB,hasAdapter:()=>eB,initAdapterAuth:()=>yp,parseDuration:()=>tl,queryClient:()=>gB,registerAdapter:()=>tB,requestsInFlight:()=>DC,resolveDb:()=>ZC,whenRequestsIdle:()=>LC});var Zj,XC,pp,wi,hp,H_,Jj,Qj,tB,eB,nB,ZC,tl,JC,QC,An,zC,sn,wp,B_,X_,rl,el,mp,z_,bp,tT,Z_,eT,rB,gp,oB,WC,U_,nT,rT,_i,qC,sB,KC,iB,oT,J_,ol,_p,Sp,sl,Q_,yp,tw,Cn,Yn,nl,xp,aB,W_,Ir,q_,K_,Mr,GC,Xn,cB,lB,fB,uB,V_,il,dB,ew,sT,G_,Y_,iT,aT,pB,hB,nw,gB,YC,mB,yB,bB,kp=L(()=>{"use strict";M();Rt();fp();BC();fp();M_();Zj=["select","rpc","insert","update","upsert","delete","subscribe"],XC={rest:()=>Promise.resolve(j_),local:()=>Promise.resolve().then(()=>(HC(),VC))},pp=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),wi=(()=>{if(typeof globalThis<"u"&&globalThis[pp])return globalThis[pp];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,pp,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[pp]}catch{}return t})(),hp=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),H_=(()=>{if(typeof globalThis<"u"&&globalThis[hp])return globalThis[hp];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,hp,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[hp]}catch{}return t})(),Jj=5e3,Qj=t=>new Promise(e=>{if(wi[t])return e(wi[t]);let n=H_[t]||=[],r=!1,o=()=>{r||(r=!0,e(wi[t]||null))};n.push(o),setTimeout(o,Jj)}),tB=(t,e)=>{wi[t]=e;let n=H_[t];if(n&&n.length){H_[t]=[];for(let r of n)r()}},eB=t=>typeof t=="string"&&!!(wi[t]||XC[t]),nB=t=>{let e={};for(let n of Zj)t[n]&&(e[n]=t[n]);return e.name=t.name||"custom",e},ZC=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=wi[r]||XC[r];if(!o&&(o=await Qj(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)},tl=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},JC=t=>!!t&&!!t.isolateFetchCache,QC=()=>({cache:new Map,subscribers:new Map,active:new Map,invalidatedAt:new Map,mounted:new Set}),An=QC(),zC=new WeakMap,sn=t=>{if(!JC(t))return An;let e=zC.get(t);return e||zC.set(t,e=QC()),e},wp=0,B_=new WeakMap,X_=(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}`},rl=(t,e)=>t.cache.get(e)||null,el=(t,e,n,r,o=++wp,s=!1)=>{let i={data:n,error:r,time:Date.now(),stale:s,seq:o};t.cache.set(e,i);let a=t.subscribers.get(e);if(a)for(let c of a)P(c)&&c(i);return i},mp=(t,e,n)=>{let r=e?t.cache.get(e):null;return r&&!r.error&&r.seq>n?r:null},z_=(t,e,n)=>(t.invalidatedAt.get(e)||0)>n,bp=(t,e)=>{t.invalidatedAt.set(e,++wp)},tT=(t,e)=>{t.cache.delete(e),bp(t,e)},Z_=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)}:E(t)?{staleTime:tl(t),gcTime:3e5}:{staleTime:tl(t.stale||t.staleTime)||6e4,gcTime:tl(t.gc||t.gcTime||t.expire)||3e5,key:t.key},eT=t=>!!t.ref&&t.element.__ref===t.ref,rB=({config:t,element:e,context:n})=>{try{return Q_(t,e,n)}catch{return null}},gp=null,oB=()=>{gp||(gp=setInterval(()=>{let t=Date.now(),{cache:e,subscribers:n,active:r,invalidatedAt:o,mounted:s}=An;for(let[i,a]of e){let c=n.get(i);!(c&&c.size>0)&&t-a.time>(a.gcTime||3e5)&&e.delete(i)}for(let[i]of o)!e.has(i)&&!r.has(i)&&o.delete(i);for(let i of s)eT(i)||s.delete(i)},3e4),gp.unref&&gp.unref())};oB();WC=3,U_=t=>Math.min(1e3*2**t,3e4),nT=(t,e)=>{let n=t.retry;return n===void 0&&e?{count:0}:n===!1?{count:0}:n===!0||n===void 0?{count:WC,delay:U_}:typeof n=="number"?{count:n,delay:U_}:{count:n.count??WC,delay:P(n.delay)?n.delay:typeof n.delay=="number"?()=>n.delay:U_}},rT=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}},_i={focus:new Set,online:new Set},qC=!1,sB=()=>{if(qC||typeof window>"u")return;qC=!0;let t=()=>{for(let n of _i.focus)n()},e=()=>{for(let n of _i.online)n()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},KC=(t,e)=>{let n=e.__ref;if(t===!0)return{from:n.__state||e.key,method:"select",query:!0,on:"create"};if(E(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},iB=["insert","update","upsert","delete"],oT=t=>iB.includes(t),J_=t=>t.mutation===!0?!0:t.mutation===!1||t.method!=="rpc"?!1:t.on==="submit"||t.on==="click"||t.invalidates!=null,ol=(t,e)=>{let n=t?.state?.root||e?.state?.root;if(n?.lang)return n.lang},_p=(t,e)=>{let r=(t?.state?.root||e?.state?.root)?.__fetchScope;return r?String(r):void 0},Sp=(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},sl=(t,e)=>P(t)?t(e,e.state):t,Q_=(t,e,n)=>X_(t,Sp(t.params,e,n),_p(e,n),ol(e,n),sl(t.page,e),sl(t.cursor,e)),yp=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)})},tw=async(t,e)=>{if(P(t.select))return t.auth!==!1&&await yp(t,e),t;if(t.__resolved)return t.auth!==!1&&await yp(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=ZC(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 yp(n,e),n):null},Cn=(t,e,...n)=>{let r=P(t[e])?t[e]:null;r&&r.call(t,...n,t,t.state,t.context)},Yn=(t,e,n,...r)=>{let o=t&&P(t[n])?t[n]:null;o&&o.call(e,...r,e,e.state,e.context)},nl=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},xp=t=>t.responseType==="stream"||t.responseType==="response",aB=["Blob","File","ArrayBuffer","ReadableStream","Response"],W_=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||aB.includes(Object.prototype.toString.call(t).slice(8,-1))),Ir=(t,e,n,r={})=>{if(!n&&W_(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)&&!W_(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})}},q_=Object.freeze({isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),K_=t=>({isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:t,status:"error",fetchStatus:"idle"}),Mr=(t,e)=>{let n=t?.__ref;n&&(n.__fetchStatus={...e,isError:!!e.error},n.__fetching=e.isFetching,n.__fetchError=e.error)},GC=(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)},Xn=async(t,e,n,r={})=>{let o=n?.fetch;if(!o||!e||!e.__ref)return;let s=e.__ref,i=_p(e,n);(!s.__fetchScopeOwner||s.__fetchScopeOwner.scope!==i)&&(s.__fetchScopeOwner={scope:i});let a=s.__fetchScopeOwner,c=()=>e.__ref===s&&s.__fetchScopeOwner===a&&_p(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 tw(o,n);if(!l||!c())return;let{from:f,method:u,query:d,params:p,cache:g,transform:h,single:m,auth:y,fields:_,as:S,limit:v,offset:x,order:w,headers:b,baseUrl:k,responseType:C,page:D,cursor:R,infinite:$,placeholderData:N,initialData:B,select:et,keepPreviousData:X}=t,st=H=>(P(et)&&(H=et(H,e,e.state)),h&&(H=h(H,e,e.state)),H),Dt=H=>{Mr(e,K_(H)),Cn(e,"onFetchError",H),Yn(t,e,"onFetchError",H)},Lt=E(et)?et:void 0;if(d&&P(e.getQuery)){let H=e.getQuery(l.name||"paths");H&&(Lt=H.select||H.length&&H.join(",")||Lt)}let it=Sp(p,e,n),q=sl(D,e),G=sl(R,e),nt=J_(t),J=xp(t)||nt?null:Z_(g),ft=nT(t,nt||oT(u)),Y=ol(e,n),Q=J?X_(t,it,i,Y,q,G):null,Ct=sn(n);if(!s.__fetchInitialized&&Q&&(s.__fetchInitialized=!0,B!==void 0)){let H=P(B)?B():B;el(Ct,Q,H,null)}if((u==="select"||u==="rpc")&&Q&&J&&!r.refresh&&!r.force){let H=rl(Ct,Q);if(H&&!H.error){let K=Date.now()-H.time,ut=H.stale||K>(J.staleTime||0);$&&I(H.data)&&!s.__pages&&(s.__pages=[H.data],GC(s,t,H.data));let _t=st(H.data);if(!c())return;if(!ut){Mr(e,q_),Ir(e,_t,S);return}Ir(e,_t,S)}else if(N!==void 0){let K=P(N)?N(e,e.state):N;K!==void 0&&Ir(e,K,S)}}let ct=Q&&!r.force?Ct.active.get(Q):null;if(ct&&!z_(Ct,Q,B_.get(ct)||0)){try{let H=await Promise.race([ct,new Promise((K,ut)=>setTimeout(()=>ut("DEDUP_TIMEOUT"),15e3))]);if(!c())return;if(H?.error)Dt(H.error);else if(H?.data!==void 0){let K=!$&&mp(Ct,Q,B_.get(ct)||0),ut=st(K?K.data:H.data);if(!c())return;Ir(e,ut,S),Cn(e,"onFetchComplete",ut),Yn(t,e,"onFetchComplete",ut)}}catch(H){if(!c())return;H!=="DEDUP_TIMEOUT"&&Dt(H)}return}let yn=!rl(Ct,Q)?.data;Mr(e,{isFetching:!0,isLoading:yn,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),Cn(e,"onFetchStart"),Yn(t,e,"onFetchStart");let re=n?.analyze?.emitNetwork,Ot=re?typeof performance<"u"?performance.now():Date.now():0;re&&re({phase:"start",mode:"query",from:f,method:u,cacheKey:Q,lang:Y});let bn=async()=>{if(!c())return;if(y!==!1&&l.auth!==!1&&l.getSession){let _t=await l.getSession();if(!c())return;if(y===!0&&!_t){let It={message:"Not authenticated"};return Dt(It),{data:null,error:It}}}let H=l[u];if(!P(H))return{data:null,error:{message:`Method "${u}" not found on adapter`}};let K={from:f,select:Lt,params:it,single:m,limit:v,offset:x,order:w,headers:b,baseUrl:k};C!==void 0&&(K.responseType=C);let ut=ol(e,n);if(ut&&(K.headers={...K.headers,"Accept-Language":ut}),q!==void 0){if(A(q))q.offset!==void 0&&(K.offset=q.offset),q.limit!==void 0&&(K.limit=q.limit),q.cursor!==void 0&&(K.params={...K.params,cursor:q.cursor});else if(typeof q=="number"){let _t=t.pageSize||v||20;K.offset=(q-1)*_t,K.limit=_t}}if(G!==void 0&&(K.params={...K.params,cursor:G}),u==="insert"||u==="update"||u==="upsert"){let _t;if(_===!0||t.on==="submit")_t=nl(e);else if(I(_)){let It=nl(e);_t={};for(let _o of _)_t[_o]=It[_o]}else e.state?.parse?_t=e.state.parse():A(e.state)&&(_t={...e.state});h&&(_t=h(_t,e,e.state)),K.data=_t}if(u==="rpc"){let _t=it;if(t.on==="submit"){let It=nl(e);_t=t.transformParams?t.transformParams(It,e,e.state):It}K.params=_t,K.read=!nt&&t.read!==!1}if(u==="subscribe"){if(P(s.__unsubscribe)){let It=s.__unsubscribe;s.__unsubscribe=null;try{It()}catch{}}let _t=l.subscribe({from:f,params:it,on:t.subscribeOn},(It,_o,xA)=>{c()&&(Ir(e,It,S),Cn(e,"onFetchComplete",It),Yn(t,e,"onFetchComplete",It))});return c()?(s.__unsubscribe=_t,{data:null,error:null,subscribed:!0}):(P(_t)&&_t(),{data:null,error:null,subscribed:!0})}return H(K)},oe=++wp,_n=rT(bn,ft);B_.set(_n,oe),Q&&Ct.active.set(Q,_n);try{let H=await _n;if(nt&&t.invalidates&&H&&!H.error&&!H.subscribed&&sT(Ct,t.invalidates,f),!c()||H?.subscribed)return;let{data:K,error:ut}=H||{};if(ut){Q&&!mp(Ct,Q,oe)&&el(Ct,Q,null,ut,oe),Dt(ut),re&&re({phase:"error",mode:"query",from:f,method:u,cacheKey:Q,error:ut.message||ut,durationMs:(typeof performance<"u"?performance.now():Date.now())-Ot});return}if(K!==void 0){let _t=K;if((u==="select"||u==="rpc")&&Q){let _o=!$&&mp(Ct,Q,oe);if(_o)_t=_o.data;else{let xA=el(Ct,Q,K,null,oe,z_(Ct,Q,oe));xA.gcTime=J?.gcTime||3e5}}let It=_t;if($&&I(K)&&((!s.__pages||!r.direction)&&(s.__pages=[]),r.direction==="previous"?s.__pages.unshift(K):s.__pages.push(K),It=s.__pages.flat(),GC(s,t,K)),It=st(It),!c())return;Mr(e,q_),(!X||It!==void 0)&&Ir(e,It,S),Cn(e,"onFetchComplete",It),Yn(t,e,"onFetchComplete",It),re&&re({phase:"success",mode:"query",ok:!0,from:f,method:u,cacheKey:Q,durationMs:(typeof performance<"u"?performance.now():Date.now())-Ot})}}catch(H){if(!c())return;Dt(H),re&&re({phase:"error",mode:"query",from:f,method:u,cacheKey:Q,error:H.message||String(H),durationMs:(typeof performance<"u"?performance.now():Date.now())-Ot})}finally{Q&&Ct.active.get(Q)===_n&&Ct.active.delete(Q)}},cB=(t,e,n)=>{let r=t.on,o=e.__ref;if(!o)return;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||Xn;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"&&lB(t,e,n,s)},lB=(t,e,n,r)=>{let o=e.__ref,s,i=z(()=>{let a;try{a=JSON.stringify([Sp(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,sl(t.page,e)??null])}catch{return}if(s===void 0){s=a;return}a!==s&&(s=a,queueMicrotask(()=>r(t,e,n)))});Array.isArray(o.__effects)?o.__effects.push(i):o.__fetchListeners.push(()=>i.dispose())},fB=(t,e,n)=>{let r=e.__ref;r.__fetchCleanups||(r.__fetchCleanups=[]),sB();let o=t.refetchInterval;if(o){let c=typeof o=="number"?o:tl(o);if(c>0){let l=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&Xn(t,e,n,{force:!0})},c);r.__fetchCleanups.push(()=>clearInterval(l))}}let s=xp(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=Q_(t,e,n),f=rl(sn(n),l),u=Z_(t.cache);(!f||f.stale||Date.now()-f.time>(u?.staleTime||0))&&Xn(t,e,n,{force:!0})};_i.focus.add(c),r.__fetchCleanups.push(()=>_i.focus.delete(c))}if(a){let c=()=>Xn(t,e,n,{force:!0});_i.online.add(c),r.__fetchCleanups.push(()=>_i.online.delete(c))}},uB=(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&&Ir(t,i,o),s},V_=(t,e)=>{let n=t.__ref;if(!n||!e.optimistic)return;let r=n.__optimisticSnapshot;r!==void 0&&(Ir(t,r,e.as),delete n.__optimisticSnapshot)},il=t=>{if(!t)return()=>!0;if(E(t))return e=>e.includes(t);if(I(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},dB=(t,e)=>{let n=[];for(let r of t.mounted){if(!eT(r)){t.mounted.delete(r);continue}let o=rB(r);o&&e(o)&&n.push(Xn(r.config,r.element,r.context,{refresh:!0}))}return Promise.allSettled(n).then(()=>{})},ew=(t,e)=>{EC();for(let[n,r]of t.cache)e(n)&&(r.stale=!0,bp(t,n));for(let[n]of t.active)!t.cache.has(n)&&e(n)&&bp(t,n);return dB(t,e)},sT=(t,e,n)=>{let r=(I(e)?e:[e]).map(o=>o===!0||o==="*"?s=>s.startsWith(n+":"):o?il(o):()=>!1);return ew(t,o=>r.some(s=>s(o)))},G_=(t,e)=>{for(let[n]of t.cache)e(n)&&tT(t,n);for(let[n]of t.active)e(n)&&bp(t,n)},Y_=()=>!0,iT=(t,e)=>rl(t,e)?.data??void 0,aT=(t,e,n)=>{let r=rl(t,e),o=P(n)?n(r?.data):n;el(t,e,o,null)},pB=async(t,e,n)=>{let r=n?.fetch;if(!r)return;let o=await tw(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:_,onSuccess:S,onError:v,onSettled:x}=t,w;if(c===!0||u==="submit")w=nl(e);else if(I(c)){let D=nl(e);w={};for(let R of c)w[R]=D[R]}else e.state?.parse?w=e.state.parse():A(e.state)&&(w={...e.state});l&&(w=l(w,e,e.state)),P(_)&&_(w,e,e.state);let b=y?uB(e,t,w):null;Mr(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),Cn(e,"onFetchStart"),Yn(t,e,"onFetchStart");let k=n?.analyze?.emitNetwork,C=k?typeof performance<"u"?performance.now():Date.now():0;k&&k({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){b!==void 0&&V_(e,t);let Dt={message:"Not authenticated"};Cn(e,"onFetchError",Dt),Yn(t,e,"onFetchError",Dt);return}}let D=o[i];if(!P(D))return;let R={from:a,data:w,headers:p,baseUrl:g};h!==void 0&&(R.responseType=h),t.params&&(R.params=Sp(t.params,e,n));let $=ol(e,n);$&&(R.headers={...R.headers,"Accept-Language":$});let N=nT(t,!0),B=await rT(()=>D(R),N),{data:et,error:X}=B||{};if(X){b!==void 0&&V_(e,t),Mr(e,K_(X)),Cn(e,"onFetchError",X),P(v)&&v(X,w,e),P(x)&&x(null,X,w,e),k&&k({phase:"error",mode:"mutation",from:a,method:i,error:X.message||String(X),durationMs:(typeof performance<"u"?performance.now():Date.now())-C});return}if(delete s.__optimisticSnapshot,Mr(e,q_),et!==void 0&&(f||!W_(et))){let st=f?{[f]:et}:et;e.state?.update&&e.state.update(st,{preventFetch:!0})}Cn(e,"onFetchComplete",et),Yn(t,e,"onFetchComplete",et),P(S)&&S(et,w,e),P(x)&&x(et,null,w,e),k&&k({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-C}),m&&sT(sn(n),m,a)}catch(D){b!==void 0&&V_(e,t),Mr(e,K_(D)),Cn(e,"onFetchError",D),Yn(t,e,"onFetchError",D),P(v)&&v(D,w,e),P(x)&&x(null,D,w,e),k&&k({phase:"error",mode:"mutation",from:a,method:i,error:D.message||String(D),durationMs:(typeof performance<"u"?performance.now():Date.now())-C})}finally{s.__fetching=!1}},hB=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||[])sn(n.context).mounted.delete(n);t.__fetchCleanups=[],t.__fetchListeners=[],t.__unsubscribe=null,t.__fetchMounted=[]},nw=(t,e,n,r)=>{if(!t||!r?.fetch)return;let s=St(t,e);if(!s)return;let i=I(s)?s.map(f=>KC(St(f,e),e)).filter(Boolean):[KC(s,e)].filter(Boolean),a=e.__ref,c=sn(r);if(a.__fetchMounted)for(let f of a.__fetchMounted)c.mounted.delete(f);a.__fetchMounted=[],!a.__fetchDisposer&&I(a.__effects)&&(a.__fetchDisposer={dispose:()=>hB(a)},a.__effects.push(a.__fetchDisposer));let l=!JC(r);for(let f of i){let u=oT(f.method),d=u?pB:Xn,p=!u&&!J_(f)&&f.method!=="subscribe";if(f.on==="create"?d(f,e,r):queueMicrotask(()=>cB({...f,__runner:d},e,r)),p&&f.on==="create"&&(l&&(f.refetchInterval||f.refetchOnWindowFocus!==!1||f.refetchOnReconnect!==!1)&&fB(f,e,r),!xp(f))){let g={element:e,ref:a,config:f,context:r};c.mounted.add(g),a.__fetchMounted.push(g)}}a.refetch=f=>{for(let u of i)Xn(u,e,r,{force:!0,...f})},a.fetchNextPage=()=>{let f=i[0];if(!f||!f.infinite)return;let u=a.__nextPageParam;if(u==null)return;let d={...f,cursor:u};Xn(d,e,r,{direction:"next",force:!0})},a.fetchPreviousPage=()=>{let f=i[0];if(!f||!f.infinite)return;let u=a.__prevPageParam;if(u==null)return;let d={...f,cursor:u};Xn(d,e,r,{direction:"previous",force:!0})}},gB={invalidateQueries:t=>ew(An,il(t)),removeQueries:t=>{G_(An,t?il(t):Y_)},getQueryData:t=>iT(An,t),setQueryData:(t,e)=>{aT(An,t,e)},prefetchQuery:async(t,e)=>{let n=e?.fetch;if(!n)return;let r=sn(e),o=await tw(n,e);if(!o)return;let s=t.method||"select",i=_p(null,e),a=ol(null,e),c=X_({...t,method:s},t.params,i,a),l=o[s];if(!P(l))return;let f={from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single,headers:t.headers,baseUrl:t.baseUrl};a&&(f.headers={...f.headers,"Accept-Language":a}),t.responseType!==void 0&&(f.responseType=t.responseType),s==="rpc"&&(f.read=!J_(t)&&t.read!==!1);let u=++wp,d=await l(f);if(d?.data!==void 0&&!d?.error&&!xp(t)&&!mp(r,c,u)){let p=el(r,c,d.data,null,u,z_(r,c,u));p.gcTime=Z_(t.cache)?.gcTime||3e5}return d},getCache:()=>An.cache,clear:()=>G_(An,Y_),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[n]of An.cache)n.match(/:([a-z]{2,3})$/i)&&(n.endsWith(e)||tT(An,n))}},YC=(t,e)=>A(t)?Q_({method:"select",...t},e,e?.context):t,mB={invalidateQueries(t){return ew(sn(this?.context),il(t))},removeQueries(t){G_(sn(this?.context),t?il(t):Y_)},getQueryData(t){return iT(sn(this?.context),YC(t,this))},setQueryData(t,e){aT(sn(this?.context),YC(t,this),e)}},yB={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||sn(t.context).active.clear(),nw(e,t,t.state,t.context))}},bB=nw});function cl(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 ow(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 sw(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 iw(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 Ap(t={}){let e=this;if(e.node?.style){for(let n in t){let r=t[n],o=e[n];if(A(r)&&o)Ap.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 lT(t){let e=this;if(Gn("beforeRemove",e,t)===!1)return e;P(e.node.remove)?e.node.remove():Rr()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=wc(e.parent.__ref.__children,e.key)),Gn("remove",e,t)}function aw(t){return this[t]}function cw(t,e){let n=this;if(t)return n.update(t,e),n}function lw(t){return t?this.__ref&&this.__ref[t]:this.__ref}function fw(){let t=this.getRef("__children");return Array.isArray(t)?t.map(e=>this[e]):[]}function ll(){return this.getRef().path}function ul(t){let e=null,n=r=>r.__element&&r.root?.isRootState;if(!this)e=cT();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=cT()),t?e?.[t]:e}function dl(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 pl(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function hl(t){let e=this.getRoot()?.context;return t?e[t]:e}function gl(t){let e=this.context;return t?e[t]:e}function Cp(){let t=this,e=[];for(let n in t)!Object.prototype.hasOwnProperty.call(t,n)||Cr.has(n)&&!Ec.has(n)||e.push(n);return e}function Tp(t=[]){let e=this,n={},r=Cp.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 jt(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=c)}return n}function al(t=[],e=new WeakSet){let n=this;if(e.has(n))return;e.add(n);let r=Tp.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=>V(a)?al.call(a,t,e):a):V(i)&&(r[s]=al.call(i,t,e))}return r}function ki(...t){if($r!=="test"&&$r!=="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 dw(...t){($r==="test"||$r==="development")&&console.log(...t)}function ml(...t){($r==="test"||$r==="development")&&console.warn(...t)}function Mo(...t){if($r==="test"||$r==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&ki.call(this),new Error(...t)}}function yl(){let t=this,{key:e,parent:n}=t,{__children:r}=n.__ref,o=r.indexOf(e),s=r[o+1];return n[s]}function bl(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 _l(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,pt(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 pw(t,...e){let n=this.context,r=n.utils?.[t]||n.functions?.[t]||n.methods?.[t]||n.snippets?.[t];if(r&&!To(r))try{let o=r.call(this,...e);return o&&typeof o.then=="function"&&o.catch(s=>{Mo.call(this,s)}),o}catch(o){if(Mo.call(this,o),n?.strictMode)throw o}}async function wl(){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 vp();await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await vp();await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let n=vp().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 vp();await o(r,t.context)}return r}function Sl(t){let e=this,n=t||Qc.useStateQuery||e.context?.useStateQuery;if(!n)return null;let r={};if(rw(e,r),n===!0)return r;let o=AB[n];return o?o(r):r}function hw(t,e){return!!(Or.has(t)||e?.context?.methods?.[t])}var $r,Ep,fl,xi,cT,uw,_B,vp,rw,wB,fT,SB,xB,kB,vB,EB,AB,uT=L(()=>{"use strict";T_();Eo();qt();Sn();Dd();ii();R_();$r="production";Ep=null,fl=t=>{Ep=t||null},xi=(t,e)=>{t&&e&&Ep===t&&(Ep=e)},cT=()=>Ep||null;uw=(t,e,n,r)=>Object.defineProperty(t,e,{get:n,set:r});_B="[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.",vp=()=>Promise.resolve().then(()=>(kp(),Si)).catch(t=>{throw new Error(_B,{cause:t})});rw=(t,e)=>{let n=t.__ref;if(!n)return;let r=n.__state;r&&typeof r=="string"&&wB(e,r);let o=n.__children;if(o)for(let a=0;a<o.length;a++){let c=t[o[a]];c&&c.__ref&&rw(c,e)}let s=n.contentElementKey||"content",i=t[s];i&&i.__ref&&rw(i,e)},wB=(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])}},fT=(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
|
+
${fT(i,e+1)}
|
|
24
24
|
${n}}`).join(`
|
|
25
|
-
`):""},
|
|
26
|
-
${
|
|
27
|
-
}`,
|
|
25
|
+
`):""},SB=t=>`{
|
|
26
|
+
${fT(t,1)}
|
|
27
|
+
}`,xB=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},kB=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("&")},vB=(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}`},EB=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},AB={graphql:SB,"json-api":xB,odata:kB,sql:vB,paths:EB}});var CB,gw,dT=L(()=>{"use strict";Rd();CB={snapshotId:Mc},gw=(t,e)=>{let n=t.__ref,{currentSnapshot:r,calleeElement:o}=e;if(!o||o===t){let a=CB.snapshotId();return n.__currentSnapshot=a,[a,t]}let i=o.__ref.__currentSnapshot;return r<i?[i,o,!0]:[i,o]}});var Op,mw,pT=L(()=>{Op=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),mw=t=>typeof t=="string"&&Op.has(t)});var Rp,vi,xl,hT=L(()=>{"use strict";Rp="smbls_lang",vi=t=>t&&t.storageLangKey||Rp,xl=(t,e)=>t||e&&e.defaultLang||"en"});async function yw(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 gT=L(()=>{"use strict"});var Ei,Ai,kl,Be,Nr,Ci,vl,an,Pp,TB,Fr,OB,$o,No,bw,mT=L(()=>{"use strict";Ei=t=>t!=="latest"?`@${t}`:"",Ai=t=>t?`/${t}`:"",kl=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("/")}},Be={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,n)=>`${Be.skypack.url}/${t}${Ei(e)}${Ai(n)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,n)=>`${Be.esmsh.url}/${t}${Ei(e)}${Ai(n)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,n)=>`${Be.unpkg.url}/${t}${Ei(e)}${Ai(n)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,n)=>`${Be.jsdelivr.url}/${t}${Ei(e)}${Ai(n)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,n)=>`${Be.symbols.url}/${t}${Ei(e)}${Ai(n)}/+esm`}},Nr={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},Ci=(t={})=>{let{packageManager:e}=t;return Nr[e]||null},vl=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},an=(t,e="latest",n="esmsh")=>{let r=Be[n]||Be.esmsh,{name:o,subpath:s}=kl(t);return r.formatUrl(o||t,vl(e),s)},Pp=(t,e="latest",n="esmsh")=>{let r=Be[n]||Be.esmsh,o=vl(e),{name:s,subpath:i}=kl(t);return`${r.url}/${s||t}${Ei(o)}${Ai(i)}/`},TB=/^node:|^@symbo-ls\//,Fr=t=>typeof t=="string"&&TB.test(t),OB=/[<>…]/,$o=t=>typeof t=="string"&&OB.test(t),No=t=>!!t&&typeof t=="object"&&!Array.isArray(t),bw=(t,e="skypack",n={})=>{let r=t.dependencies;if(!No(r))return"";let o=Object.keys(r);if(!o.length)return"";let s=n.pin||{},i={};for(let f of o){if(Fr(f)||$o(f))continue;let u=s[f]||r[f]||"latest";i[f]=an(f,u,e),f.endsWith("/")||(i[f+"/"]=Pp(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 bb,SE=P(()=>{"use strict";bb=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 _b,xE=P(()=>{"use strict";_b=(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 wb,kE=P(()=>{"use strict";wb=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 Sb,vE=P(()=>{"use strict";Sb=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function Fs(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 Cb(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 xb,kb,vb,Eb,Ab,EE=P(()=>{"use strict";xb=(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)}}),kb=(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)}),vb=(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}`)},Eb=(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)}}),Ab=(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 mo(t,e){if(!e||typeof e!="object")return t;let n=o=>!g$(o)||!Object.prototype.hasOwnProperty.call(e,o)?o:yd(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 Ob(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 m$(t,e){let n=Ob(t,e);if(typeof n=="number")return Number.isFinite(n)?n:void 0;if(typeof n=="string"&&!xs(n))return n}function y$(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 h=m$(d,u);if(h!==void 0)return h}},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,(h,g,p)=>{let m=g.trim();if(p==="polyglot")return a[m]??Ob(a,m)??h;if(p==="getLocalStateLang")return l(m+s)??h;let y=l(m);return y!==void 0?y:a[m]??Ob(a,m)??h}));return f}function AE(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}}xs(r)&&delete e[n]}return e}function Pb(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=AE(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=AE(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=y$(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 h=l.has("og:url")?d["og:url"]:l.has("url")?d.url:void 0,g=n?.actualPathname||e;if(h)d["og:url"]=h;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=mo(d,t.files);let p=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]=p:delete d[m]}return d}var G,sc,u$,yn,d$,js,go,Sr,p$,h$,Rb,g$,Tb,yd,CE=P(()=>{"use strict";Nt();Es();G=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,n=>e[n])},sc=t=>JSON.stringify(t).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"),u$=t=>Object.entries(t||{}).filter(([e,n])=>n!==void 0).map(([e,n])=>`${e}="${G(n)}"`).join(" "),yn=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)},d$=new Set(["jsonLd","styles","scripts"]),js=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="${yn(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="${yn(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="${G(o)}"`),r||(n.type&&s.push(`type="${G(n.type)}"`),n.async&&s.push("async"),n.defer&&s.push("defer"),n.integrity&&s.push(`integrity="${G(n.integrity)}"`),n.crossorigin&&s.push(`crossorigin="${G(n.crossorigin)}"`),n.referrerpolicy&&s.push(`referrerpolicy="${G(n.referrerpolicy)}"`),n.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${G(o||yn(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},go=t=>`${t.hreflang||""}|${t.href||""}`,Sr=t=>E(t)?yn(JSON.stringify(t)):String(t),p$=(t,e,n)=>t==="favicons"?Array.isArray(e)&&(typeof n=="string"||E(n))?` data-smbls-favicon="${G(Sr(n))}"`:"":(t==="icon"||t==="favicon")&&typeof e=="string"?` data-smbls-single-icon="${G(e)}"`:"",h$=t=>E(t)?` data-smbls-alternate="${G(go(t))}"`:"",Rb=(t,e)=>{e||(t={...t,robots:"noindex"});let n=Object.entries(t).reduce((r,[o,s])=>{if(!s&&s!==0&&s!==!1||d$.has(o))return r;if(o==="title")return r.push(`<title>${G(s)}</title>`),r;if(o==="canonical")return r.push(`<link rel="canonical" href="${G(s)}">`),r;if(o==="manifest")return r.push(`<link rel="manifest" href="${G(s)}">`),r;if(o==="favicon"||o==="favicons"||o==="icon"||o==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{let u=p$(o,s,f);if(typeof f=="string")r.push(`<link rel="icon" href="${G(f)}"${u}>`);else if(typeof f=="object"){let d=u$(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,h])=>h!==void 0).map(([d,h])=>`${d}="${G(h)}"`).join(" ");r.push(`<link rel="alternate" ${u}${h$(f)}>`)}}),r;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")r.push(`<meta ${u}="${G(l)}" content="${G(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")r.push(`<meta ${u}="${G(l)}" content="${G(d)}">`);else if(typeof d=="object"){let h=Object.entries(d).filter(([g,p])=>p!==void 0).map(([g,p])=>`${g}="${G(p)}"`).join(" ");r.push(`<meta ${h}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([h,g])=>g!==void 0).map(([h,g])=>`${h}="${G(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(...js(t)),n.join(`
|
|
33
|
-
`)},
|
|
32
|
+
}`;return`${a}${l}${c}`}});var _w,yT=L(()=>{"use strict";_w=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 ww,bT=L(()=>{"use strict";ww=(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 Sw,_T=L(()=>{"use strict";Sw=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 xw,wT=L(()=>{"use strict";xw=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function Ti(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 Tw(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 kw,vw,Ew,Aw,Cw,ST=L(()=>{"use strict";kw=(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)}}),vw=(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)}),Ew=(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}`)},Aw=(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)}}),Cw=(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 jo(t,e){if(!e||typeof e!="object")return t;let n=o=>!IB(o)||!Object.prototype.hasOwnProperty.call(e,o)?o:Dp(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 Rw(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 MB(t,e){let n=Rw(t,e);if(typeof n=="number")return Number.isFinite(n)?n:void 0;if(typeof n=="string"&&!fi(n))return n}function $B(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=MB(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]??Rw(a,m)??p;if(h==="getLocalStateLang")return l(m+s)??p;let y=l(m);return y!==void 0?y:a[m]??Rw(a,m)??p}));return f}function xT(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}}fi(r)&&delete e[n]}return e}function Lw(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=xT(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=xT(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=$B(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=jo(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 _=y.replace(/\{\{[^}]*\}\}/g,"").trim();_?d[m]=_:m==="title"?d[m]=h:delete d[m]}return d}var W,Lo,Io,El,Pw,RB,Tn,PB,Oi,Fo,jr,DB,LB,Dw,IB,Ow,Dp,kT=L(()=>{"use strict";qt();pi();W=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,n=>e[n])},Lo=t=>JSON.stringify(t).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"),Io=(t,e,{remove:n=!1,warn:r}={})=>{if(!t||typeof t.querySelector!="function")return null;let o=null;try{o=t.querySelector(e)}catch{return null}if(!o)return null;n&&o.parentNode&&o.parentNode.removeChild(o);let s;try{s=JSON.parse(o.textContent||"")}catch(i){r&&r(i)}return{value:s,block:o}},El='script[type="application/json"][data-brender="registry"]',Pw=t=>'<script type="application/json" data-brender="registry">'+Lo(t)+"<\/script>",RB=t=>Object.entries(t||{}).filter(([e,n])=>n!==void 0).map(([e,n])=>`${e}="${W(n)}"`).join(" "),Tn=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)},PB=new Set(["jsonLd","styles","scripts"]),Oi=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="${Tn(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="${Tn(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="${W(o)}"`),r||(n.type&&s.push(`type="${W(n.type)}"`),n.async&&s.push("async"),n.defer&&s.push("defer"),n.integrity&&s.push(`integrity="${W(n.integrity)}"`),n.crossorigin&&s.push(`crossorigin="${W(n.crossorigin)}"`),n.referrerpolicy&&s.push(`referrerpolicy="${W(n.referrerpolicy)}"`),n.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${W(o||Tn(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},Fo=t=>`${t.hreflang||""}|${t.href||""}`,jr=t=>A(t)?Tn(JSON.stringify(t)):String(t),DB=(t,e,n)=>t==="favicons"?Array.isArray(e)&&(typeof n=="string"||A(n))?` data-smbls-favicon="${W(jr(n))}"`:"":(t==="icon"||t==="favicon")&&typeof e=="string"?` data-smbls-single-icon="${W(e)}"`:"",LB=t=>A(t)?` data-smbls-alternate="${W(Fo(t))}"`:"",Dw=(t,e)=>{e||(t={...t,robots:"noindex"});let n=Object.entries(t).reduce((r,[o,s])=>{if(!s&&s!==0&&s!==!1||PB.has(o))return r;if(o==="title")return r.push(`<title>${W(s)}</title>`),r;if(o==="canonical")return r.push(`<link rel="canonical" href="${W(s)}">`),r;if(o==="manifest")return r.push(`<link rel="manifest" href="${W(s)}">`),r;if(o==="favicon"||o==="favicons"||o==="icon"||o==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{let u=DB(o,s,f);if(typeof f=="string")r.push(`<link rel="icon" href="${W(f)}"${u}>`);else if(typeof f=="object"){let d=RB(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}="${W(p)}"`).join(" ");r.push(`<link rel="alternate" ${u}${LB(f)}>`)}}),r;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")r.push(`<meta ${u}="${W(l)}" content="${W(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")r.push(`<meta ${u}="${W(l)}" content="${W(d)}">`);else if(typeof d=="object"){let p=Object.entries(d).filter(([g,h])=>h!==void 0).map(([g,h])=>`${g}="${W(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}="${W(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(...Oi(t)),n.join(`
|
|
33
|
+
`)},IB=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http"),Ow=t=>typeof t=="string"&&t.length>0,Dp=t=>{if(!t||typeof t!="object")return null;if(Ow(t.src))return t.src;let e=t.content;return!e||typeof e!="object"?null:Ow(e.src)?e.src:Ow(e.storageUrl)?e.storageUrl:null}});var Lp,Iw,vT=L(()=>{"use strict";qt();Lp=(t,e)=>(I(e)?e:Object.values(e)).reduce((n,r)=>Math.abs(r-t)<Math.abs(n-t)?r:n),Iw=(t,e)=>(t=parseFloat(t),A(e)&&(e=Object.values(e)),Lp(t,e))});function Uo(t){let e=String(t||"").trim();if(!e)return{owner:Mw,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=Mw);let o=r?`${n}/${r}`:"";return{owner:n,key:r,full:o}}async function Fp(t,e={}){if((e.provider||"kv")==="api")return MT(t,e);let r=await h3(t,e);return r||MT(t,e)}async function h3(t,e={}){let n=e.kvBaseUrl||NB,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 MT(t,e={}){let n=e.apiBaseUrl||FB,{key:r}=Uo(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}=Uo(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 $T(t,e={}){if(A(t))return t;if(E(t)){let{full:n}=Uo(t);if(!n)return null;try{let r=await Fp(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 Ll(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async r=>{if(cn(r)){let o=await $T(BT(r),e);return o?{library:o,ignoreList:r.ignoreList}:null}return $T(r,e)}))).filter(Boolean)}var Mw,NB,FB,Ri,NT,jB,BB,ET,FT,AT,jT,UB,Tl,Fw,cn,BT,$w,jw,VB,HB,UT,Bw,VT,CT,Bo,Uw,zB,Br,WB,HT,zT,TT,qB,KB,GB,YB,OT,Ip,XB,WT,Nw,qT,ZB,RT,JB,QB,t3,e3,Mp,Vw,n3,r3,o3,PT,Ol,s3,Cl,$p,Pi,Di,DT,Np,Al,i3,a3,LT,IT,Rl,c3,l3,f3,u3,d3,p3,KT,Pl,Dl,GT=L(()=>{"use strict";qt();Eo();Dd();Sn();Mw="system",NB="https://smbls-kv.nika-980.workers.dev",FB="https://api.symbols.app";Ri=(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])&&Ri(t[o],e[o],n,s):t[o]=e[o])}},NT=(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]=NT(t[i],e,a))}return s},jB=new Set,BB=new Set(["components","pages","functions","snippets","methods"]),ET=(t,e)=>e===""&&BB.has(t),FT=["fontFamily","fontfamily","font_family","FONT_FAMILY"],AT=t=>{let e=new Map;if(!A(t))return e;for(let n of FT){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},jT=(t,e)=>{for(let n of FT){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)}},UB=t=>t.replace(/\.js$/iu,""),Tl=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let n of t){if(!E(n))continue;let r=n.split("/").map(o=>UB(o.trim())).filter(Boolean).join("/");r&&e.add(r)}return e},Fw=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),cn=t=>A(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),BT=t=>t.library!==void 0?t.library:t.key??t.name,$w=new Set,jw=()=>{$w.clear()},VB=(t,e)=>{let n=e.filter(r=>!$w.has(r));if(n.length){for(let r of n)$w.add(r);tt()&&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.`)}},HB=(t,e,n)=>{let r=null;for(let o in t)if(vo(o)&&(e.has(`methods/${o}`)||n.push(o),!r)){r={};for(let s in t)vo(s)||(r[s]=t[s])}return r||t},UT=(t,e)=>{let n=Tl(t.sharedLibIgnore);return t.sharePages===!1&&n.add("pages"),n.size?new Set([...e,...n]):e},Bw=["functions","methods","snippets"],VT=["components","pages"],CT=Symbol.for("smbls.libraryScope"),Bo="__libraryScopes",Uw=new Map,zB=()=>Math.random().toString(36).slice(2,10)+Date.now().toString(36).slice(-4),Br=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),WB=/const __scope = |const __peers_* = |const _s = el\?\.scope|\?\.context\?\.globalScope\?\./,HT=t=>{try{return Oe(t)}catch{return null}},zT=t=>{if(typeof t!="function")return null;let e=HT(t);return E(e)&&WB.test(e)&&se(e)?e:null},TT=t=>E(t)&&se(t)||zT(t)!==null,qB=t=>{let e=t.globalScope;return A(e)&&Object.keys(e).some(n=>TT(e[n]))?!0:Bw.some(n=>{let r=t[n];return!!r&&typeof r=="object"&&Object.keys(r).some(o=>TT(r[o]))})},KB=(t,e,n)=>{let r=t.globalScope,o=e.globalScope;if(n.has("globalScope")||!A(r)||!A(o)||!qB(e))return 0;let s=0;for(let i of Object.keys(o))n.has(`globalScope/${i}`)||Br(r,i)&&s++;return s},GB=[[/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)?."]],YB=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("")},DE=(t,e)=>{if(!v(t)||!t.includes("__scope = ")&&!t.includes("__peers")&&!t.includes("const _s = ")&&!t.includes("?.context?.globalScope?.")||!Qt(t))return t;let n=`(globalThis[Symbol.for('smbls.libraryScope')] || ((_, v) => v))(${JSON.stringify(e)}, `,r=t;for(let[o,s]of O$){let i=R$(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},_d=(t,e)=>{if(v(t))return DE(t,e);let n=GE(t);return n===null?t:DE(n,e)},P$={lazy:!0,window:globalThis},YE=(t,e)=>{let n=_d(t,e);if(n===t||!v(n))return n;try{let r=ie({v:n},{},P$).v;return typeof r!="function"?n:(Object.defineProperty(r,"toJSON",{value:()=>n,configurable:!0}),r)}catch{return n}},Mb=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},XE=(t,e,n=new WeakMap)=>{if(v(t)||typeof t=="function")return YE(t,e);if(Ma(t)||!Mb(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]=XE(t[o],e,n);return r},L$=(t,e)=>{let n={...t},r={};for(let o of Object.keys(t.globalScope))r[o]=_d(t.globalScope[o],e);n.globalScope=r;for(let o of Fb){let s=t[o];if(!Mb(s))continue;let i={};for(let a of Object.keys(s))i[a]=YE(s[a],e);n[o]=i}for(let o of qE)Mb(t[o])&&(n[o]=XE(t[o],e));return n},IE=new WeakMap,D$=(t,e,n)=>{let r=IE.get(t);r||IE.set(t,r=new Map);let o=r.get(e);if(o)return o;let s=(i,a)=>xr(n,i)&&n[i]===a;return o=new Proxy(t,{get(i,a){if(typeof a=="symbol"||xr(i,a))return Reflect.get(i,a);let c=Reflect.get(i,a);return xr(e,a)&&(c===void 0||s(a,c))||c===void 0?e[a]:c},set(i,a,c){return typeof a!="symbol"&&!xr(i,a)&&xr(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},I$=t=>!!t&&typeof t=="object"&&!!t.__raw&&typeof t.__raw=="object",M$=(t,e)=>{let n=jb.get(t);return n?e===n.consumerGs?n.libGs:I$(e)?D$(e,n.libGs,n.consumerGs):e:e},$$=()=>{typeof globalThis[PE]!="function"&&Object.defineProperty(globalThis,PE,{value:M$,configurable:!0})},wd=t=>{let e=t[yo];return Array.isArray(e)?e:null},Bb=t=>Ze(t)?t.library:t,N$=(t,e,n)=>{let r=wd(t);return!!r&&r.some(o=>o&&o.index===e&&(!o.key||o.key===n.key)&&v(o.id)&&F$(t,o.id))},F$=(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",...Fb,...qE])if(o(t[s]))return!0;return!1},j$=(t,e)=>{let n={};for(let r of Object.keys(t))n[r]=_d(t[r],e);return n},ME=new WeakMap,$c=(t,e=null)=>{let n=t&&wd(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=ME.get(r);s||ME.set(r,s=new Set),$$();let i=0;for(let a of n){if(!a||!v(a.id)||s.has(a.id))continue;let c=Bb(o[a.index]);if(!c||!E(c.globalScope)||a.key&&c.key!==a.key)continue;let l=h=>typeof h=="function"?KE(h):h,f=(h,g)=>{if(h===g)return!0;let p=l(h),m=l(g);return v(p)||v(m)?p===m:JSON.stringify(h)===JSON.stringify(g)},u=E(e)?(Array.isArray(a.landed)?a.landed:[]).filter(h=>v(h)&&xr(c.globalScope,h)&&xr(e,h)&&f(e[h],_d(c.globalScope[h],a.id))):[],d=ao(j$(c.globalScope,a.id));Object.setPrototypeOf(d,r),jb.set(a.id,{libGs:d,consumerGs:r});for(let h of u)r[h]=d[h];s.add(a.id),i++}return i},B$=/^@symbo[-.]ls\//,Ic=t=>t.includes("/")?t.slice(t.indexOf("/")+1):t,Sd=t=>[`@symbo-ls/${t}`,`@symbo.ls/${t}`],Us=(t,e)=>{let n=[];if(!Array.isArray(t))return n;let r=new Map,o=(i,a,c)=>{for(let l of Sd(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=Bb(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&&!B$.test(f))continue;let u=Ic(f);u&&!l.includes(u)&&l.push(u)}l.forEach((f,u)=>{u===0&&c&&Ic(c)===f?o(f,a,!1):s.push([f,a])})}for(let[i,a]of s)o(i,a,!0);return n},Vs=({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}".`)},$E=["functions","methods","snippets"],xd=Symbol.for("smbls.libraryPackages"),Dc=new WeakMap,U$=t=>!!t&&typeof t=="object"&&!Array.isArray(t),V$=t=>({get globalScope(){return t()}}),NE=(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:V$(e)}),Dc.set(r,n),r},FE=t=>!U$(t)||!Dc.has(t)&&Object.prototype.hasOwnProperty.call(t,"context"),Nc=t=>{if(!t||typeof t!="object")return;let e=()=>t.globalScope;for(let r of $E){let o=t[r];FE(o)||Dc.get(o)===t||(t[r]=NE(o,e,t))}if(Array.isArray(t.sharedLibraries)){let r=wd(t)||[];t.sharedLibraries=t.sharedLibraries.map((o,s)=>{let i=Ze(o)&&o&&"library"in o,a=Bb(o);if(!a||typeof a!="object"||a.__isStub||Dc.get(a)===t)return o;let c=r.find(u=>u&&u.index===s&&(!u.key||u.key===a.key)),l=()=>{let u=c&&jb.get(c.id);return u&&u.consumerGs===t.globalScope?u.libGs:t.globalScope},f={...a};for(let u of $E)FE(a[u])||(f[u]=NE(a[u],l,t));return Dc.set(f,t),i?{...o,library:f}:f})}let n=t.globalScope;if(n&&typeof n=="object"){let r={};for(let[o,s]of Us(t.sharedLibraries,Vs))r[o]=s;try{Object.defineProperty(n,xd,{configurable:!0,enumerable:!1,writable:!0,value:r})}catch{}}},z$=(t,e,n,r="library",o=-1)=>{let s=WE(e,n),i=!N$(t,o,e)&&T$(t,e,s)>0?`${r}#${E$()}`:null,a=i?L$(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!==yo&&!f.startsWith("__")&&f!=="app"&&!s.has(f)){if(E(a[f])&&E(t[f])){if(f==="designSystem")Bs(t[f],a[f],s,f);else for(let u in a[f])if(!s.has(`${f}/${u}`)){if(f==="methods"&&eo(u)){u in t[f]||l.push(u);continue}u in t[f]?OE(f,t[f][u])&&!OE(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"?v$(u,s,l):u;t[f]=UE(d,s,f)}}i&&(wd(t)||(t[yo]=[]),t[yo].push({id:i,index:o,key:v(e.key)?e.key:null,landed:Object.keys(a.globalScope).filter(f=>!c.has(f))})),l.length&&k$(r,l)},H$=(t,e,n)=>{if(t!==e){let r=HE(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}]`},W$=`${Db}/default`,q$=t=>v(t)&&t!==""&&bo(t).full===W$,K$=(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},G$=t=>{let e=[],n=[];for(let r=0;r<t.length;r++){let o=t[r],s=o,i=w$;if(Ze(s)&&(i=Mc(s.ignoreList),s=s.library),!E(s))continue;let a={entry:o,lib:s,ignore:i,index:r};q$(K$(o,s))?n.push(a):e.push(a)}return{linked:e,bases:n}},ZE=(t,e,n)=>{let r=RE(e()),{linked:o,bases:s}=G$(t);for(let a of o)n(a);let i=!r.size&&s.length?RE(e()):null;for(let a of s)n(a);return r.size?r:i&&i.size?i:null},Fc=(t,e)=>{if(!e||!e.length)return;let n=t.designSystem,r=ZE(e,()=>t.designSystem,({entry:o,lib:s,ignore:i,index:a})=>z$(t,s,i,H$(o,s,a),a));r&&(t.designSystem!==n&&(t.designSystem={...t.designSystem}),zE(t.designSystem,r))},jc=(t,e,n=Bs)=>{if(!E(t)||!Array.isArray(e)||!e.length)return t;let r=ZE(e,()=>t,({lib:o,ignore:s})=>{let i=o.designSystem;if(!i||typeof i!="object")return;let a=WE(o,s);a.has("designSystem")||n(t,i,a,"designSystem")});return r&&zE(t,r),t}});var Vb,zb,Hb,_o,Wb,Bc,qb,wo,JE=P(()=>{"use strict";Nt();Vb=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},zb=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)}},Hb=t=>t.replace(/[^a-zA-Z0-9_]/g,""),_o=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,"")),Wb=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),Bc=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),qb=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},wo=t=>{if(L(t))return t;if(v(t))return t.split(" ");if(E(t))return Object.values(t);if(oe(t))return[t]}});var Kb,tA=P(()=>{"use strict";Kb=()=>{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 ae,zs,Uc,Vc,eA=P(()=>{"use strict";ae=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},zs=(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(", ")},Uc=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(n=>n.format===t.type);return zs(e,{keepOneX:!1})},Vc=(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:zs(c,{keepOneX:!0})}});let o=n.get(t.type)||[],s=zs(o,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...r,{tag:"img",attr:i}]}});var Hs={};j(Hs,{CDN_PROVIDERS:()=>Ie,DOMQL_EVENTS:()=>ym,DOMQ_PROPERTIES:()=>cr,ELEMENT_METHOD_OVERRIDE_POINTS:()=>_s,ENV:()=>Bm,HTML_TAGS:()=>As,LIBRARY_PACKAGES:()=>xd,LIBRARY_SCOPES_KEY:()=>yo,METHODS:()=>fr,METHODS_EXL:()=>Ra,NODE_ENV:()=>Ge,OPTIONS:()=>rc,PACKAGE_MANAGER_TO_CDN:()=>_r,PARSED_DOMQ_PROPERTIES:()=>Oa,POLYGLOT_LANG_STORAGE_KEY:()=>gd,PROPS_METHODS:()=>lr,REVIVED_MARK:()=>$a,STATE_METHODS:()=>to,STATE_PROPERTIES:()=>gm,SVG_TAGS:()=>gv,TYPES:()=>xa,UNIVERSAL_RESERVED_KEYS:()=>hd,__resetBuiltinMethodWarnings:()=>Nb,addCaching:()=>ju,addContext:()=>Fu,addExtend:()=>ly,addExtends:()=>dn,addItemAfterEveryElement:()=>nm,addProtoToArray:()=>Ea,addRef:()=>Mu,alternateLinkKey:()=>go,applyDependentState:()=>Ty,applyEvent:()=>Wu,applyEventUpdate:()=>qu,applyExtends:()=>bv,applyProps:()=>Xa,arrayContainsOtherArray:()=>Yg,arraysEqual:()=>om,arrayzeValue:()=>wo,bareLibraryKey:()=>Ic,bindLibraryGlobalScopes:()=>$c,buildImgSrcset:()=>Uc,buildSourcesAndImg:()=>Vc,cache:()=>Dy,call:()=>db,captureSnapshot:()=>hb,checkForStateTypes:()=>vy,checkIfInherits:()=>Hu,checkIfStringIsInArray:()=>am,clone:()=>Em,cloneAndMergeArrayExtend:()=>Va,cloneFunction:()=>Km,collectExtendsList:()=>Cs,concatAddExtends:()=>iy,copyJavaScriptToClipboard:()=>zb,copyStringToClipboard:()=>Vb,createBasedOnType:()=>Iu,createElement:()=>ky,createElementExtends:()=>xu,createExtends:()=>Ha,createExtendsFromKeys:()=>Ts,createExtendsStack:()=>Au,createIfConditionFlag:()=>Gm,createInheritedState:()=>Ey,createKey:()=>Ba,createNestedObject:()=>Dm,createNestedObjectByKeyPath:()=>Cy,createObjectWithoutPrototype:()=>hu,createParent:()=>$u,createPath:()=>Nu,createProps:()=>Za,createPropsStack:()=>Lu,createRoot:()=>xy,createScope:()=>Ry,createSnapshotId:()=>ja,customDecodeURIComponent:()=>hm,customEncodeURIComponent:()=>pm,cutArrayAfterValue:()=>tm,cutArrayBeforeValue:()=>Jg,debounce:()=>Ua,debounceOnContext:()=>Wm,decodeNewlines:()=>dm,deepClone:()=>ft,deepContains:()=>Pm,deepDefaults:()=>Bs,deepDestringifyFunctions:()=>ie,deepExtend:()=>Su,deepMerge:()=>ct,deepMergeExtends:()=>pn,deepStringifyFunctions:()=>Da,defineSetter:()=>fb,destringifyGlobalScope:()=>ao,detectHeightOnInit:()=>_b,detectInfiniteLoop:()=>Nm,document:()=>ut,encodeNewlines:()=>um,error:()=>uo,escapeHtml:()=>G,excludeKeysFromObject:()=>jm,exec:()=>ht,exposeBagGlobalScopes:()=>Nc,extendCachedRegistry:()=>ay,extendStackRegistry:()=>Wa,extractArrayExtend:()=>Ka,faviconLinkKey:()=>Sr,fetchLibraryData:()=>kd,fibonacciNumberByIndex:()=>wb,fileEntryUrl:()=>yd,filterArrays:()=>sm,filterArraysFast:()=>im,finalizeExtends:()=>Cu,findClosestNumber:()=>bd,findClosestNumberInFactory:()=>Lb,findInheritedState:()=>zu,findKeyPosition:()=>lm,flattenExtend:()=>Os,formatDate:()=>bb,generateHash:()=>bu,generateHeadArrayTags:()=>js,generateKey:()=>Fa,generateMetaTags:()=>Rb,get:()=>ib,getCDNDirUrl:()=>md,getCDNUrl:()=>Xe,getCapitalCaseKeys:()=>dy,getCdnProviderFromConfig:()=>Ns,getChildStateInKey:()=>Vu,getChildren:()=>lb,getContext:()=>kc,getCookie:()=>Jm,getDB:()=>Tc,getEmotionStylesheet:()=>Kb,getExtendsInElement:()=>fy,getExtendsStack:()=>za,getExtendsStackRegistry:()=>wu,getFrequencyInArray:()=>Xg,getFunctionSource:()=>Se,getHashedExtend:()=>qa,getImportMapScript:()=>yb,getInObjectByPath:()=>$m,getLocalStorage:()=>ey,getNev:()=>Hm,getPageMetadata:()=>Pb,getParentStateInKey:()=>Uu,getPath:()=>yc,getQuery:()=>Oc,getRef:()=>cb,getRoot:()=>wc,getRootContext:()=>xc,getRootData:()=>Sc,getRootState:()=>_c,getRootStateInKey:()=>Bu,getSpreadChildren:()=>py,global:()=>qg,hasFunction:()=>Qt,hasHandlerPlugin:()=>ks,hasOwnProperty:()=>Tm,hashContent:()=>yn,inheritChildExtends:()=>vu,inheritChildPropsExtends:()=>ku,inheritParentProps:()=>Qa,inheritRecursiveChildExtends:()=>Eu,initProps:()=>_y,is:()=>se,isArray:()=>L,isBoolean:()=>iu,isBuiltinElementMethod:()=>mm,isContextComponent:()=>hy,isCyclic:()=>Fm,isDOMNode:()=>re,isDate:()=>cu,isDefined:()=>Lt,isDevelopment:()=>dr,isEmpty:()=>du,isEmptyObject:()=>Om,isEqualDeep:()=>pu,isFailedRevival:()=>so,isFunction:()=>R,isHtmlElement:()=>wa,isLazyFunction:()=>Am,isLocal:()=>zm,isLoudDevRuntime:()=>J,isMalformedDependency:()=>po,isMethod:()=>pb,isMobile:()=>Zm,isNode:()=>On,isNot:()=>Gg,isNotProduction:()=>Rn,isNull:()=>au,isNumber:()=>oe,isObject:()=>E,isObjectLike:()=>q,isPhoto:()=>Sb,isPolyglotRetranslatableKey:()=>nc,isPolyglotWritableKey:()=>lo,isProduction:()=>ur,isProtectedElementMethod:()=>eo,isRevived:()=>io,isStaging:()=>Vm,isState:()=>Ay,isString:()=>v,isStringFunction:()=>xs,isStringTag:()=>Ma,isTest:()=>mu,isTesting:()=>Um,isUndefined:()=>$t,isUniversallyReservedKey:()=>gb,isUnresolvableDependency:()=>wr,isValidDependencyMap:()=>ho,isValidHtmlTag:()=>ry,isWrappedLibrary:()=>Ze,joinArrays:()=>ms,jointStacks:()=>cy,jsonForScript:()=>sc,keys:()=>dd,libraryPackageSpecs:()=>Us,librarySpecsFor:()=>Sd,loadCssFile:()=>Eb,loadJavascript:()=>Ab,loadJavascriptFile:()=>xb,loadJavascriptFileEmbedSync:()=>vb,loadJavascriptFileSync:()=>kb,loadRemoteCSS:()=>Cb,loadRemoteScript:()=>Fs,log:()=>ub,logGroupIf:()=>Xm,logIf:()=>Ym,lookdown:()=>ob,lookdownAll:()=>sb,lookup:()=>rb,lowercaseFirstLetter:()=>Jr,makeObjectWithoutPrototype:()=>Rm,map:()=>vm,mapStringsWithContextComponents:()=>Ga,markPolyglotSeeded:()=>gn,markRevived:()=>Ss,matchesComponentNaming:()=>hn,memoize:()=>qm,merge:()=>vt,mergeSharedLibraries:()=>Fc,mergeSharedLibraryDesignSystems:()=>jc,nextElement:()=>Ec,normalizeIgnoreList:()=>Mc,normalizeLibraryKey:()=>bo,objectToString:()=>Ia,objectizeStringProperty:()=>Ya,overwrite:()=>Na,overwriteDeep:()=>Jt,overwriteShallow:()=>co,overwriteState:()=>Oy,parse:()=>pd,parseDeep:()=>gc,pickupElementFromProps:()=>Ru,pickupPropsFromElement:()=>Ou,polyglotFallbackLang:()=>Rc,polyglotLangStorageKey:()=>Is,polyglotSeededKeys:()=>hr,previousElement:()=>Ac,promoteActiveRootState:()=>Ls,propExists:()=>yy,propertizeElement:()=>Pu,propertizeUpdate:()=>my,remove:()=>pE,removeChars:()=>Hb,removeCookie:()=>ty,removeDuplicateProps:()=>tc,removeDuplicatesInArray:()=>ys,removeFromArray:()=>Zg,removeFromObject:()=>Lm,removeNestedKeyByPath:()=>Im,removeValueFromArray:()=>va,removeValueFromArrayAll:()=>em,reorderArrayByValues:()=>rm,repairLegacyArrowScopePreamble:()=>Pa,replaceLiteralsWithObjectFields:()=>Ft,replaceOctalEscapeSequences:()=>fm,resolveAsset:()=>ae,resolveFileReferences:()=>mo,resolveHandler:()=>vs,resolveSharedLibraries:()=>Ub,returnValueAsText:()=>Du,runPluginHook:()=>pr,scopeElementParam:()=>lu,scopeReceiverExpression:()=>Sm,self:()=>Kg,setActiveRootState:()=>bc,setCookie:()=>Qm,setHashedExtend:()=>_u,setInObjectByPath:()=>Mm,setLocalStorage:()=>ny,setNodeStyles:()=>ud,setProps:()=>ab,setPropsPrototype:()=>Ja,sharedLibrary:()=>$b,splitPackageSpecifier:()=>Pc,spotByPath:()=>mc,srcsetFor:()=>zs,stringIncludesAny:()=>Ca,stringToObject:()=>Cm,stripVersionRangePrefix:()=>Lc,swapItemsInArray:()=>Qg,syncProps:()=>ec,toCamelCase:()=>_o,toDashCase:()=>Bc,toDescriptionCase:()=>qb,toPriorityOrder:()=>Le,toTitleCase:()=>Wb,toggleFullscreen:()=>mb,triggerEventOn:()=>Pn,triggerEventOnUpdate:()=>Py,trimStringFromSymbols:()=>cm,unstackArrayOfObjects:()=>ka,update:()=>by,updateProps:()=>wy,variables:()=>Cc,verbose:()=>Ds,warn:()=>vc,warnLibraryAliasCollision:()=>Vs,window:()=>T});var M=P(()=>{"use strict";gu();yu();Nt();un();Es();bs();Sa();dv();pv();Ta();_a();hv();oy();uy();Sy();Tu();vv();Ov();no();Rv();gE();Iy();mE();Ly();yE();xm();bE();_E();wE();SE();xE();kE();vE();EE();CE();TE();QE();JE();tA();eA()});var cn,Tf,Of,Ih=P(()=>{cn=Object.create(null);cn.open="0";cn.close="1";cn.ping="2";cn.pong="3";cn.message="4";cn.upgrade="5";cn.noop="6";Tf=Object.create(null);Object.keys(cn).forEach(t=>{Tf[cn[t]]=t});Of={type:"error",data:"parser error"}});function LD(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}function $D(t,e){if(DD&&t.data instanceof Blob)return t.data.arrayBuffer().then(LD).then(e);if(ID&&(t.data instanceof ArrayBuffer||MD(t.data)))return e(LD(t.data));Rf(t,!1,n=>{M0||(M0=new TextEncoder),e(M0.encode(n))})}var DD,ID,MD,Rf,PD,M0,ND=P(()=>{Ih();DD=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ID=typeof ArrayBuffer=="function",MD=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Rf=({type:t,data:e},n,r)=>DD&&e instanceof Blob?n?r(e):PD(e,r):ID&&(e instanceof ArrayBuffer||MD(e))?n?r(e):PD(new Blob([e]),r):r(cn[t]+(e||"")),PD=(t,e)=>{let n=new FileReader;return n.onload=function(){let r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)}});var FD,Pf,jD,BD=P(()=>{FD="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pf=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<FD.length;t++)Pf[FD.charCodeAt(t)]=t;jD=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=Pf[t.charCodeAt(r)],i=Pf[t.charCodeAt(r+1)],a=Pf[t.charCodeAt(r+2)],c=Pf[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 e9,Lf,n9,UD,VD=P(()=>{Ih();BD();e9=typeof ArrayBuffer=="function",Lf=(t,e)=>{if(typeof t!="string")return{type:"message",data:UD(t,e)};let n=t.charAt(0);return n==="b"?{type:"message",data:n9(t.substring(1),e)}:Tf[n]?t.length>1?{type:Tf[n],data:t.substring(1)}:{type:Tf[n]}:Of},n9=(t,e)=>{if(e9){let n=jD(t);return UD(n,e)}else return{base64:!0,data:t}},UD=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer});function qD(){return new TransformStream({transform(t,e){$D(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 Mh(t){return t.reduce((e,n)=>e+n.length,0)}function $h(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 KD(t,e){$0||($0=new TextDecoder);let n=[],r=0,o=-1,s=!1;return new TransformStream({transform(i,a){for(n.push(i);;){if(r===0){if(Mh(n)<1)break;let c=$h(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(Mh(n)<2)break;let c=$h(n,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(Mh(n)<8)break;let c=$h(n,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(Of);break}o=f*Math.pow(2,32)+l.getUint32(4),r=3}else{if(Mh(n)<o)break;let c=$h(n,o);a.enqueue(Lf(s?c:$0.decode(c),e)),r=0}if(o===0||o>t){a.enqueue(Of);break}}}})}var zD,HD,WD,$0,N0,Ji=P(()=>{ND();VD();Ih();zD="",HD=(t,e)=>{let n=t.length,r=new Array(n),o=0;t.forEach((s,i)=>{Rf(s,!1,a=>{r[i]=a,++o===n&&e(r.join(zD))})})},WD=(t,e)=>{let n=t.split(zD),r=[];for(let o=0;o<n.length;o++){let s=Lf(n[o],e);if(r.push(s),s.type==="error")break}return r};N0=4});function yt(t){if(t)return r9(t)}function r9(t){for(var e in yt.prototype)t[e]=yt.prototype[e];return t}var ts=P(()=>{yt.prototype.on=yt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};yt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};yt.prototype.off=yt.prototype.removeListener=yt.prototype.removeAllListeners=yt.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};yt.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};yt.prototype.emitReserved=yt.prototype.emit;yt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};yt.prototype.hasListeners=function(t){return!!this.listeners(t).length}});var tr,ne,GD,es=P(()=>{tr=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),ne=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),GD="arraybuffer"});function Nh(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}function er(t,e){e.useNativeTimers?(t.setTimeoutFn=o9.bind(ne),t.clearTimeoutFn=s9.bind(ne)):(t.setTimeoutFn=ne.setTimeout.bind(ne),t.clearTimeoutFn=ne.clearTimeout.bind(ne))}function YD(t){return typeof t=="string"?a9(t):Math.ceil((t.byteLength||t.size)*i9)}function a9(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 Fh(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var o9,s9,i9,ns=P(()=>{es();o9=ne.setTimeout,s9=ne.clearTimeout;i9=1.33});function XD(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function ZD(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 F0=P(()=>{});var jh,nr,Df=P(()=>{Ji();ts();ns();F0();jh=class extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}},nr=class extends yt{constructor(e){super(),this.writable=!1,er(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 jh(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=Lf(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=XD(e);return n.length?"?"+n:""}}});var ta,j0=P(()=>{Df();ns();Ji();ta=class extends nr{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)};WD(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,HD(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]=Fh()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}});var QD,JD,tI=P(()=>{QD=!1;try{QD=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}JD=QD});function c9(){}function eI(){for(let t in Wr.requests)Wr.requests.hasOwnProperty(t)&&Wr.requests[t].abort()}function nI(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||JD))return new XMLHttpRequest}catch{}if(!e)try{return new ne[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var B0,Wr,l9,rr,Bh=P(()=>{j0();ts();ns();es();tI();B0=class extends ta{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}},Wr=class t extends yt{constructor(e,n,r){super(),this.createRequest=e,er(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=Nh(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=c9,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()}};Wr.requestsCount=0;Wr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",eI);else if(typeof addEventListener=="function"){let t="onpagehide"in ne?"pagehide":"unload";addEventListener(t,eI,!1)}}l9=(function(){let t=nI({xdomain:!1});return t&&t.responseType!==null})(),rr=class extends B0{constructor(e){super(e);let n=e&&e.forceBase64;this.supportsBinary=l9&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Wr(nI,this.uri(),e)}}});var rI,V0,U0,or,Uh=P(()=>{Df();ns();Ji();es();rI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",V0=class extends nr{get name(){return"websocket"}doOpen(){let e=this.uri(),n=this.opts.protocols,r=rI?{}:Nh(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;Rf(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}o&&tr(()=>{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]=Fh()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}},U0=ne.WebSocket||ne.MozWebSocket,or=class extends V0{createSocket(e,n,r){return rI?new U0(e,n,r):n?new U0(e,n):new U0(e)}doWrite(e,n){this.ws.send(n)}}});var rs,z0=P(()=>{Df();es();Ji();rs=class extends nr{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=KD(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),o=qD();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&&tr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}});var H0,W0=P(()=>{Bh();Uh();z0();H0={websocket:or,webtransport:rs,polling:rr}});function ea(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=f9.exec(t||""),s={},i=14;for(;i--;)s[u9[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=d9(s,s.path),s.queryKey=p9(s,s.query),s}function d9(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 p9(t,e){let n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,s){o&&(n[o]=s)}),n}var f9,u9,q0=P(()=>{f9=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,u9=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]});var K0,Vh,os,zh,na,G0=P(()=>{W0();ns();F0();q0();ts();Ji();es();K0=typeof addEventListener=="function"&&typeof removeEventListener=="function",Vh=[];K0&&addEventListener("offline",()=>{Vh.forEach(t=>t())},!1);os=class t extends yt{constructor(e,n){if(super(),this.binaryType=GD,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=ea(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=ea(n.host).host);er(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=ZD(this.opts.query)),K0&&(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"})},Vh.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let n=Object.assign({},this.opts.query);n.EIO=N0,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+=YD(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,tr(()=>{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(),K0&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let r=Vh.indexOf(this._offlineEventListener);r!==-1&&Vh.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}};os.protocol=N0;zh=class extends os{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;os.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;os.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}},na=class extends zh{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=>H0[o]).filter(o=>!!o)),super(e,r)}}});var If,oI=P(()=>{j0();If=class extends ta{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 HJ,Hh=P(()=>{G0();G0();Df();W0();ns();q0();es();oI();Bh();Bh();Uh();Uh();z0();HJ=na.protocol});function sI(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=ea(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 iI=P(()=>{Hh()});function $f(t){return h9&&(t instanceof ArrayBuffer||g9(t))||m9&&t instanceof Blob||y9&&t instanceof File}function Mf(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(Mf(t[n]))return!0;return!1}if($f(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Mf(t.toJSON(),!0);for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&Mf(t[n]))return!0;return!1}var h9,g9,aI,m9,y9,Y0=P(()=>{h9=typeof ArrayBuffer=="function",g9=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,aI=Object.prototype.toString,m9=typeof Blob=="function"||typeof Blob<"u"&&aI.call(Blob)==="[object BlobConstructor]",y9=typeof File=="function"||typeof File<"u"&&aI.call(File)==="[object FileConstructor]"});function cI(t){let e=[],n=t.data,r=t;return r.data=X0(n,e),r.attachments=e.length,{packet:r,buffers:e}}function X0(t,e){if(!t)return t;if($f(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]=X0(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]=X0(t[r],e));return n}return t}function lI(t,e){return t.data=Z0(t.data,e),delete t.attachments,t}function Z0(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]=Z0(t[n],e);else if(typeof t=="object")for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=Z0(t[n],e));return t}var fI=P(()=>{Y0()});var dI=Cg((ltt,uI)=>{var ra=1e3,oa=ra*60,sa=oa*60,ss=sa*24,b9=ss*7,_9=ss*365.25;uI.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return w9(t);if(n==="number"&&isFinite(t))return e.long?x9(t):S9(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function w9(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*_9;case"weeks":case"week":case"w":return n*b9;case"days":case"day":case"d":return n*ss;case"hours":case"hour":case"hrs":case"hr":case"h":return n*sa;case"minutes":case"minute":case"mins":case"min":case"m":return n*oa;case"seconds":case"second":case"secs":case"sec":case"s":return n*ra;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function S9(t){var e=Math.abs(t);return e>=ss?Math.round(t/ss)+"d":e>=sa?Math.round(t/sa)+"h":e>=oa?Math.round(t/oa)+"m":e>=ra?Math.round(t/ra)+"s":t+"ms"}function x9(t){var e=Math.abs(t);return e>=ss?Wh(t,e,ss,"day"):e>=sa?Wh(t,e,sa,"hour"):e>=oa?Wh(t,e,oa,"minute"):e>=ra?Wh(t,e,ra,"second"):t+" ms"}function Wh(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}});var hI=Cg((ftt,pI)=>{function k9(t){n.debug=n,n.default=n,n.coerce=c,n.disable=i,n.enable=o,n.enabled=a,n.humanize=dI(),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,h,g;function p(...m){if(!p.enabled)return;let y=p,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 k=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(w,_)=>{if(w==="%%")return"%";k++;let A=n.formatters[_];if(typeof A=="function"){let C=m[k];w=A.call(y,C),m.splice(k,1),k--}return w}),n.formatArgs.call(y,m),(y.log||n.log).apply(y,m)}return p.namespace=f,p.useColors=n.useColors(),p.color=n.selectColor(f),p.extend=r,p.destroy=n.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==n.namespaces&&(h=n.namespaces,g=n.enabled(f)),g),set:m=>{d=m}}),typeof n.init=="function"&&n.init(p),p}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,h=0,g=-1,p=0;for(;d<f.length;)if(h<u.length&&(u[h]===f[d]||u[h]==="*"))u[h]==="*"?(g=h,p=d,h++):(d++,h++);else if(g!==-1)h=g+1,p++,d=p;else return!1;for(;h<u.length&&u[h]==="*";)h++;return h===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}pI.exports=k9});var gI=Cg((ye,qh)=>{ye.formatArgs=E9;ye.save=A9;ye.load=C9;ye.useColors=v9;ye.storage=T9();ye.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`."))}})();ye.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 v9(){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 E9(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+qh.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)}ye.log=console.debug||console.log||(()=>{});function A9(t){try{t?ye.storage.setItem("debug",t):ye.storage.removeItem("debug")}catch{}}function C9(){let t;try{t=ye.storage.getItem("debug")||ye.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function T9(){try{return localStorage}catch{}}qh.exports=hI()(ye);var{formatters:O9}=qh.exports;O9.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var rk={};j(rk,{Decoder:()=>tk,Encoder:()=>J0,PacketType:()=>X,isPacketValid:()=>D9,protocol:()=>nk});function R9(t){return typeof t=="string"}function P9(t){return t===void 0||bI(t)}function Kh(t){return Object.prototype.toString.call(t)==="[object Object]"}function L9(t,e){switch(t){case X.CONNECT:return e===void 0||Kh(e);case X.DISCONNECT:return e===void 0;case X.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&yI.indexOf(e[0])===-1);case X.ACK:return Array.isArray(e);case X.CONNECT_ERROR:return typeof e=="string"||Kh(e);default:return!1}}function D9(t){return R9(t.nsp)&&P9(t.id)&&L9(t.type,t.data)}var mI,Q0,yI,nk,X,J0,tk,ek,bI,Gh=P(()=>{ts();fI();Y0();mI=kM(gI(),1),Q0=(0,mI.default)("socket.io-parser"),yI=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],nk=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"})(X||(X={}));J0=class{constructor(e){this.replacer=e}encode(e){return Q0("encoding packet %j",e),(e.type===X.EVENT||e.type===X.ACK)&&Mf(e)?this.encodeAsBinary({type:e.type===X.EVENT?X.BINARY_EVENT:X.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===X.BINARY_EVENT||e.type===X.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)),Q0("encoded %j as %s",e,n),n}encodeAsBinary(e){let n=cI(e),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}},tk=class t extends yt{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===X.BINARY_EVENT;r||n.type===X.BINARY_ACK?(n.type=r?X.EVENT:X.ACK,this.reconstructor=new ek(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if($f(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(X[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===X.BINARY_EVENT||r.type===X.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(!bI(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 Q0("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 X.CONNECT:return Kh(n);case X.DISCONNECT:return n===void 0;case X.CONNECT_ERROR:return typeof n=="string"||Kh(n);case X.EVENT:case X.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&yI.indexOf(n[0])===-1);case X.ACK:case X.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},ek=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=lI(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};bI=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}});function Re(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var ok=P(()=>{});var I9,is,sk=P(()=>{Gh();ok();ts();I9=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),is=class extends yt{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=[Re(e,"open",this.onopen.bind(this)),Re(e,"packet",this.onpacket.bind(this)),Re(e,"error",this.onerror.bind(this)),Re(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(I9.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:X.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:X.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 X.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 X.EVENT:case X.BINARY_EVENT:this.onevent(e);break;case X.ACK:case X.BINARY_ACK:this.onack(e);break;case X.DISCONNECT:this.ondisconnect();break;case X.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:X.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:X.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 as(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 _I=P(()=>{as.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};as.prototype.reset=function(){this.attempts=0};as.prototype.setMin=function(t){this.ms=t};as.prototype.setMax=function(t){this.max=t};as.prototype.setJitter=function(t){this.jitter=t}});var cs,wI=P(()=>{Hh();sk();Gh();ok();_I();ts();cs=class extends yt{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,er(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 as({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||rk;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 na(this.uri,this.opts);let n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;let o=Re(n,"open",function(){r.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=Re(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(Re(e,"ping",this.onping.bind(this)),Re(e,"data",this.ondata.bind(this)),Re(e,"error",this.onerror.bind(this)),Re(e,"close",this.onclose.bind(this)),Re(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){tr(()=>{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 is(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 SI={};j(SI,{Fetch:()=>If,Manager:()=>cs,NodeWebSocket:()=>or,NodeXHR:()=>rr,Socket:()=>is,WebSocket:()=>or,WebTransport:()=>rs,XHR:()=>rr,connect:()=>Yh,default:()=>Yh,io:()=>Yh,protocol:()=>nk});function Yh(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let n=sI(t,e.path||"/socket.io"),r=n.source,o=n.id,s=n.path,i=Nf[o]&&s in Nf[o].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new cs(r,e):(Nf[o]||(Nf[o]=new cs(r,e)),c=Nf[o]),n.query&&!e.query&&(e.query=n.queryKey),c.socket(n.path,e)}var Nf,xI=P(()=>{iI();wI();sk();Gh();Hh();Nf={};Object.assign(Yh,{Manager:cs,Socket:is,io:Yh,connect:Yh})});var Pk={};j(Pk,{ANIMATION_PROPS:()=>ww,ARIA_ROLES:()=>Uj,ATTR_TRANSFORMS:()=>No,BARE_SEQUENCE_TOKEN_RE:()=>wn,BLOCK_PROPS:()=>Sw,CDN_PROVIDERS:()=>Ie,COMPOUND_CSS_KEYWORDS:()=>xo,CONFIG:()=>Eo,CONFIG_MERGE_EXL:()=>ve,CSS_LONGHAND_SHORTHANDS:()=>Be,CSS_NAMED_COLOR_HEX:()=>vd,CSS_NATIVE_COLOR_REGEX:()=>xe,CSS_PROPS_REGISTRY:()=>mt,CSS_SHORTHAND_LONGHANDS:()=>_t,CSS_UNITS:()=>gs,DEFAULT_CONFIG:()=>Zl,DEFAULT_CSS_PROPERTIES_LIST:()=>Ot,DELEGATED_EVENTS:()=>_i,DESIGN_SYSTEM_OPTIONS:()=>e0,DOMQL_EVENTS:()=>ym,DOMQ_PROPERTIES:()=>cr,DOM_EVENTS:()=>_T,ELEMENT_METHOD_OVERRIDE_POINTS:()=>_s,ENV:()=>Bm,FACTORY:()=>ke,FLEX_PROPS:()=>Aw,FONT_PROPS:()=>xw,GRID_PROPS:()=>Cw,HOST_REGISTERED_PACKAGES:()=>eD,HTML_ATTRIBUTES:()=>qn,HTML_TAGS:()=>As,LIBRARY_PACKAGES:()=>xd,LIBRARY_SCOPES_KEY:()=>yo,LIFECYCLE_EVENTS:()=>Ir,METHODS:()=>fr,METHODS_EXL:()=>Ra,MISC_PROPS:()=>kw,MIXINS:()=>yp,NODE_ENV:()=>Ge,OPTIONS:()=>rc,PACKAGE_MANAGER_TO_CDN:()=>_r,PARSED_DOMQ_PROPERTIES:()=>Oa,POLYGLOT_LANG_STORAGE_KEY:()=>gd,POSITION_PROPS:()=>vw,PROPS_METHODS:()=>lr,REGISTRY:()=>It,RESERVED_STORE_METHODS:()=>Hk,REVIVED_MARK:()=>$a,ROUTER_OPTIONS:()=>ph,SIGNAL_ENGINE_KEY:()=>ps,SIGNAL_INSTANCES_KEY:()=>us,STANDARD_SCHEME_QUERIES:()=>Kd,STATE_PROPERTIES:()=>gm,STORE_METHOD_NAMES:()=>zk,SVG_TAGS:()=>bi,THEME_PROPS:()=>Ew,TIMING_PROPS:()=>Pl,TYPES:()=>xa,UNIVERSAL_RESERVED_KEYS:()=>hd,VALUE_TRANSFORMERS:()=>rp,VERSION:()=>qk,__resetBuiltinMethodWarnings:()=>Nb,__resetSignalEngine:()=>Hg,__resetSignalInstances:()=>Vg,__resetSkinWarnings:()=>W_,__resetStateShadowWarnings:()=>Wk,activateConfig:()=>iA,addCaching:()=>ju,addContext:()=>Fu,addDelegatedEvent:()=>Ol,addExtend:()=>ly,addExtends:()=>dn,addItemAfterEveryElement:()=>nm,addMethods:()=>Ci,addProtoToArray:()=>Ea,addRef:()=>Mu,aliasCaseVariants:()=>Js,alternateLinkKey:()=>go,animation:()=>b_,appendSVGSprite:()=>_l,appendSvgIconsSprite:()=>Po,applyAttrTransforms:()=>eS,applyCSS:()=>zx,applyDependentState:()=>Ty,applyDocument:()=>bl,applyEvent:()=>Wu,applyEventUpdate:()=>qu,applyExtends:()=>Si,applyHeadings:()=>Xd,applyInitialState:()=>Lp,applyMediaSequenceVars:()=>vr,applyProps:()=>Xa,applyReset:()=>wl,applySequenceGlobalVars:()=>ol,applySequenceVars:()=>Nn,applySkins:()=>Sl,applySpacingSequence:()=>cl,applyStateMethods:()=>he,applyTimingSequence:()=>yl,applyTrueProps:()=>Lw,applyTypographySequence:()=>hl,arrayContainsOtherArray:()=>Yg,arraysEqual:()=>om,arrayzeValue:()=>wo,assertEmitIntegrity:()=>fw,bareLibraryKey:()=>Ic,batch:()=>tu,bindLibraryGlobalScopes:()=>$c,breakpoints:()=>m_,buildImgSrcset:()=>Uc,buildSkinVarStyles:()=>Lo,buildSourcesAndImg:()=>Vc,buildThemeVarStyles:()=>sh,cache:()=>Dy,cacheNode:()=>Dr,call:()=>db,callStateMethod:()=>Ml,camelToAttr:()=>Kn,camelToLowerAttr:()=>kT,captureSnapshot:()=>hb,changeGlobalTheme:()=>op,changeLightness:()=>Jb,checkAttributeByTagName:()=>ze,checkEventFunctions:()=>tS,checkForStateTypes:()=>vy,checkIfBoxSize:()=>al,checkIfInherits:()=>Hu,checkIfStringIsInArray:()=>am,class:()=>k_,clone:()=>Em,cloneAndMergeArrayExtend:()=>Va,cloneFunction:()=>Km,collectExtendsList:()=>Cs,color:()=>l_,colorStringToRgbaArray:()=>Me,components:()=>zi,compositeOverBackdrop:()=>ko,concatAddExtends:()=>iy,contrastRatio:()=>Ks,convertSvgToSymbol:()=>il,copyJavaScriptToClipboard:()=>zb,copyStringToClipboard:()=>Vb,create:()=>Ck,createAsync:()=>kU,createBasedOnType:()=>Iu,createComputed:()=>Uk,createConfig:()=>Zc,createDefine:()=>mL,createDomqlElement:()=>jf,createEffect:()=>Y,createElement:()=>ky,createElementExtends:()=>xu,createExtends:()=>Ha,createExtendsFromKeys:()=>Ts,createExtendsStack:()=>Au,createHTMLNode:()=>yi,createIfConditionFlag:()=>Gm,createInheritedState:()=>Ey,createKey:()=>Ba,createNestedObject:()=>Dm,createNestedObjectByKeyPath:()=>Cy,createObjectWithoutPrototype:()=>hu,createParent:()=>$u,createPath:()=>Nu,createProps:()=>Za,createPropsStack:()=>Lu,createRoot:()=>xy,createScope:()=>Ry,createScopeStore:()=>ru,createSignal:()=>Zr,createSkeleton:()=>EU,createSnapshotId:()=>ja,createState:()=>Gw,createStore:()=>An,createSync:()=>vU,css:()=>Te,cssCamelName:()=>Tl,cssMediaVars:()=>Vd,cssPropName:()=>de,cssShorthandDepth:()=>li,cssShorthandStatesLonghand:()=>El,cssVars:()=>Ud,customDecodeURIComponent:()=>hm,customEncodeURIComponent:()=>pm,cutArrayAfterValue:()=>tm,cutArrayBeforeValue:()=>Jg,debounce:()=>Ua,debounceOnContext:()=>Wm,decodeNewlines:()=>dm,deepClone:()=>ft,deepContains:()=>Pm,deepDefaults:()=>Bs,deepDestringifyFunctions:()=>ie,deepExtend:()=>Su,deepMerge:()=>ct,deepMergeExtends:()=>pn,deepStringifyFunctions:()=>Da,defaultDefine:()=>qi,defineResolvedThemeSignal:()=>Qs,defineSetter:()=>fb,defineThemeSignal:()=>Zs,destringifyGlobalScope:()=>ao,destroy:()=>ff,detectHeightOnInit:()=>_b,detectInfiniteLoop:()=>Nm,detectTag:()=>zn,devices:()=>y_,dispose:()=>Wn,encodeNewlines:()=>um,error:()=>uo,escapeHtml:()=>G,excludeKeysFromObject:()=>jm,exec:()=>ht,executeAttr:()=>Xj,exetuteClassPerComponent:()=>kj,exposeBagGlobalScopes:()=>Nc,extendCachedRegistry:()=>ay,extendStackRegistry:()=>Wa,extractArrayExtend:()=>Ka,extractConditionalAttrs:()=>nS,faviconLinkKey:()=>Sr,fetchLibraryData:()=>kd,fibonacciNumberByIndex:()=>wb,fileEntryUrl:()=>yd,filterArrays:()=>sm,filterArraysFast:()=>im,filterAttributesByTagName:()=>Yj,finalizeExtends:()=>Cu,findClosestNumber:()=>bd,findClosestNumberInFactory:()=>Lb,findHeadingLetter:()=>Wd,findHeadings:()=>rl,findInheritedState:()=>zu,findKeyPosition:()=>lm,flattenExtend:()=>Os,font:()=>r_,fontFace:()=>i_,fontFamily:()=>o_,fontFamilyTypes:()=>s_,formatDate:()=>bb,generateHash:()=>bu,generateHeadArrayTags:()=>js,generateKey:()=>Fa,generateMetaTags:()=>Rb,generateSequence:()=>ce,generateSequencePosition:()=>P_,generateSprite:()=>sl,generateSubSequence:()=>el,get:()=>ib,getActiveConfig:()=>O,getActiveDocument:()=>Vn,getActiveLang:()=>Vr,getCDNDirUrl:()=>md,getCDNUrl:()=>Xe,getCacheSize:()=>hw,getCapitalCaseKeys:()=>dy,getCdnProviderFromConfig:()=>Ns,getChildStateInKey:()=>Vu,getChildren:()=>lb,getColor:()=>ot,getColorShade:()=>Od,getContext:()=>kc,getCookie:()=>Jm,getDB:()=>Tc,getDefaultOrFirstKey:()=>In,getEmitStats:()=>pp,getEmotionStylesheet:()=>Kb,getExtendsInElement:()=>fy,getExtendsStack:()=>za,getExtendsStackRegistry:()=>wu,getFnPrefixAndValue:()=>$n,getFontFace:()=>e_,getFontFaceEach:()=>vo,getFontFaceEachString:()=>Nd,getFontFaceString:()=>Kc,getFontFamily:()=>pl,getFontFormat:()=>Md,getFontSizeByKey:()=>gl,getFrequencyInArray:()=>Xg,getFunctionSource:()=>Se,getHashedExtend:()=>qa,getImportMapScript:()=>yb,getInObjectByPath:()=>$m,getLanguages:()=>pf,getLocalStateLang:()=>bf,getLocalStorage:()=>ey,getMediaColor:()=>jt,getMediaTheme:()=>je,getNev:()=>Hm,getObserver:()=>fn,getPageMetadata:()=>Pb,getParentStateInKey:()=>Uu,getPath:()=>yc,getPendingLang:()=>df,getQuery:()=>Oc,getRef:()=>cb,getResolvedThemeSignal:()=>sA,getRgbTone:()=>bn,getRoot:()=>wc,getRootContext:()=>xc,getRootData:()=>Sc,getRootState:()=>_c,getRootStateInKey:()=>Bu,getSafeInk:()=>Gd,getSafeInkInfo:()=>M_,getSequenceValue:()=>Ao,getSequenceValueBySymbols:()=>nl,getSequenceValuePropertyPair:()=>Sn,getShadow:()=>fl,getShapeByKey:()=>ml,getSignals:()=>Vk,getSizeValue:()=>ti,getSpacingBasedOnRatio:()=>Fe,getSpacingByKey:()=>Tt,getSpreadChildren:()=>py,getSubratio:()=>tl,getSubratioDifference:()=>Jc,getSystemGlobalTheme:()=>Oe,getTheme:()=>j_,getThemeSignal:()=>oA,getTimingByKey:()=>le,getTimingFunction:()=>Ae,global:()=>qg,gradient:()=>f_,grid:()=>x_,hasFunction:()=>Qt,hasHandlerPlugin:()=>ks,hasOwnProperty:()=>Tm,hashContent:()=>yn,hexToRgb:()=>Yb,hexToRgbArray:()=>Ed,hexToRgba:()=>Zb,hslToRgb:()=>Td,icons:()=>p_,inheritChildExtends:()=>vu,inheritChildPropsExtends:()=>ku,inheritParentProps:()=>Qa,inheritRecursiveChildExtends:()=>Eu,init:()=>Zn,initPolyglot:()=>mh,initProps:()=>_y,injectGlobal:()=>St,is:()=>se,isArray:()=>L,isBoolean:()=>iu,isBuiltinElementMethod:()=>mm,isCSSVar:()=>Et,isContextComponent:()=>hy,isCyclic:()=>Fm,isDOMNode:()=>re,isDate:()=>cu,isDefined:()=>Lt,isDevelopment:()=>dr,isDomDocument:()=>Cn,isEmpty:()=>du,isEmptyObject:()=>Om,isEnumeratedTrueFalseAttr:()=>Fo,isEqualDeep:()=>pu,isFailedRevival:()=>so,isFunction:()=>R,isGoogleFontsUrl:()=>Gs,isHostObject:()=>Tn,isHtmlElement:()=>wa,isLazyFunction:()=>Am,isLocal:()=>zm,isLoudDevRuntime:()=>J,isMalformedDependency:()=>po,isMethod:()=>pb,isMobile:()=>Zm,isNode:()=>On,isNot:()=>Gg,isNotProduction:()=>Rn,isNull:()=>au,isNumber:()=>oe,isObject:()=>E,isObjectLike:()=>q,isPhoto:()=>Sb,isPlainColor:()=>Cr,isPolyglotRetranslatableKey:()=>nc,isPolyglotWritableKey:()=>lo,isProduction:()=>ur,isProtectedElementMethod:()=>eo,isRawUnitValue:()=>ba,isResolvedColor:()=>Qe,isRevived:()=>io,isScalingUnit:()=>Qr,isStaging:()=>Vm,isState:()=>Ay,isStore:()=>wt,isString:()=>v,isStringFunction:()=>xs,isStringTag:()=>Ma,isSvgTag:()=>Lr,isTest:()=>mu,isTesting:()=>Um,isTracking:()=>Xw,isUndefined:()=>$t,isUniversallyReservedKey:()=>gb,isUnresolvableDependency:()=>wr,isValidDependencyMap:()=>ho,isValidHtmlTag:()=>ry,isValidTag:()=>mi,isWasmLoaded:()=>IP,isWrappedLibrary:()=>Ze,isWritableFamilyBucket:()=>Wg,joinArrays:()=>ms,jointStacks:()=>cy,jsonForScript:()=>sc,keyframes:()=>hi,keys:()=>dd,libraryPackageSpecs:()=>Us,librarySpecsFor:()=>Sd,linearChannelToSrgb:()=>Ld,loadCssFile:()=>Eb,loadJavascript:()=>Ab,loadJavascriptFile:()=>xb,loadJavascriptFileEmbedSync:()=>vb,loadJavascriptFileSync:()=>kb,loadRemoteCSS:()=>Cb,loadRemoteScript:()=>Fs,loadTranslations:()=>gf,loadWasm:()=>DP,log:()=>ub,logGroupIf:()=>Xm,logIf:()=>Ym,lookdown:()=>ob,lookdownAll:()=>sb,lookup:()=>rb,lowercaseFirstLetter:()=>Jr,makeObjectWithoutPrototype:()=>Rm,map:()=>vm,mapStringsWithContextComponents:()=>Ga,markPolyglotSeeded:()=>gn,markRevived:()=>Ss,matchesComponentNaming:()=>hn,media:()=>a_,memoize:()=>qm,merge:()=>vt,mergeSharedLibraries:()=>Fc,mergeSharedLibraryDesignSystems:()=>jc,mixTwoColors:()=>Gb,mixTwoRgb:()=>Qb,mixTwoRgba:()=>Rd,nextElement:()=>Ec,normalizeIgnoreList:()=>Mc,normalizeLibraryKey:()=>bo,numToLetterMap:()=>_n,objectToString:()=>Ia,objectizeStringProperty:()=>Ya,oklabToLinearSrgb:()=>Dd,oklabToOklch:()=>Hc,oklchToGamutSafeSrgb:()=>Wc,oklchToOklab:()=>Id,opacify:()=>qs,overwrite:()=>Na,overwriteDeep:()=>Jt,overwriteShallow:()=>co,overwriteState:()=>Oy,parkHostObject:()=>ar,parse:()=>pd,parseColorToken:()=>Yt,parseDeep:()=>gc,pickupElementFromProps:()=>Ru,pickupPropsFromElement:()=>Ou,polyglotFallbackLang:()=>Rc,polyglotFunctions:()=>Af,polyglotLangStorageKey:()=>Is,polyglotPlugin:()=>Gi,polyglotSeededKeys:()=>hr,popConfig:()=>dt,popStaticCssPass:()=>Ep,prepareContext:()=>Ek,previousElement:()=>Ac,promoteActiveRootState:()=>Ls,propExists:()=>yy,propertizeElement:()=>Pu,propertizeUpdate:()=>my,pushConfig:()=>gt,pushStaticCssPass:()=>vp,quietColorProbe:()=>Co,refreshContextProto:()=>Ti,registerEvent:()=>wi,registerHostPackages:()=>nD,registerSignalInstance:()=>ds,reinit:()=>Vx,relativeLuminance:()=>So,remove:()=>Ai,removeChars:()=>Hb,removeCookie:()=>ty,removeDelegatedEvent:()=>Rl,removeDuplicateProps:()=>tc,removeDuplicatesInArray:()=>ys,removeFromArray:()=>Zg,removeFromObject:()=>Lm,removeNestedKeyByPath:()=>Im,removeValueFromArray:()=>va,removeValueFromArrayAll:()=>em,reorderArrayByValues:()=>rm,repairLegacyArrowScopePreamble:()=>Pa,replaceLiteralsWithObjectFields:()=>Ft,replaceOctalEscapeSequences:()=>fm,resetEmitStats:()=>lw,resolveAsset:()=>ae,resolveBorderValue:()=>Ee,resolveColorRgb:()=>To,resolveColorsInGradient:()=>kl,resolveConfigDocument:()=>hs,resolveDesignSystemClass:()=>VC,resolveFileReferences:()=>mo,resolveFileSource:()=>Jw,resolveFileUrl:()=>$e,resolveGridTracks:()=>$C,resolveHandler:()=>vs,resolvePropValue:()=>$r,resolveShadowValue:()=>Oo,resolveSharedLibraries:()=>Ub,resolveStyleBlockTokens:()=>Iw,returnSubThemeOrDefault:()=>t_,returnValueAsText:()=>Du,rgbArrayToHex:()=>Ad,rgbToHSL:()=>Cd,rgbToHex:()=>Xb,runPluginHook:()=>pr,runThroughMedia:()=>Yd,schemeGuardSelector:()=>Or,schemeMediaQuery:()=>Tr,scopeElementParam:()=>lu,scopeReceiverExpression:()=>Sm,scratchDefaultConfig:()=>Xs,scratchSystem:()=>ii,scratchUtils:()=>Er,self:()=>Kg,semanticIcons:()=>h_,sequence:()=>Mn,serializeAttrValue:()=>En,set:()=>Do,setActiveConfig:()=>zd,setActiveDocument:()=>cw,setActiveRootState:()=>bc,setAdaptiveSchemeVar:()=>Rr,setClass:()=>j4,setClassname:()=>vj,setColor:()=>Ar,setCookie:()=>Qm,setCssEngineHook:()=>oh,setCustomFont:()=>qc,setCustomFontMedia:()=>kr,setEach:()=>G_,setFont:()=>dl,setFontFamily:()=>oi,setFontImport:()=>Ys,setGradient:()=>ei,setHashedExtend:()=>_u,setInCustomFontMedia:()=>$d,setInObjectByPath:()=>Mm,setLang:()=>mf,setLocalStorage:()=>ny,setMediaTheme:()=>ri,setNodeStyles:()=>ud,setObserver:()=>ya,setProps:()=>ab,setPropsPrototype:()=>Ja,setSVG:()=>si,setScalingVar:()=>Qc,setShadow:()=>Pr,setSubScalingVar:()=>Hd,setSvgIcon:()=>Ro,setTheme:()=>ul,setValue:()=>K_,setVariables:()=>L_,setWasmEngine:()=>Cl,settled:()=>nu,shadow:()=>d_,shape:()=>A_,sharedLibrary:()=>$b,sizes:()=>E_,skins:()=>C_,spacing:()=>c_,splitPackageSpecifier:()=>Pc,splitSpacedValue:()=>ll,splitTopLevelCommas:()=>Je,splitTopLevelSpaces:()=>at,splitTransition:()=>np,spotByPath:()=>mc,srcsetFor:()=>zs,srgbChannelToLinear:()=>Pd,srgbToOklab:()=>zc,stringIncludesAny:()=>Ca,stringToObject:()=>Cm,stripVersionRangePrefix:()=>Lc,svg:()=>__,svgData:()=>w_,swapItemsInArray:()=>Qg,syncProps:()=>ec,templates:()=>S_,theme:()=>u_,timing:()=>g_,toCamel:()=>Xc,toCamelCase:()=>_o,toDashCase:()=>Bc,toDescriptionCase:()=>qb,toLinearChannel:()=>Ws,toPriorityOrder:()=>Le,toTitleCase:()=>Wb,toggleFullscreen:()=>mb,transformBackgroundImage:()=>Jd,transformBorder:()=>xn,transformBorderRadius:()=>Fn,transformBoxShadow:()=>xl,transformClassname:()=>HC,transformDuration:()=>vl,transformGridTemplate:()=>ep,transformShadow:()=>Qd,transformSize:()=>At,transformSizeRatio:()=>F,transformTextStroke:()=>Zd,transformTransition:()=>q_,transformersByPrefix:()=>Dw,transfromGap:()=>tp,translate:()=>hf,triggerEventOn:()=>Pn,triggerEventOnUpdate:()=>Py,trimStringFromSymbols:()=>cm,typography:()=>Gc,unit:()=>n_,unstackArrayOfObjects:()=>ka,untrack:()=>eu,update:()=>xi,updateProps:()=>wy,updateVars:()=>F4,upsertTranslation:()=>yf,useCssInProps:()=>Xt,useHostState:()=>Yw,usePropsAsCSS:()=>UC,useSelectorsAsCSS:()=>zC,variables:()=>Cc,vars:()=>v_,verbose:()=>Ds,viewTransition:()=>T_,warn:()=>vc,warnLibraryAliasCollision:()=>Vs,warnStateKeyShadowsMethod:()=>ou,window:()=>T,wrapHoverRule:()=>Un});module.exports=vM(Pk);Mt();var hp={};j(hp,{CSS_LONGHAND_SHORTHANDS:()=>Be,CSS_SHORTHAND_LONGHANDS:()=>_t,assertEmitIntegrity:()=>fw,css:()=>Te,cssCamelName:()=>Tl,cssPropName:()=>de,cssShorthandDepth:()=>li,cssShorthandStatesLonghand:()=>El,getActiveDocument:()=>Vn,getCacheSize:()=>hw,getEmitStats:()=>pp,injectGlobal:()=>St,keyframes:()=>hi,reset:()=>uC,resetEmitStats:()=>lw,setActiveDocument:()=>cw,setWasmEngine:()=>Cl,wrapHoverRule:()=>Un});var Y_={};j(Y_,{BARE_SEQUENCE_TOKEN_RE:()=>wn,COMPOUND_CSS_KEYWORDS:()=>xo,CONFIG:()=>Eo,CONFIG_MERGE_EXL:()=>ve,CSS_NAMED_COLOR_HEX:()=>vd,CSS_NATIVE_COLOR_REGEX:()=>xe,CSS_UNITS:()=>gs,FACTORY:()=>ke,STANDARD_SCHEME_QUERIES:()=>Kd,VALUE_TRANSFORMERS:()=>rp,__resetSkinWarnings:()=>W_,activateConfig:()=>iA,aliasCaseVariants:()=>Js,animation:()=>b_,appendSVGSprite:()=>_l,appendSvgIconsSprite:()=>Po,applyDocument:()=>bl,applyHeadings:()=>Xd,applyMediaSequenceVars:()=>vr,applyReset:()=>wl,applySequenceGlobalVars:()=>ol,applySequenceVars:()=>Nn,applySkins:()=>Sl,applySpacingSequence:()=>cl,applyTimingSequence:()=>yl,applyTypographySequence:()=>hl,breakpoints:()=>m_,buildSkinVarStyles:()=>Lo,changeGlobalTheme:()=>op,changeLightness:()=>Jb,checkIfBoxSize:()=>al,class:()=>k_,color:()=>l_,colorStringToRgbaArray:()=>Me,compositeOverBackdrop:()=>ko,contrastRatio:()=>Ks,convertSvgToSymbol:()=>il,createConfig:()=>Zc,cssMediaVars:()=>Vd,cssVars:()=>Ud,defineResolvedThemeSignal:()=>Qs,defineThemeSignal:()=>Zs,devices:()=>y_,document:()=>nA,findHeadingLetter:()=>Wd,findHeadings:()=>rl,font:()=>r_,fontFace:()=>i_,fontFamily:()=>o_,fontFamilyTypes:()=>s_,generateSequence:()=>ce,generateSequencePosition:()=>P_,generateSprite:()=>sl,generateSubSequence:()=>el,getActiveConfig:()=>O,getColor:()=>ot,getColorShade:()=>Od,getDefaultOrFirstKey:()=>In,getFnPrefixAndValue:()=>$n,getFontFace:()=>e_,getFontFaceEach:()=>vo,getFontFaceEachString:()=>Nd,getFontFaceString:()=>Kc,getFontFamily:()=>pl,getFontFormat:()=>Md,getFontSizeByKey:()=>gl,getMediaColor:()=>jt,getMediaTheme:()=>je,getResolvedThemeSignal:()=>sA,getRgbTone:()=>bn,getSafeInk:()=>Gd,getSafeInkInfo:()=>M_,getSequenceValue:()=>Ao,getSequenceValueBySymbols:()=>nl,getSequenceValuePropertyPair:()=>Sn,getShadow:()=>fl,getShapeByKey:()=>ml,getSizeValue:()=>ti,getSpacingBasedOnRatio:()=>Fe,getSpacingByKey:()=>Tt,getSubratio:()=>tl,getSubratioDifference:()=>Jc,getTheme:()=>j_,getThemeSignal:()=>oA,getTimingByKey:()=>le,getTimingFunction:()=>Ae,gradient:()=>f_,grid:()=>x_,hexToRgb:()=>Yb,hexToRgbArray:()=>Ed,hexToRgba:()=>Zb,hslToRgb:()=>Td,icons:()=>p_,isCSSVar:()=>Et,isDomDocument:()=>Cn,isGoogleFontsUrl:()=>Gs,isHostObject:()=>Tn,isPlainColor:()=>Cr,isRawUnitValue:()=>ba,isResolvedColor:()=>Qe,isScalingUnit:()=>Qr,isWritableFamilyBucket:()=>Wg,linearChannelToSrgb:()=>Ld,media:()=>a_,mixTwoColors:()=>Gb,mixTwoRgb:()=>Qb,mixTwoRgba:()=>Rd,numToLetterMap:()=>_n,oklabToLinearSrgb:()=>Dd,oklabToOklch:()=>Hc,oklchToGamutSafeSrgb:()=>Wc,oklchToOklab:()=>Id,opacify:()=>qs,parkHostObject:()=>ar,parseColorToken:()=>Yt,popConfig:()=>dt,pushConfig:()=>gt,quietColorProbe:()=>Co,relativeLuminance:()=>So,reset:()=>rA,resolveBorderValue:()=>Ee,resolveColorRgb:()=>To,resolveColorsInGradient:()=>kl,resolveConfigDocument:()=>hs,resolveFileUrl:()=>$e,resolveShadowValue:()=>Oo,returnSubThemeOrDefault:()=>t_,rgbArrayToHex:()=>Ad,rgbToHSL:()=>Cd,rgbToHex:()=>Xb,runThroughMedia:()=>Yd,schemeGuardSelector:()=>Or,schemeMediaQuery:()=>Tr,scratchDefaultConfig:()=>Xs,scratchSystem:()=>ii,scratchUtils:()=>Er,semanticIcons:()=>h_,sequence:()=>Mn,set:()=>Do,setActiveConfig:()=>zd,setAdaptiveSchemeVar:()=>Rr,setColor:()=>Ar,setCustomFont:()=>qc,setCustomFontMedia:()=>kr,setEach:()=>G_,setFont:()=>dl,setFontFamily:()=>oi,setFontImport:()=>Ys,setGradient:()=>ei,setInCustomFontMedia:()=>$d,setMediaTheme:()=>ri,setSVG:()=>si,setScalingVar:()=>Qc,setShadow:()=>Pr,setSubScalingVar:()=>Hd,setSvgIcon:()=>Ro,setTheme:()=>ul,setValue:()=>K_,setVariables:()=>L_,shadow:()=>d_,shape:()=>A_,sizes:()=>E_,skins:()=>C_,spacing:()=>c_,splitSpacedValue:()=>ll,splitTopLevelCommas:()=>Je,splitTopLevelSpaces:()=>at,splitTransition:()=>np,srgbChannelToLinear:()=>Pd,srgbToOklab:()=>zc,svg:()=>__,svgData:()=>w_,templates:()=>S_,theme:()=>u_,timing:()=>g_,toCamel:()=>Xc,toLinearChannel:()=>Ws,transformBackgroundImage:()=>Jd,transformBorder:()=>xn,transformBorderRadius:()=>Fn,transformBoxShadow:()=>xl,transformDuration:()=>vl,transformGridTemplate:()=>ep,transformShadow:()=>Qd,transformSize:()=>At,transformSizeRatio:()=>F,transformTextStroke:()=>Zd,transformTransition:()=>q_,transfromGap:()=>tp,typography:()=>Gc,unit:()=>n_,vars:()=>v_,viewTransition:()=>T_});var Er={};j(Er,{BARE_SEQUENCE_TOKEN_RE:()=>wn,COMPOUND_CSS_KEYWORDS:()=>xo,CSS_NAMED_COLOR_HEX:()=>vd,CSS_NATIVE_COLOR_REGEX:()=>xe,CSS_UNITS:()=>gs,applyMediaSequenceVars:()=>vr,applySequenceGlobalVars:()=>ol,applySequenceVars:()=>Nn,changeLightness:()=>Jb,colorStringToRgbaArray:()=>Me,compositeOverBackdrop:()=>ko,contrastRatio:()=>Ks,convertSvgToSymbol:()=>il,findHeadingLetter:()=>Wd,findHeadings:()=>rl,generateSequence:()=>ce,generateSequencePosition:()=>P_,generateSprite:()=>sl,generateSubSequence:()=>el,getColorShade:()=>Od,getDefaultOrFirstKey:()=>In,getFnPrefixAndValue:()=>$n,getFontFace:()=>e_,getFontFaceEach:()=>vo,getFontFaceEachString:()=>Nd,getFontFaceString:()=>Kc,getFontFormat:()=>Md,getRgbTone:()=>bn,getSequenceValue:()=>Ao,getSequenceValueBySymbols:()=>nl,getSequenceValuePropertyPair:()=>Sn,getSizeValue:()=>ti,getSubratio:()=>tl,getSubratioDifference:()=>Jc,hexToRgb:()=>Yb,hexToRgbArray:()=>Ed,hexToRgba:()=>Zb,hslToRgb:()=>Td,isCSSVar:()=>Et,isDomDocument:()=>Cn,isGoogleFontsUrl:()=>Gs,isHostObject:()=>Tn,isRawUnitValue:()=>ba,isResolvedColor:()=>Qe,isScalingUnit:()=>Qr,isWritableFamilyBucket:()=>Wg,linearChannelToSrgb:()=>Ld,mixTwoColors:()=>Gb,mixTwoRgb:()=>Qb,mixTwoRgba:()=>Rd,numToLetterMap:()=>_n,oklabToLinearSrgb:()=>Dd,oklabToOklch:()=>Hc,oklchToGamutSafeSrgb:()=>Wc,oklchToOklab:()=>Id,opacify:()=>qs,parkHostObject:()=>ar,parseColorToken:()=>Yt,relativeLuminance:()=>So,resolveConfigDocument:()=>hs,resolveFileUrl:()=>$e,returnSubThemeOrDefault:()=>t_,rgbArrayToHex:()=>Ad,rgbToHSL:()=>Cd,rgbToHex:()=>Xb,setCustomFont:()=>qc,setCustomFontMedia:()=>kr,setFontImport:()=>Ys,setInCustomFontMedia:()=>$d,setScalingVar:()=>Qc,setSubScalingVar:()=>Hd,setVariables:()=>L_,splitTopLevelCommas:()=>Je,splitTopLevelSpaces:()=>at,srgbChannelToLinear:()=>Pd,srgbToOklab:()=>zc,toLinearChannel:()=>Ws});var Cn=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),Tn=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)},Wg=t=>t!==null&&typeof t=="object"&&!Tn(t),ar=(t,e,n)=>{if(!t)return;if(Cn(n)){t.__domDocument||(t.__domDocument=n);return}let r=`__host_${e}`;t[r]||(t[r]=n)},hs=t=>t?Cn(t.__domDocument)?t.__domDocument:Cn(t.document)?t.document:null:null;var Qr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",gs=["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"],UM=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),VM=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${gs.filter(t=>t!=="auto").map(UM).join("|")})$`),ba=t=>VM.test(String(t).trim());M();var vd={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"},Me=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=vd[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&&ut&&T){let n=ut.body.appendChild(ut.createElement("fictum")),r="rgb(1, 2, 3)";if(n.style.color=r,n.style.color!==r){ut.body.removeChild(n);return}if(n.style.color=t,n.style.color===r||n.style.color==="")return ut.body.removeChild(n),[0,0,0,0];t=T.getComputedStyle(n).color,ut.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]},Gb=(t,e,n=.5)=>(t=Me(t),e=Me(e),Rd(t,e,n)),Yb=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${n},${r},${o})`},Ed=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[n,r,o]},Xb=(t,e,n)=>"#"+(1<<24|t<<16|e<<8|n).toString(16).slice(1),Ad=([t,e,n])=>((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1),Zb=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${n},${r},${o},${e})`},Qb=(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})`},Jb=(t,e)=>{let[n,r,o]=e,s=Math.max(0,Math.min(100,o+parseFloat(t)));return[n,r,s]},Cd=(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]},Td=(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)],Od=(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)},Rd=(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})`},qs=(t,e)=>{let n=Me(t);if(!n){Rn()&&console.warn(t+" color is not rgba");return}return n[3]=e,`rgba(${n})`},Et=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,xo=new Set(["currentcolor","transparent","thin","medium","thick"]),xe=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,X$=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Yt=t=>{if(!v(t))return null;if(xe.test(t))return{passthrough:t};if(Et(t))return{cssVar:t};let e=t.match(X$);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}},Qe=t=>v(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),Je=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},at=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},Ws=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),So=t=>.2126*Ws(t[0])+.7152*Ws(t[1])+.0722*Ws(t[2]),Ks=(t,e)=>{let n=So(t)+.05,r=So(e)+.05;return n>r?n/r:r/n},Pd=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,zc=([t,e,n])=>{let[r,o,s]=[t,e,n].map(Pd),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]},Dd=([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]},Hc=([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]},Id=([t,e,n])=>{let r=n*Math.PI/180;return[t,e*Math.cos(r),e*Math.sin(r)]},Wc=(t,e,n,r=24)=>{let o=a=>Dd(Id([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))))},ko=(t,e=1,n=[255,255,255])=>e>=1?t:t.map((r,o)=>r*e+n[o]*(1-e)),bn=(t,e)=>{v(t)&&t.includes("rgb")&&(t=Me(t).join(", ")),v(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),oe(e)&&(e+="");let n=Ad(t),r=e.slice(0,1);if(r==="-"||r==="+"){let o=Od(n,parseFloat(e));return Ed(o).join(", ")}else{let[o,s,i]=t,[a,c]=Cd(o/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return Td(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var t_=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var $e=(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},In=(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},Md=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},Gs=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),Ys=t=>`@import url('${t}');`,$d=t=>`@font-face { ${t} }`,qc=(t,e,n,r={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=Md(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("")},OT=(t,e)=>{if(!E(t)||!t.includes("__scope = ")&&!t.includes("__peers")&&!t.includes("const _s = ")&&!t.includes("?.context?.globalScope?.")||!se(t))return t;let n=`(globalThis[Symbol.for('smbls.libraryScope')] || ((_, v) => v))(${JSON.stringify(e)}, `,r=t;for(let[o,s]of GB){let i=YB(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},Ip=(t,e)=>{if(E(t))return OT(t,e);let n=zT(t);return n===null?t:OT(n,e)},XB={lazy:!0,window:globalThis},WT=(t,e)=>{let n=Ip(t,e);if(n===t||!E(n))return n;try{let r=ge({v:n},{},XB).v;return typeof r!="function"?n:(Object.defineProperty(r,"toJSON",{value:()=>n,configurable:!0}),r)}catch{return n}},Nw=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},qT=(t,e,n=new WeakMap)=>{if(E(t)||typeof t=="function")return WT(t,e);if(Pc(t)||!Nw(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]=qT(t[o],e,n);return r},ZB=(t,e)=>{let n={...t},r={};for(let o of Object.keys(t.globalScope))r[o]=Ip(t.globalScope[o],e);n.globalScope=r;for(let o of Bw){let s=t[o];if(!Nw(s))continue;let i={};for(let a of Object.keys(s))i[a]=WT(s[a],e);n[o]=i}for(let o of VT)Nw(t[o])&&(n[o]=qT(t[o],e));return n},RT=new WeakMap,JB=(t,e,n)=>{let r=RT.get(t);r||RT.set(t,r=new Map);let o=r.get(e);if(o)return o;let s=(i,a)=>Br(n,i)&&n[i]===a;return o=new Proxy(t,{get(i,a){if(typeof a=="symbol"||Br(i,a))return Reflect.get(i,a);let c=Reflect.get(i,a);return Br(e,a)&&(c===void 0||s(a,c))||c===void 0?e[a]:c},set(i,a,c){return typeof a!="symbol"&&!Br(i,a)&&Br(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},QB=t=>!!t&&typeof t=="object"&&!!t.__raw&&typeof t.__raw=="object",t3=(t,e)=>{let n=Uw.get(t);return n?e===n.consumerGs?n.libGs:QB(e)?JB(e,n.libGs,n.consumerGs):e:e},e3=()=>{typeof globalThis[CT]!="function"&&Object.defineProperty(globalThis,CT,{value:t3,configurable:!0})},Mp=t=>{let e=t[Bo];return Array.isArray(e)?e:null},Vw=t=>cn(t)?t.library:t,n3=(t,e,n)=>{let r=Mp(t);return!!r&&r.some(o=>o&&o.index===e&&(!o.key||o.key===n.key)&&E(o.id)&&r3(t,o.id))},r3=(t,e)=>{let n=JSON.stringify(e),r=new Set,o=s=>{if(E(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",...Bw,...VT])if(o(t[s]))return!0;return!1},o3=(t,e)=>{let n={};for(let r of Object.keys(t))n[r]=Ip(t[r],e);return n},PT=new WeakMap,Ol=(t,e=null)=>{let n=t&&Mp(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=PT.get(r);s||PT.set(r,s=new Set),e3();let i=0;for(let a of n){if(!a||!E(a.id)||s.has(a.id))continue;let c=Vw(o[a.index]);if(!c||!A(c.globalScope)||a.key&&c.key!==a.key)continue;let l=p=>typeof p=="function"?HT(p):p,f=(p,g)=>{if(p===g)return!0;let h=l(p),m=l(g);return E(h)||E(m)?h===m:JSON.stringify(p)===JSON.stringify(g)},u=A(e)?(Array.isArray(a.landed)?a.landed:[]).filter(p=>E(p)&&Br(c.globalScope,p)&&Br(e,p)&&f(e[p],Ip(c.globalScope[p],a.id))):[],d=Ro(o3(c.globalScope,a.id));Object.setPrototypeOf(d,r),Uw.set(a.id,{libGs:d,consumerGs:r});for(let p of u)r[p]=d[p];s.add(a.id),i++}return i},s3=/^@symbo[-.]ls\//,Cl=t=>t.includes("/")?t.slice(t.indexOf("/")+1):t,$p=t=>[`@symbo-ls/${t}`,`@symbo.ls/${t}`],Pi=(t,e)=>{let n=[];if(!Array.isArray(t))return n;let r=new Map,o=(i,a,c)=>{for(let l of $p(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=Vw(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&&!s3.test(f))continue;let u=Cl(f);u&&!l.includes(u)&&l.push(u)}l.forEach((f,u)=>{u===0&&c&&Cl(c)===f?o(f,a,!1):s.push([f,a])})}for(let[i,a]of s)o(i,a,!0);return n},Di=({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}".`)},DT=["functions","methods","snippets"],Np=Symbol.for("smbls.libraryPackages"),Al=new WeakMap,i3=t=>!!t&&typeof t=="object"&&!Array.isArray(t),a3=t=>({get globalScope(){return t()}}),LT=(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:a3(e)}),Al.set(r,n),r},IT=t=>!i3(t)||!Al.has(t)&&Object.prototype.hasOwnProperty.call(t,"context"),Rl=t=>{if(!t||typeof t!="object")return;let e=()=>t.globalScope;for(let r of DT){let o=t[r];IT(o)||Al.get(o)===t||(t[r]=LT(o,e,t))}if(Array.isArray(t.sharedLibraries)){let r=Mp(t)||[];t.sharedLibraries=t.sharedLibraries.map((o,s)=>{let i=cn(o)&&o&&"library"in o,a=Vw(o);if(!a||typeof a!="object"||a.__isStub||Al.get(a)===t)return o;let c=r.find(u=>u&&u.index===s&&(!u.key||u.key===a.key)),l=()=>{let u=c&&Uw.get(c.id);return u&&u.consumerGs===t.globalScope?u.libGs:t.globalScope},f={...a};for(let u of DT)IT(a[u])||(f[u]=LT(a[u],l,t));return Al.set(f,t),i?{...o,library:f}:f})}let n=t.globalScope;if(n&&typeof n=="object"){let r={};for(let[o,s]of Pi(t.sharedLibraries,Di))r[o]=s;try{Object.defineProperty(n,Np,{configurable:!0,enumerable:!1,writable:!0,value:r})}catch{}}},c3=(t,e,n,r="library",o=-1)=>{let s=UT(e,n),i=!n3(t,o,e)&&KB(t,e,s)>0?`${r}#${zB()}`:null,a=i?ZB(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!==Bo&&!f.startsWith("__")&&f!=="app"&&!s.has(f)){if(A(a[f])&&A(t[f])){if(f==="designSystem")Ri(t[f],a[f],s,f);else for(let u in a[f])if(!s.has(`${f}/${u}`)){if(f==="methods"&&vo(u)){u in t[f]||l.push(u);continue}u in t[f]?ET(f,t[f][u])&&!ET(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"?HB(u,s,l):u;t[f]=NT(d,s,f)}}i&&(Mp(t)||(t[Bo]=[]),t[Bo].push({id:i,index:o,key:E(e.key)?e.key:null,landed:Object.keys(a.globalScope).filter(f=>!c.has(f))})),l.length&&VB(r,l)},l3=(t,e,n)=>{if(t!==e){let r=BT(t);if(E(r)&&r)return r;if(t.key||t.name)return t.key||t.name}return e&&(e.key||e.name)||`sharedLibraries[${n}]`},f3=`${Mw}/default`,u3=t=>E(t)&&t!==""&&Uo(t).full===f3,d3=(t,e)=>{if(E(e.key)&&e.key)return e.key;if(t!==e){if(E(t.key)&&t.key)return t.key;if(E(t.name)&&t.name)return t.name}return null},p3=t=>{let e=[],n=[];for(let r=0;r<t.length;r++){let o=t[r],s=o,i=jB;if(cn(s)&&(i=Tl(s.ignoreList),s=s.library),!A(s))continue;let a={entry:o,lib:s,ignore:i,index:r};u3(d3(o,s))?n.push(a):e.push(a)}return{linked:e,bases:n}},KT=(t,e,n)=>{let r=AT(e()),{linked:o,bases:s}=p3(t);for(let a of o)n(a);let i=!r.size&&s.length?AT(e()):null;for(let a of s)n(a);return r.size?r:i&&i.size?i:null},Pl=(t,e)=>{if(!e||!e.length)return;let n=t.designSystem,r=KT(e,()=>t.designSystem,({entry:o,lib:s,ignore:i,index:a})=>c3(t,s,i,l3(o,s,a),a));r&&(t.designSystem!==n&&(t.designSystem={...t.designSystem}),jT(t.designSystem,r))},Dl=(t,e,n=Ri)=>{if(!A(t)||!Array.isArray(e)||!e.length)return t;let r=KT(e,()=>t,({lib:o,ignore:s})=>{let i=o.designSystem;if(!i||typeof i!="object")return;let a=UT(o,s);a.has("designSystem")||n(t,i,a,"designSystem")});return r&&jT(t,r),t}});var Hw,zw,Ww,Vo,qw,Il,Kw,Ho,YT=L(()=>{"use strict";qt();Hw=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},zw=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)}},Ww=t=>t.replace(/[^a-zA-Z0-9_]/g,""),Vo=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,"")),qw=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),Il=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Kw=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},Ho=t=>{if(I(t))return t;if(E(t))return t.split(" ");if(A(t))return Object.values(t);if(pe(t))return[t]}});var Gw,XT=L(()=>{"use strict";Gw=()=>{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 me,Li,Ml,$l,ZT=L(()=>{"use strict";me=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},Li=(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(", ")},Ml=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(n=>n.format===t.type);return Li(e,{keepOneX:!1})},$l=(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:Li(c,{keepOneX:!0})}});let o=n.get(t.type)||[],s=Li(o,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...r,{tag:"img",attr:i}]}});var Nl={};F(Nl,{BRENDER_REGISTRY_BLOCK:()=>El,CDN_PROVIDERS:()=>Be,DOMQL_EVENTS:()=>pb,DOMQ_PROPERTIES:()=>Cr,ELEMENT_METHOD_OVERRIDE_POINTS:()=>ai,ENV:()=>$b,HTML_TAGS:()=>hi,LIBRARY_PACKAGES:()=>Np,LIBRARY_SCOPES_KEY:()=>Bo,METHODS:()=>Or,METHODS_EXL:()=>Ac,NODE_ENV:()=>rn,OPTIONS:()=>Qc,PACKAGE_MANAGER_TO_CDN:()=>Nr,PARSED_DOMQ_PROPERTIES:()=>Ec,POLYGLOT_LANG_STORAGE_KEY:()=>Rp,PROPS_METHODS:()=>Tr,REVIVED_MARK:()=>Dc,STATE_METHODS:()=>ko,STATE_PROPERTIES:()=>ub,SVG_TAGS:()=>sC,TYPES:()=>bc,UNIVERSAL_RESERVED_KEYS:()=>Op,__resetBuiltinMethodWarnings:()=>jw,addCaching:()=>tp,addContext:()=>Qd,addExtend:()=>s_,addExtends:()=>xn,addItemAfterEveryElement:()=>Zy,addProtoToArray:()=>Sc,addRef:()=>Xd,alternateLinkKey:()=>Fo,applyDependentState:()=>v_,applyEvent:()=>ip,applyEventUpdate:()=>ap,applyExtends:()=>cC,applyProps:()=>qc,arrayContainsOtherArray:()=>zy,arraysEqual:()=>Qy,arrayzeValue:()=>Ho,bareLibraryKey:()=>Cl,bindLibraryGlobalScopes:()=>Ol,brenderRegistryBlock:()=>Pw,buildImgSrcset:()=>Ml,buildSourcesAndImg:()=>$l,cache:()=>O_,call:()=>pw,captureSnapshot:()=>gw,checkForStateTypes:()=>w_,checkIfInherits:()=>sp,checkIfStringIsInArray:()=>nb,clone:()=>Sb,cloneAndMergeArrayExtend:()=>Fc,cloneFunction:()=>Hb,collectExtendsList:()=>gi,concatAddExtends:()=>n_,copyJavaScriptToClipboard:()=>zw,copyStringToClipboard:()=>Hw,createBasedOnType:()=>Yd,createElement:()=>__,createElementExtends:()=>Nd,createExtends:()=>Bc,createExtendsFromKeys:()=>mi,createExtendsStack:()=>Ud,createIfConditionFlag:()=>zb,createInheritedState:()=>S_,createKey:()=>$c,createNestedObject:()=>Ob,createNestedObjectByKeyPath:()=>k_,createObjectWithoutPrototype:()=>Od,createParent:()=>Zd,createPath:()=>Jd,createProps:()=>Kc,createPropsStack:()=>Kd,createRoot:()=>b_,createScope:()=>A_,createSnapshotId:()=>Mc,customDecodeURIComponent:()=>fb,customEncodeURIComponent:()=>lb,cutArrayAfterValue:()=>Yy,cutArrayBeforeValue:()=>Gy,debounce:()=>Nc,debounceOnContext:()=>Ub,decodeNewlines:()=>cb,deepClone:()=>pt,deepContains:()=>Cb,deepDefaults:()=>Ri,deepDestringifyFunctions:()=>ge,deepExtend:()=>$d,deepMerge:()=>dt,deepMergeExtends:()=>kn,deepStringifyFunctions:()=>Oc,defineSetter:()=>uw,destringifyGlobalScope:()=>Ro,detectHeightOnInit:()=>ww,detectInfiniteLoop:()=>Lb,document:()=>yt,encodeNewlines:()=>ab,error:()=>Mo,escapeHtml:()=>W,escapeRegExp:()=>rb,excludeKeysFromObject:()=>Mb,exec:()=>St,exposeBagGlobalScopes:()=>Rl,extendCachedRegistry:()=>r_,extendStackRegistry:()=>Uc,extractArrayExtend:()=>Hc,faviconLinkKey:()=>jr,fetchLibraryData:()=>Fp,fibonacciNumberByIndex:()=>Sw,fileEntryUrl:()=>Dp,filterArrays:()=>tb,filterArraysFast:()=>eb,finalizeExtends:()=>Vd,findClosestNumber:()=>Lp,findClosestNumberInFactory:()=>Iw,findInheritedState:()=>op,findKeyPosition:()=>sb,flattenExtend:()=>yi,formatDate:()=>_w,generateHash:()=>Ld,generateHeadArrayTags:()=>Oi,generateKey:()=>Ic,generateMetaTags:()=>Dw,get:()=>aw,getCDNDirUrl:()=>Pp,getCDNUrl:()=>an,getCapitalCaseKeys:()=>c_,getCdnProviderFromConfig:()=>Ci,getChildStateInKey:()=>rp,getChildren:()=>fw,getContext:()=>gl,getCookie:()=>Yb,getDB:()=>wl,getEmotionStylesheet:()=>Gw,getExtendsInElement:()=>i_,getExtendsStack:()=>jc,getExtendsStackRegistry:()=>Md,getFrequencyInArray:()=>Wy,getFunctionSource:()=>Oe,getHashedExtend:()=>Vc,getImportMapScript:()=>bw,getInObjectByPath:()=>Db,getLocalStorage:()=>Zb,getNev:()=>Bb,getPageMetadata:()=>Lw,getParentStateInKey:()=>np,getPath:()=>ll,getQuery:()=>Sl,getRef:()=>lw,getRoot:()=>dl,getRootContext:()=>hl,getRootData:()=>pl,getRootState:()=>ul,getRootStateInKey:()=>ep,getSpreadChildren:()=>l_,global:()=>Uy,hasFunction:()=>se,hasHandlerPlugin:()=>ui,hasOwnProperty:()=>vb,hashContent:()=>Tn,inheritChildExtends:()=>jd,inheritChildPropsExtends:()=>Fd,inheritParentProps:()=>Gc,inheritRecursiveChildExtends:()=>Bd,initProps:()=>g_,is:()=>he,isArray:()=>I,isBoolean:()=>Sd,isBuiltinElementMethod:()=>db,isContextComponent:()=>f_,isCyclic:()=>Ib,isDOMNode:()=>de,isDate:()=>kd,isDefined:()=>jt,isDevelopment:()=>Pr,isEmpty:()=>Cd,isEmptyObject:()=>Eb,isEqualDeep:()=>Td,isFailedRevival:()=>To,isFunction:()=>P,isHtmlElement:()=>mc,isLazyFunction:()=>xb,isLocal:()=>jb,isLoudDevRuntime:()=>tt,isMalformedDependency:()=>$o,isMethod:()=>hw,isMobile:()=>Kb,isNode:()=>qn,isNot:()=>Hy,isNotProduction:()=>Kn,isNull:()=>xd,isNumber:()=>pe,isObject:()=>A,isObjectLike:()=>V,isPhoto:()=>xw,isPolyglotRetranslatableKey:()=>Jc,isPolyglotWritableKey:()=>Do,isProduction:()=>Rr,isProtectedElementMethod:()=>vo,isRevived:()=>Oo,isStaging:()=>Fb,isState:()=>x_,isString:()=>E,isStringFunction:()=>fi,isStringTag:()=>Pc,isTest:()=>Pd,isTesting:()=>Nb,isUndefined:()=>Wt,isUniversallyReservedKey:()=>mw,isUnresolvableDependency:()=>Fr,isValidDependencyMap:()=>No,isValidHtmlTag:()=>Qb,isWrappedLibrary:()=>cn,joinArrays:()=>oi,jointStacks:()=>o_,jsonForScript:()=>Lo,keys:()=>Cp,libraryPackageSpecs:()=>Pi,librarySpecsFor:()=>$p,loadCssFile:()=>Aw,loadJavascript:()=>Cw,loadJavascriptFile:()=>kw,loadJavascriptFileEmbedSync:()=>Ew,loadJavascriptFileSync:()=>vw,loadRemoteCSS:()=>Tw,loadRemoteScript:()=>Ti,log:()=>dw,logGroupIf:()=>qb,logIf:()=>Wb,lookdown:()=>sw,lookdownAll:()=>iw,lookup:()=>ow,lowercaseFirstLetter:()=>xo,makeObjectWithoutPrototype:()=>Ab,map:()=>wb,mapStringsWithContextComponents:()=>zc,markPolyglotSeeded:()=>En,markRevived:()=>li,matchesComponentNaming:()=>vn,memoize:()=>Vb,merge:()=>Tt,mergeSharedLibraries:()=>Pl,mergeSharedLibraryDesignSystems:()=>Dl,nextElement:()=>yl,normalizeIgnoreList:()=>Tl,normalizeLibraryKey:()=>Uo,objectToString:()=>Rc,objectizeStringProperty:()=>Wc,overwrite:()=>Lc,overwriteDeep:()=>ie,overwriteShallow:()=>Po,overwriteState:()=>E_,parse:()=>Tp,parseDeep:()=>al,pickupElementFromProps:()=>Wd,pickupPropsFromElement:()=>zd,polyglotFallbackLang:()=>xl,polyglotLangStorageKey:()=>vi,polyglotSeededKeys:()=>Lr,previousElement:()=>bl,promoteActiveRootState:()=>xi,propExists:()=>p_,propertizeElement:()=>qd,propertizeUpdate:()=>d_,readJsonDataBlock:()=>Io,remove:()=>lT,removeChars:()=>Ww,removeCookie:()=>Xb,removeDuplicateProps:()=>Xc,removeDuplicatesInArray:()=>si,removeFromArray:()=>qy,removeFromObject:()=>Tb,removeNestedKeyByPath:()=>Rb,removeValueFromArray:()=>wc,removeValueFromArrayAll:()=>Xy,reorderArrayByValues:()=>Jy,repairLegacyArrowScopePreamble:()=>Cc,replaceLiteralsWithObjectFields:()=>Kt,replaceOctalEscapeSequences:()=>ib,resolveAsset:()=>me,resolveFileReferences:()=>jo,resolveHandler:()=>di,resolveSharedLibraries:()=>Ll,returnValueAsText:()=>Gd,runPluginHook:()=>Dr,scopeElementParam:()=>vd,scopeReceiverExpression:()=>yb,self:()=>Vy,setActiveRootState:()=>fl,setCookie:()=>Gb,setHashedExtend:()=>Id,setInObjectByPath:()=>Pb,setLocalStorage:()=>Jb,setNodeStyles:()=>Ap,setProps:()=>cw,setPropsPrototype:()=>Yc,sharedLibrary:()=>Fw,splitPackageSpecifier:()=>kl,spotByPath:()=>cl,srcsetFor:()=>Li,stringIncludesAny:()=>kc,stringToObject:()=>kb,stripVersionRangePrefix:()=>vl,swapItemsInArray:()=>Ky,syncProps:()=>Zc,toCamelCase:()=>Vo,toDashCase:()=>Il,toDescriptionCase:()=>Kw,toPriorityOrder:()=>je,toTitleCase:()=>qw,toggleFullscreen:()=>yw,triggerEventOn:()=>Gn,triggerEventOnUpdate:()=>C_,trimStringFromSymbols:()=>ob,unstackArrayOfObjects:()=>_c,update:()=>h_,updateProps:()=>m_,variables:()=>_l,verbose:()=>ki,warn:()=>ml,warnLibraryAliasCollision:()=>Di,window:()=>T});var M=L(()=>{"use strict";Rd();Dd();qt();Sn();pi();ii();yc();nC();rC();vc();gc();oC();t_();a_();y_();Hd();hC();_C();Eo();wC();uT();R_();dT();T_();pT();bb();hT();gT();mT();yT();bT();_T();wT();ST();kT();vT();GT();YT();XT();ZT()});var mn,Pu,Du,Um=L(()=>{mn=Object.create(null);mn.open="0";mn.close="1";mn.ping="2";mn.pong="3";mn.message="4";mn.upgrade="5";mn.noop="6";Pu=Object.create(null);Object.keys(mn).forEach(t=>{Pu[mn[t]]=t});Du={type:"error",data:"parser error"}});function Y2(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}function Q2(t,e){if(X2&&t.data instanceof Blob)return t.data.arrayBuffer().then(Y2).then(e);if(Z2&&(t.data instanceof ArrayBuffer||J2(t.data)))return e(Y2(t.data));Lu(t,!1,n=>{gE||(gE=new TextEncoder),e(gE.encode(n))})}var X2,Z2,J2,Lu,G2,gE,t$=L(()=>{Um();X2=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Z2=typeof ArrayBuffer=="function",J2=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Lu=({type:t,data:e},n,r)=>X2&&e instanceof Blob?n?r(e):G2(e,r):Z2&&(e instanceof ArrayBuffer||J2(e))?n?r(e):G2(new Blob([e]),r):r(mn[t]+(e||"")),G2=(t,e)=>{let n=new FileReader;return n.onload=function(){let r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)}});var e$,Iu,n$,r$=L(()=>{e$="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Iu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<e$.length;t++)Iu[e$.charCodeAt(t)]=t;n$=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=Iu[t.charCodeAt(r)],i=Iu[t.charCodeAt(r+1)],a=Iu[t.charCodeAt(r+2)],c=Iu[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 n8,Mu,r8,o$,s$=L(()=>{Um();r$();n8=typeof ArrayBuffer=="function",Mu=(t,e)=>{if(typeof t!="string")return{type:"message",data:o$(t,e)};let n=t.charAt(0);return n==="b"?{type:"message",data:r8(t.substring(1),e)}:Pu[n]?t.length>1?{type:Pu[n],data:t.substring(1)}:{type:Pu[n]}:Du},r8=(t,e)=>{if(n8){let n=n$(t);return o$(n,e)}else return{base64:!0,data:t}},o$=(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){Q2(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 Vm(t){return t.reduce((e,n)=>e+n.length,0)}function Hm(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 f$(t,e){mE||(mE=new TextDecoder);let n=[],r=0,o=-1,s=!1;return new TransformStream({transform(i,a){for(n.push(i);;){if(r===0){if(Vm(n)<1)break;let c=Hm(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(Vm(n)<2)break;let c=Hm(n,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(Vm(n)<8)break;let c=Hm(n,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(Du);break}o=f*Math.pow(2,32)+l.getUint32(4),r=3}else{if(Vm(n)<o)break;let c=Hm(n,o);a.enqueue(Mu(s?c:mE.decode(c),e)),r=0}if(o===0||o>t){a.enqueue(Du);break}}}})}var i$,a$,c$,mE,yE,Ka=L(()=>{t$();s$();Um();i$="",a$=(t,e)=>{let n=t.length,r=new Array(n),o=0;t.forEach((s,i)=>{Lu(s,!1,a=>{r[i]=a,++o===n&&e(r.join(i$))})})},c$=(t,e)=>{let n=t.split(i$),r=[];for(let o=0;o<n.length;o++){let s=Mu(n[o],e);if(r.push(s),s.type==="error")break}return r};yE=4});function vt(t){if(t)return o8(t)}function o8(t){for(var e in vt.prototype)t[e]=vt.prototype[e];return t}var Us=L(()=>{vt.prototype.on=vt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};vt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};vt.prototype.off=vt.prototype.removeListener=vt.prototype.removeAllListeners=vt.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};vt.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};vt.prototype.emitReserved=vt.prototype.emit;vt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};vt.prototype.hasListeners=function(t){return!!this.listeners(t).length}});var _r,ue,u$,Vs=L(()=>{_r=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),ue=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),u$="arraybuffer"});function zm(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}function wr(t,e){e.useNativeTimers?(t.setTimeoutFn=s8.bind(ue),t.clearTimeoutFn=i8.bind(ue)):(t.setTimeoutFn=ue.setTimeout.bind(ue),t.clearTimeoutFn=ue.clearTimeout.bind(ue))}function d$(t){return typeof t=="string"?c8(t):Math.ceil((t.byteLength||t.size)*a8)}function c8(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 Wm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var s8,i8,a8,Hs=L(()=>{Vs();s8=ue.setTimeout,i8=ue.clearTimeout;a8=1.33});function p$(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function h$(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 bE=L(()=>{});var qm,Sr,$u=L(()=>{Ka();Us();Hs();bE();qm=class extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}},Sr=class extends vt{constructor(e){super(),this.writable=!1,wr(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 qm(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=Mu(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=p$(e);return n.length?"?"+n:""}}});var Ga,_E=L(()=>{$u();Hs();Ka();Ga=class extends Sr{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)};c$(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,a$(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]=Wm()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}});var g$,m$,y$=L(()=>{g$=!1;try{g$=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}m$=g$});function l8(){}function b$(){for(let t in ho.requests)ho.requests.hasOwnProperty(t)&&ho.requests[t].abort()}function _$(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||m$))return new XMLHttpRequest}catch{}if(!e)try{return new ue[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var wE,ho,f8,xr,Km=L(()=>{_E();Us();Hs();Vs();y$();wE=class extends Ga{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}},ho=class t extends vt{constructor(e,n,r){super(),this.createRequest=e,wr(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=zm(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=l8,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()}};ho.requestsCount=0;ho.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",b$);else if(typeof addEventListener=="function"){let t="onpagehide"in ue?"pagehide":"unload";addEventListener(t,b$,!1)}}f8=(function(){let t=_$({xdomain:!1});return t&&t.responseType!==null})(),xr=class extends wE{constructor(e){super(e);let n=e&&e.forceBase64;this.supportsBinary=f8&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new ho(_$,this.uri(),e)}}});var w$,xE,SE,kr,Gm=L(()=>{$u();Hs();Ka();Vs();w$=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",xE=class extends Sr{get name(){return"websocket"}doOpen(){let e=this.uri(),n=this.opts.protocols,r=w$?{}:zm(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;Lu(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}o&&_r(()=>{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]=Wm()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}},SE=ue.WebSocket||ue.MozWebSocket,kr=class extends xE{createSocket(e,n,r){return w$?new SE(e,n,r):n?new SE(e,n):new SE(e)}doWrite(e,n){this.ws.send(n)}}});var zs,kE=L(()=>{$u();Vs();Ka();zs=class extends Sr{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=f$(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&&_r(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}});var vE,EE=L(()=>{Km();Gm();kE();vE={websocket:kr,webtransport:zs,polling:xr}});function Ya(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=u8.exec(t||""),s={},i=14;for(;i--;)s[d8[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=p8(s,s.path),s.queryKey=h8(s,s.query),s}function p8(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 h8(t,e){let n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,s){o&&(n[o]=s)}),n}var u8,d8,AE=L(()=>{u8=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,d8=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]});var CE,Ym,Ws,Xm,Xa,TE=L(()=>{EE();Hs();bE();AE();Us();Ka();Vs();CE=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ym=[];CE&&addEventListener("offline",()=>{Ym.forEach(t=>t())},!1);Ws=class t extends vt{constructor(e,n){if(super(),this.binaryType=u$,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=Ya(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=Ya(n.host).host);wr(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=h$(this.opts.query)),CE&&(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"})},Ym.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let n=Object.assign({},this.opts.query);n.EIO=yE,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+=d$(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,_r(()=>{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(),CE&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let r=Ym.indexOf(this._offlineEventListener);r!==-1&&Ym.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}};Ws.protocol=yE;Xm=class extends Ws{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;Ws.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;Ws.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}},Xa=class extends Xm{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=>vE[o]).filter(o=>!!o)),super(e,r)}}});var Nu,S$=L(()=>{_E();Nu=class extends Ga{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 cct,Zm=L(()=>{TE();TE();$u();EE();Hs();AE();Vs();S$();Km();Km();Gm();Gm();kE();cct=Xa.protocol});function x$(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=Ya(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 k$=L(()=>{Zm()});function ju(t){return g8&&(t instanceof ArrayBuffer||m8(t))||y8&&t instanceof Blob||b8&&t instanceof File}function Fu(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(Fu(t[n]))return!0;return!1}if(ju(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Fu(t.toJSON(),!0);for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&Fu(t[n]))return!0;return!1}var g8,m8,v$,y8,b8,OE=L(()=>{g8=typeof ArrayBuffer=="function",m8=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,v$=Object.prototype.toString,y8=typeof Blob=="function"||typeof Blob<"u"&&v$.call(Blob)==="[object BlobConstructor]",b8=typeof File=="function"||typeof File<"u"&&v$.call(File)==="[object FileConstructor]"});function E$(t){let e=[],n=t.data,r=t;return r.data=RE(n,e),r.attachments=e.length,{packet:r,buffers:e}}function RE(t,e){if(!t)return t;if(ju(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]=RE(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]=RE(t[r],e));return n}return t}function A$(t,e){return t.data=PE(t.data,e),delete t.attachments,t}function PE(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]=PE(t[n],e);else if(typeof t=="object")for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=PE(t[n],e));return t}var C$=L(()=>{OE()});var O$=Sy((Cct,T$)=>{var Za=1e3,Ja=Za*60,Qa=Ja*60,qs=Qa*24,_8=qs*7,w8=qs*365.25;T$.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return S8(t);if(n==="number"&&isFinite(t))return e.long?k8(t):x8(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function S8(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*w8;case"weeks":case"week":case"w":return n*_8;case"days":case"day":case"d":return n*qs;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Qa;case"minutes":case"minute":case"mins":case"min":case"m":return n*Ja;case"seconds":case"second":case"secs":case"sec":case"s":return n*Za;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function x8(t){var e=Math.abs(t);return e>=qs?Math.round(t/qs)+"d":e>=Qa?Math.round(t/Qa)+"h":e>=Ja?Math.round(t/Ja)+"m":e>=Za?Math.round(t/Za)+"s":t+"ms"}function k8(t){var e=Math.abs(t);return e>=qs?Jm(t,e,qs,"day"):e>=Qa?Jm(t,e,Qa,"hour"):e>=Ja?Jm(t,e,Ja,"minute"):e>=Za?Jm(t,e,Za,"second"):t+" ms"}function Jm(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}});var P$=Sy((Tct,R$)=>{function v8(t){n.debug=n,n.default=n,n.coerce=c,n.disable=i,n.enable=o,n.enabled=a,n.humanize=O$(),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,_=Number(new Date),S=_-(u||_);y.diff=S,y.prev=u,y.curr=_,u=_,m[0]=n.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let v=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(w,b)=>{if(w==="%%")return"%";v++;let k=n.formatters[b];if(typeof k=="function"){let C=m[v];w=k.call(y,C),m.splice(v,1),v--}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}R$.exports=v8});var D$=Sy((Ee,Qm)=>{Ee.formatArgs=A8;Ee.save=C8;Ee.load=T8;Ee.useColors=E8;Ee.storage=O8();Ee.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`."))}})();Ee.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 E8(){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 A8(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Qm.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)}Ee.log=console.debug||console.log||(()=>{});function C8(t){try{t?Ee.storage.setItem("debug",t):Ee.storage.removeItem("debug")}catch{}}function T8(){let t;try{t=Ee.storage.getItem("debug")||Ee.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function O8(){try{return localStorage}catch{}}Qm.exports=P$()(Ee);var{formatters:R8}=Qm.exports;R8.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var NE={};F(NE,{Decoder:()=>IE,Encoder:()=>LE,PacketType:()=>Z,isPacketValid:()=>I8,protocol:()=>$E});function P8(t){return typeof t=="string"}function D8(t){return t===void 0||M$(t)}function ty(t){return Object.prototype.toString.call(t)==="[object Object]"}function L8(t,e){switch(t){case Z.CONNECT:return e===void 0||ty(e);case Z.DISCONNECT:return e===void 0;case Z.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&I$.indexOf(e[0])===-1);case Z.ACK:return Array.isArray(e);case Z.CONNECT_ERROR:return typeof e=="string"||ty(e);default:return!1}}function I8(t){return P8(t.nsp)&&D8(t.id)&&L8(t.type,t.data)}var L$,DE,I$,$E,Z,LE,IE,ME,M$,ey=L(()=>{Us();C$();OE();L$=MF(D$(),1),DE=(0,L$.default)("socket.io-parser"),I$=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],$E=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"})(Z||(Z={}));LE=class{constructor(e){this.replacer=e}encode(e){return DE("encoding packet %j",e),(e.type===Z.EVENT||e.type===Z.ACK)&&Fu(e)?this.encodeAsBinary({type:e.type===Z.EVENT?Z.BINARY_EVENT:Z.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===Z.BINARY_EVENT||e.type===Z.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)),DE("encoded %j as %s",e,n),n}encodeAsBinary(e){let n=E$(e),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}},IE=class t extends vt{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===Z.BINARY_EVENT;r||n.type===Z.BINARY_ACK?(n.type=r?Z.EVENT:Z.ACK,this.reconstructor=new ME(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(ju(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(Z[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Z.BINARY_EVENT||r.type===Z.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(!M$(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 DE("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 Z.CONNECT:return ty(n);case Z.DISCONNECT:return n===void 0;case Z.CONNECT_ERROR:return typeof n=="string"||ty(n);case Z.EVENT:case Z.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&I$.indexOf(n[0])===-1);case Z.ACK:case Z.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},ME=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=A$(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};M$=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}});function Ne(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var FE=L(()=>{});var M8,Ks,jE=L(()=>{ey();FE();Us();M8=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Ks=class extends vt{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=[Ne(e,"open",this.onopen.bind(this)),Ne(e,"packet",this.onpacket.bind(this)),Ne(e,"error",this.onerror.bind(this)),Ne(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(M8.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:Z.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:Z.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 Z.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 Z.EVENT:case Z.BINARY_EVENT:this.onevent(e);break;case Z.ACK:case Z.BINARY_ACK:this.onack(e);break;case Z.DISCONNECT:this.ondisconnect();break;case Z.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:Z.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:Z.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 Gs(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 $$=L(()=>{Gs.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};Gs.prototype.reset=function(){this.attempts=0};Gs.prototype.setMin=function(t){this.ms=t};Gs.prototype.setMax=function(t){this.max=t};Gs.prototype.setJitter=function(t){this.jitter=t}});var Ys,N$=L(()=>{Zm();jE();ey();FE();$$();Us();Ys=class extends vt{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,wr(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 Gs({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||NE;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 Xa(this.uri,this.opts);let n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;let o=Ne(n,"open",function(){r.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=Ne(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(Ne(e,"ping",this.onping.bind(this)),Ne(e,"data",this.ondata.bind(this)),Ne(e,"error",this.onerror.bind(this)),Ne(e,"close",this.onclose.bind(this)),Ne(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){_r(()=>{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 Ks(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 F$={};F(F$,{Fetch:()=>Nu,Manager:()=>Ys,NodeWebSocket:()=>kr,NodeXHR:()=>xr,Socket:()=>Ks,WebSocket:()=>kr,WebTransport:()=>zs,XHR:()=>xr,connect:()=>ny,default:()=>ny,io:()=>ny,protocol:()=>$E});function ny(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let n=x$(t,e.path||"/socket.io"),r=n.source,o=n.id,s=n.path,i=Bu[o]&&s in Bu[o].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new Ys(r,e):(Bu[o]||(Bu[o]=new Ys(r,e)),c=Bu[o]),n.query&&!e.query&&(e.query=n.queryKey),c.socket(n.path,e)}var Bu,j$=L(()=>{k$();N$();jE();ey();Zm();Bu={};Object.assign(ny,{Manager:Ys,Socket:Ks,io:ny,connect:ny})});var SA={};F(SA,{ANIMATION_PROPS:()=>Tx,ARIA_ROLES:()=>C6,ATTR_TRANSFORMS:()=>gs,BARE_SEQUENCE_TOKEN_RE:()=>Pn,BLOCK_PROPS:()=>Ox,BRENDER_REGISTRY_BLOCK:()=>El,CDN_PROVIDERS:()=>Be,COMPOUND_CSS_KEYWORDS:()=>Wo,CONFIG:()=>Yo,CONFIG_MERGE_EXL:()=>Pe,CSS_LONGHAND_SHORTHANDS:()=>qe,CSS_NAMED_COLOR_HEX:()=>Mi,CSS_NATIVE_COLOR_REGEX:()=>Ur,CSS_PROPS_REGISTRY:()=>kt,CSS_SHORTHAND_LONGHANDS:()=>xt,CSS_UNITS:()=>ri,DEFAULT_CONFIG:()=>iu,DEFAULT_CSS_PROPERTIES_LIST:()=>Nt,DELEGATED_EVENTS:()=>ca,DESIGN_SYSTEM_OPTIONS:()=>JE,DOMQL_EVENTS:()=>pb,DOMQ_PROPERTIES:()=>Cr,DOM_EVENTS:()=>xR,ELEMENT_METHOD_OVERRIDE_POINTS:()=>ai,ENV:()=>$b,FACTORY:()=>Re,FLEX_PROPS:()=>Ix,FONT_PROPS:()=>Rx,GRID_PROPS:()=>Mx,HOST_REGISTERED_PACKAGES:()=>gF,HTML_ATTRIBUTES:()=>fr,HTML_TAGS:()=>hi,LIBRARY_PACKAGES:()=>Np,LIBRARY_SCOPES_KEY:()=>Bo,LIFECYCLE_EVENTS:()=>Ln,METHODS:()=>Or,METHODS_EXL:()=>Ac,MISC_PROPS:()=>Px,MIXINS:()=>Lh,NODE_ENV:()=>rn,OPTIONS:()=>Qc,PACKAGE_MANAGER_TO_CDN:()=>Nr,PARSED_DOMQ_PROPERTIES:()=>Ec,POLYGLOT_LANG_STORAGE_KEY:()=>Rp,POSITION_PROPS:()=>Dx,PROPS_METHODS:()=>Tr,REGISTRY:()=>Ht,RESERVED_STORE_METHODS:()=>IA,REVIVED_MARK:()=>Dc,ROUTER_OPTIONS:()=>fy,SIGNAL_ENGINE_KEY:()=>ti,SIGNAL_INSTANCES_KEY:()=>Js,STANDARD_SCHEME_QUERIES:()=>ch,STATE_PROPERTIES:()=>ub,STORE_METHOD_NAMES:()=>LA,SVG_TAGS:()=>ga,THEME_PROPS:()=>Lx,TIMING_PROPS:()=>If,TYPES:()=>bc,UNIVERSAL_RESERVED_KEYS:()=>Op,VALUE_TRANSFORMERS:()=>Sh,VERSION:()=>$A,__resetBuiltinMethodWarnings:()=>jw,__resetSignalEngine:()=>jy,__resetSignalInstances:()=>Ny,__resetSkinWarnings:()=>qS,__resetStateShadowWarnings:()=>MA,activateConfig:()=>n1,addCaching:()=>tp,addContext:()=>Qd,addDelegatedEvent:()=>Rf,addExtend:()=>s_,addExtends:()=>xn,addItemAfterEveryElement:()=>Zy,addMethods:()=>_a,addProtoToArray:()=>Sc,addRef:()=>Xd,aliasCaseVariants:()=>Wi,alternateLinkKey:()=>Fo,animation:()=>_S,appendSVGSprite:()=>wf,appendSvgIconsSprite:()=>rs,applyAttrTransforms:()=>i0,applyCSS:()=>kv,applyDependentState:()=>v_,applyDocument:()=>_f,applyEvent:()=>ip,applyEventUpdate:()=>ap,applyExtends:()=>da,applyHeadings:()=>ph,applyInitialState:()=>Qh,applyMediaSequenceVars:()=>Hr,applyProps:()=>qc,applyReset:()=>Sf,applySequenceGlobalVars:()=>ef,applySequenceVars:()=>nr,applySkins:()=>xf,applySpacingSequence:()=>af,applyStateMethods:()=>ke,applyTimingSequence:()=>bf,applyTrueProps:()=>Bx,applyTypographySequence:()=>gf,arrayContainsOtherArray:()=>zy,arraysEqual:()=>Qy,arrayzeValue:()=>Ho,assertEmitIntegrity:()=>px,atSchemes:()=>Kr,bareLibraryKey:()=>Cl,batch:()=>md,bindLibraryGlobalScopes:()=>Ol,breakpoints:()=>yS,brenderRegistryBlock:()=>Pw,buildImgSrcset:()=>Ml,buildSkinVarStyles:()=>os,buildSourcesAndImg:()=>$l,buildThemeVarStyles:()=>Zg,cache:()=>O_,cacheNode:()=>Xr,call:()=>pw,callStateMethod:()=>jf,camelToAttr:()=>ur,camelToLowerAttr:()=>AR,captureSnapshot:()=>gw,changeGlobalTheme:()=>xh,changeLightness:()=>tS,checkAttributeByTagName:()=>Xe,checkEventFunctions:()=>s0,checkForStateTypes:()=>w_,checkIfBoxSize:()=>sf,checkIfInherits:()=>sp,checkIfStringIsInArray:()=>nb,class:()=>vS,clone:()=>Sb,cloneAndMergeArrayExtend:()=>Fc,cloneFunction:()=>Hb,collectExtendsList:()=>gi,color:()=>fS,colorPairSchemes:()=>of,colorStringToRgbaArray:()=>Ue,components:()=>Fa,compositeOverBackdrop:()=>Ko,compoundLayers:()=>Ni,concatAddExtends:()=>n_,contrastRatio:()=>ji,convertSvgToSymbol:()=>rf,copyJavaScriptToClipboard:()=>zw,copyStringToClipboard:()=>Hw,countUntrackedReads:()=>bd,create:()=>yA,createAsync:()=>$7,createBasedOnType:()=>Yd,createComputed:()=>PA,createConfig:()=>Gl,createDefine:()=>bN,createDomqlElement:()=>td,createEffect:()=>z,createElement:()=>__,createElementExtends:()=>Nd,createExtends:()=>Bc,createExtendsFromKeys:()=>mi,createExtendsStack:()=>Ud,createHTMLNode:()=>ha,createIfConditionFlag:()=>zb,createInheritedState:()=>S_,createKey:()=>$c,createNestedObject:()=>Ob,createNestedObjectByKeyPath:()=>k_,createObjectWithoutPrototype:()=>Od,createParent:()=>Zd,createPath:()=>Jd,createPristineConfig:()=>oh,createProps:()=>Kc,createPropsStack:()=>Kd,createRoot:()=>b_,createScope:()=>A_,createScopeStore:()=>_d,createSignal:()=>nn,createSkeleton:()=>F7,createSnapshotId:()=>Mc,createState:()=>Qx,createStore:()=>Hn,createSync:()=>N7,css:()=>Ie,cssCamelName:()=>Of,cssMediaVars:()=>nh,cssPropName:()=>Se,cssShorthandDepth:()=>ea,cssShorthandStatesLonghand:()=>na,cssShorthandStatesThemeLonghand:()=>Af,cssVars:()=>eh,customDecodeURIComponent:()=>fb,customEncodeURIComponent:()=>lb,cutArrayAfterValue:()=>Yy,cutArrayBeforeValue:()=>Gy,debounce:()=>Nc,debounceOnContext:()=>Ub,decodeNewlines:()=>cb,deepClone:()=>pt,deepContains:()=>Cb,deepDefaults:()=>Ri,deepDestringifyFunctions:()=>ge,deepExtend:()=>$d,deepMerge:()=>dt,deepMergeExtends:()=>kn,deepStringifyFunctions:()=>Oc,defaultDefine:()=>ec,defineResolvedThemeSignal:()=>zi,defineSetter:()=>uw,defineThemeSignal:()=>Hi,destringifyGlobalScope:()=>Ro,destroy:()=>Vu,detectHeightOnInit:()=>ww,detectInfiniteLoop:()=>Lb,detectTag:()=>Mn,devices:()=>bS,dispose:()=>Fn,encodeNewlines:()=>ab,error:()=>Mo,escapeHtml:()=>W,escapeRegExp:()=>rb,excludeKeysFromObject:()=>Mb,exec:()=>St,executeAttr:()=>$6,exetuteClassPerComponent:()=>s6,exposeBagGlobalScopes:()=>Rl,extendCachedRegistry:()=>r_,extendStackRegistry:()=>Uc,extractArrayExtend:()=>Hc,extractConditionalAttrs:()=>a0,faviconLinkKey:()=>jr,fetchLibraryData:()=>Fp,fibonacciNumberByIndex:()=>Sw,fileEntryUrl:()=>Dp,filterArrays:()=>tb,filterArraysFast:()=>eb,filterAttributesByTagName:()=>M6,finalizeExtends:()=>Vd,findClosestNumber:()=>Lp,findClosestNumberInFactory:()=>Iw,findHeadingLetter:()=>ih,findHeadings:()=>tf,findInheritedState:()=>op,findKeyPosition:()=>sb,flattenExtend:()=>yi,font:()=>oS,fontFace:()=>aS,fontFamily:()=>sS,fontFamilyTypes:()=>iS,forcedScheme:()=>Qo,formatDate:()=>_w,generateHash:()=>Ld,generateHeadArrayTags:()=>Oi,generateKey:()=>Ic,generateMetaTags:()=>Dw,generateSequence:()=>ye,generateSequencePosition:()=>DS,generateSprite:()=>nf,generateSubSequence:()=>Jl,get:()=>aw,getActiveConfig:()=>O,getActiveDocument:()=>cr,getActiveLang:()=>yo,getCDNDirUrl:()=>Pp,getCDNUrl:()=>an,getCacheSize:()=>yx,getCapitalCaseKeys:()=>c_,getCdnProviderFromConfig:()=>Ci,getChildStateInKey:()=>rp,getChildren:()=>fw,getColor:()=>at,getColorShade:()=>Hp,getContext:()=>gl,getCookie:()=>Yb,getDB:()=>wl,getDefaultOrFirstKey:()=>Qn,getEmitStats:()=>Ph,getEmotionStylesheet:()=>Gw,getExtendsInElement:()=>i_,getExtendsStack:()=>jc,getExtendsStackRegistry:()=>Md,getFnPrefixAndValue:()=>er,getFontFace:()=>nS,getFontFaceEach:()=>Go,getFontFaceEachString:()=>Jp,getFontFaceString:()=>Hl,getFontFamily:()=>hf,getFontFormat:()=>Xp,getFontSizeByKey:()=>mf,getFrequencyInArray:()=>Wy,getFunctionSource:()=>Oe,getHashedExtend:()=>Vc,getImportMapScript:()=>bw,getInObjectByPath:()=>Db,getLanguages:()=>qu,getLocalStateLang:()=>Zu,getLocalStorage:()=>Zb,getMediaBorder:()=>ff,getMediaColor:()=>Vt,getMediaTheme:()=>We,getNev:()=>Bb,getObserver:()=>Te,getPageMetadata:()=>Lw,getParentStateInKey:()=>np,getPath:()=>ll,getPendingLang:()=>Wu,getQuery:()=>Sl,getRef:()=>lw,getResolvedThemeSignal:()=>e1,getRgbTone:()=>On,getRoot:()=>dl,getRootContext:()=>hl,getRootData:()=>pl,getRootState:()=>ul,getRootStateInKey:()=>ep,getSafeInk:()=>uh,getSafeInkInfo:()=>$S,getSequenceValue:()=>Xo,getSequenceValueBySymbols:()=>Ql,getSequenceValuePropertyPair:()=>Dn,getShadow:()=>lf,getShapeByKey:()=>yf,getSignals:()=>DA,getSizeValue:()=>qi,getSpacingBasedOnRatio:()=>ze,getSpacingByKey:()=>Bt,getSpreadChildren:()=>l_,getSubratio:()=>Zl,getSubratioDifference:()=>Xl,getSystemGlobalTheme:()=>le,getTheme:()=>BS,getThemeSignal:()=>t1,getTimingByKey:()=>be,getTimingFunction:()=>De,global:()=>Uy,gradient:()=>uS,grid:()=>kS,hasFunction:()=>se,hasHandlerPlugin:()=>ui,hasOwnProperty:()=>vb,hashContent:()=>Tn,hexToRgb:()=>Xw,hexToRgbArray:()=>jp,hexToRgba:()=>Jw,hslToRgb:()=>Vp,icons:()=>hS,inheritChildExtends:()=>jd,inheritChildPropsExtends:()=>Fd,inheritParentProps:()=>Gc,inheritRecursiveChildExtends:()=>Bd,init:()=>Vn,initPolyglot:()=>dy,initProps:()=>g_,injectGlobal:()=>Et,is:()=>he,isArray:()=>I,isBoolean:()=>Sd,isBuiltinElementMethod:()=>db,isCSSVar:()=>$t,isContextComponent:()=>f_,isCyclic:()=>Ib,isDOMNode:()=>de,isDate:()=>kd,isDefined:()=>jt,isDevelopment:()=>Pr,isDomDocument:()=>zn,isEmpty:()=>Cd,isEmptyObject:()=>Eb,isEnumeratedTrueFalseAttr:()=>ms,isEqualDeep:()=>Td,isFailedRevival:()=>To,isFunction:()=>P,isGoogleFontsUrl:()=>Bi,isHostObject:()=>Wn,isHtmlElement:()=>mc,isInertCompoundValue:()=>Wp,isLazyFunction:()=>xb,isLocal:()=>jb,isLoudDevRuntime:()=>tt,isMalformedDependency:()=>$o,isMethod:()=>hw,isMobile:()=>Kb,isNativeColorToken:()=>qo,isNode:()=>qn,isNot:()=>Hy,isNotProduction:()=>Kn,isNull:()=>xd,isNumber:()=>pe,isObject:()=>A,isObjectLike:()=>V,isPhoto:()=>xw,isPlainColor:()=>qr,isPolyglotRetranslatableKey:()=>Jc,isPolyglotWritableKey:()=>Do,isProduction:()=>Rr,isProtectedElementMethod:()=>vo,isRawUnitValue:()=>hc,isResolvedColor:()=>ln,isRevived:()=>Oo,isScalingUnit:()=>So,isStaging:()=>Fb,isState:()=>x_,isStore:()=>wt,isString:()=>E,isStringFunction:()=>fi,isStringTag:()=>Pc,isSvgTag:()=>lr,isTest:()=>Pd,isTesting:()=>Nb,isTracking:()=>e0,isUndefined:()=>Wt,isUniversallyReservedKey:()=>mw,isUnresolvableDependency:()=>Fr,isValidDependencyMap:()=>No,isValidHtmlTag:()=>Qb,isValidTag:()=>pa,isWasmLoaded:()=>UM,isWrappedLibrary:()=>cn,isWritableFamilyBucket:()=>By,joinArrays:()=>oi,joinCompoundLayers:()=>Fi,jointStacks:()=>o_,jsonForScript:()=>Lo,keyframes:()=>aa,keys:()=>Cp,libraryPackageSpecs:()=>Pi,librarySpecsFor:()=>$p,linearChannelToSrgb:()=>Kp,literalPairCompound:()=>ts,literalSchemeMap:()=>rr,loadCssFile:()=>Aw,loadJavascript:()=>Cw,loadJavascriptFile:()=>kw,loadJavascriptFileEmbedSync:()=>Ew,loadJavascriptFileSync:()=>vw,loadRemoteCSS:()=>Tw,loadRemoteScript:()=>Ti,loadTranslations:()=>Gu,loadWasm:()=>BM,log:()=>dw,logGroupIf:()=>qb,logIf:()=>Wb,lookdown:()=>sw,lookdownAll:()=>iw,lookup:()=>ow,lowercaseFirstLetter:()=>xo,makeObjectWithoutPrototype:()=>Ab,map:()=>wb,mapStringsWithContextComponents:()=>zc,markPolyglotSeeded:()=>En,markRevived:()=>li,matchesComponentNaming:()=>vn,media:()=>cS,memoize:()=>Vb,merge:()=>Tt,mergeSharedLibraries:()=>Pl,mergeSharedLibraryDesignSystems:()=>Dl,mixTwoColors:()=>Yw,mixTwoRgb:()=>Qw,mixTwoRgba:()=>zp,nextElement:()=>yl,normalizeIgnoreList:()=>Tl,normalizeLibraryKey:()=>Uo,numToLetterMap:()=>Rn,objectToString:()=>Rc,objectizeStringProperty:()=>Wc,oklabToLinearSrgb:()=>Gp,oklabToOklch:()=>Bl,oklchToGamutSafeSrgb:()=>Ul,oklchToOklab:()=>Yp,opacify:()=>$i,overwrite:()=>Lc,overwriteDeep:()=>ie,overwriteShallow:()=>Po,overwriteState:()=>E_,parkHostObject:()=>Ar,parse:()=>Tp,parseColorToken:()=>Zt,parseDeep:()=>al,pickupElementFromProps:()=>Wd,pickupPropsFromElement:()=>zd,polyglotFallbackLang:()=>xl,polyglotFunctions:()=>Ju,polyglotLangStorageKey:()=>vi,polyglotPlugin:()=>oc,polyglotSeededKeys:()=>Lr,popConfig:()=>mt,popStaticCssPass:()=>Wh,prepareContext:()=>gA,previousElement:()=>bl,promoteActiveRootState:()=>xi,propExists:()=>p_,propertizeElement:()=>qd,propertizeUpdate:()=>d_,pushConfig:()=>bt,pushStaticCssPass:()=>zh,quietColorProbe:()=>Zo,readJsonDataBlock:()=>Io,refreshContextProto:()=>wa,registerEvent:()=>fa,registerHostPackages:()=>mF,registerSignalInstance:()=>Qs,reinit:()=>xv,relativeLuminance:()=>zo,remove:()=>ba,removeChars:()=>Ww,removeCookie:()=>Xb,removeDelegatedEvent:()=>Pf,removeDuplicateProps:()=>Xc,removeDuplicatesInArray:()=>si,removeFromArray:()=>qy,removeFromObject:()=>Tb,removeNestedKeyByPath:()=>Rb,removeValueFromArray:()=>wc,removeValueFromArrayAll:()=>Xy,reorderArrayByValues:()=>Jy,repairLegacyArrowScopePreamble:()=>Cc,replaceLiteralsWithObjectFields:()=>Kt,replaceOctalEscapeSequences:()=>ib,resetEmitStats:()=>dx,resolveAsset:()=>me,resolveBorderValue:()=>ae,resolveColorRgb:()=>Jo,resolveColorsInGradient:()=>vf,resolveCompoundWords:()=>Zn,resolveConfigDocument:()=>ni,resolveDesignSystemClass:()=>UO,resolveFileReferences:()=>jo,resolveFileSource:()=>o0,resolveFileUrl:()=>Ve,resolveGridTracks:()=>MO,resolveHandler:()=>di,resolvePropValue:()=>Zr,resolveShadowNonColorWord:()=>Gi,resolveShadowValue:()=>es,resolveSharedLibraries:()=>Ll,resolveStyleBlockTokens:()=>Vx,returnSubThemeOrDefault:()=>eS,returnValueAsText:()=>Gd,rgbArrayToHex:()=>Bp,rgbToHSL:()=>Up,rgbToHex:()=>Zw,runPluginHook:()=>Dr,runThroughMedia:()=>dh,schemeGuardSelector:()=>fh,schemeMediaQuery:()=>lh,scopeElementParam:()=>vd,scopeReceiverExpression:()=>yb,scratchDefaultConfig:()=>Vi,scratchSystem:()=>Ji,scratchUtils:()=>zr,self:()=>Vy,semanticIcons:()=>gS,sequence:()=>tr,serializeAttrValue:()=>jn,set:()=>ss,setActiveConfig:()=>rh,setActiveDocument:()=>ux,setActiveRootState:()=>fl,setAdaptiveSchemeVar:()=>Gr,setClass:()=>PH,setClassname:()=>i6,setColor:()=>Wr,setCookie:()=>Gb,setCssEngineHook:()=>Xg,setCustomFont:()=>Vl,setCustomFontMedia:()=>Vr,setEach:()=>XS,setFont:()=>pf,setFontFamily:()=>Xi,setFontImport:()=>Ui,setGradient:()=>Ki,setHashedExtend:()=>Id,setInCustomFontMedia:()=>Zp,setInObjectByPath:()=>Pb,setLang:()=>Yu,setLocalStorage:()=>Jb,setMediaTheme:()=>Yi,setNodeStyles:()=>Ap,setObserver:()=>dc,setProps:()=>cw,setPropsPrototype:()=>Yc,setSVG:()=>Zi,setScalingVar:()=>Yl,setShadow:()=>Yr,setSubScalingVar:()=>sh,setSvgIcon:()=>ns,setTheme:()=>uf,setValue:()=>YS,setVariables:()=>LS,setWasmEngine:()=>Tf,settled:()=>yd,shadow:()=>pS,shape:()=>CS,sharedLibrary:()=>Fw,sizes:()=>AS,skins:()=>TS,spacing:()=>lS,splitCompoundWords:()=>Fl,splitPackageSpecifier:()=>kl,splitSpacedValue:()=>cf,splitTopLevelCommas:()=>Jn,splitTopLevelSpaces:()=>lt,splitTransition:()=>wh,spotByPath:()=>cl,srcsetFor:()=>Li,srgbChannelToLinear:()=>qp,srgbToOklab:()=>jl,stringIncludesAny:()=>kc,stringToObject:()=>kb,stripVersionRangePrefix:()=>vl,svg:()=>wS,svgData:()=>SS,swapItemsInArray:()=>Ky,syncProps:()=>Zc,templates:()=>xS,theme:()=>dS,timing:()=>mS,toCamel:()=>Kl,toCamelCase:()=>Vo,toDashCase:()=>Il,toDescriptionCase:()=>Kw,toLinearChannel:()=>Ii,toPriorityOrder:()=>je,toTitleCase:()=>qw,toggleFullscreen:()=>yw,transformBackgroundImage:()=>yh,transformBorder:()=>hh,transformBorderRadius:()=>or,transformBoxShadow:()=>kf,transformClassname:()=>HO,transformDuration:()=>Ef,transformGridTemplate:()=>_h,transformShadow:()=>mh,transformSize:()=>Pt,transformSizeRatio:()=>j,transformTextStroke:()=>gh,transformTransition:()=>GS,transformersByPrefix:()=>Ux,transfromGap:()=>bh,translate:()=>Ku,triggerEventOn:()=>Gn,triggerEventOnUpdate:()=>C_,trimStringFromSymbols:()=>ob,typography:()=>zl,unit:()=>rS,unstackArrayOfObjects:()=>_c,untrack:()=>ei,update:()=>ya,updateProps:()=>m_,updateVars:()=>RH,upsertTranslation:()=>Xu,useCssInProps:()=>ne,useHostState:()=>t0,usePropsAsCSS:()=>BO,useSelectorsAsCSS:()=>VO,variables:()=>_l,vars:()=>ES,verbose:()=>ki,viewTransition:()=>OS,warn:()=>ml,warnLibraryAliasCollision:()=>Di,warnStateKeyShadowsMethod:()=>wd,window:()=>T,wrapHoverRule:()=>ar});module.exports=$F(SA);Rt();var Dh={};F(Dh,{CSS_LONGHAND_SHORTHANDS:()=>qe,CSS_SHORTHAND_LONGHANDS:()=>xt,assertEmitIntegrity:()=>px,css:()=>Ie,cssCamelName:()=>Of,cssPropName:()=>Se,cssShorthandDepth:()=>ea,cssShorthandStatesLonghand:()=>na,cssShorthandStatesThemeLonghand:()=>Af,getActiveDocument:()=>cr,getCacheSize:()=>yx,getEmitStats:()=>Ph,injectGlobal:()=>Et,keyframes:()=>aa,reset:()=>uO,resetEmitStats:()=>dx,setActiveDocument:()=>ux,setWasmEngine:()=>Tf,wrapHoverRule:()=>ar});var ZS={};F(ZS,{BARE_SEQUENCE_TOKEN_RE:()=>Pn,COMPOUND_CSS_KEYWORDS:()=>Wo,CONFIG:()=>Yo,CONFIG_MERGE_EXL:()=>Pe,CSS_NAMED_COLOR_HEX:()=>Mi,CSS_NATIVE_COLOR_REGEX:()=>Ur,CSS_UNITS:()=>ri,FACTORY:()=>Re,STANDARD_SCHEME_QUERIES:()=>ch,VALUE_TRANSFORMERS:()=>Sh,__resetSkinWarnings:()=>qS,activateConfig:()=>n1,aliasCaseVariants:()=>Wi,animation:()=>_S,appendSVGSprite:()=>wf,appendSvgIconsSprite:()=>rs,applyDocument:()=>_f,applyHeadings:()=>ph,applyMediaSequenceVars:()=>Hr,applyReset:()=>Sf,applySequenceGlobalVars:()=>ef,applySequenceVars:()=>nr,applySkins:()=>xf,applySpacingSequence:()=>af,applyTimingSequence:()=>bf,applyTypographySequence:()=>gf,atSchemes:()=>Kr,breakpoints:()=>yS,buildSkinVarStyles:()=>os,changeGlobalTheme:()=>xh,changeLightness:()=>tS,checkIfBoxSize:()=>sf,class:()=>vS,color:()=>fS,colorPairSchemes:()=>of,colorStringToRgbaArray:()=>Ue,compositeOverBackdrop:()=>Ko,compoundLayers:()=>Ni,contrastRatio:()=>ji,convertSvgToSymbol:()=>rf,createConfig:()=>Gl,createPristineConfig:()=>oh,cssMediaVars:()=>nh,cssVars:()=>eh,defineResolvedThemeSignal:()=>zi,defineThemeSignal:()=>Hi,devices:()=>bS,document:()=>JT,findHeadingLetter:()=>ih,findHeadings:()=>tf,font:()=>oS,fontFace:()=>aS,fontFamily:()=>sS,fontFamilyTypes:()=>iS,forcedScheme:()=>Qo,generateSequence:()=>ye,generateSequencePosition:()=>DS,generateSprite:()=>nf,generateSubSequence:()=>Jl,getActiveConfig:()=>O,getColor:()=>at,getColorShade:()=>Hp,getDefaultOrFirstKey:()=>Qn,getFnPrefixAndValue:()=>er,getFontFace:()=>nS,getFontFaceEach:()=>Go,getFontFaceEachString:()=>Jp,getFontFaceString:()=>Hl,getFontFamily:()=>hf,getFontFormat:()=>Xp,getFontSizeByKey:()=>mf,getMediaBorder:()=>ff,getMediaColor:()=>Vt,getMediaTheme:()=>We,getResolvedThemeSignal:()=>e1,getRgbTone:()=>On,getSafeInk:()=>uh,getSafeInkInfo:()=>$S,getSequenceValue:()=>Xo,getSequenceValueBySymbols:()=>Ql,getSequenceValuePropertyPair:()=>Dn,getShadow:()=>lf,getShapeByKey:()=>yf,getSizeValue:()=>qi,getSpacingBasedOnRatio:()=>ze,getSpacingByKey:()=>Bt,getSubratio:()=>Zl,getSubratioDifference:()=>Xl,getTheme:()=>BS,getThemeSignal:()=>t1,getTimingByKey:()=>be,getTimingFunction:()=>De,gradient:()=>uS,grid:()=>kS,hexToRgb:()=>Xw,hexToRgbArray:()=>jp,hexToRgba:()=>Jw,hslToRgb:()=>Vp,icons:()=>hS,isCSSVar:()=>$t,isDomDocument:()=>zn,isGoogleFontsUrl:()=>Bi,isHostObject:()=>Wn,isInertCompoundValue:()=>Wp,isNativeColorToken:()=>qo,isPlainColor:()=>qr,isRawUnitValue:()=>hc,isResolvedColor:()=>ln,isScalingUnit:()=>So,isWritableFamilyBucket:()=>By,joinCompoundLayers:()=>Fi,linearChannelToSrgb:()=>Kp,literalPairCompound:()=>ts,literalSchemeMap:()=>rr,media:()=>cS,mixTwoColors:()=>Yw,mixTwoRgb:()=>Qw,mixTwoRgba:()=>zp,numToLetterMap:()=>Rn,oklabToLinearSrgb:()=>Gp,oklabToOklch:()=>Bl,oklchToGamutSafeSrgb:()=>Ul,oklchToOklab:()=>Yp,opacify:()=>$i,parkHostObject:()=>Ar,parseColorToken:()=>Zt,popConfig:()=>mt,pushConfig:()=>bt,quietColorProbe:()=>Zo,relativeLuminance:()=>zo,reset:()=>QT,resolveBorderValue:()=>ae,resolveColorRgb:()=>Jo,resolveColorsInGradient:()=>vf,resolveCompoundWords:()=>Zn,resolveConfigDocument:()=>ni,resolveFileUrl:()=>Ve,resolveShadowNonColorWord:()=>Gi,resolveShadowValue:()=>es,returnSubThemeOrDefault:()=>eS,rgbArrayToHex:()=>Bp,rgbToHSL:()=>Up,rgbToHex:()=>Zw,runThroughMedia:()=>dh,schemeGuardSelector:()=>fh,schemeMediaQuery:()=>lh,scratchDefaultConfig:()=>Vi,scratchSystem:()=>Ji,scratchUtils:()=>zr,semanticIcons:()=>gS,sequence:()=>tr,set:()=>ss,setActiveConfig:()=>rh,setAdaptiveSchemeVar:()=>Gr,setColor:()=>Wr,setCustomFont:()=>Vl,setCustomFontMedia:()=>Vr,setEach:()=>XS,setFont:()=>pf,setFontFamily:()=>Xi,setFontImport:()=>Ui,setGradient:()=>Ki,setInCustomFontMedia:()=>Zp,setMediaTheme:()=>Yi,setSVG:()=>Zi,setScalingVar:()=>Yl,setShadow:()=>Yr,setSubScalingVar:()=>sh,setSvgIcon:()=>ns,setTheme:()=>uf,setValue:()=>YS,setVariables:()=>LS,shadow:()=>pS,shape:()=>CS,sizes:()=>AS,skins:()=>TS,spacing:()=>lS,splitCompoundWords:()=>Fl,splitSpacedValue:()=>cf,splitTopLevelCommas:()=>Jn,splitTopLevelSpaces:()=>lt,splitTransition:()=>wh,srgbChannelToLinear:()=>qp,srgbToOklab:()=>jl,svg:()=>wS,svgData:()=>SS,templates:()=>xS,theme:()=>dS,timing:()=>mS,toCamel:()=>Kl,toLinearChannel:()=>Ii,transformBackgroundImage:()=>yh,transformBorder:()=>hh,transformBorderRadius:()=>or,transformBoxShadow:()=>kf,transformDuration:()=>Ef,transformGridTemplate:()=>_h,transformShadow:()=>mh,transformSize:()=>Pt,transformSizeRatio:()=>j,transformTextStroke:()=>gh,transformTransition:()=>GS,transfromGap:()=>bh,typography:()=>zl,unit:()=>rS,vars:()=>ES,viewTransition:()=>OS});var zr={};F(zr,{BARE_SEQUENCE_TOKEN_RE:()=>Pn,COMPOUND_CSS_KEYWORDS:()=>Wo,CSS_NAMED_COLOR_HEX:()=>Mi,CSS_NATIVE_COLOR_REGEX:()=>Ur,CSS_UNITS:()=>ri,applyMediaSequenceVars:()=>Hr,applySequenceGlobalVars:()=>ef,applySequenceVars:()=>nr,changeLightness:()=>tS,colorStringToRgbaArray:()=>Ue,compositeOverBackdrop:()=>Ko,compoundLayers:()=>Ni,contrastRatio:()=>ji,convertSvgToSymbol:()=>rf,findHeadingLetter:()=>ih,findHeadings:()=>tf,generateSequence:()=>ye,generateSequencePosition:()=>DS,generateSprite:()=>nf,generateSubSequence:()=>Jl,getColorShade:()=>Hp,getDefaultOrFirstKey:()=>Qn,getFnPrefixAndValue:()=>er,getFontFace:()=>nS,getFontFaceEach:()=>Go,getFontFaceEachString:()=>Jp,getFontFaceString:()=>Hl,getFontFormat:()=>Xp,getRgbTone:()=>On,getSequenceValue:()=>Xo,getSequenceValueBySymbols:()=>Ql,getSequenceValuePropertyPair:()=>Dn,getSizeValue:()=>qi,getSubratio:()=>Zl,getSubratioDifference:()=>Xl,hexToRgb:()=>Xw,hexToRgbArray:()=>jp,hexToRgba:()=>Jw,hslToRgb:()=>Vp,isCSSVar:()=>$t,isDomDocument:()=>zn,isGoogleFontsUrl:()=>Bi,isHostObject:()=>Wn,isInertCompoundValue:()=>Wp,isNativeColorToken:()=>qo,isRawUnitValue:()=>hc,isResolvedColor:()=>ln,isScalingUnit:()=>So,isWritableFamilyBucket:()=>By,joinCompoundLayers:()=>Fi,linearChannelToSrgb:()=>Kp,mixTwoColors:()=>Yw,mixTwoRgb:()=>Qw,mixTwoRgba:()=>zp,numToLetterMap:()=>Rn,oklabToLinearSrgb:()=>Gp,oklabToOklch:()=>Bl,oklchToGamutSafeSrgb:()=>Ul,oklchToOklab:()=>Yp,opacify:()=>$i,parkHostObject:()=>Ar,parseColorToken:()=>Zt,relativeLuminance:()=>zo,resolveCompoundWords:()=>Zn,resolveConfigDocument:()=>ni,resolveFileUrl:()=>Ve,returnSubThemeOrDefault:()=>eS,rgbArrayToHex:()=>Bp,rgbToHSL:()=>Up,rgbToHex:()=>Zw,setCustomFont:()=>Vl,setCustomFontMedia:()=>Vr,setFontImport:()=>Ui,setInCustomFontMedia:()=>Zp,setScalingVar:()=>Yl,setSubScalingVar:()=>sh,setVariables:()=>LS,splitCompoundWords:()=>Fl,splitTopLevelCommas:()=>Jn,splitTopLevelSpaces:()=>lt,srgbChannelToLinear:()=>qp,srgbToOklab:()=>jl,toLinearChannel:()=>Ii});var zn=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),Wn=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)},By=t=>t!==null&&typeof t=="object"&&!Wn(t),Ar=(t,e,n)=>{if(!t)return;if(zn(n)){t.__domDocument||(t.__domDocument=n);return}let r=`__host_${e}`;t[r]||(t[r]=n)},ni=t=>t?zn(t.__domDocument)?t.__domDocument:zn(t.document)?t.document:null:null;var So=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",ri=["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"],tj=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),ej=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${ri.filter(t=>t!=="auto").map(tj).join("|")})$`),hc=t=>ej.test(String(t).trim());M();var Mi={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"},Ue=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=Mi[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&&yt&&T){let n=yt.body.appendChild(yt.createElement("fictum")),r="rgb(1, 2, 3)";if(n.style.color=r,n.style.color!==r){yt.body.removeChild(n);return}if(n.style.color=t,n.style.color===r||n.style.color==="")return yt.body.removeChild(n),[0,0,0,0];t=T.getComputedStyle(n).color,yt.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]},Yw=(t,e,n=.5)=>(t=Ue(t),e=Ue(e),zp(t,e,n)),Xw=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${n},${r},${o})`},jp=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[n,r,o]},Zw=(t,e,n)=>"#"+(1<<24|t<<16|e<<8|n).toString(16).slice(1),Bp=([t,e,n])=>((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1),Jw=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${n},${r},${o},${e})`},Qw=(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})`},tS=(t,e)=>{let[n,r,o]=e,s=Math.max(0,Math.min(100,o+parseFloat(t)));return[n,r,s]},Up=(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]},Vp=(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)],Hp=(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)},zp=(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})`},$i=(t,e)=>{let n=Ue(t);if(!n){Kn()&&console.warn(t+" color is not rgba");return}return n[3]=e,`rgba(${n})`},$t=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Wo=new Set(["currentcolor","transparent","thin","medium","thick"]),Ur=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,g3=/^(?:#[0-9a-f]{3,8}|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix|light-dark)\([\s\S]*\))$/i,qo=t=>g3.test(t),Fl=t=>t.indexOf("(")===-1?t.split(/\s+/):lt(t),Wp=(t,e)=>{let n=t.length,r=0,o=0;for(let s=0;s<=n;s++){let i=s<n?t.charCodeAt(s):32;if(i===40){r++;continue}if(i===41){r>0&&r--;continue}if(!(r>0||!(i<=32||i===44||i>127&&/\s/.test(t[s])))){if(s>o&&!m3(t,o,s,e))return!1;o=s+1}}return!0},m3=(t,e,n,r)=>{let o=t.charCodeAt(e);if(o>=48&&o<=57)return!0;let s=t.slice(e,n);return qo(s)||r!==void 0&&r.has(s)},Ni=(t,e)=>e?Jn(t).map(n=>Fl(n.trim())):[Fl(t)],Fi=t=>{let e=t[0].join(" ");for(let n=1;n<t.length;n++)e+=", "+t[n].join(" ");return e},Zn=(t,e,{commas:n,keywords:r},o,s)=>{let i=Ur.test(t);if(i&&Wp(t,r))return t;let a=Ni(t,n),c=!1;try{for(let l of a)for(let f=0;f<l.length;f++){let u=l[f],d=y3(u,e,r,o,s);d!==u&&(l[f]=d,c=!0)}}catch(l){if(i)return t;throw l}return i&&!c?t:Fi(a)},y3=(t,e,n,r,o)=>t?$t(t)?`var(${t})`:qo(t)||n!==void 0&&n.has(t)?t:e(t,r,o):"",b3=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Zt=t=>{if(!E(t))return null;if(Ur.test(t))return{passthrough:t};if($t(t))return{cssVar:t};let e=t.match(b3);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}},ln=t=>E(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),Jn=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},lt=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},Ii=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),zo=t=>.2126*Ii(t[0])+.7152*Ii(t[1])+.0722*Ii(t[2]),ji=(t,e)=>{let n=zo(t)+.05,r=zo(e)+.05;return n>r?n/r:r/n},qp=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Kp=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,jl=([t,e,n])=>{let[r,o,s]=[t,e,n].map(qp),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]},Gp=([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]},Bl=([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]},Yp=([t,e,n])=>{let r=n*Math.PI/180;return[t,e*Math.cos(r),e*Math.sin(r)]},Ul=(t,e,n,r=24)=>{let o=a=>Gp(Yp([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=>Kp(Math.max(0,Math.min(1,a))))},Ko=(t,e=1,n=[255,255,255])=>e>=1?t:t.map((r,o)=>r*e+n[o]*(1-e)),On=(t,e)=>{E(t)&&t.includes("rgb")&&(t=Ue(t).join(", ")),E(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),pe(e)&&(e+="");let n=Bp(t),r=e.slice(0,1);if(r==="-"||r==="+"){let o=Hp(n,parseFloat(e));return jp(o).join(", ")}else{let[o,s,i]=t,[a,c]=Up(o/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return Vp(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var eS=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var Ve=(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},Qn=(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},Xp=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},Bi=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),Ui=t=>`@import url('${t}');`,Zp=t=>`@font-face { ${t} }`,Vl=(t,e,n,r={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=Xp(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}`},i$=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
|
-
}`,vo=(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=>$e(d,n)||d):$e(s,n)||s;return qc(t,u,i,{fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f})}),e_=t=>Object.keys(t).map(n=>vo(n,t[n].value)),Nd=(t,e,n)=>{if(e&&e.isVariable){let s=$e(e.url,n)||e.url;return Gs(s)?Ys(s):kr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap",unicodeRange:e.unicodeRange})}if(e[0])return vo(t,e,n).map($d);let o=Array.isArray(e.url)?e.url.map(s=>$e(s,n)||s):$e(e.url,n)||e.url;return kr(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch,unicodeRange:e.unicodeRange})},Kc=(t,e)=>Object.keys(t).map(r=>Nd(r,t[r].value,e));M();M();M();M();Mt();var Xs={};j(Xs,{animation:()=>b_,breakpoints:()=>m_,class:()=>k_,color:()=>l_,devices:()=>y_,document:()=>nA,font:()=>r_,fontFace:()=>i_,fontFamily:()=>o_,fontFamilyTypes:()=>s_,gradient:()=>f_,grid:()=>x_,icons:()=>p_,media:()=>a_,reset:()=>rA,semanticIcons:()=>h_,sequence:()=>Mn,shadow:()=>d_,shape:()=>A_,sizes:()=>E_,skins:()=>C_,spacing:()=>c_,svg:()=>__,svgData:()=>w_,templates:()=>S_,theme:()=>u_,timing:()=>g_,typography:()=>Gc,unit:()=>n_,vars:()=>v_,viewTransition:()=>T_});var Mn={"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 n_={default:"em"};var Z$={browserDefault:16,base:16,type:"font-size",ratio:Mn["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Gc=Z$;var r_={};var o_={},s_={"sans-serif":"Helvetica, Arial, sans-serif",serif:"Times New Roman, Georgia, serif",monospace:"Courier New, monospace"},i_={};var a_={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var Q$={base:Gc.base,type:"spacing",ratio:Mn.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},c_=Q$;var l_={},f_={};var u_={};var d_={};var p_={},h_={};var J$={default:150,base:150,type:"timing",ratio:Mn["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},g_=J$;var nA={};var m_={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},y_={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 b_={};var __={},w_={};var S_={};var tN={},x_=tN;var k_={};var rA={},v_={},E_={},A_={},C_={},T_={};var Ud={},Vd={},ve=new Set,Fd=Xs,jd={},Xc=t=>t.replace(/_([a-z])/g,(e,n)=>n.toUpperCase());for(let t in Fd){let e=t.toLowerCase();jd[e]=Fd[t];let n=Xc(e);n!==e&&(jd[n]=Fd[t]),e!==t&&(jd[t]=Fd[t])}var Eo={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Ud,cssMediaVars:Vd,CSS_VARS:Ud,CSS_MEDIA_VARS:Vd,cssSkinVars:{},cssSkinFallback:{},_scratchConfig:!0,...jd},Zs=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return Lt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let n=Lt(e)?e:t.globalTheme,r=Zr(Lt(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},oA=t=>t?Zs(t):null,Qs=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return Lt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let n=Lt(e)?e:t.resolvedTheme,r=Zr(Lt(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},sA=t=>t?Qs(t):null;Zs(Eo);Qs(Eo);var Bd=ft(Eo),ke={active:"0",0:Eo},iA=t=>(Lt(t)&&(ke.active=t),ke[t||ke.active]),Yc=[],gt=t=>{t&&t._scratchConfig&&Yc.push(t)},dt=()=>{Yc.pop()},O=t=>Yc.length?Yc[Yc.length-1]:ke[t||ke.active]||Eo,zd=t=>{if(E(t))return ke.active="1",ke[1]=ct(t,ft(Bd),ve),Js(ke[1]),Zs(ke[1]),Qs(ke[1]),t},eN=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],nN=["useVariable","globalTheme","verbose"],rN=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],Js=t=>{for(let e of rN){let n;for(let r of e){let o=t[r];E(o)&&(n=n?ct(n,o,ve):o)}if(n)for(let r of e)E(t[r])&&(t[r]=n)}},Zc=(t,e,{cleanBase:n=!1}={})=>{let r=n?null:O(),o=ft(!n&&r&&r._scratchConfig?r:Bd);for(let i of eN)delete o[i];for(let i of nN)Object.prototype.hasOwnProperty.call(Bd,i)?o[i]=Bd[i]:delete o[i];let s=ct(e||{},o,ve);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s.cssSkinVars={},s.cssSkinFallback={},s._scratchConfig=!0,Js(s),Zs(s),Qs(s),t&&(ke[t]=s),s};var wn=/^-?[A-Z][0-9]?$/,_n={"-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"},R_=(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=aA.has(e.unit)?"rem":e.unit;e.vars[r]=s+c},$n=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)]},O_="\0",oN=(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+=O_+e.length+O_,e.push(o),o=""))}return n+o},sN=(t,e)=>t.indexOf(O_)===-1?t:t.replace(/\u0000(\d+)\u0000/g,(n,r)=>e[Number(r)]),iN=/^(calc|min|max|clamp)\((.*)\)$/,aN=(t,e)=>{let n=iN.exec(t);return n?`${n[1]}(${nl(n[2],e)})`:t.indexOf("(")!==-1?t:Ao(t,e)},aA=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Qc=(t,e)=>{let{base:n,type:r,unit:o}=e,s=aA.has(o)?"rem":o,i=(Qr(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=_n[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=_n[t+1],u=Math.abs(t),d=Math.pow(cA,2*u),h=_n[u];return h?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${h}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Hd=(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]},tl=(t,e)=>Jc(t,e).map(n=>n/t),el=(t,e)=>{let{key:n,base:r,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[u,d,h]=Jc(o,s);l>16?f=[u,d,h]:f=[u,h],f.forEach((g,p)=>{let m=~~(g/r*1e3)/1e3,y=i+(p+1),S=a+(p+1)/10,b=Hd(p+1,f,i,e),k={key:n+(p+1),variable:y,value:g,scaling:m,scalingVariable:b,index:S};R_(k,e)})},cA=1.618,cN=(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(cA,2*r);return Math.max(o,s)},ce=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=_n[f],d=cN(f,n,r),h=~~(d/n*100)/100,g=c+u,p=Qc(f,t),m={key:u,variable:g,value:d,base:n,scaling:h,scalingVariable:p,ratio:r,index:f};R_(m,t),s&&el(m,t)}return t},P_=(t,e=0)=>{let{type:n,base:r,ratio:o,subSequence:s}=t,i=v(e)?e:_n[e],a=v(e)?Object.entries(_n).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,h="--"+(t.varPrefix?t.varPrefix+"-":"")+(n&&n.replace(".","-"))+"-"+i,g=Qc(a,t),p={key:i,variable:h,value:l,base:r,scaling:f,scalingVariable:g,ratio:o,index:a};return R_(p,c),s&&el(p,c),c},ti=(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)`},Ao=(t="A",e)=>{let n=O(),{unit:r}=n;if(v(t)&&Et(t))return`var(${t})`;if(v(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(v(t)){let b=ti(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(ba(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+"-":""}${Bc(e.type.replace(".","-"))}-`,h=t.toUpperCase(),g=h.slice(0,1)==="-"?"-":"",p=g?h.slice(1):h,m="";p.includes("_")&&(m="_"+p.split("_")[1].toLowerCase(),p=p.split("_")[0]);let y=b=>a.test(b)?`var(${d}${b}${m})`:b;if(p.includes("+")){let[b,k]=p.split("+"),x=`${y(b)} + ${y(k)}`;return g?`calc((${x}) * -1)`:`calc(${x})`}else if(p.includes("*")){let[b,k]=p.split("*"),x=`${y(b)} * ${y(k)}`;return g?`calc((${x}) * -1)`:`calc(${x})`}else if(p.includes("-")){let[b,k]=p.split("-"),x=`${y(b)} - ${y(k)}`;return g?`calc((${x}) * -1)`:`calc(${x})`}if(!o[p]&&p.length===2&&(n.verbose&&console.warn(p,"- value is not found because `subSequence` is set to false"),p=p.slice(0,1)),i||n.useVariable){let b=`var(${d}${p}${m})`;return g?`calc(${b} * -1)`:b}let S=o?o[p]:null;if(!S){if(console.warn("can't find",o,p),J())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},nl=(t,e)=>{if(!["+","-","*","/",","].filter(i=>t.includes(i+" ")).length)return t;let r=/(\s+-\s+|\s*[+*/,]\s*)/,o=[];return oN(t,o).split(r).map(i=>{let a=sN(i,o),c=a.trim();return!c||["+","-","*","/",","].includes(c)?a:aN(c,e)}).join("")},Sn=(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=$n(t);r=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=nl(t,n):t=Ao(t,n),{[e]:r?`${r}(${t})`:t}},Wd=(t,e)=>_n[t-e],rl=t=>{let{h1Matches:e,sequence:n}=t;return new Array(6).fill(null).map((r,o)=>{let s=Wd(e,o);return n[s]})};M();var L_=(t,e)=>{let n=O(),{cssVars:r}=n;q(t.value)||(r[t.var]=t.value)},ol=(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,h,g]=tl(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${h/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${g/a})`},lA=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Nn=(t,e={})=>{let n=O(),{unit:r,timing:o,cssVars:s}=n,i=t.unit||r.default,a=lA.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||ol(s,t,e);for(let u in l){let d=l[u],h=(t.type===o.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=h,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=h:(s[d.variable+"_default"]=h,s[d.variable]=`var(${d.variable+"_default"})`)}},vr=(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=lA.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:h}=c,g=s[a];if(!g&&r.verbose&&console.warn("Can't find media query ",g),!u){let p=i[`@media ${g}`];p||(p=i[`@media ${g}`]={}),ol(p,c,n);let m=t.unit||o.default;if(f!==m&&d)for(let y in d){let S=d[y],b=h[y]+f;p[S.variable+"_default"]=b,p[S.variable]=b}return}for(let p in d){let m=d[p],y=(Qr(f)?h[p]:d[p].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}};M();var uA=Rn(),sl=t=>{let e=O(),n="";for(let r in t)e.__svgCache[r]||(e.__svgCache[r]=!0,n+=t[r]);return n},lN=t=>{let e=t&&(t.default||t);if(!v(e))return uA&&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},{}):{}},fN=(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},fA=new Set,il=(t,e)=>{let n=e&&e.default?e.default:e;if(!v(n))return uA&&!fA.has(t)&&(fA.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=lN(e),{width:s,height:i}=o,a=o.viewBox||`0 0 ${s||24} ${i||24}`,f=fN(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=pN(f),f},uN="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",dN=new RegExp(`<(${uN})\\b([^>]*?)\\s*/>`,"g"),pN=t=>t.replace(dN,"<$1$2></$1>");var ii={};j(ii,{STANDARD_SCHEME_QUERIES:()=>Kd,__resetSkinWarnings:()=>W_,appendSVGSprite:()=>_l,appendSvgIconsSprite:()=>Po,applyDocument:()=>bl,applyHeadings:()=>Xd,applyReset:()=>wl,applySkins:()=>Sl,applySpacingSequence:()=>cl,applyTimingSequence:()=>yl,applyTypographySequence:()=>hl,buildSkinVarStyles:()=>Lo,checkIfBoxSize:()=>al,getColor:()=>ot,getFontFamily:()=>pl,getFontSizeByKey:()=>gl,getMediaColor:()=>jt,getMediaTheme:()=>je,getSafeInk:()=>Gd,getSafeInkInfo:()=>M_,getShadow:()=>fl,getShapeByKey:()=>ml,getSpacingBasedOnRatio:()=>Fe,getSpacingByKey:()=>Tt,getTheme:()=>j_,getTimingByKey:()=>le,getTimingFunction:()=>Ae,isPlainColor:()=>Cr,quietColorProbe:()=>Co,resolveBorderValue:()=>Ee,resolveColorRgb:()=>To,resolveShadowValue:()=>Oo,runThroughMedia:()=>Yd,schemeGuardSelector:()=>Or,schemeMediaQuery:()=>Tr,setAdaptiveSchemeVar:()=>Rr,setColor:()=>Ar,setFont:()=>dl,setFontFamily:()=>oi,setGradient:()=>ei,setMediaTheme:()=>ri,setSVG:()=>si,setShadow:()=>Pr,setSvgIcon:()=>Ro,setTheme:()=>ul,splitSpacedValue:()=>ll});M();var Kd={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},Tr=(t,e)=>{let n=e.media&&e.media[t]||Kd[t];return n?"@media "+(n==="print"?`${n}`:`screen and ${n}`):null},Or=t=>{let e=t.scopeSelector||":root";return`${e===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`} &`},Ne=new Set,gA=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"]),hN=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,gN=/gradient\(|url\(|image-set\(|var\(/i,mN=new Set(["transparent","currentColor","currentcolor"]),Cr=t=>{if(!v(t))return!1;let e=t.trim();return gN.test(e)?!1:hN.test(e)?!0:gA.has(e)||mN.has(e)},qd=new Set,dA=t=>{if(!t)return!1;let{color:e,gradient:n}=t;return!!(E(e)&&Object.keys(e).length||E(n)&&Object.keys(n).length)},pA=new Set,D_=0,Co=t=>{D_++;try{return t()}finally{D_--}},yN=(t,e)=>{if(!v(t)||t.indexOf(" ")===-1)return null;let n=t.replace(/\s+/g,""),r=Yt(n);if(!r||r.passthrough||r.cssVar)return null;let{color:o,gradient:s}=e;return!o[r.name]&&!s[r.name]?null:n},I_=(t,e,n)=>{let r=yN(t,n);if(r){if(!pA.has(t)){pA.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=Yt(t);if(o&&o.name&&!o.passthrough&&!o.cssVar&&(o.alpha!==void 0||o.tone!==void 0)&&dA(n)&&!n.color[o.name]&&!n.gradient[o.name]){if(!D_&&!qd.has(t)){qd.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(!gA.has(s)||!dA(n))return t;if(!qd.has(s)){qd.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.`)}},mA=(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})`},ot=(t,e,n)=>{let r=n||O();if(!v(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(Et(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(L(t))[o,s,i]=t;else{let u=Yt(t);if(!u){let{color:d,gradient:h}=r,g=h[t]||d[t];return g?(e&&g[e]&&(g=g[e]),r.useVariable?`var(${g.var})`:g.value):I_(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 I_(t,o,r);if(e)if(l[e]!==void 0)l=l[e];else if(L(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(Ne.has(o))return l;Ne.add(o);try{return ot(l,null,n)}finally{Ne.delete(o)}}let f=l.rgb;if(!f){let u=r.useVariable?`var(${l.var})`:l.value;return(s||i)&&u?mA(u,s,i):u}return i&&!l[i]&&(f=bn(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})`},hA=t=>{let e=Me(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}},bN=(t,e)=>{if(!e)return t;let n=t.rgb;if(e.tone){let o=bn(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}},To=(t,e,n)=>{let r=e||O();if(!v(t))return null;let o=Yt(t);if(o){if(o.passthrough){let d=Me(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 hA(t);if(v(c)){let d;if(Ne.has(s))d=hA(c);else{Ne.add(s);try{d=To(c,r,n)}finally{Ne.delete(s)}}return d?bN(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=bn(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}},yA=t=>E(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0),bA=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||!yA(t[n]))return null;e.push(n.slice(1))}return e.length?e:null},_N=t=>v(t&&t.var)&&bA(t)!==null,wN=(t,e,n,r,o)=>{let s=bA(e);if(!s)return;if(v(e.var)){let c=`var(${e.var})`;return n||r?mA(c,n,r):c}if(s.length!==2||!s.includes("light")||!s.includes("dark"))return;let i=ot(t,"@light",o),a=ot(t,"@dark",o);if(!(!Cr(i)||!Cr(a)))return i===a?i:`light-dark(${i}, ${a})`},jt=(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(Et(t))return`var(${t})`;let o,s,i;if(L(t))o=t[0];else{let u=Yt(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 ot(t,`@${e}`,n);if(f){if(r.useVariable&&l.var)return s||i?ot(t,null,n):`var(${l.var})`;if(e){if(!r.useVariable&&a[o]===l){let u=wN(t,l,s,i,n);if(u!==void 0)return u}return ot(t,`@${e}`,n)}else{let u={},d=Or(r);for(let h in l){if(h.charCodeAt(0)!==64)continue;let g=h.slice(1),p=ot(t,h,n);if(p!==void 0&&(u[`[data-theme="${g}"] &`]=p,g==="light"||g==="dark")){let m=Tr(g,r);if(!m)continue;u[m]={[d]:p}}}return u}}else return I_(t,o,r)},Rr=(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}},Ar=(t,e,n)=>{let r=O();if(yA(t))return r.useVariable&&t.var&&(r.cssVars[t.var]=t.value),t;if(!r.useVariable&&_N(t))return t;if(v(t)&&Et(t)){let p=t.slice(2),m=p.trim().indexOf(" ")!==-1;if(t=m?p:ot(p),m||!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let y=p.trim().split(/\s+/),S=r.color[y[0]];if(S&&!S.value&&!S.rgb&&(v(S)||L(S)||E(S))&&!Ne.has(y[0])){Ne.add(y[0]);try{r.color[y[0]]=Ar(S,y[0])}finally{Ne.delete(y[0])}S=r.color[y[0]]}if(S&&S.value){let b=S.rgb,k=y[1]!==void 0?y[1]:"1",x=y[2];x&&(b=bn(b,x)),t=`rgba(${b}, ${k})`}else{let b=y[2],k=y[1]!==void 0?y[1]:"1";if(b)try{let x=Me(y[0]);x&&x.length>=3?t=`rgba(${bn(x.slice(0,3).join(", "),b)}, ${k})`:t=y[0]}catch{t=y[0]}else t=y[0]}}}if(L(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),E(t)){let p={};for(let m in t)m!=="var"&&(p[m]=Ar(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return r.useVariable&&Rr(p,"color",e,r),p}let s=`--${r.varPrefix?r.varPrefix+"-":""}color-${e}`+(n?`-${n}`:""),i=t.value||t;if(v(i)&&!i.includes("(")&&!i.startsWith("#")){let p=Yt(i);if(p&&p.name&&!p.passthrough&&!p.cssVar){let m=r.color[p.name];if(m&&!m.value&&!m.rgb&&(v(m)||L(m)||E(m))&&!Ne.has(p.name)){Ne.add(p.name);try{r.color[p.name]=Ar(m,p.name)}finally{Ne.delete(p.name)}}let y=r.color[p.name];if(y&&y.rgb){let S=y.rgb;p.tone&&(S=bn(S,p.tone));let b=p.alpha!==void 0?parseFloat(p.alpha):y.alpha!==void 0?y.alpha:1;i=`rgba(${S}, ${b})`}}}let a=Me(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),h=`${c}, ${l}, ${f}`,g=`rgba(${h}, ${d})`;return r.useVariable&&(r.cssVars[s]=g),{var:s,rgb:h,alpha:d,value:g}},ei=(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)&&Et(t)&&(t=ot(t.slice(2))),L(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]=ei(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return r.useVariable&&Rr(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}};M();var Gd=(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),h=Yt(t),g=h&&!h.passthrough&&!h.cssVar?h.name:null,p=(z,W)=>c?{value:z,...W}:z;if(g){let z=o.color[`${g}Safe`];if(z){let W=`${d}@${u}`,Q=z[W]!==void 0?z[W]:z[d];if(Q!==void 0){let Z=Q&&Q.rgb!==void 0?o.useVariable&&Q.var?`var(${Q.var})`:Q.value:ot(Q,null,o);return p(Z,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=ot(t,u?`@${u}`:null,o),y=To(t,o,u),S=To(e,o,u);if(!y||!S)return o.verbose&&console.warn("getSafeInk: could not resolve",t,e,"\u2014 returning hue unchanged"),p(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let b=ko(S.rgb,S.alpha),k=ko(y.rgb,y.alpha,b),x=Ks(k,b);if(x>=f-.02)return p(m,{ratio:x,deviation:0,derived:!1,overridden:!1});let[w,_,A]=zc(y.rgb),[,C,D]=Hc([w,_,A]),$=So(b)>.5,I=$?w:1-w,N=z=>{let W=$?w-z:w+z,Q=Math.max(0,Math.min(1,W));return{rgb:Wc(Q,C,D),L:Q}},K=z=>{let{rgb:W}=N(z),Q=ko(W.map(Z=>Math.round(Z)),y.alpha,b);return Ks(Q,b)},et=0,st=I,xt=K(st)>=f;if(xt)for(let z=0;z<l;z++){let W=(et+st)/2;K(W)>=f?st=W:et=W}else et=st;let{rgb:kt,L:Rt}=N(st),Zt=kt.map(z=>Math.round(z)),U=K(st),it=y.alpha<1?`rgba(${Zt.join(", ")}, ${y.alpha})`:`rgb(${Zt.join(", ")})`,H=Math.abs(Rt-w)*100;return p(it,{rgb:Zt,ratio:U,startRatio:x,deviation:H,derived:!0,overridden:!1,reachable:xt})},M_=(t,e,n={},r)=>Gd(t,e,{...n,meta:!0},r);M();M();var SN=t=>{let n=O().spacing||{},r=parseFloat(t.spacingRatio),o={...n,ratio:Number.isFinite(r)?r:n.ratio,sequence:{},scales:{}};return ce(o),o},xN=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;vt(n,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),ce(n),vr(t,e)}},al=t=>{let e=t.toLowerCase(),n=e.includes("width")||e.includes("height"),r=e.includes("border")||e.includes("outline");return n&&!r},cl=()=>{let t=O(),{spacing:e}=t;ce(e),Nn(e),xN(e)},kN=t=>{let e=O(),{spacing:n}=e;return!t||!t.sequence?n:Object.keys(t.sequence).length>0?t:ce(t)},Tt=(t,e="padding",n,r)=>{let o=kN(n);if(v(t)){if(!r&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!r&&t.includes("(")){let i=$n(t);r=i[0],t=i[1]}}let s=r?[t]:v(t)&&t.includes("(")?at(t):wo(t);if(L(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)=>Sn(s[f],e+l+i,o,r);return a[s.length].map((l,f)=>c(l,f))}return Sn(t,e,o,r)}},Fe=(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=$n(i);r=a[0],i=a[1]}if(t.spacingRatio){let a=SN(t);return Tt(i,e,a,r)}return Tt(i,e,s,r)},ll=t=>{let e=n=>{let r=["+","-","*","/"].includes(n),o=gs.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(" ")};M();var Oo=(t,e,n)=>!v(t)||xe.test(t)?t:Je(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=Co(()=>ot(o,e));if(Qe(s))return s;if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em"||o==="inset"||o==="none"||xo.has(o.toLowerCase()))return o;n&&n(o);let i=Tt(o,"shadow");return i&&i.shadow?i.shadow:o}).join(" "))).join(", "),Pr=(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(L(t)){let a={"@light":Pr(t[0],e,"light"),"@dark":Pr(t[1],e,"dark")};return o.useVariable&&Rr(a,"shadow",e,o),a}if(E(t)){let a={};for(let c in t)a[c]=Pr(t[c],e,c.startsWith("@")?c.slice(1):c);return o.useVariable&&Rr(a,"shadow",e,o),a}v(t)&&!xe.test(t)&&(t=Oo(t));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(n?`-${n}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},fl=(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(Et(t))return`var(${t})`;let[r]=L(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=Or(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 h=Tr(f,n);if(!h)continue;a[h]={[c]:d}}}return a}return n.verbose&&console.warn("Can't find color",t),t};var vN=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),EN=t=>vN.has(t),Ee=(t,e,n)=>{if(t==null)return;let r=t+"";if(xe.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(Et(s))return`var(${s})`;if(EN(s)||/^\d/.test(s)||s==="0")return s;let i=Co(()=>ot(s,e));if(Qe(i))return i;if(xo.has(s.toLowerCase()))return s;n&&n(s);let a=Tt(s,"border");return a&&a.border?a.border:s}).join(" ")};M();var AN=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"]),_A=["color","Color","background","Background","fill","Fill","stroke","Stroke"],kA=t=>{for(let e=0;e<_A.length;e++)if(t.includes(_A[e]))return!0;return!1},CN={boxShadow:Oo,textShadow:Oo,border:Ee,borderTop:Ee,borderRight:Ee,borderBottom:Ee,borderLeft:Ee,outline:Ee,columnRule:Ee},TN=t=>{if(!t)return!1;let e=Yt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},wA=new Set,ON=(t,e,n,r,o,s)=>{if(!J())return;let i=`${t}::${e}::${n||""}::${r}`;wA.has(i)||(wA.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.`))},F_=(t,e,n,r)=>{let o=CN[e];if(!o)return ot(n,r);let s=null,i=o(n,r,a=>{!s&&TN(a)&&(s=a)});return s&&ON(t,e,r,n,i,s),i},j_=(t,e)=>je(t,e),RN=t=>E(t)&&q(t.value),PN=t=>{for(let e in t){let n=t[e];if(v(n)&&n.startsWith("var(--"))return!0}return!1},ul=(t,e)=>{let n=O();return RN(t)?!n.useVariable&&PN(t)?t:ri(t.value,e):ri(t,e)},vA=(t,e)=>{let n=new Set;for(let r of e){let o=r.slice(0,1);if(!(o==="@"||o==="."||o===":")&&kA(r))for(let s in t){if(n.has(s))continue;let i=t[s]?.[r];if(i===void 0)continue;let a=ot(i,`@${s}`);a!==void 0&&v(a)&&/^[a-z][a-zA-Z]+$/.test(a)&&!AN.has(a)&&n.add(s)}}return n},EA=t=>t.startsWith("[data-theme=")||t.startsWith("@media"),ni=(t,e)=>{for(let n in e){let r=e[n];E(r)?ni(t[n]||(t[n]={}),r):t[n]=r}return t},SA=(t,e,n,r)=>{if(ni(t,{[`[data-theme="${e}"] &`]:n}),e!=="light"&&e!=="dark")return;let o=Tr(e,r);o&&ni(t,{[o]:{[Or(r)]:n}})},AA=(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(kA(t)&&Cr(i)&&Cr(a)){o[t]=i===a?i:`light-dark(${i}, ${a})`;for(let c in e)c==="light"||c==="dark"||SA(o,c,{[t]:e[c]},r)}else{n!==void 0&&(o[t]=n);for(let c of s)SA(o,c,{[t]:e[c]},r)}return o},LN=new Set(["backdropFilter","WebkitBackdropFilter"]),CA=new WeakSet,TA=(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=vA(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]=TA(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 h={},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=F_(e,l,y,`@${m}`);S!==void 0&&(h[m]=S,(s&&m===s||!s&&(m==="light"||g===void 0))&&(g=S))}let p=AA(l,h,g,n);p&&(ni(c,p),c[`.${l}`]=p)}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},$_=(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=vA(t,l);for(let u of l){let d=u.slice(0,1),h=q(r?.[u])||Object.values(t).some(g=>q(g?.[u]));if(d==="."&&h){let g=u.slice(1),p={};for(let y in t)q(t[y]?.[u])&&(p[y]=t[y][u]);let m=q(r?.[u])?r[u]:void 0;c[u]=$_(p,`${e}-${g}`,n,m)}else if(d===":"&&h){let g=u.replace(/^:+/,""),p={};for(let y in t)q(t[y]?.[u])&&(p[y]=t[y][u]);let m=q(r?.[u])?r[u]:void 0;c[u]=$_(p,`${e}-${g}`,n,m)}else if(d!=="@"&&d!=="."&&d!==":"){let p=`--${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,k={};for(let x of y){if(f.has(x))continue;let w=t[x]?.[u];if((w===void 0||q(w))&&(w=m),w===void 0)continue;let _=F_(e,u,w,`@${x}`);if(_===void 0)continue;b=!0,k[x]=_,(a&&x===a||!a&&(x==="light"||S===void 0))&&(S=_);let A=`[data-theme="${x}"]`;if(s[A]||(s[A]={}),s[A][p]=_,x==="dark"||x==="light"){let C=`@media (prefers-color-scheme: ${x})`;s[C]||(s[C]={}),s[C][p]=_}}if(S!==void 0&&(o[p]=S),!b)continue;if(LN.has(u)){let x=AA(u,k,S,n);x&&(ni(c,x),c[`.${u}`]=x);continue}c[u]=`var(${p})`,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)EA(u)&&q(c[u])&&CA.add(c[u]);return c},ri=(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=$_(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=TA(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 h=u==="@"&&f;i[f]=ri(d,e,f,r||h)}else if(!a){let h=F_(e,f,d,r),g=[...new Set([r,n].filter(S=>S).map(S=>S.slice(1)))],p=g.length?"-"+g.join("-"):"",y=`--${o.varPrefix?o.varPrefix+"-":""}theme-${e}${p}-${f}`;o.useVariable?(o.useThemeSuffixedVars&&(s[y]=h),i[f]=`var(${y})`):i[f]=h,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)&&Et(t)){let u=o.theme[t.slice(2)];return je(u,r)}return i},N_=(t,e)=>{let n={};for(let r in t){let o=r.slice(0,1);if(q(t[r]))if(EA(r)&&(e||CA.has(t[r])))n[r]=ni({},t[r]);else{if(o==="@")continue;o===":"?n[`&${r}`]=N_(t[r],e):o==="."&&(n[`&${r}`]=N_(t[r],e))}else n[r]=t[r]}return n},OA=(t,e)=>{let n=e.shift();return t[n]?OA(t[n],e):t},xA=(t,e)=>L(e)?OA(t,e):v(e)&&t[e]?t[e]:t;var je=(t,e)=>{let n=O();if(v(t)&&Et(t)&&(t=je(t.slice(2))),!t||!v(t)){n.verbose&&console.warn(`${t} - Theme is not a string`);return}let[r,...o]=L(t)?t:t.split(" "),s=n.theme[r];return s&&o.length?s=xA(s,o):s&&e&&(s=xA(s,e)),N_(s,!n.useVariable)};M();M();var dl=(t,e)=>{let n=O(),r=`--font-${e}`;if(!t||L(t)&&!t[0])return;let o;if(t.isVariable){let s=$e(t.url,n.files)||t.url;Gs(s)?o=Ys(s):o=kr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap",unicodeRange:t.unicodeRange})}else if(t[0])o=vo(e,t,n.files);else{let s=Array.isArray(t.url)?t.url.map(i=>$e(i,n.files)||i):$e(t.url,n.files)||t.url;o=kr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch,unicodeRange:t.unicodeRange})}return{var:r,value:t,fontFace:o}},DN=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"]),IN=t=>DN.has(t.toLowerCase())||/[\s,'"(]/.test(t.trim()),RA=new Set,pl=(t,e)=>{let n=O(),{fontFamily:r}=n,o=e||r,s=In(o,t);if(s!==void 0||t==null||t===""||t==="default")return s;if(!v(t))return In(o);if(!IN(t))return Rn()&&!RA.has(t)&&(RA.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}'"\`).`)),In(o)},oi=(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=wo(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}};M();var Yd=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:h,h1Matches:g,unit:p}=t;vt(i,{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),y=i.unit||p,S=!i.unit&&m.has(p)?"rem":y,b=r[c],k="@media "+(b==="print"?`${b}`:`screen and ${b}`);if(n.templates[k]={fontSize:i.base/n.browserDefault+S},!a){vt(i,{sequence:{},scales:{},vars:{}}),ce(i),vr(t,o);continue}vt(i,{sequence:{},scales:{},templates:{},vars:{}}),ce(i),vr(t,o)}},Xd=t=>{let e=O();if(t.h1Matches){let n=t.unit,r=rl(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}}}},hl=()=>{let t=O(),{typography:e}=t;ce(e),Xd(e),Nn(e),Yd(e)},gl=t=>{let e=O(),{typography:n}=e;return Sn(t,"fontSize",n)};M();var ml=t=>{if(!v(t))return;let n=O().shape;if(n)return n[t]!==void 0?n[t]:n[t.toLowerCase()]};M();var yl=()=>{let t=O(),{timing:e}=t;ce(e),Nn(e)},Ae=t=>{let e=O(),{timing:n}=e;return n[t]||n[_o(t)]||t},le=(t,e="timing")=>{let n=O(),{timing:r}=n;return Sn(t,e,r)};M();var bl=()=>{let t=O(),{fontFamily:e,theme:n,typography:r}=t,o=t.document;return Tn(o)?(ar(t,"document",o),o=t.document={}):o||(o=t.document={}),vt(o,{theme:n.document,fontFamily:In(e),fontSize:r.base,lineHeight:r.lineHeight})};M();var V_={document:ut},PA=new WeakMap,LA=new WeakMap,MN=128,DA=1048576,B_=8192,z_=t=>t.nodeType===1&&t.localName==="symbol"&&t.getAttribute("id"),$A=t=>t.nodeType===8||t.nodeType===3&&!t.textContent.trim(),$N=(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},U_=(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},NN=(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)},si=(t,e)=>{let n=O();if(!t){n.verbose&&console.warn("setSVG: val is not defined",e);return}return n.useSvgSprite?il(e,t):t},_l=(t,e=V_)=>{let n=O(),r=Object.keys(t).length?{}:n.svg;for(let o in t)r[o]=t[o];FA(r,e)},Ro=(t,e)=>{let n=O();return n.useIconSprite&&!n.semanticIcons?.[e]?si(t,e):t},Po=(t,e=V_)=>{let n=O(),r=Object.keys(t).length?{}:n.icons;for(let o in t)r[o]=t[o];FA(r,e)},NA=(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},FN=(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},jN=(t,e,n)=>{let r=String(n),o=LA.get(e),s=o?.entries.get(r);if(s)return o.entries.delete(r),o.entries.set(r,s),s.root;let i=FN(t,r);if(i||(i=NA(t,{isRoot:!1}),i.innerHTML=r),r.length>DA)return i;let a=$N(i,B_);if(a>B_)return i;for(o||(o={entries:new Map,units:0,nodes:0},LA.set(e,o));o.entries.size>=MN||o.units+r.length>DA||o.nodes+a>B_;){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},IA=t=>{let e=new Map;for(let n of t.children){let r=z_(n);if(!r)continue;let o=e.get(r)||[];o.push(n),e.set(r,o)}return e},BN=t=>t.replace(/["\\\u0000-\u001f\u007f]/g,e=>`\\${e.charCodeAt(0).toString(16)} `),MA=(t,e,n,r)=>{let o=0,s=e.childElementCount>8?IA(n):null,i=a=>{if(!s)try{return[...n.querySelectorAll(`symbol[id="${BN(a)}"]`)].filter(c=>c.parentNode===n)}catch{s=IA(n)}return s.get(a)};for(let a of e.childNodes){if($A(a))continue;let c=z_(a);if(!c&&r){let u=o++,d=r.nodes[u];if(!d&&r.complete||d?.parentNode===n)continue;let h=U_(t,d||a);n.appendChild(h),r.nodes[u]=h;continue}let l=c&&i(c),f=l&&l[0];if(!f)f=U_(t,a),n.appendChild(f);else if(!f.isEqualNode(a)){let u=U_(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])}},FA=(t,e=V_)=>{let n=O(),r=e.document||ut;if(!r||!r.documentElement)return n.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),sl(t);let o=r.querySelector("#svgSprite"),s="";for(let d in t)s+=t[d];let i=o||NA(r);if(!i||!i.nodeType)return;let a=d=>jN(r,i,d),c=a(s),l=PA.get(i);l||PA.set(i,l=new WeakMap);let f=l.get(n);if(f||l.set(n,f=new Map),[...c.childNodes].some(d=>!$A(d)&&!z_(d))){let d=[];for(let h in t)d.push(h);for(let h of d){let g=f.get(h);g||f.set(h,g={nodes:[],complete:!1}),MA(r,d.length===1?c:a(t[h]),i,g),g.complete=!0}}else{MA(r,c,i);for(let d in t)f.has(d)||f.set(d,{nodes:[],complete:!0})}o||NN(r.body,i);for(let d in t)n.__svgCache[d]=!0};M();var wl=(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?je("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?je("document"):{};if(o.html&&Jt(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,h=f.browserDefault||n.browserDefault,g=l.slice(1),p=c[g];if(!p)continue;let m="@media "+(p==="print"?p:"screen and "+p);o[m]||(o[m]={}),o[m].html||(o[m].html={}),o[m].html.fontSize=d/h+u}}return ct(vt(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}},ve)};M();var UN=new Set(["fallback"]),H_=new Set,jA=(t,e)=>{H_.has(t)||(H_.add(t),J()&&console.warn(e))},W_=()=>{H_.clear()},BA=t=>{for(let e in t)delete t[e];return t},Sl=()=>{let t=O(),e=E(t.cssSkinVars)?BA(t.cssSkinVars):t.cssSkinVars={},n=E(t.cssSkinFallback)?BA(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(UN.has(u))continue;let d=l[u];if(E(d))for(let h in d){let g=`--${o}theme-${u}-${h}`;t.useVariable!==!1&&!(g in i)&&jA(`${c}/${u}/${h}`,`[scratch] skin "${c}" rewrites theme "${u}" param "${h}", which the theme does not declare \u2014 no element reads ${g}, so the skin changes nothing there. Declare "${h}" on the "${u}" theme (its no-skin value).`),f[g]=a(d[h])}}e[c]=f,v(l.fallback)&&(n[c]=l.fallback)}for(let c in n){let l=n[c];e[l]||(jA(`${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},UA=(t,e)=>{let n=`[data-skin="${t}"]`;return!e||e===":root"?`:root${n}, ${n}`:`${e}${n}, ${n} ${e}, ${e} ${n}`},Lo=(t,e,n)=>{let r={};if(!E(t))return r;for(let s in t)r[UA(s,n)]=t[s];let o={};for(let s in e||{}){let i=t[e[s]];i&&(o[UA(s,n)]=i)}return Object.keys(o).length&&(r["@media (prefers-reduced-transparency: reduce)"]=o),r};M();var VN=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),xn=t=>Ee(t),Zd=t=>{if(v(t))return xe.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(Et(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let n=ot(e);return Qe(n)?n:e}).join(" ")},Qd=(t,e)=>fl(t,e),xl=(t,e)=>{if(v(t))return xe.test(t)?t:Je(t).map(n=>(n=n.trim(),n?n.split(/\s+/).map(r=>{if(r=r.trim(),!r)return"";if(Et(r))return`var(${r})`;if(r==="inset"||r==="none")return r;let o=ot(r);if(Qe(o)){let i=jt(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=Tt(r,"shadow");return s&&s.shadow?s.shadow:r}).join(" "):"")).join(", ")},kl=(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=Je(o).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||VN.has(f)||f==="transparent"||xe.test(f))return f;let u=ot(f);return Qe(u)?u:f}).join(" ")));return r+a.join(", ")+s},Jd=(t,e)=>{if(!v(t))return;let n=O();return Je(t).map(r=>{let o=r.trim();if(Et(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(n.gradient?.[o]){let s=jt(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")?kl(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!Yt(o)?`url(${o})`:o}).join(", ")},tp=t=>v(t)&&at(t).map(e=>Tt(e,"gap").gap).join(" "),ep=t=>{if(!v(t))return t;let e=O();return at(t).map(n=>wn.test(n)?Ao(n,e.spacing):n).join(" ")},q_=t=>{if(!v(t))return;let e=t.split(" ");return e.length?e.map(n=>Et(n)?`var(${n})`:n.length<3||n.includes("ms")?le(n).timing||n:Ae(n)?Ae(n):n).join(" "):t},vl=(t,e,n)=>{if(v(t))return t.split(",").map(r=>le(r).timing||r).join(",")},np=t=>{if(!v(t))return;let e=t.split(",");if(e.length)return e.map(q_).join(",")};function At(t,e,n={},r={}){let o=ht.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=$n(o);s=c[0],o=c[1]}let i=n.scaleBoxSize,a=al(t);!i&&a&&!r.ratio&&(o=ll(o))}return r.ratio?Fe(n,t,o,s):Tt(o,t,void 0,s)}var F=(t,e=null,n)=>At(t,e,n,{ratio:!0}),zN=(t,e,n)=>v(t)?at(t).map(r=>wn.test(r)?Fe(e,n,r)[n]:r).join(" "):t,Fn=(t,e,n,r="borderRadius")=>{if(v(t))return{[r]:at(t).map(o=>{let s=ml(o);return s!==void 0?zN(s,e,n):Fe(e,n,o)[n]}).join(" ")}};M();var ai="__smblsThemeRootOwner",ci=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)},VA=(t,e,n)=>{if(!(!t||!e)){ci(t),t.__prefersListener=n,t.__prefersMq=e;try{e.addEventListener("change",n)}catch{e.addListener(n)}}},HN=(t,e)=>{let n=O(),{cssVars:r}=n,o=e.startsWith("--")?e:`--${e}`;return r[o]=t,t},te=t=>t,WN=(t,e)=>{if(v(t)||oe(t)){let n=O();if(n.cssVars&&e){let r=n.varPrefix?n.varPrefix+"-":"";n.cssVars[`--${r}size-${e}`]=t}}return t},rp={color:Ar,gradient:ei,font:dl,fontFamily:oi,fontfamily:oi,theme:ul,icons:Ro,semanticIcons:te,semanticicons:te,svg:si,svgData:te,typography:te,shadow:Pr,spacing:te,media:te,grid:te,class:te,timing:te,reset:te,unit:te,animation:te,vars:HN,sizes:WN,shape:te,skins:te,viewTransition:te},qN=(t,e,n,r)=>{ar(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},K_=(t,e,n)=>{let r=O(),o=Xc(t),s=o.toLowerCase(),i=r[o]||r[s]||r[t],a=Tn(i)?qN(r,i,s,[o,s,t]):i,c=rp[o]||rp[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")},G_=(t,e)=>{let n=O(),r=t.toLowerCase();return Tn(e)?(ar(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])||L(e[s])?1:0,c=E(e[i])||L(e[i])?1:0;return a-c}).forEach(s=>{try{return K_(r,e[s],s)}catch(i){n.verbose&&console.warn("Error setting",r,"value",e[s],s,i)}}),n[r]||n[t])},op=(t,e)=>{let n=e||O();n.globalTheme=t;let o=hs(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[ai]=n,c)ci(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",VA(n,f,l)}else ci(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},KN={},Do=(t,e=KN)=>{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:h,semanticIcons:g,hoverMedia:p,focusableRing:m,files:y,assets:S,...b}=t;e.newConfig&&(n=zd(e.newConfig)),Cn(b.document)&&(n.__domDocument=b.document,delete b.document),Cn(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),h!==void 0&&(n.useDefaultConfig=h),g!==void 0&&(n.semanticIcons=g),p!==void 0&&(n.hoverMedia=p),m!==void 0&&(n.focusableRing=m),n.verbose&&console.log(n);let x=hs(n)||(typeof document<"u"?document:null),w=x&&x.defaultView||(typeof window<"u"?window:null),_=x&&(n.themeRoot||x.documentElement);if(_&&typeof _.setAttribute=="function")if(n.globalTheme&&n.globalTheme!=="auto")ci(n),_.setAttribute("data-theme",n.globalTheme),n.resolvedTheme=n.globalTheme,_[ai]=n,n.globalTheme==="dark"||n.globalTheme==="light"?_.style.colorScheme=n.globalTheme:_.style.colorScheme="light dark";else if(_[ai]&&_[ai]!==n&&_.hasAttribute("data-theme"))ci(n),n.resolvedTheme=_.getAttribute("data-theme");else if(w&&w.matchMedia){let N=et=>{let st=et.matches?"dark":"light";_.setAttribute("data-theme",st),n.resolvedTheme=st},K=w.matchMedia("(prefers-color-scheme: dark)");N(K),_.style.colorScheme="light dark",_[ai]=n,VA(n,K,N)}else ci(n),_.setAttribute("data-theme","light"),n.resolvedTheme="light",_.style.colorScheme="light",_[ai]=n;n.__svgCache||(n.__svgCache={}),Js(b);let A=Object.keys(b).filter(I=>!I.startsWith("__")),C=new Set(A);A.forEach(I=>{let N=I.toLowerCase();N!==I&&C.has(N)&&ct(b[N],b[I],ve)});let D=new Set;if(A.forEach(I=>{let N=I.toLowerCase(),K=N!==I&&C.has(N)?N:I;D.has(K)||(D.add(K),G_(K,b[K]))}),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{hl()}catch(I){n.verbose&&console.warn("Error applying typography sequence",I)}if(b.spacing)try{cl()}catch(I){n.verbose&&console.warn("Error applying spacing sequence",I)}if(b.timing)try{yl()}catch(I){n.verbose&&console.warn("Error applying timing sequence",I)}try{Sl()}catch(I){n.verbose&&console.warn("Error applying skins",I)}bl();let $=wl();return $&&(n.reset=$),n};var V=(t,e)=>e.split(" ").map(n=>t+"-"+n),Z_="top right bottom left",Q_=Z_+" block block-start block-end inline inline-start inline-end",fe="start end",Bn="width style color",sp=t=>V(t,Q_),GN=(()=>{let t=V("border","width style color image");for(let e of Q_.split(" "))t.push("border-"+e,...V("border-"+e,Bn));return t})(),zA=t=>[...V("border-"+t,Bn+" start end"),...V("border-"+t+"-start",Bn),...V("border-"+t+"-end",Bn)],_t={animation:V("animation","name duration timing-function delay iteration-count direction fill-mode play-state timeline range range-start range-end"),background:V("background","image position position-x position-y size repeat origin clip attachment color"),border:GN};for(let t of["width","style","color"])_t["border-"+t]=Q_.split(" ").map(e=>"border-"+e+"-"+t);for(let t of Z_.split(" "))_t["border-"+t]=V("border-"+t,Bn);_t["border-block"]=zA("block");_t["border-inline"]=zA("inline");Object.assign(_t,{"border-image":V("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:V("column","width count"),"column-rule":V("column-rule",Bn),container:V("container","name type"),"contain-intrinsic-size":V("contain-intrinsic","width height"),flex:V("flex","grow shrink basis"),"flex-flow":V("flex","direction wrap"),font:[...V("font","style variant weight stretch size"),"line-height",...V("font","family size-adjust kerning feature-settings variation-settings optical-sizing")],gap:["row-gap","column-gap"],grid:V("grid","template template-rows template-columns template-areas auto-rows auto-columns auto-flow"),"grid-template":V("grid-template","rows columns areas"),"grid-area":V("grid","row column row-start row-end column-start column-end"),"grid-row":V("grid-row",fe),"grid-column":V("grid-column",fe),inset:[...Z_.split(" "),...V("inset","block block-start block-end inline inline-start inline-end")],"inset-block":V("inset-block",fe),"inset-inline":V("inset-inline",fe),"list-style":V("list-style","type position image"),margin:sp("margin"),"margin-block":V("margin-block",fe),"margin-inline":V("margin-inline",fe),mask:V("mask","image mode repeat position clip origin size composite"),offset:V("offset","position path distance rotate anchor"),outline:V("outline",Bn),overflow:V("overflow","x y"),"overscroll-behavior":V("overscroll-behavior","x y"),padding:sp("padding"),"padding-block":V("padding-block",fe),"padding-inline":V("padding-inline",fe)});for(let t of["content","items","self"])_t["place-"+t]=["align-"+t,"justify-"+t];Object.assign(_t,{"scroll-margin":sp("scroll-margin"),"scroll-padding":sp("scroll-padding"),"text-decoration":V("text-decoration","line style color thickness"),"text-emphasis":V("text-emphasis","style color"),transition:V("transition","property duration timing-function delay behavior")});var YN="block-start block-end inline-start inline-end".split(" ");for(let t of YN)_t["border-"+t]=V("border-"+t,Bn);for(let t of["block","inline"])for(let e of Bn.split(" "))_t["border-"+t+"-"+e]=V("border-"+t,fe.split(" ").map(n=>n+"-"+e).join(" "));Object.assign(_t,{"animation-range":V("animation-range",fe),"background-position":V("background-position","x y"),"font-variant":V("font-variant","alternates caps east-asian emoji ligatures numeric position"),"font-synthesis":V("font-synthesis","weight style small-caps"),marker:V("marker","start mid end"),"position-try":V("position-try","order fallbacks"),"scroll-margin-block":V("scroll-margin-block",fe),"scroll-margin-inline":V("scroll-margin-inline",fe),"scroll-padding-block":V("scroll-padding-block",fe),"scroll-padding-inline":V("scroll-padding-inline",fe),"scroll-timeline":V("scroll-timeline","name axis"),"view-timeline":V("view-timeline","name axis inset"),"text-box":V("text-box","trim edge"),"text-wrap":V("text-wrap","mode style"),"white-space":["white-space-collapse","text-wrap-mode"]});_t.font.push("font-language-override");var jn=t=>"corner-"+t+"-shape";_t["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(jn);Object.assign(_t,{"corner-top-shape":["top-left","top-right"].map(jn),"corner-right-shape":["top-right","bottom-right"].map(jn),"corner-bottom-shape":["bottom-left","bottom-right"].map(jn),"corner-left-shape":["top-left","bottom-left"].map(jn),"corner-block-start-shape":["start-start","start-end"].map(jn),"corner-block-end-shape":["end-start","end-end"].map(jn),"corner-inline-start-shape":["start-start","end-start"].map(jn),"corner-inline-end-shape":["start-end","end-end"].map(jn)});for(let t in _t){let e=_t[t],n=new Set(e);for(let r=0;r<e.length;r++){let o=_t[e[r]];if(o)for(let s of o)n.has(s)||(n.add(s),e.push(s))}}var Be={};for(let t in _t)for(let e of _t[t])(Be[e]||(Be[e]=[])).push(t);var X_=new Map,HA=t=>{let e=X_.get(t);if(e!==void 0)return e;X_.set(t,0),e=0;let n=Be[t];if(n)for(let r=0;r<n.length;r++)e=Math.max(e,HA(n[r])+1);return X_.set(t,e),e};function li(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(Be,e)?HA(e):0}var XN=/^(?: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)$/,ZN=/^(?:border(?:-(?:top|right|bottom|left|block|inline)(?:-(?:start|end))?)?|outline|column-rule)$/,QN=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","auto"]),JN=t=>at(String(t).replace(/\s*!important\s*$/,""));function El(t,e,n){let r=_t[t];if(!r||r.indexOf(n)===-1)return!1;if(XN.test(t))return!0;if(!ZN.test(t)||typeof e=="function"||e==null||n.indexOf("border-image")===0)return!1;let o=JN(e);return o.length>=3?!0:/-style$/.test(n)&&o.some(s=>QN.has(s.toLowerCase()))}var di=new Map,sC=null,J_=null,tF=null;function Cl(t){t.batchAtomicCss&&(J_=t.batchAtomicCss),t.compoundCssClass&&(tF=t.compoundCssClass)}var eF=new Set,qA=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function cw(t){try{let e=O();e&&(e.__domDocument=t)}catch{}t&&eF.add(t)}function Vn(){try{let t=O();if(t){if(qA(t.__domDocument))return t.__domDocument;if(qA(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var ue={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function pp(){return{...ue}}function lw(){for(let t in ue)ue[t]=0;fp=!1}var fp=!1,cp=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function nF(t){let e=Date.parse(t);if(!isFinite(e))return"";let n=Math.floor((Date.now()-e)/864e5);return n<1?" (today)":` (${cp(n,"day")} ago)`}function rF(){try{let t=gF();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 oF(t,e){if(fp)return!1;fp=!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 ${cp(ue.variable,"variable rule")} and ${cp(ue.atomic,"atomic rule")}, while the design system held ${cp(e,"CSS variable")}.
|
|
44
|
+
src: ${i};`},Vr=(t,e,n,r)=>`@font-face {${Vl(t,e,n,r)}
|
|
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=>Ve(d,n)||d):Ve(s,n)||s;return Vl(t,u,i,{fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f})}),nS=t=>Object.keys(t).map(n=>Go(n,t[n].value)),Jp=(t,e,n)=>{if(e&&e.isVariable){let s=Ve(e.url,n)||e.url;return Bi(s)?Ui(s):Vr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap",unicodeRange:e.unicodeRange})}if(e[0])return Go(t,e,n).map(Zp);let o=Array.isArray(e.url)?e.url.map(s=>Ve(s,n)||s):Ve(e.url,n)||e.url;return Vr(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch,unicodeRange:e.unicodeRange})},Hl=(t,e)=>Object.keys(t).map(r=>Jp(r,t[r].value,e));M();M();M();M();Rt();var Vi={};F(Vi,{animation:()=>_S,breakpoints:()=>yS,class:()=>vS,color:()=>fS,devices:()=>bS,document:()=>JT,font:()=>oS,fontFace:()=>aS,fontFamily:()=>sS,fontFamilyTypes:()=>iS,gradient:()=>uS,grid:()=>kS,icons:()=>hS,media:()=>cS,reset:()=>QT,semanticIcons:()=>gS,sequence:()=>tr,shadow:()=>pS,shape:()=>CS,sizes:()=>AS,skins:()=>TS,spacing:()=>lS,svg:()=>wS,svgData:()=>SS,templates:()=>xS,theme:()=>dS,timing:()=>mS,typography:()=>zl,unit:()=>rS,vars:()=>ES,viewTransition:()=>OS});var tr={"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 rS={default:"em"};var _3={browserDefault:16,base:16,type:"font-size",ratio:tr["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},zl=_3;var oS={};var sS={},iS={"sans-serif":"Helvetica, Arial, sans-serif",serif:"Times New Roman, Georgia, serif",monospace:"Courier New, monospace"},aS={};var cS={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var w3={base:zl.base,type:"spacing",ratio:tr.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},lS=w3;var fS={},uS={};var dS={};var pS={};var hS={},gS={};var S3={default:150,base:150,type:"timing",ratio:tr["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},mS=S3;var JT={};var yS={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},bS={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 _S={};var wS={},SS={};var xS={};var x3={},kS=x3;var vS={};var QT={},ES={},AS={},CS={},TS={},OS={};var eh={},nh={},Pe=new Set,Qp=Vi,th={},Kl=t=>t.replace(/_([a-z])/g,(e,n)=>n.toUpperCase());for(let t in Qp){let e=t.toLowerCase();th[e]=Qp[t];let n=Kl(e);n!==e&&(th[n]=Qp[t]),e!==t&&(th[t]=Qp[t])}var Yo={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:eh,cssMediaVars:nh,CSS_VARS:eh,CSS_MEDIA_VARS:nh,cssSkinVars:{},cssSkinFallback:{},_scratchConfig:!0,...th},Hi=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return jt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let n=jt(e)?e:t.globalTheme,r=nn(jt(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},t1=t=>t?Hi(t):null,zi=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return jt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let n=jt(e)?e:t.resolvedTheme,r=nn(jt(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},e1=t=>t?zi(t):null;Hi(Yo);zi(Yo);var Wl=pt(Yo),Re={active:"0",0:Yo},n1=t=>(jt(t)&&(Re.active=t),Re[t||Re.active]),ql=[],bt=t=>{t&&t._scratchConfig&&ql.push(t)},mt=()=>{ql.pop()},O=t=>ql.length?ql[ql.length-1]:Re[t||Re.active]||Yo,rh=t=>{if(A(t))return Re.active="1",Re[1]=dt(t,pt(Wl),Pe),Wi(Re[1]),Hi(Re[1]),zi(Re[1]),t},k3=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],v3=["useVariable","globalTheme","verbose"],E3=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],Wi=t=>{for(let e of E3){let n;for(let r of e){let o=t[r];A(o)&&(n=n?dt(n,o,Pe):o)}if(n)for(let r of e)A(t[r])&&(t[r]=n)}},r1=t=>(t.cssVars={},t.cssMediaVars={},t.CSS_VARS=t.cssVars,t.CSS_MEDIA_VARS=t.cssMediaVars,t.cssSkinVars={},t.cssSkinFallback={},t._scratchConfig=!0,Wi(t),Hi(t),zi(t),t),oh=()=>r1(pt(Wl)),Gl=(t,e,{cleanBase:n=!1}={})=>{let r=n?null:O(),o=pt(!n&&r&&r._scratchConfig?r:Wl);for(let i of k3)delete o[i];for(let i of v3)Object.prototype.hasOwnProperty.call(Wl,i)?o[i]=Wl[i]:delete o[i];let s=r1(dt(e||{},o,Pe));return t&&(Re[t]=s),s};var Pn=/^-?[A-Z][0-9]?$/,Rn={"-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"},PS=(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=o1.has(e.unit)?"rem":e.unit;e.vars[r]=s+c},er=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)]},RS="\0",A3=(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+=RS+e.length+RS,e.push(o),o=""))}return n+o},C3=(t,e)=>t.indexOf(RS)===-1?t:t.replace(/\u0000(\d+)\u0000/g,(n,r)=>e[Number(r)]),T3=/^(calc|min|max|clamp)\((.*)\)$/,O3=(t,e)=>{let n=T3.exec(t);return n?`${n[1]}(${Ql(n[2],e)})`:t.indexOf("(")!==-1?t:Xo(t,e)},o1=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Yl=(t,e)=>{let{base:n,type:r,unit:o}=e,s=o1.has(o)?"rem":o,i=(So(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=Rn[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=Rn[t+1],u=Math.abs(t),d=Math.pow(s1,2*u),p=Rn[u];return p?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${p}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},sh=(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}))`},Xl=(t,e)=>{let r=(t*e-t)/1.618,o=t*e-r,s=t+r,i=(o+s)/2;return[o,i,s]},Zl=(t,e)=>Xl(t,e).map(n=>n/t),Jl=(t,e)=>{let{key:n,base:r,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[u,d,p]=Xl(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),_=a+(h+1)/10,S=sh(h+1,f,i,e),v={key:n+(h+1),variable:y,value:g,scaling:m,scalingVariable:S,index:_};PS(v,e)})},s1=1.618,R3=(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(s1,2*r);return Math.max(o,s)},ye=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=Rn[f],d=R3(f,n,r),p=~~(d/n*100)/100,g=c+u,h=Yl(f,t),m={key:u,variable:g,value:d,base:n,scaling:p,scalingVariable:h,ratio:r,index:f};PS(m,t),s&&Jl(m,t)}return t},DS=(t,e=0)=>{let{type:n,base:r,ratio:o,subSequence:s}=t,i=E(e)?e:Rn[e],a=E(e)?Object.entries(Rn).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=Yl(a,t),h={key:i,variable:p,value:l,base:r,scaling:f,scalingVariable:g,ratio:o,index:a};return PS(h,c),s&&Jl(h,c),c},qi=(t,e)=>{if(!t||!E(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)`},Xo=(t="A",e)=>{let n=O(),{unit:r}=n;if(E(t)&&$t(t))return`var(${t})`;if(E(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(E(t)){let S=qi(n.sizes,t);if(S!==void 0)return S}let{sequence:o,unit:s=r.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(hc(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+"-":""}${Il(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=S=>a.test(S)?`var(${d}${S}${m})`:S;if(h.includes("+")){let[S,v]=h.split("+"),x=`${y(S)} + ${y(v)}`;return g?`calc((${x}) * -1)`:`calc(${x})`}else if(h.includes("*")){let[S,v]=h.split("*"),x=`${y(S)} * ${y(v)}`;return g?`calc((${x}) * -1)`:`calc(${x})`}else if(h.includes("-")){let[S,v]=h.split("-"),x=`${y(S)} - ${y(v)}`;return g?`calc((${x}) * -1)`:`calc(${x})`}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 S=`var(${d}${h}${m})`;return g?`calc(${S} * -1)`:S}let _=o?o[h]:null;if(!_){if(console.warn("can't find",o,h),tt())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+_.val+s:g+_.scaling+s},Ql=(t,e)=>{if(!["+","-","*","/",","].filter(i=>t.includes(i+" ")).length)return t;let r=/(\s+-\s+|\s*[+*/,]\s*)/,o=[];return A3(t,o).split(r).map(i=>{let a=C3(i,o),c=a.trim();return!c||["+","-","*","/",","].includes(c)?a:O3(c,e)}).join("")},Dn=(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=er(t);r=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Ql(t,n):t=Xo(t,n),{[e]:r?`${r}(${t})`:t}},ih=(t,e)=>Rn[t-e],tf=t=>{let{h1Matches:e,sequence:n}=t;return new Array(6).fill(null).map((r,o)=>{let s=ih(e,o);return n[s]})};M();var LS=(t,e)=>{let n=O(),{cssVars:r}=n;V(t.value)||(r[t.var]=t.value)},ef=(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]=Zl(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})`},i1=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),nr=(t,e={})=>{let n=O(),{unit:r,timing:o,cssVars:s}=n,i=t.unit||r.default,a=i1.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||ef(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"})`)}},Hr=(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=i1.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}`]={}),ef(h,c,n);let m=t.unit||o.default;if(f!==m&&d)for(let y in d){let _=d[y],S=p[y]+f;h[_.variable+"_default"]=S,h[_.variable]=S}return}for(let h in d){let m=d[h],y=(So(f)?p[h]:d[h].val)+f;!g&&r.verbose&&console.warn("Can't find query ",g);let _=i[`@media ${g}`];_||(_=i[`@media ${g}`]={}),_[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=y}};M();var c1=Kn(),nf=t=>{let e=O(),n="";for(let r in t)e.__svgCache[r]||(e.__svgCache[r]=!0,n+=t[r]);return n},P3=t=>{let e=t&&(t.default||t);if(!E(e))return c1&&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},{}):{}},D3=(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},a1=new Set,rf=(t,e)=>{let n=e&&e.default?e.default:e;if(!E(n))return c1&&!a1.has(t)&&(a1.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=P3(e),{width:s,height:i}=o,a=o.viewBox||`0 0 ${s||24} ${i||24}`,f=D3(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=M3(f),f},L3="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",I3=new RegExp(`<(${L3})\\b([^>]*?)\\s*/>`,"g"),M3=t=>t.replace(I3,"<$1$2></$1>");var Ji={};F(Ji,{STANDARD_SCHEME_QUERIES:()=>ch,__resetSkinWarnings:()=>qS,appendSVGSprite:()=>wf,appendSvgIconsSprite:()=>rs,applyDocument:()=>_f,applyHeadings:()=>ph,applyReset:()=>Sf,applySkins:()=>xf,applySpacingSequence:()=>af,applyTimingSequence:()=>bf,applyTypographySequence:()=>gf,atSchemes:()=>Kr,buildSkinVarStyles:()=>os,checkIfBoxSize:()=>sf,colorPairSchemes:()=>of,forcedScheme:()=>Qo,getColor:()=>at,getFontFamily:()=>hf,getFontSizeByKey:()=>mf,getMediaBorder:()=>ff,getMediaColor:()=>Vt,getMediaTheme:()=>We,getSafeInk:()=>uh,getSafeInkInfo:()=>$S,getShadow:()=>lf,getShapeByKey:()=>yf,getSpacingBasedOnRatio:()=>ze,getSpacingByKey:()=>Bt,getTheme:()=>BS,getTimingByKey:()=>be,getTimingFunction:()=>De,isPlainColor:()=>qr,literalPairCompound:()=>ts,literalSchemeMap:()=>rr,quietColorProbe:()=>Zo,resolveBorderValue:()=>ae,resolveColorRgb:()=>Jo,resolveShadowNonColorWord:()=>Gi,resolveShadowValue:()=>es,runThroughMedia:()=>dh,schemeGuardSelector:()=>fh,schemeMediaQuery:()=>lh,setAdaptiveSchemeVar:()=>Gr,setColor:()=>Wr,setFont:()=>pf,setFontFamily:()=>Xi,setGradient:()=>Ki,setMediaTheme:()=>Yi,setSVG:()=>Zi,setShadow:()=>Yr,setSvgIcon:()=>ns,setTheme:()=>uf,splitSpacedValue:()=>cf});M();var ch={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},lh=(t,e)=>{let n=e.media&&e.media[t]||ch[t];return n?"@media "+(n==="print"?`${n}`:`screen and ${n}`):null},fh=t=>{let e=t.scopeSelector||":root";return`${e===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`} &`},He=new Set,d1=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"]),$3=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,N3=/gradient\(|url\(|image-set\(|var\(/i,F3=new Set(["transparent","currentColor","currentcolor"]),qr=t=>{if(!E(t))return!1;let e=t.trim();return N3.test(e)?!1:$3.test(e)?!0:d1.has(e)||F3.has(e)},ah=new Set,l1=t=>{if(!t)return!1;let{color:e,gradient:n}=t;return!!(A(e)&&Object.keys(e).length||A(n)&&Object.keys(n).length)},f1=new Set,IS=0,Zo=t=>{IS++;try{return t()}finally{IS--}},j3=(t,e)=>{if(!E(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},MS=(t,e,n)=>{let r=j3(t,n);if(r){if(!f1.has(t)){f1.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)&&l1(n)&&!n.color[o.name]&&!n.gradient[o.name]){if(!IS&&!ah.has(t)){ah.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=E(e)?e.toLowerCase():"";if(!d1.has(s)||!l1(n))return t;if(!ah.has(s)){ah.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.`)}},p1=(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(!E(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if($t(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(I(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):MS(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 MS(t,o,r);if(e)if(l[e]!==void 0)l=l[e];else if(I(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(E(l)){if(He.has(o))return l;He.add(o);try{return at(l,null,n)}finally{He.delete(o)}}let f=l.rgb;if(!f){let u=r.useVariable?`var(${l.var})`:l.value;return(s||i)&&u?p1(u,s,i):u}return i&&!l[i]&&(f=On(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})`},u1=t=>{let e=Ue(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}},B3=(t,e)=>{if(!e)return t;let n=t.rgb;if(e.tone){let o=On(n,e.tone);n=E(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}},Jo=(t,e,n)=>{let r=e||O();if(!E(t))return null;let o=Zt(t);if(o){if(o.passthrough){let d=Ue(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 u1(t);if(E(c)){let d;if(He.has(s))d=u1(c);else{He.add(s);try{d=Jo(c,r,n)}finally{He.delete(s)}}return d?B3(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=On(l,o.tone));let f=E(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}},h1=t=>A(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0),Kr=t=>{let e=[];for(let n in t)n.charCodeAt(0)===64&&e.push(n.slice(1));return e},g1=t=>{if(!A(t)||t.value!==void 0)return null;for(let n in t)if(n!=="var"&&(n.charCodeAt(0)!==64||!h1(t[n])))return null;let e=Kr(t);return e.length?e:null},U3=t=>E(t&&t.var)&&g1(t)!==null,V3=(t,e,n,r,o)=>{let s=g1(e);if(!s)return;if(E(e.var)){let c=`var(${e.var})`;return n||r?p1(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(!(!qr(i)||!qr(a)))return i===a?i:`light-dark(${i}, ${a})`},of=(t,e)=>{if(!t)return null;let n=e||O(),r=Zt(t),o=r?r.name:t,s=o&&n.color&&n.color[o];if(I(s))return["light","dark"];if(!A(s)||s.value!==void 0)return null;let i=Kr(s);return i.length?i:null},rr=(t,e,n)=>{let r={},o=fh(e);for(let s of t){let i=n(s);if(i!==void 0&&(r[`[data-theme="${s}"] &`]=i,s==="light"||s==="dark")){let a=lh(s,e);a&&(r[a]={[o]:i})}}return r},Qo=(t,e)=>t||(e.globalTheme==="auto"?null:e.globalTheme),ts=(t,e,n,{commas:r,resolve:o,resolveScheme:s})=>{let i=Ni(t,r),a=null;for(let f of i)for(let u of f){let d=of(u,n);if(d)for(let p of d)(a||(a=[])).includes(p)||a.push(p)}if(!a)return;let c=f=>Fi(i.map(u=>u.map(d=>{if(!of(d,n))return d;let p=f(d);return E(p)?p:d}))),l=Qo(e,n);return l?o(c(f=>Vt(f,l,n)),l):rr(a,n,f=>s(f,c))},Vt=(t,e,n)=>{let r=n||O();if(e=Qo(e,r),!E(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if($t(t))return`var(${t})`;let o,s,i;if(I(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=V3(t,l,s,i,n);if(u!==void 0)return u}return at(t,`@${e}`,n)}else return rr(Kr(l),r,u=>at(t,"@"+u,n))}else return MS(t,o,r)},Gr=(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(h1(t))return r.useVariable&&t.var&&(r.cssVars[t.var]=t.value),t;if(!r.useVariable&&U3(t))return t;if(E(t)&&$t(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+/),_=r.color[y[0]];if(_&&!_.value&&!_.rgb&&(E(_)||I(_)||A(_))&&!He.has(y[0])){He.add(y[0]);try{r.color[y[0]]=Wr(_,y[0])}finally{He.delete(y[0])}_=r.color[y[0]]}if(_&&_.value){let S=_.rgb,v=y[1]!==void 0?y[1]:"1",x=y[2];x&&(S=On(S,x)),t=`rgba(${S}, ${v})`}else{let S=y[2],v=y[1]!==void 0?y[1]:"1";if(S)try{let x=Ue(y[0]);x&&x.length>=3?t=`rgba(${On(x.slice(0,3).join(", "),S)}, ${v})`:t=y[0]}catch{t=y[0]}else t=y[0]}}}if(I(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&&Gr(h,"color",e,r),h}let s=`--${r.varPrefix?r.varPrefix+"-":""}color-${e}`+(n?`-${n}`:""),i=t.value||t;if(E(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&&(E(m)||I(m)||A(m))&&!He.has(h.name)){He.add(h.name);try{r.color[h.name]=Wr(m,h.name)}finally{He.delete(h.name)}}let y=r.color[h.name];if(y&&y.rgb){let _=y.rgb;h.tone&&(_=On(_,h.tone));let S=h.alpha!==void 0?parseFloat(h.alpha):y.alpha!==void 0?y.alpha:1;i=`rgba(${_}, ${S})`}}}let a=Ue(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}},Ki=(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(E(t)&&$t(t)&&(t=at(t.slice(2))),I(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]=Ki(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return r.useVariable&&Gr(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}};M();var uh=(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=E(e)?e:String(e),p=Zt(t),g=p&&!p.passthrough&&!p.cssVar?p.name:null,h=(J,ft)=>c?{value:J,...ft}:J;if(g){let J=o.color[`${g}Safe`];if(J){let ft=`${d}@${u}`,Y=J[ft]!==void 0?J[ft]:J[d];if(Y!==void 0){let Q=Y&&Y.rgb!==void 0?o.useVariable&&Y.var?`var(${Y.var})`:Y.value:at(Y,null,o);return h(Q,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=at(t,u?`@${u}`:null,o),y=Jo(t,o,u),_=Jo(e,o,u);if(!y||!_)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 S=Ko(_.rgb,_.alpha),v=Ko(y.rgb,y.alpha,S),x=ji(v,S);if(x>=f-.02)return h(m,{ratio:x,deviation:0,derived:!1,overridden:!1});let[w,b,k]=jl(y.rgb),[,C,D]=Bl([w,b,k]),R=zo(S)>.5,$=R?w:1-w,N=J=>{let ft=R?w-J:w+J,Y=Math.max(0,Math.min(1,ft));return{rgb:Ul(Y,C,D),L:Y}},B=J=>{let{rgb:ft}=N(J),Y=Ko(ft.map(Q=>Math.round(Q)),y.alpha,S);return ji(Y,S)},et=0,X=$,st=B(X)>=f;if(st)for(let J=0;J<l;J++){let ft=(et+X)/2;B(ft)>=f?X=ft:et=ft}else et=X;let{rgb:Dt,L:Lt}=N(X),it=Dt.map(J=>Math.round(J)),q=B(X),G=y.alpha<1?`rgba(${it.join(", ")}, ${y.alpha})`:`rgb(${it.join(", ")})`,nt=Math.abs(Lt-w)*100;return h(G,{rgb:it,ratio:q,startRatio:x,deviation:nt,derived:!0,overridden:!1,reachable:st})},$S=(t,e,n={},r)=>uh(t,e,{...n,meta:!0},r);M();M();var H3=t=>{let n=O().spacing||{},r=parseFloat(t.spacingRatio),o={...n,ratio:Number.isFinite(r)?r:n.ratio,sequence:{},scales:{}};return ye(o),o},z3=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;Tt(n,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),ye(n),Hr(t,e)}},sf=t=>{let e=t.toLowerCase(),n=e.includes("width")||e.includes("height"),r=e.includes("border")||e.includes("outline");return n&&!r},af=()=>{let t=O(),{spacing:e}=t;ye(e),nr(e),z3(e)},W3=t=>{let e=O(),{spacing:n}=e;return!t||!t.sequence?n:Object.keys(t.sequence).length>0?t:ye(t)},Bt=(t,e="padding",n,r)=>{let o=W3(n);if(E(t)){if(!r&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!r&&t.includes("(")){let i=er(t);r=i[0],t=i[1]}}let s=r?[t]:E(t)&&t.includes("(")?lt(t):Ho(t);if(I(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)=>Dn(s[f],e+l+i,o,r);return a[s.length].map((l,f)=>c(l,f))}return Dn(t,e,o,r)}},ze=(t,e,n,r)=>{let o=O(),{spacing:s}=o,i=n||t[e];if(!r&&E(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!r&&E(i)&&i.includes("(")){let a=er(i);r=a[0],i=a[1]}if(t.spacingRatio){let a=H3(t);return Bt(i,e,a,r)}return Bt(i,e,s,r)},cf=t=>{let e=n=>{let r=["+","-","*","/"].includes(n),o=ri.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(" ")};M();var q3={commas:!0},es=(t,e,n)=>E(t)?Zn(t,K3,q3,e,n):t,K3=(t,e,n)=>{let r=Zo(()=>at(t,e));return ln(r)?r:Gi(t,n)},Gi=(t,e)=>{if(/^\d/.test(t)||t.includes("px")||t.slice(-2)==="em"||t==="inset"||t==="none"||Wo.has(t.toLowerCase()))return t;e&&e(t);let n=Bt(t,"shadow");return n&&n.shadow?n.shadow:t},Yr=(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(I(t)){let a={"@light":Yr(t[0],e,"light"),"@dark":Yr(t[1],e,"dark")};return o.useVariable&&Gr(a,"shadow",e,o),a}if(A(t)){let a={};for(let c in t)a[c]=Yr(t[c],e,c.startsWith("@")?c.slice(1):c);return o.useVariable&&Gr(a,"shadow",e,o),a}E(t)&&(t=es(t));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(n?`-${n}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},lf=(t,e)=>{let n=O();if(e=Qo(e,n),!E(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if($t(t))return`var(${t})`;let[r]=I(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)}return i&&s.value?s.value:i?rr(Kr(s),n,a=>{let c=s["@"+a];return c&&(c.value!==void 0?c.value:c)}):(n.verbose&&console.warn("Can't find color",t),t)};M();var G3=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),Y3={commas:!1,keywords:G3},ae=(t,e,n)=>{if(t==null)return;let r=t+"",o=r.trim();return o==="none"||o==="0"||o==="initial"||o==="inherit"||o==="unset"?r:Zn(r,X3,Y3,e,n)},X3=(t,e,n)=>{if(/^\d/.test(t))return t;let r=Zo(()=>at(t,e));if(ln(r))return r;if(Wo.has(t.toLowerCase()))return t;n&&n(t);let o=Bt(t,"border");return o&&o.border?o.border:t},ff=(t,e,n)=>{let r=n||O();if(r.useVariable||!E(t))return ae(t);let o=ts(t,e,r,{commas:!1,resolve:s=>ae(s),resolveScheme:s=>ae(t,"@"+s)});return o!==void 0?o:ae(t)};M();var Z3=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"]),m1=["color","Color","background","Background","fill","Fill","stroke","Stroke"],w1=t=>{for(let e=0;e<m1.length;e++)if(t.includes(m1[e]))return!0;return!1},J3={boxShadow:es,textShadow:es,border:ae,borderTop:ae,borderRight:ae,borderBottom:ae,borderLeft:ae,outline:ae,columnRule:ae},Q3=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},y1=new Set,t5=(t,e,n,r,o,s)=>{if(!tt())return;let i=`${t}::${e}::${n||""}::${r}`;y1.has(i)||(y1.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.`))},jS=(t,e,n,r)=>{let o=J3[e];if(!o)return at(n,r);let s=null,i=o(n,r,a=>{!s&&Q3(a)&&(s=a)});return s&&t5(t,e,r,n,i,s),i},BS=(t,e)=>We(t,e),e5=t=>A(t)&&V(t.value),n5=t=>{for(let e in t){let n=t[e];if(E(n)&&n.startsWith("var(--"))return!0}return!1},uf=(t,e)=>{let n=O();return e5(t)?!n.useVariable&&n5(t)?t:Yi(t.value,e):Yi(t,e)},S1=(t,e)=>{let n=new Set;for(let r of e){let o=r.slice(0,1);if(!(o==="@"||o==="."||o===":")&&w1(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&&E(a)&&/^[a-z][a-zA-Z]+$/.test(a)&&!Z3.has(a)&&n.add(s)}}return n},x1=t=>t.startsWith("[data-theme=")||t.startsWith("@media"),df=(t,e)=>{for(let n in e){let r=e[n];A(r)?df(t[n]||(t[n]={}),r):t[n]=r}return t},b1=(t,e,n,r,o)=>df(t,rr(r,o,s=>({[e]:n[s]}))),k1=(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(w1(t)&&qr(i)&&qr(a)){o[t]=i===a?i:`light-dark(${i}, ${a})`;let c=Object.keys(e).filter(l=>l!=="light"&&l!=="dark");b1(o,t,e,c,r)}else n!==void 0&&(o[t]=n),b1(o,t,e,s,r);return o},r5=new Set(["backdropFilter","WebkitBackdropFilter"]),v1=new WeakSet,E1=(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=S1(t,i),c={};for(let l of i){let f=l.slice(0,1);if(f==="@")continue;if(f==="."||f===":"){let m={};for(let S in t)V(t[S]?.[l])&&(m[S]=t[S][l]);let y=r&&V(r[l])?r[l]:void 0;if(!Object.keys(m).length&&!y)continue;let _=f==="."?l.slice(1):l.replace(/^:+/,"");c[l]=E1(m,`${e}-${_}`,n,y);continue}let u=r&&!V(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||V(y))&&(y=u),y===void 0)continue;let _=jS(e,l,y,`@${m}`);_!==void 0&&(p[m]=_,(s&&m===s||!s&&(m==="light"||g===void 0))&&(g=_))}let h=k1(l,p,g,n);h&&(df(c,h),c[`.${l}`]=h)}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},NS=(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=S1(t,l);for(let u of l){let d=u.slice(0,1),p=V(r?.[u])||Object.values(t).some(g=>V(g?.[u]));if(d==="."&&p){let g=u.slice(1),h={};for(let y in t)V(t[y]?.[u])&&(h[y]=t[y][u]);let m=V(r?.[u])?r[u]:void 0;c[u]=NS(h,`${e}-${g}`,n,m)}else if(d===":"&&p){let g=u.replace(/^:+/,""),h={};for(let y in t)V(t[y]?.[u])&&(h[y]=t[y][u]);let m=V(r?.[u])?r[u]:void 0;c[u]=NS(h,`${e}-${g}`,n,m)}else if(d!=="@"&&d!=="."&&d!==":"){let h=`--${n.varPrefix?n.varPrefix+"-":""}theme-${e}-${u}`,m=r&&!V(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=!1,v={};for(let x of y){if(f.has(x))continue;let w=t[x]?.[u];if((w===void 0||V(w))&&(w=m),w===void 0)continue;let b=jS(e,u,w,`@${x}`);if(b===void 0)continue;S=!0,v[x]=b,(a&&x===a||!a&&(x==="light"||_===void 0))&&(_=b);let k=`[data-theme="${x}"]`;if(s[k]||(s[k]={}),s[k][h]=b,x==="dark"||x==="light"){let C=`@media (prefers-color-scheme: ${x})`;s[C]||(s[C]={}),s[C][h]=b}}if(_!==void 0&&(o[h]=_),!S)continue;if(r5.has(u)){let x=k1(u,v,_,n);x&&(df(c,x),c[`.${u}`]=x);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)x1(u)&&V(c[u])&&v1.add(c[u]);return c},Yi=(t,e,n,r)=>{let o=O(),{cssVars:s}=o,i={value:t},a=!n&&!r,c,l;if(V(t)){if(a&&o.useVariable){let f={},u={};for(let d in t)d.startsWith("@")?V(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];(Object.keys(f).length||Object.keys(u).length)&&(l=NS(f,e,o,u),Object.assign(i,l))}else if(a){let f={},u={};for(let d in t)d.startsWith("@")?V(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];c=E1(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]=Yi(d,e,f,r||p)}else if(!a){let p=jS(e,f,d,r),g=[...new Set([r,n].filter(_=>_).map(_=>_.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===":")&&V(t[f])&&(i[f]=c[f])}if(l)for(let f in l){let u=f.slice(0,1);(u==="."||u===":")&&V(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(E(t)&&$t(t)){let u=o.theme[t.slice(2)];return We(u,r)}return i},FS=(t,e)=>{let n={};for(let r in t){let o=r.slice(0,1);if(V(t[r]))if(x1(r)&&(e||v1.has(t[r])))n[r]=df({},t[r]);else{if(o==="@")continue;o===":"?n[`&${r}`]=FS(t[r],e):o==="."&&(n[`&${r}`]=FS(t[r],e))}else n[r]=t[r]}return n},A1=(t,e)=>{let n=e.shift();return t[n]?A1(t[n],e):t},_1=(t,e)=>I(e)?A1(t,e):E(e)&&t[e]?t[e]:t;var We=(t,e)=>{let n=O();if(E(t)&&$t(t)&&(t=We(t.slice(2))),!t||!E(t)){n.verbose&&console.warn(`${t} - Theme is not a string`);return}let[r,...o]=I(t)?t:t.split(" "),s=n.theme[r];return s&&o.length?s=_1(s,o):s&&e&&(s=_1(s,e)),FS(s,!n.useVariable)};M();M();var pf=(t,e)=>{let n=O(),r=`--font-${e}`;if(!t||I(t)&&!t[0])return;let o;if(t.isVariable){let s=Ve(t.url,n.files)||t.url;Bi(s)?o=Ui(s):o=Vr(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=>Ve(i,n.files)||i):Ve(t.url,n.files)||t.url;o=Vr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch,unicodeRange:t.unicodeRange})}return{var:r,value:t,fontFace:o}},O1=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"]),o5=t=>O1.has(t.toLowerCase())||/[\s,'"(]/.test(t.trim()),C1=new Set,hf=(t,e)=>{let n=O(),{fontFamily:r}=n,o=e||r,s=Qn(o,t);if(s!==void 0||t==null||t===""||t==="default")return s;if(!E(t))return Qn(o);if(!o5(t))return Kn()&&!C1.has(t)&&(C1.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}'"\`).`)),Qn(o)},T1=t=>{let e=t.trim(),n=e.replace(/^(['"])(.*)\1$/,"$2").trim(),r=n.replace(/\s+/g," ").toLowerCase();return n!==e&&O1.has(r)?'"'+r+'"':r},Xi=(t,e)=>{let n=O(),{fontFamily:r,fontFamilyTypes:o}=n;if(A(t)&&E(t.value)&&E(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=Ho(s));let c=`--${n.varPrefix?n.varPrefix+"-":""}font-family-${e}`,l=p=>p&&!p.startsWith("--"),f=[...s].map(p=>String(p).trim()).filter(l),u=new Set;for(let p of f)for(let g of p.split(","))u.add(T1(g));for(let p of String(o[i]??"").split(",")){let g=p.trim();if(!l(g))continue;let h=T1(g);u.has(h)||(u.add(h),f.push(g))}let d=f.join(", ");return n.useVariable&&(n.cssVars[c]=d),{var:c,value:d,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};M();var dh=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;Tt(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,_=!i.unit&&m.has(h)?"rem":y,S=r[c],v="@media "+(S==="print"?`${S}`:`screen and ${S}`);if(n.templates[v]={fontSize:i.base/n.browserDefault+_},!a){Tt(i,{sequence:{},scales:{},vars:{}}),ye(i),Hr(t,o);continue}Tt(i,{sequence:{},scales:{},templates:{},vars:{}}),ye(i),Hr(t,o)}},ph=t=>{let e=O();if(t.h1Matches){let n=t.unit,r=tf(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}}}},gf=()=>{let t=O(),{typography:e}=t;ye(e),ph(e),nr(e),dh(e)},mf=t=>{let e=O(),{typography:n}=e;return Dn(t,"fontSize",n)};M();var yf=t=>{if(!E(t))return;let n=O().shape;if(n)return n[t]!==void 0?n[t]:n[t.toLowerCase()]};M();var bf=()=>{let t=O(),{timing:e}=t;ye(e),nr(e)},De=t=>{let e=O(),{timing:n}=e;return n[t]||n[Vo(t)]||t},be=(t,e="timing")=>{let n=O(),{timing:r}=n;return Dn(t,e,r)};M();var _f=()=>{let t=O(),{fontFamily:e,theme:n,typography:r}=t,o=t.document;return Wn(o)?(Ar(t,"document",o),o=t.document={}):o||(o=t.document={}),Tt(o,{theme:n.document,fontFamily:Qn(e),fontSize:r.base,lineHeight:r.lineHeight})};M();var HS={document:yt},R1=new WeakMap,P1=new WeakMap,s5=128,D1=1048576,US=8192,zS=t=>t.nodeType===1&&t.localName==="symbol"&&t.getAttribute("id"),M1=t=>t.nodeType===8||t.nodeType===3&&!t.textContent.trim(),i5=(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},VS=(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},a5=(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)},Zi=(t,e)=>{let n=O();if(!t){n.verbose&&console.warn("setSVG: val is not defined",e);return}return n.useSvgSprite?rf(e,t):t},wf=(t,e=HS)=>{let n=O(),r=Object.keys(t).length?{}:n.svg;for(let o in t)r[o]=t[o];N1(r,e)},ns=(t,e)=>{let n=O();return n.useIconSprite&&!n.semanticIcons?.[e]?Zi(t,e):t},rs=(t,e=HS)=>{let n=O(),r=Object.keys(t).length?{}:n.icons;for(let o in t)r[o]=t[o];N1(r,e)},$1=(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},c5=(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},l5=(t,e,n)=>{let r=String(n),o=P1.get(e),s=o?.entries.get(r);if(s)return o.entries.delete(r),o.entries.set(r,s),s.root;let i=c5(t,r);if(i||(i=$1(t,{isRoot:!1}),i.innerHTML=r),r.length>D1)return i;let a=i5(i,US);if(a>US)return i;for(o||(o={entries:new Map,units:0,nodes:0},P1.set(e,o));o.entries.size>=s5||o.units+r.length>D1||o.nodes+a>US;){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},L1=t=>{let e=new Map;for(let n of t.children){let r=zS(n);if(!r)continue;let o=e.get(r)||[];o.push(n),e.set(r,o)}return e},f5=t=>t.replace(/["\\\u0000-\u001f\u007f]/g,e=>`\\${e.charCodeAt(0).toString(16)} `),I1=(t,e,n,r)=>{let o=0,s=e.childElementCount>8?L1(n):null,i=a=>{if(!s)try{return[...n.querySelectorAll(`symbol[id="${f5(a)}"]`)].filter(c=>c.parentNode===n)}catch{s=L1(n)}return s.get(a)};for(let a of e.childNodes){if(M1(a))continue;let c=zS(a);if(!c&&r){let u=o++,d=r.nodes[u];if(!d&&r.complete||d?.parentNode===n)continue;let p=VS(t,d||a);n.appendChild(p),r.nodes[u]=p;continue}let l=c&&i(c),f=l&&l[0];if(!f)f=VS(t,a),n.appendChild(f);else if(!f.isEqualNode(a)){let u=VS(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])}},N1=(t,e=HS)=>{let n=O(),r=e.document||yt;if(!r||!r.documentElement)return n.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),nf(t);let o=r.querySelector("#svgSprite"),s="";for(let d in t)s+=t[d];let i=o||$1(r);if(!i||!i.nodeType)return;let a=d=>l5(r,i,d),c=a(s),l=R1.get(i);l||R1.set(i,l=new WeakMap);let f=l.get(n);if(f||l.set(n,f=new Map),[...c.childNodes].some(d=>!M1(d)&&!zS(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}),I1(r,d.length===1?c:a(t[p]),i,g),g.complete=!0}}else{I1(r,c,i);for(let d in t)f.has(d)||f.set(d,{nodes:[],complete:!0})}o||a5(r.body,i);for(let d in t)n.__svgCache[d]=!0};M();var Sf=(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?We("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?We("document"):{};if(o.html&&ie(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 dt(Tt(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}},Pe)};M();var u5=new Set(["fallback"]),WS=new Set,F1=(t,e)=>{WS.has(t)||(WS.add(t),tt()&&console.warn(e))},qS=()=>{WS.clear()},j1=t=>{for(let e in t)delete t[e];return t},xf=()=>{let t=O(),e=A(t.cssSkinVars)?j1(t.cssSkinVars):t.cssSkinVars={},n=A(t.cssSkinFallback)?j1(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=>E(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(u5.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)&&F1(`${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,E(l.fallback)&&(n[c]=l.fallback)}for(let c in n){let l=n[c];e[l]||(F1(`${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},B1=(t,e)=>{let n=`[data-skin="${t}"]`;return!e||e===":root"?`:root${n}, ${n}`:`${e}${n}, ${n} ${e}, ${e} ${n}`},os=(t,e,n)=>{let r={};if(!A(t))return r;for(let s in t)r[B1(s,n)]=t[s];let o={};for(let s in e||{}){let i=t[e[s]];i&&(o[B1(s,n)]=i)}return Object.keys(o).length&&(r["@media (prefers-reduced-transparency: reduce)"]=o),r};M();var d5=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),hh=(t,e)=>ff(t,e),gh=t=>{if(E(t))return Ur.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if($t(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let n=at(e);return ln(n)?n:e}).join(" ")},mh=(t,e)=>lf(t,e),kf=(t,e)=>{if(!E(t))return;let n=O();if(!n.useVariable){let r=p5(t,e,n);if(r!==void 0)return r}return KS(t,e)},p5=(t,e,n)=>ts(t,e==="auto"?null:e,n,{commas:!0,resolve:KS,resolveScheme:(r,o)=>KS(o(s=>at(s,"@"+r,n)),null)}),KS=(t,e)=>Zn(t,g5,h5,e),h5={commas:!0,keywords:new Set(["inset","none"])},g5=(t,e)=>{if(!ln(at(t)))return Gi(t);let n=Vt(t,e);return A(n)?Object.values(n).filter(r=>r.includes(": "+e))[0]:n},vf=(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=Jn(o).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||d5.has(f)||f==="transparent"||Ur.test(f))return f;let u=at(f);return ln(u)?u:f}).join(" ")));return r+a.join(", ")+s},yh=(t,e)=>{if(!E(t))return;let n=O();return Jn(t).map(r=>{let o=r.trim();if($t(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(n.gradient?.[o]){let s=Vt(o,e);if(E(s))return s;if(A(s)){for(let i in s)if(E(s[i]))return s[i]}return o}return o.includes("gradient")?vf(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!Zt(o)?`url(${o})`:o}).join(", ")},bh=t=>E(t)&<(t).map(e=>Bt(e,"gap").gap).join(" "),_h=t=>{if(!E(t))return t;let e=O();return lt(t).map(n=>Pn.test(n)?Xo(n,e.spacing):n).join(" ")},GS=t=>{if(!E(t))return;let e=t.split(" ");return e.length?e.map(n=>$t(n)?`var(${n})`:n.length<3||n.includes("ms")?be(n).timing||n:De(n)?De(n):n).join(" "):t},Ef=(t,e,n)=>{if(E(t))return t.split(",").map(r=>be(r).timing||r).join(",")},wh=t=>{if(!E(t))return;let e=t.split(",");if(e.length)return e.map(GS).join(",")};function Pt(t,e,n={},r={}){let o=St.call(this,e||n[t]);if(o==null)return;let s;if(E(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[t]:o};if(o.includes("(")){let c=er(o);s=c[0],o=c[1]}let i=n.scaleBoxSize,a=sf(t);!i&&a&&!r.ratio&&(o=cf(o))}return r.ratio?ze(n,t,o,s):Bt(o,t,void 0,s)}var j=(t,e=null,n)=>Pt(t,e,n,{ratio:!0}),m5=(t,e,n)=>E(t)?lt(t).map(r=>Pn.test(r)?ze(e,n,r)[n]:r).join(" "):t,or=(t,e,n,r="borderRadius")=>{if(E(t))return{[r]:lt(t).map(o=>{let s=yf(o);return s!==void 0?m5(s,e,n):ze(e,n,o)[n]}).join(" ")}};M();var Qi="__smblsThemeRootOwner",ta=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)},U1=(t,e,n)=>{if(!(!t||!e)){ta(t),t.__prefersListener=n,t.__prefersMq=e;try{e.addEventListener("change",n)}catch{e.addListener(n)}}},y5=(t,e)=>{let n=O(),{cssVars:r}=n,o=e.startsWith("--")?e:`--${e}`;return r[o]=t,t},ce=t=>t,b5=(t,e)=>{if(E(t)||pe(t)){let n=O();if(n.cssVars&&e){let r=n.varPrefix?n.varPrefix+"-":"";n.cssVars[`--${r}size-${e}`]=t}}return t},Sh={color:Wr,gradient:Ki,font:pf,fontFamily:Xi,fontfamily:Xi,theme:uf,icons:ns,semanticIcons:ce,semanticicons:ce,svg:Zi,svgData:ce,typography:ce,shadow:Yr,spacing:ce,media:ce,grid:ce,class:ce,timing:ce,reset:ce,unit:ce,animation:ce,vars:y5,sizes:b5,shape:ce,skins:ce,viewTransition:ce},_5=(t,e,n,r)=>{Ar(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},YS=(t,e,n)=>{let r=O(),o=Kl(t),s=o.toLowerCase(),i=r[o]||r[s]||r[t],a=Wn(i)?_5(r,i,s,[o,s,t]):i,c=Sh[o]||Sh[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")},XS=(t,e)=>{let n=O(),r=t.toLowerCase();return Wn(e)?(Ar(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])||I(e[s])?1:0,c=A(e[i])||I(e[i])?1:0;return a-c}).forEach(s=>{try{return YS(r,e[s],s)}catch(i){n.verbose&&console.warn("Error setting",r,"value",e[s],s,i)}}),n[r]||n[t])},xh=(t,e)=>{let n=e||O();n.globalTheme=t;let o=ni(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[Qi]=n,c)ta(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",U1(n,f,l)}else ta(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},w5={},ss=(t,e=w5)=>{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}=t;e.newConfig&&(n=rh(e.newConfig)),zn(S.document)&&(n.__domDocument=S.document,delete S.document),zn(n.document)&&(n.__domDocument||(n.__domDocument=n.document),n.document={}),y!==void 0&&(n.files=y),_!==void 0&&(n.assets=_),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 x=ni(n)||(typeof document<"u"?document:null),w=x&&x.defaultView||(typeof window<"u"?window:null),b=x&&(n.themeRoot||x.documentElement);if(b&&typeof b.setAttribute=="function")if(n.globalTheme&&n.globalTheme!=="auto")ta(n),b.setAttribute("data-theme",n.globalTheme),n.resolvedTheme=n.globalTheme,b[Qi]=n,n.globalTheme==="dark"||n.globalTheme==="light"?b.style.colorScheme=n.globalTheme:b.style.colorScheme="light dark";else if(b[Qi]&&b[Qi]!==n&&b.hasAttribute("data-theme"))ta(n),n.resolvedTheme=b.getAttribute("data-theme");else if(w&&w.matchMedia){let N=et=>{let X=et.matches?"dark":"light";b.setAttribute("data-theme",X),n.resolvedTheme=X},B=w.matchMedia("(prefers-color-scheme: dark)");N(B),b.style.colorScheme="light dark",b[Qi]=n,U1(n,B,N)}else ta(n),b.setAttribute("data-theme","light"),n.resolvedTheme="light",b.style.colorScheme="light",b[Qi]=n;n.__svgCache||(n.__svgCache={}),Wi(S);let k=Object.keys(S).filter($=>!$.startsWith("__")),C=new Set(k);k.forEach($=>{let N=$.toLowerCase();N!==$&&C.has(N)&&dt(S[N],S[$],Pe)});let D=new Set;if(k.forEach($=>{let N=$.toLowerCase(),B=N!==$&&C.has(N)?N:$;D.has(B)||(D.add(B),XS(B,S[B]))}),n.varPrefix&&(n.typography&&(n.typography.varPrefix=n.varPrefix),n.spacing&&(n.spacing.varPrefix=n.varPrefix),n.timing&&(n.timing.varPrefix=n.varPrefix)),S.typography)try{gf()}catch($){n.verbose&&console.warn("Error applying typography sequence",$)}if(S.spacing)try{af()}catch($){n.verbose&&console.warn("Error applying spacing sequence",$)}if(S.timing)try{bf()}catch($){n.verbose&&console.warn("Error applying timing sequence",$)}try{xf()}catch($){n.verbose&&console.warn("Error applying skins",$)}_f();let R=Sf();return R&&(n.reset=R),n};var U=(t,e)=>e.split(" ").map(n=>t+"-"+n),tx="top right bottom left",ex=tx+" block block-start block-end inline inline-start inline-end",_e="start end",ir="width style color",kh=t=>U(t,ex),S5=(()=>{let t=U("border","width style color image");for(let e of ex.split(" "))t.push("border-"+e,...U("border-"+e,ir));return t})(),V1=t=>[...U("border-"+t,ir+" start end"),...U("border-"+t+"-start",ir),...U("border-"+t+"-end",ir)],xt={animation:U("animation","name duration timing-function delay iteration-count direction fill-mode play-state timeline range range-start range-end"),background:U("background","image position position-x position-y size repeat origin clip attachment color"),border:S5};for(let t of["width","style","color"])xt["border-"+t]=ex.split(" ").map(e=>"border-"+e+"-"+t);for(let t of tx.split(" "))xt["border-"+t]=U("border-"+t,ir);xt["border-block"]=V1("block");xt["border-inline"]=V1("inline");Object.assign(xt,{"border-image":U("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:U("column","width count"),"column-rule":U("column-rule",ir),container:U("container","name type"),"contain-intrinsic-size":U("contain-intrinsic","width height"),flex:U("flex","grow shrink basis"),"flex-flow":U("flex","direction wrap"),font:[...U("font","style variant weight stretch size"),"line-height",...U("font","family size-adjust kerning feature-settings variation-settings optical-sizing")],gap:["row-gap","column-gap"],grid:U("grid","template template-rows template-columns template-areas auto-rows auto-columns auto-flow"),"grid-template":U("grid-template","rows columns areas"),"grid-area":U("grid","row column row-start row-end column-start column-end"),"grid-row":U("grid-row",_e),"grid-column":U("grid-column",_e),inset:[...tx.split(" "),...U("inset","block block-start block-end inline inline-start inline-end")],"inset-block":U("inset-block",_e),"inset-inline":U("inset-inline",_e),"list-style":U("list-style","type position image"),margin:kh("margin"),"margin-block":U("margin-block",_e),"margin-inline":U("margin-inline",_e),mask:U("mask","image mode repeat position clip origin size composite"),offset:U("offset","position path distance rotate anchor"),outline:U("outline",ir),overflow:U("overflow","x y"),"overscroll-behavior":U("overscroll-behavior","x y"),padding:kh("padding"),"padding-block":U("padding-block",_e),"padding-inline":U("padding-inline",_e)});for(let t of["content","items","self"])xt["place-"+t]=["align-"+t,"justify-"+t];Object.assign(xt,{"scroll-margin":kh("scroll-margin"),"scroll-padding":kh("scroll-padding"),"text-decoration":U("text-decoration","line style color thickness"),"text-emphasis":U("text-emphasis","style color"),transition:U("transition","property duration timing-function delay behavior")});var x5="block-start block-end inline-start inline-end".split(" ");for(let t of x5)xt["border-"+t]=U("border-"+t,ir);for(let t of["block","inline"])for(let e of ir.split(" "))xt["border-"+t+"-"+e]=U("border-"+t,_e.split(" ").map(n=>n+"-"+e).join(" "));Object.assign(xt,{"animation-range":U("animation-range",_e),"background-position":U("background-position","x y"),"font-variant":U("font-variant","alternates caps east-asian emoji ligatures numeric position"),"font-synthesis":U("font-synthesis","weight style small-caps"),marker:U("marker","start mid end"),"position-try":U("position-try","order fallbacks"),"scroll-margin-block":U("scroll-margin-block",_e),"scroll-margin-inline":U("scroll-margin-inline",_e),"scroll-padding-block":U("scroll-padding-block",_e),"scroll-padding-inline":U("scroll-padding-inline",_e),"scroll-timeline":U("scroll-timeline","name axis"),"view-timeline":U("view-timeline","name axis inset"),"text-box":U("text-box","trim edge"),"text-wrap":U("text-wrap","mode style"),"white-space":["white-space-collapse","text-wrap-mode"]});xt.font.push("font-language-override");var sr=t=>"corner-"+t+"-shape";xt["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(sr);Object.assign(xt,{"corner-top-shape":["top-left","top-right"].map(sr),"corner-right-shape":["top-right","bottom-right"].map(sr),"corner-bottom-shape":["bottom-left","bottom-right"].map(sr),"corner-left-shape":["top-left","bottom-left"].map(sr),"corner-block-start-shape":["start-start","start-end"].map(sr),"corner-block-end-shape":["end-start","end-end"].map(sr),"corner-inline-start-shape":["start-start","end-start"].map(sr),"corner-inline-end-shape":["start-end","end-end"].map(sr)});for(let t in xt){let e=xt[t],n=new Set(e);for(let r=0;r<e.length;r++){let o=xt[e[r]];if(o)for(let s of o)n.has(s)||(n.add(s),e.push(s))}}var qe={};for(let t in xt)for(let e of xt[t])(qe[e]||(qe[e]=[])).push(t);var JS=new Map,H1=t=>{let e=JS.get(t);if(e!==void 0)return e;JS.set(t,0),e=0;let n=qe[t];if(n)for(let r=0;r<n.length;r++)e=Math.max(e,H1(n[r])+1);return JS.set(t,e),e};function ea(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(qe,e)?H1(e):0}var k5=/^(?: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)$/,z1=/^(?:border(?:-(?:top|right|bottom|left|block|inline)(?:-(?:start|end))?)?|outline|column-rule)$/,v5=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","auto"]),QS=t=>lt(String(t).replace(/\s*!important\s*$/,""));function na(t,e,n){let r=xt[t];if(!r||r.indexOf(n)===-1)return!1;if(k5.test(t))return!0;if(!z1.test(t)||typeof e=="function"||e==null||n.indexOf("border-image")===0)return!1;let o=QS(e);return o.length>=3?!0:/-style$/.test(n)&&o.some(s=>v5.has(s.toLowerCase()))}var E5=new Set(["thin","medium","thick"]),A5=t=>/^[+-]?\.?\d/.test(t)||E5.has(t.toLowerCase())||/^(?:calc|min|max|clamp)\(/i.test(t)||/^var\(--(?:[a-zA-Z0-9]{1,6}-)?spacing-/.test(t),C5=t=>t==="transparent"||t==="currentcolor"||Object.prototype.hasOwnProperty.call(Mi,t),T5=t=>qo(t)||/^var\(--(?:(?!theme-|shadow-)[a-zA-Z0-9]{1,6}-)?color-/.test(t)||C5(t.toLowerCase()),O5=/-(width|style|color)$/;function Af(t,e,n){if(na(t,e,n))return!0;let r=xt[t];if(!r||r.indexOf(n)===-1||typeof e=="function"||e==null)return!1;if(z1.test(t)){if(n.indexOf("border-image")===0)return!1;let o=O5.exec(n);if(!o)return!1;let s=QS(e);return s.length===1&&/^(?:0|none)$/i.test(s[0])?o[1]!=="color":o[1]==="width"&&s.some(A5)}if(t==="background"&&n==="background-color"){let o=QS(e);return o.length===1&&T5(o[0])}return!1}var sa=new Map,sO=null,nx=null,R5=null;function Tf(t){t.batchAtomicCss&&(nx=t.batchAtomicCss),t.compoundCssClass&&(R5=t.compoundCssClass)}var P5=new Set,q1=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function ux(t){try{let e=O();e&&(e.__domDocument=t)}catch{}t&&P5.add(t)}function cr(){try{let t=O();if(t){if(q1(t.__domDocument))return t.__domDocument;if(q1(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var we={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function Ph(){return{...we}}function dx(){for(let t in we)we[t]=0;Th=!1}var Th=!1,Ah=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function D5(t){let e=Date.parse(t);if(!isFinite(e))return"";let n=Math.floor((Date.now()-e)/864e5);return n<1?" (today)":` (${Ah(n,"day")} ago)`}function L5(){try{let t=W5();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 I5(t,e){if(Th)return!1;Th=!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 ${Ah(we.variable,"variable rule")} and ${Ah(we.atomic,"atomic rule")}, while the design system held ${Ah(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
|
-
emitted : ${JSON.stringify(
|
|
52
|
-
sheets : the style[data-smbls] tiers currently hold ${
|
|
51
|
+
emitted : ${JSON.stringify(we)}
|
|
52
|
+
sheets : the style[data-smbls] tiers currently hold ${L5()} 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 m=0;m<p.length;m++)p[m]&&tn(p[m],void 0,"atomic",!0)}i.push(h)}else if(o)for(let f=0;f<o.length;f+=2)i.push(ZA(o[f],o[f+1],e));let l=[];for(let f=0;f<a.length;f++)l.push(wF(a[f][0],a[f][1],e,r));return i.concat(l).join(" ").trim()}var oC=new Map,yF=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function pi(t){return/^@(media|supports|container)\b/.test(t)}function bF(t){return typeof t!="string"||!t||pi(t)?!1:t.split(",").every(e=>yF.test(e.trim()))}var fC=t=>{let e=Object.prototype.toString.call(t);return e==="[object Object]"||e==="[object Array]"},sw=32,iw=1024,aw=!1;function ap(t,e,n){if(aw)return;aw=!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 _F(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)||!fC(s)||n.length>sw||++r>iw)))return n.push(s),s})}}function wF(t,e,n,r){let o=_F(e),s=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,i=s&&uw(),a=(n?n+"":"")+t+o+(s&&!i?"rawhover":"")+(r?"state":""),c=di.get(a);if(c){let x=oC.get(c);if(x)for(let w=0;w<x.length;w+=2)tn(x[w],void 0,"atomic",void 0,x[w+1]);return c}c=n?`_${n}_c${up(a)}`:`_c${up(a)}`;let l=r?`.${c}.${c}`:`.${c}`,f=bF(t)?`${l}.${c}`:l,u="",d=[],h=x=>typeof x=="string"&&(x.indexOf("{")!==-1||x.indexOf("}")!==-1),g=new Set,p=0,m=(x,w)=>{g.add(w);let _="",A=Object.keys(w);for(let C=0;C<A.length;C++){let D=A[C],$=w[D];if($!=null)if(typeof $=="object"){let I=[...x,D];g.has($)?ap("a style value that loops back to one of its own ancestors",t,I):fC($)?I.length>sw?ap(`a style block nested more than ${sw} levels deep`,t,I):++p>iw?ap(`a style object with more than ${iw} nested blocks`,t,I):m(I,$):ap(`a ${Object.prototype.toString.call($).slice(8,-1)} (not a style block)`,t,I)}else{if(h($))continue;_+=Io(de(D),$)}}g.delete(w),_&&(x.length===0?u+=_:d.push({chain:x,body:_}))};m([],e);let y=x=>x.startsWith(":")||x.startsWith("["),S=(x,w=!0)=>{let _=w&&x.length===1?f:l;if(!x.length)return _;let A=x[0].split(",").map(C=>C.trim()).map(C=>C.includes("&")?C.replace(/&/g,_):y(C)?`${_}${C}`:`${_} ${C}`);for(let C=1;C<x.length;C++){let D=x[C].split(",").map(I=>I.trim()),$=[];for(let I of A)for(let N of D)N.includes("&")?$.push(N.replace(/&/g,I)):y(N)?$.push(I+N):$.push(I+" "+N);A=$}return A.join(", ")},b=[],k=(x,w)=>{let _=x.filter(pi),A=S(x.filter($=>!pi($)),_.length===0),C=`${A}{${w}}`;for(let $=_.length-1;$>=0;$--)C=`${_[$]}{${C}}`;C=Un(C,A,i);let D=pw(C,void 0,"atomic");b.push(C,D),tn(C,void 0,"atomic",void 0,D)};u&&k([t],u);for(let x of d)k([t,...x.chain],x.body);return oC.set(c,b),di.set(a,c),c}function St(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(lC(),typeof t=="string"){let s=t.indexOf("--")!==-1;tn(t,void 0,s?"variable":"global"),s&&KA(1);return}let e=uw(),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=tw(i);a&&tn(`${s}{${a}}`,void 0,"keyframes");continue}if(pi(s))for(let a in i){let c=i[a];if(a.startsWith("@keyframes")){let l=tw(c);l&&tn(`${s}{${a}{${l}}}`,void 0,"keyframes");continue}if(typeof c=="object"&&c!==null){let l="",f=0,u=a.charCodeAt(0)===64;for(let d in c){let h=c[d];u&&typeof h=="object"&&h!==null||(ui(d)&&f++,l+=Io(de(d),h))}u&&(l+=XA(c)),n+=f,tn(Un(`${s}{${a}{${l}}}`,a,e),void 0,f?"variable":"global")}else{let l=ui(a);l&&n++,tn(`${s}{${Io(de(a),c)}}`,void 0,l?"variable":"global")}}else{let a="",c=!1,l=0,f=s.charCodeAt(0)===64;for(let u in i){let d=i[u];if(typeof d=="object"&&d!==null){if(f&&ew(u))continue;c=!0}else ui(u)&&l++,a+=Io(de(u),d)}if(f&&(a+=XA(i)),n+=l,a&&tn(Un(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let u=[],d=[];for(let h in i)if(typeof i[h]=="object"&&i[h]!==null){if(f&&ew(h))continue;pi(h)?u.push(h):d.push(h)}u.sort((h,g)=>{let p=m=>{let y=m.match(/max-width:\s*(\d+)/);return y?parseInt(y[1]):0};return p(g)-p(h)});for(let h of d)St({[`${s} ${h}`]:i[h]});for(let h of u)St({[h]:{[s]:i[h]}})}}}n>0&&KA(n)}function hi(t,e){return tn(`@keyframes ${t}{${tw(e)}}`,void 0,"keyframes"),t}function uC(){di.clear(),dw.clear(),sC=null,aw=!1}function hw(){return di.size}M();var TS={};j(TS,{DELEGATED_EVENTS:()=>_i,LIFECYCLE_EVENTS:()=>Ir,MIXINS:()=>yp,NON_BUBBLING_EVENTS:()=>bp,REGISTRY:()=>It,SVG_TAGS:()=>bi,addDelegatedEvent:()=>Ol,addMethods:()=>Ci,adoptHydrationNode:()=>mp,applyExtends:()=>Si,cacheNode:()=>Dr,create:()=>ee,createHTMLNode:()=>yi,detectTag:()=>zn,dispose:()=>Wn,elementPath:()=>gp,flushMounts:()=>Ul,globalEventKeyInfo:()=>wp,inertOutsidePlugin:()=>Vp,isSvgTag:()=>Lr,isValidTag:()=>mi,refreshContextProto:()=>Ti,registerEvent:()=>wi,registerGlobalEvent:()=>Sp,remove:()=>Ai,removeDelegatedEvent:()=>Rl,update:()=>xi});Mt();Mt();Mt();function Ue(t,e){let n=t&&t.context&&t.context.designSystem;if(!n)return e();gt(n);try{return e()}finally{dt()}}var en=eu||(t=>{let e=fn();if(!e)return t();ya(null);try{return t()}finally{ya(e)}});var gi="http://www.w3.org/2000/svg",bi=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"]),SF=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 mi(t){return SF.has(t)||bi.has(t)}function Lr(t){return bi.has(t)}function zn(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"&&mi(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]),mi(o)&&!r.has(o)?o:"div"}var dC={};function yi(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(Lr(t)){let r=e?.parent;if(t==="svg"||r?.node?.namespaceURI===gi)return n.createElementNS(gi,t);if(t!=="svg")return n.createElement("div")}return n.createElement(t)}function Dr(t){let e=t.tag=zn(t),r=Lr(e)&&(e==="svg"||t.parent?.node?.namespaceURI===gi)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=dC[r];if(s||(s=dC[r]=yi(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?yi(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var gp=t=>{let e=t.__ref;if(e&&e.__hydrationPath!==void 0)return e.__hydrationPath;let n=t.parent,r=n&&n.__ref?gp(n):null,o=r===null?"":r?r+"."+t.key:String(t.key);return e&&(e.__hydrationPath=o),o},xF=new Set(["src","srcset"]);function mp(t){let e=t?.context?.__hydration;if(!e)return null;let n=t.tag=zn(t);if(n==="string"||n==="fragment")return null;let r=gp(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=Lr(n)&&(n==="svg"||t.parent?.node?.namespaceURI===gi),a=Lr(n)&&!i&&n!=="svg"?"div":n,c=i?s.namespaceURI===gi:s.namespaceURI!==gi;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():[]))xF.has(l)||s.removeAttribute(l);for(;s.firstChild;)s.removeChild(s.firstChild);return s}var It=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"]),yp={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Ir=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"]),bp=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"]),_p=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),_i=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"]);M();var yw=new WeakMap,kF={passive:!0},vF={passive:!0,capture:!0},mC=(t,e)=>_p.has(t)?e?vF:kF:e||!1;function yC(t){let e=yw.get(t);return e||(e={handlers:new Map,installed:new Set},yw.set(t,e)),e}function EF(t,e){let n=yC(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}},mC(t,r))}function Ol(t,e,n,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=yC(r);EF(t,r),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,n)}function Rl(t,e,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let r=yw.get(n);if(!r)return;let o=r.handlers.get(t);o&&o.delete(e)}function AF(t){return _i.has(t)&&!Ir.has(t)}function bC(t,e){let{context:n}=t,r=n?.designSystem;return o=>{r&>(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&&dt()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),n?.strictMode)throw s}r&&dt()}}var _C=t=>!!t&&(t.capture===!0||typeof t.passive=="boolean"||t.once===!0);function CF(t,e){return _C(e)?{capture:e.capture===!0,passive:typeof e.passive=="boolean"?e.passive:_p.has(t),once:e.once===!0}:mC(t,!1)}function TF(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 wi(t,e,n,r){let{node:o,context:s}=e;if(!o)return;let i=bC(e,n),a=r&&typeof r.selector=="string"&&r.selector;a&&(i=TF(o,a,i));let l=!bp.has(t)&&AF(t)&&!_C(r),f=l?null:CF(t,r);if(l){let u=s?.rootNode||o.ownerDocument?.documentElement;Ol(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;Rl(t,o,u)}else o.removeEventListener(t,i,f)})}var gw=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function wp(t){if(typeof t!="string")return null;for(let e=0;e<gw.length;e++){let n=gw[e][0];if(t.length<=n.length||!t.startsWith(n))continue;let r=t.charCodeAt(n.length);if(!(r<65||r>90))return{target:gw[e][1],eventName:t.slice(n.length).toLowerCase()}}return null}var OF=/^[A-Za-z_$][\w$]*$/;function RF(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"&&OF.test(r)){let c=r;r=function(f){return t.call(c,f)}}return typeof r!="function"?null:(s===void 0&&(s=_p.has(n)),{handler:r,capture:o,passive:s,once:i,query:a})}function PF(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 mw=/^@media\s+/i,LF=/^[@[.#&:>*~+]/,pC=new Set;function hC(t,e){!J()||pC.has(t)||(pC.add(t),console.warn(`[smbls] onMediaQueryChange: "${t}" ${e} \u2014 no listener is registered.`))}function DF(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&&!mw.test(n)){if(s=o(n.slice(1)),!s)return hC(n,"is not a key of designSystem.media"),null}else s=o(n)||n;return mw.test(s)?s.replace(mw,"").trim()||null:LF.test(s)?(hC(n,`names "${s}", which is not a media query`),null):s}function IF(t,e,n,r){try{return t.addEventListener(e,n,r),!0}catch{return typeof t.addListener=="function"?(t.addListener(n),!0):!1}}function wC(t,e,n,r){try{t.removeEventListener(e,n,r)}catch{typeof t.removeListener=="function"&&t.removeListener(n)}}function MF(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 Sp(t,e,n){if(e.__ref){if(Array.isArray(n)){if(t.target!=="mediaQuery")return;for(let o=0;o<n.length;o++)gC(t,e,n[o]);return}gC(t,e,n)}}function gC(t,e,n){let r=e.__ref,o=RF(e,n,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change"||t.target==="mediaQuery"&&(o.query=DF(e,o.query),!o.query))return;let s=PF(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=bC(e,o.handler),c=t.target==="window"&&t.eventName==="load",l=!1,f=h=>{if(MF(e)){if(c){if(l)return;l=!0}a(h)}},u={capture:o.capture,passive:o.passive,once:o.once};if(!IF(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(()=>{wC(s,t.eventName,f,u),r.__globalEvents&&r.__globalEvents.delete(i)}),c&&$F(e,i,d,()=>l)}function $F(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()&&wC(i,"load",n.listener,n.options))})}Mt();Es();var SC=new WeakMap,xC=null,kC=null;function NF(t,e){let n=t===xC?kC:SC.get(t);(!n||n.length!==t.length)&&(n={length:t.length,hooks:new Map},SC.set(t,n)),xC=t,kC=n;let r=n.hooks.get(e);if(r===void 0){r=!1;for(let o of t)if(typeof o[e]=="function"){r=!0;break}n.hooks.set(e,r)}return r}function bw(t,e){let n=t&&t.context&&t.context.plugins;return!!(n&&n.length&&NF(n,e))}function kn(t,e,...n){return bw(e,t)?pr(t,e,...n):!1}function Ve(t,e,n){kn("error",t,{hook:e,error:n})||console.error(`[DOMQL] Lifecycle "${e}" error:`,n)}var FF=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function EC(t,e,n){return en(()=>Ue(t,()=>e.call(t,n,t,t.state,t.context)))}function jF(t,e){if(!J())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 AC(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,jF(t,e);let o;try{o=EC(t,t.onBridgeMount,n)}catch(s){if(r.failed=!0,Ve(t,"onBridgeMount",s),t.context?.strictMode)throw s;return}if(o&&typeof o.then=="function"){o.then(s=>vC(t,r,s),s=>{r.failed=!0,Ve(t,"onBridgeMount",s)});return}vC(t,r,o)}function vC(t,e,n){if(e.settled=!0,e.instance=n,e.disposed){TC(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=Y(()=>{e.disposed||Ue(t,()=>{try{let o=t.onBridgeUpdate.call(t,e.instance,t,t.state,t.context);o&&typeof o.then=="function"&&o.catch(s=>Ve(t,"onBridgeUpdate",s))}catch(o){Ve(t,"onBridgeUpdate",o)}})},{depth:r.path.length,label:()=>r.path.join(".")+"::onBridgeUpdate"}),r.__effects.push(e.effect)}function CC(t){let e=t.__ref?.__bridge;!e||e.disposed||(e.disposed=!0,e.effect&&e.effect.dispose(),e.settled&&TC(t,e))}function TC(t,e){if(e.destroyed)return;e.destroyed=!0;let n=e.instance;if(e.instance=void 0,FF(t,"bridge")&&(t.bridge=void 0),typeof t.onBridgeDestroy=="function")try{let r=EC(t,t.onBridgeDestroy,n);r&&typeof r.then=="function"&&r.catch(o=>Ve(t,"onBridgeDestroy",o))}catch(r){Ve(t,"onBridgeDestroy",r)}}M();M();var LC=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],BF=["none","forwards","backwards","both"],UF=["normal","reverse","alternate","alternate-reverse"],VF=["running","paused"],zF=/^(?: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*\))$/,HF=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=>zF.test(r.replace(/\s+/g,"")))},OC=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),WF={transform:HF,translate:OC,rotate:t=>OC(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},qF=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},KF=t=>{if(!E(t))return null;let e=null,n=-1;for(let r in t){let o=qF(r);o==null||!E(t[r])||o>=n&&(n=o,e=t[r])}return e},GF=t=>{let e=KF(t);if(!e)return!1;let n=Object.keys(e);if(!n.length)return!1;for(let r of n){let o=WF[r];if(!o)return!1;let s=e[r];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},YF=(t,e)=>{if(E(t))return t;let{animation:n}=e.context&&e.context.designSystem||{},r=n&&n[t];return E(r)?r:null},XF=["reverse","alternate","alternate-reverse"],DC=(t,e,n)=>{let r=n||e.animationDirection;return r&&XF.includes(String(r))?"both":GF(YF(t,e))?"backwards":"both"},ZF=0,RC=new Map,_w=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{};if(E(t)){let o=JSON.stringify(t),s=RC.get(o);if(s)return s;let i=`smbls-anim-${ZF++}`,a=hi(i,t);return RC.set(o,a),a}let r=n&&n[t];return E(r)?hi(t,r):t},IC=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)m?s$/i,QF=/^(?:\d+(?:\.\d*)?|\.\d+)$/,MC=/^(?:cubic-bezier|steps|linear)\(/,JF=/^(?:calc|min|max|clamp)\(/,tj=t=>t.includes("(")||t.startsWith("--"),ej=(t,e)=>{if(!wn.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]])},nj=t=>{if(!v(t))return!1;let e=t.trim();return LC.includes(e)||MC.test(e)||e.startsWith("var(")},rj=(t,e)=>!!e&&nj(e[t]||e[_o(t)]),oj=["duration","timingFunction","delay","iterationCount","direction","fillMode","playState"],sj=t=>at(String(t)),ij=(t,e,n)=>{let r={duration:null,delay:null,timingFunction:null,iterationCount:null,direction:null,fillMode:null,playState:null},o=null,s=[],i=[],a=(u,d)=>r[u]!=null?!1:(r[u]=d,!0),c=(u,d)=>{a(u,d)||s.push(d)};for(let u of sj(t))e&&e[u]?o=u:IC.test(u)||ej(u,n)?a("duration",u)||a("delay",u):LC.includes(u)||rj(u,n)?c("timingFunction",u):MC.test(u)?a("timingFunction",u):u==="infinite"?c("iterationCount",u):QF.test(u)?a("iterationCount",Number(u)):UF.includes(u)?c("direction",u):BF.includes(u)?c("fillMode",u):VF.includes(u)?c("playState",u):tj(u)?i.push(u):s.push(u);let l=o||s[0]||i.shift()||null,f=new Set;for(let u of i){let d=oj.find(h=>r[h]==null);if(!d)break;r[d]=u.startsWith("--")?`var(${u})`:u,f.add(d)}return{name:l,...r,opaqueSlots:f}},aj=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{},{timing:r}=O()||{};return Je(String(t)).map(o=>o.trim()).filter(Boolean).map(o=>ij(o,n,r))},PC=(t,e)=>IC.test(t)||e&&!JF.test(t)&&!/^(?:var|env)\(/.test(t)?t:le(t).timing||t,cj=(t,e)=>{let n=r=>t.opaqueSlots.has(r);return{animationName:t.name==null?void 0:_w(t.name,e),animationDuration:t.duration!=null?PC(t.duration,n("duration")):le(e.animationDuration||"A").timing,animationDelay:t.delay!=null?PC(t.delay,n("delay")):le(e.animationDelay||"0s").timing,animationTimingFunction:t.timingFunction!=null?n("timingFunction")?t.timingFunction:Ae(t.timingFunction):Ae(e.animationTimingFunction||"ease"),animationFillMode:t.fillMode||e.animationFillMode||DC(t.name,e,t.direction),animationIterationCount:t.iterationCount!=null?t.iterationCount:e.animationIterationCount||1,animationPlayState:t.playState||e.animationPlayState,animationDirection:t.direction||e.animationDirection}},lj={animationName:"none",animationPlayState:"running",animationDirection:"normal"},fj=(t,e)=>{let n=t.map(o=>cj(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??lj[o]).join(", "))}return r},ww={animation:(t,e)=>{if(t!=null){if(v(t)&&/[\s,]/.test(t)){let n=aj(t,e);if(n.length)return fj(n,e)}return{animationName:_w(t,e),animationDuration:le(e.animationDuration||"A").timing,animationDelay:le(e.animationDelay||"0s").timing,animationTimingFunction:Ae(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||DC(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:_w(t,e)}),animationDuration:t=>({animationDuration:le(t).timing}),animationDelay:t=>({animationDelay:le(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Ae(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};M();var xp=(t,e,n)=>{if(typeof e=="number"&&(e=String(e)),!v(e))return;let[r,o]=at(e);return{...F(t+"Start",r,n),...F(t+"End",o||r,n)}},Sw={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>F("height",t,e),width:(t,e)=>F("width",t,e),boxSizing:t=>$t(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!v(t))return;let[e,n]=at(t);return{...At("height",e),...At("width",n||e)}},inlineSize:(t,e)=>F("inlineSize",t,e),blockSize:(t,e)=>F("blockSize",t,e),minWidth:(t,e)=>F("minWidth",t,e),maxWidth:(t,e)=>F("maxWidth",t,e),widthRange:t=>{if(!v(t))return;let[e,n]=at(t);return{...At("minWidth",e),...At("maxWidth",n||e)}},minHeight:(t,e)=>F("minHeight",t,e),maxHeight:(t,e)=>F("maxHeight",t,e),heightRange:t=>{if(!v(t))return;let[e,n]=at(t);return{...At("minHeight",e),...At("maxHeight",n||e)}},size:t=>{if(!v(t))return;let[e,n]=at(t);return{...F("inlineSize",e),...F("blockSize",n||e)}},minBlockSize:(t,e)=>F("minBlockSize",t,e),minInlineSize:(t,e)=>F("minInlineSize",t,e),maxBlockSize:(t,e)=>F("maxBlockSize",t,e),maxInlineSize:(t,e)=>F("maxInlineSize",t,e),minSize:t=>{if(!v(t))return;let[e,n]=at(t);return{...At("minInlineSize",e),...At("minBlockSize",n||e)}},maxSize:t=>{if(!v(t))return;let[e,n]=at(t);return{...At("maxInlineSize",e),...At("maxBlockSize",n||e)}},borderWidth:(t,e)=>F("borderWidth",t,e),borderTopWidth:(t,e)=>F("borderTopWidth",t,e),borderRightWidth:(t,e)=>F("borderRightWidth",t,e),borderBottomWidth:(t,e)=>F("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>F("borderLeftWidth",t,e),textDecorationThickness:(t,e)=>F("textDecorationThickness",t,e),textUnderlineOffset:(t,e)=>F("textUnderlineOffset",t,e),padding:(t,e)=>F("padding",t,e),paddingInline:t=>{if(!v(t))return;let[e,n]=at(t);return{...At("paddingInlineStart",e),...At("paddingInlineEnd",n||e)}},paddingBlock:t=>{if(!v(t))return;let[e,n]=at(t);return{...At("paddingBlockStart",e),...At("paddingBlockEnd",n||e)}},paddingTop:(t,e)=>F("paddingBlockStart",t,e),paddingBottom:(t,e)=>F("paddingBlockEnd",t,e),paddingLeft:(t,e)=>F("paddingInlineStart",t,e),paddingRight:(t,e)=>F("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>F("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>F("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>F("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>F("paddingInlineEnd",t,e),margin:(t,e)=>F("margin",t,e),marginInline:t=>{if(!v(t))return;let[e,n]=at(t);return{...At("marginInlineStart",e),...At("marginInlineEnd",n||e)}},marginBlock:t=>{if(!v(t))return;let[e,n]=at(t);return{...At("marginBlockStart",e),...At("marginBlockEnd",n||e)}},marginTop:(t,e)=>F("marginBlockStart",t,e),marginBottom:(t,e)=>F("marginBlockEnd",t,e),marginLeft:(t,e)=>F("marginInlineStart",t,e),marginRight:(t,e)=>F("marginInlineEnd",t,e),marginInlineStart:(t,e)=>F("marginInlineStart",t,e),marginInlineEnd:(t,e)=>F("marginInlineEnd",t,e),marginBlockStart:(t,e)=>F("marginBlockStart",t,e),marginBlockEnd:(t,e)=>F("marginBlockEnd",t,e),scrollMargin:(t,e)=>F("scrollMargin",t,e),scrollMarginTop:(t,e)=>F("scrollMarginTop",t,e),scrollMarginRight:(t,e)=>F("scrollMarginRight",t,e),scrollMarginBottom:(t,e)=>F("scrollMarginBottom",t,e),scrollMarginLeft:(t,e)=>F("scrollMarginLeft",t,e),scrollMarginBlock:(t,e)=>xp("scrollMarginBlock",t,e),scrollMarginInline:(t,e)=>xp("scrollMarginInline",t,e),scrollMarginBlockStart:(t,e)=>F("scrollMarginBlockStart",t,e),scrollMarginBlockEnd:(t,e)=>F("scrollMarginBlockEnd",t,e),scrollMarginInlineStart:(t,e)=>F("scrollMarginInlineStart",t,e),scrollMarginInlineEnd:(t,e)=>F("scrollMarginInlineEnd",t,e),scrollPadding:(t,e)=>F("scrollPadding",t,e),scrollPaddingTop:(t,e)=>F("scrollPaddingTop",t,e),scrollPaddingRight:(t,e)=>F("scrollPaddingRight",t,e),scrollPaddingBottom:(t,e)=>F("scrollPaddingBottom",t,e),scrollPaddingLeft:(t,e)=>F("scrollPaddingLeft",t,e),scrollPaddingBlock:(t,e)=>xp("scrollPaddingBlock",t,e),scrollPaddingInline:(t,e)=>xp("scrollPaddingInline",t,e),scrollPaddingBlockStart:(t,e)=>F("scrollPaddingBlockStart",t,e),scrollPaddingBlockEnd:(t,e)=>F("scrollPaddingBlockEnd",t,e),scrollPaddingInlineStart:(t,e)=>F("scrollPaddingInlineStart",t,e),scrollPaddingInlineEnd:(t,e)=>F("scrollPaddingInlineEnd",t,e),gap:t=>({gap:tp(t)}),columnGap:(t,e)=>Fe(e,"columnGap",t),rowGap:(t,e)=>Fe(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)=>Fn(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Fn(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>Fn(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>Fn(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>Fn(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>Fn(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var xw={fontSize:t=>gl(t)||t,fontFamily:t=>({fontFamily:pl(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 kw={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 vw={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:at(t).map(n=>Tt(n,"k").k).join(" ")}},left:t=>Tt(t,"left"),top:t=>Tt(t,"top"),right:t=>Tt(t,"right"),bottom:t=>Tt(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=at(t).map(n=>Tt(n,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=at(t).map(n=>Tt(n,"k").k);return{left:e[0],right:e[1]||e[0]}}};M();var kp=0,vp=()=>{kp++},Ep=()=>{kp>0&&kp--},Oe=({context:t,state:e})=>{let n=t?.designSystem,r=e?.root?.globalTheme||n?.globalTheme;return r&&r!=="auto"?r:kp>0?null:n&&n.resolvedTheme||null},pe=(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=pe(t,s);i&&(n[o]=i,r=!0);continue}n[o]={[t]:s},r=!0}}return r?n:void 0},Ew={theme:(t,e)=>{if(t)return e.themeModifier?je(t,`@${e.themeModifier}`):je(t)},color:(t,e)=>{let n=Oe(e);if(t)return pe("color",jt(t,n))},background:(t,e)=>{let n=Oe(e);if(t)return v(t)&&t.includes("gradient")&&t.includes("(")?{background:kl(t,n)}:pe("background",jt(t,n))},backgroundColor:(t,e)=>{let n=Oe(e);if(t)return pe("backgroundColor",jt(t,n))},backgroundImage:(t,e,n,r)=>{let o=Oe(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 pe("backgroundImage",Jd(t,o))},textStroke:t=>{let e=Zd(t);if(e!=null)return{WebkitTextStroke:e}},outline:t=>({outline:xn(t)}),outlineWidth:(t,e)=>F("outlineWidth",t,e),outlineColor:(t,e)=>{let n=Oe(e);if(t)return pe("outlineColor",jt(t,n))},outlineOffset:(t,e)=>F("outlineOffset",t,e),border:t=>({border:xn(t)}),borderColor:(t,e)=>{let n=Oe(e);if(t)return pe("borderColor",jt(t,n))},borderTopColor:(t,e)=>{let n=Oe(e);if(t)return pe("borderTopColor",jt(t,n))},borderBottomColor:(t,e)=>{let n=Oe(e);if(t)return pe("borderBottomColor",jt(t,n))},borderLeftColor:(t,e)=>{let n=Oe(e);if(t)return pe("borderLeftColor",jt(t,n))},borderRightColor:(t,e)=>{let n=Oe(e);if(t)return pe("borderRightColor",jt(t,n))},borderLeft:t=>({borderLeft:xn(t)}),borderTop:t=>({borderTop:xn(t)}),borderRight:t=>({borderRight:xn(t)}),borderBottom:t=>({borderBottom:xn(t)}),shadow:(t,e)=>{let n=Oe(e);if(t)return pe("boxShadow",Qd(t,n))},boxShadow:(t,e)=>{if(!v(t))return;let[n,r]=t.split("!importan"),o=Oe(e),s=r?" !important":"",i=xl(n.trim(),o);return v(i)?{boxShadow:i+s}:pe("boxShadow",i)},textShadow:(t,{context:e})=>pe("textShadow",xl(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:xn(t)})};var Pl={transition:t=>{let e=np(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:vl(t)}),transitionDelay:t=>({transitionDelay:vl(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Ae(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};M();var Aw={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}}};M();var uj=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,$C=t=>{if(!v(t))return t;let e=O().sizes;return e?t.replace(uj,(n,r,o)=>{let s=e[o];return s==null?n:r+String(s)}):t},vn=t=>$C(ep(t)),Cw={gridTemplateColumns:t=>({gridTemplateColumns:vn(t)}),gridTemplateRows:t=>({gridTemplateRows:vn(t)}),gridAutoColumns:t=>({gridAutoColumns:vn(t)}),gridAutoRows:t=>({gridAutoRows:vn(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:vn(t)}),templateColumns:t=>({gridTemplateColumns:vn(t)}),autoColumns:t=>({gridAutoColumns:vn(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:vn(t)}),templateRows:t=>({gridTemplateRows:vn(t)}),autoRows:t=>({gridAutoRows:vn(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var mt={...ww,...Sw,...xw,...kw,...vw,...Ew,...Pl,...Aw,...Cw};var Ot=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","viewTransitionClass","viewTransitionName","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);M();var dj=/^[a-z][0-9]?$/,NC=/var\(\s*(--[A-Za-z0-9-]+)/g,pj=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}},hj=Object.prototype.propertyIsEnumerable,FC=(t,e)=>{if(!t||typeof t!="object")return!1;for(let n in t){let r=t[n];if(!r||typeof r!="object")continue;let o=r.sequence;if(o&&typeof o=="object"&&hj.call(o,e))return!0}return!1},Tw=/[(),\s]+/,Ow=(t,e)=>{let n=null,r=t.split(Tw);for(let o=0;o<r.length;o++){let s=r[o];s&&e(s)&&(n||(n=[])).push(s)}return n},Rw=(t,e)=>wn.test(t)&&e(t.charCodeAt(0)===45?t.slice(1):t),gj=(t,e)=>{if(!e.size)return[];let n=o=>e.has(o),r=Ow(t,o=>Rw(o,n));return r?[...new Set(r)]:[]},mj=(t,e)=>{if(!e.size)return[];let n=[];NC.lastIndex=0;let r;for(;r=NC.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(!dj.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},Ap=new Set,jC=(t,e,n)=>{if(!J()||!v(e)||!e)return;let r;try{r=O()}catch{return}let{knownLetters:o,knownVars:s}=pj(r);if(!o.size&&!s.size)return;let i=gj(e,o),a=mj(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}`;Ap.has(f)||(Ap.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}`;Ap.has(u)||(Ap.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}"`))}};M();var yj=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,bj=(t,e,n)=>{let{context:r}=n;if(!r.designSystem?.media)return;let o=t.slice(1),s=r.designSystem.media[o],i=Xt(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(yj),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},BC=(t,e,n)=>({[t]:Xt(e,n)}),Ll=(t,e,n)=>{let r=`&${t}`,o=Xt(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}},Pw=(t,e)=>{let n=e.context?.cases?.[t];if(n!==void 0)return R(n)?n.call(e,e):!!n},_j=(t,e,n)=>{let r=t.slice(1),o=Pw(r,n);if(o===void 0&&(o=!!n[r]),!!o)return Xt(e,n)},wj=(t,e,n)=>({[t]:e}),Sj=(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=Pw(r,n);s!==void 0&&(o=s)}if(o)return Xt(e,n)},xj=(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=Pw(r,n);s!==void 0&&(o=s)}if(!o)return Xt(e,n)},Lw=(t,e)=>Xt(t,e),Dw={"@":bj,":":Ll,"[":Ll,"*":Ll,"+":Ll,"~":Ll,"&":BC,">":BC,$:_j,"-":wj,".":Sj,"!":xj};var Cp=ur(),UC=(t,e,n)=>{let r=e?.context?.designSystem;r&>(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=VC(c,e);l&&(n.unpack?vt(o,l):o.designSystemClass=l)}else if(a==="true"){let l=ht(c,e);vt(o,Lw(l,e))}else if(e.classlist?.[a]){let l=e.classlist[a],f=R(l)?l(e,e.state,e.context):l;f&&i(a,f),!Cp&&E(o[a])&&(o[a].label=a)}else if(mt[a]){let l=ht(c,e);if(l===null)continue;L(l)&&(l=l.reduce((u,d)=>vt(u,d),{}));let f=mt[a](l,e,e.state,e.context);L(f)&&(f=f.reduce((u,d)=>vt(u,d),{})),f&&i(a,f),!Cp&&E(o[a])&&(o[a].label=a)}else if(Ot.has(a)){let l=ht(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),Cp||jC(a,l,e),i(a,{[a]:l}),!Cp&&E(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{r&&dt()}},VC=(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=ft(s);r=r?Jt(r,i):i}if(r)return Xt(r,e)},zC=(t,e)=>{let n={};for(let r in t){let o=Dw[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"?Jt(n[i],s[i]):n[i]=s[i])}}return n},Xt=(t,e,n={unpack:!0})=>{let[r,o]=UC(t,e,n),s=zC(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(n.unpack)return Na(r,s);r._selectors=s}return r},kj=(t,e)=>{let n={};if(t.class)for(let r in t.class)n[r]=t.class[r](e);return n};M();var HC=t=>{if(E(t))return Xt(t,t)},vj=(t,e)=>{let n=HC(t);return typeof e=="function"?e(n):Te(n)};M();var WC=/\s*!important\s*$/,Ej=()=>{let t;try{t=O()}catch{t=null}let e=t&&t.sizes&&typeof t.sizes=="object"?t.sizes:null,n=null,r=s=>{n||(n=new Map);let i=n.get(s);return i===void 0&&(i=FC(t,s),n.set(s,i)),i},o=s=>ti(e,s)!==void 0;return{isToken:s=>s.charCodeAt(0)!==35&&(Rw(s,r)||o(s))}},Aj=(t,e)=>{let n=String(t).split(Tw);for(let r=0;r<n.length;r++)if(n[r]===e)return!0;return!1},Cj=(t,e)=>{let n=typeof globalThis<"u"?globalThis.CSS:void 0;if(!n||typeof n.supports!="function")return!1;try{return n.supports(de(t),e)}catch{return!1}},qC=new Set,Tj=(t,e,n)=>{if(!J())return;let r=t?.__ref?.path?t.__ref.path.join("."):t?.key||"?",o=r+"::"+e+"::"+n;qC.has(o)||(qC.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}"`))},Oj=(t,e)=>{if(!t||typeof t!="object")return!1;let n=!1;for(let r in t){let o=t[r];if(o!=null){if(typeof o=="object"||typeof o=="function")return!1;for(let s of e)if(Aj(o,s))return!1;n=!0}}return n},Rj=(t,e,n,r)=>{if(!v(e)||!e||t.charCodeAt(0)===45&&t.charCodeAt(1)===45)return null;let o=mt[t];if(!o||!Ot.has(t))return null;let s=WC.test(e),i=s?e.replace(WC,""):e,a=Ow(i,r.isToken);if(!a||Cj(t,i))return null;let c;try{c=o(i,n,n?.state,n?.context)}catch{c=null}if(Array.isArray(c)){let f={};for(let u of c)u&&typeof u=="object"&&Object.assign(f,u);c=f}if(!Oj(c,a))return Tj(n,t,e),null;let l={};for(let f in c){let u=c[f];u!=null&&(l[f]=s?String(u)+" !important":u)}return l},KC=(t,e,n)=>{let r={},o=!1;for(let s in t){let i=t[s];if(s.charCodeAt(0)===38&&i&&typeof i=="object"&&!Array.isArray(i)){let c=KC(i,e,n);c!==i&&(o=!0),r[s]=c;continue}let a=Rj(s,i,e,n);a?(o=!0,Object.assign(r,a)):r[s]=i}return o?r:t},Iw=(t,e)=>!t||typeof t!="object"||Array.isArray(t)?t:KC(t,e,Ej());if(!_t||!Be)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 Tp=_t,Mo=Be,Mw=El||(()=>!1),GC=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,$o=de||(t=>GC(t)?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),Dl=Tl||(t=>GC(t)?t:t.replace(/-([a-z])/g,(e,n)=>n.toUpperCase()));function XC(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 Si(t,e,n){let r=XC(e);if(!r.length)return;let s=(t.context||n?.context||{}).components||{};for(let i=0;i<r.length;i++){let a=ZC(r[i],s);a&&a!==e&&QC(t,a,n,new Set([e]))}}function ZC(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 QC(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let o=XC(e);if(o.length){let a=(t.context||n?.context||{}).components||{};for(let c=0;c<o.length;c++){let l=ZC(o[c],a);l&&QC(t,l,n,r)}}let s=Nw(t);for(let i in e){if(i==="extends"||i==="extend")continue;let a=e[i];s&&s.mark(i),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]=tT(t[i],a):t[i]=a}}var $w=class{constructor(){this.rank=0,this.ranks=null}mark(e){Pj(e)&&(this.ranks||(this.ranks=new Map),this.ranks.set(e,this.rank))}get(e){return this.ranks?this.ranks.get(e):void 0}get size(){return this.ranks?this.ranks.size:0}},Op=new Set;for(let t of[Mo,Tp])for(let e in t)Op.add(e),Op.add(Dl(e));var YC=new Map;function Pj(t){let e=t.charCodeAt(0);if(e>=65&&e<=90||e>=48&&e<=57)return!1;let n=YC.get(t);return n===void 0&&(n=!!mt[t]||Op.has(t)||t.indexOf("-")>=0&&!(t.charCodeAt(0)===45&&t.charCodeAt(1)===45)&&Op.has($o(t)),YC.set(t,n)),n}function Nw(t){let e=t&&t.__ref;if(!e)return null;let n=e.__mergeLayer;return n||(n=e.__mergeLayer=new $w),n.rank++,n}function JC(t){let e=t&&t.__ref&&t.__ref.__mergeLayer;if(!e||!e.ranks)return;let n;for(let r of e.ranks.values())if(n===void 0)n=r;else if(r!==n)return;e.ranks=null}function tT(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]=tT(o,s):n[r]=s}return n}Mt();function xi(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"&&Fw(r))try{let a=n.onBeforeUpdate(n,n.state,n.context,e);if(a&&typeof a.then=="function")a.then(()=>Hn(r,!1),c=>{Hn(r,!0),kn("error",n,{hook:"onBeforeUpdate",error:c})||console.error("[DOMQL] onBeforeUpdate error:",c)});else if(Hn(r,!1),a===!1)return n}catch(a){throw Hn(r,!0),a}let o=!t||Object.keys(t).length===0,s=[],i=!1;tu(()=>{if(t.state&&wt(n.state)&&n.state.$update(t.state),t.text!==void 0&&(n.text=t.text,!r.__exec.text&&n.node&&ki(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=Ei(n,t.style);for(let c in a){let l=a[c];if(l==null)continue;let f=$o(c),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];vi(n.node,a,c)}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(It.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&&ee(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++)rT(n,s[a]);if(n.node){let a=i;for(let c=0;!a&&c<s.length;c++)eT(s[c])&&(a=!0);a&&nT(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 kn("update",n),!e.preventListeners&&typeof n.onUpdate=="function"&&n.onUpdate(n,n.state,n.context,e),n}Mt();function Wn(t){if(!t)return;let e=t.__ref;if(!e)return;if(fn())return en(()=>Wn(t));e.__disposed=!0;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(r){console.error("[smbls] onBeforeRemove error:",r)}if(e.__bridge&&CC(t),e.__effects){for(let r=0;r<e.__effects.length;r++)e.__effects[r].dispose();e.__effects.length=0}if(typeof e.__releaseMedia=="function"&&(e.__releaseMedia(),e.__releaseMedia=null),e.__eventCleanup){for(let r=0;r<e.__eventCleanup.length;r++)e.__eventCleanup[r]();e.__eventCleanup.length=0}if(e.__children){let r=e.__children.slice();e.__children.length=0;for(let o=0;o<r.length;o++){let s=t[r[o]];s&&s.__ref&&Wn(s)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let n=t.state?.$destroy||t.state?.destroy;if(typeof n=="function"&&t.state.__element===t&&n.call(t.state),t.parent?.__ref?.__children){let r=t.parent.__ref.__children.indexOf(t.key);r!==-1&&t.parent.__ref.__children.splice(r,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(r){console.error("[smbls] onRemove error:",r)}t.node=null,t.parent=null,t.__ref=null}function Ai(){Wn(this)}M();M();function Uw(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 oT=new Set;function sT(t,e,n){let r=String(e);if(oT.has(r))return;oT.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.`;Uw(t,"error",[a]),console.error(a)}var aT=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Lj=new Set,cT=t=>aT(jw,t)&&!(_s||Lj).has(t),iT=new Set;function lT(t,e){iT.has(t)||(iT.add(t),J()&&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 Dj(...t){return Uw(this,"warn",t),vc.apply(this,t)}function Ij(...t){return Uw(this,"error",t),uo.apply(this,t)}var jw={update:xi,remove:Ai,getDB:Tc,getQuery:Oc,getRootData:Sc,getPath:yc,nextElement:Ec,previousElement:Ac,verbose:Ds,warn:Dj,error:Ij,variables:Cc,spotByPath:mc,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:wc,getRootState:_c,getRootContext:xc,getContext:kc,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=cT(t);r&&n?.methods?.[t]&&n.methods[t]!==this[t]&&lT(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=so;if(!s||!s(o))return o.call(this,...e);J()&&sT(this,t,Se(o));return}J()&&sT(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)}},Bw=new WeakMap;function Mj(t){if(!t)return jw;let e=Bw.get(t);if(e)return e;e=Object.create(jw);let n=t.methods;if(n)for(let r in n)e[r]=n[r];return Bw.set(t,e),e}function Ci(t){let e=Mj(t.context);Object.setPrototypeOf(t,e)}function Ti(t){if(!t)return!1;let e=Bw.get(t);if(!e)return!1;let n=t.methods;if(!n)return!1;for(let r in n){if(cT(r)&&!aT(e,r)){lT(r,"refreshContextProto");continue}e[r]=n[r]}return!0}var Rp=[],Pp=!1,Mr=0,Oi=!1;function Pi(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function fT(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 Vw(t=0){return!Mr||Pi()-Mr+t<50?!1:(Oi=!0,!0)}function zw(){let t=0,e=0,n=0;return{begin(){n=Pi()},end(){let r=Pi()-n;t+=r,e++;let o=t/e;return r>o?r:o}}}var Ri=0;function Hw(){Ri===0&&!Mr&&(Mr=Pi(),Oi=!1),Ri++}function Ww(){Ri>0&&Ri--,Ri===0&&!Pp&&(Mr=0,Oi=!1)}function qw(t){Rp.push(t),Pp||(Pp=!0,fT(uT))}function uT(){for(Mr=Pi(),Oi=!1;Rp.length;){let t=Rp.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(Oi||Pi()-Mr>=50)break}if(Rp.length){fT(uT);return}Pp=!1,Mr=0,Oi=!1,Ri=0}M();M();var Zw={};j(Zw,{STATE_METHODS:()=>dT,applyInitialState:()=>Lp,applyStateMethods:()=>he,callStateMethod:()=>Ml,createState:()=>Gw,isTracking:()=>Xw,useHostState:()=>Yw});Mt();Mt();var dT=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"]),Il=(t,e,n)=>{Object.defineProperty(t,e,{value:n,enumerable:!1,configurable:!0,writable:!0})},nn=(t,e,n,{onlyIfAbsent:r}={})=>{Il(t,"$"+e,n),!(r&&Object.prototype.hasOwnProperty.call(t,e))&&Il(t,e,n)},Ml=(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)},he=(t,e)=>{if(wt(e)){let o=e.__raw||e;nn(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),nn(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}),nn(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}),nn(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}),nn(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}),nn(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),nn(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),nn(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),nn(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&wt(a.parent);)a=a.parent;return Ml(a,"update",s,i)}),nn(o,"parentUpdate",function(s,i={}){if(e.parent)return Ml(e.parent,"update",s,i)}),nn(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=wt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,wt(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}};Il(e,"$settled",function(){return nu().then(()=>e)});for(let o in r)if(Il(e,"$"+o,r[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){ou(o,"");continue}Il(e,o,r[o])}};var Gw=function(t,e,n){return t.state=Lp(t,e,n),t.state},Lp=function(t,e,n){let{__ref:r}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return he(t,s),s}if(typeof o=="string")return r&&(r.__state=o),r.__stateType="string",$j(o,t,e);if(typeof o=="number"||typeof o=="boolean"){r&&(r.__state=o,r.__stateType=typeof o,r.__hasRootState=!0);let s=An({value:o});return s.__element=t,e?.state&&(s.parent=e.state),he(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!wt(o)){r&&(r.__hasRootState=!0),o.isRootState&&r&&(r.__hasRootState=!0);let s=An({...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)),he(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,n),s}return wt(o)?(o.__element=t,o):e?.state||{}};function Kw(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 $j(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?Kw(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?Kw(o,s):o??{}}let r=Kw(n.state,t);if(r&&typeof r=="object"&&!wt(r)&&!Object.getOwnPropertyDescriptor(r,"root")){let o=n.state?.root||n.state;Object.defineProperty(r,"root",{get:()=>o,enumerable:!1,configurable:!0})}return r}Mt();var Yw=(t,e)=>{if(!t)return hT;let n=Fj(t,e);return!n||!n.state?hT:Bj(n.state)},Xw=()=>fn()!=null,Nj=128;function Fj(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<Nj&&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 jj={get(t,e){return t[e]}},pT=new WeakMap,Bj=t=>{let e=pT.get(t);return e||(e=new Proxy(t,jj),pT.set(t,e)),e},hT=new Proxy(Object.create(null),{get(){},has(){return!1}});M();var Uj=["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"],Vj=["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"],zj=["requiredExtensions","systemLanguage"],gT={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"]},Hj=new Set(["linearGradient","radialGradient","stop","clipPath","mask","marker","pattern","filter","symbol"]),Wj=()=>{let t={};for(let e in gT)t[e]=[...gT[e],...Hj.has(e)?[]:zj,...Vj];return t},qn={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"],...Wj()},_T=["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"],wT=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,mT=new Map,Kn=t=>{let e=mT.get(t);return e===void 0&&(e=wT(t)||kT(t),mT.set(t,e)),e},ST=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"]),Qw=new Set;for(let t in qn)t==="default"||t==="aria"||t==="svg"||qn[t].forEach(e=>{e.startsWith("on")||Qw.add(e)});var xT=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(Qw.has(n))return n;let r=t.toLowerCase();return Qw.has(r)?r:null},kT=t=>ST.has(t)?t.toLowerCase():xT(t),qj=new Set(["draggable","contenteditable","spellcheck","autocorrect","writingsuggestions","translate"]),Kj=new Map([["autocorrect",["on","off"]],["translate",["yes","no"]]]),Fo=t=>typeof t=="string"&&(qj.has(t)||t.startsWith("aria-")),En=(t,e)=>{if(e!==!0&&e!==!1)return e;if(Fo(t)){let n=Kj.get(t);return n?e?n[0]:n[1]:e?"true":"false"}return e===!0?"":e},yT=new Map,ze=(t,e)=>{let n=qn.default,r=Object.prototype.hasOwnProperty.call(qn,t)?qn[t]:null,o=r?r.length:-1,s=yT.get(t);(!s||s.def!==n||s.defLen!==n.length||s.own!==r||s.ownLen!==o)&&(s={def:n,defLen:n.length,own:r,ownLen:o,answers:new Map},yT.set(t,s));let i=s.answers.get(e);return i===void 0&&(i=Gj(t,e),s.answers.set(e,i)),i},Gj=(t,e)=>{if(e.startsWith("aria-")||e.startsWith("data-")||wT(e)||ST.has(e)||qn.default.includes(e))return!0;if(Object.prototype.hasOwnProperty.call(qn,t)){let n=qn[t];if(n.includes(e))return!0;let r=xT(e);return r!==null&&n.includes(r)}return!1},tS=t=>{if(!v(t))return!1;let e=t.toLowerCase();return _T.includes(e)},Yj=(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])Lt(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(Lt(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());r["data-"+c]=e[o][a]}continue}let s=ze(t,o),i=tS(o);if(Lt(e[o])&&(s||i)){let a=Kn(o)||o;r[a]=e[o]}}return r},Xj=(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},$r=(t,e)=>{let n=t.call("exec",e,t);if(n)return v(n)&&n.includes("{{")&&(n=t.call("replaceLiteralsWithObjectFields",n)),n},Jw=(t,e)=>{let n=(t.preSrc||"")+($r(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},No={src:t=>Jw(t,t.src),href:t=>$r(t,t.href),action:t=>$r(t,t.action),poster:t=>Jw(t,t.poster),data:t=>$r(t,t.data)},eS=t=>{let e=t.tag||"div",n={};for(let r in No)if(t[r]!==void 0&&ze(e,r)){let o=No[r](t);o!==void 0&&(n[r]=o)}return n},bT=(t,e)=>{let n=e.context?.cases?.[t];if(n!==void 0)return R(n)?n.call(e,e):!!n},Zj=(t,e,n)=>{if(t==="$"){let o=bT(e,n);return o===void 0&&(o=!!n[e]),o}let r=n[e]===!0||n.state[e];if(!r){let o=bT(e,n);o!==void 0&&(r=o)}return t==="."?!!r:!r},Qj=new Set(["$",".","!"]),nS=(t,e,n,r=Zj)=>{let o={},s=(i,a,c,l)=>{let f=a;o[i]=u=>{if(r(c,l,u))return R(f)?f(u,u.state,u.context):f}};for(let i in t){let a=i.charAt(0);if(!Qj.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 p=g.replace(/([A-Z])/g,m=>"-"+m.toLowerCase());s("data-"+p,c[f][g],a,l)}continue}let u=ze(e,f),d=tS(f);if(!u&&!d)continue;let h=Kn(f)||f;s(h,c[f],a,l)}}return o};var Dp="3.14.804";var vT="__SMBLS_ELEMENT_ID_ENGINE__",ET=(t,e,n)=>{let r=e||Dp,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[vT];return s&&s.engine&&s.version===r?s.engine:(s||(o[vT]={version:r,engine:t}),t)};var Jj=new Set(["rows","cols","wrap","fill","stroke","offset"]),Ip=(t,e)=>Jj.has(e)&&ze(t,e),Nr=(t,e)=>!!(mt[e]||Ot&&Ot.has(e))&&!Ip(t,e);var JT=ET({uniqId:1,scopedStyleId:0},Dp),Nl=[],jo=new Set,wS=!1,t1=0,Mi=null,Wl=null;function $i(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function e1(){return typeof document<"u"&&document.visibilityState==="hidden"}var tB=250,eB=1e3;function nB(){return Wl&&(Wl!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||e1())?!0:$i()-t1>=eB}function rB(){if(wS=!0,t1=$i(),Wl=null,typeof requestAnimationFrame!="function"){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(Ul,0);Mi=t?()=>t(e):null;return}if(e1()){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(Ul,tB);Mi=t?()=>t(e):null}else{let t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;Wl=requestAnimationFrame;let e=requestAnimationFrame(Ul);Mi=t?()=>t(e):null}}function Fp(){if(wS){if(!nB())return;let t=Mi;if(Mi=null,t)try{t()}catch{}}rB()}var n1=300,r1=15e4;function Ul(){if(wS=!1,Mi=null,Wl=null,jo.size&&n3(),!Nl.length)return;let t=Nl.splice(0,Nl.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=$i());let o=$i()-r.__mountFirstAttemptAt;r.__mountAttempts<=n1&&o<r1?(Nl.push(n),Fp()):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"&&AC(n),typeof n.onMounted=="function"&&Bt("Mounted",n,n.__ref?.__mountOptions||{})}}}function uS(t,e){let n=t.__ref?.__autoGrow;n&&n.active&&Gl(t,!0),!(typeof t.onMounted!="function"&&typeof t.onBridgeMount!="function")&&(t.__ref.__mountOptions=e,Nl.push(t),Fp())}function AT(t,e){typeof t.onContentUpdate=="function"&&(kn("contentUpdate",t,e),Ue(t,()=>{try{t.onContentUpdate(t,t.state,t.context,e)}catch(n){if(Ve(t,"onContentUpdate",n),t.context?.strictMode)throw n}}))}function Gn(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function oB(t){return t.charAt(2).toLowerCase()+t.slice(3)}function sB(t){return t.toLowerCase()}function dS(t){let e=t.charCodeAt(0);return e===58||e===64||e===38||e===91}function Fl(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]=Fl(o,s):n[r]=s}return n}function Mp(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function o1(t,e,n,r){return jp(r,Mp(t)||(e&&typeof e=="object"?Mp(e.key):void 0)||String(n))}function jp(t,e){if(!t||typeof e!="string")return e;let n=e;for(;iB(t,n);)n="$"+n;return n!==e&&aB(t,e,n),n}function iB(t,e){if(It.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 CT=new Set;function aB(t,e,n){if(!J())return;let r=t.__ref&&t.__ref.path&&t.__ref.path.join(".")||t.key||"<root>",o=r+"::"+e;CT.has(o)||(CT.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 ee(t,e,n,r={},o){if(fn())return en(()=>ee(t,e,n,r,o));if(t==null||t===!1)return null;let s=AB(t);(typeof t=="string"||typeof t=="number")&&(t={text:t}),n=Mp(n);let i=Mp(t.key),a=Object.create(null);a.key=n||(i&&e?jp(e,i):i)||`_${JT.uniqId++}`,a.parent=e||null,a.context=t.context||e?.context||r.context||{},a.context.__create||(a.context.__create=ee);let c=a.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||a,path:e?.__ref?.path?[...e.__ref.path,a.key]:[a.key],origin:t};s&&(c.__runtimeSource=s);let l=t;if(t=s1(a,t,n,i,e,r),a.if!=null){let u;if(typeof a.if=="function")try{u=a.if(a,a.state,a.context)}catch(d){if(u=!1,c.__ifError=d,typeof console<"u"&&console.warn){let h=a.key||a.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${h} \u2014 treating as false:`,d?.message||d)}}else u=a.if;c.__if=!!u}if(c.__if)typeof a.if=="function"&&(c.__ifInitialized=!0);else{e&&(e[a.key]=a);let u=fB(t,n,a.context?.components);return u.length&&(c.__ifLateMerge={definition:l,key:n,ownKey:i,names:u,options:r}),typeof a.if=="function"&&h1(a,c,a.if),a}a.tag||(a.tag=zn(a)),Bt("Init",a,r);let f=a.node=mp(a)||Dr(a);if(!f)return a;if(a.tag==="fragment"){let d=(a.context?.document||globalThis.document).createComment("");f.appendChild(d),c.__fragmentAnchor=d}Bt("AttachNode",a,r),f.setAttribute&&a.key&&f.setAttribute("data-key",a.key),e&&(e[a.key]=a,e.__ref?.__children&&(e.__ref.__children.includes(a.key)||e.__ref.__children.push(a.key))),f.setAttribute&&a.context?.scopeSelector&&a.context.scopeSelector!==":root"&&a.context.key&&a.key===a.context.key&&f.setAttribute("data-smbls-app",a.context.key),a.id&&f.setAttribute&&(f.id=a.id),O1(a,r),d1(a),p1(a);try{R1(a,r)}catch(u){if(typeof console<"u"&&console.error){let d=a.__ref?.path?.join(".")||a.key||"<root>";console.error(`[smbls] createChildren failed at ${d}:`,u?.message||u,u?.stack?`
|
|
57
|
-
`+
|
|
55
|
+
Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function iO(){try{let t=O(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function K1(t){Th||we.variable>0||we.atomic>0||aO(Math.max(t,iO()))}function px(t){let e=t&&(t.CSS_VARS||t.cssVars);return aO(e?Object.keys(e).length:iO())}function aO(t){let e=Ph();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!lO())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 I5(n,t),{ok:!1,reason:n,stats:e,varCount:t}}var M5={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 $5(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}var oa=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,G1=new Map,Se=t=>{if(oa(t))return t;let e=G1.get(t);return e===void 0&&(e=$5(t),G1.set(t,e)),e},Y1=new Map,Of=t=>{if(oa(t))return t;let e=Y1.get(t);return e===void 0&&(e=t.replace(/-([a-z])/g,(n,r)=>r.toUpperCase()),Y1.set(t,e)),e};function Oh(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 N5(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Oh(e)}var F5={"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 is(t,e){let n=F5[t];return n?`${t}:${e};${n}:${e};`:`${t}:${e};`}function rx(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)r[s]!=null&&(o+=is(Se(s),r[s]));e+=`${n}{${o}}`}return e}function ox(t){return t.charCodeAt(0)===64&&!ia(t)}function X1(t){let e="";for(let n in t){let r=t[n];if(!ox(n)||typeof r!="object"||r===null)continue;let o="";for(let s in r){let i=r[s];i==null||typeof i=="object"||(o+=is(Se(s),i))}e+=`${n}{${o}}`}return e}var j5="@media (hover: hover)",B5=/(?:^|[^\\]):hover(?![\w-])/;function hx(){try{let t=O();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function ar(t,e,n){return n===!1||!B5.test(e)||n===void 0&&!hx()?t:`${j5}{${t}}`}var gx=new Map;function U5(t,e,n,r){let o=sa.get(t);if(!o){let c=M5[e]||Oh(e),l=N5(n);o=r?`_${r}_${c}-${l}`:`_${c}-${l}`,sa.set(t,o)}let i=typeof n=="string"&&(n.indexOf("}")!==-1||n.indexOf("{")!==-1)?null:`.${o}{${is(Se(e),n)}}`,a={className:o,rule:i,tier:i===null?null:mx(i,!0,"atomic")};return gx.set(t,a),a}function Z1(t,e,n){let r=(n?n+"":"")+t+":"+e,o=gx.get(r)||U5(r,t,e,n);return o.rule!==null&&fn(o.rule,void 0,"atomic",!0,o.tier),o.className}var J1=new WeakMap,Q1=new WeakMap;function fn(t,e,n,r,o){let s=z5(e,o||mx(t,r,n));if(!s)return we.dropped++,"dropped";let i=s.sheet,a=s.rules;if(a||(a=J1.get(i),a||(a=new Set,J1.set(i,a)),s.rules=a),a.has(t))return we.duplicate++,we[n||"global"]++,"duplicate";let c=Q1.get(i);if(c&&c.has(t))return we.invalid++,"invalid";try{i.insertRule(t,i.cssRules.length)}catch{return c||(c=new Set,Q1.set(i,c)),c.add(t),we.invalid++,"invalid"}return a.add(t),we[n||"global"]++,"inserted"}var Le="0:0",sx="1:0",cO="0:99",tO=/\((max|min)-width:\s*([\d.]+)(px|em|rem)?\)/g;function mx(t,e,n){if(typeof t!="string"||!t)return Le;if(t.charCodeAt(0)===64){if(!t.startsWith("@media")&&!t.startsWith("@supports")&&!t.startsWith("@container"))return Le;let i=1/0,a=-1/0;tO.lastIndex=0;let c;for(;c=tO.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:sx}if(t.charCodeAt(0)!==46)return n==="atomic"&&!e?cO:Le;if(!/^\.[\w-]+\{/.test(t))return sx;if(!e)return Le;let r=t.indexOf("{"),o=t.indexOf(":",r);if(o===-1)return Le;let s=ea(t.slice(r+1,o).trim());return s?"0:"+s:Le}var ra=null,V5=()=>{if(ra)return ra;let t=0;for(let e in qe)t=Math.max(t,ea(e));ra=[Le];for(let e=1;e<=t;e++)ra.push("0:"+e);return ra.push(cO,sx),ra},eO=t=>{let e=t.indexOf(":");return[Number(t.slice(0,e)),Number(t.slice(e+1))]},nO=(t,e)=>{let[n,r]=eO(t),[o,s]=eO(e);return n!==o?n<o:r<s},H5=t=>t.getAttribute("data-tier")||Le,ix=new WeakMap,Ch=!1,Cf=null,ax=0;function z5(t,e){if(Ch&&!t){let n=Cf&&ix.get(Cf),r=n&&n.get(e);if(r&&r.epoch===ax)return r;let o=Rh(Cf,e);return o&&(o.epoch=ax),o}return Rh(t||cr(),e)}function lO(t,e){let n=Rh(t||cr(),e);return n?n.sheet:null}function Rh(t,e){if(!t||!t.head)return null;let n=e||Le,r=ix.get(t);r||(r=new Map,ix.set(t,r));let o=r.get(n);if(o&&o.node.parentNode===t.head&&o.node.sheet===o.sheet)return o;if(n!==Le){let c=V5();for(let l=0;l<c.length&&nO(c[l],n);l++)Rh(t,c[l])}let s=n===Le?t.head.querySelector("style[data-smbls]:not([data-tier])"):t.head.querySelector(`style[data-smbls][data-tier="${n}"]`);if(!s){s=t.createElement("style"),s.setAttribute("data-smbls",""),n!==Le&&s.setAttribute("data-tier",n);let c=t.head.querySelectorAll("style[data-smbls]"),l=null;for(let u=0;u<c.length;u++)if(nO(n,H5(c[u]))){l=c[u];break}let f=c.length?c[c.length-1]:null;l?t.head.insertBefore(s,l):f?t.head.insertBefore(s,f.nextSibling):t.head.appendChild(s)}let i=s.sheet,a={sheet:i,node:s,rules:null,epoch:0};return r.set(n,a),n===Le&&(sO=i),a}function W5(t){let e=t||cr();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 q5=8;function Ie(t,e,n,r){if(!t||typeof t!="object")return"";if(Ch)return rO(t,n,r);Ch=!0,Cf=cr(),ax++;try{return rO(t,n,r)}finally{Ch=!1,Cf=null}}function rO(t,e,n){let r=!!(n&&n.state),o=null,s=0,i=[],a=[],c=Object.keys(t);for(let f=0;f<c.length;f++){let u=c[f],d=t[u];d==null||d===!1||d===""||(typeof d=="object"?a.push([u,d]):nx&&!oa(u)?(o||(o=[]),o.push(u,String(d)),s++):i.push(Z1(u,String(d),e)))}if(o&&s>=q5){let f=o.join("\0"),u=nx(f),d=u.indexOf("\0"),p=u.substring(0,d),g=u.substring(d+1);if(g){let h=g.split(`
|
|
56
|
+
`);for(let m=0;m<h.length;m++)h[m]&&fn(h[m],void 0,"atomic",!0)}i.push(p)}else if(o)for(let f=0;f<o.length;f+=2)i.push(Z1(o[f],o[f+1],e));let l=[];for(let f=0;f<a.length;f++)l.push(X5(a[f][0],a[f][1],e,r));return i.concat(l).join(" ").trim()}var oO=new Map,K5=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function ia(t){return/^@(media|supports|container)\b/.test(t)}function G5(t){return typeof t!="string"||!t||ia(t)?!1:t.split(",").every(e=>K5.test(e.trim()))}var fO=t=>{let e=Object.prototype.toString.call(t);return e==="[object Object]"||e==="[object Array]"},cx=32,lx=1024,fx=!1;function Eh(t,e,n){if(fx)return;fx=!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 Y5(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)||!fO(s)||n.length>cx||++r>lx)))return n.push(s),s})}}function X5(t,e,n,r){let o=Y5(e),s=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,i=s&&hx(),a=(n?n+"":"")+t+o+(s&&!i?"rawhover":"")+(r?"state":""),c=sa.get(a);if(c){let x=oO.get(c);if(x)for(let w=0;w<x.length;w+=2)fn(x[w],void 0,"atomic",void 0,x[w+1]);return c}c=n?`_${n}_c${Oh(a)}`:`_c${Oh(a)}`;let l=r?`.${c}.${c}`:`.${c}`,f=G5(t)?`${l}.${c}`:l,u="",d=[],p=x=>typeof x=="string"&&(x.indexOf("{")!==-1||x.indexOf("}")!==-1),g=new Set,h=0,m=(x,w)=>{g.add(w);let b="",k=Object.keys(w);for(let C=0;C<k.length;C++){let D=k[C],R=w[D];if(R!=null)if(typeof R=="object"){let $=[...x,D];g.has(R)?Eh("a style value that loops back to one of its own ancestors",t,$):fO(R)?$.length>cx?Eh(`a style block nested more than ${cx} levels deep`,t,$):++h>lx?Eh(`a style object with more than ${lx} nested blocks`,t,$):m($,R):Eh(`a ${Object.prototype.toString.call(R).slice(8,-1)} (not a style block)`,t,$)}else{if(p(R))continue;b+=is(Se(D),R)}}g.delete(w),b&&(x.length===0?u+=b:d.push({chain:x,body:b}))};m([],e);let y=x=>x.startsWith(":")||x.startsWith("["),_=(x,w=!0)=>{let b=w&&x.length===1?f:l;if(!x.length)return b;let k=x[0].split(",").map(C=>C.trim()).map(C=>C.includes("&")?C.replace(/&/g,b):y(C)?`${b}${C}`:`${b} ${C}`);for(let C=1;C<x.length;C++){let D=x[C].split(",").map($=>$.trim()),R=[];for(let $ of k)for(let N of D)N.includes("&")?R.push(N.replace(/&/g,$)):y(N)?R.push($+N):R.push($+" "+N);k=R}return k.join(", ")},S=[],v=(x,w)=>{let b=x.filter(ia),k=_(x.filter(R=>!ia(R)),b.length===0),C=`${k}{${w}}`;for(let R=b.length-1;R>=0;R--)C=`${b[R]}{${C}}`;C=ar(C,k,i);let D=mx(C,void 0,"atomic");S.push(C,D),fn(C,void 0,"atomic",void 0,D)};u&&v([t],u);for(let x of d)v([t,...x.chain],x.body);return oO.set(c,S),sa.set(a,c),c}function Et(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(lO(),typeof t=="string"){let s=t.indexOf("--")!==-1;fn(t,void 0,s?"variable":"global"),s&&K1(1);return}let e=hx(),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=rx(i);a&&fn(`${s}{${a}}`,void 0,"keyframes");continue}if(ia(s))for(let a in i){let c=i[a];if(a.startsWith("@keyframes")){let l=rx(c);l&&fn(`${s}{${a}{${l}}}`,void 0,"keyframes");continue}if(typeof c=="object"&&c!==null){let l="",f=0,u=a.charCodeAt(0)===64;for(let d in c){let p=c[d];p!=null&&(u&&typeof p=="object"||(oa(d)&&f++,l+=is(Se(d),p)))}u&&(l+=X1(c)),n+=f,fn(ar(`${s}{${a}{${l}}}`,a,e),void 0,f?"variable":"global")}else if(c!=null){let l=oa(a);l&&n++,fn(`${s}{${is(Se(a),c)}}`,void 0,l?"variable":"global")}}else{let a="",c=!1,l=0,f=s.charCodeAt(0)===64;for(let u in i){let d=i[u];if(d!=null)if(typeof d=="object"){if(f&&ox(u))continue;c=!0}else oa(u)&&l++,a+=is(Se(u),d)}if(f&&(a+=X1(i)),n+=l,a&&fn(ar(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let u=[],d=[];for(let p in i)if(typeof i[p]=="object"&&i[p]!==null){if(f&&ox(p))continue;ia(p)?u.push(p):d.push(p)}u.sort((p,g)=>{let h=m=>{let y=m.match(/max-width:\s*(\d+)/);return y?parseInt(y[1]):0};return h(g)-h(p)});for(let p of d)Et({[`${s} ${p}`]:i[p]});for(let p of u)Et({[p]:{[s]:i[p]}})}}}n>0&&K1(n)}function aa(t,e){return fn(`@keyframes ${t}{${rx(e)}}`,void 0,"keyframes"),t}function uO(){sa.clear(),gx.clear(),sO=null,fx=!1}function yx(){return sa.size}M();var kg={};F(kg,{DELEGATED_EVENTS:()=>ca,LIFECYCLE_EVENTS:()=>Ln,MIXINS:()=>Lh,MOUNT_YIELD_BUDGET_MS:()=>Ss,NON_BUBBLING_EVENTS:()=>Ih,REGISTRY:()=>Ht,SVG_TAGS:()=>ga,addDelegatedEvent:()=>Rf,addMethods:()=>_a,adoptHydrationNode:()=>B0,applyExtends:()=>da,attachElement:()=>oo,cacheNode:()=>Xr,create:()=>zt,createHTMLNode:()=>ha,detectTag:()=>Mn,dispose:()=>Fn,elementPath:()=>mg,flushMounts:()=>Ea,globalEventKeyInfo:()=>Bh,holdMountFlush:()=>Xf,inertOutsidePlugin:()=>xg,isSvgTag:()=>lr,isValidTag:()=>pa,mountPending:()=>Sg,mountYieldBudget:()=>Bn,refreshContextProto:()=>wa,registerEvent:()=>fa,registerGlobalEvent:()=>Uh,releaseMount:()=>$e,remove:()=>ba,removeDelegatedEvent:()=>Pf,update:()=>ya,whenConnected:()=>la,whenMountIdle:()=>hr,whenMounted:()=>xs,yieldToMain:()=>io});var ht={viewEvents:null,chains:null,rows:null,hydration:null,mount:null};var Ht=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"]),Lh={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Ln=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"]),Ih=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"]),Mh=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),ca=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"]);M();var as=new Set;function $h(t){let e=t&&t.node;if(!e)return!1;let n=e.nodeType===11?t.__ref?.__fragmentAnchor:e;return n?n.isConnected!==!1:!1}function la(t,e){let n=t&&t.node,r=t&&t.__ref;if(!(!n||!r||typeof e!="function")){if($h(t)){e(t);return}(r.__onConnected||(r.__onConnected=[])).push(e),as.add(t)}}function Nh(){if(as.size)for(let t of as){let e=t.__ref,n=t.node;if(!e||!n){as.delete(t);continue}if(!$h(t))continue;as.delete(t);let r=e.__onConnected;if(e.__onConnected=null,!!r)for(let o=0;o<r.length;o++)try{r[o](t)}catch(s){typeof console<"u"&&console.error&&console.error("[smbls] whenConnected callback failed:",s?.message||s)}}}function dO(t){as.size&&as.delete(t)&&t.__ref&&(t.__ref.__onConnected=null)}var wx=new WeakMap,Z5={passive:!0},J5={passive:!0,capture:!0},mO=(t,e)=>Mh.has(t)?e?J5:Z5:e||!1;function yO(t){let e=wx.get(t);return e||(e={handlers:new Map,installed:new Set},wx.set(t,e)),e}function Q5(t,e){let n=yO(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}},mO(t,r))}function Rf(t,e,n,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=yO(r);Q5(t,r),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,n)}function Pf(t,e,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let r=wx.get(n);if(!r)return;let o=r.handlers.get(t);o&&o.delete(e)}function Ke(t){if(t.charCodeAt(0)!==111||t.charCodeAt(1)!==110)return!1;let e=t.charCodeAt(2);return e>=65&&e<=90}function Fh(t){return t.charAt(2).toLowerCase()+t.slice(3)}var t4=/^[A-Za-z_$][\w$]*$/;function Df(t,e){return typeof e!="string"||!t4.test(e)?e:function(r){return t.call(e,r)}}function e4(t){return ca.has(t)&&!Ln.has(t)}function jh(t,e){let{context:n}=t,r=n?.designSystem;return o=>{r&&bt(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&&mt()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),n?.strictMode)throw s}r&&mt()}}var bO=t=>!!t&&(t.capture===!0||typeof t.passive=="boolean"||t.once===!0);function n4(t,e){return bO(e)?{capture:e.capture===!0,passive:typeof e.passive=="boolean"?e.passive:Mh.has(t),once:e.once===!0}:mO(t,!1)}function r4(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 fa(t,e,n,r){let{node:o,context:s}=e;if(!o)return;let i=jh(e,n),a=r&&typeof r.selector=="string"&&r.selector;a&&(i=r4(o,a,i));let l=!Ih.has(t)&&e4(t)&&!bO(r),f=l?null:n4(t,r);if(l){let u=s?.rootNode||o.ownerDocument?.documentElement;Rf(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;Pf(t,o,u)}else o.removeEventListener(t,i,f)})}var bx=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function Bh(t){if(typeof t!="string")return null;for(let e=0;e<bx.length;e++){let n=bx[e][0];if(t.length<=n.length||!t.startsWith(n))continue;let r=t.charCodeAt(n.length);if(!(r<65||r>90))return{target:bx[e][1],eventName:t.slice(n.length).toLowerCase()}}return null}function o4(t,e,n){let r=e,o=!1,s,i=!1,a=null;return 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)),r=Df(t,r),typeof r!="function"?null:(s===void 0&&(s=Mh.has(n)),{handler:r,capture:o,passive:s,once:i,query:a})}function s4(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 _x=/^@media\s+/i,i4=/^[@[.#&:>*~+]/,pO=new Set;function hO(t,e){!tt()||pO.has(t)||(pO.add(t),console.warn(`[smbls] onMediaQueryChange: "${t}" ${e} \u2014 no listener is registered.`))}function a4(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&&!_x.test(n)){if(s=o(n.slice(1)),!s)return hO(n,"is not a key of designSystem.media"),null}else s=o(n)||n;return _x.test(s)?s.replace(_x,"").trim()||null:i4.test(s)?(hO(n,`names "${s}", which is not a media query`),null):s}function c4(t,e,n,r){try{return t.addEventListener(e,n,r),!0}catch{return typeof t.addListener=="function"?(t.addListener(n),!0):!1}}function _O(t,e,n,r){try{t.removeEventListener(e,n,r)}catch{typeof t.removeListener=="function"&&t.removeListener(n)}}function Uh(t,e,n){if(e.__ref){if(Array.isArray(n)){if(t.target!=="mediaQuery")return;for(let o=0;o<n.length;o++)gO(t,e,n[o]);return}gO(t,e,n)}}function gO(t,e,n){let r=e.__ref,o=o4(e,n,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change"||t.target==="mediaQuery"&&(o.query=a4(e,o.query),!o.query))return;let s=s4(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=jh(e,o.handler),c=t.target==="window"&&t.eventName==="load",l=!1,f=p=>{if($h(e)){if(c){if(l)return;l=!0}a(p)}},u={capture:o.capture,passive:o.passive,once:o.once};if(!c4(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(()=>{_O(s,t.eventName,f,u),r.__globalEvents&&r.__globalEvents.delete(i)}),c&&l4(e,i,d,()=>l)}function l4(t,e,n,r){let o=n.target.document;!o||o.readyState!=="complete"||la(t,()=>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()&&_O(i,"load",n.listener,n.options))}))}var Sx=Symbol("handlerChain.none"),f4=new Set(["inView","leaveView"]),u4=new Set(["bridgeMount","bridgeUpdate","bridgeDestroy"]),ua=new WeakMap,wO=new WeakMap,Ex=!1,xx=t=>t!==null&&typeof t=="object"&&t.always===!0;function d4(t){let e=Fh(t);return f4.has(e)?!0:Ln.has(e)&&!u4.has(e)}var SO=new Set;function p4(t){SO.has(t)||!tt()||(SO.add(t),console.warn(`[smbls] \`${t}: { always: true, \u2026 }\` \u2014 \`always\` composes the lifecycle hooks (onInit, onRender, onCreate, onMounted, onUpdate, onRemove, \u2026; not the bridge hooks) and onInView / onLeaveView only. \`${t}\` keeps the default merge: an extender's own \`${t}\` replaces this one. Run the shared step from a lifecycle hook, or call it from the extender's handler.`))}function kx(t){return t&&typeof t=="object"?{handler:t.handler,options:t}:{handler:t,options:null}}function Lf(t,e){let n={always:t,own:e,list:e?t.concat(e):t,next:null,prims:null,cleared:null},r=function(...s){return m4(n,this,s)};return ua.set(r,n),Ex=!0,r}function vx(t){let e=wO.get(t);return e||(e=Lf([kx(t)],null),wO.set(t,e)),e}function h4(t,e){let n=ua.get(t);if(e==null||e===!1)return n.own?n.cleared||(n.cleared=Lf(n.always,null)):t;if(typeof e!="object"&&typeof e!="function"){let i=n.prims||(n.prims=new Map),a=i.get(e);return a||i.set(e,a=Lf(n.always,kx(e))),a}let r=n.next||(n.next=new WeakMap),o=r.get(e);if(o)return o;let s=xx(e)?ua.get(vx(e)):typeof e=="function"?ua.get(e):void 0;return o=s?Lf(n.always.concat(s.always),s.own):Lf(n.always,kx(e)),r.set(e,o),o}function g4(t,e,n){let r=xx(e),o=!r&&Ex&&typeof e=="function"&&ua.has(e);if(!r&&!o&&!xx(n))return Sx;if(!d4(t))return p4(t),Sx;let s=r?vx(e):o?e:null;return s?h4(s,n):vx(n)}function xO(t,e,n,r){if(!Ke(e))return!1;let o=g4(e,n,r);return o===Sx?!1:(t[e]=o,!0)}function Ax(t){if(typeof t=="function"){let e=Ex?ua.get(t):void 0;return e?e.list:[{handler:t,options:null}]}return typeof t=="string"?[{handler:t,options:null}]:t&&typeof t=="object"?[{handler:t.handler,options:t}]:[]}function m4(t,e,n){let r=t.list,o,s=!1,i=null,a=!1,c;for(let l=0;l<r.length;l++){let f=r[l].handler;if(typeof f!="function")continue;let u;try{u=f.apply(e,n)}catch(d){a?console.error("[smbls] lifecycle handler error:",d):(a=!0,c=d);continue}u===!1?s=!0:u&&typeof u.then=="function"&&(i||(i=[])).push(u),o=u}if(a){if(i)for(let l of i)l.then(null,f=>console.error("[smbls] lifecycle handler error:",f));throw c}return s?!1:i?i.length===1?i[0]:y4(i):o}function y4(t){return Promise.allSettled(t).then(e=>{let n=null;for(let r of e)r.status==="rejected"&&(n?console.error("[smbls] lifecycle handler error:",r.reason):n=r);if(n)throw n.reason})}var b4=1e-6,kO=new WeakMap;function _4(t,e,n){let r=t.defaultView,o=r&&r.IntersectionObserver;if(typeof o!="function")return null;let s=kO.get(t);s||kO.set(t,s=new Map);let i=e+"|"+n,a=s.get(i);if(a)return a;a={id:i,byKey:s,threshold:e,targets:new Map,observer:null};try{let c=n?{threshold:e,rootMargin:n}:{threshold:e};a.observer=new o(l=>w4(a,l),c)}catch{return null}return s.set(i,a),a}function w4(t,e){for(let n=0;n<e.length;n++){let r=e[n],o=t.targets.get(r.target);if(!o)continue;let s=!!r.isIntersecting&&r.intersectionRatio>=t.threshold-b4;if(s===o.inView)continue;o.inView=s;let i=s?"in":"leave",a=o.subs.slice();for(let c=0;c<a.length;c++){let l=a[c];if(!(l.kind!==i||l.dead)){l.once&&EO(t,o,l);try{l.run(r)}catch(f){S4(f)}}}}}function S4(t){typeof globalThis.reportError=="function"?globalThis.reportError(t):queueMicrotask(()=>{throw t})}function EO(t,e,n){if(n.dead)return;n.dead=!0;let r=e.subs.indexOf(n);r!==-1&&e.subs.splice(r,1),!e.subs.length&&(t.targets.delete(e.node),t.observer.unobserve(e.node),!t.targets.size&&(t.observer.disconnect(),t.byKey.delete(t.id)))}function vO(t,e,n,r,o){let s=Df(t,o.handler),i=o.options;if(typeof s!="function")return;let a=i&&i.threshold,c=typeof a=="number"&&a>=0&&a<=1?a:0,l=i&&typeof i.rootMargin=="string"?i.rootMargin.trim():"",f=_4(n,c,l);if(!f)return;let u=f.targets.get(e);u||(u={node:e,inView:!1,subs:[]},f.targets.set(e,u),f.observer.observe(e));let d={kind:r,once:!!(i&&i.once===!0),run:jh(t,s),dead:!1};u.subs.push(d);let p=t.__ref;p.__eventCleanup||(p.__eventCleanup=[]),p.__eventCleanup.push(()=>EO(f,u,d))}function AO(t){let e=t.node;if(!e||e.nodeType!==1)return;let n=e.ownerDocument,r=n&&n.defaultView;if(!r||typeof r.IntersectionObserver!="function")return;let o=Ax(t.onInView);for(let i=0;i<o.length;i++)vO(t,e,n,"in",o[i]);let s=Ax(t.onLeaveView);for(let i=0;i<s.length;i++)vO(t,e,n,"leave",s[i])}Rt();Rt();function Ge(t,e){let n=t&&t.context&&t.context.designSystem;if(!n)return e();bt(n);try{return e()}finally{mt()}}var xe=ei||(t=>{let e=Te();if(!e)return t();dc(null);try{return t()}finally{dc(e)}});M();M();var RO=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],x4=["none","forwards","backwards","both"],k4=["normal","reverse","alternate","alternate-reverse"],v4=["running","paused"],E4=/^(?: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*\))$/,A4=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=>E4.test(r.replace(/\s+/g,"")))},CO=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),C4={transform:A4,translate:CO,rotate:t=>CO(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},T4=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},O4=t=>{if(!A(t))return null;let e=null,n=-1;for(let r in t){let o=T4(r);o==null||!A(t[r])||o>=n&&(n=o,e=t[r])}return e},R4=t=>{let e=O4(t);if(!e)return!1;let n=Object.keys(e);if(!n.length)return!1;for(let r of n){let o=C4[r];if(!o)return!1;let s=e[r];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},P4=(t,e)=>{if(A(t))return t;let{animation:n}=e.context&&e.context.designSystem||{},r=n&&n[t];return A(r)?r:null},D4=["reverse","alternate","alternate-reverse"],PO=(t,e,n)=>{let r=n||e.animationDirection;return r&&D4.includes(String(r))?"both":R4(P4(t,e))?"backwards":"both"},L4=0,TO=new Map,Cx=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{};if(A(t)){let o=JSON.stringify(t),s=TO.get(o);if(s)return s;let i=`smbls-anim-${L4++}`,a=aa(i,t);return TO.set(o,a),a}let r=n&&n[t];return A(r)?aa(t,r):t},DO=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)m?s$/i,I4=/^(?:\d+(?:\.\d*)?|\.\d+)$/,LO=/^(?:cubic-bezier|steps|linear)\(/,M4=/^(?:calc|min|max|clamp)\(/,$4=t=>t.includes("(")||t.startsWith("--"),N4=(t,e)=>{if(!Pn.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]])},F4=t=>{if(!E(t))return!1;let e=t.trim();return RO.includes(e)||LO.test(e)||e.startsWith("var(")},j4=(t,e)=>!!e&&F4(e[t]||e[Vo(t)]),B4=["duration","timingFunction","delay","iterationCount","direction","fillMode","playState"],U4=t=>lt(String(t)),V4=(t,e,n)=>{let r={duration:null,delay:null,timingFunction:null,iterationCount:null,direction:null,fillMode:null,playState:null},o=null,s=[],i=[],a=(u,d)=>r[u]!=null?!1:(r[u]=d,!0),c=(u,d)=>{a(u,d)||s.push(d)};for(let u of U4(t))e&&e[u]?o=u:DO.test(u)||N4(u,n)?a("duration",u)||a("delay",u):RO.includes(u)||j4(u,n)?c("timingFunction",u):LO.test(u)?a("timingFunction",u):u==="infinite"?c("iterationCount",u):I4.test(u)?a("iterationCount",Number(u)):k4.includes(u)?c("direction",u):x4.includes(u)?c("fillMode",u):v4.includes(u)?c("playState",u):$4(u)?i.push(u):s.push(u);let l=o||s[0]||i.shift()||null,f=new Set;for(let u of i){let d=B4.find(p=>r[p]==null);if(!d)break;r[d]=u.startsWith("--")?`var(${u})`:u,f.add(d)}return{name:l,...r,opaqueSlots:f}},H4=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{},{timing:r}=O()||{};return Jn(String(t)).map(o=>o.trim()).filter(Boolean).map(o=>V4(o,n,r))},OO=(t,e)=>DO.test(t)||e&&!M4.test(t)&&!/^(?:var|env)\(/.test(t)?t:be(t).timing||t,z4=(t,e)=>{let n=r=>t.opaqueSlots.has(r);return{animationName:t.name==null?void 0:Cx(t.name,e),animationDuration:t.duration!=null?OO(t.duration,n("duration")):be(e.animationDuration||"A").timing,animationDelay:t.delay!=null?OO(t.delay,n("delay")):be(e.animationDelay||"0s").timing,animationTimingFunction:t.timingFunction!=null?n("timingFunction")?t.timingFunction:De(t.timingFunction):De(e.animationTimingFunction||"ease"),animationFillMode:t.fillMode||e.animationFillMode||PO(t.name,e,t.direction),animationIterationCount:t.iterationCount!=null?t.iterationCount:e.animationIterationCount||1,animationPlayState:t.playState||e.animationPlayState,animationDirection:t.direction||e.animationDirection}},W4={animationName:"none",animationPlayState:"running",animationDirection:"normal"},q4=(t,e)=>{let n=t.map(o=>z4(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??W4[o]).join(", "))}return r},Tx={animation:(t,e)=>{if(t!=null){if(E(t)&&/[\s,]/.test(t)){let n=H4(t,e);if(n.length)return q4(n,e)}return{animationName:Cx(t,e),animationDuration:be(e.animationDuration||"A").timing,animationDelay:be(e.animationDelay||"0s").timing,animationTimingFunction:De(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||PO(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:Cx(t,e)}),animationDuration:t=>({animationDuration:be(t).timing}),animationDelay:t=>({animationDelay:be(t).timing}),animationTimingFunction:t=>({animationTimingFunction:De(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};M();var Vh=(t,e,n)=>{if(typeof e=="number"&&(e=String(e)),!E(e))return;let[r,o]=lt(e);return{...j(t+"Start",r,n),...j(t+"End",o||r,n)}},Ox={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>j("height",t,e),width:(t,e)=>j("width",t,e),boxSizing:t=>Wt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!E(t))return;let[e,n]=lt(t);return{...Pt("height",e),...Pt("width",n||e)}},inlineSize:(t,e)=>j("inlineSize",t,e),blockSize:(t,e)=>j("blockSize",t,e),minWidth:(t,e)=>j("minWidth",t,e),maxWidth:(t,e)=>j("maxWidth",t,e),widthRange:t=>{if(!E(t))return;let[e,n]=lt(t);return{...Pt("minWidth",e),...Pt("maxWidth",n||e)}},minHeight:(t,e)=>j("minHeight",t,e),maxHeight:(t,e)=>j("maxHeight",t,e),heightRange:t=>{if(!E(t))return;let[e,n]=lt(t);return{...Pt("minHeight",e),...Pt("maxHeight",n||e)}},size:t=>{if(!E(t))return;let[e,n]=lt(t);return{...j("inlineSize",e),...j("blockSize",n||e)}},minBlockSize:(t,e)=>j("minBlockSize",t,e),minInlineSize:(t,e)=>j("minInlineSize",t,e),maxBlockSize:(t,e)=>j("maxBlockSize",t,e),maxInlineSize:(t,e)=>j("maxInlineSize",t,e),minSize:t=>{if(!E(t))return;let[e,n]=lt(t);return{...Pt("minInlineSize",e),...Pt("minBlockSize",n||e)}},maxSize:t=>{if(!E(t))return;let[e,n]=lt(t);return{...Pt("maxInlineSize",e),...Pt("maxBlockSize",n||e)}},borderWidth:(t,e)=>j("borderWidth",t,e),borderTopWidth:(t,e)=>j("borderTopWidth",t,e),borderRightWidth:(t,e)=>j("borderRightWidth",t,e),borderBottomWidth:(t,e)=>j("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>j("borderLeftWidth",t,e),textDecorationThickness:(t,e)=>j("textDecorationThickness",t,e),textUnderlineOffset:(t,e)=>j("textUnderlineOffset",t,e),padding:(t,e)=>j("padding",t,e),paddingInline:t=>{if(!E(t))return;let[e,n]=lt(t);return{...Pt("paddingInlineStart",e),...Pt("paddingInlineEnd",n||e)}},paddingBlock:t=>{if(!E(t))return;let[e,n]=lt(t);return{...Pt("paddingBlockStart",e),...Pt("paddingBlockEnd",n||e)}},paddingTop:(t,e)=>j("paddingBlockStart",t,e),paddingBottom:(t,e)=>j("paddingBlockEnd",t,e),paddingLeft:(t,e)=>j("paddingInlineStart",t,e),paddingRight:(t,e)=>j("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>j("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>j("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>j("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>j("paddingInlineEnd",t,e),margin:(t,e)=>j("margin",t,e),marginInline:t=>{if(!E(t))return;let[e,n]=lt(t);return{...Pt("marginInlineStart",e),...Pt("marginInlineEnd",n||e)}},marginBlock:t=>{if(!E(t))return;let[e,n]=lt(t);return{...Pt("marginBlockStart",e),...Pt("marginBlockEnd",n||e)}},marginTop:(t,e)=>j("marginBlockStart",t,e),marginBottom:(t,e)=>j("marginBlockEnd",t,e),marginLeft:(t,e)=>j("marginInlineStart",t,e),marginRight:(t,e)=>j("marginInlineEnd",t,e),marginInlineStart:(t,e)=>j("marginInlineStart",t,e),marginInlineEnd:(t,e)=>j("marginInlineEnd",t,e),marginBlockStart:(t,e)=>j("marginBlockStart",t,e),marginBlockEnd:(t,e)=>j("marginBlockEnd",t,e),scrollMargin:(t,e)=>j("scrollMargin",t,e),scrollMarginTop:(t,e)=>j("scrollMarginTop",t,e),scrollMarginRight:(t,e)=>j("scrollMarginRight",t,e),scrollMarginBottom:(t,e)=>j("scrollMarginBottom",t,e),scrollMarginLeft:(t,e)=>j("scrollMarginLeft",t,e),scrollMarginBlock:(t,e)=>Vh("scrollMarginBlock",t,e),scrollMarginInline:(t,e)=>Vh("scrollMarginInline",t,e),scrollMarginBlockStart:(t,e)=>j("scrollMarginBlockStart",t,e),scrollMarginBlockEnd:(t,e)=>j("scrollMarginBlockEnd",t,e),scrollMarginInlineStart:(t,e)=>j("scrollMarginInlineStart",t,e),scrollMarginInlineEnd:(t,e)=>j("scrollMarginInlineEnd",t,e),scrollPadding:(t,e)=>j("scrollPadding",t,e),scrollPaddingTop:(t,e)=>j("scrollPaddingTop",t,e),scrollPaddingRight:(t,e)=>j("scrollPaddingRight",t,e),scrollPaddingBottom:(t,e)=>j("scrollPaddingBottom",t,e),scrollPaddingLeft:(t,e)=>j("scrollPaddingLeft",t,e),scrollPaddingBlock:(t,e)=>Vh("scrollPaddingBlock",t,e),scrollPaddingInline:(t,e)=>Vh("scrollPaddingInline",t,e),scrollPaddingBlockStart:(t,e)=>j("scrollPaddingBlockStart",t,e),scrollPaddingBlockEnd:(t,e)=>j("scrollPaddingBlockEnd",t,e),scrollPaddingInlineStart:(t,e)=>j("scrollPaddingInlineStart",t,e),scrollPaddingInlineEnd:(t,e)=>j("scrollPaddingInlineEnd",t,e),gap:t=>({gap:bh(t)}),columnGap:(t,e)=>ze(e,"columnGap",t),rowGap:(t,e)=>ze(e,"rowGap",t),flexWrap:t=>{if(t!=null)return{display:"flex",flexWrap:t}},flexFlow:(t,e)=>{let n=e.reverse;if(!E(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(!E(t))return;let[e,n]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:n}},round:(t,e)=>or(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>or(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>or(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>or(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>or(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>or(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var Rx={fontSize:t=>mf(t)||t,fontFamily:t=>({fontFamily:hf(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 Px={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 Dx={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:lt(t).map(n=>Bt(n,"k").k).join(" ")}},left:t=>Bt(t,"left"),top:t=>Bt(t,"top"),right:t=>Bt(t,"right"),bottom:t=>Bt(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=lt(t).map(n=>Bt(n,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=lt(t).map(n=>Bt(n,"k").k);return{left:e[0],right:e[1]||e[0]}}};M();var Hh=0,zh=()=>{Hh++},Wh=()=>{Hh>0&&Hh--},le=({context:t,state:e})=>{let n=t?.designSystem,r=e?.root?.globalTheme||n?.globalTheme;return r&&r!=="auto"?r:Hh>0?null:n&&n.resolvedTheme||null},fe=(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=fe(t,s);i&&(n[o]=i,r=!0);continue}n[o]={[t]:s},r=!0}}return r?n:void 0},IO=t=>{let e={};for(let n in t){let r=t[n];e[n]=A(r)?IO(r):E(r)?r+" !important":r}return e},cs=t=>(e,n)=>{let r=n&&E(e)&&!O().useVariable,o=hh(e,r?le(n):null);return A(o)?fe(t,o):{[t]:o}},Lx={theme:(t,e)=>{if(t)return e.themeModifier?We(t,`@${e.themeModifier}`):We(t)},color:(t,e)=>{let n=le(e);if(t)return fe("color",Vt(t,n))},background:(t,e)=>{let n=le(e);if(t)return E(t)&&t.includes("gradient")&&t.includes("(")?{background:vf(t,n)}:fe("background",Vt(t,n))},backgroundColor:(t,e)=>{let n=le(e);if(t)return fe("backgroundColor",Vt(t,n))},backgroundImage:(t,e,n,r)=>{let o=le(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 fe("backgroundImage",yh(t,o))},textStroke:t=>{let e=gh(t);if(e!=null)return{WebkitTextStroke:e}},outline:cs("outline"),outlineWidth:(t,e)=>j("outlineWidth",t,e),outlineColor:(t,e)=>{let n=le(e);if(t)return fe("outlineColor",Vt(t,n))},outlineOffset:(t,e)=>j("outlineOffset",t,e),border:cs("border"),borderColor:(t,e)=>{let n=le(e);if(t)return fe("borderColor",Vt(t,n))},borderTopColor:(t,e)=>{let n=le(e);if(t)return fe("borderTopColor",Vt(t,n))},borderBottomColor:(t,e)=>{let n=le(e);if(t)return fe("borderBottomColor",Vt(t,n))},borderLeftColor:(t,e)=>{let n=le(e);if(t)return fe("borderLeftColor",Vt(t,n))},borderRightColor:(t,e)=>{let n=le(e);if(t)return fe("borderRightColor",Vt(t,n))},borderLeft:cs("borderLeft"),borderTop:cs("borderTop"),borderRight:cs("borderRight"),borderBottom:cs("borderBottom"),shadow:(t,e)=>{let n=le(e);if(t)return fe("boxShadow",mh(t,n))},boxShadow:(t,e)=>{if(!E(t))return;let[n,r]=t.split("!importan"),o=le(e),s=r?" !important":"",i=kf(n.trim(),o);return E(i)?{boxShadow:i+s}:fe("boxShadow",s?IO(i):i)},textShadow:(t,e)=>fe("textShadow",kf(t,e?le(e):null)),columnRule:cs("columnRule")};var If={transition:t=>{let e=wh(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:Ef(t)}),transitionDelay:t=>({transitionDelay:Ef(t)}),transitionTimingFunction:t=>({transitionTimingFunction:De(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};M();var Ix={flow:(t,e)=>{let n=e.reverse;if(!E(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(!E(t))return;let[n,r]=t.split(" ");return{display:"flex",alignItems:n,justifyContent:r}}};M();var K4=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,MO=t=>{if(!E(t))return t;let e=O().sizes;return e?t.replace(K4,(n,r,o)=>{let s=e[o];return s==null?n:r+String(s)}):t},In=t=>MO(_h(t)),Mx={gridTemplateColumns:t=>({gridTemplateColumns:In(t)}),gridTemplateRows:t=>({gridTemplateRows:In(t)}),gridAutoColumns:t=>({gridAutoColumns:In(t)}),gridAutoRows:t=>({gridAutoRows:In(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:In(t)}),templateColumns:t=>({gridTemplateColumns:In(t)}),autoColumns:t=>({gridAutoColumns:In(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:In(t)}),templateRows:t=>({gridTemplateRows:In(t)}),autoRows:t=>({gridAutoRows:In(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var kt={...Tx,...Ox,...Rx,...Px,...Dx,...Lx,...If,...Ix,...Mx};var Nt=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","viewTransitionClass","viewTransitionName","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);M();var G4=/^[a-z][0-9]?$/,$O=/var\(\s*(--[A-Za-z0-9-]+)/g,Y4=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}},X4=Object.prototype.propertyIsEnumerable,NO=(t,e)=>{if(!t||typeof t!="object")return!1;for(let n in t){let r=t[n];if(!r||typeof r!="object")continue;let o=r.sequence;if(o&&typeof o=="object"&&X4.call(o,e))return!0}return!1},$x=/[(),\s]+/,Nx=(t,e)=>{let n=null,r=t.split($x);for(let o=0;o<r.length;o++){let s=r[o];s&&e(s)&&(n||(n=[])).push(s)}return n},Fx=(t,e)=>Pn.test(t)&&e(t.charCodeAt(0)===45?t.slice(1):t),Z4=(t,e)=>{if(!e.size)return[];let n=o=>e.has(o),r=Nx(t,o=>Fx(o,n));return r?[...new Set(r)]:[]},J4=(t,e)=>{if(!e.size)return[];let n=[];$O.lastIndex=0;let r;for(;r=$O.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(!G4.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},qh=new Set,FO=(t,e,n)=>{if(!tt()||!E(e)||!e)return;let r;try{r=O()}catch{return}let{knownLetters:o,knownVars:s}=Y4(r);if(!o.size&&!s.size)return;let i=Z4(e,o),a=J4(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}`;qh.has(f)||(qh.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}`;qh.has(u)||(qh.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}"`))}};M();var Q4=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,t6=(t,e,n)=>{let{context:r}=n;if(!r.designSystem?.media)return;let o=t.slice(1),s=r.designSystem.media[o],i=ne(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(Q4),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},jO=(t,e,n)=>({[t]:ne(e,n)}),Mf=(t,e,n)=>{let r=`&${t}`,o=ne(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}},jx=(t,e)=>{let n=e.context?.cases?.[t];if(n!==void 0)return P(n)?n.call(e,e):!!n},e6=(t,e,n)=>{let r=t.slice(1),o=jx(r,n);if(o===void 0&&(o=!!n[r]),!!o)return ne(e,n)},n6=(t,e,n)=>({[t]:e}),r6=(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=jx(r,n);s!==void 0&&(o=s)}if(o)return ne(e,n)},o6=(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=jx(r,n);s!==void 0&&(o=s)}if(!o)return ne(e,n)},Bx=(t,e)=>ne(t,e),Ux={"@":t6,":":Mf,"[":Mf,"*":Mf,"+":Mf,"~":Mf,"&":jO,">":jO,$:e6,"-":n6,".":r6,"!":o6};var Kh=Rr(),BO=(t,e,n)=>{let r=e?.context?.designSystem;r&&bt(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"&&E(c)){let l=UO(c,e);l&&(n.unpack?Tt(o,l):o.designSystemClass=l)}else if(a==="true"){let l=St(c,e);Tt(o,Bx(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),!Kh&&A(o[a])&&(o[a].label=a)}else if(kt[a]){let l=St(c,e);if(l===null)continue;I(l)&&(l=l.reduce((u,d)=>Tt(u,d),{}));let f=kt[a](l,e,e.state,e.context);I(f)&&(f=f.reduce((u,d)=>Tt(u,d),{})),f&&i(a,f),!Kh&&A(o[a])&&(o[a].label=a)}else if(Nt.has(a)){let l=St(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),Kh||FO(a,l,e),i(a,{[a]:l}),!Kh&&A(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{r&&mt()}},UO=(t,e)=>{if(!E(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=pt(s);r=r?ie(r,i):i}if(r)return ne(r,e)},VO=(t,e)=>{let n={};for(let r in t){let o=Ux[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"?ie(n[i],s[i]):n[i]=s[i])}}return n},ne=(t,e,n={unpack:!0})=>{let[r,o]=BO(t,e,n),s=VO(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(n.unpack)return Lc(r,s);r._selectors=s}return r},s6=(t,e)=>{let n={};if(t.class)for(let r in t.class)n[r]=t.class[r](e);return n};M();var HO=t=>{if(A(t))return ne(t,t)},i6=(t,e)=>{let n=HO(t);return typeof e=="function"?e(n):Ie(n)};M();var zO=/\s*!important\s*$/,a6=()=>{let t;try{t=O()}catch{t=null}let e=t&&t.sizes&&typeof t.sizes=="object"?t.sizes:null,n=null,r=s=>{n||(n=new Map);let i=n.get(s);return i===void 0&&(i=NO(t,s),n.set(s,i)),i},o=s=>qi(e,s)!==void 0;return{isToken:s=>s.charCodeAt(0)!==35&&(Fx(s,r)||o(s))}},c6=(t,e)=>{let n=String(t).split($x);for(let r=0;r<n.length;r++)if(n[r]===e)return!0;return!1},l6=(t,e)=>{let n=typeof globalThis<"u"?globalThis.CSS:void 0;if(!n||typeof n.supports!="function")return!1;try{return n.supports(Se(t),e)}catch{return!1}},WO=new Set,f6=(t,e,n)=>{if(!tt())return;let r=t?.__ref?.path?t.__ref.path.join("."):t?.key||"?",o=r+"::"+e+"::"+n;WO.has(o)||(WO.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}"`))},u6=(t,e)=>{if(!t||typeof t!="object")return!1;let n=!1;for(let r in t){let o=t[r];if(o!=null){if(typeof o=="object"||typeof o=="function")return!1;for(let s of e)if(c6(o,s))return!1;n=!0}}return n},d6=(t,e,n,r)=>{if(!E(e)||!e||t.charCodeAt(0)===45&&t.charCodeAt(1)===45)return null;let o=kt[t];if(!o||!Nt.has(t))return null;let s=zO.test(e),i=s?e.replace(zO,""):e,a=Nx(i,r.isToken);if(!a||l6(t,i))return null;let c;try{c=o(i,n,n?.state,n?.context)}catch{c=null}if(Array.isArray(c)){let f={};for(let u of c)u&&typeof u=="object"&&Object.assign(f,u);c=f}if(!u6(c,a))return f6(n,t,e),null;let l={};for(let f in c){let u=c[f];u!=null&&(l[f]=s?String(u)+" !important":u)}return l},qO=(t,e,n)=>{let r={},o=!1;for(let s in t){let i=t[s];if(s.charCodeAt(0)===38&&i&&typeof i=="object"&&!Array.isArray(i)){let c=qO(i,e,n);c!==i&&(o=!0),r[s]=c;continue}let a=d6(s,i,e,n);a?(o=!0,Object.assign(r,a)):r[s]=i}return o?r:t},Vx=(t,e)=>!t||typeof t!="object"||Array.isArray(t)?t:qO(t,e,a6());if(!xt||!qe)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 Gh=xt,ls=qe,Yh=na||(()=>!1),KO=Af||Yh,GO=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,fs=Se||(t=>GO(t)?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),$f=Of||(t=>GO(t)?t:t.replace(/-([a-z])/g,(e,n)=>n.toUpperCase()));function XO(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 da(t,e,n){let r=XO(e);if(!r.length)return;let s=(t.context||n?.context||{}).components||{};for(let i=0;i<r.length;i++){let a=ZO(r[i],s);a&&a!==e&&JO(t,a,n,new Set([e]))}}function ZO(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 JO(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let o=XO(e);if(o.length){let a=(t.context||n?.context||{}).components||{};for(let c=0;c<o.length;c++){let l=ZO(o[c],a);l&&JO(t,l,n,r)}}let s=zx(t);for(let i in e){if(i==="extends"||i==="extend")continue;let a=e[i];s&&s.mark(i);let c=ht.chains;c!==null&&c(t,i,t[i],a)||(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]=Me(t[i],a):t[i]=a)}}var Hx=class{constructor(){this.rank=0,this.ranks=null}mark(e){p6(e)&&(this.ranks||(this.ranks=new Map),this.ranks.set(e,this.rank))}get(e){return this.ranks?this.ranks.get(e):void 0}get size(){return this.ranks?this.ranks.size:0}},Xh=new Set;for(let t of[ls,Gh])for(let e in t)Xh.add(e),Xh.add($f(e));var YO=new Map;function p6(t){let e=t.charCodeAt(0);if(e>=65&&e<=90||e>=48&&e<=57)return!1;let n=YO.get(t);return n===void 0&&(n=!!kt[t]||Xh.has(t)||t.indexOf("-")>=0&&!(t.charCodeAt(0)===45&&t.charCodeAt(1)===45)&&Xh.has(fs(t)),YO.set(t,n)),n}function zx(t){let e=t&&t.__ref;if(!e)return null;let n=e.__mergeLayer;return n||(n=e.__mergeLayer=new Hx),n.rank++,n}function QO(t){let e=t&&t.__ref&&t.__ref.__mergeLayer;if(!e||!e.ranks)return;let n;for(let r of e.ranks.values())if(n===void 0)n=r;else if(r!==n)return;e.ranks=null}function Me(t,e){let n={...t},r=ht.chains;for(let o in e){let s=n[o],i=e[o];r!==null&&r(n,o,s,i)||(s&&i&&typeof s=="object"&&typeof i=="object"&&!Array.isArray(s)&&!Array.isArray(i)&&typeof s!="function"&&typeof i!="function"?n[o]=Me(s,i):n[o]=i)}return n}Rt();Rt();Rt();var us="http://www.w3.org/2000/svg",ga=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"]),h6=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 pa(t){return h6.has(t)||ga.has(t)}function lr(t){return ga.has(t)}function Mn(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"&&pa(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]),pa(o)&&!r.has(o)?o:"div"}var tR={};function ha(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(lr(t)){let r=e?.parent;if(t==="svg"||r?.node?.namespaceURI===us)return n.createElementNS(us,t);if(t!=="svg")return n.createElement("div")}return n.createElement(t)}function Xr(t){let e=t.tag=Mn(t),r=lr(e)&&(e==="svg"||t.parent?.node?.namespaceURI===us)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=tR[r];if(s||(s=tR[r]=ha(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?ha(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}function Zh(t,e){return e&&e.parentNode===t?e.nextSibling:t.firstChild}Rt();pi();var eR=new WeakMap,nR=null,rR=null;function g6(t,e){let n=t===nR?rR:eR.get(t);(!n||n.length!==t.length)&&(n={length:t.length,hooks:new Map},eR.set(t,n)),nR=t,rR=n;let r=n.hooks.get(e);if(r===void 0){r=!1;for(let o of t)if(typeof o[e]=="function"){r=!0;break}n.hooks.set(e,r)}return r}function Wx(t,e){let n=t&&t.context&&t.context.plugins;return!!(n&&n.length&&g6(n,e))}function $n(t,e,...n){return Wx(e,t)?Dr(t,e,...n):!1}function Ye(t,e,n){$n("error",t,{hook:e,error:n})||console.error(`[DOMQL] Lifecycle "${e}" error:`,n)}var m6=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function sR(t,e,n){return xe(()=>Ge(t,()=>e.call(t,n,t,t.state,t.context)))}function y6(t,e){if(!tt())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 iR(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,y6(t,e);let o;try{o=sR(t,t.onBridgeMount,n)}catch(s){if(r.failed=!0,Ye(t,"onBridgeMount",s),t.context?.strictMode)throw s;return}if(o&&typeof o.then=="function"){o.then(s=>oR(t,r,s),s=>{r.failed=!0,Ye(t,"onBridgeMount",s)});return}oR(t,r,o)}function oR(t,e,n){if(e.settled=!0,e.instance=n,e.disposed){cR(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=z(()=>{e.disposed||Ge(t,()=>{try{let o=t.onBridgeUpdate.call(t,e.instance,t,t.state,t.context);o&&typeof o.then=="function"&&o.catch(s=>Ye(t,"onBridgeUpdate",s))}catch(o){Ye(t,"onBridgeUpdate",o)}})},{depth:r.path.length,label:()=>r.path.join(".")+"::onBridgeUpdate"}),r.__effects.push(e.effect)}function aR(t){let e=t.__ref?.__bridge;!e||e.disposed||(e.disposed=!0,e.effect&&e.effect.dispose(),e.settled&&cR(t,e))}function cR(t,e){if(e.destroyed)return;e.destroyed=!0;let n=e.instance;if(e.instance=void 0,m6(t,"bridge")&&(t.bridge=void 0),typeof t.onBridgeDestroy=="function")try{let r=sR(t,t.onBridgeDestroy,n);r&&typeof r.then=="function"&&r.catch(o=>Ye(t,"onBridgeDestroy",o))}catch(r){Ye(t,"onBridgeDestroy",r)}}function ma(t){return t.__mount||(t.__mount={pending:0,tail:null,holder:null,waiters:null,chunkGen:0,attachLater:!1})}function Nf(t){let e=t.__mount;return e?e.pending:0}Rt();function ya(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"&&Jh(r))try{let a=n.onBeforeUpdate(n,n.state,n.context,e);if(a&&typeof a.then=="function")a.then(()=>Nn(r,!1),c=>{Nn(r,!0),$n("error",n,{hook:"onBeforeUpdate",error:c})||console.error("[DOMQL] onBeforeUpdate error:",c)});else if(Nn(r,!1),a===!1)return n}catch(a){throw Nn(r,!0),a}let o=!t||Object.keys(t).length===0,s=[],i=!1;md(()=>{if(t.state&&wt(n.state)&&n.state.$update(t.state),t.text!==void 0&&(n.text=t.text,!r.__exec.text&&n.node&&ds(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=hs(n,t.style);for(let c in a){let l=a[c];if(l==null)continue;let f=fs(c),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];ps(n.node,a,c)}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(Ht.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&&zt(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++)Gx(n,s[a]);if(n.node){let a=i;for(let c=0;!a&&c<s.length;c++)qx(s[c])&&(a=!0);a&&Kx(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 $n("update",n),!e.preventListeners&&typeof n.onUpdate=="function"&&n.onUpdate(n,n.state,n.context,e),n}Rt();function Fn(t){if(!t)return;let e=t.__ref;if(!e)return;if(e.__onConnected&&dO(t),Te())return xe(()=>Fn(t));e.__disposed=!0;let n=e.__if===!1&&!e.__ifInitialized;if(!n)try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(o){console.error("[smbls] onBeforeRemove error:",o)}if(e.__bridge&&aR(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&&Fn(i)}}if(e.__ifParked&&e.__ifParked.size){let o=[...e.__ifParked];e.__ifParked.clear();for(let s=0;s<o.length;s++){let i=t[o[s]];i&&i.__ref&&i.parent===t&&Fn(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),t.parent.__ref.__ifParked&&t.parent.__ref.__ifParked.delete(t.key),delete t.parent[t.key]}if(!n)try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(o){console.error("[smbls] onRemove error:",o)}e.__mount&&e.__mount.tail&&ht.mount.abandon(t,e),t.node=null,t.parent=null,t.__ref=null}function ba(){Fn(this)}M();M();function Zx(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 lR=new Set;function fR(t,e,n){let r=String(e);if(lR.has(r))return;lR.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.`;Zx(t,"error",[a]),console.error(a)}var dR=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),b6=new Set,pR=t=>dR(Yx,t)&&!(ai||b6).has(t),uR=new Set;function hR(t,e){uR.has(t)||(uR.add(t),tt()&&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 _6(...t){return Zx(this,"warn",t),ml.apply(this,t)}function w6(...t){return Zx(this,"error",t),Mo.apply(this,t)}var Yx={update:ya,remove:ba,getDB:wl,getQuery:Sl,getRootData:pl,getPath:ll,nextElement:yl,previousElement:bl,verbose:ki,warn:_6,error:w6,variables:_l,spotByPath:cl,set(t,e,n){let r=this.__ref;if(r){if(r.__setLocked){r.__setQueued={content:t,options:e};return}r.__setLocked=!0}let o;try{if(this.removeContent(),t!=null){let s=this.context?.__create;s&&(o=s(t,this,"content",e,n))}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let s=r.__setQueued;s&&(r.__setQueued=null,this.set(s.content,s.options))}}return o},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},whenConnected(t){return la(this,t)},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:dl,getRootState:ul,getRootContext:hl,getContext:gl,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=pR(t);r&&n?.methods?.[t]&&n.methods[t]!==this[t]&&hR(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=To;if(!s||!s(o))return o.call(this,...e);tt()&&fR(this,t,Oe(o));return}tt()&&fR(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)}},Xx=new WeakMap;function S6(t){if(!t)return Yx;let e=Xx.get(t);if(e)return e;e=Object.create(Yx);let n=t.methods;if(n)for(let r in n)e[r]=n[r];return Xx.set(t,e),e}function _a(t){let e=S6(t.context);Object.setPrototypeOf(t,e)}function wa(t){if(!t)return!1;let e=Xx.get(t);if(!e)return!1;let n=t.methods;if(!n)return!1;for(let r in n){if(pR(r)&&!dR(e,r)){hR(r,"refreshContextProto");continue}e[r]=n[r]}return!0}M();M();var n0={};F(n0,{STATE_METHODS:()=>gR,applyInitialState:()=>Qh,applyStateMethods:()=>ke,callStateMethod:()=>jf,createState:()=>Qx,isTracking:()=>e0,useHostState:()=>t0});Rt();Rt();var gR=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"]),Ff=(t,e,n)=>{Object.defineProperty(t,e,{value:n,enumerable:!1,configurable:!0,writable:!0})},un=(t,e,n,{onlyIfAbsent:r}={})=>{Ff(t,"$"+e,n),!(r&&Object.prototype.hasOwnProperty.call(t,e))&&Ff(t,e,n)},jf=(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)},ke=(t,e)=>{if(wt(e)){let o=e.__raw||e;un(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),un(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}),un(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}),un(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}),un(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}),un(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),un(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),un(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),un(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&wt(a.parent);)a=a.parent;return jf(a,"update",s,i)}),un(o,"parentUpdate",function(s,i={}){if(e.parent)return jf(e.parent,"update",s,i)}),un(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=wt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,wt(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}};Ff(e,"$settled",function(){return yd().then(()=>e)});for(let o in r)if(Ff(e,"$"+o,r[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){wd(o,"");continue}Ff(e,o,r[o])}};var Qx=function(t,e,n){return t.state=Qh(t,e,n),t.state},Qh=function(t,e,n){let{__ref:r}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return ke(t,s),s}if(typeof o=="string")return r&&(r.__state=o),r.__stateType="string",x6(o,t,e);if(typeof o=="number"||typeof o=="boolean"){r&&(r.__state=o,r.__stateType=typeof o,r.__hasRootState=!0);let s=Hn({value:o});return s.__element=t,e?.state&&(s.parent=e.state),ke(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!wt(o)){r&&(r.__hasRootState=!0),o.isRootState&&r&&(r.__hasRootState=!0);let s=Hn({...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)),ke(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,n),s}return wt(o)?(o.__element=t,o):e?.state||{}};function Jx(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 x6(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?Jx(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?Jx(o,s):o??{}}let r=Jx(n.state,t);if(r&&typeof r=="object"&&!wt(r)&&!Object.getOwnPropertyDescriptor(r,"root")){let o=n.state?.root||n.state;Object.defineProperty(r,"root",{get:()=>o,enumerable:!1,configurable:!0})}return r}Rt();var t0=(t,e)=>{if(!t)return yR;let n=v6(t,e);return!n||!n.state?yR:A6(n.state)},e0=()=>Te()!=null,k6=128;function v6(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<k6&&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 E6={get(t,e){return t[e]}},mR=new WeakMap,A6=t=>{let e=mR.get(t);return e||(e=new Proxy(t,E6),mR.set(t,e)),e},yR=new Proxy(Object.create(null),{get(){},has(){return!1}});M();var C6=["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"],T6=["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"],O6=["requiredExtensions","systemLanguage"],bR={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"]},R6=new Set(["linearGradient","radialGradient","stop","clipPath","mask","marker","pattern","filter","symbol"]),P6=()=>{let t={};for(let e in bR)t[e]=[...bR[e],...R6.has(e)?[]:O6,...T6];return t},fr={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"],...P6()},xR=["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"],kR=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,_R=new Map,ur=t=>{let e=_R.get(t);return e===void 0&&(e=kR(t)||AR(t),_R.set(t,e)),e},vR=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"]),r0=new Set;for(let t in fr)t==="default"||t==="aria"||t==="svg"||fr[t].forEach(e=>{e.startsWith("on")||r0.add(e)});var ER=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(r0.has(n))return n;let r=t.toLowerCase();return r0.has(r)?r:null},AR=t=>vR.has(t)?t.toLowerCase():ER(t),D6=new Set(["draggable","contenteditable","spellcheck","autocorrect","writingsuggestions","translate"]),L6=new Map([["autocorrect",["on","off"]],["translate",["yes","no"]]]),ms=t=>typeof t=="string"&&(D6.has(t)||t.startsWith("aria-")),jn=(t,e)=>{if(e!==!0&&e!==!1)return e;if(ms(t)){let n=L6.get(t);return n?e?n[0]:n[1]:e?"true":"false"}return e===!0?"":e},wR=new Map,Xe=(t,e)=>{let n=fr.default,r=Object.prototype.hasOwnProperty.call(fr,t)?fr[t]:null,o=r?r.length:-1,s=wR.get(t);(!s||s.def!==n||s.defLen!==n.length||s.own!==r||s.ownLen!==o)&&(s={def:n,defLen:n.length,own:r,ownLen:o,answers:new Map},wR.set(t,s));let i=s.answers.get(e);return i===void 0&&(i=I6(t,e),s.answers.set(e,i)),i},I6=(t,e)=>{if(e.startsWith("aria-")||e.startsWith("data-")||kR(e)||vR.has(e)||fr.default.includes(e))return!0;if(Object.prototype.hasOwnProperty.call(fr,t)){let n=fr[t];if(n.includes(e))return!0;let r=ER(e);return r!==null&&n.includes(r)}return!1},s0=t=>{if(!E(t))return!1;let e=t.toLowerCase();return xR.includes(e)},M6=(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])jt(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(jt(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());r["data-"+c]=e[o][a]}continue}let s=Xe(t,o),i=s0(o);if(jt(e[o])&&(s||i)){let a=ur(o)||o;r[a]=e[o]}}return r},$6=(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},Zr=(t,e)=>{let n=t.call("exec",e,t);if(n)return E(n)&&n.includes("{{")&&(n=t.call("replaceLiteralsWithObjectFields",n)),n},o0=(t,e)=>{let n=(t.preSrc||"")+(Zr(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},gs={src:t=>o0(t,t.src),href:t=>Zr(t,t.href),action:t=>Zr(t,t.action),poster:t=>o0(t,t.poster),data:t=>Zr(t,t.data)},i0=t=>{let e=t.tag||"div",n={};for(let r in gs)if(t[r]!==void 0&&Xe(e,r)){let o=gs[r](t);o!==void 0&&(n[r]=o)}return n},SR=(t,e)=>{let n=e.context?.cases?.[t];if(n!==void 0)return P(n)?n.call(e,e):!!n},N6=(t,e,n)=>{if(t==="$"){let o=SR(e,n);return o===void 0&&(o=!!n[e]),o}let r=n[e]===!0||n.state[e];if(!r){let o=SR(e,n);o!==void 0&&(r=o)}return t==="."?!!r:!r},F6=new Set(["$",".","!"]),a0=(t,e,n,r=N6)=>{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(!F6.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=Xe(e,f),d=s0(f);if(!u&&!d)continue;let p=ur(f)||f;s(p,c[f],a,l)}}return o};var tg="3.14.805";var CR="__SMBLS_ELEMENT_ID_ENGINE__",TR=(t,e,n)=>{let r=e||tg,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[CR];return s&&s.engine&&s.version===r?s.engine:(s||(o[CR]={version:r,engine:t}),t)};var j6=new Set(["rows","cols","wrap","fill","stroke","offset"]),eg=(t,e)=>j6.has(e)&&Xe(t,e),Jr=(t,e)=>!!(kt[e]||Nt&&Nt.has(e))&&!eg(t,e);var iP=TR({uniqId:1,scopedStyleId:0},tg),xa=[],Qr=new Set,E0=!1,aP=0,va=null,Hf=null;function Ca(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function cP(){return typeof document<"u"&&document.visibilityState==="hidden"}var B6=250,U6=1e3;function V6(){return Hf&&(Hf!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||cP())?!0:Ca()-aP>=U6}function H6(){if(E0=!0,aP=Ca(),Hf=null,typeof requestAnimationFrame!="function"){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(Ea,0);va=t?()=>t(e):null;return}if(cP()){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(Ea,B6);va=t?()=>t(e):null}else{let t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;Hf=requestAnimationFrame;let e=requestAnimationFrame(Ea);va=t?()=>t(e):null}}function Yf(){if(E0){if(!V6())return;let t=va;if(va=null,t)try{t()}catch{}}H6()}var lP=300,fP=15e4,b0=0;function Xf(){b0++;let t=!1;return()=>{t||(t=!0,!(--b0>0)&&(xa.length||Qr.size)&&Yf())}}function Ea(){if(E0=!1,va=null,Hf=null,b0>0||(Qr.size&&VU(),!xa.length))return;let t=xa.splice(0,xa.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=Ca());let o=Ca()-r.__mountFirstAttemptAt;r.__mountAttempts<=lP&&o<fP?(xa.push(n),Yf()):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"&&iR(n),typeof n.onMounted=="function"&&Gt("Mounted",n,n.__ref?.__mountOptions||{})}}}function _0(t,e){let n=t.__ref?.__autoGrow;n&&n.active&&Gf(t,!0),!(typeof t.onMounted!="function"&&typeof t.onBridgeMount!="function")&&(t.__ref.__mountOptions=e,xa.push(t),Yf())}function ng(t,e){typeof t.onContentUpdate=="function"&&($n("contentUpdate",t,e),Ge(t,()=>{try{t.onContentUpdate(t,t.state,t.context,e)}catch(n){if(Ye(t,"onContentUpdate",n),t.context?.strictMode)throw n}}))}function z6(t){return t.toLowerCase()}function uP(t){let e=t.charCodeAt(0);return e===58||e===64||e===38||e===91}function rg(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function dP(t,e,n,r){return cg(r,rg(t)||(e&&typeof e=="object"?rg(e.key):void 0)||String(n))}function cg(t,e){if(!t||typeof e!="string")return e;let n=e;for(;W6(t,n);)n="$"+n;return n!==e&&q6(t,e,n),n}function W6(t,e){if(Ht.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 OR=new Set;function q6(t,e,n){if(!tt())return;let r=t.__ref&&t.__ref.path&&t.__ref.path.join(".")||t.key||"<root>",o=r+"::"+e;OR.has(o)||(OR.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 zt(t,e,n,r={},o){if(Te())return xe(()=>zt(t,e,n,r,o));if(t==null||t===!1)return null;let s=dU(t);(typeof t=="string"||typeof t=="number")&&(t={text:t}),n=rg(n);let i=rg(t.key),a=Object.create(null);a.key=n||(i&&e?cg(e,i):i)||`_${iP.uniqId++}`,a.parent=e||null,a.context=t.context||e?.context||r.context||{},a.context.__create||(a.context.__create=zt);let c=a.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||a,path:e?.__ref?.path?[...e.__ref.path,a.key]:[a.key],origin:t,__mount:null,__plainRows:null,__ifParked:null};s&&(c.__runtimeSource=s);let l=o;o&&(o.holdTail||o.deferAttach)&&(o.holdTail&&ht.mount!==null&&ht.mount.hold(a),o.deferAttach&&(ma(c).attachLater=!0),l=void 0);let f=t;if(t=pP(a,t,n,i,e,r),a.if!=null){let g;if(typeof a.if=="function")try{g=a.if(a,a.state,a.context)}catch(h){if(g=!1,c.__ifError=h,typeof console<"u"&&console.warn){let m=a.key||a.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${m} \u2014 treating as false:`,h?.message||h)}}else g=a.if;c.__if=!!g}if(c.__if)typeof a.if=="function"&&(c.__ifInitialized=!0);else{if(e){e[a.key]=a;let h=e.__ref;h&&(h.__ifParked||(h.__ifParked=new Set)).add(a.key)}let g=X6(t,n,a.context?.components);return g.length&&(c.__ifLateMerge={definition:f,key:n,ownKey:i,names:g,options:r}),typeof a.if=="function"&&SP(a,c,a.if),a}a.tag||(a.tag=Mn(a)),Gt("Init",a,r);let u=ht.hydration,d=a.node=u!==null&&u.adopt(a)||Xr(a);if(!d)return a;if(a.tag==="fragment"){let h=(a.context?.document||globalThis.document).createComment("");d.appendChild(h),c.__fragmentAnchor=h}if(Gt("AttachNode",a,r),d.setAttribute&&a.key&&d.setAttribute("data-key",a.key),e){let g=e[a.key];e[a.key]=a;let h=e.__ref?.__children;h&&(g===void 0||!h.includes(a.key))&&h.push(a.key)}d.setAttribute&&a.context?.scopeSelector&&a.context.scopeSelector!==":root"&&a.context.key&&a.key===a.context.key&&d.setAttribute("data-smbls-app",a.context.key),a.id&&d.setAttribute&&(d.id=a.id),$P(a,r),_P(a),wP(a);try{FP(a,r)}catch(g){lg(a,g)}let p=c.__mount;return p!==null&&p.pending>0?(p.attachLater||ig(a,e,l),p.tail=()=>ht.mount.finish(a,r),a):(Aa(a,!0),(p===null||!p.attachLater)&&ig(a,e,l),A0(a,r),a)}function oo(t){let e=t&&t.__ref&&t.__ref.__mount;return!e||!e.attachLater||(e.attachLater=!1,!t.node)?!1:(ig(t,t.parent),!0)}function lg(t,e){if(typeof console<"u"&&console.error){let n=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] createChildren failed at ${n}:`,e?.message||e,e?.stack?`
|
|
57
|
+
`+e.stack.split(`
|
|
58
58
|
`).slice(0,6).join(`
|
|
59
|
-
`):"")}}if(Np(a,!0),P1(a,e,o),typeof a.html=="function"&&a.node&&!a.node.innerHTML&&Ue(a,()=>{try{let u=a.html(a,a.state,a.context);u!=null&&typeof u!="function"&&(a.node.innerHTML=u)}catch{}}),Bt("Create",a,r),Bt("Complete",a,r),Bt("Render",a,r),Bt("RenderRouter",a,r),uS(a,r),typeof a.onFrame=="function"){let u=a.onFrame,d=a.context?.designSystem,h=()=>{if(a.node){if(a.node.isConnected){d&>(d);try{u(a,a.state,a.context)}catch(g){console.error("[DOMQL] onFrame error:",g)}finally{d&&dt()}}requestAnimationFrame(h)}};requestAnimationFrame(h)}return a}var TT=new Set(["childProps","attr","style","scope","data","vars"]);function s1(t,e,n,r,o,s){if(n&&!e.extends&&!e.extend){let p=n.indexOf("_"),m=n.indexOf("."),y=p>0?p:-1;if(m>0&&(y<0||m<y)&&(y=m),y>0){let S=n.substring(0,y),b=t.context?.components;b&&(b[S]||b["smbls."+S])?e={...e,extends:S}:b&&J()&&(/^[A-Z]\w*_\d+$/.test(n)||/^[A-Z]\w*\.\w+$/.test(n))&&console.warn(`[smbls] auto-extend: key "${n}" looks like an instance of "${S}" but neither "${S}" nor "smbls.${S}" 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),Si(t,e,s);let i=Nw(t),a=t.props&&typeof t.props=="object"?t.props:null;for(let p in e){if(p==="parent"||p==="node"||p==="__ref"||p==="extends"||p==="context"||p==="props")continue;if(p==="key"){r&&(t.key=o?jp(o,r):r);continue}let m=e[p];i&&i.mark(p);let y=t[p],S=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";S&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?t[p]=Fl(y,m):S&&TT.has(p)?t[p]={...y,...m}:S&&dS(p)?t[p]=Fl(y,m):t[p]=m}function c(p){for(let m in p){let y=p[m],S=t[m],b=S&&y&&typeof S=="object"&&typeof y=="object"&&!Array.isArray(S)&&!Array.isArray(y)&&typeof S!="function"&&typeof y!="function";b&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?t[m]=Fl(S,y):b&&TT.has(m)?t[m]={...S,...y}:b&&dS(m)?t[m]=Fl(S,y):t[m]=y}}if(a&&c(a),e.props&&typeof e.props=="object"&&(c(e.props),i))for(let p in e.props)i.mark(p);JC(t),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 l=t.scope&&typeof t.scope=="object"?t.scope:null,f=o?.scope,u=t.context&&typeof t.context.globalScope=="object"&&t.context.globalScope||null,d=f||u||null;if(e.scope!==void 0||l){let p={};l&&Object.assign(p,l),e.scope!==void 0&&Object.assign(p,e.scope),t.scope=ru(p,d)}else d&&(t.scope=d);e.if!==void 0&&(t.if=e.if);let h=t.__ref,g=CB(t,h&&h.__runtimeSource);return h&&(h.__declaredArrays=g||void 0),Ci(t),uB(t,o,e,s),e}var cB=new Set(["key","parent","context","__ref"]);function lB(t,e){for(let r of Object.keys(t))cB.has(r)||delete t[r];let n=e.definition;if(!n.extends&&!n.extend&&typeof e.key=="string"){let r=t.context?.components||{},o=r[e.key]||r["smbls."+e.key];o&&(n={...n,extends:o})}en(()=>s1(t,n,e.key,e.ownKey,t.parent,e.options))}function fB(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 rS(t,e,n){if(typeof t.onStateInit!="function"&&!bw(t,"stateInit"))return;let r=t.state;t.state=e;try{Bt("StateInit",t,n)}finally{t.state=r}}var oS=t=>({isDataOnlyKey:e=>hr(t).has(e)});function uB(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&&!wt(t.state)?t.state:void 0;if(a==null){if(e?.state)t.state=e.state,he(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",h=new Set,g=(y,S)=>{h.has(y)||lo(u,y,l)&&(l[y]=S,h.add(y),gn(u,y,S))},p=f.translations[d];if(p&&typeof p=="object")for(let y in p)g(y,p[y]);let m=new Set(f.languages||[]);for(let y in f.translations)m.has(y)||g(y,f.translations[y])}wt(l)||rS(t,l,r),t.state=wt(l)?l:An(l,oS(t.context)),t.state.__element=t,t.state.root=t.state,he(t,t.state),Ls?.(c,t.state),Bt("StateCreated",t,r)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),he(t,t.state);return}if(typeof a=="string"){if(t.state=a1(a,e),t.state&&typeof t.state=="object"&&!wt(t.state)){let c=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:c,enumerable:!1,configurable:!0,writable:!0})}he(t,t.state),pB(t,a,e),Bt("StateCreated",t,r);return}if(typeof a=="function"){let c=a(t,e?.state);if(wt(c))t.state=c;else{let l=c||{};rS(t,l,r),t.state=An(l,e?.state?void 0:oS(t.context))}}else if(wt(a))t.state=a;else{let c={...a};rS(t,c,r),t.state=An(c,e?.state?void 0:oS(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,he(t,t.state),Ls?.(a,t.state),Bt("StateCreated",t,r)}function OT(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 i1(t,e){let n=e.state;return t.startsWith("~/")?[n&&(n.root||n),t.slice(2)]:t.startsWith("../")?[n,t.slice(3)]:[n,t]}function a1(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")||t.startsWith("~/")){let[o,s]=i1(t,e);return s?OT(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let n=OT(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 dB(t,e){let[n,r]=i1(t,e);if(!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 pB(t,e,n){let r=t.__ref;if(!r||!n||e==="."||!wt(n.state))return;r.__stateBinding&&r.__stateBinding.dispose();let o=en(()=>Y(()=>{let s=dB(e,n);!s||typeof s!="object"||s===t.state||en(()=>c1(t,t.state,s,!0))},{depth:r.path?r.path.length:0,label:lt(r,"state")}));o._isStateBinding=!0,r.__stateBinding=o,r.__effects&&r.__effects.push(o)}function c1(t,e,n,r){let o=t.__ref;if(!o)return;if(r||t.state===e){t.state=n,r&&he(t,n),RT(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&&c1(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,RT(o))}function RT(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 hB=new Set(["s","state","ctx","context"]),sS=new WeakMap;function l1(t){if(sS.has(t))return sS.get(t);let e=null;try{let n=typeof Se=="function"?Se(t):Function.prototype.toString.call(t);if(typeof n=="string"){let r=n.match(/^\s*(?:async\s+)?([A-Za-z_$][\w$]*)\s*=>/)||n.match(/^[^(]*\(([^)]*)\)/);r&&(e={params:r[1].split(",").map(o=>o.trim()),body:n.slice(r.index+r[0].length)})}}catch{}return sS.set(t,e),e}function gB(t){let e=l1(t);return e?e.params.map(n=>n.split("=")[0].trim()).filter(Boolean):[]}var PT=new WeakMap;function mB(t){let e=PT.get(t);return e===void 0&&(e=yB(l1(t)),PT.set(t,e)),e}function yB(t){if(!t)return!0;let e=t.body;if(/\bstate\b|\barguments\b|\bcall\s*\(/.test(e))return!0;let n=t.params[1];if(!n)return!1;if(!/^[A-Za-z_$][\w$]*$/.test(n.split("=")[0].trim()))return!0;let r=n.split("=")[0].trim();return new RegExp("(^|[^\\w$.])"+r.replace(/\$/g,"\\$")+"(?![\\w$])").test(e)}var bB=3,_B=/^(is|has)[A-Z0-9_$]/,wB=new Set(["routerOptions"]),LT=new WeakSet;function SB(t,e){if(typeof t!="function"||t.length!==2||e&&(_B.test(e)||wB.has(e))||LT.has(t))return!1;let n=gB(t);if(n.length<2)return!1;let r=n[1].replace(/[{}[\]]/g,"").trim();return r.length<bB||hB.has(r)?!1:(LT.add(t),!0)}function xB(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"||It.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Gn(a)||mt[a]||Ot&&Ot.has(a)||c!==45&&(ze(n,a)||(J()&&SB(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&>(r);try{return c(t,t.state,t.context)}catch{return}finally{r&&dt()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function kB(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 Dt(t,e,n){return!Array.isArray(e)||e.length===0?n:function(...r){return kB(t,e),n.apply(this,r)}}function Li(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function lt(t,e){return()=>t.path.join(".")+"::"+e}var DT=new Set;function Wt(t,e,n){if(!J())return;let r=lt(t,e)();DT.has(r)||(DT.add(r),console.warn(`[smbls] "${e}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,n?.message||n))}var IT=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,vB=(t,e)=>{let n;try{n=String(t)}catch{return}if(!n.includes("{{"))return;IT.lastIndex=0;let r;for(;(r=IT.exec(n))!==null;)r[2].includes("{{")&&e.add(r[2])},EB=(t,e)=>!Gn(t)&&!Nr(e,t),iS=(t,e,n,r,o)=>{if(typeof e=="string"){!o&&e.includes("{{")&&n.add(e);return}typeof e=="function"&&EB(t,r)&&vB(e,n)},pS=new WeakMap,ql=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Vl=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)?Uo(t,e):t},zl=(t,e)=>t&&e?Uo(t,e):t||e||null,f1=(t,e)=>{let n=t.__ref&&t.__ref.__runtimeSource;return!!n&&ql(n,e)},Di=(t,e)=>f1(t,e)?Vl(t.__ref.__runtimeSource[e]):null,Hl=(t,e)=>(e&&t&&typeof t=="object"&&pS.set(t,e),t),AB=t=>{if(!t||typeof t!="object")return;let e=pS.get(t);return e&&pS.delete(t),e},hS=(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++)hS(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&&hS(o.value,e,n)}}},CB=(t,e)=>{let n=null;for(let r of Object.keys(t)){if(It.has(r)||e&&ql(e,r))continue;let o=Object.getOwnPropertyDescriptor(t,r),s=o&&o.value;if(!Array.isArray(s))continue;let i=new Set;hS(s,i,new Set),i.size&&(n||(n=new Map),n.set(s,i))}return n},MT=(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"],TB=t=>{if(u1.includes(t))return!0;let e=t.charCodeAt(0);return e===46||e===33||e===64},OB=(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&&ql(e,o);if(i&&typeof i=="object"&&!Array.isArray(i)){if(!TB(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||ql(l,u)),h=i[u];if(f&&h&&typeof h=="object"&&!Array.isArray(h)&&u1.includes(u)){for(let g in h)iS(g,h[g],n,r,d);continue}iS(u,h,n,r,d)}continue}iS(o,i,n,r,a)}return n};function d1(t,e){let n=t.__ref,r=!!(e&&e.skipIfEffect),o=OB(t,n.__runtimeSource);if(n.__authoredTemplates)for(let c of o)n.__authoredTemplates.add(c);else n.__authoredTemplates=o;if(xB(t),typeof t.text=="function"){let c=t.text,l=Dt(t,t.textDeps,c),f=Y(()=>{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=Ft.call(t,u,t.state)),ki(t,u))}catch(u){Wt(n,"text",u)}},{depth:n.path.length,label:lt(n,"text")});n.__effects.push(f),n.__exec.text=c}else if(typeof t.text=="string"&&t.text.includes("{{")){let c=t.text,l=Y(()=>{if(n.contentManaged)return;let f=Ft.call(t,c,t.state);f!=null&&(t.text=f),t.node&&ki(t,f??"")},{depth:n.path.length,label:lt(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"&&!It.has(c)&&!Gn(c)&&!n.__exec[c]&&!Ip(s,c)){if(mt[c]){let l=t[c],f=Dt(t,t[c+"Deps"],l),u=c,d,h=null,g=null,p,m=Y(()=>{let y=t.context?.designSystem;y&>(y);try{let S=f(t,t.state,t.context);vp();let b;try{b=mt[u](S,t,t.state,t.context)}finally{Ep()}if(Array.isArray(b)){let x={};for(let w of b)if(w)for(let _ in w)x[_]=w[_];b=x}let k=u==="show"||u==="hide";if(b&&t.node&&LB(b)){let x=Ii(b);if(x===null||x!==p){p=x;let w=Te(b,null,t.context?.cssPrefix),_=w?w.split(" ").filter(Boolean):null;if(t.node.classList){if(g)for(let A of g)t.node.classList.remove(A);if(_&&_.length)for(let A of _)t.node.classList.add(A);g=_}}d=void 0,h=null}else if(b&&t.node){if(g){for(let w of g)t.node.classList.remove(w);g=null,p=void 0}let x=Ii(b);if(x===null||x!==d||!Bl(t.node,h)){d=x;let w=FT(t,b);h=jl(t.node,w)}}else t.node&&k&&(d=void 0,h=null,t.node.style.display="")}finally{y&&dt()}},{depth:n.path.length,label:lt(n,u)});n.__effects.push(m),n.__exec[c]=l}else if(Ot&&Ot.has(c)){let l=t[c],f=Dt(t,t[c+"Deps"],l),u=c,d,h=null,g=Y(()=>{let p=t.context?.designSystem;p&>(p);try{let m=f(t,t.state,t.context);if(t.node)if(m!=null){let y=u+":"+String(m);if(y!==d||!Bl(t.node,h)){d=y;let S={[u]:m},b=FT(t,S);h=jl(t.node,b)}}else d=void 0,h=null,t.node.style[u]=""}finally{p&&dt()}},{depth:n.path.length,label:lt(n,u)});n.__effects.push(g),n.__exec[c]=l}else if(c.charCodeAt(0)===45){let l=t[c];b1(t,c,l,t[c+"Deps"],c),n.__exec[c]=l}}if(DB(t),typeof t.html=="function"){let c=t.html,l=Dt(t,t.htmlDeps,c),f=Y(()=>{Ue(t,()=>{let u=l(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&(t.node.innerHTML=u)})},{depth:n.path.length,label:lt(n,"html")});n.__effects.push(f),n.__exec.html=c}if(typeof t.value=="function"){let c=t.value,l=Dt(t,t.valueDeps,c),f=Y(()=>{try{let u=l(t,t.state,t.context);typeof u=="string"&&u.includes("{{")&&(u=Ft.call(t,u,t.state)),NT(t,u)}catch(u){Wt(n,"value",u)}},{depth:n.path.length,label:lt(n,"value")});n.__effects.push(f),n.__exec.value=c}else if(typeof t.value=="string"&&t.value.includes("{{")){let c=t.value,l=Y(()=>{try{NT(t,Ft.call(t,c,t.state))}catch(f){Wt(n,"value",f)}},{depth:n.path.length,label:lt(n,"value")});n.__effects.push(l),n.__exec.value=c}if(typeof t.style=="function"){let c=t.style,l=Dt(t,t.styleDeps,c),f,u=null,d,h,g,p,m=Y(()=>{let y=l(t,t.state,t.context),S=t.context&&t.context.designSystem,b;if(y&&typeof y=="object"&&y===d&&S===g){let x=Ii(y);b=x!==null&&x===h?p:Ei(t,y),h=x}else b=Ei(t,y),h=void 0;d=y,g=S,p=b;let k=Ii(b);(k===null||k!==f||!Bl(t.node,u))&&(f=k,gS(t.node,u,b),Fr(t.node,b),u=jl(t.node,b))},{depth:n.path.length,label:lt(n,"style")});n.__effects.push(m),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=Dt(t,Li(t.styleDeps,c),l),u,d=null,h=Y(()=>{try{let g=f(t,t.state,t.context);if(t.node){let p=c+":"+String(g);if(p!==u||!Bl(t.node,d)){u=p;let m=Ei(t,{[c]:g});gS(t.node,d,Object.assign({},m,{[c]:""})),Fr(t.node,m),d=jl(t.node,m)}}}catch(g){Wt(n,"style."+c,g)}},{depth:n.path.length,label:lt(n,"style."+c)});n.__effects.push(h)}if(t.attr&&typeof t.attr=="object"){for(let c in t.attr)if(typeof t.attr[c]=="function"){let l=Dt(t,Li(t.attrDeps,c),t.attr[c]),f=c,u=Y(()=>{try{let d=l(t,t.state,t.context);typeof d=="string"&&d.includes("{{")&&(d=Ft.call(t,d,t.state)),t.node?.setAttribute&&vi(t.node,f,d)}catch(d){Wt(n,"attr."+f,d)}},{depth:n.path.length,label:lt(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=Y(()=>{try{let d=Ft.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(f,En(f,d??""))}catch(d){Wt(n,"attr."+f,d)}},{depth:n.path.length,label:lt(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 h=l,g="aria-"+c.replace(/[A-Z]/g,m=>"-"+m.toLowerCase()),p=Y(()=>{try{let m=Ft.call(t,h,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(g,En(g,m??""))}catch(m){Wt(n,"aria."+c,m)}},{depth:n.path.length,label:lt(n,"aria."+c)});p._attrName=g,n.__effects.push(p);continue}if(typeof l!="function")continue;let f=Dt(t,Li(t.ariaDeps,c),t.aria[c]),u="aria-"+c.replace(/[A-Z]/g,h=>"-"+h.toLowerCase()),d=Y(()=>{try{let h=f(t,t.state,t.context);if(!t.node?.setAttribute)return;vi(t.node,u,h)}catch(h){Wt(n,"aria."+c,h)}},{depth:n.path.length,label:lt(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,p="data-"+c.replace(/[A-Z]/g,y=>"-"+y.toLowerCase()),m=Y(()=>{try{let y=Ft.call(t,g,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(p,y??"")}catch(y){Wt(n,"data."+c,y)}},{depth:n.path.length,label:lt(n,"data."+c)});m._attrName=p,n.__effects.push(m);continue}if(typeof l!="function")continue;let f=Dt(t,Li(t.dataDeps,c),t.data[c]),d="data-"+c.replace(/[A-Z]/g,g=>"-"+g.toLowerCase()),h=Y(()=>{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){Wt(n,"data."+c,g)}},{depth:n.path.length,label:lt(n,"data."+c)});h._attrName=d,n.__effects.push(h)}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=Dt(t,Li(t.classDeps,c),i[c]),f=Y(()=>{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){Wt(n,"class."+c,u)}},{depth:n.path.length,label:lt(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(It.has(c)||typeof t[c]!="function")continue;let l=c.charCodeAt(0);if(l>=65&&l<=90||Gn(c))continue;let f=t[c];n.__exec[c]=f;let u=t.tag||"div";if(ze(u,c)&&!Nr(u,c)){let d=Kn(c)||c,h=Dt(t,t[c+"Deps"],f),g=Y(()=>{try{let p=h(t,t.state,t.context);typeof p=="string"&&p.includes("{{")&&(p=Ft.call(t,p,t.state)),t.node?.setAttribute&&vi(t.node,d,p,!0)}catch(p){Wt(n,c,p)}},{depth:n.path.length,label:lt(n,c)});g._attrName=d.toLowerCase(),n.__effects.push(g)}}let a=t.tag||"div";for(let c of Object.keys(t)){if(It.has(c))continue;let l=t[c];if(typeof l!="string"||!l.includes("{{"))continue;let f=c.charCodeAt(0);if(f>=65&&f<=90||Gn(c)||Nr(a,c)||No[c]||!ze(a,c))continue;let u=Kn(c)||c,d=Y(()=>{try{let h=Ft.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,En(u,h??""))}catch(h){Wt(n,c,h)}},{depth:n.path.length,label:lt(n,c)});d._attrName=u.toLowerCase(),n.__effects.push(d)}if(BB(t),YB(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let c=t.onStateUpdate,l=t.stateDeps,f=!1,u=[],d=Y(()=>{let h=[];for(let m=0;m<l.length;m++){let y=l[m];try{h[m]=typeof y=="function"?y(t,t.state,t.context):t.state?.[y]}catch{h[m]=void 0}}if(!f){f=!0,u=h;return}let g=h.length!==u.length;for(let m=0;!g&&m<h.length;m++)h[m]!==u[m]&&(g=!0);let p=u;u=h,g&&Ue(t,()=>{try{c(t,t.state,t.context,{prev:p,next:h})}catch(m){if(Ve(t,"onStateUpdate",m),t.context?.strictMode)throw m}})},{depth:n.path.length,label:lt(n,"onStateUpdate")});n.__effects.push(d)}HB(t)}function $T(t){let e=t.parent,n=e?.node;if(!n||!t.node){P1(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){g1(t),t3(t),v1(t),d3(t),u3(t)}function h1(t,e,n){let r=Dt(t,t.ifDeps,n),o=Y(()=>{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,lB(t,s),r=Dt(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=Dr(t)),t.node&&(t.node.ref=t),$T(t),g1(t),v1(t),Bt("Render",t,{}),uS(t,{});else{if(e.__ifInitialized=!0,e.__ifLateMerge=null,t.tag||(t.tag=zn(t)),Bt("Init",t,{}),t.node||(t.node=Dr(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}Bt("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),O1(t,{}),d1(t,{skipIfEffect:!0}),p1(t),R1(t,{}),$T(t),Bt("Create",t,{}),Bt("Complete",t,{}),Bt("Render",t,{}),Bt("RenderRouter",t,{}),uS(t,{})}},{depth:e.path.length,label:lt(e,"if")});e.__effects.push(o)}function ki(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 RB(t,e){return e!=="checked"||!t||t.tagName!=="INPUT"?null:t.hasAttribute("checked")}function PB(t,e){if(e===null)return;let n=t.hasAttribute("checked");n!==e&&t.checked!==n&&(t.checked=n)}function vi(t,e,n,r){n==null||n===!1&&!Fo(e)?$p(t,e,null):typeof n=="function"||typeof n=="object"||(r&&e==="src"&&"src"in t?t.src=n:$p(t,e,En(e,n)))}function $p(t,e,n){let r=RB(t,e);n==null?t.removeAttribute(e):t.setAttribute(e,n),PB(t,r)}function NT(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 g1(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&ki(t,t.text),A1(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}Fr(e,Ei(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&&!Fo(n)||e.setAttribute&&e.setAttribute(n,En(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 Ii(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function LB(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 jl(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=Yn(o);r.push(i,SS(n,i),m1(n,i))}return r}function SS(t,e){return typeof t.getPropertyValue=="function"?t.getPropertyValue(e):""}function m1(t,e){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(e):""}function Yn(t){return $o(t)}function gS(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(Yn(s));for(let s=0;s<e.length;s+=3){let i=e[s];o.has(i)||SS(r,i)===e[s+1]&&typeof r.removeProperty=="function"&&r.removeProperty(i)}}function Bl(t,e){if(!e||!t||!t.style)return!1;let n=t.style;for(let r=0;r<e.length;r+=3)if(SS(n,e[r])!==e[r+1]||m1(n,e[r])!==e[r+2])return!1;return!0}var Kl=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,y1=t=>typeof t=="number"||t===!0||typeof t=="string"&&t!=="",Bp=t=>Kl(t)?t:"--"+t;function Up(t,e){if(!jr(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)}y1(o)&&(n||(n={}),n[Bp(r)]=o)}return n}function b1(t,e,n,r,o){_1(t,o,Dt(t,r,n),s=>y1(s)?{[e]:s}:null)}function _1(t,e,n,r,o){let s=t.__ref,i,a=null,c=Y(()=>{Ue(t,()=>{try{let l=r(n(t,t.state,t.context)),f=t.node;if(!f||!f.style)return;let u=Ii(l);(u===null||u!==i||!Bl(f,a))&&(i=u,gS(f,a,l),l&&Fr(f,l),a=l?jl(f,l):null,o&&o(l))}catch(l){Wt(s,e,l)}})},{depth:s.path.length,label:lt(s,e)});s.__effects.push(c)}function DB(t){let e=t.__ref,n=t.vars;if(typeof n=="function"){IB(t,n),e.__exec.vars=n;return}if(jr(n))for(let r of Object.keys(n)){let o=n[r];!r||typeof o!="function"||b1(t,Bp(r),o,Li(t.varsDeps,r),"vars."+r)}}function IB(t,e){let n=t.__ref;_1(t,"vars",Dt(t,t.varsDeps,e),r=>Up(r),r=>{n.__varsInline=r?new Set(Object.keys(r)):null})}function mS(t,e){if(typeof t[e]=="function"&&(Nr(t.tag||"div",e)||e.charCodeAt(0)===45))return!0;if(!Kl(e))return!1;let n=t.vars;if(typeof n=="function"){let r=t.__ref&&t.__ref.__varsInline;return!!(r&&r.has(e))}if(!jr(n))return!1;for(let r of Object.keys(n))if(typeof n[r]=="function"&&Bp(r)===e)return!0;return!1}function MB(t){let e=null;for(let n in t)t[n]!=null&&n.charAt(0)!=="&"&&(e||(e=new Set),e.add(Yn(n)));return e}function $B(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=Yn(i);Mo[c]&&(s||(s={}),s[c]=a)}o.__declaredLonghands=s}function w1(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=Mo[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 FT(t,e){let n=t.node;Fr(n,e);let r=MB(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=w1(t,r);return s?(Fr(n,s),Object.assign({},e,s)):e}function NB(t){let e=t.__ref;if(!e||!e.__inlineCssKeys||!e.__declaredLonghands)return;let n=w1(t,e.__inlineCssKeys);n&&Fr(t.node,n)}function Ei(t,e){return!e||typeof e!="object"?e:Ue(t,()=>{try{return Iw(e,t)}catch{return e}})}function Fr(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=$o(r),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,c?"important":"")}catch{}}}n&&FB(t,n)}function FB(t,e){let n=`_ds${JT.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 h=l[d];if(typeof h=="object"){let g=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),p="";for(let m in h)p+=`${Yn(m)}: ${h[m]};`;u+=Un(`${g} { ${p} }`,g)+`
|
|
60
|
-
`}else f+=`${
|
|
61
|
-
`),u&&(s+=u)}}s&&(o.textContent+=s)}var jT=new Set;function BT(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 jB(t,e,n){let r=BT(n);queueMicrotask(()=>{if(!t.__ref)return;let o;try{o=e(t,t.state,t.context)}catch{return}if(BT(o)===r)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";jT.has(s)||(jT.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 BB(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&&J()&&jB(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=Y(()=>{let d=t.state&&(wt(t.state)?t.state.root:null);if(!d||!wt(d))return;let h=d;h=h[c];for(let p=0;p<l.length&&!(h==null||typeof h!="object");p++)if(wt(h))h=h[l[p]];else break;if(!f.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"&&Ue(t,()=>{try{if(Fw(o)){let p=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});p&&typeof p.then=="function"?p.then(()=>Hn(o,!1),m=>{Hn(o,!0),kn("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}):(Hn(o,!1),p===!1&&(g=!0))}}catch(p){Hn(o,!0),kn("error",t,{hook:"onBeforeUpdate",error:p})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",p)}}),!g&&t.node&&o.__effects)for(let p=0;p<o.__effects.length;p++){let m=o.__effects[p];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}!g&&typeof t.onUpdate=="function"&&Ue(t,()=>{try{t.onUpdate(t,t.state,t.context)}catch(p){kn("error",t,{hook:"onUpdate",error:p})||console.error("[DOMQL] subscribeTo onUpdate error:",p)}})},{depth:o.path.length,label:lt(o,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,o.__effects.push(u)}}function xS(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 kS(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 UT=new Set;function UB(t,e){let n=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",r=n+"::"+t;UT.has(r)||(UT.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 VT=new Map;function VB(t){let e=VT.get(t);if(e)return e;e=[];let n=r=>{if(r)for(let o of r)e.push(Dl(o))};return n(Mo[t]),n(Tp[t]),VT.set(t,e),e}function zT(t,e,n){if(mS(t,e)||n&&n.has(e))return!0;let r=VB(Yn(e));for(let o=0;o<r.length;o++){let s=r[o];if(mS(t,s)||n&&n.has(s))return!0}return!1}function Ni(t,e,n,r){let o={},s=new Set,i=(a,c,l)=>{let f=l?new Set(Object.keys(o)):null;if(mt[a]){let u=mt[a](c,e,e.state,e.context);if(u){let d=Array.isArray(u)?u:[u];for(let h of d)h&&Object.assign(o,h)}}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,zT(e,u,r))}continue}if(a==="vars"){let u=Up(c,e);if(u)for(let d in u)i(d,u[d],mS(e,d)||!!(r&&r.has(d)));continue}if(xS(a,e)){let u=Ni(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)){J()&&UB(a,e);continue}let l=kS(a,e),f=Ni(c,e,!1,r);Object.keys(f).length&&(o[l]=f);continue}i(a,c,zT(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 jr=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function S1(t,e){for(let n in e){let r=e[n];t[n]=jr(r)?S1(jr(t[n])?t[n]:{},r):r}return t}function zB(t,e){if(!jr(e))return;let n;for(let r of t.split(" ")){let o=r?e[r]:null;jr(o)&&(n=S1(n||{},o))}return n}function vS(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)&&vS(t[n],e+1))return!0}return!1}function x1(t,e,n){if(!e||typeof e!="object"||Array.isArray(e))return null;if(xS(t,n)){let s=Ni(e,n,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let r=kS(t,n),o=Ni(e,n,!1);return Object.keys(o).length?{cssProp:r,block:o}:null}function HB(t){let e=t.__ref;for(let n of Object.keys(t)){if(!dS(n))continue;let r=t[n];if(!r||typeof r!="object"||Array.isArray(r)||!vS(r))continue;let o=null,s,i=Y(()=>{if(!t.node)return;let a=t.context?.designSystem;a&>(a);let c,l=!1;try{let f=x1(n,r,t),u=f?Ii(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=Te({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&dt()}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:lt(e,"cssBlock("+n+")")});e.__effects.push(i)}}var WB=()=>!0,qB=(t,e)=>{let n=t.charAt(0);return(n===":"||n==="@"||n==="&"||n==="[")&&e&&typeof e=="object"&&!Array.isArray(e)?!0:!!mt[t]||!!(Ot&&Ot.has(t))||Kl(t)||t==="vars"};function KB(t,e,n){let r={},o=!1;for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&(a!=="data"&&a!=="aria"&&(qB(a,n[a])||It.has(a))?r[a]=!0:o=!0);if(!o)return null;let s=nS({[e]:n},t.tag||"div",r,WB),i=null;for(let a in s)/^on/i.test(a)||(i||(i={}),i[a]=s[a]);return i}function HT(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(g){Wt(t.__ref,"conditional("+n+")."+l,g),u&&c(l);continue}if(typeof d=="string"&&d.includes("{{")&&(d=Ft.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&&k1(i,e,l);continue}let h=d===!1&&!Fo(l)?null:String(En(l,d));c(l),!(u&&h===e.written.get(l))&&(f===void 0&&e.base.set(l,i.getAttribute(l)),$p(i,l,h),e.owners.set(l,n),e.written.set(l,h))}o.appliedAttrs=a}function k1(t,e,n){t.getAttribute(n)===e.written.get(n)&&$p(t,n,e.base.get(n)),e.owners.delete(n),e.base.delete(n),e.written.delete(n)}function GB(t,e,n,r){let o=r.appliedAttrs;if(r.appliedAttrs=null,!!o)for(let s of o)e.owners.get(s)===n&&k1(t.node,e,s)}function v1(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 YB(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=KB(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"&&jr(S)){for(let b of Object.keys(S))b&&u.add(Bp(b));continue}u.add(m)}}let d=()=>{let m,y=t[i];if(y===void 0){let k=!!t.state&&i in t.state,x=t.state?t.state[i]:void 0;if(k||x!==void 0)m=x;else{let w=t.context?.cases?.[i];if(w===void 0)return;try{m=typeof w=="function"?w.call(t,t):w}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(k){m=!1,e.__conditionalError=k,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,k?.message||k)}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&>(b);try{HT(t,n,o,f,l,!1)}finally{b&&dt()}}return}l.lastMatch=S,b&>(b);try{if(S){let k={},x={},w=!1;for(let A in a){if(!Object.prototype.hasOwnProperty.call(a,A))continue;let C=a[A],D=A.charAt(0);if((D===":"||D==="@"||D==="&"||D==="[")&&C&&typeof C=="object"&&!Array.isArray(C)){if(xS(A,t)){let I=Ni(C,t,!1,u);Object.keys(I).length&&(x[`[data-theme="${A.slice(1)}"] &`]=I,w=!0)}else{let I=kS(A,t),N=Ni(C,t,!1,u);Object.keys(N).length&&(x[I]=N,w=!0)}continue}let $=typeof C=="function"?C(t,t.state,t.context):C;if($!=null){if(mt[A]){let I=mt[A]($,t,t.state,t.context);if(I){let N=Array.isArray(I)?I:[I];for(let K of N)K&&Object.assign(k,K)}}else if(Ot&&Ot.has(A))k[A]=$;else if(Kl(A))k[A]=$;else if(A==="vars"){let I=Up($,t);I&&Object.assign(k,I)}}}let _=Object.keys(k);if(_.length){Fr(t.node,k);for(let A of _)r.set(A,o);l.appliedKeys=_}else l.appliedKeys=null;if(w){let A=Te(x,null,t.context?.cssPrefix,{state:!0}),C=A?A.split(" ").filter(Boolean):[];if(C.length&&t.node.classList){for(let D of C)t.node.classList.add(D);l.appliedClasses=C}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&&HT(t,n,o,f,l,!0)}else{if(l.appliedAttrs&&GB(t,n,o,l),l.appliedKeys){for(let k of l.appliedKeys)r.get(k)===o&&(Kl(k)?t.node.style.removeProperty(k):t.node.style[k]="",r.delete(k));l.appliedKeys=null}if(l.appliedClasses){for(let k of l.appliedClasses)t.node.classList.remove(k);l.appliedClasses=null}}}finally{b&&dt()}};e.__conditionalRunners.push(d);let h=Dt(t,t[i+"Deps"],d),g=Y(h,{depth:e.path.length,label:lt(e,"conditional("+o+")")}),p=e.__exec&&e.__exec[i]||t[i];g._sources.size===0&&typeof p=="function"&&J()&&mB(p)&&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 aS=new WeakSet,cS=new WeakMap;function XB(t){let e=cS.get(t);if(e==="painted")return!1;if(e===void 0){cS.set(t,"open");let n=t.defaultView,r=()=>{cS.set(t,"painted")};n&&typeof n.requestAnimationFrame=="function"?n.requestAnimationFrame(r):setTimeout(r,0)}return!0}function ZB(t){let e=t.ownerDocument;!e||aS.has(e)||XB(e)||(aS.add(e),queueMicrotask(()=>{aS.delete(e);let n=e.body||e.documentElement;n&&n.offsetWidth}))}var lS=new WeakSet,WT=!1;function qT(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function yS(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"?yS(s,o):o}return n}function E1(t,e){let n={};for(let r in t){let o=t[r];if(o&&typeof o=="object"){let s=E1(o,e);Object.keys(s).length&&(n[r]=s)}else e.has(r)||(n[r]=o)}return n}function QB(t,e,n){let r=1/0,o=-1/0;for(let i of e.values())i<r&&(r=i),i>o&&(o=i);if(n)for(let i of n.values())i>o&&(o=i);if(o<=r)return null;let s=null;for(let[i,a]of e){if(a===o)continue;let c=JB(i);if(c)for(let l=0;l<c.length;l+=3){let f=c[l],u=c[l+1],d=c[l+2],h=t[u]!=null?e.get(u):void 0,g=n&&n.get(f),p=h!==void 0&&h>a&&Mw(f,t[u],d),m=!p&&g!==void 0&&g>a&&Mw(f,void 0,d);if(p||m){p&&delete t[i],s||(s=new Set),s.add(i);break}}}return s}var KT=new Map;function JB(t){let e=KT.get(t);if(e!==void 0)return e;let n=Yn(t),r=Mo[n];if(e=null,Array.isArray(r)){e=[];for(let o of r)e.push(o,Dl(o),n)}return KT.set(t,e),e}function A1(t){let{node:e}=t;if(!e)return;if(WT||(WT=!0,Te({display:"none"})),lS.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}lS.add(t);let n=t.context?.designSystem;n&>(n),vp();try{let r={},o=!1,s=[],i=null,a=null,c=null,l=t.__ref&&t.__ref.__mergeLayer,f,u=null,d=null,h=(b,k)=>{if(k&&typeof k=="object"&&qT(b)){a||(a={});let x=a[b];x&&(k=yS(x,k)),a[b]=k}else(k===null||typeof k!="object")&&(c||(c=new Set),c.add(b),f!==void 0&&(u||(u=new Map),u.set(b,f)));r[b]=k};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&mt.theme){let b=mt.theme(t.theme,t,t.state,t.context);if(b){let k=x=>{for(let w in x){let _=x[w];_&&typeof _=="object"&&qT(w)&&(i||(i={}),i[w]=_),r[w]=_}};if(Array.isArray(b))for(let x of b)x&&k(x);else k(b);o=!0}}let g=(b,k)=>{if(b==="vars"){let x=Up(k);if(x){for(let w in x)h(w,x[w]);o=!0}return}if(mt[b]){let x=mt[b](k,t,t.state,t.context);if(x){if(Array.isArray(x)){for(let w of x)if(w)for(let _ in w)h(_,w[_])}else for(let w in x)h(w,x[w]);o=!0}}else if(Ot&&Ot.has(b))k!=null&&typeof k!="object"&&(h(b,k),o=!0);else if(b.charCodeAt(0)===45)k!=null&&typeof k!="object"&&(h(b,k),o=!0);else if((b.charAt(0)==="&"||b.charAt(0)==="@"||b.charAt(0)===":"||b.charAt(0)==="[")&&k&&typeof k=="object"&&!Array.isArray(k)){if(vS(k))return;let x=x1(b,k,t);x&&(h(x.cssProp,x.block),o=!0)}};if(typeof t.class=="string"){let b=zB(t.class,t.context?.designSystem?.class);if(b)for(let k in b)g(k,b[k])}let p=c?new Set(c):null,m=t.tag||"div";for(let b of Object.keys(t)){if(typeof t[b]=="function"){let x=l&&l.get(b);x!==void 0&&Nr(m,b)&&(d||(d=new Map),d.set(Yn(b),x));continue}if(f=l?l.get(b):void 0,b==="vars"){g(b,t[b]);continue}if(It.has(b)||b==="theme")continue;let k=b.charCodeAt(0);k>=65&&k<=90||Gn(b)||Ip(m,b)||g(b,t[b])}f=void 0;let y=u?QB(r,u,d):null;if(i)for(let b in i){let k=c?E1(i[b],c):i[b];a&&a[b]&&(k=yS(k,a[b])),Object.keys(k).length?r[b]=k:delete r[b]}if($B(t,r,c,y?new Set([...p||[],...y]):p),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 k=Te(r,null,t.context?.cssPrefix);if(s=k?k.split(" ").filter(Boolean):[],k&&e.classList){let x=s,w=!1;for(let _ of x)e.classList.add(_),w||(_.charCodeAt(0)===95&&_.charCodeAt(1)===99||_.charCodeAt(0)===95&&_.indexOf("_c",1)!==-1)&&(w=!0);w&&ZB(e)}}let S=t.__ref;if(S){let b=S.__staticCssClasses;if(b&&e.classList){let k=new Set(s);for(let x of b)k.has(x)||e.classList.remove(x)}S.__staticCssClasses=s}NB(t)}finally{Ep(),n&&dt(),lS.delete(t)}}var eT=t=>!!mt[t]||!!(Ot&&Ot.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function nT(t){t&&t.node&&A1(t)}function t3(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,En(i,s))}let n=eS(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"||It.has(o)||o==="on"||n[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!Gn(o)&&!Nr(r,o)&&ze(r,o)){let i=t[o];if(i==null)continue;if(typeof i=="string"&&i.includes("{{")){if(!No[o])continue;i=Ft.call(t,i,t.state)}if(i==null||typeof i=="function"||typeof i=="object"||i===!1&&!Fo(Kn(o)||o))continue;let a=Kn(o)||o;e.setAttribute(a,En(a,i))}}}function rT(t,e){let{node:n}=t;if(!n||!n.setAttribute)return;let r=e.charCodeAt(0);if(r>=65&&r<=90||Gn(e))return;let o=t.tag||"div";if(Nr(o,e)||!ze(o,e))return;let s=Kn(e)||e,i=s.toLowerCase(),a=t.__ref&&t.__ref.__effects,c=!1;if(a)for(let u=0;u<a.length;u++){let d=a[u];d&&d._attrName===i&&!d._disposed&&typeof d._execute=="function"&&(c=!0,d._execute())}if(c)return;let l=t[e],f=No[e];if(f&&l!=null){let u=f(t);u!==void 0&&(l=u)}typeof l=="string"&&l.includes("{{")&&(l=Ft.call(t,l,t.state)),vi(n,s,l)}function e3(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{}YT(o),jo.delete(t),n.style.height="",o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""),ZT(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){Gl(t,!0);return}if(!(n.scrollHeight>0)){o.awaitingLayout=!0,GT(t,o);return}o.awaitingLayout=!1;let i=o3(n),a=s3(i),c=n.style.height;n.style.height="0px",a&&fS(n);let l=n.scrollHeight;if(!(l>0)){n.style.height=c,a&&fS(n);return}let f=i3(n,i),u=f!=null&&l<f?f:l,d=l3(i),h=d!=null&&u>d;n.style.height=c3(h?d:u,i)+"px",a&&fS(n),ZT(n,o,h),o.lastMeasure=l,o.lastWidth=n.clientWidth,GT(t,o)}},r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{try{n.removeEventListener("input",o.resize)}catch{}YT(o),jo.delete(t)})),o.active||(n.addEventListener("input",o.resize),o.active=!0,r3(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 Gl(t,e){let n=t.__ref?.__autoGrow;n&&(e&&(n.attachAttempts=0,n.firstAttemptAt=null),jo.add(t),Fp())}function n3(){let t=Array.from(jo);jo.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=$i()),o.attachAttempts+=1,o.attachAttempts<=n1&&$i()-o.firstAttemptAt<r1&&(jo.add(n),Fp());continue}o.attachAttempts=0,o.firstAttemptAt=null,o.resize()}}}function GT(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,Gl(t,!0);return}let a=n.clientWidth;e.lastWidth!=null&&Math.abs(a-e.lastWidth)<.5||(e.lastWidth=a,Gl(t,!0))},i;try{i=new o(s),i.observe(n)}catch{return}e.watch=i}function YT(t){let e=t.watch;if(e){t.watch=null;try{e.disconnect()}catch{}}}function r3(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&&Gl(t,!0)},()=>{})}function o3(t){let e=t.ownerDocument&&t.ownerDocument.defaultView;try{return e&&e.getComputedStyle?e.getComputedStyle(t):null}catch{return null}}var Bo=t=>typeof t=="string"&&/^\s*-?\d*\.?\d+px\s*$/.test(t)?parseFloat(t):null,ES=t=>(Bo(t.paddingTop)||0)+(Bo(t.paddingBottom)||0),C1=t=>(Bo(t.borderTopWidth)||0)+(Bo(t.borderBottomWidth)||0);function s3(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 fS(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 i3(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=Bo(e.lineHeight)||a3(t,e);return r>0?n*r+ES(e):null}var $l=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontFamily","lineHeight","letterSpacing"],XT=new WeakMap;function a3(t,e){let n=t.ownerDocument,r=n&&(n.body||n.documentElement);if(!r||!n.createElement)return null;let o=XT.get(n);o||(o=new Map,XT.set(n,o));let s=$l.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<$l.length;l++)e[$l[l]]&&(a[$l[l]]=e[$l[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 c3(t,e){return e?e.boxSizing==="border-box"?t+C1(e):e.boxSizing==="content-box"?Math.max(0,t-ES(e)):t:t}function l3(t){if(!t)return null;let e=Bo(t.maxHeight);if(e==null||!(e>0))return null;let n=ES(t),r=C1(t),o=t.boxSizing==="border-box"?e-r:e+n,s=Bo(t.lineHeight);if(!(s>0))return o;let i=Math.floor((o-n)/s+1e-6);return i>=1?i*s+n:o}function ZT(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 QT=["srcObject","muted"],f3=(t,e)=>t==="muted"?e===!0||e===""||e==="true"||e==="muted":e??null;function u3(t){let e=t.node,n=t.__ref;if(!(!e||!n))for(let r=0;r<QT.length;r++){let o=QT[r],s=t[o];if(s===void 0||!(o in e))continue;let i=a=>{let c=f3(o,a);if(e[o]!==c)try{e[o]=c}catch(l){Wt(n,o,l)}};if(typeof s=="function"){let a=Dt(t,t[o+"Deps"],s),c=Y(()=>{try{i(a(t,t.state,t.context))}catch(l){Wt(n,o,l)}},{depth:n.path.length,label:lt(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 d3(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"?Dt(t,t.autoGrowDeps,r):null,s=Y(()=>{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}e3(t,a)},{depth:n.path.length,label:lt(n,"autoGrow")});n.__effects||(n.__effects=[]),n.__effects.push(s),o&&(n.__exec.autoGrow=r)}var T1=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function O1(t,e){for(let n of Object.keys(t)){if(!Gn(n)||T1.has(n))continue;let r=wp(n);if(r){Sp(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=oB(n);Ir.has(i)||wi(sB(i),t,o,s)}p3(t)}function p3(t){let e=t.node;if(!e||!e.addEventListener)return;let n={},r=!1;for(let d of T1){let h=t[d];typeof h=="function"&&(n[d]=h,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 h=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];h&&(i=h.clientX,a=h.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let h=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!h)return;let g=h.clientX-i,p=h.clientY-a,m=Date.now()-c;if(m>s)return;let y=Math.abs(g),S=Math.abs(p);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=p<0?"up":"down";else return;let k="onSwipe"+b.charAt(0).toUpperCase()+b.slice(1),x=n[k],w=n.onSwipe;x&&x.call(t,d,t,t.state,t.context),w&&w.call(t,{direction:b,dx:g,dy:p,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 Uo(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]=Uo(o,s):n[r]=s}return n}function bS(t,e,n,r,o){if(!e||!t.node)return;let s=t.childExtends,i=Di(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=b=>{let k=e[b],x=k;(typeof k=="string"||typeof k=="number")&&(k={text:k});let w=f;if(typeof f=="function")try{w=f(t,k)}catch{w=null}let _=typeof f=="function"?Vl(w):i;if(o&&u!=="state"&&(_=zl(_,Vl(x))),u==="state"){let C=x;(typeof x=="string"||typeof x=="number")&&(C={value:x,text:x}),k=w?{...w,state:C}:{state:C}}else w&&(k=Uo(w,k));if(s&&!k.ignoreChildExtends)if(k.extends){let C=Array.isArray(k.extends)?k.extends:[k.extends],D=Array.isArray(s)?s:[s];k={...k,extends:[...D,...C]}}else k={...k,extends:s};let A=o1(k?.key,x,b,t);try{return ee(Hl(k,_),t,A,n)}catch(C){if(typeof console<"u"&&console.error){let D=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${A}" failed to construct at ${D} (initial render, skipping this row):`,C?.message||C)}return null}},h=t.__ref;if(!(r===!0&&!a&&!!h&&(n?.mountYield===!0||t.yieldChildren===!0))){for(let b=0;b<e.length;b++){let k=d(b);!a&&k?.node&&l.appendChild(k.node)}return a||t.node.appendChild(l),!0}let p=h.__childrenChunkGen=(h.__childrenChunkGen||0)+1;Hw();let m=zw(),y=null,S=b=>{if(h.__disposed||h.__childrenChunkGen!==p){y&&y.parentNode&&y.remove();return}for(let k=b;k<e.length;k++){m.begin();let x=d(k);x?.node&&(y?t.node.insertBefore(x.node,y):l.appendChild(x.node));let w=m.end();if(k+1<e.length&&Vw(w)){y||(y=c.createComment("smbls-mount"),l.appendChild(y),t.node.appendChild(l));let _=k+1;qw(()=>S(_));return}}y?(y.remove(),t.node.tagName==="SELECT"&&Np(t,!0)):t.node.appendChild(l)};return S(0),Ww(),!0}if(typeof e=="string"){let a=a1(e,t);if(Array.isArray(a))return bS(t,a,n,r,!0)}if(typeof e=="object")for(let a in e){if(It.has(a))continue;let c=e[a];if(c==null||c===!1)continue;let l=o?zl(i,Vl(c)):i;if((typeof c=="string"||typeof c=="number")&&(c={text:c}),t.childProps&&(c=Uo(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};ee(Hl(c,l),t,jp(t,a),n)}}function Np(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=Ft.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 R1(t,e){let{children:n,content:r}=t,o=t.childExtends,s=typeof n=="function"||f1(t,"children");if(typeof n=="function"){let p=n;try{n=p(t,t.state,t.context)}catch(k){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):`,k?.message||k)}}MT(t,n),t.children=n;let m=t.__ref,y=!1,S=Dt(t,t.childrenDeps,p),b=Y(()=>{let k=y;y=!0;let x;try{x=S(t,t.state,t.context)}catch(N){if(typeof console<"u"&&console.error){let K=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${K}${k?"":" (initial tracking run)"}:`,N?.message||N)}return}if(!k||x===t.children)return;MT(t,x),t.children=x,m.__childrenChunkGen!=null&&m.__childrenChunkGen++;let w=typeof t.onContentUpdate=="function",_=w?[]:null,A=w?[]:null,C=w?[]:null;if(Array.isArray(x)&&t.childrenAs==="state"){let N=t.childProps,K=[],et=new Map;for(let H=0;H<x.length;H++){let z=x[H],W=N;if(typeof N=="function")try{W=N(t,z)}catch{W=null}let Q=o1(W&&W.key,z,H,t);K.push(Q),et.set(Q,{rawChild:z,childProps:W})}let st=new Set(K),xt=m.__children.slice();for(let H of xt)if(!st.has(H)){let z=t[H];z?.remove&&z.remove(),delete t[H],A&&A.push(H)}let kt=t.childExtends,Rt=t.tag==="fragment",Zt=t.context?.document||globalThis.document,U=Rt?null:Zt?.createDocumentFragment(),it=new Set;for(let H of K){let z=et.get(H),W=z.rawChild,Q=t[H];if(Q&&Q.state){if(W&&typeof W=="object"){let bt=Q.state,we=bt.$replace||bt.replace,Gr=bt.$update||bt.update;try{if(typeof we=="function")we.call(bt,W);else if(typeof Gr=="function"){for(let B in bt)if(!(B==="__element"||B==="root"||B==="parent"||B==="update")&&!Object.prototype.hasOwnProperty.call(W,B))try{bt[B]=void 0}catch{}Gr.call(bt,W)}else for(let B in W)bt[B]=W[B]}catch(B){if(typeof console<"u"&&console.error){let tt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${H}" failed to patch at ${tt} (reconcile, keeping its previous data for this pass):`,B?.message||B)}}}C&&C.push(H);continue}let Z=W;(typeof W=="string"||typeof W=="number")&&(Z={value:W,text:W});let be=z.childProps,Vt=be?{...be,state:Z}:{state:Z},_e=typeof N=="function"?Vl(be):Di(t,"childProps");if(kt&&!Vt.ignoreChildExtends)if(Vt.extends){let bt=Array.isArray(Vt.extends)?Vt.extends:[Vt.extends],we=Array.isArray(kt)?kt:[kt];Vt={...Vt,extends:[...we,...bt]}}else Vt={...Vt,extends:kt};let zt;try{zt=ee(Hl(Vt,_e),t,H,e)}catch(bt){if(typeof console<"u"&&console.error){let we=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${H}" failed to construct at ${we} (reconcile, skipping this row):`,bt?.message||bt)}it.add(H);continue}!Rt&&zt?.node&&U&&U.appendChild(zt.node),_&&_.push(H)}if(!Rt&&U&&U.childNodes.length&&t.node&&t.node.appendChild(U),!Rt&&t.node){let H=null;for(let z of K){let W=t[z]?.node;if(!W)continue;let Q=H?H.nextSibling:t.node.firstChild;W!==Q&&t.node.insertBefore(W,Q),H=W}}m.__children=it.size?K.filter(H=>!it.has(H)):K,w&&(_.length||A.length)&&AT(t,{added:_,removed:A,kept:C}),Np(t,!1);return}let I=w?[...m.__children]:null;for(let N of[...m.__children]){let K=t[N];K?.remove&&K.remove(),delete t[N]}m.__children=[],bS(t,x,e,!1,!0),Np(t,!1),w&&AT(t,{added:[...m.__children],removed:I,kept:[]})},{depth:m.path.length,label:lt(m,"children")});m.__effects.push(b)}let i=bS(t,n,e,!0,s);if(r!=null&&!(r&&r.__ref)){let p=r;if(typeof p=="string"||typeof p=="number"?p={text:p}:typeof p!="object"&&(p={}),t.childProps&&(p=Uo(t.childProps,p)),o&&!p.ignoreChildExtends)if(p.extends){let y=Array.isArray(p.extends)?p.extends:[p.extends],S=Array.isArray(o)?o:[o];p={...p,extends:[...S,...y]}}else p={...p,extends:o};let m=zl(Di(t,"childProps"),Di(t,"content"));ee(Hl(p,m),t,"content",e)}if(n&&!i)return;let a=t.context?.components||{},c=t.__ref&&t.__ref.__runtimeSource,l=c?{}:null;{let p=Object.keys(t);for(let m=0;m<p.length;m++){let y=p[m];if(!y.endsWith("Extends")||typeof t[y]!="string")continue;let S=y.slice(0,-7);if(!S||S.charCodeAt(0)<65||S.charCodeAt(0)>90)continue;let b={extends:t[y]};delete t[y];for(let k=m+1;k<p.length;k++){let x=p[k],w=x.charCodeAt(0);if(w>=65&&w<=90||It.has(x)||typeof t[x]=="function"&&(x.startsWith("on")||x.startsWith(".")))break;let _=t[x];_!==void 0&&(b[x]=_,delete t[x],l&&ql(c,x)&&(l[S]||(l[S]={}),l[S][x]=c[x]))}t[S]&&typeof t[S]=="object"?t[S]={...b,...t[S]}:t[S]=b}}let f=e?.mountYield===!0||t.yieldChildren===!0,u=Object.keys(t),d=p=>{if(It.has(p)||typeof t[p]!="object"||t[p]===null)return;let m=p.charCodeAt(0);if(m<65||m>90)return;let y=t[p];if(y.__ref)return;if(!y.extends&&!y.extend){let b=a[p]||a[`smbls.${p}`];b&&(y={...y,extends:b})}if(t.childProps&&(y=Uo(t.childProps,y)),o&&!y.ignoreChildExtends)if(y.extends){let b=Array.isArray(y.extends)?y.extends:[y.extends],k=Array.isArray(o)?o:[o];y={...y,extends:[...k,...b]}}else y={...y,extends:o};let S=c?zl(Di(t,"childProps"),zl(l[p]||null,Di(t,p))):null;ee(Hl(y,S),t,p,e)};if(!f){for(let p of u)d(p);return}Hw();let h=zw(),g=p=>{for(let m=p;m<u.length;m++){h.begin(),d(u[m]);let y=h.end();if(m+1<u.length&&Vw(y)){let S=m+1;qw(()=>g(S));return}}};g(0),Ww()}function P1(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 _S=3;function Fw(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=_S?!1:(t.__inBeforeUpdate=!0,!0)}function Hn(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===_S&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${_S}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function Bt(t,e,n){let r=t.charAt(0).toLowerCase()+t.slice(1);kn(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&>(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(h=>{Ve(e,o,h)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(Ve(e,o,u),e.context?.strictMode)throw u}finally{l&&dt(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}Mt();var Yl="inertOutside",h3=new Set(["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT","BASE","TITLE"]),g3='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',m3={attributes:!0,attributeFilter:["inert"]},L1=new WeakMap,D1=new WeakMap,Xl=new Set,I1=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function Vo(t){try{return en(t)}catch(e){console.error("[smbls] inertOutside:",e)}}function M1(t){let e=()=>Vo(t);typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)}function y3(t){if(!t||!t.defaultView||!("activeElement"in t))return null;let e=L1.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=>Vo(()=>CS(e,r))),L1.set(t,e),e)}function j1(t,e){let n=t.element.node;return!!n&&n.nodeType===1&&n.isConnected&&n.ownerDocument===e}function b3(t){let e=t.activeElement;return e&&e!==t.body&&e!==t.documentElement?e:null}var $1=t=>!!(t.closest&&t.closest("[inert]"));function _3(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&&!h3.has(i.tagName)&&n.add(i)}return{outside:n,parents:r}}function N1(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 CS(t,e){let{doc:n,held:r,observer:o}=t;e&&N1(t,e),N1(t,o.takeRecords());let s=t.top,i=[];for(let u of t.layers){let d=j1(u,n);d&&!u.live&&(i.push(u),u.returnFocus=b3(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?_3(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,m3);if(t.layers.some(u=>!u.live)?Xl.add(t):Xl.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),M1(()=>B1(t,a));else if(f){let u=f.returnFocus;M1(()=>w3(t,f,u))}f&&(f.returnFocus=null)}function B1(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(g3))if(i(a,!0))return;o&&o!==r.body&&typeof o.blur=="function"&&o.blur()}function w3(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&&B1(t,t.top))}function AS(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)}CS(n)}function U1(t){let e=t[Yl];if(typeof e=="function")try{e=e(t,t.state,t.context)}catch{e=!1}return!!e}function F1(t){let e=D1.get(t);if(e)return e;let n=t.__ref,r=t.node;if(!n||!r||r.nodeType!==1)return null;let o=y3(r.ownerDocument);if(!o)return null;e={element:t,manager:o,declared:!1,live:!1,returnFocus:null},D1.set(t,e);let s=Y(()=>{let i=U1(t);Vo(()=>AS(e,i))},{depth:n.path.length,label:()=>n.path.join(".")+"::"+Yl});return n.__effects||(n.__effects=[]),n.__effects.push(s),n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>Vo(()=>AS(e,!1))),e}function S3(){for(let t of Xl){if(!t.doc.defaultView){Xl.delete(t);continue}t.layers.some(e=>!e.live&&j1(e,t.doc))&&CS(t)}}var Vp={name:Yl,create(t){I1(t,Yl)&&Vo(()=>F1(t))},render(){Xl.size&&Vo(S3)},update(t){I1(t,Yl)&&Vo(()=>{let e=F1(t);e&&AS(e,U1(t))})}};var V1={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"]},z1={"gradient-blue-light":`linear-gradient(to right,
|
|
59
|
+
`):"")}}function A0(t,e){if(typeof t.html=="function"&&t.node&&!t.node.innerHTML&&Ge(t,()=>{try{let n=t.html(t,t.state,t.context);n!=null&&typeof n!="function"&&(t.node.innerHTML=n)}catch{}}),Gt("Create",t,e),Gt("Complete",t,e),Gt("Render",t,e),Gt("RenderRouter",t,e),_0(t,e),typeof t.onFrame=="function"){let n=t.onFrame,r=t.context?.designSystem,o=()=>{if(t.node){if(t.node.isConnected){r&&bt(r);try{n(t,t.state,t.context)}catch(s){console.error("[DOMQL] onFrame error:",s)}finally{r&&mt()}}requestAnimationFrame(o)}};requestAnimationFrame(o)}}function og(t,e){let n=e&&e.__ref&&e.__ref.__mount;!n||!n.tail||n.holder||(n.holder=t,ht.mount.hold(t))}var K6=new Set(["childProps","attr","style","scope","data","vars"]);function pP(t,e,n,r,o,s){if(n&&!e.extends&&!e.extend){let h=n.indexOf("_"),m=n.indexOf("."),y=h>0?h:-1;if(m>0&&(y<0||m<y)&&(y=m),y>0){let _=n.substring(0,y),S=t.context?.components;S&&(S[_]||S["smbls."+_])?e={...e,extends:_}:S&&tt()&&(/^[A-Z]\w*_\d+$/.test(n)||/^[A-Z]\w*\.\w+$/.test(n))&&console.warn(`[smbls] auto-extend: key "${n}" looks like an instance of "${_}" but neither "${_}" nor "smbls.${_}" 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),da(t,e,s);let i=zx(t),a=t.props&&typeof t.props=="object"?t.props:null;for(let h in e)if(!(h==="parent"||h==="node"||h==="__ref"||h==="extends"||h==="context"||h==="props")){if(h==="key"){r&&(t.key=o?cg(o,r):r);continue}i&&i.mark(h),c0(t,h,e[h])}if(a)for(let h in a)c0(t,h,a[h]);let c=e.props;if(c&&typeof c=="object"){for(let h in c)c0(t,h,c[h]);if(i)for(let h in c)i.mark(h)}QO(t),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 l=t.scope&&typeof t.scope=="object"?t.scope:null,f=o?.scope,u=t.context&&typeof t.context.globalScope=="object"&&t.context.globalScope||null,d=f||u||null;if(e.scope!==void 0||l){let h={};l&&Object.assign(h,l),e.scope!==void 0&&Object.assign(h,e.scope),t.scope=_d(h,d)}else d&&(t.scope=d);e.if!==void 0&&(t.if=e.if);let p=t.__ref,g=pU(t,p&&p.__runtimeSource);return p&&(p.__declaredArrays=g||void 0),_a(t),Z6(t,o,e,s),e}function c0(t,e,n){let r=t[e],o=ht.chains;if(o!==null&&o(t,e,r,n))return;let s=r&&n&&typeof r=="object"&&typeof n=="object"&&!Array.isArray(r)&&!Array.isArray(n);s&&e.charCodeAt(0)>=65&&e.charCodeAt(0)<=90?t[e]=Me(r,n):s&&K6.has(e)?t[e]={...r,...n}:s&&uP(e)?t[e]=Me(r,n):t[e]=n}var G6=new Set(["key","parent","context","__ref"]);function Y6(t,e){for(let r of Object.keys(t))G6.has(r)||delete t[r];let n=e.definition;if(!n.extends&&!n.extend&&typeof e.key=="string"){let r=t.context?.components||{},o=r[e.key]||r["smbls."+e.key];o&&(n={...n,extends:o})}xe(()=>pP(t,n,e.key,e.ownKey,t.parent,e.options))}function X6(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 l0(t,e,n){if(typeof t.onStateInit!="function"&&!Wx(t,"stateInit"))return;let r=t.state;t.state=e;try{Gt("StateInit",t,n)}finally{t.state=r}}var f0=t=>({isDataOnlyKey:e=>Lr(t).has(e)});function Z6(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&&!wt(t.state)?t.state:void 0;if(a==null){if(e?.state)t.state=e.state,ke(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,_)=>{p.has(y)||Do(u,y,l)&&(l[y]=_,p.add(y),En(u,y,_))},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])}wt(l)||l0(t,l,r),t.state=wt(l)?l:Hn(l,f0(t.context)),t.state.__element=t,t.state.root=t.state,ke(t,t.state),xi?.(c,t.state),Gt("StateCreated",t,r)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),ke(t,t.state);return}if(typeof a=="string"){if(t.state=gP(a,e),t.state&&typeof t.state=="object"&&!wt(t.state)){let c=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:c,enumerable:!1,configurable:!0,writable:!0})}ke(t,t.state),Q6(t,a,e),Gt("StateCreated",t,r);return}if(typeof a=="function"){let c=a(t,e?.state);if(wt(c))t.state=c;else{let l=c||{};l0(t,l,r),t.state=Hn(l,e?.state?void 0:f0(t.context))}}else if(wt(a))t.state=a;else{let c={...a};l0(t,c,r),t.state=Hn(c,e?.state?void 0:f0(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,ke(t,t.state),xi?.(a,t.state),Gt("StateCreated",t,r)}function RR(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 hP(t,e){let n=e.state;return t.startsWith("~/")?[n&&(n.root||n),t.slice(2)]:t.startsWith("../")?[n,t.slice(3)]:[n,t]}function gP(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")||t.startsWith("~/")){let[o,s]=hP(t,e);return s?RR(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let n=RR(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 J6(t,e){let[n,r]=hP(t,e);if(!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 Q6(t,e,n){let r=t.__ref;if(!r||!n||e==="."||!wt(n.state))return;r.__stateBinding&&r.__stateBinding.dispose();let o=xe(()=>z(()=>{let s=J6(e,n);!s||typeof s!="object"||s===t.state||xe(()=>mP(t,t.state,s,!0))},{depth:r.path?r.path.length:0,label:gt(r,"state")}));o._isStateBinding=!0,r.__stateBinding=o,r.__effects&&r.__effects.push(o)}function mP(t,e,n,r){let o=t.__ref;if(!o)return;if(r||t.state===e){t.state=n,r&&ke(t,n),DR(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&&mP(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,DR(o))}function PR(t,e){let n=t.__ifParked;if(!n||!n.size)return e;for(let r of n)e.includes(r)||e.push(r);return e}function DR(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 tU=new Set(["s","state","ctx","context"]),u0=new WeakMap;function eU(t){if(u0.has(t))return u0.get(t);let e=null;try{let n=typeof Oe=="function"?Oe(t):Function.prototype.toString.call(t);if(typeof n=="string"){let r=n.match(/^\s*(?:async\s+)?([A-Za-z_$][\w$]*)\s*=>/)||n.match(/^[^(]*\(([^)]*)\)/);r&&(e={params:r[1].split(",").map(o=>o.trim())})}}catch{}return u0.set(t,e),e}function nU(t){let e=eU(t);return e?e.params.map(n=>n.split("=")[0].trim()).filter(Boolean):[]}var rU=3,oU=/^(is|has)[A-Z0-9_$]/,sU=new Set(["routerOptions"]),LR=new WeakSet;function iU(t,e){if(typeof t!="function"||t.length!==2||e&&(oU.test(e)||sU.has(e))||LR.has(t))return!1;let n=nU(t);if(n.length<2)return!1;let r=n[1].replace(/[{}[\]]/g,"").trim();return r.length<rU||tU.has(r)?!1:(LR.add(t),!0)}function aU(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"||Ht.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Ke(a)||kt[a]||Nt&&Nt.has(a)||c!==45&&(Xe(n,a)||(tt()&&iU(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&&bt(r);try{return c(t,t.state,t.context)}catch{return}finally{r&&mt()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function cU(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 Ut(t,e,n){return!Array.isArray(e)||e.length===0?n:function(...r){return cU(t,e),n.apply(this,r)}}function Sa(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function gt(t,e){return()=>t.path.join(".")+"::"+e}var IR=new Set;function Jt(t,e,n){if(!tt())return;let r=gt(t,e)();IR.has(r)||(IR.add(r),console.warn(`[smbls] "${e}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,n?.message||n))}var MR=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,$R=new WeakMap,lU=t=>{let e=$R.get(t);if(e!==void 0)return e;e=null;let n;try{n=String(t)}catch{n=""}if(n.includes("{{")){MR.lastIndex=0;let r;for(;(r=MR.exec(n))!==null;)r[2].includes("{{")&&(e||(e=[])).push(r[2])}return $R.set(t,e),e},fU=(t,e)=>{let n=lU(t);if(n)for(let r=0;r<n.length;r++)e.add(n[r])},uU=(t,e)=>!Ke(t)&&!Jr(e,t),d0=(t,e,n,r,o)=>{if(typeof e=="string"){!o&&e.includes("{{")&&n.add(e);return}typeof e=="function"&&uU(t,r)&&fU(e,n)},w0=new WeakMap,zf=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Wf=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)?Me(t,e):t},qf=(t,e)=>t&&e?Me(t,e):t||e||null,yP=(t,e)=>{let n=t.__ref&&t.__ref.__runtimeSource;return!!n&&zf(n,e)},to=(t,e)=>yP(t,e)?Wf(t.__ref.__runtimeSource[e]):null,ys=(t,e)=>(e&&t&&typeof t=="object"&&w0.set(t,e),t),dU=t=>{if(!t||typeof t!="object")return;let e=w0.get(t);return e&&w0.delete(t),e},S0=(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++)S0(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&&S0(o.value,e,n)}}},pU=(t,e)=>{let n=null;for(let r of Object.keys(t)){if(Ht.has(r)||e&&zf(e,r))continue;let o=Object.getOwnPropertyDescriptor(t,r),s=o&&o.value;if(!Array.isArray(s))continue;let i=new Set;S0(s,i,new Set),i.size&&(n||(n=new Map),n.set(s,i))}return n},NR=(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}},bP=["attr","aria","data","metadata"],hU=t=>{if(bP.includes(t))return!0;let e=t.charCodeAt(0);return e===46||e===33||e===64},gU=(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&&zf(e,o);if(i&&typeof i=="object"&&!Array.isArray(i)){if(!hU(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||zf(l,u)),p=i[u];if(f&&p&&typeof p=="object"&&!Array.isArray(p)&&bP.includes(u)){for(let g in p)d0(g,p[g],n,r,d);continue}d0(u,p,n,r,d)}continue}d0(o,i,n,r,a)}return n};function _P(t,e){let n=t.__ref,r=!!(e&&e.skipIfEffect),o=gU(t,n.__runtimeSource);if(n.__authoredTemplates)for(let c of o)n.__authoredTemplates.add(c);else n.__authoredTemplates=o;if(aU(t),typeof t.text=="function"){let c=t.text,l=Ut(t,t.textDeps,c),f=z(()=>{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=Kt.call(t,u,t.state)),ds(t,u))}catch(u){Jt(n,"text",u)}},{depth:n.path.length,label:gt(n,"text")});n.__effects.push(f),n.__exec.text=c}else if(typeof t.text=="string"&&t.text.includes("{{")){let c=t.text,l=z(()=>{if(n.contentManaged)return;let f=Kt.call(t,c,t.state);f!=null&&(t.text=f),t.node&&ds(t,f??"")},{depth:n.path.length,label:gt(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"&&!Ht.has(c)&&!Ke(c)&&!n.__exec[c]&&!eg(s,c)){if(kt[c]){let l=t[c],f=Ut(t,t[c+"Deps"],l),u=c,d,p=null,g=null,h,m=z(()=>{let y=t.context?.designSystem;y&&bt(y);try{let _=f(t,t.state,t.context);zh();let S;try{S=kt[u](_,t,t.state,t.context)}finally{Wh()}if(Array.isArray(S)){let x={};for(let w of S)if(w)for(let b in w)x[b]=w[b];S=x}let v=u==="show"||u==="hide";if(S&&t.node&&bU(S)){let x=ka(S);if(x===null||x!==h){h=x;let w=Ie(S,null,t.context?.cssPrefix),b=w?w.split(" ").filter(Boolean):null;if(t.node.classList){if(g)for(let k of g)t.node.classList.remove(k);if(b&&b.length)for(let k of b)t.node.classList.add(k);g=b}}d=void 0,p=null}else if(S&&t.node){if(g){for(let w of g)t.node.classList.remove(w);g=null,h=void 0}let x=ka(S);if(x===null||x!==d||!Vf(t.node,p)){d=x;let w=BR(t,S);p=Uf(t.node,w)}}else t.node&&v&&(d=void 0,p=null,t.node.style.display="")}finally{y&&mt()}},{depth:n.path.length,label:gt(n,u)});n.__effects.push(m),n.__exec[c]=l}else if(Nt&&Nt.has(c)){let l=t[c],f=Ut(t,t[c+"Deps"],l),u=c,d,p=null,g=z(()=>{let h=t.context?.designSystem;h&&bt(h);try{let m=f(t,t.state,t.context);if(t.node)if(m!=null){let y=u+":"+String(m);if(y!==d||!Vf(t.node,p)){d=y;let _={[u]:m},S=BR(t,_);p=Uf(t.node,S)}}else d=void 0,p=null,t.node.style[u]=""}finally{h&&mt()}},{depth:n.path.length,label:gt(n,u)});n.__effects.push(g),n.__exec[c]=l}else if(c.charCodeAt(0)===45){let l=t[c];EP(t,c,l,t[c+"Deps"],c),n.__exec[c]=l}}if(_U(t),typeof t.html=="function"){let c=t.html,l=Ut(t,t.htmlDeps,c),f=z(()=>{Ge(t,()=>{let u=l(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&(t.node.innerHTML=u)})},{depth:n.path.length,label:gt(n,"html")});n.__effects.push(f),n.__exec.html=c}if(typeof t.value=="function"){let c=t.value,l=Ut(t,t.valueDeps,c),f=z(()=>{try{let u=l(t,t.state,t.context);typeof u=="string"&&u.includes("{{")&&(u=Kt.call(t,u,t.state)),jR(t,u)}catch(u){Jt(n,"value",u)}},{depth:n.path.length,label:gt(n,"value")});n.__effects.push(f),n.__exec.value=c}else if(typeof t.value=="string"&&t.value.includes("{{")){let c=t.value,l=z(()=>{try{jR(t,Kt.call(t,c,t.state))}catch(f){Jt(n,"value",f)}},{depth:n.path.length,label:gt(n,"value")});n.__effects.push(l),n.__exec.value=c}if(typeof t.style=="function"){let c=t.style,l=Ut(t,t.styleDeps,c),f,u=null,d,p,g,h,m=z(()=>{let y=l(t,t.state,t.context),_=t.context&&t.context.designSystem,S;if(y&&typeof y=="object"&&y===d&&_===g){let x=ka(y);S=x!==null&&x===p?h:hs(t,y),p=x}else S=hs(t,y),p=void 0;d=y,g=_,h=S;let v=ka(S);(v===null||v!==f||!Vf(t.node,u))&&(f=v,x0(t.node,u,S),eo(t.node,S),u=Uf(t.node,S))},{depth:n.path.length,label:gt(n,"style")});n.__effects.push(m),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=Ut(t,Sa(t.styleDeps,c),l),u,d=null,p=z(()=>{try{let g=f(t,t.state,t.context);if(t.node){let h=c+":"+String(g);if(h!==u||!Vf(t.node,d)){u=h;let m=hs(t,{[c]:g});x0(t.node,d,Object.assign({},m,{[c]:""})),eo(t.node,m),d=Uf(t.node,m)}}}catch(g){Jt(n,"style."+c,g)}},{depth:n.path.length,label:gt(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=Ut(t,Sa(t.attrDeps,c),t.attr[c]),f=c,u=z(()=>{try{let d=l(t,t.state,t.context);typeof d=="string"&&d.includes("{{")&&(d=Kt.call(t,d,t.state)),t.node?.setAttribute&&ps(t.node,f,d)}catch(d){Jt(n,"attr."+f,d)}},{depth:n.path.length,label:gt(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=z(()=>{try{let d=Kt.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(f,jn(f,d??""))}catch(d){Jt(n,"attr."+f,d)}},{depth:n.path.length,label:gt(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=z(()=>{try{let m=Kt.call(t,p,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(g,jn(g,m??""))}catch(m){Jt(n,"aria."+c,m)}},{depth:n.path.length,label:gt(n,"aria."+c)});h._attrName=g,n.__effects.push(h);continue}if(typeof l!="function")continue;let f=Ut(t,Sa(t.ariaDeps,c),t.aria[c]),u="aria-"+c.replace(/[A-Z]/g,p=>"-"+p.toLowerCase()),d=z(()=>{try{let p=f(t,t.state,t.context);if(!t.node?.setAttribute)return;ps(t.node,u,p)}catch(p){Jt(n,"aria."+c,p)}},{depth:n.path.length,label:gt(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=z(()=>{try{let y=Kt.call(t,g,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(h,y??"")}catch(y){Jt(n,"data."+c,y)}},{depth:n.path.length,label:gt(n,"data."+c)});m._attrName=h,n.__effects.push(m);continue}if(typeof l!="function")continue;let f=Ut(t,Sa(t.dataDeps,c),t.data[c]),d="data-"+c.replace(/[A-Z]/g,g=>"-"+g.toLowerCase()),p=z(()=>{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){Jt(n,"data."+c,g)}},{depth:n.path.length,label:gt(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=Ut(t,Sa(t.classDeps,c),i[c]),f=z(()=>{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){Jt(n,"class."+c,u)}},{depth:n.path.length,label:gt(n,"class."+c)});n.__effects.push(f)}!r&&typeof t.if=="function"&&SP(t,n,t.if);for(let c of Object.keys(t)){if(Ht.has(c)||typeof t[c]!="function")continue;let l=c.charCodeAt(0);if(l>=65&&l<=90||Ke(c))continue;let f=t[c];n.__exec[c]=f;let u=t.tag||"div";if(Xe(u,c)&&!Jr(u,c)){let d=ur(c)||c,p=Ut(t,t[c+"Deps"],f),g=z(()=>{try{let h=p(t,t.state,t.context);typeof h=="string"&&h.includes("{{")&&(h=Kt.call(t,h,t.state)),t.node?.setAttribute&&ps(t.node,d,h,!0)}catch(h){Jt(n,c,h)}},{depth:n.path.length,label:gt(n,c)});g._attrName=d.toLowerCase(),n.__effects.push(g)}}let a=t.tag||"div";for(let c of Object.keys(t)){if(Ht.has(c))continue;let l=t[c];if(typeof l!="string"||!l.includes("{{"))continue;let f=c.charCodeAt(0);if(f>=65&&f<=90||Ke(c)||Jr(a,c)||gs[c]||!Xe(a,c))continue;let u=ur(c)||c,d=z(()=>{try{let p=Kt.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,jn(u,p??""))}catch(p){Jt(n,c,p)}},{depth:n.path.length,label:gt(n,c)});d._attrName=u.toLowerCase(),n.__effects.push(d)}if(AU(t),$U(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let c=t.onStateUpdate,l=t.stateDeps,f=!1,u=[],d=z(()=>{let p=[];for(let m=0;m<l.length;m++){let y=l[m];try{p[m]=typeof y=="function"?y(t,t.state,t.context):t.state?.[y]}catch{p[m]=void 0}}if(!f){f=!0,u=p;return}let g=p.length!==u.length;for(let m=0;!g&&m<p.length;m++)p[m]!==u[m]&&(g=!0);let h=u;u=p,g&&Ge(t,()=>{try{c(t,t.state,t.context,{prev:h,next:p})}catch(m){if(Ye(t,"onStateUpdate",m),t.context?.strictMode)throw m}})},{depth:n.path.length,label:gt(n,"onStateUpdate")});n.__effects.push(d)}RU(t)}function FR(t){let e=t.parent,n=e?.node;if(!n||!t.node){ig(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),Nh()}function wP(t){xP(t),BU(t),PP(t),JU(t),ZU(t)}function SP(t,e,n){let r=Ut(t,t.ifDeps,n),o=z(()=>{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,Y6(t,s),r=Ut(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=Xr(t)),t.node&&(t.node.ref=t),FR(t),xP(t),PP(t),Gt("Render",t,{}),_0(t,{});else{e.__ifInitialized=!0,e.__ifLateMerge=null,t.tag||(t.tag=Mn(t)),Gt("Init",t,{});let c=ht.hydration;if(t.node||(t.node=c!==null&&c.adopt(t)||Xr(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.parent?.__ref?.__ifParked&&t.parent.__ref.__ifParked.delete(t.key),t.tag==="fragment"&&!e.__fragmentAnchor){let f=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(f),e.__fragmentAnchor=f}Gt("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),$P(t,{}),_P(t,{skipIfEffect:!0}),wP(t),FP(t,{}),FR(t),Gt("Create",t,{}),Gt("Complete",t,{}),Gt("Render",t,{}),Gt("RenderRouter",t,{}),_0(t,{})}},{depth:e.path.length,label:gt(e,"if")});e.__effects.push(o)}function ds(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 mU(t,e){return e!=="checked"||!t||t.tagName!=="INPUT"?null:t.hasAttribute("checked")}function yU(t,e){if(e===null)return;let n=t.hasAttribute("checked");n!==e&&t.checked!==n&&(t.checked=n)}function ps(t,e,n,r){n==null||n===!1&&!ms(e)?sg(t,e,null):typeof n=="function"||typeof n=="object"||(r&&e==="src"&&"src"in t?t.src=n:sg(t,e,jn(e,n)))}function sg(t,e,n){let r=mU(t,e);n==null?t.removeAttribute(e):t.setAttribute(e,n),yU(t,r)}function jR(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 xP(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&ds(t,t.text),LP(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}eo(e,hs(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&&!ms(n)||e.setAttribute&&e.setAttribute(n,jn(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 ka(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function bU(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 Uf(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=dr(o);r.push(i,C0(n,i),kP(n,i))}return r}function C0(t,e){return typeof t.getPropertyValue=="function"?t.getPropertyValue(e):""}function kP(t,e){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(e):""}function dr(t){return fs(t)}function x0(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(dr(s));for(let s=0;s<e.length;s+=3){let i=e[s];o.has(i)||C0(r,i)===e[s+1]&&typeof r.removeProperty=="function"&&r.removeProperty(i)}}function Vf(t,e){if(!e||!t||!t.style)return!1;let n=t.style;for(let r=0;r<e.length;r+=3)if(C0(n,e[r])!==e[r+1]||kP(n,e[r])!==e[r+2])return!1;return!0}var Kf=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,vP=t=>typeof t=="number"||t===!0||typeof t=="string"&&t!=="",fg=t=>Kf(t)?t:"--"+t;function ug(t,e){if(!no(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)}vP(o)&&(n||(n={}),n[fg(r)]=o)}return n}function EP(t,e,n,r,o){AP(t,o,Ut(t,r,n),s=>vP(s)?{[e]:s}:null)}function AP(t,e,n,r,o){let s=t.__ref,i,a=null,c=z(()=>{Ge(t,()=>{try{let l=r(n(t,t.state,t.context)),f=t.node;if(!f||!f.style)return;let u=ka(l);(u===null||u!==i||!Vf(f,a))&&(i=u,x0(f,a,l),l&&eo(f,l),a=l?Uf(f,l):null,o&&o(l))}catch(l){Jt(s,e,l)}})},{depth:s.path.length,label:gt(s,e)});s.__effects.push(c)}function _U(t){let e=t.__ref,n=t.vars;if(typeof n=="function"){wU(t,n),e.__exec.vars=n;return}if(no(n))for(let r of Object.keys(n)){let o=n[r];!r||typeof o!="function"||EP(t,fg(r),o,Sa(t.varsDeps,r),"vars."+r)}}function wU(t,e){let n=t.__ref;AP(t,"vars",Ut(t,t.varsDeps,e),r=>ug(r),r=>{n.__varsInline=r?new Set(Object.keys(r)):null})}function k0(t,e){if(typeof t[e]=="function"&&(Jr(t.tag||"div",e)||e.charCodeAt(0)===45))return!0;if(!Kf(e))return!1;let n=t.vars;if(typeof n=="function"){let r=t.__ref&&t.__ref.__varsInline;return!!(r&&r.has(e))}if(!no(n))return!1;for(let r of Object.keys(n))if(typeof n[r]=="function"&&fg(r)===e)return!0;return!1}function SU(t){let e=null;for(let n in t)t[n]!=null&&n.charAt(0)!=="&"&&(e||(e=new Set),e.add(dr(n)));return e}function xU(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=dr(i);ls[c]&&(s||(s={}),s[c]=a)}o.__declaredLonghands=s}function CP(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=ls[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 BR(t,e){let n=t.node;eo(n,e);let r=SU(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=CP(t,r);return s?(eo(n,s),Object.assign({},e,s)):e}function kU(t){let e=t.__ref;if(!e||!e.__inlineCssKeys||!e.__declaredLonghands)return;let n=CP(t,e.__inlineCssKeys);n&&eo(t.node,n)}function hs(t,e){return!e||typeof e!="object"?e:Ge(t,()=>{try{return Vx(e,t)}catch{return e}})}function eo(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);if(typeof o=="object"&&s==="[object Object]")continue;let i=fs(r),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,c?"important":"")}catch{}}}n&&vU(t,n)}function vU(t,e){let n=`_ds${iP.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+=`${dr(m)}: ${p[m]};`;u+=ar(`${g} { ${h} }`,g)+`
|
|
60
|
+
`}else f+=`${dr(d)}: ${p};`}f&&(s+=ar(`${c} { ${f} }`,c)+`
|
|
61
|
+
`),u&&(s+=u)}}s&&(o.textContent+=s)}var UR=new Set;function VR(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 EU(t,e,n){let r=VR(n);queueMicrotask(()=>{if(!t.__ref)return;let o;try{o=e(t,t.state,t.context)}catch{return}if(VR(o)===r)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";UR.has(s)||(UR.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 core.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 AU(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&&tt()&&EU(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=z(()=>{let d=t.state&&(wt(t.state)?t.state.root:null);if(!d||!wt(d))return;let p=d;p=p[c];for(let h=0;h<l.length&&!(p==null||typeof p!="object");h++)if(wt(p))p=p[l[h]];else break;if(!f.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"&&Ge(t,()=>{try{if(Jh(o)){let h=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});h&&typeof h.then=="function"?h.then(()=>Nn(o,!1),m=>{Nn(o,!0),$n("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}):(Nn(o,!1),h===!1&&(g=!0))}}catch(h){Nn(o,!0),$n("error",t,{hook:"onBeforeUpdate",error:h})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",h)}}),!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()}!g&&typeof t.onUpdate=="function"&&Ge(t,()=>{try{t.onUpdate(t,t.state,t.context)}catch(h){$n("error",t,{hook:"onUpdate",error:h})||console.error("[DOMQL] subscribeTo onUpdate error:",h)}})},{depth:o.path.length,label:gt(o,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,o.__effects.push(u)}}function T0(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 O0(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 HR=new Set;function CU(t,e){let n=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",r=n+"::"+t;HR.has(r)||(HR.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 zR=new Map;function TU(t){let e=zR.get(t);if(e)return e;e=[];let n=r=>{if(r)for(let o of r)e.push($f(o))};return n(ls[t]),n(Gh[t]),zR.set(t,e),e}function WR(t,e,n){if(k0(t,e)||n&&n.has(e))return!0;let r=TU(dr(e));for(let o=0;o<r.length;o++){let s=r[o];if(k0(t,s)||n&&n.has(s))return!0}return!1}function Ta(t,e,n,r){let o={},s=new Set,i=(a,c,l)=>{let f=l?new Set(Object.keys(o)):null;if(kt[a]){let u=kt[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,WR(e,u,r))}continue}if(a==="vars"){let u=ug(c,e);if(u)for(let d in u)i(d,u[d],k0(e,d)||!!(r&&r.has(d)));continue}if(T0(a,e)){let u=Ta(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)){tt()&&CU(a,e);continue}let l=O0(a,e),f=Ta(c,e,!1,r);Object.keys(f).length&&(o[l]=f);continue}i(a,c,WR(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 no=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function TP(t,e){for(let n in e){let r=e[n];t[n]=no(r)?TP(no(t[n])?t[n]:{},r):r}return t}function OU(t,e){if(!no(e))return;let n;for(let r of t.split(" ")){let o=r?e[r]:null;no(o)&&(n=TP(n||{},o))}return n}function R0(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)&&R0(t[n],e+1))return!0}return!1}function OP(t,e,n){if(!e||typeof e!="object"||Array.isArray(e))return null;if(T0(t,n)){let s=Ta(e,n,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let r=O0(t,n),o=Ta(e,n,!1);return Object.keys(o).length?{cssProp:r,block:o}:null}function RU(t){let e=t.__ref;for(let n of Object.keys(t)){if(!uP(n))continue;let r=t[n];if(!r||typeof r!="object"||Array.isArray(r)||!R0(r))continue;let o=null,s,i=z(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&bt(a);let c,l=!1;try{let f=OP(n,r,t),u=f?ka(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=Ie({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&mt()}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:gt(e,"cssBlock("+n+")")});e.__effects.push(i)}}var PU=()=>!0,DU=(t,e)=>{let n=t.charAt(0);return(n===":"||n==="@"||n==="&"||n==="[")&&e&&typeof e=="object"&&!Array.isArray(e)?!0:!!kt[t]||!!(Nt&&Nt.has(t))||Kf(t)||t==="vars"};function LU(t,e,n){let r={},o=!1;for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&(a!=="data"&&a!=="aria"&&(DU(a,n[a])||Ht.has(a))?r[a]=!0:o=!0);if(!o)return null;let s=a0({[e]:n},t.tag||"div",r,PU),i=null;for(let a in s)/^on/i.test(a)||(i||(i={}),i[a]=s[a]);return i}function qR(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(g){Jt(t.__ref,"conditional("+n+")."+l,g),u&&c(l);continue}if(typeof d=="string"&&d.includes("{{")&&(d=Kt.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&&RP(i,e,l);continue}let p=d===!1&&!ms(l)?null:String(jn(l,d));c(l),!(u&&p===e.written.get(l))&&(f===void 0&&e.base.set(l,i.getAttribute(l)),sg(i,l,p),e.owners.set(l,n),e.written.set(l,p))}o.appliedAttrs=a}function RP(t,e,n){t.getAttribute(n)===e.written.get(n)&&sg(t,n,e.base.get(n)),e.owners.delete(n),e.base.delete(n),e.written.delete(n)}function IU(t,e,n,r){let o=r.appliedAttrs;if(r.appliedAttrs=null,!!o)for(let s of o)e.owners.get(s)===n&&RP(t.node,e,s)}function PP(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))}}var p0,MU=()=>p0===void 0?p0=tt():p0;function KR(t,e){let n=bd;typeof n=="function"?t.untrackedReads+=n(e):e()}function $U(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,probe:!1,untrackedReads:0},f=LU(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),_=a[m];if(!((y===":"||y==="@"||y==="&"||y==="[")&&_&&typeof _=="object"&&!Array.isArray(_))){if(m==="vars"&&no(_)){for(let S of Object.keys(_))S&&u.add(fg(S));continue}u.add(m)}}let d=()=>{let m,y=l.probe,_;if(y?KR(l,()=>{_=t[i]}):_=t[i],_===void 0){let x=!!t.state&&i in t.state,w=t.state?t.state[i]:void 0;if(x||w!==void 0)m=w;else{let b=t.context?.cases?.[i];if(b===void 0)return;try{m=typeof b=="function"?b.call(t,t):b}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 _=="function")try{y?KR(l,()=>{m=_(t,t.state,t.context)}):m=_(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&&(l.probe=!1);let S=c?!m:!!m;if(!t.node)return;let v=t.context?.designSystem;if(S===l.lastMatch){if(S&&f&&t.node.setAttribute){v&&bt(v);try{qR(t,n,o,f,l,!1)}finally{v&&mt()}}return}l.lastMatch=S,v&&bt(v);try{if(S){let x={},w={},b=!1;for(let C in a){if(!Object.prototype.hasOwnProperty.call(a,C))continue;let D=a[C],R=C.charAt(0);if((R===":"||R==="@"||R==="&"||R==="[")&&D&&typeof D=="object"&&!Array.isArray(D)){if(T0(C,t)){let N=Ta(D,t,!1,u);Object.keys(N).length&&(w[`[data-theme="${C.slice(1)}"] &`]=N,b=!0)}else{let N=O0(C,t),B=Ta(D,t,!1,u);Object.keys(B).length&&(w[N]=B,b=!0)}continue}let $=typeof D=="function"?D(t,t.state,t.context):D;if($!=null){if(kt[C]){let N=kt[C]($,t,t.state,t.context);if(N){let B=Array.isArray(N)?N:[N];for(let et of B)et&&Object.assign(x,et)}}else if(Nt&&Nt.has(C))x[C]=$;else if(Kf(C))x[C]=$;else if(C==="vars"){let N=ug($,t);N&&Object.assign(x,N)}}}let k=Object.keys(x);if(k.length){eo(t.node,x);for(let C of k)r.set(C,o);l.appliedKeys=k}else l.appliedKeys=null;if(b){let C=Ie(w,null,t.context?.cssPrefix,{state:!0}),D=C?C.split(" ").filter(Boolean):[];if(D.length&&t.node.classList){for(let R of D)t.node.classList.add(R);l.appliedClasses=D}else l.appliedClasses=null}else if(l.appliedClasses){for(let C of l.appliedClasses)t.node.classList.remove(C);l.appliedClasses=null}f&&t.node.setAttribute&&qR(t,n,o,f,l,!0)}else{if(l.appliedAttrs&&IU(t,n,o,l),l.appliedKeys){for(let x of l.appliedKeys)r.get(x)===o&&(Kf(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{v&&mt()}};e.__conditionalRunners.push(d);let p=t[i+"Deps"],g=Ut(t,p,d);MU()&&typeof(e.__exec&&e.__exec[i]||t[i])=="function"&&!(Array.isArray(p)&&p.length===0)&&(l.probe=!0);let h=z(g,{depth:e.path.length,label:gt(e,"conditional("+o+")")});l.probe&&(l.probe=!1),l.untrackedReads>0&&h._sources.size===0&&console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} subscribed to nothing \u2014 its predicate read state on its first run without subscribing to it (\`in\`, Object.keys, a \`__\` key, parse()), so no state write will ever re-evaluate it (only a direct element.update() on this element re-runs it). Declare \`${i}Deps: [...]\` (state-key strings or \`(el, s) => \u2026\` selectors) so the subscription is armed unconditionally, or \`${i}Deps: []\` when it is static on purpose.`),e.__effects.push(h)}}var h0=new WeakSet,g0=new WeakMap;function NU(t){let e=g0.get(t);if(e==="painted")return!1;if(e===void 0){g0.set(t,"open");let n=t.defaultView,r=()=>{g0.set(t,"painted")};n&&typeof n.requestAnimationFrame=="function"?n.requestAnimationFrame(r):setTimeout(r,0)}return!0}function FU(t){let e=t.ownerDocument;!e||h0.has(e)||NU(e)||(h0.add(e),queueMicrotask(()=>{h0.delete(e);let n=e.body||e.documentElement;n&&n.offsetWidth}))}var m0=new WeakSet,GR=!1;function YR(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function v0(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"?v0(s,o):o}return n}function DP(t,e){let n={};for(let r in t){let o=t[r];if(o&&typeof o=="object"){let s=DP(o,e);Object.keys(s).length&&(n[r]=s)}else e(r)||(n[r]=o)}return n}function XR(t,e,n){let r=P0(t);if(!r)return!1;for(let o=0;o<r.length;o+=3){let s=r[o+1];if(!n.has(s))continue;let i=e[s];if(!(i==null||typeof i=="object")&&KO(r[o],i,r[o+2]))return!0}return!1}function jU(t,e,n){let r=1/0,o=-1/0;for(let i of e.values())i<r&&(r=i),i>o&&(o=i);if(n)for(let i of n.values())i>o&&(o=i);if(o<=r)return null;let s=null;for(let[i,a]of e){if(a===o)continue;let c=P0(i);if(c)for(let l=0;l<c.length;l+=3){let f=c[l],u=c[l+1],d=c[l+2],p=t[u]!=null?e.get(u):void 0,g=n&&n.get(f),h=p!==void 0&&p>a&&Yh(f,t[u],d),m=!h&&g!==void 0&&g>a&&Yh(f,void 0,d);if(h||m){h&&delete t[i],s||(s=new Set),s.add(i);break}}}return s}var ZR=new Map;function P0(t){let e=ZR.get(t);if(e!==void 0)return e;let n=dr(t),r=ls[n];if(e=null,Array.isArray(r)){e=[];for(let o of r)e.push(o,$f(o),n)}return ZR.set(t,e),e}function LP(t){let{node:e}=t;if(!e)return;if(GR||(GR=!0,Ie({display:"none"})),m0.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}m0.add(t);let n=t.context?.designSystem;n&&bt(n),zh();try{let r={},o=!1,s=[],i=null,a=null,c=null,l=null,f=t.__ref&&t.__ref.__mergeLayer,u,d=null,p=null,g=(v,x)=>{if(x&&typeof x=="object"&&YR(v)){c||(c={});let w=c[v];w&&(x=v0(w,x)),c[v]=x}else(x===null||typeof x!="object")&&(l||(l=new Set),l.add(v),u!==void 0&&(d||(d=new Map),d.set(v,u)));r[v]=x};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&kt.theme){let v=kt.theme(t.theme,t,t.state,t.context);if(v){let x=w=>{for(let b in w){let k=w[b];k&&typeof k=="object"?YR(b)&&(i||(i={}),i[b]=k):P0(b)&&(a||(a=[])).push(b),r[b]=k}};if(Array.isArray(v))for(let w of v)w&&x(w);else x(v);o=!0}}let h=(v,x)=>{if(v==="vars"){let w=ug(x);if(w){for(let b in w)g(b,w[b]);o=!0}return}if(kt[v]){let w=kt[v](x,t,t.state,t.context);if(w){if(Array.isArray(w)){for(let b of w)if(b)for(let k in b)g(k,b[k])}else for(let b in w)g(b,w[b]);o=!0}}else if(Nt&&Nt.has(v))x!=null&&typeof x!="object"&&(g(v,x),o=!0);else if(v.charCodeAt(0)===45)x!=null&&typeof x!="object"&&(g(v,x),o=!0);else if((v.charAt(0)==="&"||v.charAt(0)==="@"||v.charAt(0)===":"||v.charAt(0)==="[")&&x&&typeof x=="object"&&!Array.isArray(x)){if(R0(x))return;let w=OP(v,x,t);w&&(g(w.cssProp,w.block),o=!0)}};if(typeof t.class=="string"){let v=OU(t.class,t.context?.designSystem?.class);if(v)for(let x in v)h(x,v[x])}let m=l?new Set(l):null,y=t.tag||"div";for(let v of Object.keys(t)){if(typeof t[v]=="function"){let w=f&&f.get(v);w!==void 0&&Jr(y,v)&&(p||(p=new Map),p.set(dr(v),w));continue}if(u=f?f.get(v):void 0,v==="vars"){h(v,t[v]);continue}if(Ht.has(v)||v==="theme")continue;let x=v.charCodeAt(0);x>=65&&x<=90||Ke(v)||eg(y,v)||h(v,t[v])}u=void 0;let _=d?jU(r,d,p):null;if(a&&l)for(let v of a)l.has(v)||!(v in r)||XR(v,r,l)&&delete r[v];if(i){let v=l?x=>l.has(x)||XR(x,r,l):null;for(let x in i){let w=v?DP(i[x],v):i[x];c&&c[x]&&(w=v0(w,c[x])),Object.keys(w).length?r[x]=w:delete r[x]}}if(xU(t,r,l,_?new Set([...m||[],..._]):m),o){r.display&&String(r.display).includes("!important")&&(e.style.setProperty("display",String(r.display).replace(/\s*!important\s*$/,""),"important"),delete r.display);let v=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;typeof v=="string"&&v!==""&&r.display&&r.display!==v&&(r.display=v);let x=Ie(r,null,t.context?.cssPrefix);if(s=x?x.split(" ").filter(Boolean):[],x&&e.classList){let w=s,b=!1;for(let k of w)e.classList.add(k),b||(k.charCodeAt(0)===95&&k.charCodeAt(1)===99||k.charCodeAt(0)===95&&k.indexOf("_c",1)!==-1)&&(b=!0);b&&FU(e)}}let S=t.__ref;if(S){let v=S.__staticCssClasses;if(v&&e.classList){let x=new Set(s);for(let w of v)x.has(w)||e.classList.remove(w)}S.__staticCssClasses=s}kU(t)}finally{Wh(),n&&mt(),m0.delete(t)}}var qx=t=>!!kt[t]||!!(Nt&&Nt.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function Kx(t){t&&t.node&&LP(t)}function BU(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,jn(i,s))}let n=i0(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"||Ht.has(o)||o==="on"||n[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!Ke(o)&&!Jr(r,o)&&Xe(r,o)){let i=t[o];if(i==null)continue;if(typeof i=="string"&&i.includes("{{")){if(!gs[o])continue;i=Kt.call(t,i,t.state)}if(i==null||typeof i=="function"||typeof i=="object"||i===!1&&!ms(ur(o)||o))continue;let a=ur(o)||o;e.setAttribute(a,jn(a,i))}}}function Gx(t,e){let{node:n}=t;if(!n||!n.setAttribute)return;let r=e.charCodeAt(0);if(r>=65&&r<=90||Ke(e))return;let o=t.tag||"div";if(Jr(o,e)||!Xe(o,e))return;let s=ur(e)||e,i=s.toLowerCase(),a=t.__ref&&t.__ref.__effects,c=!1;if(a)for(let u=0;u<a.length;u++){let d=a[u];d&&d._attrName===i&&!d._disposed&&typeof d._execute=="function"&&(c=!0,d._execute())}if(c)return;let l=t[e],f=gs[e];if(f&&l!=null){let u=f(t);u!==void 0&&(l=u)}typeof l=="string"&&l.includes("{{")&&(l=Kt.call(t,l,t.state)),ps(n,s,l)}function UU(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{}QR(o),Qr.delete(t),n.style.height="",o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""),eP(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){Gf(t,!0);return}if(!(n.scrollHeight>0)){o.awaitingLayout=!0,JR(t,o);return}o.awaitingLayout=!1;let i=zU(n),a=WU(i),c=n.style.height;n.style.height="0px",a&&y0(n);let l=n.scrollHeight;if(!(l>0)){n.style.height=c,a&&y0(n);return}let f=qU(n,i),u=f!=null&&l<f?f:l,d=YU(i),p=d!=null&&u>d;n.style.height=GU(p?d:u,i)+"px",a&&y0(n),eP(n,o,p),o.lastMeasure=l,o.lastWidth=n.clientWidth,JR(t,o)}},r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{try{n.removeEventListener("input",o.resize)}catch{}QR(o),Qr.delete(t)})),o.active||(n.addEventListener("input",o.resize),o.active=!0,HU(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 Gf(t,e){let n=t.__ref?.__autoGrow;n&&(e&&(n.attachAttempts=0,n.firstAttemptAt=null),Qr.add(t),Yf())}function VU(){let t=Array.from(Qr);Qr.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=Ca()),o.attachAttempts+=1,o.attachAttempts<=lP&&Ca()-o.firstAttemptAt<fP&&(Qr.add(n),Yf());continue}o.attachAttempts=0,o.firstAttemptAt=null,o.resize()}}}function JR(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,Gf(t,!0);return}let a=n.clientWidth;e.lastWidth!=null&&Math.abs(a-e.lastWidth)<.5||(e.lastWidth=a,Gf(t,!0))},i;try{i=new o(s),i.observe(n)}catch{return}e.watch=i}function QR(t){let e=t.watch;if(e){t.watch=null;try{e.disconnect()}catch{}}}function HU(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&&Gf(t,!0)},()=>{})}function zU(t){let e=t.ownerDocument&&t.ownerDocument.defaultView;try{return e&&e.getComputedStyle?e.getComputedStyle(t):null}catch{return null}}var bs=t=>typeof t=="string"&&/^\s*-?\d*\.?\d+px\s*$/.test(t)?parseFloat(t):null,D0=t=>(bs(t.paddingTop)||0)+(bs(t.paddingBottom)||0),IP=t=>(bs(t.borderTopWidth)||0)+(bs(t.borderBottomWidth)||0);function WU(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 y0(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 qU(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=bs(e.lineHeight)||KU(t,e);return r>0?n*r+D0(e):null}var Bf=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontFamily","lineHeight","letterSpacing"],tP=new WeakMap;function KU(t,e){let n=t.ownerDocument,r=n&&(n.body||n.documentElement);if(!r||!n.createElement)return null;let o=tP.get(n);o||(o=new Map,tP.set(n,o));let s=Bf.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<Bf.length;l++)e[Bf[l]]&&(a[Bf[l]]=e[Bf[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 GU(t,e){return e?e.boxSizing==="border-box"?t+IP(e):e.boxSizing==="content-box"?Math.max(0,t-D0(e)):t:t}function YU(t){if(!t)return null;let e=bs(t.maxHeight);if(e==null||!(e>0))return null;let n=D0(t),r=IP(t),o=t.boxSizing==="border-box"?e-r:e+n,s=bs(t.lineHeight);if(!(s>0))return o;let i=Math.floor((o-n)/s+1e-6);return i>=1?i*s+n:o}function eP(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 nP=["srcObject","muted"],XU=(t,e)=>t==="muted"?e===!0||e===""||e==="true"||e==="muted":e??null;function ZU(t){let e=t.node,n=t.__ref;if(!(!e||!n))for(let r=0;r<nP.length;r++){let o=nP[r],s=t[o];if(s===void 0||!(o in e))continue;let i=a=>{let c=XU(o,a);if(e[o]!==c)try{e[o]=c}catch(l){Jt(n,o,l)}};if(typeof s=="function"){let a=Ut(t,t[o+"Deps"],s),c=z(()=>{try{i(a(t,t.state,t.context))}catch(l){Jt(n,o,l)}},{depth:n.path.length,label:gt(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 JU(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"?Ut(t,t.autoGrowDeps,r):null,s=z(()=>{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}UU(t,a)},{depth:n.path.length,label:gt(n,"autoGrow")});n.__effects||(n.__effects=[]),n.__effects.push(s),o&&(n.__exec.autoGrow=r)}var MP=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function $P(t,e){let n=!1;for(let r of Object.keys(t)){if(!Ke(r)||MP.has(r))continue;if(r==="onInView"||r==="onLeaveView"){n=!0;continue}let o=Bh(r);if(o){Uh(o,t,t[r]);continue}let s=t[r],i=null;if(s&&typeof s=="object"&&!Array.isArray(s)&&(i=s,s=i.handler),s=Df(t,s),typeof s!="function")continue;let a=Fh(r);Ln.has(a)||fa(z6(a),t,s,i)}QU(t),n&&ht.viewEvents&&ht.viewEvents(t)}function QU(t){let e=t.node;if(!e||!e.addEventListener)return;let n={},r=!1;for(let d of MP){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),_=Math.abs(h);if(Math.max(y,_)<o)return;let S;if(y>_*1.2)S=g<0?"left":"right";else if(_>y*1.2)S=h<0?"up":"down";else return;let v="onSwipe"+S.charAt(0).toUpperCase()+S.slice(1),x=n[v],w=n.onSwipe;x&&x.call(t,d,t,t.state,t.context),w&&w.call(t,{direction:S,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 L0(t,e,n,r,o,s,i,a){let c=e;(typeof c=="string"||typeof c=="number")&&(c={text:c});let l=r;if(typeof r=="function")try{l=r(t,c)}catch{l=null}let f=typeof r=="function"?Wf(l):o;if(a&&!i&&(f=qf(f,Wf(e))),i){let u=e;(typeof e=="string"||typeof e=="number")&&(u={value:e,text:e}),c=l?{...l,state:u}:{state:u}}else l&&(c=Me(l,c));return c=Zf(c,s),{def:c,key:dP(c?.key,e,n,t),supplied:f,props:l}}function Zf(t,e){if(!e||!t||t.ignoreChildExtends)return t;if(!t.extends)return{...t,extends:e};let n=Array.isArray(t.extends)?t.extends:[t.extends],r=Array.isArray(e)?e:[e];return{...t,extends:[...r,...n]}}var ro=t=>{let e=t&&t.__ref;if(!e||e.__if===!1)return null;let n=t.node;return n&&n.nodeType!==11?n:null},NP=(t,e)=>e?e.nextSibling:Zh(t.node,t.__ref.__textNode),dg=(t,e,n)=>{let r=NP(t,n);return e!==r&&t.node.insertBefore(e,r),e},Jf=(t,e)=>{let n=NP(t,e);return n?{position:"before",node:n}:void 0};function I0(t,e,n){let r=null;for(let o=0;o<e.length;o++){if(n&&n.has(e[o]))continue;let s=ro(t[e[o]]);s&&(r=dg(t,s,r))}}function rP(t,e,n,r){let o=ht.rows,s=o!==null&&t.childrenAs!=="state"&&t.tag!=="fragment"?o.track(t):null,i=M0(t,e,n,r,!0,s);return t.__ref.__plainRows=s&&(i||e==null||e===!1)?s:null,i}function M0(t,e,n,r,o,s){if(!e||!t.node)return;let i=t.childExtends,a=to(t,"childProps"),c=t.__ref,l=ht.mount,f=r>0&&t.tag!=="fragment"&&c?r:0;if(Array.isArray(e)){let u=t.childProps,d=t.childrenAs==="state",p=(g,h)=>{let m=L0(t,e[g],g,u,a,i,d,o);s&&s.add(m.key,e[g],m,u,i);try{let y=zt(ys(m.def,m.supplied),t,m.key,n,h);return!y&&s&&s.none(m.key),og(t,y),y}catch(y){if(s&&s.failed(m.key),typeof console<"u"&&console.error){let _=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${m.key}" failed to construct at ${_} (initial render, skipping this row):`,y?.message||y)}return null}};if(!f){for(let g=0;g<e.length&&!(c&&c.__disposed);g++)p(g);return!0}return l.rows(t,e.length,p,f),!0}if(typeof e=="string"){let u=gP(e,t);if(Array.isArray(u))return M0(t,u,n,r,!0,s)}if(typeof e=="object"){let u=(p,g)=>{if(Ht.has(p))return!1;let h=e[p];if(h==null||h===!1)return!1;let m=o?qf(a,Wf(h)):a;(typeof h=="string"||typeof h=="number")&&(h={text:h}),t.childProps&&(h=Me(t.childProps,h)),h=Zf(h,i);let y=zt(ys(h,m),t,cg(t,p),n,g);return og(t,y),y};if(!f){for(let p in e)u(p);return}let d=[];for(let p in e)d.push(p);l.rows(t,d.length,(p,g)=>u(d[p],g),f)}}function Aa(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=Kt.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 FP(t,e){let{children:n,content:r}=t,o=t.childExtends,s=typeof n=="function",i=s||yP(t,"children");if(typeof n=="function"){let u=n,d=t.__ref,p=!1,g,h=Ut(t,t.childrenDeps,u),m=z(()=>{let y=p;p=!0;let _;try{_=h(t,t.state,t.context)}catch(D){if(typeof console<"u"&&console.error){let R=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${R}${y?"":" (initial run, treating as empty)"}:`,D?.message||D)}return}if(!y){g=_;return}if(_===t.children)return;NR(t,_),t.children=_,d.__mount&&d.__mount.chunkGen++;let S=typeof t.onContentUpdate=="function",v=S?[]:null,x=S?[]:null,w=S?[]:null;if(Array.isArray(_)&&t.childrenAs==="state"){let D=t.childProps,R=[],$=new Map;for(let it=0;it<_.length;it++){let q=_[it],G=D;if(typeof D=="function")try{G=D(t,q)}catch{G=null}let nt=dP(G&&G.key,q,it,t);R.push(nt),$.set(nt,{rawChild:q,childProps:G})}let N=new Set(R),B=PR(d,d.__children.slice());for(let it of B)if(!N.has(it)){let q=t[it];q?.remove&&q.remove(),delete t[it],x&&x.push(it)}let et=t.childExtends,st=!(t.tag==="fragment")&&!!t.node,Dt=null,Lt=new Set;for(let it of R){let q=$.get(it),G=q.rawChild,nt=t[it];if(nt&&nt.state){if(G&&typeof G=="object"){let ct=nt.state,yn=ct.$replace||ct.replace,re=ct.$update||ct.update;try{if(typeof yn=="function")yn.call(ct,G);else if(typeof re=="function"){for(let Ot in ct)if(!(Ot==="__element"||Ot==="root"||Ot==="parent"||Ot==="update")&&!Object.prototype.hasOwnProperty.call(G,Ot))try{ct[Ot]=void 0}catch{}re.call(ct,G)}else for(let Ot in G)ct[Ot]=G[Ot]}catch(Ot){if(typeof console<"u"&&console.error){let bn=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${it}" failed to patch at ${bn} (reconcile, keeping its previous data for this pass):`,Ot?.message||Ot)}}}if(w&&w.push(it),st){let ct=ro(nt);ct&&(Dt=dg(t,ct,Dt))}continue}let J=G;(typeof G=="string"||typeof G=="number")&&(J={value:G,text:G});let ft=q.childProps,Y=Zf(ft?{...ft,state:J}:{state:J},et),Q=typeof D=="function"?Wf(ft):to(t,"childProps"),Ct;try{Ct=zt(ys(Y,Q),t,it,e,st?Jf(t,Dt):void 0)}catch(ct){if(typeof console<"u"&&console.error){let yn=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${it}" failed to construct at ${yn} (reconcile, skipping this row):`,ct?.message||ct)}Lt.add(it);continue}if(d.__disposed)return;if(st){let ct=ro(Ct);ct&&(Dt=ct)}v&&v.push(it)}st&&I0(t,R,Lt.size?Lt:null),d.__children=Lt.size?R.filter(it=>!Lt.has(it)):R,S&&(v.length||x.length)&&ng(t,{added:v,removed:x,kept:w}),Aa(t,!1);return}if(t.childrenAs!=="state"&&d.__plainRows&&ht.rows.reconcile(t,d,_,e,S)){Aa(t,!1);return}let C=S?[...d.__children]:null;for(let D of PR(d,[...d.__children])){let R=t[D];R?.remove&&R.remove(),delete t[D]}d.__children=[],rP(t,_,e,0),Aa(t,!1),S&&ng(t,{added:[...d.__children],removed:C,kept:[]})},{depth:d.path.length,label:gt(d,"children")});d.__effects.push(m),n=g,NR(t,n),t.children=n}let a=ht.mount,c=a!==null?a.budgetOf(t,e):0,l=Nf(t.__ref),f=s?rP(t,n,e,c):M0(t,n,e,c,i);if(c&&Nf(t.__ref)>l){a.defer(t,c,()=>oP(t,e,n,r,o,f,c));return}oP(t,e,n,r,o,f,c)}function oP(t,e,n,r,o,s,i){let a=Nf(t.__ref);if(r!=null&&!(r&&r.__ref)){let c=r;typeof c=="string"||typeof c=="number"?c={text:c}:typeof c!="object"&&(c={}),t.childProps&&(c=Me(t.childProps,c)),c=Zf(c,o);let l=qf(to(t,"childProps"),to(t,"content"));og(t,zt(ys(c,l),t,"content",e))}if(!(n&&!s)){if(i&&Nf(t.__ref)>a){ht.mount.defer(t,i,()=>sP(t,e,o,i));return}sP(t,e,o,i)}}function sP(t,e,n,r){let o=t.context?.components||{},s=t.__ref&&t.__ref.__runtimeSource,i=s?{}:null;{let l=Object.keys(t);for(let f=0;f<l.length;f++){let u=l[f];if(!u.endsWith("Extends")||typeof t[u]!="string")continue;let d=u.slice(0,-7);if(!d||d.charCodeAt(0)<65||d.charCodeAt(0)>90)continue;let p={extends:t[u]};delete t[u];for(let g=f+1;g<l.length;g++){let h=l[g],m=h.charCodeAt(0);if(m>=65&&m<=90||Ht.has(h)||typeof t[h]=="function"&&(h.startsWith("on")||h.startsWith(".")))break;let y=t[h];y!==void 0&&(p[h]=y,delete t[h],i&&zf(s,h)&&(i[d]||(i[d]={}),i[d][h]=s[h]))}t[d]&&typeof t[d]=="object"?t[d]={...p,...t[d]}:t[d]=p}}let a=Object.keys(t),c=l=>{if(Ht.has(l)||typeof t[l]!="object"||t[l]===null)return!1;let f=l.charCodeAt(0);if(f<65||f>90)return!1;let u=t[l];if(u.__ref)return!1;if(!u.extends&&!u.extend){let p=o[l]||o[`smbls.${l}`];p&&(u={...u,extends:p})}t.childProps&&(u=Me(t.childProps,u)),u=Zf(u,n);let d=s?qf(to(t,"childProps"),qf(i[l]||null,to(t,l))):null;og(t,zt(ys(u,d),t,l,e))};if(!r){for(let l of a)c(l);return}ht.mount.run(t,a.length,l=>c(a[l]),r)}function ig(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 a=o.parentNode;if(a){if(n?.position==="before"&&n.node)a.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){let c=n.node.nextSibling;a.insertBefore(r,c||o)}else a.insertBefore(r,o);Nh();return}}let s=e?.node||(e?.nodeType?e:null);if(!s)return;if(!n&&ht.hydration!==null){let a=t.context&&t.context.__hydration;if(a&&ht.hydration.place(a,t,e,s,r))return}let i=n?.node;if(i&&i.parentNode!==s)s.appendChild(r);else if(n?.position==="before"&&i)s.insertBefore(r,i);else if(n?.position==="after"&&n.node){let a=n.node.nextSibling;a?s.insertBefore(r,a):s.appendChild(r)}else s.appendChild(r);Nh()}var ag=3;function Jh(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=ag?!1:(t.__inBeforeUpdate=!0,!0)}function Nn(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===ag&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${ag}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function Gt(t,e,n){let r=t.charAt(0).toLowerCase()+t.slice(1);$n(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&&bt(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=>{Ye(e,o,p)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(Ye(e,o,u),e.context?.strictMode)throw u}finally{l&&mt(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var Qf=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),VP=1e3,HP=24,$0=Object.freeze({}),j0=Object.freeze({}),Oa=0,pg=t=>{if(wt(t)||Qf(t,"__ref"))return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function N0(t,e,n){if(t===null||typeof t!="object")return t;if(--Oa<0||e>HP){Oa=-1;return}if(Array.isArray(t)){let o=new Array(t.length);for(let s=0;s<t.length;s++)o[s]=n?t[s]:N0(t[s],e+1,!1);return o}if(n||!pg(t))return t;let r={};for(let o in t)Qf(t,o)&&(r[o]=N0(t[o],e+1,o==="extends"||o==="childExtends"));return r}function jP(t){Oa=VP;let e;try{e=N0(t,0,!1)}catch{return $0}return Oa<0?$0:e}function F0(t,e,n,r){if(t===e)return!0;if(t===null||typeof t!="object"||e===null||typeof e!="object"||--Oa<0||n>HP)return!1;if(Array.isArray(t)){if(!Array.isArray(e)||e.length!==t.length)return!1;for(let s=0;s<t.length;s++)if(r?t[s]!==e[s]:!F0(t[s],e[s],n+1,!1))return!1;return!0}if(r||Array.isArray(e)||!pg(t)||!pg(e))return!1;let o=0;for(let s in t)if(Qf(t,s)&&(o++,!Qf(e,s)||!F0(t[s],e[s],n+1,s==="extends"||s==="childExtends")))return!1;for(let s in e)Qf(e,s)&&o--;return o===0}function BP(t,e){if(e===$0||e===j0)return!1;Oa=VP;try{return F0(t,e,0,!1)}catch{return!1}}var hg=t=>Te()?xe(()=>jP(t)):jP(t),UP=(t,e)=>Te()?xe(()=>BP(t,e)):BP(t,e);function zP(t,e,n,r){let o=t;return o&&typeof o=="object"&&!Array.isArray(o)&&!pg(o)&&(r||n&&!o.ignoreChildExtends)&&(o=r?Me({},o):{...o}),typeof e=="function"?{item:o,props:r}:o}var WP=t=>({childProps:typeof t.childProps=="function"?void 0:t.childProps,childExtends:t.childExtends}),gg=class{constructor(e,n){this.shared=e,this.rows=n}add(e,n,r,o,s){this.rows.set(e,hg(zP(n,o,s,r.props)))}failed(e){this.rows.set(e,j0)}none(e){this.rows.delete(e)}},tV=Object.freeze([]);function eV(t,e,n,r,o){let s=e.__plainRows.rows,i=e.__plainRows.shared,a=WP(t),c=UP(a,i),l=t.childProps,f=to(t,"childProps"),u=t.childExtends,d=new Array(n.length),p=new Map;for(let b=0;b<n.length;b++){let k=L0(t,n[b],b,l,f,u,!1,!0);if(p.has(k.key))return!1;p.set(k.key,k),d[b]=k}for(let b=0;b<d.length;b++){let k=d[b];k.input=zP(n[b],l,u,k.props);let C=c?s.get(k.key):void 0;if(C===void 0)continue;let D=t[k.key];D&&D.__ref&&D.parent===t&&UP(k.input,C)&&(k.kept=!0,k.snap=C)}let g=o?[]:null;for(let b of s.keys()){let k=p.get(b);if(k&&k.kept)continue;let C=t[b];C?.remove&&C.remove(),delete t[b],g&&g.push(b)}let h=o?[]:null,m=o?[]:null,y=new Map,_=null,S=null;for(let b=0;b<d.length;b++){let k=d[b];if(k.kept){y.set(k.key,k.snap),m&&m.push(k.key);let R=ro(t[k.key]);R&&(S=dg(t,R,S));continue}y.set(k.key,hg(k.input));let C;try{C=zt(ys(k.def,k.supplied),t,k.key,r,Jf(t,S))}catch(R){if(y.set(k.key,j0),_||(_=new Set),_.add(k.key),typeof console<"u"&&console.error){let $=e.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${k.key}" failed to construct at ${$} (re-run, skipping this row):`,R?.message||R)}continue}if(e.__disposed)return!0;if(!C){y.delete(k.key);continue}let D=ro(C);D&&(S=D),h&&h.push(k.key)}e.__plainRows=new gg(c?i:hg(a),y);let v=Array.from(y.keys());I0(t,v,_);let x=new Set(e.__children),w=[];for(let b=0;b<v.length;b++)x.has(v[b])&&w.push(v[b]);for(let b of e.__children)y.has(b)||w.push(b);return e.__children=w,o&&(h.length||g.length)&&ng(t,{added:h,removed:g,kept:m}),!0}var qP={track:t=>new gg(hg(WP(t)),new Map),reconcile(t,e,n,r,o){let s=Array.isArray(n)?n:n==null||n===!1?tV:null;return!!s&&eV(t,e,s,r,o)}};var mg=t=>{let e=t.__ref;if(e&&e.__hydrationPath!==void 0)return e.__hydrationPath;let n=t.parent,r=n&&n.__ref?mg(n):null,o=r===null?"":r?r+"."+t.key:String(t.key);return e&&(e.__hydrationPath=o),o},nV=new Set(["src","srcset"]);function B0(t){let e=t?.context?.__hydration;if(!e)return null;let n=t.tag=Mn(t);if(n==="string"||n==="fragment")return null;let r=mg(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=lr(n)&&(n==="svg"||t.parent?.node?.namespaceURI===us),a=lr(n)&&!i&&n!=="svg"?"div":n,c=i?s.namespaceURI===us:s.namespaceURI!==us;if(s.localName!==a||!c)return e.misses++,null;e.claimed.add(s),e.adopted++;let l=e.pending;if(l&&l.delete(s)){let f=s.parentNode,u=f?(e.pendingIn.get(f)||1)-1:0;u>0?e.pendingIn.set(f,u):f&&e.pendingIn.delete(f)}for(let f of Array.from(s.getAttributeNames?s.getAttributeNames():[]))nV.has(f)||s.removeAttribute(f);if(l)for(let f=s.firstChild;f;){let u=f.nextSibling;l.has(f)||s.removeChild(f),f=u}else for(;s.firstChild;)s.removeChild(s.firstChild);return s.localName==="img"&&s.complete&&s.naturalWidth>0&&oV(s),s}var rV=500;function oV(t){let e=!1,n=!1,r=o=>{o.isTrusted&&(n?o.stopImmediatePropagation():e=!0,t.removeEventListener("load",r,!0))};t.addEventListener("load",r,!0),setTimeout(()=>{if(!e){if(!(t.complete&&t.naturalWidth>0)){t.removeEventListener("load",r,!0);return}n=!0,t.dispatchEvent(new Event("load")),setTimeout(()=>t.removeEventListener("load",r,!0),rV)}},0)}function sV(t,e,n,r,o){let s=t.pendingIn;if(!s||!s.has(r))return!1;if(o.parentNode===r&&t.claimed.has(o))return!0;let i,a=n&&n.__ref,c=a&&a.__children,l=c?c.lastIndexOf(e.key):-1;for(let f=l-1;f>=0;f--){let u=n[c[f]],d=u&&u.node;if(d&&d!==o&&d.parentNode===r){i=d.nextSibling;break}}return i===void 0&&(i=Zh(r,a&&a.__textNode)),i===o||r.insertBefore(o,i),!0}var KP={adopt:B0,place:sV};var Ss=50;function Bn(t){return t===!0?Ss:typeof t=="number"&&t>0?t:0}var Ra=[],nu=!1,so=0,pr=Ss,ru=!1,bg=[],_g=typeof performance<"u"&&typeof performance.now=="function"?()=>performance.now():()=>Date.now(),yg=[],tu=null;function iV(t){if(!tu){let e=new MessageChannel;e.port1.onmessage=()=>{let n=yg.shift();!yg.length&&typeof e.port1.unref=="function"&&e.port1.unref(),n&&n()},tu=e}yg.push(t),yg.length===1&&typeof tu.port1.ref=="function"&&tu.port1.ref(),tu.port2.postMessage(0)}function z0(t){let e=typeof globalThis<"u"?globalThis.scheduler:null;if(e&&typeof e.yield=="function"){e.yield().then(t,t);return}if(typeof setImmediate=="function"){setImmediate(t);return}if(typeof MessageChannel=="function"){iV(t);return}setTimeout(t,0)}function io(){return new Promise(t=>z0(t))}var eu=0,V0=0,H0=0,Pa=0;function W0(){eu=0,V0=so,H0=0,Pa=0}function GP(){if(!so)return!1;if(eu++,Pa>0)return Pa--,!1;let t=_g(),e=t-so,n=e/eu,r=(t-V0)/(eu-H0),o=r>n?r:n;V0=t,H0=eu;let s=pr-e-o;return s<=0?(ru=!0,!0):(Pa=o>0?Math.floor(s/o/2):0,!1)}var ws=0;function YP(t=Ss){ws===0&&!so?(so=_g(),ru=!1,pr=t,W0()):t<pr&&(pr=t,Pa=0),ws++}var _s=null,U0=!1,aV=typeof queueMicrotask=="function"?queueMicrotask:t=>Promise.resolve().then(t);function q0(){so=0,ru=!1,pr=Ss,W0()}function cV(){U0||(U0=!0,aV(()=>{U0=!1,ws===0&&q0()}))}function XP(){ws>0&&ws--,!(ws!==0||_s!==null)&&(nu?cV():q0())}function K0(t,e=Ss){let n={fn:t,budget:e};_s?_s.push(n):Ra.push(n),nu||(nu=!0,z0(ZP))}function lV(t){let e=_s;_s=[];try{t.fn()}catch(n){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",n?.message||n)}finally{let n=_s;_s=e,n.length&&Ra.unshift(...n)}}function hr(){return!nu&&!Ra.length?Promise.resolve():new Promise(t=>bg.push(t))}function fV(){if(!bg.length)return;let t=bg;bg=[];for(let e=0;e<t.length;e++)t[e]()}function ZP(){for(so=_g(),ru=!1,pr=1/0,W0();Ra.length;){let t=Ra.shift();if(t.budget<pr&&(pr=t.budget,Pa=0),lV(t),ru||_g()-so>=pr)break}if(ws=0,q0(),Ra.length){z0(ZP);return}nu=!1,fV()}function wg(t){ma(t.__ref).pending++}function $e(t){let e=t&&t.__ref,n=e&&e.__mount;if(!n||!(n.pending>0)||--n.pending>0||e.__disposed)return;let r=n.tail;r&&(n.tail=null,r())}function Sg(t){let e=t&&t.__ref&&t.__ref.__mount;return!!(e&&e.tail)}function xs(t){let e=t&&t.__ref&&t.__ref.__mount;return!e||!e.tail?Promise.resolve(t):new Promise(n=>{(e.waiters||(e.waiters=[])).push(n)})}function G0(t,e=t&&t.__ref){let n=e&&e.__mount,r=n&&n.waiters;if(r){n.waiters=null;for(let o=0;o<r.length;o++)r[o](t)}}function JP(t,e=t&&t.__ref){let n=e&&e.__mount;if(!n||!n.tail)return;n.tail=null,n.pending=0;let r=n.holder;n.holder=null,G0(t,e),r&&$e(r)}function uV(t,e){let n=e&&e.mountYield;if(!n&&!t.yieldChildren)return 0;let r=n?Bn(n):0,o=Bn(t.yieldChildren);return r&&o?r<o?r:o:r||o}function QP(t,e,n,r,o){YP(r);try{tD(t,t.__ref,0,e,n,r,o,!1)}finally{XP()}}function tD(t,e,n,r,o,s,i,a){try{for(let c=n;c<r;c++){let l=e.__mount,f=l?l.pending:0;if(o(c)===!1)continue;if(e.__disposed)break;let u=GP(),d=e.__mount;if(c+1<r&&(u||(d?d.pending:0)>f)){i&&i.onSuspend&&i.onSuspend(),a||wg(t);let p=c+1;K0(()=>dV(t,e,p,r,o,s,i),s);return}}}catch(c){if(!a)throw c;lg(t,c)}a&&$e(t)}function dV(t,e,n,r,o,s,i){if(e.__disposed||i&&i.isStale&&i.isStale()){$e(t);return}tD(t,e,n,r,o,s,i,!0)}function pV(t,e,n){wg(t),K0(()=>{try{let r=t.__ref;r&&!r.__disposed&&n()}catch(r){lg(t,r)}finally{$e(t)}},e)}function hV(t,e,n,r){let o=t.__ref,s=ma(o),i=++s.chunkGen,a=t.node,c=[],l=!1;QP(t,e,f=>{let u=n(f,l?Jf(t,mV(a,c)):void 0),d=gV(u);return d&&c.push(d),u},r,{isStale:()=>s.chunkGen!==i,onSuspend:()=>{l=!0}})}function gV(t){let e=ro(t);if(e)return e;let n=t&&t.__ref;return n&&n.__if!==!1&&t.tag==="fragment"&&n.__fragmentAnchor||null}function mV(t,e){for(let n=e.length-1;n>=0;n--)if(e[n].parentNode===t)return e[n];return null}function yV(t,e){let n=t.__ref;try{Aa(t,!0),A0(t,e)}finally{G0(t,n);let r=n.__mount,o=r&&r.holder;o&&(r.holder=null,$e(o))}}var eD={budgetOf:uV,run:QP,rows:hV,defer:pV,hold:wg,finish:yV,abandon:JP};function nD(){ht.viewEvents=AO,ht.chains=xO,ht.rows=qP,ht.hydration=KP,ht.mount=eD}nD();Rt();var ou="inertOutside",_V=new Set(["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT","BASE","TITLE"]),wV='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',SV={attributes:!0,attributeFilter:["inert"]},rD=new WeakMap,oD=new WeakMap,su=new Set,sD=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function ks(t){try{return xe(t)}catch(e){console.error("[smbls] inertOutside:",e)}}function iD(t){let e=()=>ks(t);typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)}function xV(t){if(!t||!t.defaultView||!("activeElement"in t))return null;let e=rD.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=>ks(()=>X0(e,r))),rD.set(t,e),e)}function fD(t,e){let n=t.element.node;return!!n&&n.nodeType===1&&n.isConnected&&n.ownerDocument===e}function kV(t){let e=t.activeElement;return e&&e!==t.body&&e!==t.documentElement?e:null}var aD=t=>!!(t.closest&&t.closest("[inert]"));function vV(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&&!_V.has(i.tagName)&&n.add(i)}return{outside:n,parents:r}}function cD(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 X0(t,e){let{doc:n,held:r,observer:o}=t;e&&cD(t,e),cD(t,o.takeRecords());let s=t.top,i=[];for(let u of t.layers){let d=fD(u,n);d&&!u.live&&(i.push(u),u.returnFocus=kV(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?vV(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,SV);if(t.layers.some(u=>!u.live)?su.add(t):su.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),iD(()=>uD(t,a));else if(f){let u=f.returnFocus;iD(()=>EV(t,f,u))}f&&(f.returnFocus=null)}function uD(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(wV))if(i(a,!0))return;o&&o!==r.body&&typeof o.blur=="function"&&o.blur()}function EV(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)||aD(o))&&(n&&n.isConnected&&n.ownerDocument===r&&!aD(n)&&(n.focus({preventScroll:!0}),r.activeElement===n)||t.top&&uD(t,t.top))}function Y0(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)}X0(n)}function dD(t){let e=t[ou];if(typeof e=="function")try{e=e(t,t.state,t.context)}catch{e=!1}return!!e}function lD(t){let e=oD.get(t);if(e)return e;let n=t.__ref,r=t.node;if(!n||!r||r.nodeType!==1)return null;let o=xV(r.ownerDocument);if(!o)return null;e={element:t,manager:o,declared:!1,live:!1,returnFocus:null},oD.set(t,e);let s=z(()=>{let i=dD(t);ks(()=>Y0(e,i))},{depth:n.path.length,label:()=>n.path.join(".")+"::"+ou});return n.__effects||(n.__effects=[]),n.__effects.push(s),n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>ks(()=>Y0(e,!1))),e}function AV(){for(let t of su){if(!t.doc.defaultView){su.delete(t);continue}t.layers.some(e=>!e.live&&fD(e,t.doc))&&X0(t)}}var xg={name:ou,create(t){sD(t,ou)&&ks(()=>lD(t))},render(){su.size&&ks(AV)},update(t){sD(t,ou)&&ks(()=>{let e=lD(t);e&&Y0(e,dD(t))})}};var pD={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"]},hD={"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,12 @@ FROM ${a}${l}`},i$=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 x3={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"}}}},k3={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},v3={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"}}},H1={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...x3,...k3,...v3,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 W1={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var q1={ratio:1.618,subSequence:!0};var K1={SourceSans:[{url:""}]},G1={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 Y1={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 X1={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 Z1={base:150,ratio:1.333,unit:"ms",subSequence:!0,defaultBezier:"cubic-bezier(.29, .67, .51, .97)",springBezier:"cubic-bezier(.32, .72, 0, 1)"};var Q1={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Zl={version:"0.0.1",color:V1,gradient:z1,theme:H1,typography:W1,spacing:q1,font:K1,fontFamily:G1,timing:Z1,icons:Y1,media:X1,sizes:Q1,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 zi={};j(zi,{A:()=>XR,AssetPicture:()=>mO,Audio:()=>_O,Avatar:()=>yP,B:()=>FO,Block:()=>J1,Box:()=>qp,Br:()=>VO,Bridge:()=>XO,Button:()=>JR,ButtonSet:()=>rP,COMPONENTS:()=>qo,Caption:()=>OO,Checkbox:()=>JO,CheckboxHgroup:()=>tR,Circle:()=>pO,CircleButton:()=>eP,Clickable:()=>fO,Data:()=>BO,Dialog:()=>sP,DialogFooter:()=>aP,DialogHeader:()=>iP,Dropdown:()=>_P,DropdownList:()=>wP,DropdownParent:()=>SP,DropdownParentFocus:()=>xP,DropdownSiblingFocus:()=>kP,FileIcon:()=>dR,Flex:()=>eO,Focusable:()=>uO,FocusableComponent:()=>dO,Footnote:()=>NO,Form:()=>aO,Grid:()=>rO,Gutter:()=>sO,H1:()=>xO,H2:()=>kO,H3:()=>vO,H4:()=>EO,H5:()=>AO,H6:()=>CO,Headline:()=>MO,Hgroup:()=>KO,HgroupButton:()=>YO,HgroupRows:()=>GO,Hoverable:()=>lO,Hr:()=>UO,I:()=>jO,Icon:()=>fR,IconButton:()=>oP,IconText:()=>uR,Iframe:()=>cO,Img:()=>iO,Inline:()=>tO,InlineFlex:()=>nO,InlineGrid:()=>oO,Input:()=>ZO,Italic:()=>DO,KangorooButton:()=>nP,Li:()=>zO,Link:()=>xx,Notification:()=>vP,NumberInput:()=>QO,Ol:()=>WO,P:()=>TO,Picture:()=>gO,Radio:()=>eR,RadioHgroup:()=>nR,Range:()=>bP,RouteLink:()=>ZR,RouterLink:()=>kx,SHAPES:()=>Hp,Select:()=>QR,Shape:()=>MS,Span:()=>SO,SquareButton:()=>tP,Strong:()=>RO,Subhead:()=>$O,Svg:()=>yO,Text:()=>wO,Textarea:()=>sR,TextareaWithButton:()=>iR,Theme:()=>hO,Title:()=>IO,Toggle:()=>rR,ToggleHgroup:()=>oR,Tooltip:()=>hP,TooltipHidden:()=>gP,TooltipLayer:()=>Lx,TooltipParent:()=>mP,U:()=>PO,Ul:()=>HO,Underline:()=>LO,Video:()=>bO,depth:()=>Wp,focusableRingEnabled:()=>Ql,focusableRingToken:()=>DS,focusableRingValue:()=>zo,getSystemGlobalTheme:()=>Jl});var OS={};j(OS,{Block:()=>J1,Flex:()=>eO,Grid:()=>rO,Gutter:()=>sO,Inline:()=>tO,InlineFlex:()=>nO,InlineGrid:()=>oO});var J1={display:"block"},tO={display:"inline"},eO={display:"flex"},nO={display:"inline-flex"},rO={display:"grid"},oO={display:"inline-grid"},sO={boxSize:"C1"};var RS={};j(RS,{Img:()=>iO});M();var iO={tag:"img",attr:{title:t=>t.title,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=ae(t);return e&&e.src||t.src},srcset:t=>{let e=ae(t);return(e?Uc(e):"")||t.srcset||t.srcSet}}};var PS={};j(PS,{Form:()=>aO});var aO={tag:"form"};var LS={};j(LS,{Iframe:()=>cO});var cO={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var IS={};j(IS,{Clickable:()=>fO,Focusable:()=>uO,FocusableComponent:()=>dO,Hoverable:()=>lO,focusableRingEnabled:()=>Ql,focusableRingToken:()=>DS,focusableRingValue:()=>zo});var E3={appearance:"none",fontFamily:"inherit"},lO={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}}},fO={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function Ql(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}function DS(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 zo(t,e,n){let r=DS(t);return r&&r[e]!==void 0?r[e]:n}var uO={border:"none",outline:t=>Ql(t)?"solid 0 currentColor":"none",":focus-visible":{opacity:1,outline:t=>Ql(t)?zo(t,"outline","solid X currentColor"):"none",outlineOffset:t=>Ql(t)?zo(t,"outlineOffset"):void 0}},dO={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:E3};var FS={};j(FS,{Picture:()=>gO});var NS={};j(NS,{Theme:()=>hO,getSystemGlobalTheme:()=>Jl});var $S={};j($S,{Circle:()=>pO,SHAPES:()=>Hp,Shape:()=>MS,default:()=>A3,depth:()=>Wp});M();var He=O(),Wp={4:{boxShadow:`rgba(0,0,0,.10) 0 2${He.unit.default} 4${He.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${He.unit.default} 6${He.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${He.unit.default} 10${He.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${He.unit.default} 16${He.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${He.unit.default} 26${He.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${He.unit.default} 42${He.unit.default}`}},Fi=t=>ot(t.shapeDirectionColor)||ot(t.borderColor)||ot(t.backgroundColor)||ot(t.background),zp=t=>{let e=Pl.transition(t.transition,t);return e&&e.transition},Hp={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:Fi(t),transition:zp(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:Fi(t),transition:zp(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:Fi(t),transition:zp(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:zp(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${Fi(t)} 25%, transparent 25%), linear-gradient(315deg, ${Fi(t)} 25%, transparent 25%)`},"&:after":{background:Fi(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)"}}}},MS={deps:{exec:ht,getSpacingBasedOnRatio:Fe,getMediaColor:jt},classlist:{shape:t=>t.deps.exec(Hp[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=Hp[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}}},pO={round:"100%"},A3=MS;M();var Jl=({context:t,state:e})=>{let n=e&&e.root,r=n&&n.globalTheme||t.designSystem&&t.designSystem.globalTheme;return r==="auto"?null:r},hO={deps:{depth:Wp},classlist:{depth:t=>!$t(t.depth)&&t.deps.depth[t.depth]}};var gO={deps:{getSystemGlobalTheme:Jl},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:Jl},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 jS={};j(jS,{AssetPicture:()=>mO});M();var mO={tag:"picture",children:t=>{let e=ae(t);if(e)return Vc(e,t.alt)}};var BS={};j(BS,{Svg:()=>yO});var yO={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 h=d[1],g=e.document||(typeof document<"u"?document:null);if(!(g&&typeof g.getElementById=="function"&&g.getElementById(h))){let m=r&&r.scratchSystem&&r.scratchSystem.appendSVGSprite;n&&!n.__svgCache&&(n.__svgCache={}),typeof m=="function"?m({[h]:i},{document:g}):r&&typeof r.init=="function"&&r.init({svg:{[h]:i}},{document:g,emotion:e.emotion})}return a(h)}}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 US={};j(US,{Video:()=>bO});M();var bO={tag:"video",controls:!0,attr:{src:t=>{let e=ae(t);return e&&e.src||t.src}},children:t=>{let e=ae(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 VS={};j(VS,{Audio:()=>_O});M();var _O={tag:"audio",controls:!0,attr:{src:t=>{let e=ae(t);return e&&e.src||t.src}},children:t=>{let e=ae(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 zS={};j(zS,{B:()=>FO,Caption:()=>OO,Data:()=>BO,Footnote:()=>NO,H1:()=>xO,H2:()=>kO,H3:()=>vO,H4:()=>EO,H5:()=>AO,H6:()=>CO,Headline:()=>MO,I:()=>jO,Italic:()=>DO,P:()=>TO,Span:()=>SO,Strong:()=>RO,Subhead:()=>$O,Text:()=>wO,Title:()=>IO,U:()=>PO,Underline:()=>LO});var wO={},SO={tag:"span"},xO={tag:"h1"},kO={tag:"h2"},vO={tag:"h3"},EO={tag:"h4"},AO={tag:"h5"},CO={tag:"h6"},TO={tag:"p"},OO={tag:"caption"},RO={tag:"strong",fontWeight:"700"},PO={tag:"u"},LO={tag:"u"},DO={tag:"i"},IO={},MO={tag:"h6",fontSize:"B",fontWeight:500},$O={tag:"span",fontSize:"Z1"},NO={tag:"span",fontSize:"Z"},FO={tag:"b"},jO={tag:"i"},BO={tag:"data"};var HS={};j(HS,{Box:()=>qp,Br:()=>VO,Hr:()=>UO,Li:()=>zO,Ol:()=>WO,Ul:()=>HO});var C3=t=>{if(!t.context)return;let{props:e,__ref:n}=t,r=Xt(e,t,{unpack:!1});n.__class=r},qp={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:C3},UO={tag:"hr",margin:"C1 0"},VO={tag:"br"},zO={tag:"li"},HO={tag:"ul",childExtends:{extends:"Li"}},WO={tag:"ol",childExtends:{extends:"Li"}};var WS={};j(WS,{Hgroup:()=>KO,HgroupButton:()=>YO,HgroupRows:()=>GO});var qO=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},KO={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:qO,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:qO,margin:"0",color:"paragraph"}},GO={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},YO={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var qS={};j(qS,{Bridge:()=>XO});var XO={tag:"div"};var KS={};j(KS,{Input:()=>ZO});var ZO={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 GS={};j(GS,{NumberInput:()=>QO});var QO={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 YS={};j(YS,{Checkbox:()=>JO,CheckboxHgroup:()=>tR});var JO={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=>zo(t,"outline","solid X currentColor"),outlineOffset:t=>zo(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"}}},tR={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var XS={};j(XS,{Radio:()=>eR,RadioHgroup:()=>nR});var eR={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}},nR={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var ZS={};j(ZS,{Toggle:()=>rR,ToggleHgroup:()=>oR});var rR={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}},oR={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var QS={};j(QS,{Textarea:()=>sR,TextareaWithButton:()=>iR});var sR={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"}},iR={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 JS={};j(JS,{FileIcon:()=>dR,Icon:()=>fR,IconText:()=>uR});Mt();var aR=new Set,cR=(t,e)=>{if(!aR.has(t)&&(aR.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.`)}},lR=new WeakMap,T3=t=>{let e=lR.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},lR.set(t,e)),e},O3=(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},R3=(t,e,n)=>{let r=n&&n.context&&n.context.document||(typeof document<"u"?document:null);gt(t);try{let o=O();o&&!o.__svgCache&&(o.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=Ro(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&r&&Object.keys(s).length&&Po(s,{document:r}),Object.keys(s).length>0}finally{dt()}},P3=(t,e,n,r,o)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=T3(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=O3(f,n);return u?R3(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(h){console.error("[Icon] repaint error:",h)}})});return a.pending.set(e,l),!0},fR={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 p=g[".isActive"];if(p)return g.call("exec",p.name||p.icon)},l=(g,p,m)=>{let{semanticIcons:y}=m&&m.designSystem,{toCamelCase:S}=m&&m.utils,b=f(g,p),x=S(b).split(/([a-z])([A-Z])/g),w=x[1]?x[0]:b.split(".")[0].split(" ")[0],_=y&&y[w];if(_){let A=b.includes(".")?"sfsymbols."+b.split(".").slice(1).join("."):"sfsymbols";return b=_[A]||_[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,p)=>{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,h=()=>{let g=f(t,e),p=g;if(g.includes(" ")){let D=g.split(" ");g=D[0]+D.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 k=r[".isActive"];r&&r.isActive&&k&&k.icon&&(b=t.call("exec",k.icon||k.Icon.name||k.Icon.icon,t)),t.call("isString",b)&&b.includes("{{")&&(b=t.call("replaceLiteralsWithObjectFields",b));let x;o[b]&&(x=b),o[m]?x=m:o[y[0]+y[1]]?x=y[0]+y[1]:o[y[0]]?x=y[0]:i&&t.warn("Can't find icon:",g,x);let w=o[x],_=r&&r.src||u;!w&&!_&&(P3(n,p,m,t,$=>{if(!(d&&d._disposed)){if(!$)return cR(p,t);h()}})||cR(p,t));let A=s&&x,C=w||_||o.noIcon;if(!(t.spriteId===A&&t.src===C&&t.node&&t.node.innerHTML)&&(t.spriteId=A,t.src=C,typeof t.html=="function"&&t.node)){let D=t.context&&t.context.designSystem;D&>(D);try{let $=t.html(t,t.state,t.context);$!=null&&typeof $!="function"&&(t.node.innerHTML=$)}finally{D&&dt()}}};d=Y(h,{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"}},uR={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},dR={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var vx={};j(vx,{A:()=>XR,Link:()=>xx,RouteLink:()=>ZR,RouterLink:()=>kx});var Vi={};j(Vi,{default:()=>c4,getActiveRoute:()=>Sx,lastLevel:()=>Xp,lastPathname:()=>Ui,loadLazy:()=>mx,matchRoute:()=>bx,parseQuery:()=>_x,parseRoutePattern:()=>yx,resolveRouterElement:()=>sf,router:()=>rn,runGuards:()=>wx,saveScrollPosition:()=>nf});M();var tx="__smblsRouter",ex=new WeakMap,L3=0,nx=()=>Date.now().toString(36)+(++L3).toString(36)+Math.random().toString(36).slice(2,6),rx=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},Xn=t=>{try{return t.state}catch{return}},ef=t=>{try{let{pathname:e,search:n,hash:r}=t.location;return e+n+r}catch{return null}},mR=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null},yR=t=>{let e=mR(t)?t[tx]:null;return e&&typeof e.key=="string"&&typeof e.chain=="string"&&Number.isInteger(e.index)?e:null},ox=(t,e)=>t==null?{[tx]:e}:mR(t)?{...t,[tx]:e}:null,sx=()=>({key:nx(),index:0,chain:nx()}),ji=(t,e)=>{let n=yR(e);return{key:n?n.key:null,index:n?n.index:null,chain:n?n.chain:null,url:ef(t),state:e}},bR=(t,e)=>{let n=yR(t);return e.key?!!n&&n.key===e.key:!n&&t===e.state},tf=(t,e,n)=>!!n&&ef(t)===n.url&&bR(e,n),ix=(t,e,n)=>({...t,url:e,state:n}),ax=(t,e)=>{let n=Xn(e),r=ji(t,n);if(r.key)return r;let o=sx(),s=ox(n,o);if(!s)return r;try{e.replaceState(s,null)}catch{return r}return ix(o,r.url,s)},D3=(t,e)=>{let n=ex.get(t);return!n&&e&&(n={current:null,pending:null,expect:null,seq:0,pops:new WeakMap,positions:null,scrollNode:null,restore:null},ex.set(t,n)),n||null},_R="smbls.router.scroll",pR=100,I3=1e3,hR=["wheel","touchstart","keydown","pointerdown"],wR=t=>{try{return t.sessionStorage||null}catch{return null}},SR=t=>{try{let e=JSON.parse(t.getItem(_R)||"[]");return Array.isArray(e)?e.filter(n=>Array.isArray(n)&&typeof n[0]=="string"):[]}catch{return[]}},xR=(t,e)=>{if(!t.positions){t.positions=new Map;let n=wR(e);if(n)for(let[r,o]of SR(n))o&&Number.isFinite(o.top)&&Number.isFinite(o.left)&&t.positions.set(r,{top:o.top,left:o.left})}return t.positions},cx=(t,e,n,r)=>{let o=xR(t,e);o.delete(n),o.set(n,{top:Math.round(Number(r.scrollTop)||0),left:Math.round(Number(r.scrollLeft)||0)}),o.size>pR&&o.delete(o.keys().next().value);let s=wR(e);if(s)try{let i=new Map(SR(s));for(let[a,c]of o)i.delete(a),i.set(a,c);s.setItem(_R,JSON.stringify(Array.from(i).slice(-pR)))}catch{}},gR=(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)},M3=(t,e,n,r,o,s,i)=>{n.restore&&n.restore.end("replaced"),n.restore=r;let a=typeof i=="number"&&i>=0?i:I3,c=()=>Math.max(0,(Number(o.scrollHeight)||0)-(Number(o.clientHeight)||0)),l=(p,m)=>{typeof o.scrollTo=="function"?o.scrollTo({top:p,left:m,behavior:"instant"}):(o.scrollTop=p,o.scrollLeft=m)},f=typeof t.addEventListener=="function",u=()=>r.end("visitor");if(r.end=p=>{if(!r.outcome&&(r.outcome=p,f))for(let m of hR)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,h=Date.now();if(f)for(let p of hR)t.addEventListener(p,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 p=c()>=s.top-1;if(!p&&Date.now()-h<a)return gR(t,e,g);l(Math.min(s.top,c()),s.left),r.end(p?"placed":"clamped")};gR(t,e,g)},$3=(t,e)=>{let{win:n,history:r,track:o}=t,s=o.pops.get(e);if(s)return s;let i=ji(n,Xn(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&&cx(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},N3=t=>{let{win:e,history:n,track:r}=t,o=Xn(n);if(r.pending&&tf(e,o,r.pending.to)||r.expect&&tf(e,o,r.expect.away))return;let s=r.current;if(s&&(s.key?bR(o,s):tf(e,o,s))){s.url=ef(e),s.state=o;return}r.current=t.restore?ax(e,n):ji(e,o),r.pending=null,r.seq++},kR=(t,e,n)=>{let r=e.scrollRestoration==="restore",o=rx(t),s=r||Array.isArray(e.guards)&&e.guards.length>0,i=o&&D3(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=$3(a,c):N3(a),a},lx=(t,e)=>{e.settled=!0,t.pending===e&&(t.pending=null)},fx=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 lx(o,e),o.seq!==e.seq||!tf(n,Xn(r),e.to)?!1:(o.current=t.restore&&!e.to.key?ax(n,r):e.to,o.seq++,e.committed=!0,!0)},F3=(t,e,n)=>{try{t.addEventListener("popstate",()=>{e.expect===n&&(e.expect=null)},{once:!0})}catch{}},ux=(t,e)=>{let n=t&&t.pop;if(!n||n.echo||n.settled)return;let{win:r,history:o,track:s}=t;lx(s,n);let i=n.from;if(!i||s.seq!==n.seq||!tf(r,Xn(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};F3(r,s,f);try{o.go(i.index-a.index)}catch{s.expect=null}return}let c=sx(),l=ox(i.state,c);try{o.replaceState(l||i.state,null,i.url)}catch{return}s.current=l?ix(c,i.url,l):ji(r,Xn(o)),s.seq++},vR=(t,e)=>{let n=ef(e);t&&n!==null&&(t.__routerAddress=n)},ER=(t,e,n)=>{let r=t&&t.pop;if(r&&!r.echo&&r.from)return ux(t,!0);r&&!r.settled&&lx(t.track,r);let o=rx(n),s=e&&e.__routerAddress;if(!(!o||!s||s===ef(n)))try{o.replaceState(Xn(o),null,s)}catch{}},AR=(t,e,n,r,o=t&&t.win)=>{if(!t){try{r?o.history.replaceState(e,null,n):o.history.pushState(e,null,n)}catch{}return}let{history:s,track:i}=t,a=i.current;!r&&a&&a.key&&t.scrollNode&&cx(i,o,a.key,t.scrollNode);let c=r?ji(o,Xn(s)):ax(o,s),l=c.key?r?{key:c.key,index:c.index,chain:c.chain}:{key:nx(),index:c.index+1,chain:c.chain}:sx(),f=ox(e,l);try{r?s.replaceState(f||e,null,n):s.pushState(f||e,null,n)}catch{return}i.current=f?ix(l,n,f):ji(o,Xn(s)),i.pending=null,i.expect=null,i.seq++},CR=(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&&xR(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"||M3(s,r,i,{key:a.key,pop:o,seq:i.seq,outcome:null},e,c,n.scrollRestoreTimeout),!0},nf=t=>{let e=rx(t),n=e&&ex.get(e);!n||!n.scrollNode||!n.current||!n.current.key||cx(n,t,n.current.key,n.scrollNode)};M();var PR=["components","functions","methods","snippets"],LR=new Set(["pages",...PR]),dx=new Set(["default","__esModule"]),Ho=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Ut=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Kp=new WeakMap,TR=new WeakMap,hx=new WeakMap,OR=new Set,Bi=(t,e=console.warn)=>{OR.has(t)||(OR.add(t),e(t))},DR=t=>Ut(t&&t.lazy),rf=(t,e)=>{let n=t&&t.lazy;return Ut(n)&&Ho(n,e)?n[e]:void 0},gx=(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},IR=(t,e)=>!DR(e)||!Ut(t)||!Ho(t,"lazy")?null:typeof t.lazy=="string"&&t.lazy?t.lazy:null,Gp=t=>!!t&&typeof t=="object"&&hx.has(t),j3=(t,e)=>{if(typeof rf(t,e)!="function")return"error";let n=Kp.get(t)?.get(e);return n&&n.status==="error"?"error":"loading"},B3=(t,e)=>{let n=TR.get(t);if(n&&n.group===e)return n;let{lazy:r,state:o,...s}=t,i=o==null||Ut(o)||typeof o=="function";i?s.state=(c,l)=>{let f=typeof o=="function"?o(c,l):o;return{...Ut(f)?f:null,lazyStatus:j3(c.context,e)}}:(s.state=o,J()&&Bi(`[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 TR.set(t,a),hx.set(s,a),a},U3=t=>t.__ref&&t.__ref.contentElementKey||"content",Yp=(t,e)=>{let n=t&&t.__ref&&t.__ref.__routerRendered,r=n&&Gp(n.content)?hx.get(n.content):null;return!r||r.group!==e?null:{record:r,page:t[U3(t)]}},px=(t,e,n)=>{let r=Yp(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)}},V3=t=>Ut(t)?!Object.keys(t).some(n=>LR.has(n))&&Ut(t.default)?t.default:t:{},z3=t=>{let e={};if(!Ut(t))return e;for(let n of Object.keys(t)){if(dx.has(n))continue;let r=n.charCodeAt(0)===47,o=r?n:"/"+(n==="index"?"":n);(r||!Ho(e,o))&&(e[o]=t[n])}return e},MR=(t,e,n,r,o)=>{if(!Ut(t))return 0;let s=0;for(let i of Object.keys(t))IR(t[i],r)===e&&(s++,Ho(n,i)?t[i]=n[i]:delete t[i]);for(let i of Object.keys(n))Ho(t,i)?t[i]!==n[i]&&o.push(`pages['${i}']`):t[i]=n[i];return s},RR=(t,e,n)=>{let r=t[e];if(!Ut(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}},H3=t=>{let e=t.__ref&&t.__ref.origin;if(!Ut(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]},W3=(t,e,n,r)=>{let o=new Set;for(let i of r.waiting){let a=Yp(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 H3(l)){if(!n.has(f))continue;let u=(l.__ref.path||[l.key]).join(" \u203A ");Bi(`[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)},q3=(t,e,n,r)=>{let o=t.context,s=V3(n),i=J(),a=[],c=new Set;if(i)for(let h of Object.keys(s))LR.has(h)||dx.has(h)||Bi(`[smbls/router] lazy group "${e}" exports \`${h}\`, 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 h of PR){let g=s[h];if(!Ut(g))continue;let p=Ut(o[h])?o[h]:{},m={};for(let S of Object.keys(g))if(!dx.has(S)){if(Ho(p,S)){p[S]!==g[S]&&a.push(`${h}.${S}`);continue}m[S]=g[S]}let y=Object.keys(m);if(y.length&&(RR(o,h,m),h==="components"&&y.forEach(S=>c.add(S)),h==="methods"&&(l=!0),(h==="functions"||h==="snippets")&&Ut(o.utils))){let S={};for(let b of y)Ho(o.utils,b)||(S[b]=m[b]);Object.keys(S).length&&RR(o,"utils",S)}}l&&Ti(o);let f=z3(s.pages);r.pages=f;let u=null;try{u=typeof t.getRoot=="function"?t.getRoot():null}catch{}let d=new Set;Ut(o.pages)&&d.add(o.pages),u&&Ut(u.routes)&&d.add(u.routes);for(let h of r.maps)d.add(h);for(let h of r.waiting)Ut(h.routes)&&d.add(h.routes);for(let h of d)MR(h,e,f,o,a);i&&a.length&&Bi(`[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&&W3(u,e,c,r)},$R=(t,e)=>{let n=t&&t.__ref,r=n&&n.__lazyRoute;!r||r.group!==e||(n.__lazyRoute=null,typeof t.set=="function"&&Yp(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)))},NR=(t,e)=>{let n=t.context,r=gx(n,e);if(r.status==="loading"||r.status==="loaded")return r.promise;let o=rf(n,e);r.status="loading";let s=Promise.resolve().then(()=>o()).then(i=>{r.disposed||q3(t,e,i,r)}).then(()=>{r.status="loaded";let i=[...r.waiting];r.waiting.clear();for(let a of i)$R(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])Yp(a,e)?px(a,e,"error"):r.waiting.delete(a);throw i});s.catch(()=>{}),r.promise=s;for(let i of r.waiting)px(i,e,"loading");return s},FR=(t,e,n)=>{let r=e&&e.context,o=IR(t,r);if(!o)return null;let s=gx(r,o);if(Ut(n)&&s.maps.add(n),s.status==="loaded"&&MR(n,o,s.pages||{},r,[])>0)return{rematch:!0};let i=typeof rf(r,o)=="function";return i?NR(e,o):Bi(`[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:B3(t,o).definition,group:o,status:i?"loading":"error"}},jR=(t,e,n)=>{if(!e||!e.group||e.status==="error")return;let r=t.context,o=t.__ref;if(!o||typeof rf(r,e.group)!="function")return;let s=gx(r,e.group);if(o.__lazyRoute={group:e.group,rerender:n},px(t,e.group,s.status==="error"?"error":"loading"),s.status==="loaded"){Promise.resolve().then(()=>$R(t,e.group));return}s.waiting.add(t)};function mx(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=rf(n,t);return typeof r!="function"?(r===void 0&&DR(n)&&J()&&Bi(`[smbls/router] loadLazy('${t}'): context.lazy declares no group "${t}" \u2014 nothing to load.`),Promise.resolve()):NR(e,t)}var HR=/^:(.+)/,WR=/^\*$/,BR=new Map,yx=t=>{let e=BR.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(HR);a?r.push({index:i,name:a[1]}):WR.test(n[i])&&(o=!0)}let s={segments:n,params:r,hasWildcard:o,pattern:t};return BR.set(t,s),s},bx=(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=yx(l),u=K3(o,f);u>a&&(a=u,i=l,c=G3(o,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},K3=(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(HR.test(n[i]))o+=1;else if(WR.test(n[i]))o+=.5;else return-1;return o},G3=(t,e)=>{let n={};for(let{index:r,name:o}of e.params)t[r]&&(n[o]=decodeURIComponent(t[r]));return n},_x=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},wx=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},sf=(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},Y3=(t,e)=>{let n=e.customRouterElement;if(!n||!t.__ref||t.__ref.root!==t)return t;let r=sf(t,n);return!r||r===t?t:(t.routes&&(r.routes=t.routes),r)},Sx=(t=0,e)=>{e||(e=typeof T<"u"?T.location.pathname:"/");let r=e.split("/")[t+1];if(r)return`/${r}`},Ui,Xp=0,UR=0,X3=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,Z3=t=>t&&(t.scrollingElement||t.documentElement)||null,qR={level:Xp,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},KR=(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},GR=t=>{let e=t.__routeExit;e&&(t.__routeExit=null,e.abort())},Q3=(t,e,n,r,o,s,i)=>{let a=e.__routeExit;if(a&&a.page===n)return a.wait;if(GR(e),!n||!n.node||typeof t.onRouteExit>"u"||!KR(s,i))return null;let c=typeof o=="number"&&o>=0?o:qR.exitTimeout,l=typeof AbortController=="function"?new AbortController:null,f={...r,page:n,timeout:c,signal:l?l.signal:void 0},u;try{u=Pn("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(h=>{let g=setTimeout(()=>{d.abort(),h()},c),p=()=>{clearTimeout(g),h()};u.then(p,p)}),e.__routeExit=d,d.wait},of=new WeakMap,J3=t=>t===!0?{}:t&&typeof t=="object"&&!Array.isArray(t)?t:null,t4=(t,e,n,r)=>{let o=J3(t.transition);return!o||!e||Gp(e.content)||!n||typeof n.startViewTransition!="function"||of.get(n)>0||!KR(n,r)?null:o},e4=t=>{let e=t.__routeTransition;if(!(!e||e.updating))try{e.transition.skipTransition()}catch{}},n4=t=>{let e=typeof t.types=="string"?[t.types]:t.types;return Array.isArray(e)?e.filter(n=>typeof n=="string"&&n):[]},r4=t=>{try{let e=t&&t.ViewTransition;return!!e&&"types"in e.prototype}catch{return!1}},o4=100,s4=1e3,VR=(t,e)=>t===!1?1/0:typeof t=="number"&&t>=0?t:e,zR=t=>{let e=t&&t.performance;return e&&typeof e.now=="function"?e.now():Date.now()},i4=t=>{t&&typeof t.then=="function"&&t.then(null,()=>{})},a4=(t,e,n,r,o,s,i)=>{let a=t.node,c=a&&a.style,l=typeof n.name=="string"&&n.name?n.name:null,f=e.__routeTransition,u={transition:null,updating:!1,name:l,previousName:f&&f.name&&c?f.previousName:c&&c.viewTransitionName||""},d=()=>{if(e.__routerNavSeq===s){u.updating=!0,u.swapStarted=zR(o),of.set(r,(of.get(r)||0)+1);try{i()}finally{of.set(r,of.get(r)-1),u.updating=!1}}},h=()=>{l&&c&&c.viewTransitionName===l&&(c.viewTransitionName=u.previousName)};l&&c&&(c.viewTransitionName=l);let g=n4(n),p=null;try{p=g.length&&r4(o)?r.startViewTransition({update:d,types:g}):r.startViewTransition(d)}catch{}if(!p)return h(),null;u.transition=p,e.__routeTransition=u,i4(p.ready);let m=!1,y=null,S=()=>{m=!0,y!==null&&(o.clearTimeout(y),y=null),e.__routeTransition===u&&(e.__routeTransition=null,h())},b=()=>{if(!(m||e.__routeTransition!==u))try{p.skipTransition()}catch{}};p.finished&&typeof p.finished.then=="function"?p.finished.then(S,S):S();let k=VR(n.swapBudget,o4),x=VR(n.timeout,s4);x!==1/0&&p.ready&&typeof p.ready.then=="function"&&o&&typeof o.setTimeout=="function"&&p.ready.then(()=>{m||(y=o.setTimeout(()=>{y=null,b()},x))},()=>{});let w=p.updateCallbackDone;return!w||typeof w.then!="function"?Promise.resolve():(k!==1/0&&w.then(()=>{u.swapStarted!==void 0&&zR(o)-u.swapStarted>k&&b()},()=>{}),w)},rn=async(t,e,n={},r={})=>{let o=e||void 0,s=o?.context?.window||T,i=o?.context?.document||ut,a={...qR,...o.context.routerOptions,...r};Xp=a.lastLevel,o=Y3(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=X3(t);let u=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,d=new u(f+t),{pathname:h,search:g,hash:p}=d,m=_x(g),y=o.node,S=p&&p!==s.location.hash.slice(1),b=h!==Ui,k=Ui,x=++UR;Ui=h;let w=()=>{UR===x&&(Ui=k)},_=c.__routerRendered,A,C,D,$;if(a.useParamsMatching){let U=bx(h,o.routes,a.level);A=U.key,C=U.routePath,D=U.content,$=U.params}else{A=Sx(a.level,h),C=A;let U=o.routes;D=U?U[A||"/"]||U["/*"]:null,$={}}a.scrollNode===void 0&&(a.scrollNode=Z3(i));let I=a.scrollToNode?y:a.scrollNode;if(o.state?.root?.debugging){o.state.root.debugging=!1;return}let N=kR(s,a,I);if(N&&N.pop&&N.pop.echo)return;if(!D){w(),a.onNotFound?a.onNotFound({pathname:h,route:A,element:o}):(a.silent||console.warn("[smbls/router] no content matched for path",h,"\u2014 available routes:",Object.keys(o.routes||{})),a.event&&a.event.type==="popstate"&&ER(N,c,s));return}if(a.guards&&a.guards.length){let U={pathname:h,route:A,params:$,query:m,hash:p,element:o,state:n},it=await wx(a.guards,U);if(it===!1){w(),ux(N);return}if(typeof it=="string"){let H=!!(N&&N.pop);if(H&&!fx(N))return;let z={...r,guards:[]};return H&&(z.event=void 0),(H||a.initialRender)&&(z.pushState=!0,z.replace=!0),rn(it,e,n,z)}}let K=FR(D,o,o.routes);if(K&&K.rematch)return rn(t,o,n,r);K&&(D=K.content,a.lazy={group:K.group,status:K.status});let et=c.__routerNavSeq=(c.__routerNavSeq||0)+1,st=!_||_.content!==D||_.route!==A,xt=b||st||a.force===!0;if(xt&&_&&!Gp(_.content)){let U=Q3(o,c,o[l],{from:_.route,to:A,pathname:h,params:$,query:m,hash:p},a.exitTimeout,i,s);if(U&&(await U,c.__routerNavSeq!==et||(c.__routeExit&&c.__routeExit.wait===U&&(c.__routeExit=null),typeof o?.set!="function")))return}else GR(c);let kt=xt?t4(a,_,i,s):null;if(xt&&e4(c),a.pushState){let U=h+(g||"")+(p||"");AR(N,n,U,a.replace,s)}else N&&fx(N);vR(c,s);let Rt=()=>{let U=!!_&&!!I&&I.scrollTop===0&&!I.scrollLeft,H=b||!S?{route:A,routePath:C,hash:p,params:$,query:m,debugging:!1}:{params:$,query:m};if(a.updateState&&o.state.update(H,{preventContentUpdate:!0}),xt){l&&a.removeOldElement&&o[l].remove();let Q=o.__ref?.origin?.content,Z={};if(Q)for(let zt in Q){let bt=Q[zt];zt==="__ref"||zt==="props"||zt==="node"||zt==="parent"||zt==="key"||(typeof bt=="string"||typeof bt=="number"||typeof bt=="boolean"||typeof bt=="object"&&bt!==null&&!bt.node&&!bt.__ref)&&(Z[zt]=bt)}let be={...Z,...typeof D=="object"?D:{extends:D}};a.useFragment&&(be.tag="fragment");let Vt={content:D,route:A},_e=c.__routerRendered;try{if(typeof o?.set!="function")return;c.__routerRendered=Vt,o.set(be,{contentElementKey:l})}catch(zt){c.__routerRendered===Vt&&(c.__routerRendered=_e),console.error("[smbls/router] failed to render route content",h,zt)}}let z=!b&&S,W=CR(N,I,a,i);if(!W&&a.scrollToTop&&!z&&!U&&I?.scrollTo&&I.scrollTo({...a.scrollToOptions||{},top:0,left:0}),!W&&a.scrollToNode&&D[l]?.node?.scrollTo&&D[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),!W&&p){let Q=i.getElementById(p.slice(1));if(Q&&I?.scrollTo){let Z=s.getComputedStyle?s.getComputedStyle(Q):null,be=Z&&parseFloat(Z.scrollMarginTop)||0,Vt=Q.getBoundingClientRect().top+I.scrollTop-be-(a.scrollToOffset||0);I.scrollTo({...a.scrollToOptions||{},top:Vt,left:0})}}K&&jR(o,K,Q=>rn(t,o,n,{...r,...Q})),Pn("routeChanged",o,a)},Zt=kt?a4(o,c,kt,i,s,et,Rt):null;if(Zt){await Zt;return}Rt()},c4=rn;var l4=(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")},YR=(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||l4(t,e))return;let{utils:c,snippets:l,functions:f,routerOptions:u}=r,d=e.__ref.root,h=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&&!h){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let y of p){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||rn)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}},xx={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>$r(t,t.href)||$r(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:YR},XR={extends:"Link"},kx={onClick:YR},ZR={extends:[xx,kx]};var Ex={};j(Ex,{Select:()=>QR});var QR={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 Ax={};j(Ax,{Button:()=>JR,ButtonSet:()=>rP,CircleButton:()=>eP,IconButton:()=>oP,KangorooButton:()=>nP,SquareButton:()=>tP});var JR={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)},tP={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"},eP={extends:"SquareButton",round:"C"},nP={extends:"Button",childExtends:"IconText"},rP={tag:"nav",display:"flex",childExtends:"SquareButton"},oP={extends:["SquareButton","ClickableItem"],round:"Z"};var Cx={};j(Cx,{Dialog:()=>sP,DialogFooter:()=>aP,DialogHeader:()=>iP});var sP={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},iP={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},aP={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 Dx={};j(Dx,{Tooltip:()=>hP,TooltipHidden:()=>gP,TooltipLayer:()=>Lx,TooltipParent:()=>mP});M();var f4='[data-tooltip]:not([data-tooltip=""])',cP={top:1,bottom:1,left:1,right:1},Tx={top:"bottom",bottom:"top",left:"right",right:"left"},Wo=6,lP=new WeakMap,u4=0,ge=t=>{let e=lP.get(t);return e||(e={id:"smbls-tooltip-"+ ++u4,hover:null,focus:null,shown:null,dismissed:null,showTimer:null,hideTimer:null},lP.set(t,e)),e},Ox=t=>{let e=t&&t.nodeType!==1?t.parentElement:t;return e&&typeof e.closest=="function"?e:null},d4=t=>{let e=t.parent&&t.parent.node;return e&&e.nodeType===1?e:null},p4=t=>{for(let e=t.firstElementChild;e;e=e.nextElementSibling)if(e.hasAttribute("data-tooltip-layer"))return!0;return!1},fP=(t,e)=>{let n=d4(t);if(!e||!n)return null;let r;try{r=e.closest(f4)}catch{return null}if(!r||!n.contains(r))return null;for(let o=r;o&&o!==n;o=o.parentElement)if(p4(o))return null;return r},h4=(t,e)=>!!(e&&t.node&&t.node.contains(e)),g4=t=>{try{return t.matches(":focus-visible")}catch{return!0}},uP=(t,e)=>typeof t=="number"&&t>=0?t:e,th=t=>{t.showTimer&&(clearTimeout(t.showTimer),t.showTimer=null),t.hideTimer&&(clearTimeout(t.hideTimer),t.hideTimer=null)},Rx=t=>!!(t.node&&t.node.isConnected&&t.state&&typeof t.state.update=="function"),m4=(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(" "))},Px=(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")},y4=(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)+Wo;s[n]<i(n)&&s[Tx[n]]>=i(Tx[n])&&(n=Tx[n]);let a,c;n==="top"||n==="bottom"?(a=t.left+(t.width-e.width)/2,c=n==="bottom"?t.bottom+Wo:t.top-e.height-Wo):(c=t.top+(t.height-e.height)/2,a=n==="right"?t.right+Wo:t.left-e.width-Wo);let l=(f,u)=>Math.max(Wo,Math.min(u-Wo,f));return{left:l(a,r-e.width),top:l(c,o-e.height),side:n}},b4=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}},_4=t=>(t.title||"")+(t.description||""),Qp=(t,e=0)=>{let r=ge(t).shown;if(!r||!Rx(t))return;if(!r.isConnected){Jp(t);return}let o=t.node,s=t.state;if(o.textContent!==_4(s)){e<3&&setTimeout(()=>Qp(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=b4(o),u=r.getAttribute("data-tooltip-placement"),d=cP[u]?u:cP[t.tooltipPlacement]?t.tooltipPlacement:"bottom",h=y4(i,{width:a.width,height:a.height},d,f.width,f.height);s.update({x:Math.round(h.left-c),y:Math.round(h.top-l),side:h.side,placed:!0})},w4=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},dP=(t,e)=>{let n=ge(t);th(n),!(!Rx(t)||!e.isConnected)&&(n.shown&&n.shown!==e&&Px(n.shown,n.id),n.shown=e,m4(e,n.id),t.state.update({open:!0,placed:!1,title:e.getAttribute("data-tooltip")||"",description:e.getAttribute("data-tooltip-description")||""}),w4(()=>Qp(t)))};function Jp(t){let e=ge(t);th(e),e.shown&&Px(e.shown,e.id),e.shown=null,Rx(t)&&t.state.open&&t.state.update({open:!1})}var Zp=(t,e)=>{let n=ge(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){th(n);return}if(!r){if(n.showTimer&&(clearTimeout(n.showTimer),n.showTimer=null),!n.shown||n.hideTimer)return;if(e){Jp(t);return}n.hideTimer=setTimeout(()=>{n.hideTimer=null,Jp(t)},uP(t.tooltipHideDelay,100));return}if(n.hideTimer&&(clearTimeout(n.hideTimer),n.hideTimer=null),e||n.shown){dP(t,r);return}n.showTimer&&clearTimeout(n.showTimer),n.showTimer=setTimeout(()=>{n.showTimer=null,dP(t,r)},uP(t.tooltipDelay,250))},pP=t=>{let e=ge(t);e.shown&&(e.dismissed=e.shown,Jp(t))},Lx={role:"tooltip",id:t=>ge(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=ge(e),r=Ox(t.target),o=h4(e,r)?n.shown:fP(e,r);o===n.hover&&(o||!n.shown)||(n.hover=o,Zp(e,!1))}},onDocumentPointerout:{capture:!0,passive:!0,handler:(t,e)=>{if(t.relatedTarget)return;let n=ge(e);n.hover&&(n.hover=null,Zp(e,!1))}},onDocumentPointerdown:{capture:!0,passive:!0,handler:(t,e)=>{let n=ge(e),r=Ox(t.target);n.shown&&r&&n.shown.contains(r)&&pP(e)}},onDocumentFocusin:{capture:!0,handler:(t,e)=>{let n=ge(e),r=Ox(t.target),o=r&&g4(r)?fP(e,r):null;o!==n.focus&&(n.focus=o,Zp(e,!0))}},onDocumentFocusout:{capture:!0,handler:(t,e)=>{if(t.relatedTarget)return;let n=ge(e);n.focus&&(n.focus=null,Zp(e,!0))}},onDocumentKeydown:{capture:!0,handler:(t,e)=>{(t.key==="Escape"||t.key==="Esc")&&pP(e)}},onDocumentScroll:{capture:!0,passive:!0,handler:(t,e)=>{ge(e).shown&&Qp(e)}},onWindowResize:(t,e)=>{ge(e).shown&&Qp(e)},onBeforeRemove:t=>{let e=ge(t);th(e),e.shown&&Px(e.shown,e.id),e.shown=e.hover=e.focus=e.dismissed=null}};var hP={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=>Lt(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)}},gP={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)}},mP={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 Ix={};j(Ix,{Avatar:()=>yP});var S4=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)},yP={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=S4(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 Mx={};j(Mx,{Range:()=>bP});var bP={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:qs("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:qs("#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 $x={};j($x,{Dropdown:()=>_P,DropdownList:()=>wP,DropdownParent:()=>SP,DropdownParentFocus:()=>xP,DropdownSiblingFocus:()=>kP});var _P={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"},wP={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"}}},SP={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},xP={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()}}},kP={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 Nx={};j(Nx,{Notification:()=>vP});var vP={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 qo=Object.assign({},OS,RS,PS,LS,IS,FS,jS,BS,$S,US,VS,NS,zS,HS,WS,qS,KS,GS,YS,XS,ZS,QS,JS,vx,Ex,Ax,Cx,Dx,Ix,Mx,$x,Nx);function eh(t){if(t==null)return 0;if(typeof t!="object")return EP(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let r=0;r<t.length;r++)e=(e^eh(t[r]))*16777619;return e>>>0}let n=Object.keys(t).sort();for(let r=0;r<n.length;r++)e=(e^EP(n[r]))*16777619,e=(e^eh(t[n[r]]))*16777619;return e>>>0}function EP(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e}function nh(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(!nh(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)||!nh(t[s],e[s]))return!1}return!0}function Fx(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=Fx(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 jx(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])?jx(t[r],o,n):t[r]=o}return t}function Br(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 Hi(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function af(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Br(e)}function AP(t){return t.split(`
|
|
88
|
-
`).map(
|
|
89
|
-
`)}var
|
|
90
|
-
${c}`}var
|
|
91
|
-
`)}function
|
|
92
|
-
${a}`}var Bx=null;function oh(t){Bx=t}var on={structuralHash:eh,deepEqual:nh,mergeStructural:Fx,overwriteDeep:jx,shortHash:Br,toKebab:Hi,sanitizeValue:af,batchShortHash:AP,atomicCssClass:TP,batchAtomicCss:RP,compoundCssClass:PP},LP=!1,rh=null;function DP(t){return rh||(rh=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(on.structuralHash=e.structuralHash),e.deepEqual&&(on.deepEqual=e.deepEqual),e.mergeStructural&&(on.mergeStructural=e.mergeStructural),e.overwriteDeep&&(on.overwriteDeep=e.overwriteDeep),e.shortHash&&(on.shortHash=e.shortHash),e.toKebab&&(on.toKebab=e.toKebab),e.sanitizeValue&&(on.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(on.batchShortHash=e.batchShortHash),e.atomicCssClass&&(on.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(on.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(on.compoundCssClass=e.compoundCssClass),LP=!0,Bx&&e.batchAtomicCss&&Bx({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),rh)}function IP(){return LP}M();var cf={};j(cf,{CDN_PROVIDERS:()=>Ie,DOMQL_EVENTS:()=>ym,DOMQ_PROPERTIES:()=>cr,ELEMENT_METHOD_OVERRIDE_POINTS:()=>_s,ENV:()=>Bm,HTML_TAGS:()=>As,LIBRARY_PACKAGES:()=>xd,LIBRARY_SCOPES_KEY:()=>yo,METHODS:()=>fr,METHODS_EXL:()=>Ra,NODE_ENV:()=>Ge,OPTIONS:()=>rc,PACKAGE_MANAGER_TO_CDN:()=>_r,PARSED_DOMQ_PROPERTIES:()=>Oa,POLYGLOT_LANG_STORAGE_KEY:()=>gd,PROPS_METHODS:()=>lr,REVIVED_MARK:()=>$a,STATE_METHODS:()=>to,STATE_PROPERTIES:()=>gm,SVG_TAGS:()=>gv,TYPES:()=>xa,UNIVERSAL_RESERVED_KEYS:()=>hd,__resetBuiltinMethodWarnings:()=>Nb,addCaching:()=>ju,addContext:()=>Fu,addExtend:()=>ly,addExtends:()=>dn,addItemAfterEveryElement:()=>nm,addProtoToArray:()=>Ea,addRef:()=>Mu,alternateLinkKey:()=>go,applyCSS:()=>zx,applyDependentState:()=>Ty,applyEvent:()=>Wu,applyEventUpdate:()=>qu,applyExtends:()=>bv,applyProps:()=>Xa,arrayContainsOtherArray:()=>Yg,arraysEqual:()=>om,arrayzeValue:()=>wo,bareLibraryKey:()=>Ic,bindLibraryGlobalScopes:()=>$c,buildImgSrcset:()=>Uc,buildSourcesAndImg:()=>Vc,cache:()=>Dy,call:()=>db,captureSnapshot:()=>hb,checkForStateTypes:()=>vy,checkIfInherits:()=>Hu,checkIfStringIsInArray:()=>am,clone:()=>Em,cloneAndMergeArrayExtend:()=>Va,cloneFunction:()=>Km,collectExtendsList:()=>Cs,concatAddExtends:()=>iy,copyJavaScriptToClipboard:()=>zb,copyStringToClipboard:()=>Vb,createBasedOnType:()=>Iu,createElement:()=>ky,createElementExtends:()=>xu,createExtends:()=>Ha,createExtendsFromKeys:()=>Ts,createExtendsStack:()=>Au,createIfConditionFlag:()=>Gm,createInheritedState:()=>Ey,createKey:()=>Ba,createNestedObject:()=>Dm,createNestedObjectByKeyPath:()=>Cy,createObjectWithoutPrototype:()=>hu,createParent:()=>$u,createPath:()=>Nu,createProps:()=>Za,createPropsStack:()=>Lu,createRoot:()=>xy,createScope:()=>Ry,createSnapshotId:()=>ja,customDecodeURIComponent:()=>hm,customEncodeURIComponent:()=>pm,cutArrayAfterValue:()=>tm,cutArrayBeforeValue:()=>Jg,debounce:()=>Ua,debounceOnContext:()=>Wm,decodeNewlines:()=>dm,deepClone:()=>ft,deepContains:()=>Pm,deepDefaults:()=>Bs,deepDestringifyFunctions:()=>ie,deepExtend:()=>Su,deepMerge:()=>ct,deepMergeExtends:()=>pn,deepStringifyFunctions:()=>Da,defineSetter:()=>fb,destringifyGlobalScope:()=>ao,detectHeightOnInit:()=>_b,detectInfiniteLoop:()=>Nm,document:()=>ut,encodeNewlines:()=>um,error:()=>uo,escapeHtml:()=>G,excludeKeysFromObject:()=>jm,exec:()=>ht,exposeBagGlobalScopes:()=>Nc,extendCachedRegistry:()=>ay,extendStackRegistry:()=>Wa,extractArrayExtend:()=>Ka,faviconLinkKey:()=>Sr,fetchLibraryData:()=>kd,fibonacciNumberByIndex:()=>wb,fileEntryUrl:()=>yd,filterArrays:()=>sm,filterArraysFast:()=>im,finalizeExtends:()=>Cu,findClosestNumber:()=>bd,findClosestNumberInFactory:()=>Lb,findInheritedState:()=>zu,findKeyPosition:()=>lm,flattenExtend:()=>Os,formatDate:()=>bb,generateHash:()=>bu,generateHeadArrayTags:()=>js,generateKey:()=>Fa,generateMetaTags:()=>Rb,get:()=>ib,getActiveRoute:()=>Sx,getCDNDirUrl:()=>md,getCDNUrl:()=>Xe,getCapitalCaseKeys:()=>dy,getCdnProviderFromConfig:()=>Ns,getChildStateInKey:()=>Vu,getChildren:()=>lb,getContext:()=>kc,getCookie:()=>Jm,getDB:()=>Tc,getEmotionStylesheet:()=>Kb,getExtendsInElement:()=>fy,getExtendsStack:()=>za,getExtendsStackRegistry:()=>wu,getFrequencyInArray:()=>Xg,getFunctionSource:()=>Se,getHashedExtend:()=>qa,getImportMapScript:()=>yb,getInObjectByPath:()=>$m,getLocalStorage:()=>ey,getNev:()=>Hm,getPageMetadata:()=>Pb,getParentStateInKey:()=>Uu,getPath:()=>yc,getQuery:()=>Oc,getRef:()=>cb,getRoot:()=>wc,getRootContext:()=>xc,getRootData:()=>Sc,getRootState:()=>_c,getRootStateInKey:()=>Bu,getSpreadChildren:()=>py,global:()=>qg,hasFunction:()=>Qt,hasHandlerPlugin:()=>ks,hasOwnProperty:()=>Tm,hashContent:()=>yn,inheritChildExtends:()=>vu,inheritChildPropsExtends:()=>ku,inheritParentProps:()=>Qa,inheritRecursiveChildExtends:()=>Eu,init:()=>Zn,initProps:()=>_y,is:()=>se,isArray:()=>L,isBoolean:()=>iu,isBuiltinElementMethod:()=>mm,isContextComponent:()=>hy,isCyclic:()=>Fm,isDOMNode:()=>re,isDate:()=>cu,isDefined:()=>Lt,isDevelopment:()=>dr,isEmpty:()=>du,isEmptyObject:()=>Om,isEqualDeep:()=>pu,isFailedRevival:()=>so,isFunction:()=>R,isHtmlElement:()=>wa,isLazyFunction:()=>Am,isLocal:()=>zm,isLoudDevRuntime:()=>J,isMalformedDependency:()=>po,isMethod:()=>pb,isMobile:()=>Zm,isNode:()=>On,isNot:()=>Gg,isNotProduction:()=>Rn,isNull:()=>au,isNumber:()=>oe,isObject:()=>E,isObjectLike:()=>q,isPhoto:()=>Sb,isPolyglotRetranslatableKey:()=>nc,isPolyglotWritableKey:()=>lo,isProduction:()=>ur,isProtectedElementMethod:()=>eo,isRevived:()=>io,isStaging:()=>Vm,isState:()=>Ay,isString:()=>v,isStringFunction:()=>xs,isStringTag:()=>Ma,isTest:()=>mu,isTesting:()=>Um,isUndefined:()=>$t,isUniversallyReservedKey:()=>gb,isUnresolvableDependency:()=>wr,isValidDependencyMap:()=>ho,isValidHtmlTag:()=>ry,isWrappedLibrary:()=>Ze,joinArrays:()=>ms,jointStacks:()=>cy,jsonForScript:()=>sc,keys:()=>dd,lastLevel:()=>Xp,lastPathname:()=>Ui,libraryPackageSpecs:()=>Us,librarySpecsFor:()=>Sd,loadCssFile:()=>Eb,loadJavascript:()=>Ab,loadJavascriptFile:()=>xb,loadJavascriptFileEmbedSync:()=>vb,loadJavascriptFileSync:()=>kb,loadLazy:()=>mx,loadRemoteCSS:()=>Cb,loadRemoteScript:()=>Fs,log:()=>ub,logGroupIf:()=>Xm,logIf:()=>Ym,lookdown:()=>ob,lookdownAll:()=>sb,lookup:()=>rb,lowercaseFirstLetter:()=>Jr,makeObjectWithoutPrototype:()=>Rm,map:()=>vm,mapStringsWithContextComponents:()=>Ga,markPolyglotSeeded:()=>gn,markRevived:()=>Ss,matchRoute:()=>bx,matchesComponentNaming:()=>hn,memoize:()=>qm,merge:()=>vt,mergeSharedLibraries:()=>Fc,mergeSharedLibraryDesignSystems:()=>jc,nextElement:()=>Ec,normalizeIgnoreList:()=>Mc,normalizeLibraryKey:()=>bo,objectToString:()=>Ia,objectizeStringProperty:()=>Ya,overwrite:()=>Na,overwriteDeep:()=>Jt,overwriteShallow:()=>co,overwriteState:()=>Oy,parse:()=>pd,parseDeep:()=>gc,parseQuery:()=>_x,parseRoutePattern:()=>yx,pickupElementFromProps:()=>Ru,pickupPropsFromElement:()=>Ou,polyglotFallbackLang:()=>Rc,polyglotLangStorageKey:()=>Is,polyglotSeededKeys:()=>hr,previousElement:()=>Ac,promoteActiveRootState:()=>Ls,propExists:()=>yy,propertizeElement:()=>Pu,propertizeUpdate:()=>my,reinit:()=>Vx,remove:()=>pE,removeChars:()=>Hb,removeCookie:()=>ty,removeDuplicateProps:()=>tc,removeDuplicatesInArray:()=>ys,removeFromArray:()=>Zg,removeFromObject:()=>Lm,removeNestedKeyByPath:()=>Im,removeValueFromArray:()=>va,removeValueFromArrayAll:()=>em,reorderArrayByValues:()=>rm,repairLegacyArrowScopePreamble:()=>Pa,replaceLiteralsWithObjectFields:()=>Ft,replaceOctalEscapeSequences:()=>fm,resolveAsset:()=>ae,resolveFileReferences:()=>mo,resolveHandler:()=>vs,resolveRouterElement:()=>sf,resolveSharedLibraries:()=>Ub,returnValueAsText:()=>Du,router:()=>rn,runGuards:()=>wx,runPluginHook:()=>pr,saveScrollPosition:()=>nf,scopeElementParam:()=>lu,scopeReceiverExpression:()=>Sm,scratchSystem:()=>ii,scratchUtils:()=>Er,self:()=>Kg,set:()=>Do,setActiveRootState:()=>bc,setCookie:()=>Qm,setHashedExtend:()=>_u,setInObjectByPath:()=>Mm,setLocalStorage:()=>ny,setNodeStyles:()=>ud,setProps:()=>ab,setPropsPrototype:()=>Ja,sharedLibrary:()=>$b,splitPackageSpecifier:()=>Pc,spotByPath:()=>mc,srcsetFor:()=>zs,stringIncludesAny:()=>Ca,stringToObject:()=>Cm,stripVersionRangePrefix:()=>Lc,swapItemsInArray:()=>Qg,syncProps:()=>ec,toCamelCase:()=>_o,toDashCase:()=>Bc,toDescriptionCase:()=>qb,toPriorityOrder:()=>Le,toTitleCase:()=>Wb,toggleFullscreen:()=>mb,triggerEventOn:()=>Pn,triggerEventOnUpdate:()=>Py,trimStringFromSymbols:()=>cm,unstackArrayOfObjects:()=>ka,update:()=>by,updateProps:()=>wy,variables:()=>Cc,verbose:()=>Ds,warn:()=>vc,warnLibraryAliasCollision:()=>Vs,window:()=>T});M();M();M();var O4={group:"group",imagePair:"image-pair","image-pair":"image-pair",old:"old",new:"new"},R4=/^(?:\*|\.?-?[_a-zA-Z][\w-]*)$/,P4=/^-?[_a-zA-Z][\w-]*$/,L4=new Set(["root","*"]),D4="@media (prefers-reduced-motion: no-preference)",I4="@media (prefers-reduced-motion: reduce)",M4=(t,e)=>{let n=v(t)?{animation:t}:E(t)?t:null;if(!n)return null;let r;try{r=Xt(n,e)}catch{return null}let o={};for(let s in r){let i=r[s];(v(i)||oe(i))&&(o[s]=i)}return Object.keys(o).length?o:null},MP=(t,e,n={})=>{if(!E(t))return null;let r=!n.scope||n.scope===":root",o=l=>{n.verbose!==!1&&console.warn("[smbls] designSystem.viewTransition: "+l)},s={key:"viewTransition",state:{},context:{designSystem:e}},i={},a={},c=(l,f,u)=>{for(let d in f){if(d==="types"&&!u)continue;let h=O4[d];if(!h){o(`${l}.${d} is not a view-transition part (group, imagePair, old, new)`);continue}let g=`${u}::view-transition-${h}(${l})`,p=M4(f[d],s);p&&(i[g]=p,a[g]={animation:"none"})}};for(let l in t){let f=t[l];if(E(f)){if(!R4.test(l)){o(`"${l}" is not a view-transition name`);continue}if(!r&&L4.has(l)){o(`"${l}" belongs to the document's primary app; a scoped app (${n.scope}) emits its own names only`);continue}if(c(l,f,""),E(f.types))for(let u in f.types){if(!P4.test(u)||!E(f.types[u])){o(`${l}.types.${u} is not a view-transition type with parts`);continue}c(l,f.types[u],`:root:active-view-transition-type(${u})`)}}}return Object.keys(i).length?{[D4]:i,[I4]:a}:null};var $4=O(),$P=(t=$4,e)=>{let n=E(e.localFile)?e.localFile:{},r=ft(n.designSystem||{});return ct(t,r,ve)},N4={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},sh=(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},Ux=(t,e)=>{t.CSS_MEDIA_VARS&&St(sh(t.CSS_MEDIA_VARS,e));let n=Lo(t.cssSkinVars,t.cssSkinFallback,e);Object.keys(n).length&&St(n)},NP=(t,e)=>{let n=MP(t.viewTransition,t,{scope:e,verbose:t.verbose});n&&St(n)},Zn=(t,e=N4)=>{let n=$P(t||{},e),r=e.scopeSelector||":root",o=e.globalTheme;if(typeof window<"u"&&window.location){let p=new URLSearchParams(window.location.search).get("globalTheme");p&&(o=p)}let s=Do({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=Kc(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=t.svg,d=s.useIconSprite,h=t.icons;l&&St(i),c&&(St({[r]:s.CSS_VARS}),Ux(s,r)),a&&St(s.reset);let g=s.animation;if(g){let p={};for(let m in g)p[`@keyframes ${m}`]=g[m];St(p)}return NP(s,r),(u||f)&&_l(s.svg,{document:e.document}),(h||d)&&Po(s.icons,{document:e.document}),s},ih={},Vx=(t,e=ih)=>{let n=$P(t||{},e),r=e.scopeSelector||":root",o=Do({verbose:!1,...n});return e.preventInject||(St({[r]:o.CSS_VARS}),Ux(o,r),St(o.reset),NP(o,r)),o},zx=(t,e=ih)=>{St(t)},F4=(t,e=ih)=>{let n=e.scopeSelector||":root";St({[n]:t.CSS_VARS}),Ux(t,n)};var j4=(t,e=ih)=>{};M();var jP=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,B4=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},Wx={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},U4=(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},lf=(t,e)=>(sf||U4)(t,e),V4=["manual","auto","restore"],Hx=new WeakMap,FP=(t,e)=>{let n=e.claims[e.claims.length-1],r=n?n.value:e.found;t.scrollRestoration!==r&&(t.scrollRestoration=r)},z4=(t,e)=>{let n=e&&e.scrollRestoration;if(n!=null){if(!V4.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=Hx.get(o);s||(s={found:o.scrollRestoration,claims:[]},Hx.set(o,s));let i={value:n==="restore"?"manual":n};s.claims.push(i),FP(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||Hx.delete(o);try{FP(o,s)}catch{}}})}catch{}}},H4=(t,e)=>{if(!e||e.scrollRestoration!=="restore")return;let n=nf,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)})},BP=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=Wx:e.router=vt(e.router||{},Wx);let n=e.router;z4(e,n),H4(e,n);let r=async(s,i)=>{let a=s.context?.window||T,c=B4(n);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=jP(f),c=f+u+d}let l=s;if(n.customRouterElement){let f=lf(s,n.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await rn(c,l,{},{initialRender:!0,pushState:!1})},o=!$t(t.onRenderRouter);return n&&n.initRouter&&!o&&(t.onRenderRouter=r),W4(e,n),n},qx=(t,e)=>{if(e.router===!1)return;let n=e.router||Wx;if(!n.popState)return;let r=e.utils&&e.utils.router?e.utils.router:rn,o=e.window||T,s=async i=>{let{pathname:a,search:c,hash:l}=o.location;a=jP(a);let f=a+c+l,u=t;if(n.customRouterElement){let d=lf(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))},W4=(t,e)=>{let{components:n}=t;if(e&&e.injectRouterInLinkComponent)return ct(n.Link||n["smbls.Link"],n.RouterLink||n["smbls.RouterLink"])};M();var UP=T&&T.location&&typeof T.location.host=="string"?T.location.host:null,Kx=UP!==null?UP.includes("dev."):dr(),VP=Kx?"http://localhost:8080/get":"https://api.symbols.app/get",q4={endpoint:VP},zP=async(t,e=q4)=>{let n=e.endpoint||VP,r=e.serviceRoute?L(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(R(e.onError))return e.onError(s);console.error(s)}},K4=async(t,e)=>{let{editor:n}=e;if(n&&n.remote){let r=await zP(t,n),o=Kx||e.isDevelopment?ie(r):ie(r.releases[0]);n.serviceRoute?L(n.serviceRoute)?n.serviceRoute.forEach(s=>{Jt(e[s],o[s.toLowerCase()])}):Jt(e[n.serviceRoute],o):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{Jt(e[s],o[s.toLowerCase()])})}return e},G4=async(t,e,n)=>{let{editor:r}=e;if(r&&r.remote){let o=await zP(t,r),s=Kx||e.isDevelopment?ie(o):ie(o.releases[0]);n(s)}},HP=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await K4(t,e)}catch(n){console.error(n)}},WP=(t,e,n,r)=>{if(e&&n.editor)try{n.editor.async&&G4(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 ff=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{Wn(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 t0={};j(t0,{Helmet:()=>dL,applyElementMetadata:()=>uh,applyMetadata:()=>J4,default:()=>m5,extractMetadata:()=>Z4,generateHeadHtml:()=>g5,helmetPlugin:()=>dh,resolveMetadata:()=>ch});M();Mt();var We={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"}},Qn=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}"]`},qP=t=>ie({v:t}).v,KP=(t,e,n,r)=>{try{return ht(t,e,n)}catch(o){console.warn(`[helmet] metadata factory for "${r}" threw; treating as unset:`,o&&o.message||o);return}},Gx=Object.freeze({authored:!0}),ch=(t,e,n,r)=>{if(!t)return{};let o=t;v(o)&&Qt(o)&&(o=qP(o));let s=R(o),i=!s&&r?.authored===!0,a=s?KP(o,e,n,"metadata"):E(o)?{...o}:{};if(!E(a))return{};for(let c in a){let l=a[c],f=i&&v(l)&&!Qt(l);v(l)&&Qt(l)&&(l=qP(l)),R(l)?l=KP(l,e,n,c):v(l)&&Qt(l)&&(l=void 0),v(l)&&l.includes("{{")&&e?.call&&(l=f?e.call("replaceLiteralsWithObjectFields",l,n,Gx):e.call("replaceLiteralsWithObjectFields",l,n)),a[c]=l}return a},Y4=t=>!!t&&typeof t=="object"&&(t.notFound===!0||t.metadata?.notFound===!0),X4=(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(Y4(t[n]))return t[n]},Z4=(t,e="/",n,r)=>{let o=t.pages||{},s=X4(o,e),i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let l=ch(t.app.metadata,n,r,Gx);i={...i,...l}}let a=new Set;if(s){let l=s.metadata||s.helmet||{},f=ch(l,n,r,Gx);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 mo(i,t.files)},JP=(t,e)=>mo(ch(t,e,e.state),e.context?.files),tL=t=>t.context?.document||typeof document<"u"&&document,eL=t=>Object.prototype.hasOwnProperty.call(We,t),lh=new Map;for(let t in We){let e=Qn(We[t]);lh.has(e)||lh.set(e,We[t])}var fh=t=>t.head||t.querySelector("head"),Zx=(t,e)=>{let n=fh(t);return n?n.querySelector(e):null},Yx=(t,e)=>e.tag==="title"?t.textContent:t.getAttribute(e.valueAttr||"content"),Qx=(t,e,n)=>{e.tag==="title"?t.textContent=n:t.setAttribute(e.valueAttr||"content",n)},Jx=(t,e)=>{let n=fh(e);if(!n)return null;let r=e.createElement(t.tag);return t.attr&&r.setAttribute(t.attr,t.key),n.appendChild(r),r},Wi=(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 Map;n.forEach((a,c)=>{i.has(a)||i.set(a,c)});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,i.get(a));c&&(c.setAttribute(e,a),o.appendChild(c))}},nL=(t,e)=>{let r=(e||[]).filter(s=>s!=null).map(s=>v(s)?s:JSON.stringify(s)),o=r.map(yn);Wi(t,"data-smbls-jsonld",o,(s,i)=>{let a=t.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=r[i],a})},rL=(t,e)=>{let n=(e||[]).filter(o=>o!=null&&String(o).trim()),r=n.map(yn);Wi(t,"data-smbls-style",r,(o,s)=>{let i=t.createElement("style");return i.textContent=String(n[s]),i})},oL=t=>(t||[]).filter(e=>e&&(v(e)?e.trim():e.src)),sL=t=>v(t)?t:String(t.src),iL=(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},Q4=(t,e)=>{let n=oL(e),r=n.map(sL);Wi(t,"data-smbls-script",r,(o,s)=>iL(t,n[s]))},aL=(t,e)=>{let n=(e||[]).filter(o=>E(o)),r=n.map(go);Wi(t,"data-smbls-alternate",r,(o,s)=>{let i=t.createElement("link");i.setAttribute("rel","alternate");for(let[a,c]of Object.entries(n[s]))i.setAttribute(a,c);return i})},cL=(t,e)=>{let n=(e||[]).filter(o=>o!=null),r=n.map(Sr);Wi(t,"data-smbls-favicon",r,(o,s)=>{let 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})},lL=(t,e)=>{let n=e?String(e):"",r=n.endsWith(".svg")?"image/svg+xml":n.endsWith(".png")?"image/png":"";Wi(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})},J4=(t,e)=>{if(!(!E(t)||!e)){for(let n in t){let r=t[n];if(r==null||!eL(n))continue;let o=We[n],s=Zx(e,Qn(o))||Jx(o,e);s&&Qx(s,o,r)}Array.isArray(t.jsonLd)&&nL(e,t.jsonLd),Array.isArray(t.styles)&&rL(e,t.styles),Array.isArray(t.scripts)&&Q4(e,t.scripts),Array.isArray(t.alternate)&&aL(e,t.alternate),Array.isArray(t.favicons)&&cL(e,t.favicons),(t.icon||t.favicon)&&lL(e,t.icon||t.favicon)}},GP=new WeakMap,Xx=new WeakMap,fL=t=>{let e=t.location;return e&&v(e.pathname)?e.pathname:null},t5=t=>{let e=GP.get(t);return e||(e={doc:t,layers:[],servedPath:fL(t),originals:new Map,owned:new Set,lists:new Set},GP.set(t,e)),e},e5=(t,e)=>{for(let n=e.parent;n&&n!==n.parent;n=n.parent)if(n===t)return!0;return!1},YP=t=>{try{return JSON.stringify(t===void 0?null:t)??null}catch{return null}},n5=t=>{if(!E(t))return!0;for(let e in t)if(t[e]!==void 0&&t[e]!==null)return!1;return!0},r5=(t,e)=>{let n=Xx.get(t);if(n)return n;let r=t5(e),o={element:t,values:null,signature:YP(null),disposed:!1,set(i){if(o.disposed)return;let a=YP(i);o.values=i,!(a!==null&&a===o.signature)&&(o.signature=a,ZP(r))},dispose(){if(o.disposed)return;o.disposed=!0;let i=r.layers.indexOf(o);if(i!==-1&&r.layers.splice(i,1),!n5(o.values))try{ZP(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(e5(t,r.layers[i].element)){s=i;break}return r.layers.splice(s,0,o),Xx.set(t,o),o},uL=(t,e,n,r)=>{let o=r5(t,e),s=Y(()=>{let a=n();o.set(a),r&&r(a)}),i=t.__ref?.__effects;i&&i.push(s,o)},o5=Qn(We.title),s5=Qn(We.description),i5=Qn(We["og:title"]),a5=Qn(We["og:description"]),c5=Qn(We["twitter:title"]),l5=Qn(We["twitter:description"]),XP=(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)},ah={jsonLd:nL,styles:rL,alternate:aL,favicons:cL,icon:lL},f5=Object.keys(ah).filter(t=>t!=="icon"),u5=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||!eL(a)||e.set(Qn(We[a]),{value:String(c),rank:o})}for(let a of f5)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 XP(e,o5,i5,c5),XP(e,s5,a5,l5),{tags:e,lists:n,scripts:r}},d5=(t,e,n)=>{let{doc:r,originals:o}=t,s=lh.get(e),i=Zx(r,e),a=o.get(e);a||(a={value:i?Yx(i,s):null,rendered:!1},o.set(e,a)),a.value===n&&(a.rendered=!0),i||(i=Jx(s,r)),i&&(Yx(i,s)!==n&&Qx(i,s,n),t.owned.add(e))},p5=(t,e)=>{let{doc:n}=t;t.owned.delete(e);let r=lh.get(e),o=Zx(n,e),s=t.originals.get(e);if(s&&s.value!==null&&!s.rendered&&fL(n)===t.servedPath){let a=o||Jx(r,n);a&&Yx(a,r)!==s.value&&Qx(a,r,s.value)}else o&&o.remove()},h5=(t,e)=>{let n=oL(e);if(!n.length)return;let r=fh(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=sL(s);if(o.has(i))continue;let a=iL(t,s);a.setAttribute("data-smbls-script",i),r.appendChild(a),o.add(i)}},ZP=t=>{let{doc:e}=t;if(!fh(e))return;let{tags:n,lists:r,scripts:o}=u5(t.layers);for(let s of[...t.owned])n.has(s)||p5(t,s);for(let[s,{value:i}]of n)d5(t,s,i);for(let s in ah)r[s]!==void 0?(ah[s](e,r[s]),t.lists.add(s)):t.lists.delete(s)&&ah[s](e,null);h5(e,o)},g5=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>${G(s)}</title>`);continue}if(o==="viewport"){r||(e.push(`<meta name="viewport" content="${G(s)}">`),r=!0);continue}if(o==="canonical"){e.push(`<link rel="canonical" href="${G(s)}">`);continue}if(o==="icon"||o==="favicon"){let f=G(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,h])=>`${d}="${G(h)}"`).join(" ");e.push(`<link rel="icon" ${u} data-smbls-favicon="${G(Sr(f))}">`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${G(f)}" data-smbls-favicon="${G(Sr(f))}">`)});continue}if(o==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(E(f)){let u=Object.entries(f).map(([d,h])=>`${d}="${G(h)}"`).join(" ");e.push(`<link rel="alternate" ${u} data-smbls-alternate="${G(go(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="${G(f)}" content="${G(s)}">`)}else if(o.startsWith("itemprop:")){let f=o.replace("itemprop:","");e.push(`<meta itemprop="${G(f)}" content="${G(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${G(o)}" content="${G(f)}">`)):e.push(`<meta property="${G(o)}" content="${G(s)}">`):l?e.push(`<meta name="${G(o)}" content="${G(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${G(o)}" content="${G(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${G(o)}" content="${G(s)}">`)}return r||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),e.push(...js(t)),e.join(`
|
|
93
|
-
`)},dL={define:{metadata:(t,e)=>{uh(t,e,n=>{let r=e.state?.root;E(r)&&(r.$helmet=n)})}}},uh=(t,e,n)=>{let r=tL(e);r&&uL(e,r,()=>JP(t,e),n)},QP=t=>{let e=t.metadata;return e?JP(e,t):null},dh={name:"helmet",create(t){if(!t.metadata)return;let e=tL(t);e&&uL(t,e,()=>QP(t))},update(t){let e=Xx.get(t);if(!e)return dh.create(t);e.disposed||e.set(QP(t))}},m5=dL;hc();var pL=(t,e,n,r)=>{t&&pc(t,e,n,r)},hL=(t,e)=>{t&&uh(t,e)},gL=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},qi={routes:t=>t,metadata:hL,fetch:pL,$router:gL},mL=(t={})=>{let e={routes:n=>n};return t.metadata!==!1&&(e.metadata=hL),t.fetch!==!1&&(e.fetch=pL),t.router!==!1&&(e.$router=gL),e};var e0={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},ph={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},hh={...e0,router:ph},y5={state:{},pages:{},components:{},router:ph,define:qi},Ur=y5;M();M();var yL=(t,e)=>q(t.extends)?t.extends:[];Mt();M();var n0={};j(n0,{default:()=>T5,getActiveLang:()=>Vr,getLanguages:()=>pf,getLocalStateLang:()=>bf,getPendingLang:()=>df,initPolyglot:()=>mh,loadTranslations:()=>gf,polyglotPlugin:()=>Gi,setLang:()=>mf,translate:()=>hf,upsertTranslation:()=>yf});M();Mt();var b5="smbls_t_",_5="smbls_tv_",Ki={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)}}},uf={},bL=new WeakMap,xL=(t,e)=>t&&typeof t=="object"?t:e&&typeof e=="object"?e:null,kL=t=>{let e=bL.get(t);return e||(e={seq:0,pending:Zr(null),wake:null},bL.set(t,e)),e},_L=(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))}),wL=(t,e)=>!!(t?.translations&&t.translations[e]),w5=3e3,S5=2147483647,x5=t=>{let e=t?.fontWait;return e===!1?0:typeof e=="number"?e>0?Math.min(e,S5):0:w5},k5=new RegExp("\\p{L}","gu"),v5=(...t)=>{let e=new Set,n=(r,o)=>{if(typeof r=="string"){let s=r.match(k5);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("")},E5=(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 Vr(){let t=this?.context,e=t?.polyglot,n=this?.state?.root||t?.state?.root;return Rc(n?.lang||t?.state?.lang,e)}function df(){let t=this?.context,e=xL(t,this?.state?.root||t?.state?.root);return e?kL(e).pending.get():null}function pf(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var gh=(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},SL=(t,e,n)=>{let r=e.lastIndexOf(".");if(r===-1)return t[e+"_"+n];let o=gh(t,e.substring(0,r));if(o!=null)return o[e.substring(r+1)+"_"+n]};function hf(t,e){if(!t)return"";let n=this?.context,r=n?.polyglot,o=e||this.call("getActiveLang"),s=this?.state;if(s){let l=SL(s,t,o);if(l!==void 0)return l}if(r?.translations){let l=r.translations[o];if(l){let f=gh(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=gh(l,t);if(f!==void 0)return f}}let c=r?.defaultLang||"en";if(s){let l=SL(s,t,c);if(l!==void 0)return l}if(r?.translations){let l=r.translations[c];if(l){let f=gh(l,t);if(f!==void 0)return f}}return t}async function gf(t){let e=this?.context,n=e?.polyglot,r=this?.state?.root||e?.state?.root;if(!n||!r)return;let o=n.storagePrefix||b5,s=n.storageVersionPrefix||(n.storagePrefix?n.storagePrefix.replace(/_$/,"v_"):_5);if(n.translations&&n.translations[t]&&!n.fetch||!n.fetch||n._fetchFailed?.[t])return;if(!r.translations?.[t]){let c=Ki.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(uf[i])return uf[i];let a=this;return uf[i]=(async()=>{try{let c=n.fetch,l=parseInt(Ki.get(s+t),10)||0,f,u,d;if(R(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),p=R(g)?await g.call(a):e.fetch;if(!p)return;let m=c.rpc||c.from||"get_translations_if_changed",y={p_lang:t,p_cached_version:l,...c.params||{}},S=await p.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;Ki.set(o+t,JSON.stringify(f)),u&&Ki.set(s+t,String(u));let h={translations:{...r.translations||{}}};h.translations[t]=f,r.update&&r.update(h)}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 uf[i]}})(),uf[i]}var A5=(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 mf(t,e){let n=this?.context,r=n?.polyglot,o=this?.state?.root||n?.state?.root,s=n?.document||globalThis.document;if(!o)return;e?.persist!==!1&&Ki.set(Is(r),t);let i=kL(xL(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(!wL(o,t)){i.pending.set(t);let u=null;if(await _L(i,Promise.resolve(f).then(null,d=>{u=d}),0),!c())return;if(u)throw u;if(!wL(o,t)&&!r.translations?.[t])return}}let l=x5(r);if(l>0&&s?.fonts&&s.documentElement?.lang!==t){let f=E5(s,v5(r?.translations?.[t],o.translations?.[t]));if(f&&(i.pending.set(t),await _L(i,f,l),!c()))return}i.pending.set(null),C5(n,r,o,s,t)}finally{c()&&i.pending.set(null)}}function C5(t,e,n,r,o){t?.state&&(t.state.lang=o);let s=e?.translations?.[o],i={lang:o},a=c=>nc(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"&&gn(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];gn(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{A5(f,l,f.call("replaceLiteralsWithObjectFields",u,f.state))}catch{}}}r?.documentElement&&(r.documentElement.lang=o)}async function yf(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=R(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 mh(){let t=this?.context,e=t?.polyglot;if(!e)return;let n=this?.state?.root||t?.state?.root;if(!n)return;let o=Ki.get(Is(e))||Vr.call(this),s=t?.document||globalThis.document;s?.documentElement&&(s.documentElement.lang=o),n.update&&n.lang!==o&&n.update({lang:o}),e.fetch&&!(e.translations&&e.translations[o])&&await this.call("loadTranslations",o)}function bf(t){try{let e=Vr.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 Gi={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,mh.call(t))}},T5=Gi;hc();var o0={};j(o0,{SYSTEM_METRICS:()=>_f,capsizeHandler:()=>r0,capsizePlugin:()=>bh,computeCapsize:()=>vL,default:()=>O5,resolveFontSizePx:()=>EL,resolveMetrics:()=>AL});var _f={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}},yh=t=>parseFloat(t.toFixed(4)),vL=(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,h=(r-a+s/2)/i-(u-d)/2,g=(c+s/2)/i-(u-d)/2;return{fontSize:`${yh(t/16)}rem`,lineHeight:`${yh(f)}px`,capHeightTrim:`${yh(-h)}em`,baselineTrim:`${yh(-g)}em`}},EL=(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},AL=(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(_f[i])return _f[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(_f[a])return _f[a]}}return null},r0=(t,e,n,r)=>{if(!t)return;let o=EL(e.fontSize,r);if(!o)return;let s=AL(e.fontFamily,r);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=vL(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},bh={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},O5=bh;var u0={};j(u0,{PRESERVE_VALUE_KEYS:()=>Kt,SKIP_INLINE_KEYS:()=>zr,abbrToProp:()=>qt,decode:()=>PL,encode:()=>TL,expand:()=>Go,isComponentKey:()=>sn,isSelectorKey:()=>an,parse:()=>Yo,parseFurther:()=>Zo,propToAbbr:()=>qe,shorten:()=>wf,shorthandPlugin:()=>Sf,stringify:()=>Ko,stringifyFurther:()=>Xo});var qe={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"},qt=Object.create(null);for(let t in qe)qt[qe[t]]=t;var s0=Object.create(null);for(let t in qe){let e=qe[t];if(s0[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${s0[e]}"`);s0[e]=t}var Kt=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),zr=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function sn(t){return/^[A-Z]/.test(t)}function an(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function TL(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=qe[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=>_h(i));e.push(o+":"+s.join(","))}else e.push(o+":"+_h(r))}return e.join(" ")}function _h(t){return String(t).replace(/ /g,"_")}function wf(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?wf(n):n});let e={};for(let n in t){let r=t[n];if(sn(n)){e[n]=i0(r);continue}if(an(n)){e[n]=i0(r);continue}let o=qe[n]||n;if(Kt.has(n)||Kt.has(o)){e[o]=r;continue}e[o]=i0(r)}return e}function i0(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?wf(e):e}):typeof t=="object"?wf(t):t}function Ko(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Ko(r):r});let e={},n=[];for(let r in t){let o=t[r];if(sn(r)){e[r]=CL(o);continue}if(an(r)){e[r]=CL(o);continue}let s=qe[r]||r;if(Kt.has(r)||Kt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(zr.has(r)||zr.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"?Ko(a):a});continue}if(o.length<=1){e[s]=o;continue}n.push(s+":"+o.map(_h).join(","));continue}if(typeof o=="object"){e[s]=Ko(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+":"+_h(o))}return n.length&&(e.in=n.join(" ")),e}function CL(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ko(e):e}):typeof t=="object"?Ko(t):t}function PL(t){if(!t||typeof t!="string")return{};let e={},n=LL(t);for(let r of n){if(r.startsWith("!")){let c=r.slice(1),l=qt[c]||c;e[l]=!1;continue}let o=r.indexOf(":");if(o===-1){let c=qt[r]||r;e[c]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=qt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(OL);continue}e[a]=OL(i)}return e}function LL(t){return t.trim().split(/\s+/).filter(Boolean)}function OL(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function RL(t){return t.replace(/_/g," ")}function R5(t){if(!t||typeof t!="string")return{};let e={},n=LL(t);for(let r of n){if(r.startsWith("!")){let c=r.slice(1),l=qt[c]||c;e[l]=!1;continue}let o=r.indexOf(":");if(o===-1){let c=qt[r]||r;e[c]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=qt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(RL);continue}e[a]=RL(i)}return e}function Go(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Go(n):n});let e={};for(let n in t){let r=t[n];if(sn(n)){e[n]=a0(r);continue}let o=qt[n]||n;if(an(n)&&o===n){e[n]=a0(r);continue}if(Kt.has(o)||Kt.has(n)){e[o]=r;continue}e[o]=a0(r)}return e}function a0(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Go(e):e}):typeof t=="object"?Go(t):t}function Yo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Yo(n):n});let e={};if(typeof t.in=="string"){let n=R5(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(sn(n)){e[n]=c0(r);continue}let o=qt[n]||n;if(an(n)&&o===n){e[n]=c0(r);continue}if(Kt.has(o)||Kt.has(n)){e[o]=r;continue}e[o]=c0(r)}return e}function c0(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Yo(e):e}):typeof t=="object"?Yo(t):t}function DL(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function P5(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 L5(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 IL(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 Xo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Xo(r):r});let e={},n=[];for(let r in t){let o=t[r];if(sn(r)){let i=ML(o);e[r]=IL(i)?i.in:i;continue}if(an(r)){let i=ML(o);e[r]=IL(i)?i.in:i;continue}let s=qe[r]||r;if(Kt.has(r)||Kt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(zr.has(r)||zr.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"?Xo(a):a});continue}if(o.length<=1){e[s]=o;continue}n.push(s+":"+o.map(DL).join(","));continue}if(typeof o=="object"){e[s]=Xo(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+":"+DL(o))}return n.length&&(e.in=n.join(" ")),e}function ML(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Xo(e):e}):typeof t=="object"?Xo(t):t}function $L(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):P5(t)}function l0(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=qt[l]||l;e[f]=!1;continue}let o=r.indexOf(":");if(o===-1){let l=qt[r]||r;e[l]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=qt[s]||s,c=L5(i);if(c.length>1){e[a]=c.map($L);continue}e[a]=$L(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=l0(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(sn(n)){typeof r=="string"?e[n]=l0(r):e[n]=f0(r);continue}let o=qt[n]||n;if(an(n)&&o===n){typeof r=="string"?e[n]=l0(r):e[n]=f0(r);continue}if(Kt.has(o)||Kt.has(n)){e[o]=r;continue}e[o]=f0(r)}return e}function f0(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 D5={shorten:Go,stringify:Yo,stringifyFurther:Zo};function I5(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 M5=["components","pages","snippets"],Sf={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let r=D5[e===!0?"shorten":e];if(r){for(let o of M5)t[o]&&(t[o]=I5(t[o],r));t.app&&typeof t.app=="object"&&(t.app=r(t.app))}}};var k0={};j(k0,{LEVELS:()=>xf,analyzePlugin:()=>Xi,attachBrowserListeners:()=>Th,attachNetworkListeners:()=>vf,classifyEvent:()=>b0,createAnalyzeState:()=>Oh,createBeaconSink:()=>S0,createConsoleSink:()=>_0,createDedupe:()=>g0,createEnrich:()=>p0,createMemorySink:()=>w0,createPipeline:()=>kh,createRedact:()=>xh,createRemoteSink:()=>Eh,createSample:()=>m0,createSummarize:()=>h0,default:()=>Xi,emitFetchEvent:()=>HL,makeEvent:()=>nt,meetsLevel:()=>wh,normalizeLevel:()=>kf,resolveSinks:()=>Ch,summarizeElement:()=>Qo});var $5=0,N5=()=>`${Date.now().toString(36)}-${($5++).toString(36)}`,nt=(t,e,n={})=>({id:N5(),ts:Date.now(),type:t,level:e,...n}),F5=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(" > ")},Qo=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:F5(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var Yi=t=>t?.context?.analyze,j5={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"}},B5=(t,{category:e,type:n,level:r})=>o=>{let s=Yi(o);!s||!s.shouldCapture(e)||s.emit(nt(n,r,{hook:t,element:Qo(o)}))},NL=t=>(e,n)=>{let r=Yi(e);!r||!r.shouldCapture("state")||r.emit(nt("state","debug",{hook:t,element:Qo(e),changedKeys:n?.changedKeys||null}))},Xi={name:"analyze",error(t,e){let n=Yi(t);if(!n||n.config.enabled===!1||!n.shouldCapture("errors"))return;let r=e?.error||e?.err||(e instanceof Error?e:null);n.emit(nt("error","error",{hook:e?.hook||"error",element:Qo(t),error:r,message:r?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=Yi(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(nt("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=Yi(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=Yi(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(nt("update","debug",{hook:"update",element:Qo(t),durationMs:n}))},beforeStateUpdate:NL("beforeStateUpdate"),stateUpdate:NL("stateUpdate")};for(let[t,e]of Object.entries(j5))Xi[t]=B5(t,e);M();var xf={error:0,warn:1,info:2,debug:3,trace:4};var wh=(t,e)=>{let n=xf[t],r=xf[e];return n==null||r==null?!0:n<=r},kf=t=>xf[t]!=null?t:"warn";M();var Sh=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var U5=(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},V5=(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"***"}},d0=(t,e,n,r)=>{if(r>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>d0(s,e,n,r+1));let o={};for(let s of Object.keys(t))if(U5(s,e)||Sh.test(s)){let a=V5(t[s],n);a!==void 0&&(o[s]=a)}else o[s]=d0(t[s],e,n,r+1);return o},xh=(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:h,...g}=r,p=d0(g,n,e,0);return{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...p}}};var p0=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}}}},h0=()=>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},g0=(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}},m0=t=>e=>{if(!e)return e;let n=t[e.type];return n==null||n>=1?e:Math.random()>n?null:e},FL={redact:t=>xh(t.config.redact||[],t.config.maskStrategy),enrich:t=>p0(t),summarize:()=>h0(),dedupe:t=>g0(t.config.cache?.dedupeWindowMs||1e3),sample:t=>m0(t.config.sample||{})},z5=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let n=FL[t];return n?n(e):null}return null},kh=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(FL.redact(t));for(let s of n){let i=z5(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,h=!1;for(let g of l)if(d=g(d),d==null){h=!0;break}!h&&d!=null&&f.push(d)}return f}i=c}return i}};M();M();var vh=typeof T<"u"&&typeof T.document<"u",H5=5e3,W5=50,q5=3,K5=1500,G5=1e3,b0=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",Y5=t=>{try{return JSON.stringify(t)}catch{return null}},X5=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},Z5=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}},Q5=()=>{if(!vh)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}},J5=()=>{if(!vh)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:Z5(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:X5(),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:Q5()}},Eh=(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:b0,h=typeof t.beforeSend=="function"?t.beforeSend:null,g=t.debug===!0,p=typeof t.getDebug=="function"?t.getDebug:null,m=t.batchMs!=null?t.batchMs:H5,y=t.maxBatch||W5,S=t.maxRetries!=null?t.maxRetries:q5,b=t.backoffMs||K5,k=t.queueLimit||G5,x=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)}`,_=t.sessionId||w(),A=[],C=[],D=null,$=null,I=()=>{D||!A.length||(D=setTimeout(st,m))},N=U=>{if($)return;let it=b*Math.pow(2,Math.max(0,U-1));$=setTimeout(()=>{if($=null,!C.length)return;let H=C.shift();et(H.envelope,H.attempt)},it)},K=(U,it=!1)=>{let H=u?y0(u):null,z={id:_,sentAt:Date.now()};it&&(z.endedAt=Date.now());let W={v:1,session:z,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:J5(),user:H?.user||null,traits:H?.traits||null,tags:H?.tags||null,events:U};if((p?y0(p)===!0:g)&&(W.app.debug=!0),h)try{return h(W)||null}catch{return W}return W},et=async(U,it=1)=>{if(U)try{let H=!0;if(n){let z=await n(U);H=z!==!1&&z?.ok!==!1}else H=await t6(e,U,{apiKey:o,getAuth:f});!H&&it<S&&(C.push({envelope:U,attempt:it+1}),N(it+1))}catch{it<S&&(C.push({envelope:U,attempt:it+1}),N(it+1))}},st=(U=!1,it=!1)=>{if(D&&(clearTimeout(D),D=null),!A.length&&!it)return;let H=A;A=[];let z=K(H,it);if(z){if(U&&vh){if(typeof r=="function"&&y0(()=>r(z)))return;if(navigator.sendBeacon&&e){let W=Y5(z);if(W)try{navigator.sendBeacon(e,new T.Blob([W],{type:"application/json"}));return}catch{}}}et(z)}},xt=!1,kt=()=>{xt||(xt=!0,st(!0,!0))};vh&&(T.addEventListener("pagehide",kt,{passive:!0}),T.addEventListener("beforeunload",kt,{passive:!0}),T.addEventListener("visibilitychange",()=>{T.document.visibilityState==="hidden"&&st(!0)},{passive:!0}));let Rt=U=>{if(!U||x<1&&Math.random()>x)return;xt&&(xt=!1);let it={...U,log_type:d(U)};A.push(it),A.length>k&&(A=A.slice(-k)),A.length>=y?st():I()},Zt=U=>(st(!1,!0),_=U||w(),xt=!1,Rt.sessionId=_,_);return Rt.flush=()=>st(!1),Rt.endSession=kt,Rt.startNewSession=Zt,Rt.sessionId=_,Rt},y0=t=>{try{return t()}catch{return null}},t6=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 e6={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},n6="\x1B[0m",Ah=typeof T<"u"&&typeof T.document<"u",_0=(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(Ah)i(a,s);else{let c=e6[s.level]||"";i(`${c}${a}${n6}`,s)}}},w0=(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},S0=(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=Ah?new T.Blob([c],{type:"application/json"}):c;if(Ah&&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(()=>{})};Ah&&(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},jL={console:_0,memory:w0,beacon:S0,remote:Eh},BL=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},Ch=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=jL[r];if(!o)continue;n.push(r==="memory"?o(t,{}):o(r==="remote"?BL(t,{}):{}))}else if(r&&typeof r=="object"&&r.type){let o=jL[r.type];if(!o)continue;n.push(r.type==="memory"?o(t,r):o(r.type==="remote"?BL(t,r):r))}return n};M();var r6=typeof T<"u"&&typeof T.document<"u",o6=new Set(["password","hidden"]),UL=(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))))}},x0="__analyzeKeyPath",Zi=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[x0])return e[x0];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[x0]=i}catch{}return i},s6=(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"***"}},i6=t=>!!(!t||t.tagName==="INPUT"&&o6.has(t.type)||Sh.test(t.name||"")||Sh.test(t.id||"")||t.dataset?.analyze==="skip"),Th=t=>{if(!r6)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(nt("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(nt("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){o(T,"click",i=>{t.emit(nt("pointer","info",{hook:"click",target:Zi(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:VL(i)}))},{passive:!0,capture:!0}),o(T,"dblclick",i=>{t.emit(nt("pointer","info",{hook:"dblclick",target:Zi(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),o(T,"contextmenu",i=>{t.emit(nt("pointer","info",{hook:"contextmenu",target:Zi(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=UL(i=>{t.emit(nt("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(nt("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:VL(s),target:Zi(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=i6(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=s6(a.value,t.config.maskStrategy)),t.emit(nt("forms","info",{hook:i.type,target:Zi(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(nt("forms","info",{hook:"submit",target:Zi(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=UL(()=>{t.emit(nt("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=Ua(()=>{t.emit(nt("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(nt("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),o(T.document,"visibilitychange",()=>{t.emit(nt("viewport","info",{hook:"visibilitychange",hidden:T.document.hidden}))},{passive:!0}),t.emit(nt("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(nt("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(zL)}))}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(nt("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{}},VL=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),a6=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=zL(t.cause)),e},zL=t=>{if(t==null)return t;if(t instanceof Error)return a6(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};M();var c6=typeof T<"u"&&typeof T.document<"u",HL=(t,e)=>{let n=t?.analyze;if(!n||!n.shouldCapture("network"))return;let r=e.phase==="error"?"error":"info";n.emit(nt("network",r,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},vf=t=>{if(c6&&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(nt("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(nt("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(nt("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(nt("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(nt("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(nt("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 l6={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},f6={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},u6={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},d6={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},p6=t=>{let e={...l6,...t};return e.replay&&Object.assign(e,f6),e.telemetry&&Object.assign(e,u6),e.remote&&Object.assign(e,d6),Object.assign(e,t),e},h6=64,g6=()=>{if(typeof T>"u"||!T.location)return null;try{let e=new URLSearchParams(T.location.search).get("analyze");return e||null}catch{return null}},Oh=(t={})=>{let e=t===!0?{}:{...t};e.capture=p6(e.capture||{});let n=g6();(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=kf(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=kh(r),r.__sinks=Ch(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&&wh(s.level,r.config.level)){if(!r.__ready){if(s.level!=="error"&&!r.config.captureDuringHydration)return;r.__preBuffer.length<h6&&r.__preBuffer.push(s);return}o(),WL(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)WL(r,a)}try{Th(r)}catch(a){console.error("[analyze] browser attach error:",a)}try{vf(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=kf(s)},r.setCapture=(s,i)=>{if(r.config.capture[s]=!!i,s==="network"&&i&&r.__ready)try{vf(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},WL=(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 A0={};j(A0,{Inspect:()=>Rh,inspectPlugin:()=>E0});M();function qL(t){return v(t)?t:L(t)?t.find(e=>v(e)):""}function v0(t){if(!t)return;let e=t.__ref.__componentKey,n=t.extends&&qL(t.extends),r=t.parent&&t.parent.childExtends&&qL(t.parent.childExtends);return(e||n||r||"").split("_")[0].split(".")[0].split("+")[0]}function Ph(t){if(!t||!t.__ref)return;let{components:e,pages:n,editor:r}=t.context,o=v0(t);return r&&r.onInitInspect&&!r.onInitInspect(o,t,t.state)?Ph(t.parent):o&&(e[o]||n[o])?t:Ph(t.parent)}var m6=(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}))}},Rh={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:m6,onMousemove:(t,e,n)=>{let r=t.target.ref,o=Ph(r),s=e.Inspector.state;if(!o||!n.debugging||!o.__ref)return s.update({area:!1});let i=v0(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(),h={x:l,y:f,width:u,height:d};if(!s.area)return a(h);s.area.x!==h.x&&a(h)}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=Ph(r);if(!o)return;let s=v0(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)zi[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
|
-
display: block !important;
|
|
95
|
-
top: ${a-6}px;
|
|
96
|
-
left: ${i-6}px;
|
|
97
|
-
width: ${c+12}px;
|
|
98
|
-
height: ${l+12}px;
|
|
99
|
-
`}return e.node.style=s,e.Span.node.innerText=n.focusKey,!1}}},E0={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(Rh):t.extends?t.extends=[t.extends,Rh]:t.extends=[Rh]}};var T0={};j(T0,{apiUrl:()=>C0,channelByApiUrl:()=>w6,channelNames:()=>b6,channels:()=>me,currentChannel:()=>Hr,defaultChannel:()=>T6,deployTarget:()=>E6,isKnownChannel:()=>C6,mermaidUrl:()=>v6,normalizeOwnerSegment:()=>O6,normalizeProjectKey:()=>P6,normalizeProjectSlug:()=>R6,parseSymboLsHost:()=>L6,previewProjectUrl:()=>k6,previewUrl:()=>XL,resolveChannel:()=>Jo,screenshotCdnHost:()=>ZL,screenshotCdnUrl:()=>A6,setChannel:()=>_6,shellUrl:()=>x6,socketUrl:()=>S6});var me={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 b6=Object.keys(me.channels),Jn=t=>!!(t&&me.channels[t]),Jo=t=>Jn(t)?me.channels[t]:me.channels[me.defaultChannel],_6=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=Jn(t)?t:null,Qi=void 0)},Qi,Ef=t=>typeof process<"u"&&process.env&&process.env[t]||null,Hr=()=>{if(Qi!==void 0)return Qi;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=Ef("SYMBOLS_CHANNEL"),n=Ef("NODE_ENV");return Qi=Jn(t)&&t||Jn(e)&&e||Jn(n)&&n||me.defaultChannel,Qi===me.defaultChannel&&!Jn(t)&&!Jn(e)&&!Jn(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 "${me.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),Qi},KL=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],GL=t=>{let e=KL.indexOf(t);return e===-1?KL.length:e},w6=t=>{if(!t)return null;let e=Object.keys(me.channels).filter(n=>me.channels[n].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((n,r)=>GL(n)-GL(r))[0]},C0=(t=Hr())=>Ef("SYMBOLS_API_URL")||Jo(t).api,S6=(t=Hr())=>Ef("SYMBOLS_SOCKET_URL")||Jo(t).socket,x6=(t=Hr())=>Jo(t).shell||null,XL=(t=Hr())=>Jo(t).preview||null,k6=({owner:t,key:e,env:n="production"}={},r=Hr())=>{let o=XL(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)}`},v6=({owner:t,key:e,env:n="production"}={},r=Hr())=>{let o=Jo(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}`},E6=(t=Hr())=>Jo(t).deploy||{},ZL=()=>Ef("SYMBOLS_SCREENSHOT_CDN")||me.screenshotCdn,A6=({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://${ZL()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},C6=Jn,T6=me.defaultChannel,O6=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",R6=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",P6=(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},YL={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},L6=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=YL[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?YL[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 QL={"@symbo.ls/signal":su,"@symbo.ls/scratch":Y_,"@symbo.ls/element":TS,"@symbo.ls/css":hp,"@symbo.ls/utils":Hs,"@symbo.ls/state":Zw,"@symbo.ls/router":Vi,"@symbo.ls/polyglot":n0,"@symbo.ls/helmet":t0,"@symbo.ls/fetch":cd,"@symbo.ls/capsize":o0,"@symbo.ls/shorthand":u0,"@symbo.ls/analyze":k0,"@symbo.ls/inspect":A0,"@symbo.ls/channels":T0},JL=(t,e)=>{let n=t||(typeof globalThis<"u"?globalThis:{}),r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in QL)r[o]||(r[o]=QL[o]);if(e)for(let o in e)r[o]||(r[o]=e[o]);return r},tD=(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},eD=["@symbo.ls/sdk"],nD=(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},rD=(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 Us(t,Vs))r[o]||(r[o]=s);return r};M();var oD=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(sD(s)){let i=I6(s);i&&M6(i)&&e.links++;continue}if(D6(s)){St(s.trim()),e.faces++;continue}typeof s=="string"&&s.includes("font-family")&&(St(`@font-face { ${s} }`),e.faces++)}}return e},sD=t=>typeof t=="string"&&t.trim().startsWith("@import"),D6=t=>typeof t=="string"&&t.trim().startsWith("@font-face"),I6=t=>{if(!sD(t))return null;let e=String(t).match(/url\(\s*['"]?([^'")]+)['"]?\s*\)/);return e?e[1].trim():null},M6=(t,e)=>{if(typeof t!="string"||!t)return null;let n=e||Vn();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 lD=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},iD=(t="smbls")=>{let e={};for(let n in qo)Object.prototype.hasOwnProperty.call(qo,n)&&(hn(n)?e[`smbls.${n}`]=qo[n]:e[n]=qo[n]);return e},fD=t=>t.components?{...iD(),...t.components}:iD(),uD=t=>({...cf,...Vi,...Er,...t.utils,...t.snippets,...t.functions}),dD=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var pD=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,$6=3e3,N6=(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),$6);o.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},aD={},L0=async({dependencies:t,dependenciesOnDemand:e,document:n,preventCaching:r=!1,cdnProvider:o,packageManager:s,symbolsConfig:i,registerDependency:a=N6})=>{if(o||(o=_r[s]||Ns(i)||"esmsh"),!t)return null;if(!ho(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=dr()&&r?`?${Math.random()}`:"",f=async(d,h)=>{let g=Xe(d,h,o)+l;try{await Promise.race([Fs(g,{document:n,type:"module"}),new Promise((p,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,g)}catch(p){if(console.error(`Failed to load ${d} from ${o}:`,p),o!=="symbols")try{let m=Xe(d,h,"symbols")+l;await Promise.race([Fs(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 h=t[d];if(!(e&&e[d])&&!aD[d]&&(aD[d]=!0,!wr(d))){if(po(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}pD(d)||u.push(f(d,h))}}return u.length&&await Promise.allSettled(u),t},cD=/\[smbls\] runtime dependency "([^"]+)" is not registered on globalThis\.__SMBLS_PKGS__/g,F6=t=>{if(typeof t=="string")return t;if(typeof t=="function")try{return typeof Se=="function"?Se(t):Function.prototype.toString.call(t)}catch{return""}return""},j6=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=F6(a);if(!c||c.indexOf("__SMBLS_PKGS__")===-1)continue;cD.lastIndex=0;let l;for(;(l=cD.exec(c))!==null;)e.add(l[1])}}return e},B6=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},U6=(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},hD=(t,{syncRead:e=j6(t),runtimeDocument:n=typeof document<"u"?document:null,importMap:r=B6(n)}={})=>{let o=t&&t.dependencies;if(!ho(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)&&U6(l,r)?(c||(c={}))[l]=o[l]:(a||(a={}))[l]=o[l];return{blocking:a,deferred:c}},V6=t=>import(t),O0={},z6=(t,e)=>{if(!e||typeof globalThis>"u")return;let n=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});n[t]||(n[t]=e)},H6=(t,{importModule:e=V6}={})=>{let n=[];if(!t)return Promise.resolve([]);for(let r in t)wr(r)||po(r)||pD(r)||(O0[r]||(O0[r]=Promise.resolve().then(()=>e(r)).then(o=>(z6(r,o),o||null),()=>null)),n.push(O0[r]));return Promise.all(n)},W6=2e3,q6=3e3,gD=(t,{win:e=typeof window<"u"?window:null,importModule:n,loadTimeoutMs:r=q6}={})=>t?new Promise(o=>{let s=()=>{H6(t,{importModule:n}).then(o,o)},i=()=>{e&&typeof e.requestIdleCallback=="function"?e.requestIdleCallback(s,{timeout:W6}):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,mD=async(t,e)=>{let n=e.window||window,r=e.cdnProvider||Ns(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]&&wr(a))return await u.require(a,c);if(!u.packages[a]){let d=dr()?`?${Math.random()}`:"";if(l&&l[a]){let h=l[a],g=Xe(a,h,c)+d;try{await i.utils.loadRemoteScript(g,{window:u,document:f})}catch(p){if(console.error(`Failed to load ${a} from ${c}:`,p),c!=="symbols"){let m=Xe(a,h,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let h=Xe(a,"latest",c)+d;try{await i.utils.loadRemoteScript(h,{window:u,document:f})}catch(g){if(console.error(`Failed to load ${a} from ${c}:`,g),c!=="symbols"){let p=Xe(a,"latest","symbols")+d;await i.utils.loadRemoteScript(p,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};n.packages?n.packages=vt(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)},K6=/\s+/g,yD=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,G6=(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+=` ${yD(o,e)}`)}return n},Y6=(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=G6(t,e));let o=t.replace(K6," ").trim();if(n&&typeof n.setAttribute=="function")n.setAttribute("class",o);else if(n)try{n.className=o}catch{}return o},X6=()=>(t,e,n)=>{let r=yD(t,e);if(t){let{__ref:o}=e;o.__class.style=r}bD()(e.classlist,e,e.state,!0)},bD=()=>(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=Te(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&Y6(i,e,e.node)}},Z6=()=>({style:X6(),classlist:bD()}),Q6=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],R0=new WeakSet,P0=!1,J6=t=>!!t&&typeof t=="object",_D=(t,e)=>{let n=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,r=e.initOptions||{},o=e.registry||Z6(),s=e.designSystem?ct(ft(e.designSystem),ft(Zl),ve):ft(Zl),i={};for(let p of Q6)e[p]!==void 0&&(i[p]=e[p]);let a,c=J6(n),f=c&&R0.has(n)&&!e.skipDesignSystemInit,u=!f&&!P0,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){gt(a);try{St({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&St(sh(a.CSS_MEDIA_VARS,d));let p=Lo(a.cssSkinVars,a.cssSkinFallback,d);Object.keys(p).length&&St(p)}finally{dt()}}}else if(u){let p=O();p&&(p.__domDocument=n),a=Zn(s,{key:t,document:n,files:e.files,assets:e.assets,scopeSelector:d,...hh,...i,...r}),a&&a!==p&&(a.__domDocument=n),c&&R0.add(n),P0=!0}else{let p=Zc(t,s,{cleanBase:!0});for(let m in i)p[m]=i[m];if(p.__domDocument=n,f){let m=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=m,p.varPrefix=m}gt(p);try{a=Zn(p,{key:t,document:n,files:e.files,assets:e.assets,scopeSelector:d,...hh,...i,...r})}finally{dt()}c&&R0.add(n),P0=!0}let h=a?.CONFIG||a,g=h?.font;if(g){gt(h);try{oD(g)}finally{dt()}}return[a,o]},wD=(t,e)=>{let n={};e.state&&ct(n,e.state),t&&t.state&&ct(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(!lo(e,u,n)){i.add(u);return}n[u]=d,a.add(u),gn(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,ft(n)},SD=(t,e)=>{E(t.routes)&&E(e.pages)&&vt(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},xD=t=>{Fc(t,t.sharedLibraries)};var Af={polyglot:hf,getLocalStateLang:bf,getActiveLang:Vr,getLang:Vr,setLang:mf,getPendingLang:df,getLanguages:pf,loadTranslations:gf,upsertTranslation:yf};hc();M();M();var Lh=new Set(["__proto__","constructor","prototype"]),D0=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Lh.has(t[e]))return!1;return!0},kD=(t,e)=>{!t||!D0(e)||e.reduce((n,r,o,s)=>{if(n&&r in n){if(o!==s.length-1)return n[r];delete n[r]}},t)},vD=(t,e,n,r=!1)=>{!t||!D0(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)},Dh=(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":kD(t,o);break;case"update":case"set":vD(t,o,s,!0);break;default:break}return n},ED=(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))Lh.has(o)||Object.prototype.hasOwnProperty.call(n,o)||(r||(r={}),r[o]=e[o]);return r},Cf=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},AD=(t,e,n,r="designSystem")=>{for(let o in e){if(Lh.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]={}}AD(t[o],i,n,s)}else o in t||(t[o]=Array.isArray(i)?JSON.parse(JSON.stringify(i)):i)}},I0=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let o={designSystem:t.__rawDesignSystem};Dh(o,e)}let n=JSON.parse(JSON.stringify(t.__rawDesignSystem)),r=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];return jc(n,r,AD)};M();var CD=(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(Cf(n,c),r){let l=I0(n);l&&Zn(l)}}else co(n[a],c);else n[a]=c}),r=!0,i&&(n.schema=i))}},TD=(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=Dh(n,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=I0(n,s);c?Zn(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=ED(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 t9={success:"green",error:"red",warning:"yellow"},OD=(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)}},RD={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:t9[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 M9=!1,$9=()=>M9?"http://localhost:8080":"https://api.symbols.app",N9=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}},ik=null,F9=()=>(ik||(ik=Promise.resolve().then(()=>(xI(),SI)).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))),ik),j9=async t=>{try{let e=t||$9(),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)}},EI=(t,e,n,r)=>{t.on("snapshot",CD(e,n,r)),t.on("ops",TD(e,n,r)),t.on("clients",o=>{r.editor?.verbose&&OD(o,e,n)}),t.on("disconnect",o=>{r.editor?.verbose&&console.info("[sync] disconnected",o)})},B9=async(t,e,n,r,o)=>{let s=await j9(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)")}),EI(l,t,e,n),l},U9=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)")}),EI(s,t,e,n),s.on("reload",()=>{typeof T<"u"&&T.location&&T.location.reload()}),s},V9=async(t,e,n)=>{let{mode:r,baseUrl:o}=N9(n);if(!r)return null;let s=F9();return r==="collab"?B9(t,e,n,o,s):r==="runner"?U9(t,e,n,s):null},z9={onInit:V9};var AI=t=>typeof t>"u",kI=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),vI=t=>t?.editor?.runtime==="runner",CI=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},TI={name:"sync",beforeCreate(t,e){let n=e&&e.editor;(n&&!AI(n.liveSync)?n.liveSync:kI(e)||vI(e))&&(kI(e)&&!vI(e)&&!e?.key||CI(t,z9))}},OI={name:"notifications",beforeCreate(t,e){if(!e)return;let n=AI(e.notifications)?null:e.notifications,r=e.editor&&e.editor.verbose===!0;(n===!0||n!==!1&&r)&&CI(t,RD)}};var lk={};j(lk,{AlertTemplate:()=>ig,ConfirmTemplate:()=>sg,CustomTemplate:()=>cg,ModalLayer:()=>og,ModalRoot:()=>rg,PromptTemplate:()=>ag,windowsComponents:()=>ck});var ak={};j(ak,{alertDialog:()=>eg,closeAllModals:()=>Jh,closeModal:()=>Zh,confirmDialog:()=>tg,getLayer:()=>Xh,openModal:()=>Qh,promptDialog:()=>ng,windowsFunctions:()=>sr});function rt(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function ia(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 Xh(){return rt(this)}var H9=(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"))},RI=(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 Zh(t){let e=ia(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)H9(e,i);for(let i of o)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function Qh(t={}){let e=ia(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 RI(e,s),e.state.update({stack:[...o,r]}),n}function Jh(){let t=ia(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function tg(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function eg(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function ng(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var sr={openModal:Qh,closeModal:Zh,closeAllModals:Jh,confirmDialog:tg,alertDialog:eg,promptDialog:ng,getLayer:Xh};var W9=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),PI=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(W9),n=[];for(let r=0;r<e.length;r++){let o=e[r];(o.offsetParent!==null||o===document.activeElement)&&n.push(o)}return n},LI=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},rg={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 sr)a in n.functions||(n.functions[a]=sr[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=LI(t);if(!l)return;let f=PI(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],h=document.activeElement;if(!l.contains(h)){a.preventDefault();try{u.focus()}catch{}return}if(a.shiftKey&&h===u){a.preventDefault();try{d.focus()}catch{}}else if(!a.shiftKey&&h===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,h)=>h!==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=LI(t);if(!r)return;let o=PI(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 og={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=rt(t)?.id;return e?"modal-title-"+e:null}},width:t=>rt(t)?.width||"H",maxWidth:t=>rt(t)?.maxWidth||"90vw",flow:"y",maxHeight:t=>rt(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=>rt(t)?.template!=="confirm"},AlertTemplate:{hide:t=>rt(t)?.template!=="alert"},PromptTemplate:{hide:t=>rt(t)?.template!=="prompt"},CustomTemplate:{hide:t=>rt(t)?.template!=="custom"}}};var aa=(t,e,n)=>rt(t)?.[e]||n,q9=t=>{let e=rt(t)?.icon;return e===null||e===!1},sg={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>aa(t,"title","Are you sure?"),attr:{id:t=>{let e=rt(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{hide:t=>q9(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>aa(t,"icon","warning")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",P:{tag:"p",margin:"0",text:t=>aa(t,"message","This action cannot be undone."),color:"dim"}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>aa(t,"cancelText","Cancel"),onClick:(t,e,n)=>{let r=rt(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=>aa(t,"confirmTheme","primary"),text:t=>aa(t,"confirmText","Confirm"),onClick:(t,e,n)=>{let r=rt(e);if(r?.onConfirm)try{r.onConfirm()}catch(o){console.warn("[windows] confirm.onConfirm threw:",o)}e.call("closeModal",r?.id)}}}};var Ff=(t,e,n)=>rt(t)?.[e]||n,ig={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>Ff(t,"title","Notice"),attr:{id:t=>{let e=rt(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>Ff(t,"icon","info")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!Ff(t,"message",""),P:{tag:"p",margin:"0",text:t=>Ff(t,"message",""),color:"dim"}},ModalFooter:{flow:"x",align:"center end",flexShrink:"0",OkBtn:{extends:"Button",theme:"primary",text:t=>Ff(t,"okText","OK"),onClick:(t,e,n)=>{let r=rt(e);if(r?.onOk)try{r.onOk()}catch(o){console.warn("[windows] alert.onOk threw:",o)}e.call("closeModal",r?.id)}}}};var ca=(t,e,n)=>rt(t)?.[e]||n,ag={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",scope:{value:""},onRender:(t,e)=>{let n=rt(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=rt(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=>ca(t,"title","Enter a value"),attr:{id:t=>{let e=rt(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!ca(t,"message",""),P:{tag:"p",margin:"0",text:t=>ca(t,"message",""),color:"dim"}},InputRow:{extends:"Input",flexShrink:"0",autofocus:!0,placeholder:t=>ca(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=rt(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=>ca(t,"cancelText","Cancel"),onClick:(t,e,n)=>{let r=rt(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=>ca(t,"confirmText","OK"),onClick:(t,e,n)=>{let r=rt(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 cg={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",Title:{tag:"h2",text:t=>rt(t)?.title||"",hide:t=>!rt(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=rt(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=Y(()=>{let n=rt(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 sr)i in s.functions||(s.functions[i]=sr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var DI={extends:"Button",theme:"tertiary"};var ck={ModalRoot:rg,ModalLayer:og,ConfirmTemplate:sg,AlertTemplate:ig,PromptTemplate:ag,CustomTemplate:cg,"smbls.CancelButton":DI};var gk={};j(gk,{Dropdown:()=>hg,DropdownList:()=>gg,DropdownParent:()=>mg,DropdownParentFocus:()=>yg,DropdownRoot:()=>dg,DropdownSiblingFocus:()=>bg,DropdownTrigger:()=>pg,dropdownComponents:()=>hk});var II=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),K9=(t,e,n,r)=>{let o=II(t,n,r),s=i=>o[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":o.bottom>=o.top?"bottom":"top"},G9=(t,e,n,r,o)=>{let s=II(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 fk=(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))},lg=(t,e,n)=>Math.max(e,Math.min(n,t)),ir=(t,e,n="auto")=>{if(!t){let g=typeof window<"u"?window.innerHeight:768;return{left:0,top:0,side:"bottom",align:"start",maxHeight:fk("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=fk("center",t,o),p=Math.min(s.height,g),m=lg((r-s.width)/2,8,Math.max(8,r-s.width-8)),y=lg((o-p)/2,8,Math.max(8,o-p-8));return{left:m,top:y,side:"center",align:"center",maxHeight:g}}let i,a;if(n==="auto")i=K9(t,s,r,o),a="start";else{let g=n.split("-");i=g[0],a=g[1]||"start",i=G9(i,t,s,r,o)}let c=fk(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),h=Math.max(8,o-l-8);return f=lg(f,8,d),u=lg(u,8,h),{left:f,top:u,side:i,align:a,maxHeight:c}},la=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 qr={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:null},Y9=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}},uk=t=>t?.getRoot?.()?.DropdownRoot||null,X9=0,Z9=()=>`dropdown_${++X9}_${Date.now().toString(36)}`;function fg(t={}){let e=uk(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||Y9(n);if(!r)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let o=t.id||Z9(),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||qr.placement,trigger:t.trigger||qr.trigger,offset:t.offset??qr.offset,minWidth:t.minWidth||qr.minWidth,maxWidth:t.maxWidth||qr.maxWidth,maxHeight:t.maxHeight||qr.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 ug(t){let e=uk(this);if(!e)return;let n=e.state?.layer;n&&e.state.update({layer:{...n,inert:!!t}})}function ls(t){let e=uk(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 dk=(t,e)=>{let n=`${e.maxHeight}px`;return t?.maxHeight?`min(${t.maxHeight}, ${n})`:n},MI=t=>{let e=t.getBoundingClientRect();return{width:e.width,height:Math.max(e.height,t.scrollHeight||0)}},Q9=`
|
|
87
|
+
)`};var CV={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"}}}},TV={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},OV={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"}}},gD={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...CV,...TV,...OV,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 mD={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var yD={ratio:1.618,subSequence:!0};var bD={SourceSans:[{url:""}]},_D={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 wD={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 SD={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 xD={base:150,ratio:1.333,unit:"ms",subSequence:!0,defaultBezier:"cubic-bezier(.29, .67, .51, .97)",springBezier:"cubic-bezier(.32, .72, 0, 1)"};var kD={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var iu={version:"0.0.1",color:pD,gradient:hD,theme:gD,typography:mD,spacing:yD,font:bD,fontFamily:_D,timing:xD,icons:wD,media:SD,sizes:kD,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 Fa={};F(Fa,{A:()=>OI,AssetPicture:()=>UD,Audio:()=>zD,Avatar:()=>QI,B:()=>lL,Block:()=>vD,Box:()=>Cg,Br:()=>pL,Bridge:()=>SL,Button:()=>DI,ButtonSet:()=>$I,COMPONENTS:()=>Ds,Caption:()=>tL,Checkbox:()=>vL,CheckboxHgroup:()=>EL,Circle:()=>FD,CircleButton:()=>II,Clickable:()=>MD,Data:()=>uL,Dialog:()=>UI,DialogFooter:()=>HI,DialogHeader:()=>VI,Dropdown:()=>AM,DropdownList:()=>CM,DropdownParent:()=>TM,DropdownParentFocus:()=>OM,DropdownSiblingFocus:()=>RM,FileIcon:()=>NL,Flex:()=>AD,Focusable:()=>$D,FocusableComponent:()=>ND,Footnote:()=>cL,Form:()=>DD,Grid:()=>TD,Gutter:()=>RD,H1:()=>KD,H2:()=>GD,H3:()=>YD,H4:()=>XD,H5:()=>ZD,H6:()=>JD,Headline:()=>iL,Hgroup:()=>bL,HgroupButton:()=>wL,HgroupRows:()=>_L,Hoverable:()=>ID,Hr:()=>dL,I:()=>fL,Icon:()=>ML,IconButton:()=>NI,IconText:()=>$L,Iframe:()=>LD,Img:()=>PD,Inline:()=>ED,InlineFlex:()=>CD,InlineGrid:()=>OD,Input:()=>xL,Italic:()=>oL,KangorooButton:()=>MI,Li:()=>hL,Link:()=>zk,Notification:()=>PM,NumberInput:()=>kL,Ol:()=>mL,P:()=>QD,Picture:()=>BD,Radio:()=>AL,RadioHgroup:()=>CL,Range:()=>tM,RouteLink:()=>RI,RouterLink:()=>Wk,SHAPES:()=>Eg,Select:()=>PI,Shape:()=>rk,Span:()=>qD,SquareButton:()=>LI,Strong:()=>eL,Subhead:()=>aL,Svg:()=>VD,Text:()=>WD,Textarea:()=>RL,TextareaWithButton:()=>PL,Theme:()=>jD,Title:()=>sL,Toggle:()=>TL,ToggleHgroup:()=>OL,Tooltip:()=>XI,TooltipHidden:()=>ZI,TooltipLayer:()=>ev,TooltipParent:()=>JI,U:()=>nL,Ul:()=>gL,Underline:()=>rL,Video:()=>HD,depth:()=>Ag,focusableRingEnabled:()=>au,focusableRingToken:()=>ek,focusableRingValue:()=>vs,getSystemGlobalTheme:()=>cu});var Z0={};F(Z0,{Block:()=>vD,Flex:()=>AD,Grid:()=>TD,Gutter:()=>RD,Inline:()=>ED,InlineFlex:()=>CD,InlineGrid:()=>OD});var vD={display:"block"},ED={display:"inline"},AD={display:"flex"},CD={display:"inline-flex"},TD={display:"grid"},OD={display:"inline-grid"},RD={boxSize:"C1"};var J0={};F(J0,{Img:()=>PD});M();var PD={tag:"img",attr:{title:t=>t.title,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=me(t);return e&&e.src||t.src},srcset:t=>{let e=me(t);return(e?Ml(e):"")||t.srcset||t.srcSet}}};var Q0={};F(Q0,{Form:()=>DD});var DD={tag:"form"};var tk={};F(tk,{Iframe:()=>LD});var LD={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var nk={};F(nk,{Clickable:()=>MD,Focusable:()=>$D,FocusableComponent:()=>ND,Hoverable:()=>ID,focusableRingEnabled:()=>au,focusableRingToken:()=>ek,focusableRingValue:()=>vs});var RV={appearance:"none",fontFamily:"inherit"},ID={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}}},MD={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function au(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}function ek(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 vs(t,e,n){let r=ek(t);return r&&r[e]!==void 0?r[e]:n}var $D={border:"none",outline:t=>au(t)?"solid 0 currentColor":"none",":focus-visible":{opacity:1,outline:t=>au(t)?vs(t,"outline","solid X currentColor"):"none",outlineOffset:t=>au(t)?vs(t,"outlineOffset"):void 0}},ND={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:RV};var ik={};F(ik,{Picture:()=>BD});var sk={};F(sk,{Theme:()=>jD,getSystemGlobalTheme:()=>cu});var ok={};F(ok,{Circle:()=>FD,SHAPES:()=>Eg,Shape:()=>rk,default:()=>PV,depth:()=>Ag});M();var Ze=O(),Ag={4:{boxShadow:`rgba(0,0,0,.10) 0 2${Ze.unit.default} 4${Ze.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${Ze.unit.default} 6${Ze.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${Ze.unit.default} 10${Ze.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${Ze.unit.default} 16${Ze.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${Ze.unit.default} 26${Ze.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${Ze.unit.default} 42${Ze.unit.default}`}},Da=t=>at(t.shapeDirectionColor)||at(t.borderColor)||at(t.backgroundColor)||at(t.background),vg=t=>{let e=If.transition(t.transition,t);return e&&e.transition},Eg={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:Da(t),transition:vg(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:Da(t),transition:vg(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:Da(t),transition:vg(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:vg(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${Da(t)} 25%, transparent 25%), linear-gradient(315deg, ${Da(t)} 25%, transparent 25%)`},"&:after":{background:Da(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)"}}}},rk={deps:{exec:St,getSpacingBasedOnRatio:ze,getMediaColor:Vt},classlist:{shape:t=>t.deps.exec(Eg[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=Eg[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}}},FD={round:"100%"},PV=rk;M();var cu=({context:t,state:e})=>{let n=e&&e.root,r=n&&n.globalTheme||t.designSystem&&t.designSystem.globalTheme;return r==="auto"?null:r},jD={deps:{depth:Ag},classlist:{depth:t=>!Wt(t.depth)&&t.deps.depth[t.depth]}};var BD={deps:{getSystemGlobalTheme:cu},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:cu},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 ak={};F(ak,{AssetPicture:()=>UD});M();var UD={tag:"picture",children:t=>{let e=me(t);if(e)return $l(e,t.alt)}};var ck={};F(ck,{Svg:()=>VD});var VD={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 lk={};F(lk,{Video:()=>HD});M();var HD={tag:"video",controls:!0,attr:{src:t=>{let e=me(t);return e&&e.src||t.src}},children:t=>{let e=me(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 fk={};F(fk,{Audio:()=>zD});M();var zD={tag:"audio",controls:!0,attr:{src:t=>{let e=me(t);return e&&e.src||t.src}},children:t=>{let e=me(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 uk={};F(uk,{B:()=>lL,Caption:()=>tL,Data:()=>uL,Footnote:()=>cL,H1:()=>KD,H2:()=>GD,H3:()=>YD,H4:()=>XD,H5:()=>ZD,H6:()=>JD,Headline:()=>iL,I:()=>fL,Italic:()=>oL,P:()=>QD,Span:()=>qD,Strong:()=>eL,Subhead:()=>aL,Text:()=>WD,Title:()=>sL,U:()=>nL,Underline:()=>rL});var WD={},qD={tag:"span"},KD={tag:"h1"},GD={tag:"h2"},YD={tag:"h3"},XD={tag:"h4"},ZD={tag:"h5"},JD={tag:"h6"},QD={tag:"p"},tL={tag:"caption"},eL={tag:"strong",fontWeight:"700"},nL={tag:"u"},rL={tag:"u"},oL={tag:"i"},sL={},iL={tag:"h6",fontSize:"B",fontWeight:500},aL={tag:"span",fontSize:"Z1"},cL={tag:"span",fontSize:"Z"},lL={tag:"b"},fL={tag:"i"},uL={tag:"data"};var dk={};F(dk,{Box:()=>Cg,Br:()=>pL,Hr:()=>dL,Li:()=>hL,Ol:()=>mL,Ul:()=>gL});var DV=t=>{if(!t.context)return;let{props:e,__ref:n}=t,r=ne(e,t,{unpack:!1});n.__class=r},Cg={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:DV},dL={tag:"hr",margin:"C1 0"},pL={tag:"br"},hL={tag:"li"},gL={tag:"ul",childExtends:{extends:"Li"}},mL={tag:"ol",childExtends:{extends:"Li"}};var pk={};F(pk,{Hgroup:()=>bL,HgroupButton:()=>wL,HgroupRows:()=>_L});var yL=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},bL={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:yL,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:yL,margin:"0",color:"paragraph"}},_L={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},wL={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var hk={};F(hk,{Bridge:()=>SL});var SL={tag:"div"};var gk={};F(gk,{Input:()=>xL});var xL={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 mk={};F(mk,{NumberInput:()=>kL});var kL={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 yk={};F(yk,{Checkbox:()=>vL,CheckboxHgroup:()=>EL});var vL={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=>vs(t,"outline","solid X currentColor"),outlineOffset:t=>vs(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"}}},EL={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var bk={};F(bk,{Radio:()=>AL,RadioHgroup:()=>CL});var AL={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}},CL={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var _k={};F(_k,{Toggle:()=>TL,ToggleHgroup:()=>OL});var TL={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}},OL={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var wk={};F(wk,{Textarea:()=>RL,TextareaWithButton:()=>PL});var RL={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"}},PL={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 Sk={};F(Sk,{FileIcon:()=>NL,Icon:()=>ML,IconText:()=>$L});Rt();var DL=new Set,LL=(t,e)=>{if(!DL.has(t)&&(DL.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.`)}},IL=new WeakMap,LV=t=>{let e=IL.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},IL.set(t,e)),e},IV=(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},MV=(t,e,n)=>{let r=n&&n.context&&n.context.document||(typeof document<"u"?document:null);bt(t);try{let o=O();o&&!o.__svgCache&&(o.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=ns(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&r&&Object.keys(s).length&&rs(s,{document:r}),Object.keys(s).length>0}finally{mt()}},$V=(t,e,n,r,o)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=LV(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=()=>i(e,t),f=Promise.resolve().then(l).then(u=>{let d=IV(u,n);return d?MV(s,d,r):!1}).catch(u=>(typeof console<"u"&&console.error&&console.error(`[Icon] iconsLoader failed for "${e}":`,u),!1)).then(u=>{a.pending.delete(e);let d=a.waiting.get(e);a.waiting.delete(e),u||a.failed.add(e),d&&d.forEach(p=>{try{p(u)}catch(g){console.error("[Icon] repaint error:",g)}})});return a.pending.set(e,f),!0},ML={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=!1,l=(h,m)=>{try{return{value:t.call("exec",h,m)}}catch(y){if(t.__ref&&(t.__ref.__iconNameError=y),!c&&typeof console<"u"&&console.warn){c=!0;let _=t.__ref&&t.__ref.path,S=_&&_.length?` at <${_.join(".")}>`:"";console.warn(`[Icon] name/icon factory threw${S} \u2014 treated as no name (a painted glyph stays):`,y&&y.message||y)}return{threw:!0}}},f=(h,m)=>{let{semanticIcons:y}=m&&m.designSystem,{toCamelCase:_}=m&&m.utils,v=_(h).split(/([a-z])([A-Z])/g),x=v[1]?v[0]:h.split(".")[0].split(" ")[0],w=y&&y[x];if(w){let b=h.includes(".")?"sfsymbols."+h.split(".").slice(1).join("."):"sfsymbols";return h=w[b]||w[h.split(".")[0].split(" ")[0]],{tag:"span",semanticIcons:!0,width:"A",height:"A",lineHeight:"1em",":after":{fontSize:"Z",fontWeight:"300",content:`"${h}"`,textAlign:"center",display:"inline-block",style:{color:"currentColor",fontFamily:"'SF Pro Icons', 'SF Pro', 'SF Symbols', 'Segoe UI'"}}}}},u=h=>{let{key:m}=h,y=l(h.name||h.icon||m,h);if(y.threw)return{name:m,threw:!0};let _=y.value;return h.call("isString",_)&&_.includes("{{")&&(_=h.call("replaceLiteralsWithObjectFields",_)),{name:h.call("isString",_)?_:m}},d=t.src,p,g=()=>{let h=u(t);if(h.threw&&t.node&&t.node.innerHTML)return;let m=h.name,y=m;if(m.includes(" ")){let N=m.split(" ");m=N[0]+N.slice(1).map(B=>B.charAt(0).toUpperCase()+B.slice(1)).join("")}let _=a(m),S=_.split(/([a-z])([A-Z])/g),v=f(y,n);if(v){Object.assign(t,v);return}let x,w=t[".isActive"];w&&(w.name||w.icon)&&t.isActive&&(x=l(w.name||w.icon,t).value);let b=r&&r[".isActive"];b&&b.icon&&r.isActive&&(x=l(b.icon||b.Icon.name||b.Icon.icon,t).value),t.call("isString",x)&&x.includes("{{")&&(x=t.call("replaceLiteralsWithObjectFields",x));let k;o[x]&&(k=x),o[_]?k=_:o[S[0]+S[1]]?k=S[0]+S[1]:o[S[0]]?k=S[0]:i&&t.warn("Can't find icon:",m,k);let C=o[k],D=r&&r.src||d;!C&&!D&&($V(n,y,_,t,B=>{if(!(p&&p._disposed)){if(!B)return LL(y,t);g()}})||LL(y,t));let R=s&&k,$=C||D||o.noIcon;if(!(t.spriteId===R&&t.src===$&&t.node&&t.node.innerHTML)&&(t.spriteId=R,t.src=$,typeof t.html=="function"&&t.node)){let N=t.context&&t.context.designSystem;N&&bt(N);try{let B=t.html(t,t.state,t.context);B!=null&&typeof B!="function"&&(t.node.innerHTML=B)}finally{N&&mt()}}};p=z(g,{depth:t.__ref&&t.__ref.path&&t.__ref.path.length||0}),t.__ref&&(t.__ref.__effects||(t.__ref.__effects=[]),t.__ref.__effects.push(p))},attr:{viewBox:"0 0 24 24","aria-hidden":t=>t.ariaLabel||t.role==="img"?null:"true",focusable:"false"}},$L={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},NL={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var qk={};F(qk,{A:()=>OI,Link:()=>zk,RouteLink:()=>RI,RouterLink:()=>Wk});var Ma={};F(Ma,{default:()=>w9,getActiveRoute:()=>Hk,lastLevel:()=>Dg,lastPathname:()=>Ia,loadLazy:()=>Nk,matchRoute:()=>Bk,parseQuery:()=>Uk,parseRoutePattern:()=>jk,resolveRouterElement:()=>gu,router:()=>dn,runGuards:()=>vI,saveScrollPosition:()=>uu});M();var xk="__smblsRouter",kk=new WeakMap,NV=0,vk=()=>Date.now().toString(36)+(++NV).toString(36)+Math.random().toString(36).slice(2,6),Ek=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},gr=t=>{try{return t.state}catch{return}},fu=t=>{try{let{pathname:e,search:n,hash:r}=t.location;return e+n+r}catch{return null}},UL=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null},VL=t=>{let e=UL(t)?t[xk]:null;return e&&typeof e.key=="string"&&typeof e.chain=="string"&&Number.isInteger(e.index)?e:null},Ak=(t,e)=>t==null?{[xk]:e}:UL(t)?{...t,[xk]:e}:null,Ck=()=>({key:vk(),index:0,chain:vk()}),La=(t,e)=>{let n=VL(e);return{key:n?n.key:null,index:n?n.index:null,chain:n?n.chain:null,url:fu(t),state:e}},HL=(t,e)=>{let n=VL(t);return e.key?!!n&&n.key===e.key:!n&&t===e.state},lu=(t,e,n)=>!!n&&fu(t)===n.url&&HL(e,n),Tk=(t,e,n)=>({...t,url:e,state:n}),Ok=(t,e)=>{let n=gr(e),r=La(t,n);if(r.key)return r;let o=Ck(),s=Ak(n,o);if(!s)return r;try{e.replaceState(s,null)}catch{return r}return Tk(o,r.url,s)},FV=(t,e)=>{let n=kk.get(t);return!n&&e&&(n={current:null,pending:null,expect:null,seq:0,pops:new WeakMap,positions:null,scrollNode:null,restore:null},kk.set(t,n)),n||null},zL="smbls.router.scroll",FL=100,jV=1e3,jL=["wheel","touchstart","keydown","pointerdown"],WL=t=>{try{return t.sessionStorage||null}catch{return null}},qL=t=>{try{let e=JSON.parse(t.getItem(zL)||"[]");return Array.isArray(e)?e.filter(n=>Array.isArray(n)&&typeof n[0]=="string"):[]}catch{return[]}},KL=(t,e)=>{if(!t.positions){t.positions=new Map;let n=WL(e);if(n)for(let[r,o]of qL(n))o&&Number.isFinite(o.top)&&Number.isFinite(o.left)&&t.positions.set(r,{top:o.top,left:o.left})}return t.positions},Rk=(t,e,n,r)=>{let o=KL(t,e);o.delete(n),o.set(n,{top:Math.round(Number(r.scrollTop)||0),left:Math.round(Number(r.scrollLeft)||0)}),o.size>FL&&o.delete(o.keys().next().value);let s=WL(e);if(s)try{let i=new Map(qL(s));for(let[a,c]of o)i.delete(a),i.set(a,c);s.setItem(zL,JSON.stringify(Array.from(i).slice(-FL)))}catch{}},BL=(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)},BV=(t,e,n,r,o,s,i)=>{n.restore&&n.restore.end("replaced"),n.restore=r;let a=typeof i=="number"&&i>=0?i:jV,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 jL)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 jL)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 BL(t,e,g);l(Math.min(s.top,c()),s.left),r.end(h?"placed":"clamped")};BL(t,e,g)},UV=(t,e)=>{let{win:n,history:r,track:o}=t,s=o.pops.get(e);if(s)return s;let i=La(n,gr(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&&Rk(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},VV=t=>{let{win:e,history:n,track:r}=t,o=gr(n);if(r.pending&&lu(e,o,r.pending.to)||r.expect&&lu(e,o,r.expect.away))return;let s=r.current;if(s&&(s.key?HL(o,s):lu(e,o,s))){s.url=fu(e),s.state=o;return}r.current=t.restore?Ok(e,n):La(e,o),r.pending=null,r.seq++},GL=(t,e,n)=>{let r=e.scrollRestoration==="restore",o=Ek(t),s=r||Array.isArray(e.guards)&&e.guards.length>0,i=o&&FV(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=UV(a,c):VV(a),a},Tg=(t,e)=>{e.settled=!0,t.pending===e&&(t.pending=null)},Pk=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 Tg(o,e),o.seq!==e.seq||!lu(n,gr(r),e.to)?!1:(o.current=t.restore&&!e.to.key?Ok(n,r):e.to,o.seq++,e.committed=!0,!0)},YL=t=>{let e=t&&t.pop;e&&!e.echo&&!e.settled&&Tg(t.track,e)},HV=(t,e,n)=>{try{t.addEventListener("popstate",()=>{e.expect===n&&(e.expect=null)},{once:!0})}catch{}},Dk=(t,e)=>{let n=t&&t.pop;if(!n||n.echo||n.settled)return;let{win:r,history:o,track:s}=t;Tg(s,n);let i=n.from;if(!i||s.seq!==n.seq||!lu(r,gr(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};HV(r,s,f);try{o.go(i.index-a.index)}catch{s.expect=null}return}let c=Ck(),l=Ak(i.state,c);try{o.replaceState(l||i.state,null,i.url)}catch{return}s.current=l?Tk(c,i.url,l):La(r,gr(o)),s.seq++},XL=(t,e)=>{let n=fu(e);t&&n!==null&&(t.__routerAddress=n)},ZL=(t,e,n)=>{let r=t&&t.pop;if(r&&!r.echo&&r.from)return Dk(t,!0);r&&!r.settled&&Tg(t.track,r);let o=Ek(n),s=e&&e.__routerAddress;if(!(!o||!s||s===fu(n)))try{o.replaceState(gr(o),null,s)}catch{}},JL=(t,e,n,r,o=t&&t.win)=>{if(!t){try{r?o.history.replaceState(e,null,n):o.history.pushState(e,null,n)}catch{}return}let{history:s,track:i}=t,a=i.current;!r&&a&&a.key&&t.scrollNode&&Rk(i,o,a.key,t.scrollNode);let c=r?La(o,gr(s)):Ok(o,s),l=c.key?r?{key:c.key,index:c.index,chain:c.chain}:{key:vk(),index:c.index+1,chain:c.chain}:Ck(),f=Ak(e,l);try{r?s.replaceState(f||e,null,n):s.pushState(f||e,null,n)}catch{return}i.current=f?Tk(l,n,f):La(o,gr(s)),i.pending=null,i.expect=null,i.seq++},QL=(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&&KL(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"||BV(s,r,i,{key:a.key,pop:o,seq:i.seq,outcome:null},e,c,n.scrollRestoreTimeout),!0},uu=t=>{let e=Ek(t),n=e&&kk.get(e);!n||!n.scrollNode||!n.current||!n.current.key||Rk(n,t,n.current.key,n.scrollNode)};M();var rI=["components","functions","methods","snippets"],oI=new Set(["pages",...rI]),Lk=new Set(["default","__esModule"]),Es=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Yt=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Og=new WeakMap,tI=new WeakMap,Mk=new WeakMap,eI=new Set,As=(t,e=console.warn)=>{eI.has(t)||(eI.add(t),e(t))},sI=t=>Yt(t&&t.lazy),du=(t,e)=>{let n=t&&t.lazy;return Yt(n)&&Es(n,e)?n[e]:void 0},$k=(t,e)=>{let n=Og.get(t);n||(Og.set(t,n=new Map),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{for(let o of n.values())o.disposed=!0,o.waiting.clear();Og.delete(t)}));let r=n.get(e);return r||(r={status:"idle",promise:null,failure:null,disposed:!1,pages:null,waiting:new Set,maps:new Set},n.set(e,r)),r},iI=(t,e)=>!sI(e)||!Yt(t)||!Es(t,"lazy")?null:typeof t.lazy=="string"&&t.lazy?t.lazy:null,Rg=t=>!!t&&typeof t=="object"&&Mk.has(t),aI=t=>t&&(t.status==="error"||t.status==="reload")?t.status:"loading",zV=(t,e)=>typeof du(t,e)!="function"?"error":aI(Og.get(t)?.get(e)),WV=(t,e)=>{let n=tI.get(t);if(n&&n.group===e)return n;let{lazy:r,state:o,...s}=t,i=o==null||Yt(o)||typeof o=="function";i?s.state=(c,l)=>{let f=typeof o=="function"?o(c,l):o;return{...Yt(f)?f:null,lazyStatus:zV(c.context,e)}}:(s.state=o,tt()&&As(`[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 tI.set(t,a),Mk.set(s,a),a},qV=t=>t.__ref&&t.__ref.contentElementKey||"content",Pg=(t,e)=>{let n=t&&t.__ref&&t.__ref.__routerRendered,r=n&&Rg(n.content)?Mk.get(n.content):null;return!r||r.group!==e?null:{record:r,page:t[qV(t)]}},Ik=(t,e,n)=>{let r=Pg(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)}},KV=t=>Yt(t)?!Object.keys(t).some(n=>oI.has(n))&&Yt(t.default)?t.default:t:{},GV=t=>{let e={};if(!Yt(t))return e;for(let n of Object.keys(t)){if(Lk.has(n))continue;let r=n.charCodeAt(0)===47,o=r?n:"/"+(n==="index"?"":n);(r||!Es(e,o))&&(e[o]=t[n])}return e},cI=(t,e,n,r,o)=>{if(!Yt(t))return 0;let s=0;for(let i of Object.keys(t))iI(t[i],r)===e&&(s++,Es(n,i)?t[i]=n[i]:delete t[i]);for(let i of Object.keys(n))Es(t,i)?t[i]!==n[i]&&o.push(`pages['${i}']`):t[i]=n[i];return s},nI=(t,e,n)=>{let r=t[e];if(!Yt(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}},YV=t=>{let e=t.__ref&&t.__ref.origin;if(!Yt(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]},XV=(t,e,n,r)=>{let o=new Set;for(let i of r.waiting){let a=Pg(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 YV(l)){if(!n.has(f))continue;let u=(l.__ref.path||[l.key]).join(" \u203A ");As(`[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)},ZV=(t,e,n,r)=>{let o=t.context,s=KV(n),i=tt(),a=[],c=new Set;if(i)for(let p of Object.keys(s))oI.has(p)||Lk.has(p)||As(`[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 rI){let g=s[p];if(!Yt(g))continue;let h=Yt(o[p])?o[p]:{},m={};for(let _ of Object.keys(g))if(!Lk.has(_)){if(Es(h,_)){h[_]!==g[_]&&a.push(`${p}.${_}`);continue}m[_]=g[_]}let y=Object.keys(m);if(y.length&&(nI(o,p,m),p==="components"&&y.forEach(_=>c.add(_)),p==="methods"&&(l=!0),(p==="functions"||p==="snippets")&&Yt(o.utils))){let _={};for(let S of y)Es(o.utils,S)||(_[S]=m[S]);Object.keys(_).length&&nI(o,"utils",_)}}l&&wa(o);let f=GV(s.pages);r.pages=f;let u=null;try{u=typeof t.getRoot=="function"?t.getRoot():null}catch{}let d=new Set;Yt(o.pages)&&d.add(o.pages),u&&Yt(u.routes)&&d.add(u.routes);for(let p of r.maps)d.add(p);for(let p of r.waiting)Yt(p.routes)&&d.add(p.routes);for(let p of d)cI(p,e,f,o,a);i&&a.length&&As(`[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&&XV(u,e,c,r)},lI=(t,e)=>{let n=t&&t.__ref,r=n&&n.__lazyRoute;if(!r||r.group!==e||(n.__lazyRoute=null,typeof t.set!="function")||!Pg(t,e))return;let o=()=>r.rerender({pushState:!1,replace:!1,scrollToTop:!1,guards:[],lazy:{group:e,status:"loaded"}});Promise.resolve().then(o).catch(s=>console.error(`[smbls/router] lazy group "${e}" loaded, but its route failed to render`,s))},pu=t=>!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function",JV=(t,e,n)=>!!t&&(pu(e)&&e===t.returned||!!n&&typeof n=="object"&&n===t.error),fI=(t,e)=>{let n=t.context,r=$k(n,e);if(r.status==="loading"||r.status==="loaded")return r.promise;let o=du(n,e),s=r.failure;r.status="loading";let i,a=!1,c=()=>i=o(),l=Promise.resolve().then(c).then(f=>{a=!0,r.disposed||ZV(t,e,f,r)}).then(()=>{r.status="loaded",r.failure=null;let f=[...r.waiting];r.waiting.clear();for(let u of f)lI(u,e)},f=>{let u=!a&&JV(s,i,f);if(r.failure=a?null:{returned:i,error:f},r.status=u?"reload":"error",r.promise=null,r.disposed)throw f;u?As(`[smbls/router] lazy group "${e}" cannot load in this page: its loader handed back the import that already failed (the same promise or the same error) and requested nothing \u2014 a bundler that keeps a failed dynamic import (parcel) does this. Its routes show their placeholder with lazyStatus 'reload'; reloading the page loads the group.`,d=>console.error(d,f)):console.error(`[smbls/router] lazy group "${e}" failed to load. Its routes show their placeholder with lazyStatus 'error'; the next navigation to one of them, or loadLazy('${e}'), calls the group's loader again.`,f);for(let d of[...r.waiting])Pg(d,e)?Ik(d,e,r.status):r.waiting.delete(d);throw f});l.catch(()=>{}),r.promise=l;for(let f of r.waiting)Ik(f,e,"loading");return l},uI=(t,e,n)=>{let r=e&&e.context,o=iI(t,r);if(!o)return null;let s=$k(r,o);if(Yt(n)&&s.maps.add(n),s.status==="loaded"&&cI(n,o,s.pages||{},r,[])>0)return{rematch:!0};let i=typeof du(r,o)=="function";return i?fI(e,o):As(`[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:WV(t,o).definition,group:o,status:i?"loading":"error"}},dI=(t,e,n)=>{if(!e||!e.group||e.status==="error")return;let r=t.context,o=t.__ref;if(!o||typeof du(r,e.group)!="function")return;let s=$k(r,e.group);if(o.__lazyRoute={group:e.group,rerender:n},Ik(t,e.group,aI(s)),s.status==="loaded"){let i=()=>lI(t,e.group);Promise.resolve().then(i);return}s.waiting.add(t)};function Nk(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=du(n,t);return typeof r!="function"?(r===void 0&&sI(n)&&tt()&&As(`[smbls/router] loadLazy('${t}'): context.lazy declares no group "${t}" \u2014 nothing to load.`),Promise.resolve()):fI(e,t)}var QV=(t,e,n)=>({...t.context&&t.context.domqlOptions,...e.mountOptions,contentElementKey:n}),pI=(t,e,n)=>{let r=n.mountOptions;if(!r)return;let o=e.context&&e.context.domqlOptions;for(let s in r)t[s]=o&&s in o?o[s]:void 0},_I=t=>{let e=Bn;return typeof e=="function"?e(t.mountYield)>0:t.mountYield===!0},t9=t=>{let e=Sg;return typeof e!="function"||!e(t)?null:xs(t)},Fk=Object.freeze({holdTail:!0}),e9=t=>typeof t.holdPage=="function"&&typeof $e=="function",wI=(t,e)=>{let n=()=>$e(t);pu(e)?e.then(n,n):n()},n9=(t,e)=>{let n=null;try{n=t.holdPage(e)}catch{}wI(e,n)},SI=Object.freeze({holdTail:!0,deferAttach:!0}),r9=(t,e,n,r)=>{let o=t.firstView;if(!o||typeof $e!="function"||typeof oo!="function")return null;if(!o.committed)return Fk;if(!_I(r))return null;let s=e.node;return!e[n]&&s&&s.isConnected?SI:(r.mountYield=void 0,null)},o9=(t,e,n,r)=>{if(e===Fk){t.firstView.page=n,wI(n,t.firstView.commit);return}e===SI&&hr().then(()=>{n.__ref&&r()&&oo(n),$e(n)})},xI=/^:(.+)/,kI=/^\*$/,hI=new Map,jk=t=>{let e=hI.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(xI);a?r.push({index:i,name:a[1]}):kI.test(n[i])&&(o=!0)}let s={segments:n,params:r,hasWildcard:o,pattern:t};return hI.set(t,s),s},Bk=(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=jk(l),u=s9(o,f);u>a&&(a=u,i=l,c=i9(o,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},s9=(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(xI.test(n[i]))o+=1;else if(kI.test(n[i]))o+=.5;else return-1;return o},i9=(t,e)=>{let n={};for(let{index:r,name:o}of e.params)t[r]&&(n[o]=decodeURIComponent(t[r]));return n},Uk=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},gI=t=>t===!1||typeof t=="string"?t:void 0,Vk=(t,e,n=0)=>{for(let r=n;r<t.length;r++){let o=t[r](e);if(pu(o))return Promise.resolve(o).then(i=>{let a=gI(i);return a===void 0?Vk(t,e,r+1):a});let s=gI(o);if(s!==void 0)return s}return!0},vI=async(t,e)=>!t||!t.length?!0:Vk(t,e),gu=(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},a9=(t,e)=>{let n=e.customRouterElement;if(!n||!t.__ref||t.__ref.root!==t)return t;let r=gu(t,n);return!r||r===t?t:(t.routes&&(r.routes=t.routes),r)},Hk=(t=0,e)=>{e||(e=typeof T<"u"?T.location.pathname:"/");let r=e.split("/")[t+1];if(r)return`/${r}`},Ia,Dg=0,mI=0,c9=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,l9=t=>t&&(t.scrollingElement||t.documentElement)||null,EI={level:Dg,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},AI=(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},CI=t=>{let e=t.__routeExit;e&&(t.__routeExit=null,e.abort())},f9=(t,e,n,r,o,s,i)=>{let a=e.__routeExit;if(a&&a.page===n)return a.wait;if(CI(e),!n||!n.node||typeof t.onRouteExit>"u"||!AI(s,i))return null;let c=typeof o=="number"&&o>=0?o:EI.exitTimeout,l=typeof AbortController=="function"?new AbortController:null,f={...r,page:n,timeout:c,signal:l?l.signal:void 0},u;try{u=Gn("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},hu=new WeakMap,u9=t=>t===!0?{}:t&&typeof t=="object"&&!Array.isArray(t)?t:null,d9=(t,e,n,r)=>{let o=u9(t.transition);return!o||!e||Rg(e.content)||!n||typeof n.startViewTransition!="function"||hu.get(n)>0||!AI(n,r)?null:o},p9=t=>{let e=t.__routeTransition;if(!(!e||e.updating))try{e.transition.skipTransition()}catch{}},h9=t=>{let e=typeof t.types=="string"?[t.types]:t.types;return Array.isArray(e)?e.filter(n=>typeof n=="string"&&n):[]},g9=t=>{try{let e=t&&t.ViewTransition;return!!e&&"types"in e.prototype}catch{return!1}},m9=100,y9=1e3,yI=(t,e)=>t===!1?1/0:typeof t=="number"&&t>=0?t:e,bI=t=>{let e=t&&t.performance;return e&&typeof e.now=="function"?e.now():Date.now()},b9=t=>{t&&typeof t.then=="function"&&t.then(null,()=>{})},_9=(t,e,n,r,o,s,i)=>{let a=t.node,c=a&&a.style,l=typeof n.name=="string"&&n.name?n.name:null,f=e.__routeTransition,u={transition:null,updating:!1,name:l,previousName:f&&f.name&&c?f.previousName:c&&c.viewTransitionName||""},d=()=>{if(e.__routerNavSeq===s){u.updating=!0,u.swapStarted=bI(o),hu.set(r,(hu.get(r)||0)+1);try{return i()}finally{hu.set(r,hu.get(r)-1),u.updating=!1}}},p=()=>{l&&c&&c.viewTransitionName===l&&(c.viewTransitionName=u.previousName)};l&&c&&(c.viewTransitionName=l);let g=h9(n),h=null;try{h=g.length&&g9(o)?r.startViewTransition({update:d,types:g}):r.startViewTransition(d)}catch{}if(!h)return p(),null;u.transition=h,e.__routeTransition=u,b9(h.ready);let m=!1,y=null,_=()=>{m=!0,y!==null&&(o.clearTimeout(y),y=null),e.__routeTransition===u&&(e.__routeTransition=null,p())},S=()=>{if(!(m||e.__routeTransition!==u))try{h.skipTransition()}catch{}};h.finished&&typeof h.finished.then=="function"?h.finished.then(_,_):_();let v=yI(n.swapBudget,m9),x=yI(n.timeout,y9);x!==1/0&&h.ready&&typeof h.ready.then=="function"&&o&&typeof o.setTimeout=="function"&&h.ready.then(()=>{m||(y=o.setTimeout(()=>{y=null,S()},x))},()=>{});let w=h.updateCallbackDone;return!w||typeof w.then!="function"?Promise.resolve():(v!==1/0&&w.then(()=>{u.swapStarted!==void 0&&bI(o)-u.swapStarted>v&&S()},()=>{}),w)},dn=async(t,e,n={},r={})=>{let o=e||void 0,s=o?.context?.window||T,i=o?.context?.document||yt,a={...EI,...o.context.routerOptions,...r};Dg=a.lastLevel,o=a9(o,a);let c=!(r&&r.render===!1),l=o.__ref;(a.contentElementKey!=="content"&&a.contentElementKey!==l.contentElementKey||!l.contentElementKey)&&(l.contentElementKey=a.contentElementKey||"content");let f=l.contentElementKey||a.contentElementKey||"content",u=s.location.origin!=="null"?s.location.origin:"http://localhost";t=c9(t);let d=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,p=new d(u+t),{pathname:g,search:h,hash:m}=p,y=Uk(h),_=o.node,S=m&&m!==s.location.hash.slice(1),v=g!==Ia,x=Ia,w=++mI;Ia=g;let b=()=>{mI===w&&(Ia=x)},k=l.__routerRendered,C,D,R,$;if(a.useParamsMatching){let Y=Bk(g,o.routes,a.level);C=Y.key,D=Y.routePath,R=Y.content,$=Y.params}else{C=Hk(a.level,g),D=C;let Y=o.routes;R=Y?Y[C||"/"]||Y["/*"]:null,$={}}a.scrollNode===void 0&&(a.scrollNode=l9(i));let N=a.scrollToNode?_:a.scrollNode;if(o.state?.root?.debugging){o.state.root.debugging=!1;return}let B=GL(s,a,N);if(B&&B.pop&&B.pop.echo)return;if(!R){b(),a.onNotFound?a.onNotFound({pathname:g,route:C,element:o}):(a.silent||console.warn("[smbls/router] no content matched for path",g,"\u2014 available routes:",Object.keys(o.routes||{})),a.event&&a.event.type==="popstate"&&ZL(B,l,s));return}let et=r&&r.lazy?l.__routerStartSeq:l.__routerStartSeq=(l.__routerStartSeq||0)+1;if(a.guards&&a.guards.length){let Y={pathname:g,route:C,params:$,query:y,hash:m,element:o,state:n},Q=Vk(a.guards,Y);if(pu(Q)&&(Q=await Q,l.__routerStartSeq!==et)){b(),YL(B);return}if(Q===!1){b(),Dk(B);return}if(typeof Q=="string"){let Ct=!!(B&&B.pop);if(Ct&&!Pk(B))return;let ct={...r,guards:[]};return Ct&&(ct.event=void 0),delete ct.render,(Ct||a.initialRender)&&(ct.pushState=!0,ct.replace=!0),dn(Q,e,n,ct)}}let X=c?uI(R,o,o.routes):null;if(X&&X.rematch)return dn(t,o,n,r);X&&(R=X.content,a.lazy={group:X.group,status:X.status});let st=l.__routerNavSeq=(l.__routerNavSeq||0)+1,Dt=!k||k.content!==R||k.route!==C,Lt=!!k&&k.content===R,q=!(!c||a.keepSamePage===!0&&Lt&&a.force!==!0)&&(v||Dt||a.force===!0);if(q&&k&&!Rg(k.content)){let Y=f9(o,l,o[f],{from:k.route,to:C,pathname:g,params:$,query:y,hash:m},a.exitTimeout,i,s);if(Y&&(await Y,l.__routerNavSeq!==st||(l.__routeExit&&l.__routeExit.wait===Y&&(l.__routeExit=null),typeof o?.set!="function")))return}else CI(l);let G=q?d9(a,k,i,s):null;if(q&&p9(l),a.pushState){let Y=g+(h||"")+(m||"");JL(B,n,Y,a.replace,s)}else B&&Pk(B);XL(l,s);let nt=QV(o,a,f),J=()=>{let Y=q?r9(a,o,f,nt):null,Q=(!!k||_I(nt))&&!!N&&N.scrollTop===0&&!N.scrollLeft,ct=v||!S?{route:C,routePath:D,hash:m,params:$,query:y,debugging:!1}:{params:$,query:y};a.updateState&&o.state.update(ct,{preventContentUpdate:!0});let yn=null;if(q){f&&a.removeOldElement&&o[f].remove();let Ot=o.__ref?.origin?.content,bn={};if(Ot)for(let K in Ot){let ut=Ot[K];K==="__ref"||K==="props"||K==="node"||K==="parent"||K==="key"||(typeof ut=="string"||typeof ut=="number"||typeof ut=="boolean"||typeof ut=="object"&&ut!==null&&!ut.node&&!ut.__ref)&&(bn[K]=ut)}let oe={...bn,...typeof R=="object"?R:{extends:R}};a.useFragment&&(oe.tag="fragment");let _n={content:R,route:C},H=l.__routerRendered;try{if(typeof o?.set!="function")return;l.__routerRendered=_n;let K=!Y&&e9(a),ut=o.set(oe,nt,Y||(K?Fk:void 0));ut&&Y?o9(a,Y,ut,()=>l.__routerNavSeq===st):ut&&K&&n9(a,ut),yn=t9(o[f])}catch(K){l.__routerRendered===_n&&(l.__routerRendered=H),console.error("[smbls/router] failed to render route content",g,K)}}else Lt&&k.route!==C&&l.__routerRendered===k&&(l.__routerRendered={content:R,route:C});let re=()=>{let Ot=!v&&S,bn=!c||QL(B,N,a,i);if(!bn&&a.scrollToTop&&!Ot&&!Q&&N?.scrollTo&&N.scrollTo({...a.scrollToOptions||{},top:0,left:0}),!bn&&a.scrollToNode&&R[f]?.node?.scrollTo&&R[f].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),!bn&&m){let oe=i.getElementById(m.slice(1));if(oe&&N?.scrollTo){let _n=s.getComputedStyle?s.getComputedStyle(oe):null,H=_n&&parseFloat(_n.scrollMarginTop)||0,K=oe.getBoundingClientRect().top+N.scrollTop-H-(a.scrollToOffset||0);N.scrollTo({...a.scrollToOptions||{},top:K,left:0})}}X&&dI(o,X,oe=>dn(t,o,n,{...r,...oe})),Gn("routeChanged",o,a)};if(yn)return yn.then(()=>{pI(nt,o,a),l.__routerNavSeq===st&&re()});pI(nt,o,a),re()},ft=G?_9(o,l,G,i,s,st,J):null;if(ft){await ft;return}return J()},w9=dn;var S9=(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")},TI=(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||S9(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||dn)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}},zk={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>Zr(t,t.href)||Zr(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:TI},OI={extends:"Link"},Wk={onClick:TI},RI={extends:[zk,Wk]};var Kk={};F(Kk,{Select:()=>PI});var PI={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 Gk={};F(Gk,{Button:()=>DI,ButtonSet:()=>$I,CircleButton:()=>II,IconButton:()=>NI,KangorooButton:()=>MI,SquareButton:()=>LI});var DI={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)},LI={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"},II={extends:"SquareButton",round:"C"},MI={extends:"Button",childExtends:"IconText"},$I={tag:"nav",display:"flex",childExtends:"SquareButton"},NI={extends:["SquareButton","ClickableItem"],round:"Z"};var Xk={};F(Xk,{Dialog:()=>UI,DialogFooter:()=>HI,DialogHeader:()=>VI});Rt();var x9={ok:1,cancel:1},mu=new WeakMap,k9=0,Cs=t=>{let e=t&&t.node;return e&&e.nodeType===1?e:null},BI=t=>{let e=mu.get(t);return e||(e={id:"smbls-dialog-"+ ++k9,want:void 0,waiting:!1},mu.set(t,e)),e},Yk=(t,e,n,r)=>t[e]!==void 0||n!==void 0&&t[n]!==void 0||!!t.attr&&typeof t.attr=="object"&&t.attr[e]!==void 0||r!==void 0&&!!t.aria&&typeof t.aria=="object"&&t.aria[r]!==void 0,Lg=(t,e,n)=>{n===null?t.removeAttribute(e):t.setAttribute(e,n)},FI=["methods","functions","utils"],v9=t=>{for(let e=0;e<FI.length;e++){let n=t[FI[e]];if(n&&typeof n.polyglot=="function")return!0}return!1},Ig=(t,e,n)=>{let r=t.context;if(!r||!v9(r))return n;let o=t.call("polyglot",e);return typeof o=="string"&&o&&o!==e?o:n},jI=t=>{let e=mu.get(t),n=Cs(t);if(!e||!n)return!0;if(!n.isConnected)return!1;if(e.want){if(!n.open&&typeof n.showModal=="function")try{n.showModal()}catch{}}else n.open&&typeof n.close=="function"&&n.close();return!0},E9=t=>{queueMicrotask(()=>{if(jI(t))return;let e=mu.get(t);!e||e.waiting||typeof t.whenConnected!="function"||(e.waiting=!0,t.whenConnected(()=>{e.waiting=!1,jI(t)}))})},A9=t=>{let e=t.__ref;if(!e||!Cs(t)||!Object.prototype.hasOwnProperty.call(t,"modal")||Yk(t,"data-dialog"))return;let n=z(()=>{let r=t.modal,o=Cs(t);if(!o)return;if(r==null){Lg(o,"data-dialog",null);return}Lg(o,"data-dialog","modal");let s=BI(t),i=!!r;s.want!==i&&(s.want=i,E9(t))},{depth:e.path&&e.path.length||0});e.__effects||(e.__effects=[]),e.__effects.push(n)},C9=t=>t.dialogTitle===!0,T9=t=>{let e=Cs(t);if(!e||e.hasAttribute("aria-labelledby")||e.hasAttribute("aria-label")||Yk(t,"aria-labelledby","ariaLabelledby","labelledby"))return;let n=typeof t.lookdown=="function"?t.lookdown(C9):null,r=Cs(n);if(!r)return;let o=r.getAttribute("id");if(!o){if(Yk(n,"id"))return;o=BI(t).id+"-title",Lg(r,"id",o)}Lg(e,"aria-labelledby",o)},O9=(t,e)=>{let n=Cs(e),r=t.target;if(!n||t.defaultPrevented||!r||typeof r.closest!="function")return;let o=r.closest("[data-dialog-action]");if(!o||!n.contains(o))return;let s=o.getAttribute("data-dialog-action");if(x9[s]!==1)return;let i=n.ownerDocument.defaultView,a=new i.Event(s,{cancelable:!0});n.dispatchEvent(a),!a.defaultPrevented&&n.open&&typeof n.close=="function"&&n.close(s)},R9=t=>{let e=mu.get(t),n=Cs(t);e&&e.want!==void 0&&n&&n.open&&typeof n.close=="function"&&n.close()},UI={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2",'[data-dialog="modal"]:not([open])':{display:"none"},onComplete:{always:!0,handler:t=>{A9(t),T9(t)}},onClick:(t,e)=>O9(t,e),onBeforeRemove:{always:!0,handler:t=>R9(t)}},VI={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{dialogTitle:!0,text:t=>Ig(t,"dialog.title","Title")},SquareButton:{icon:"x",theme:"transparent",aria:{label:t=>Ig(t,"dialog.close","Close")},data:{dialogAction:"cancel"}}},Paragraph:{color:"caption"}},HI={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:t=>Ig(t,"dialog.cancel","Cancel"),data:{dialogAction:"cancel"}},Ok:{text:t=>Ig(t,"dialog.ok","OK"),data:{dialogAction:"ok"}}};var nv={};F(nv,{Tooltip:()=>XI,TooltipHidden:()=>ZI,TooltipLayer:()=>ev,TooltipParent:()=>JI});M();var P9='[data-tooltip]:not([data-tooltip=""])',zI={top:1,bottom:1,left:1,right:1},Zk={top:"bottom",bottom:"top",left:"right",right:"left"},Ts=6,WI=new WeakMap,D9=0,ve=t=>{let e=WI.get(t);return e||(e={id:"smbls-tooltip-"+ ++D9,hover:null,focus:null,shown:null,dismissed:null,showTimer:null,hideTimer:null},WI.set(t,e)),e},Jk=t=>{let e=t&&t.nodeType!==1?t.parentElement:t;return e&&typeof e.closest=="function"?e:null},L9=t=>{let e=t.parent&&t.parent.node;return e&&e.nodeType===1?e:null},I9=t=>{for(let e=t.firstElementChild;e;e=e.nextElementSibling)if(e.hasAttribute("data-tooltip-layer"))return!0;return!1},qI=(t,e)=>{let n=L9(t);if(!e||!n)return null;let r;try{r=e.closest(P9)}catch{return null}if(!r||!n.contains(r))return null;for(let o=r;o&&o!==n;o=o.parentElement)if(I9(o))return null;return r},M9=(t,e)=>!!(e&&t.node&&t.node.contains(e)),$9=t=>{try{return t.matches(":focus-visible")}catch{return!0}},KI=(t,e)=>typeof t=="number"&&t>=0?t:e,Fg=t=>{t.showTimer&&(clearTimeout(t.showTimer),t.showTimer=null),t.hideTimer&&(clearTimeout(t.hideTimer),t.hideTimer=null)},Qk=t=>!!(t.node&&t.node.isConnected&&t.state&&typeof t.state.update=="function"),N9=(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(" "))},tv=(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")},F9=(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)+Ts;s[n]<i(n)&&s[Zk[n]]>=i(Zk[n])&&(n=Zk[n]);let a,c;n==="top"||n==="bottom"?(a=t.left+(t.width-e.width)/2,c=n==="bottom"?t.bottom+Ts:t.top-e.height-Ts):(c=t.top+(t.height-e.height)/2,a=n==="right"?t.right+Ts:t.left-e.width-Ts);let l=(f,u)=>Math.max(Ts,Math.min(u-Ts,f));return{left:l(a,r-e.width),top:l(c,o-e.height),side:n}},j9=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}},B9=t=>(t.title||"")+(t.description||""),$g=(t,e=0)=>{let r=ve(t).shown;if(!r||!Qk(t))return;if(!r.isConnected){Ng(t);return}let o=t.node,s=t.state;if(o.textContent!==B9(s)){e<3&&setTimeout(()=>$g(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=j9(o),u=r.getAttribute("data-tooltip-placement"),d=zI[u]?u:zI[t.tooltipPlacement]?t.tooltipPlacement:"bottom",p=F9(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})},U9=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},GI=(t,e)=>{let n=ve(t);Fg(n),!(!Qk(t)||!e.isConnected)&&(n.shown&&n.shown!==e&&tv(n.shown,n.id),n.shown=e,N9(e,n.id),t.state.update({open:!0,placed:!1,title:e.getAttribute("data-tooltip")||"",description:e.getAttribute("data-tooltip-description")||""}),U9(()=>$g(t)))};function Ng(t){let e=ve(t);Fg(e),e.shown&&tv(e.shown,e.id),e.shown=null,Qk(t)&&t.state.open&&t.state.update({open:!1})}var Mg=(t,e)=>{let n=ve(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){Fg(n);return}if(!r){if(n.showTimer&&(clearTimeout(n.showTimer),n.showTimer=null),!n.shown||n.hideTimer)return;if(e){Ng(t);return}n.hideTimer=setTimeout(()=>{n.hideTimer=null,Ng(t)},KI(t.tooltipHideDelay,100));return}if(n.hideTimer&&(clearTimeout(n.hideTimer),n.hideTimer=null),e||n.shown){GI(t,r);return}n.showTimer&&clearTimeout(n.showTimer),n.showTimer=setTimeout(()=>{n.showTimer=null,GI(t,r)},KI(t.tooltipDelay,250))},YI=t=>{let e=ve(t);e.shown&&(e.dismissed=e.shown,Ng(t))},ev={role:"tooltip",id:t=>ve(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=ve(e),r=Jk(t.target),o=M9(e,r)?n.shown:qI(e,r);o===n.hover&&(o||!n.shown)||(n.hover=o,Mg(e,!1))}},onDocumentPointerout:{capture:!0,passive:!0,handler:(t,e)=>{if(t.relatedTarget)return;let n=ve(e);n.hover&&(n.hover=null,Mg(e,!1))}},onDocumentPointerdown:{capture:!0,passive:!0,handler:(t,e)=>{let n=ve(e),r=Jk(t.target);n.shown&&r&&n.shown.contains(r)&&YI(e)}},onDocumentFocusin:{capture:!0,handler:(t,e)=>{let n=ve(e),r=Jk(t.target),o=r&&$9(r)?qI(e,r):null;o!==n.focus&&(n.focus=o,Mg(e,!0))}},onDocumentFocusout:{capture:!0,handler:(t,e)=>{if(t.relatedTarget)return;let n=ve(e);n.focus&&(n.focus=null,Mg(e,!0))}},onDocumentKeydown:{capture:!0,handler:(t,e)=>{(t.key==="Escape"||t.key==="Esc")&&YI(e)}},onDocumentScroll:{capture:!0,passive:!0,handler:(t,e)=>{ve(e).shown&&$g(e)}},onWindowResize:(t,e)=>{ve(e).shown&&$g(e)},onBeforeRemove:t=>{let e=ve(t);Fg(e),e.shown&&tv(e.shown,e.id),e.shown=e.hover=e.focus=e.dismissed=null}};var XI={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=>jt(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)}},ZI={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)}},JI={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 rv={};F(rv,{Avatar:()=>QI});var V9=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)},QI={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=V9(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 ov={};F(ov,{Range:()=>tM});var tM={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:$i("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:$i("#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 mv={};F(mv,{Dropdown:()=>AM,DropdownList:()=>CM,DropdownParent:()=>TM,DropdownParentFocus:()=>OM,DropdownSiblingFocus:()=>RM});Rt();var zg="hover",oM="focus",yu="sibling",eM={menu:1,listbox:1,tree:1,grid:1,dialog:1},H9={DIV:1,SPAN:1,LABEL:1,P:1,STRONG:1,B:1,EM:1,SMALL:1,H1:1,H2:1,H3:1,H4:1,H5:1,H6:1},z9={BUTTON:1,INPUT:1,SELECT:1,TEXTAREA:1},W9='button, a[href], [role^="menuitem"], [role="option"]',q9={ArrowDown:1,Down:1,ArrowUp:-1,Up:-1,Home:"first",End:"last"},Bg=new WeakMap,Ug=new WeakMap,Vg=new WeakMap,iv=new WeakMap,sM=new WeakSet,K9=0,At=t=>{let e=t&&t.node;return e&&e.nodeType===1?e:null},$a=(t,e)=>{let n=At(t);return n?n.getAttribute(e):null},Qt=(t,e)=>{let n=At(t);return!!n&&!!e&&(n===e||n.contains(e))},sv=t=>{let e=At(t);return!!e&&e.hasAttribute("dropdown")},iM=t=>{let e=At(t);return!!e&&e.tagName==="BUTTON"},jg=t=>iM(t)||$a(t,"role")==="button",nM=t=>{let e=At(t);return!!e&&H9[e.tagName]===1&&!e.isContentEditable},aM=t=>{let e=At(t);return!!e&&!e.disabled&&!e.hidden&&e.getAttribute("aria-disabled")!=="true"},bu=t=>{let e=$a(t,"role");return!!e&&e.indexOf("menuitem")===0&&aM(t)},G9=t=>{let e=At(t);if(!e||!aM(t))return!1;if(z9[e.tagName]===1)return e.getAttribute("type")!=="hidden";if(e.tagName==="A"&&e.hasAttribute("href"))return!0;let n=e.getAttribute("tabindex");return n!==null&&parseInt(n,10)>=0},Os=t=>t&&typeof t.getChildren=="function"?t.getChildren():[],lo=t=>t&&typeof t.dropdownMode=="string"?t.dropdownMode:null,cv=t=>{let e=t&&t.Input_trigger;return e&&e.__ref?e:null},cM={tabindex:"tabIndex","aria-expanded":"ariaExpanded","aria-haspopup":"ariaHaspopup","aria-controls":"ariaControls","aria-labelledby":"ariaLabelledby","aria-label":"ariaLabel","aria-hidden":"ariaHidden"},lM=(t,e)=>{if(t[e]!==void 0)return!0;let n=cM[e];if(n!==void 0&&t[n]!==void 0)return!0;let r=t.attr;if(r&&typeof r=="object"&&r[e]!==void 0)return!0;if(e.indexOf("aria-")===0){let o=t.aria;if(o&&typeof o=="object"&&o[e.slice(5)]!==void 0)return!0}return!1},Y9=(t,e)=>{let n=cM[e],r=t.attr;return typeof t[e]=="function"||n!==void 0&&typeof t[n]=="function"||!!r&&typeof r=="object"&&typeof r[e]=="function"},Un=(t,e,n)=>!e.hasAttribute(n)&&!lM(t,n),ao=(t,e,n)=>{n===null?t.removeAttribute(e):t.setAttribute(e,n)},X9=(t,e)=>{let n=At(t);if(n)for(let r in e)ao(n,r,e[r])},Hg=t=>{let e=At(t);return!e||typeof e.focus!="function"?!1:(e.focus(),e.ownerDocument.activeElement===e)},Z9=t=>{let e=Bg.get(t);return e||(e={id:"smbls-dropdown-"+ ++K9,open:null,trigger:null,panel:null,popup:null,popupRole:null,owns:!1,pressedOpen:!1,written:null},Bg.set(t,e)),e},rM=(t,e)=>!!e&&!!At(e)&&!!t&&t[e.key]===e,J9=(t,e)=>{let n=null,r=null;if(e===yu){let s=t.parent?Os(t.parent):[];for(let i=s.indexOf(t)+1;i>0&&i<s.length&&s[i];i++)if(sv(s[i])){n=s[i];break}return(jg(t)||nM(t))&&(r=t),{panel:n,trigger:r}}let o=Os(t);for(let s=0;s<o.length;s++)if(sv(o[s])){n=o[s];break}if(jg(t))return{panel:n,trigger:t};for(let s=0;s<o.length;s++){let i=o[s];if(!(!At(i)||i.key==="Input_trigger"||sv(i))){(jg(i)||nM(i))&&(r=i);break}}return{panel:n,trigger:r}},Q9=t=>{let e=$a(t,"role");if(e&&eM[e]===1)return{el:t,role:e};let n=Os(t);for(let r=0;r<n.length;r++){let o=$a(n[r],"role");if(o&&eM[o]===1)return{el:n[r],role:o}}return null},mr=t=>{let e=lo(t);if(!e||!At(t))return null;let n=Z9(t);if(n.trigger){let p=e===yu?t.parent:t;if((n.trigger===t||rM(t,n.trigger))&&rM(p,n.panel))return n}let{panel:r,trigger:o}=J9(t,e);if(!r||!o)return n.trigger=n.panel=n.popup=null,null;n.trigger=o,n.panel=r;let s=Q9(r);n.popup=s?s.el:null,n.popupRole=s?s.role:null;let i=At(o),a={},c=i.getAttribute("id");n.popupRole==="menu"&&!c&&Un(o,i,"id")&&(a.id=c=n.id+"-trigger"),jg(o)||(Un(o,i,"role")&&(a.role="button"),Un(o,i,"tabindex")&&(a.tabindex="0")),n.popupRole&&Un(o,i,"aria-haspopup")&&(a["aria-haspopup"]=n.popupRole);let l=At(r),f=l.getAttribute("id");if(!f&&Un(r,l,"id")&&(f=n.id+"-panel",ao(l,"id",f)),f&&Un(o,i,"aria-controls")&&(a["aria-controls"]=f),n.owns=Un(o,i,"aria-expanded"),n.written={open:null,expanded:null},n.owns&&(n.written.expanded=Wg(t,n)?"true":"false",a["aria-expanded"]=n.written.expanded),X9(o,a),n.popupRole==="menu"&&c){let p=At(n.popup);Un(n.popup,p,"aria-label")&&Un(n.popup,p,"aria-labelledby")&&ao(p,"aria-labelledby",c)}o!==t&&e===oM&&$a(t,"tabindex")==="0"&&!Y9(t,"tabindex")&&ao(At(t),"tabindex","-1");let u=cv(t),d=At(u);return d&&!d.hasAttribute("tabindex")&&(lM(u,"tabindex")||ao(d,"tabindex","-1"),Un(u,d,"aria-hidden")&&ao(d,"aria-hidden","true")),Rs(t,n),n},fM=t=>{let e=At(t),n=e&&e.ownerDocument.activeElement;return n&&n!==e.ownerDocument.body?n:null},tH=t=>Qt(t,fM(t)),Wg=(t,e,n)=>e.open!==null?e.open:n||lo(t)===zg?!1:tH(t),Rs=(t,e,n)=>{let r=e.open===null?null:String(e.open);if(e.written.open!==r){e.written.open=r;let s=At(t);s&&ao(s,"data-dropdown-open",r)}if(!e.owns)return;let o=Wg(t,e,n)?"true":"false";if(e.written.expanded!==o){e.written.expanded=o;let s=At(e.trigger);s&&ao(s,"aria-expanded",o)}},Ps=t=>{let e=Ug.get(t);return e||(e={stop:null,stopItem:null,chosen:!1,ready:!1,settling:!1,checks:null,checkRows:null,owned:!1},Ug.set(t,e)),e},uM=(t,e)=>{if(t.stopItem===e&&t.stop===e.key)return;let n=t.stopItem&&Vg.get(t.stopItem);t.stop=e.key,t.stopItem=e,n&&n.set(!1);let r=Vg.get(e);r&&r.set(!0)},dM=(t,e)=>{let n=Ps(t);n.chosen=!0,uM(n,e)},pM=t=>{let e=Ps(t);if(e.settling=!1,e.chosen)return;let n=Os(t);for(let r=0;r<n.length;r++)if(bu(n[r])){uM(e,n[r]);return}},eH=(t,e)=>{if(!e||!e.contains(t))return!1;let n=[];for(let o=t;o!==e;o=o.parentElement)n.push(o);n.push(e);let r=!1;for(let o=n.length-1;o>=0;o--){let s=typeof n[o].getAnimations=="function"?n[o].getAnimations():[];for(let i=0;i<s.length;i++)s[i].transitionProperty==="visibility"&&(s[i].finish(),r=!0)}return r},hM=(t,e)=>{let n=At(t);if(!n)return;let r=n.ownerDocument.activeElement,o=Hg(t);!o&&e&&n.ownerDocument.activeElement===r&&eH(n,At(e))&&(o=Hg(t));let s=t.parent;o&&s&&Ug.has(s)&&dM(s,t)},nH=t=>{let e=t.popupRole==="menu"?t.popup:t.panel;return!e||typeof e.lookdownAll!="function"?[]:e.lookdownAll(t.popupRole==="menu"?bu:G9)},rH=(t,e,n)=>{if(n==="trigger"){let s=fM(t);(!Qt(t,s)&&!Qt(e.panel,s)||Qt(cv(t),s))&&Hg(e.trigger);return}let r=nH(e);if(!r.length)return;let o=n==="last"?r[r.length-1]:null;if(!o)for(let s=0;s<r.length&&!o;s++)$a(r[s],"aria-checked")==="true"&&(o=r[s]);hM(o||r[0],e.panel)},av=(t,e,n)=>{e.open=!0,Rs(t,e),n&&rH(t,e,n)},co=(t,e,n)=>{e.open=!1,Rs(t,e),n&&Hg(e.trigger)},gM=(t,e,n)=>e.trigger===t?!Qt(e.panel,n):Qt(e.trigger,n)?!0:Qt(cv(t),n),mM=(t,e)=>{let n=e&&typeof e.closest=="function"?e.closest(W9):null;return!!n&&Qt(t,n)},yM=(t,e,n)=>{let r=t.key;r==="Escape"||r==="Esc"?(t.preventDefault(),co(e,n,!0)):r==="Tab"&&n.popupRole==="menu"&&Qt(n.popup,t.target)&&co(e,n,!1)},lv=t=>{lo(t)===yu&&t.parent&&sM.add(t.parent),mr(t)},fv=(t,e)=>{let n=mr(e);n&&(n.pressedOpen=Wg(e,n))},oH=(t,e)=>{let n=Bg.get(e);!n||!n.trigger||n.open!==!1||lo(e)!==zg||(n.open=null,Rs(e,n))},uv=(t,e)=>{if(t.defaultPrevented)return;let n=mr(e);if(!n)return;let r=t.target;if(Qt(n.panel,r)){if(lo(e)!==zg||!mM(n.panel,r))return;(n.open===!0||t.detail===0)&&co(e,n,!0);return}if(!gM(e,n,r))return;let o=t.detail===0?n.open===!0:n.pressedOpen;n.pressedOpen=!1,o?co(e,n,!0):av(e,n,n.popupRole==="menu"?"first":"trigger")},dv=(t,e)=>{if(t.defaultPrevented)return;let n=mr(e);if(!n)return;let r=t.target;if(Qt(n.panel,r)){yM(t,e,n);return}if(!gM(e,n,r))return;let o=t.key;if(o==="ArrowDown"||o==="Down"||o==="ArrowUp"||o==="Up")t.preventDefault(),av(e,n,o==="ArrowUp"||o==="Up"?"last":"first");else if(o==="Escape"||o==="Esc"){if(!Wg(e,n))return;t.preventDefault(),co(e,n,!1)}else(o==="Enter"||o===" "||o==="Spacebar")&&!iM(n.trigger)&&(t.preventDefault(),n.open===!0?co(e,n,!0):av(e,n,n.popupRole==="menu"?"first":"trigger"))},pv=(t,e)=>{let n=mr(e);n&&(n.open===null&&Qt(n.panel,t.target)&&(n.open=!0),Rs(e,n))},qg=(t,e)=>{let n=Bg.get(e);if(!n||!n.trigger)return;let r=t.relatedTarget;if(r&&(Qt(e,r)||Qt(n.panel,r))){n.open===null&&Qt(n.panel,r)&&(n.open=!0,Rs(e,n));return}n.open=null,Rs(e,n,!0)},bM=t=>{let e=t.parent;if(!e||!sM.has(e))return null;let n=Os(e);for(let r=n.indexOf(t)-1;r>=0&&n[r];r--)if(lo(n[r])===yu)return n[r];return null},hv=t=>{let e=bM(t),n=e?mr(e):null;return n&&n.panel===t?{ctrl:e,rec:n}:null},_M=t=>{let e=bM(t);e&&mr(e)},wM=(t,e)=>{if(t.defaultPrevented)return;let n=hv(e);n&&yM(t,n.ctrl,n.rec)},SM=(t,e)=>{if(t.defaultPrevented||!mM(e,t.target))return;let n=hv(e);n&&co(n.ctrl,n.rec,!0)},xM=(t,e)=>{let n=hv(e);n&&qg(t,n.ctrl)},sH=(t,e)=>{let n=e.parent,r=lo(n)?mr(n):null;if(r&&r.panel===e){co(n,r,!0);return}let o=At(e),s=o&&o.ownerDocument.activeElement;s&&typeof s.blur=="function"&&s.blur()},kM=(t,e)=>{if(lo(e.parent)&&mr(e.parent))return;let n=At(e);n&&n===n.ownerDocument.activeElement&&n.blur()},iH=(t,e)=>{if(t.defaultPrevented)return;let n=q9[t.key];if(!n)return;let r=typeof e.lookdownAll=="function"?e.lookdownAll(bu):[];if(!r.length)return;let o=-1;for(let i=0;i<r.length&&o===-1;i++)Qt(r[i],t.target)&&(o=i);let s;n==="first"?s=0:n==="last"?s=r.length-1:o===-1?s=n>0?0:r.length-1:s=(o+n+r.length)%r.length,t.preventDefault(),hM(r[s])},aH=(t,e)=>{let n=Os(e);for(let r=0;r<n.length;r++)if(Qt(n[r],t.target)){bu(n[r])&&dM(e,n[r]);return}},cH=t=>{let e=t.parent;if(!e)return"0";let n=Ps(e),r=Vg.get(t);if(!r){n.stop===null&&(n.stop=t.key);let o=n.stop===t.key;o&&(n.stopItem=t),n.ready&&!n.chosen&&!n.settling&&(n.settling=!0,queueMicrotask(()=>pM(e))),r=nn(o),Vg.set(t,r)}return r.get()?"0":"-1"},lH=t=>{_M(t);let e=Ps(t);e.ready=!0,!(e.stopItem&&e.stopItem.parent===t&&bu(e.stopItem))&&pM(t)},fH=t=>{let e=iv.get(t),n=!e;n&&(e={tick:nn(0),seen:0,checked:!1},iv.set(t,e));let r=e.tick.get();return r===e.seen&&(e.checked=!!ei(()=>t.isActive)),e.seen=r,n&&t.parent&&dH(t.parent),e.checked?"true":"false"},uH=(t,e)=>{if(e.checkRows.get(),!t.node){EM(t);return}let n=Os(t);for(let r=0;r<n.length;r++){let o=iv.get(n[r]);if(!o)continue;let s=!!n[r].isActive;s!==o.checked&&(o.checked=s,o.tick.set(o.tick.peek()+1))}},vM=t=>{let e=Ps(t);e.checks||(e.checkRows||(e.checkRows=nn(0)),e.checks=z(()=>uH(t,e),{label:"DropdownList.checks"}))},EM=t=>{let e=Ug.get(t);!e||!e.checks||(e.checks.dispose(),e.checks=null)},dH=t=>{let e=Ps(t);e.checks?e.checkRows.set(e.checkRows.peek()+1):e.owned||vM(t)},pH=t=>{Ps(t).owned=!0},Na={transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"},gv={opacity:0,visibility:"hidden"},AM={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",onComplete:{always:!0,handler:_M},onKeydown:wM,onClick:SM,onFocusout:xM},CM={display:"flex",attr:{dropdown:!0},role:"menu",padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",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"},onKeydown:(t,e)=>{iH(t,e),wM(t,e)},onInit:{always:!0,handler:pH},onComplete:{always:!0,handler:lH},onRender:{always:!0,handler:vM},onBeforeRemove:{always:!0,handler:EM},onFocusin:aH,onClick:SM,onFocusout:xM,childExtends:{extends:"Button",state:{},role:"menuitemradio",tabindex:t=>cH(t),aria:{checked:t=>fH(t)},isActive:(t,e)=>e.active===t.key,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"}}},':where([aria-checked="true"])':{style:{svg:{opacity:"1"}}},Icon:{name:"check",opacity:"0.1"},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},TM={position:"relative",zIndex:999,dropdownMode:zg,":hover":{zIndex:1e3,"& [dropdown]":{...Na}},'[data-dropdown-open="true"]':{zIndex:1e3,"& [dropdown]":{...Na}},'[data-dropdown-open="false"]:hover':{"& [dropdown]":{...gv}},onComplete:{always:!0,handler:lv},onPointerdown:fv,onPointerenter:oH,onClick:uv,onKeydown:dv,onFocusin:pv,onFocusout:qg},OM={position:"relative",tabindex:"0",dropdownMode:oM,":focus-within":{zIndex:1e3,"& [dropdown]":{...Na}},'[data-dropdown-open="true"]':{zIndex:1e3,"& [dropdown]":{...Na}},'[data-dropdown-open="false"]:focus-within':{"& [dropdown]":{...gv}},onComplete:{always:!0,handler:lv},onPointerdown:fv,onClick:uv,onKeydown:dv,onFocusin:pv,onFocusout:qg,Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>kM(t,e)},Dropdown:{onClick:(t,e)=>sH(t,e)}},RM={position:"relative",tabindex:"0",dropdownMode:yu,":focus-within":{zIndex:1e3,"& ~ [dropdown]":{...Na}},'[data-dropdown-open="true"]':{zIndex:1e3,"& ~ [dropdown]":{...Na}},'[data-dropdown-open="false"]:focus-within':{"& ~ [dropdown]":{...gv}},onComplete:{always:!0,handler:lv},onPointerdown:fv,onClick:uv,onKeydown:dv,onFocusin:pv,onFocusout:qg,Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>kM(t,e)}};var yv={};F(yv,{Notification:()=>PM});var PM={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 Ds=Object.assign({},Z0,J0,Q0,tk,nk,ik,ak,ck,ok,lk,fk,sk,uk,dk,pk,hk,gk,mk,yk,bk,_k,wk,Sk,qk,Kk,Gk,Xk,nv,rv,ov,mv,yv);function Kg(t){if(t==null)return 0;if(typeof t!="object")return DM(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let r=0;r<t.length;r++)e=(e^Kg(t[r]))*16777619;return e>>>0}let n=Object.keys(t).sort();for(let r=0;r<n.length;r++)e=(e^DM(n[r]))*16777619,e=(e^Kg(t[n[r]]))*16777619;return e>>>0}function DM(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e}function Gg(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(!Gg(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)||!Gg(t[s],e[s]))return!1}return!0}function bv(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=bv(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 _v(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])?_v(t[r],o,n):t[r]=o}return t}function fo(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 ja(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function _u(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():fo(e)}function LM(t){return t.split(`
|
|
88
|
+
`).map(fo).join(`
|
|
89
|
+
`)}var IM={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 MM(t,e){let n=IM[t]||fo(t),r=_u(e),o=`_${n}-${r}`,s=ja(t),i=yH[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${o}{${a}}`;return`${o}
|
|
90
|
+
${c}`}var yH={"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"},bH="@media (hover: hover)",_H=/(?:^|[^\\]):hover(?![\w-])/,$M=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function NM(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||$M(i))continue;let a=IM[s]||fo(s),c=_u(i),l=`_${a}-${c}`,f=ja(s);n.push(l),r.push(`.${l}{${f}:${i}}`)}return n.join(" ")+"\0"+r.join(`
|
|
91
|
+
`)}function FM(t,e,n){let r=t+e,o=`_c${fo(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&&($M(u)||(i+=`${ja(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&&_H.test(c)&&(a=`${bH}{${a}}`),`${o}
|
|
92
|
+
${a}`}var wv=null;function Xg(t){wv=t}var pn={structuralHash:Kg,deepEqual:Gg,mergeStructural:bv,overwriteDeep:_v,shortHash:fo,toKebab:ja,sanitizeValue:_u,batchShortHash:LM,atomicCssClass:MM,batchAtomicCss:NM,compoundCssClass:FM},jM=!1,Yg=null;function BM(t){return Yg||(Yg=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(pn.structuralHash=e.structuralHash),e.deepEqual&&(pn.deepEqual=e.deepEqual),e.mergeStructural&&(pn.mergeStructural=e.mergeStructural),e.overwriteDeep&&(pn.overwriteDeep=e.overwriteDeep),e.shortHash&&(pn.shortHash=e.shortHash),e.toKebab&&(pn.toKebab=e.toKebab),e.sanitizeValue&&(pn.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(pn.batchShortHash=e.batchShortHash),e.atomicCssClass&&(pn.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(pn.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(pn.compoundCssClass=e.compoundCssClass),jM=!0,wv&&e.batchAtomicCss&&wv({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),Yg)}function UM(){return jM}M();var wu={};F(wu,{BRENDER_REGISTRY_BLOCK:()=>El,CDN_PROVIDERS:()=>Be,DOMQL_EVENTS:()=>pb,DOMQ_PROPERTIES:()=>Cr,ELEMENT_METHOD_OVERRIDE_POINTS:()=>ai,ENV:()=>$b,HTML_TAGS:()=>hi,LIBRARY_PACKAGES:()=>Np,LIBRARY_SCOPES_KEY:()=>Bo,METHODS:()=>Or,METHODS_EXL:()=>Ac,NODE_ENV:()=>rn,OPTIONS:()=>Qc,PACKAGE_MANAGER_TO_CDN:()=>Nr,PARSED_DOMQ_PROPERTIES:()=>Ec,POLYGLOT_LANG_STORAGE_KEY:()=>Rp,PROPS_METHODS:()=>Tr,REVIVED_MARK:()=>Dc,STATE_METHODS:()=>ko,STATE_PROPERTIES:()=>ub,SVG_TAGS:()=>sC,TYPES:()=>bc,UNIVERSAL_RESERVED_KEYS:()=>Op,__resetBuiltinMethodWarnings:()=>jw,addCaching:()=>tp,addContext:()=>Qd,addExtend:()=>s_,addExtends:()=>xn,addItemAfterEveryElement:()=>Zy,addProtoToArray:()=>Sc,addRef:()=>Xd,alternateLinkKey:()=>Fo,applyCSS:()=>kv,applyDependentState:()=>v_,applyEvent:()=>ip,applyEventUpdate:()=>ap,applyExtends:()=>cC,applyProps:()=>qc,arrayContainsOtherArray:()=>zy,arraysEqual:()=>Qy,arrayzeValue:()=>Ho,bareLibraryKey:()=>Cl,bindLibraryGlobalScopes:()=>Ol,brenderRegistryBlock:()=>Pw,buildImgSrcset:()=>Ml,buildSourcesAndImg:()=>$l,cache:()=>O_,call:()=>pw,captureSnapshot:()=>gw,checkForStateTypes:()=>w_,checkIfInherits:()=>sp,checkIfStringIsInArray:()=>nb,clone:()=>Sb,cloneAndMergeArrayExtend:()=>Fc,cloneFunction:()=>Hb,collectExtendsList:()=>gi,concatAddExtends:()=>n_,copyJavaScriptToClipboard:()=>zw,copyStringToClipboard:()=>Hw,createBasedOnType:()=>Yd,createElement:()=>__,createElementExtends:()=>Nd,createExtends:()=>Bc,createExtendsFromKeys:()=>mi,createExtendsStack:()=>Ud,createIfConditionFlag:()=>zb,createInheritedState:()=>S_,createKey:()=>$c,createNestedObject:()=>Ob,createNestedObjectByKeyPath:()=>k_,createObjectWithoutPrototype:()=>Od,createParent:()=>Zd,createPath:()=>Jd,createProps:()=>Kc,createPropsStack:()=>Kd,createRoot:()=>b_,createScope:()=>A_,createSnapshotId:()=>Mc,customDecodeURIComponent:()=>fb,customEncodeURIComponent:()=>lb,cutArrayAfterValue:()=>Yy,cutArrayBeforeValue:()=>Gy,debounce:()=>Nc,debounceOnContext:()=>Ub,decodeNewlines:()=>cb,deepClone:()=>pt,deepContains:()=>Cb,deepDefaults:()=>Ri,deepDestringifyFunctions:()=>ge,deepExtend:()=>$d,deepMerge:()=>dt,deepMergeExtends:()=>kn,deepStringifyFunctions:()=>Oc,defineSetter:()=>uw,destringifyGlobalScope:()=>Ro,detectHeightOnInit:()=>ww,detectInfiniteLoop:()=>Lb,document:()=>yt,encodeNewlines:()=>ab,error:()=>Mo,escapeHtml:()=>W,escapeRegExp:()=>rb,excludeKeysFromObject:()=>Mb,exec:()=>St,exposeBagGlobalScopes:()=>Rl,extendCachedRegistry:()=>r_,extendStackRegistry:()=>Uc,extractArrayExtend:()=>Hc,faviconLinkKey:()=>jr,fetchLibraryData:()=>Fp,fibonacciNumberByIndex:()=>Sw,fileEntryUrl:()=>Dp,filterArrays:()=>tb,filterArraysFast:()=>eb,finalizeExtends:()=>Vd,findClosestNumber:()=>Lp,findClosestNumberInFactory:()=>Iw,findInheritedState:()=>op,findKeyPosition:()=>sb,flattenExtend:()=>yi,formatDate:()=>_w,generateHash:()=>Ld,generateHeadArrayTags:()=>Oi,generateKey:()=>Ic,generateMetaTags:()=>Dw,get:()=>aw,getActiveRoute:()=>Hk,getCDNDirUrl:()=>Pp,getCDNUrl:()=>an,getCapitalCaseKeys:()=>c_,getCdnProviderFromConfig:()=>Ci,getChildStateInKey:()=>rp,getChildren:()=>fw,getContext:()=>gl,getCookie:()=>Yb,getDB:()=>wl,getEmotionStylesheet:()=>Gw,getExtendsInElement:()=>i_,getExtendsStack:()=>jc,getExtendsStackRegistry:()=>Md,getFrequencyInArray:()=>Wy,getFunctionSource:()=>Oe,getHashedExtend:()=>Vc,getImportMapScript:()=>bw,getInObjectByPath:()=>Db,getLocalStorage:()=>Zb,getNev:()=>Bb,getPageMetadata:()=>Lw,getParentStateInKey:()=>np,getPath:()=>ll,getQuery:()=>Sl,getRef:()=>lw,getRoot:()=>dl,getRootContext:()=>hl,getRootData:()=>pl,getRootState:()=>ul,getRootStateInKey:()=>ep,getSpreadChildren:()=>l_,global:()=>Uy,hasFunction:()=>se,hasHandlerPlugin:()=>ui,hasOwnProperty:()=>vb,hashContent:()=>Tn,inheritChildExtends:()=>jd,inheritChildPropsExtends:()=>Fd,inheritParentProps:()=>Gc,inheritRecursiveChildExtends:()=>Bd,init:()=>Vn,initProps:()=>g_,is:()=>he,isArray:()=>I,isBoolean:()=>Sd,isBuiltinElementMethod:()=>db,isContextComponent:()=>f_,isCyclic:()=>Ib,isDOMNode:()=>de,isDate:()=>kd,isDefined:()=>jt,isDevelopment:()=>Pr,isEmpty:()=>Cd,isEmptyObject:()=>Eb,isEqualDeep:()=>Td,isFailedRevival:()=>To,isFunction:()=>P,isHtmlElement:()=>mc,isLazyFunction:()=>xb,isLocal:()=>jb,isLoudDevRuntime:()=>tt,isMalformedDependency:()=>$o,isMethod:()=>hw,isMobile:()=>Kb,isNode:()=>qn,isNot:()=>Hy,isNotProduction:()=>Kn,isNull:()=>xd,isNumber:()=>pe,isObject:()=>A,isObjectLike:()=>V,isPhoto:()=>xw,isPolyglotRetranslatableKey:()=>Jc,isPolyglotWritableKey:()=>Do,isProduction:()=>Rr,isProtectedElementMethod:()=>vo,isRevived:()=>Oo,isStaging:()=>Fb,isState:()=>x_,isString:()=>E,isStringFunction:()=>fi,isStringTag:()=>Pc,isTest:()=>Pd,isTesting:()=>Nb,isUndefined:()=>Wt,isUniversallyReservedKey:()=>mw,isUnresolvableDependency:()=>Fr,isValidDependencyMap:()=>No,isValidHtmlTag:()=>Qb,isWrappedLibrary:()=>cn,joinArrays:()=>oi,jointStacks:()=>o_,jsonForScript:()=>Lo,keys:()=>Cp,lastLevel:()=>Dg,lastPathname:()=>Ia,libraryPackageSpecs:()=>Pi,librarySpecsFor:()=>$p,loadCssFile:()=>Aw,loadJavascript:()=>Cw,loadJavascriptFile:()=>kw,loadJavascriptFileEmbedSync:()=>Ew,loadJavascriptFileSync:()=>vw,loadLazy:()=>Nk,loadRemoteCSS:()=>Tw,loadRemoteScript:()=>Ti,log:()=>dw,logGroupIf:()=>qb,logIf:()=>Wb,lookdown:()=>sw,lookdownAll:()=>iw,lookup:()=>ow,lowercaseFirstLetter:()=>xo,makeObjectWithoutPrototype:()=>Ab,map:()=>wb,mapStringsWithContextComponents:()=>zc,markPolyglotSeeded:()=>En,markRevived:()=>li,matchRoute:()=>Bk,matchesComponentNaming:()=>vn,memoize:()=>Vb,merge:()=>Tt,mergeSharedLibraries:()=>Pl,mergeSharedLibraryDesignSystems:()=>Dl,nextElement:()=>yl,normalizeIgnoreList:()=>Tl,normalizeLibraryKey:()=>Uo,objectToString:()=>Rc,objectizeStringProperty:()=>Wc,overwrite:()=>Lc,overwriteDeep:()=>ie,overwriteShallow:()=>Po,overwriteState:()=>E_,parse:()=>Tp,parseDeep:()=>al,parseQuery:()=>Uk,parseRoutePattern:()=>jk,pickupElementFromProps:()=>Wd,pickupPropsFromElement:()=>zd,polyglotFallbackLang:()=>xl,polyglotLangStorageKey:()=>vi,polyglotSeededKeys:()=>Lr,previousElement:()=>bl,promoteActiveRootState:()=>xi,propExists:()=>p_,propertizeElement:()=>qd,propertizeUpdate:()=>d_,readJsonDataBlock:()=>Io,reinit:()=>xv,remove:()=>lT,removeChars:()=>Ww,removeCookie:()=>Xb,removeDuplicateProps:()=>Xc,removeDuplicatesInArray:()=>si,removeFromArray:()=>qy,removeFromObject:()=>Tb,removeNestedKeyByPath:()=>Rb,removeValueFromArray:()=>wc,removeValueFromArrayAll:()=>Xy,reorderArrayByValues:()=>Jy,repairLegacyArrowScopePreamble:()=>Cc,replaceLiteralsWithObjectFields:()=>Kt,replaceOctalEscapeSequences:()=>ib,resolveAsset:()=>me,resolveFileReferences:()=>jo,resolveHandler:()=>di,resolveRouterElement:()=>gu,resolveSharedLibraries:()=>Ll,returnValueAsText:()=>Gd,router:()=>dn,runGuards:()=>vI,runPluginHook:()=>Dr,saveScrollPosition:()=>uu,scopeElementParam:()=>vd,scopeReceiverExpression:()=>yb,scratchSystem:()=>Ji,scratchUtils:()=>zr,self:()=>Vy,set:()=>ss,setActiveRootState:()=>fl,setCookie:()=>Gb,setHashedExtend:()=>Id,setInObjectByPath:()=>Pb,setLocalStorage:()=>Jb,setNodeStyles:()=>Ap,setProps:()=>cw,setPropsPrototype:()=>Yc,sharedLibrary:()=>Fw,splitPackageSpecifier:()=>kl,spotByPath:()=>cl,srcsetFor:()=>Li,stringIncludesAny:()=>kc,stringToObject:()=>kb,stripVersionRangePrefix:()=>vl,swapItemsInArray:()=>Ky,syncProps:()=>Zc,toCamelCase:()=>Vo,toDashCase:()=>Il,toDescriptionCase:()=>Kw,toPriorityOrder:()=>je,toTitleCase:()=>qw,toggleFullscreen:()=>yw,triggerEventOn:()=>Gn,triggerEventOnUpdate:()=>C_,trimStringFromSymbols:()=>ob,unstackArrayOfObjects:()=>_c,update:()=>h_,updateProps:()=>m_,variables:()=>_l,verbose:()=>ki,warn:()=>ml,warnLibraryAliasCollision:()=>Di,window:()=>T});M();M();M();var SH={group:"group",imagePair:"image-pair","image-pair":"image-pair",old:"old",new:"new"},xH=/^(?:\*|\.?-?[_a-zA-Z][\w-]*)$/,kH=/^-?[_a-zA-Z][\w-]*$/,vH=new Set(["root","*"]),EH="@media (prefers-reduced-motion: no-preference)",AH="@media (prefers-reduced-motion: reduce)",CH=(t,e)=>{let n=E(t)?{animation:t}:A(t)?t:null;if(!n)return null;let r;try{r=ne(n,e)}catch{return null}let o={};for(let s in r){let i=r[s];(E(i)||pe(i))&&(o[s]=i)}return Object.keys(o).length?o:null},VM=(t,e,n={})=>{if(!A(t))return null;let r=!n.scope||n.scope===":root",o=l=>{n.verbose!==!1&&console.warn("[smbls] designSystem.viewTransition: "+l)},s={key:"viewTransition",state:{},context:{designSystem:e}},i={},a={},c=(l,f,u)=>{for(let d in f){if(d==="types"&&!u)continue;let p=SH[d];if(!p){o(`${l}.${d} is not a view-transition part (group, imagePair, old, new)`);continue}let g=`${u}::view-transition-${p}(${l})`,h=CH(f[d],s);h&&(i[g]=h,a[g]={animation:"none"})}};for(let l in t){let f=t[l];if(A(f)){if(!xH.test(l)){o(`"${l}" is not a view-transition name`);continue}if(!r&&vH.has(l)){o(`"${l}" belongs to the document's primary app; a scoped app (${n.scope}) emits its own names only`);continue}if(c(l,f,""),A(f.types))for(let u in f.types){if(!kH.test(u)||!A(f.types[u])){o(`${l}.types.${u} is not a view-transition type with parts`);continue}c(l,f.types[u],`:root:active-view-transition-type(${u})`)}}}return Object.keys(i).length?{[EH]:i,[AH]:a}:null};var TH=O(),HM=(t=TH,e)=>{let n=A(e.localFile)?e.localFile:{},r=pt(n.designSystem||{});return dt(t,r,Pe)},OH={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},Zg=(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},Sv=(t,e)=>{t.CSS_MEDIA_VARS&&Et(Zg(t.CSS_MEDIA_VARS,e));let n=os(t.cssSkinVars,t.cssSkinFallback,e);Object.keys(n).length&&Et(n)},zM=(t,e)=>{let n=VM(t.viewTransition,t,{scope:e,verbose:t.verbose});n&&Et(n)},Vn=(t,e=OH)=>{let n=HM(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=ss({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=Hl(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&&Et(i),c&&(Et({[r]:s.CSS_VARS}),Sv(s,r)),a&&Et(s.reset);let g=s.animation;if(g){let h={};for(let m in g)h[`@keyframes ${m}`]=g[m];Et(h)}return zM(s,r),(u||f)&&wf(s.svg,{document:e.document}),(p||d)&&rs(s.icons,{document:e.document}),s},Jg={},xv=(t,e=Jg)=>{let n=HM(t||{},e),r=e.scopeSelector||":root",o=ss({verbose:!1,...n});return e.preventInject||(Et({[r]:o.CSS_VARS}),Sv(o,r),Et(o.reset),zM(o,r)),o},kv=(t,e=Jg)=>{Et(t)},RH=(t,e=Jg)=>{let n=e.scopeSelector||":root";Et({[n]:t.CSS_VARS}),Sv(t,n)};var PH=(t,e=Jg)=>{};M();var WM=10,DH=t=>{let e=t&&t.window||(typeof window<"u"?window:null);return!!e&&typeof e.requestAnimationFrame=="function"},qM=t=>{let e=t&&typeof t=="object"?t.firstRender:void 0;if(e===!1||!DH(t))return null;if(e===void 0||e===!0)return{budget:WM,progressive:!1};if(e&&typeof e=="object"){let r=e.budget===void 0?WM:Bn(e.budget);return r?{budget:r,progressive:e.progressive===!0}:null}let n=Bn(e);return n?{budget:n,progressive:!1}:null},vv=new WeakMap,LH=(t,e)=>(vv.set(t,e),e),IH=t=>{vv.delete(t)},KM=t=>{let e=t&&vv.get(t);return!e||e.routeTaken?null:(e.routeTaken=!0,e)},MH=Object.freeze({deferAttach:!0}),GM=async(t,e,n,r,o)=>{await io();let s=r.mountYield;s===void 0&&(r.mountYield=o.budget),o.pageOptions={mountYield:r.mountYield};let i;o.commit=new Promise(l=>{i=l}),o.committed=!1;let a=!o.progressive;LH(n,o);let c=Xf();try{let l=zt(t,e,n.key,r,a?MH:void 0);return await xs(l),o.routeReady&&await o.routeReady,await hr(),a&&oo(l),o.committed=!0,i(),o.page&&await xs(o.page),await hr(),l}finally{o.committed=!0,i(),c(),r.mountYield=s,IH(n)}};var XM=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,$H=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},Av={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},NH=(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},Su=(t,e)=>(gu||NH)(t,e),FH=["manual","auto","restore"],Ev=new WeakMap,YM=(t,e)=>{let n=e.claims[e.claims.length-1],r=n?n.value:e.found;t.scrollRestoration!==r&&(t.scrollRestoration=r)},jH=(t,e)=>{let n=e&&e.scrollRestoration;if(n!=null){if(!FH.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=Ev.get(o);s||(s={found:o.scrollRestoration,claims:[]},Ev.set(o,s));let i={value:n==="restore"?"manual":n};s.claims.push(i),YM(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||Ev.delete(o);try{YM(o,s)}catch{}}})}catch{}}},BH=(t,e)=>{if(!e||e.scrollRestoration!=="restore")return;let n=uu,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)})},ZM=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=Av:e.router=Tt(e.router||{},Av);let n=e.router;jH(e,n),BH(e,n);let r=(i,a)=>{let c=i.context?.window||T,l=$H(n);if(!l){if(!c.location)return;let{pathname:u,search:d,hash:p}=c.location;u=XM(u),l=u+d+p}let f=i;if(n.customRouterElement){let u=Su(i,n.customRouterElement);u&&(f=u,i.routes&&(f.routes=i.routes))}if(f.routes)return dn(l,f,{},{initialRender:!0,pushState:!1,...a})},o=async(i,a)=>{let c=KM(i.context);if(c)return UH(i,c,r);await r(i)},s=!Wt(t.onRenderRouter);return n&&n.initRouter&&!s&&(t.onRenderRouter=(i,a)=>e.__firstNavigation=o(i,a)),VH(e,n),n},UH=(t,e,n)=>{let r;return e.routeReady=new Promise(s=>{r=s}),(async()=>{try{if(await io(),!t.__ref)return;let s=n(t,e.progressive?{mountOptions:e.pageOptions}:{mountOptions:e.pageOptions,firstView:e});await hr(),r(),await s}finally{r()}})()},Cv=(t,e)=>{if(e.router===!1)return;let n=e.router||Av;if(!n.popState)return;let r=e.utils&&e.utils.router?e.utils.router:dn,o=e.window||T,s=async i=>{let{pathname:a,search:c,hash:l}=o.location;a=XM(a);let f=a+c+l,u=t;if(n.customRouterElement){let d=Su(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))},VH=(t,e)=>{let{components:n}=t;if(e&&e.injectRouterInLinkComponent)return dt(n.Link||n["smbls.Link"],n.RouterLink||n["smbls.RouterLink"])};var Pv={};F(Pv,{components:()=>Ov,functions:()=>yr});var Rv={};F(Rv,{AlertTemplate:()=>lm,ConfirmTemplate:()=>cm,CustomTemplate:()=>um,ModalLayer:()=>am,ModalRoot:()=>im,PromptTemplate:()=>fm,windowsComponents:()=>Ov});var Tv={};F(Tv,{alertDialog:()=>om,closeAllModals:()=>nm,closeModal:()=>tm,confirmDialog:()=>rm,getLayer:()=>Qg,openModal:()=>em,promptDialog:()=>sm,windowsFunctions:()=>yr});function rt(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function Ba(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 Qg(){return rt(this)}var HH=(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"))},JM=(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 tm(t){let e=Ba(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)HH(e,i);for(let i of o)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function em(t={}){let e=Ba(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 JM(e,s),e.state.update({stack:[...o,r]}),n}function nm(){let t=Ba(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function rm(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function om(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function sm(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var yr={openModal:em,closeModal:tm,closeAllModals:nm,confirmDialog:rm,alertDialog:om,promptDialog:sm,getLayer:Qg};var zH=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),QM=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(zH),n=[];for(let r=0;r<e.length;r++){let o=e[r];(o.offsetParent!==null||o===document.activeElement)&&n.push(o)}return n},t2=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},im={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 yr)a in n.functions||(n.functions[a]=yr[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=t2(t);if(!l)return;let f=QM(l);if(!f.length){a.preventDefault();let h=l.querySelector?.('[role="dialog"]')||l;try{h.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 n=(t.state&&t.state.stack||[]).length,r=t.__prevStackLen||0;if(n!==r)if(t.__prevStackLen=n,t.__modalOpeners=t.__modalOpeners||[],n>r)t.__modalOpeners[n]=document.activeElement&&document.activeElement!==document.body?document.activeElement:t.__modalOpeners[n]||null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{let o=t2(t);if(!o)return;let i=QM(o)[0]||o.querySelector&&o.querySelector('[role="dialog"]')||o;try{i.focus&&i.focus()}catch{}});else{let o=null;for(let s=r;s>n;s--)t.__modalOpeners[s]&&(o=o||t.__modalOpeners[s]),t.__modalOpeners[s]=null;if(o&&typeof o.focus=="function"&&o.isConnected!==!1)try{o.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 am={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=rt(t)?.id;return e?"modal-title-"+e:null}},width:t=>rt(t)?.width||"H",maxWidth:t=>rt(t)?.maxWidth||"90vw",flow:"y",maxHeight:t=>rt(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=>rt(t)?.template!=="confirm"},AlertTemplate:{hide:t=>rt(t)?.template!=="alert"},PromptTemplate:{hide:t=>rt(t)?.template!=="prompt"},CustomTemplate:{hide:t=>rt(t)?.template!=="custom"}}};var Ua=(t,e,n)=>rt(t)?.[e]||n,WH=t=>{let e=rt(t)?.icon;return e===null||e===!1},cm={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>Ua(t,"title","Are you sure?"),attr:{id:t=>{let e=rt(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{hide:t=>WH(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>Ua(t,"icon","warning")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",P:{tag:"p",margin:"0",text:t=>Ua(t,"message","This action cannot be undone."),color:"dim"}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>Ua(t,"cancelText","Cancel"),onClick:(t,e,n)=>{let r=rt(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=>Ua(t,"confirmTheme","primary"),text:t=>Ua(t,"confirmText","Confirm"),onClick:(t,e,n)=>{let r=rt(e);if(r?.onConfirm)try{r.onConfirm()}catch(o){console.warn("[windows] confirm.onConfirm threw:",o)}e.call("closeModal",r?.id)}}}};var xu=(t,e,n)=>rt(t)?.[e]||n,lm={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>xu(t,"title","Notice"),attr:{id:t=>{let e=rt(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>xu(t,"icon","info")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!xu(t,"message",""),P:{tag:"p",margin:"0",text:t=>xu(t,"message",""),color:"dim"}},ModalFooter:{flow:"x",align:"center end",flexShrink:"0",OkBtn:{extends:"Button",theme:"primary",text:t=>xu(t,"okText","OK"),onClick:(t,e,n)=>{let r=rt(e);if(r?.onOk)try{r.onOk()}catch(o){console.warn("[windows] alert.onOk threw:",o)}e.call("closeModal",r?.id)}}}};var Va=(t,e,n)=>rt(t)?.[e]||n,fm={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",scope:{value:""},onRender:(t,e)=>{let n=rt(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=rt(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=>Va(t,"title","Enter a value"),attr:{id:t=>{let e=rt(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!Va(t,"message",""),P:{tag:"p",margin:"0",text:t=>Va(t,"message",""),color:"dim"}},InputRow:{extends:"Input",flexShrink:"0",autofocus:!0,placeholder:t=>Va(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=rt(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=>Va(t,"cancelText","Cancel"),onClick:(t,e,n)=>{let r=rt(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=>Va(t,"confirmText","OK"),onClick:(t,e,n)=>{let r=rt(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 um={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",Title:{tag:"h2",text:t=>rt(t)?.title||"",hide:t=>!rt(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=rt(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=z(()=>{let n=rt(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 yr)i in s.functions||(s.functions[i]=yr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var e2={extends:"Button",theme:"tertiary"};var Ov={ModalRoot:im,ModalLayer:am,ConfirmTemplate:cm,AlertTemplate:lm,PromptTemplate:fm,CustomTemplate:um,"smbls.CancelButton":e2};var Bv={};F(Bv,{components:()=>$v,functions:()=>Fv});var Nv={};F(Nv,{Dropdown:()=>ym,DropdownList:()=>bm,DropdownParent:()=>_m,DropdownParentFocus:()=>wm,DropdownRoot:()=>gm,DropdownSiblingFocus:()=>Sm,DropdownTrigger:()=>mm,dropdownComponents:()=>$v});var n2=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),qH=(t,e,n,r)=>{let o=n2(t,n,r),s=i=>o[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":o.bottom>=o.top?"bottom":"top"},KH=(t,e,n,r,o)=>{let s=n2(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 Dv=(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))},dm=(t,e,n)=>Math.max(e,Math.min(n,t)),br=(t,e,n="auto")=>{if(!t){let g=typeof window<"u"?window.innerHeight:768;return{left:0,top:0,side:"bottom",align:"start",maxHeight:Dv("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=Dv("center",t,o),h=Math.min(s.height,g),m=dm((r-s.width)/2,8,Math.max(8,r-s.width-8)),y=dm((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=qH(t,s,r,o),a="start";else{let g=n.split("-");i=g[0],a=g[1]||"start",i=KH(i,t,s,r,o)}let c=Dv(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=dm(f,8,d),u=dm(u,8,p),{left:f,top:u,side:i,align:a,maxHeight:c}},Ha=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 uo={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:null},GH=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}},Lv=t=>t?.getRoot?.()?.DropdownRoot||null,YH=0,XH=()=>`dropdown_${++YH}_${Date.now().toString(36)}`;function pm(t={}){let e=Lv(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||GH(n);if(!r)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let o=t.id||XH(),i=t.restoreEl?.node||t.restoreEl||n||(typeof document<"u"?document.activeElement:null),a={id:o,content:t.content||null,anchor:r,placement:t.placement||uo.placement,trigger:t.trigger||uo.trigger,offset:t.offset??uo.offset,minWidth:t.minWidth||uo.minWidth,maxWidth:t.maxWidth||uo.maxWidth,maxHeight:t.maxHeight||uo.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:i},c=e.state?.layer;if(c?.onClose)try{c.onClose(c)}catch(l){console.warn("[dropdown] prev onClose threw:",l)}if(e.state.update({layer:a}),typeof a.onOpen=="function")try{a.onOpen(a)}catch(l){console.warn("[dropdown] onOpen threw:",l)}return o}function hm(t){let e=Lv(this);if(!e)return;let n=e.state?.layer;n&&e.state.update({layer:{...n,inert:!!t}})}function Ls(t){let e=Lv(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 Iv=(t,e)=>{let n=`${e.maxHeight}px`;return t?.maxHeight?`min(${t.maxHeight}, ${n})`:n},r2=t=>{let e=t.getBoundingClientRect();return{width:e.width,height:Math.max(e.height,t.scrollHeight||0)}},ZH=`
|
|
100
93
|
@keyframes smbls-dropdown-fade-in {
|
|
101
94
|
from { opacity: 0; transform: var(--smbls-dropdown-from, translateY(-6px)) scale(0.98); }
|
|
102
95
|
to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
|
|
@@ -163,13 +156,21 @@ ${a}`}var Bx=null;function oh(t){Bx=t}var on={structuralHash:eh,deepEqual:nh,mer
|
|
|
163
156
|
[data-smbls-dropdown="panel"]:not([data-smbls-shadowed]) {
|
|
164
157
|
box-shadow: none !important;
|
|
165
158
|
}
|
|
166
|
-
`,J9=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=Q9,document.head.appendChild(t)},$I=(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")},tU=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},eU=t=>{t.node&&(t.node.removeAttribute("data-smbls-open"),t.node.offsetWidth,t.node.setAttribute("data-smbls-open","true"))},nU=[["role","role"],["aria-label","ariaLabel"],["aria-labelledby","ariaLabelledby"]],NI=(t,e)=>{if(!t.node)return;let n=new Set;for(let[r,o]of nU){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)},rU='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',oU=t=>{let e=t.node;if(e){for(let n of e.querySelectorAll(rU)){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})}},dg={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(J9(),typeof window>"u")return;let e=r=>{r.key!=="Escape"||r.defaultPrevented||t.state?.layer&&(r.preventDefault(),ls.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}ls.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 ir(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 ir(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":la(ir(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 dk(e,ir(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=Y(()=>{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,NI(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=tU(t.content)),$I(t,n),NI(t,n),eU(t),n.focusIn&&oU(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;$I(t,n);let s=t.parent?.layer;if(!s?.anchor)return;let i=MI(t.node);t._lastSize=i;let a=ir(s.anchor,i,s.placement);t.node.style.maxHeight=dk(s,a),t.node.style.left=a.left+"px",t.node.style.top=a.top+"px",t.node.style.setProperty("--smbls-dropdown-from",la(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=MI(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=ir(e.anchor,n,e.placement);t.node.style.maxHeight=dk(e,o),t.node.style.left=o.left+"px",t.node.style.top=o.top+"px",t.node.style.setProperty("--smbls-dropdown-from",la(o.side))}}}};var pk=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)},pg={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),pk(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&pk(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>pk(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var hg={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"},gg={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"}}},mg={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},yg={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()}}},bg={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 hk={DropdownRoot:dg,DropdownTrigger:pg,Dropdown:hg,DropdownList:gg,DropdownParent:mg,DropdownParentFocus:yg,DropdownSiblingFocus:bg};var yk={};j(yk,{DROPDOWN_DEFAULTS:()=>qr,closeDropdown:()=>ls,computePosition:()=>ir,dropdownFunctions:()=>mk,fadeInTransform:()=>la,openDropdown:()=>fg,setDropdownInert:()=>ug});var mk={openDropdown:fg,closeDropdown:ls,setDropdownInert:ug};var sU=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),iU=(t,e,n,r,o)=>{let s=sU(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},FI=(t,e,n)=>Math.max(e,Math.min(n,t)),jI=(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=iU(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=FI(i,6,r-e.width-6),a=FI(a,6,o-e.height-6),{left:i,top:a,side:s}},BI=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 _g={placement:"bottom",theme:"dialog",delay:250,hideDelay:100},aU=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}},UI=t=>t?.getRoot?.()?.TooltipRoot||null,VI=t=>{let e=t?.state?.tip;return e?typeof e.$parse=="function"?e.$parse():{...e}:null},zI=(t,e,n=0)=>{let r=VI(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(()=>zI(t,e,n+1),0);return}let s=o.getBoundingClientRect();t.state.update({tip:{...r,size:{width:s.width,height:s.height}}})},cU=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},lU=0,fU=()=>`tooltip_${++lU}_${Date.now().toString(36)}`;function HI(t={}){let e=UI(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||aU(n);if(!r)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let o=t.id||fU(),s={id:o,text:t.text||"",anchor:r,placement:t.placement||_g.placement,theme:t.theme||_g.theme,open:!0,size:null};return e.state.update({tip:s}),cU(()=>zI(e,o)),o}function WI(t){let e=UI(this);if(!e)return;let n=VI(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 bk=t=>{let e=t.tip;return e?.anchor?jI(e.anchor,e.size||{width:0,height:0},e.placement):null},wg=t=>{let e=t.tip;return!!(e&&e.open!==!1&&e.size)},qI={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=bk(t);return e?e.left+"px":"-9999px"},top:t=>{let e=bk(t);return e?e.top+"px":"-9999px"},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||_g.theme,width:"max-content",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>wg(t)?"1":"0",visibility:t=>wg(t)?"visible":"hidden",transform:t=>{if(wg(t))return"none";let e=bk(t);return BI(e?e.side:"bottom")},transition:t=>{let e=wg(t)?"A":"Z";return`${e} opacity defaultBezier, ${e} transform defaultBezier, ${e} visibility defaultBezier`}}};var _k=t=>{if(!t.tooltipText)return;let e=t.node;e&&e.hasAttribute&&e.hasAttribute("title")&&e.removeAttribute("title")},uU=t=>{t.tooltipText&&(_k(t),t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key}))},KI=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,uU(t)},t.tooltipDelay??250))},GI=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))},YI={onMouseenter:(t,e)=>KI(e),onMouseleave:(t,e)=>GI(e),onFocus:(t,e)=>KI(e),onBlur:(t,e)=>GI(e),onMouseover:(t,e)=>_k(e),onFocusin:(t,e)=>_k(e)};var XI={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)}},ZI={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]},QI={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 JI={TooltipRoot:qI,TooltipTrigger:YI,Tooltip:XI,TooltipHidden:ZI,TooltipParent:QI};var tM={openTooltip:HI,closeTooltip:WI};var xk=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),kk=t=>Ze(t)?t.library!==void 0?t.library:t.key??t.name:t,dU=(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=kk(i);if(!xk(a))return i;let c=s(a);return c?Ze(i)?{...i,library:c}:c:null}).filter(Boolean)},vk=new WeakMap,pU={lazy:!0,window:globalThis},eM=["components","pages","functions","methods","snippets"],hU=eM.filter(t=>t!=="methods"),wk=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},gU=(t,e)=>{if(io(e)||io(t))return"boot-revived";if(wk(t))return"local";if(e&&typeof e=="object"){if(wk(e.app))return"local";for(let n of hU)if(wk(e[n]))return"local"}return"raw-json"},nM=(t,e)=>{let n=e?t[e]:t;if(!E(n))return;let r=ie(n,{},pU);try{Object.assign(n,r)}catch(o){if(e)t[e]=r;else throw o}},mU=t=>{if(!E(t)||io(t))return t;for(let e of[...eM,"app"])nM(t,e);return Ss(t)},yU=(t,e)=>{if(!Array.isArray(t))return t;for(let n of t){let r=Ze(n)?n.library:n;E(r)&&!e.has(r)&&mU(r)}return t},Sk=t=>{let e=vk.get(t);e&&(vk.delete(t),gD(e))},Ek=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||qi,e.cssPropsRegistry=mt,e.window=lD(e);let s=gU(t,e);if(e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(m=>{let y=kk(m);return typeof y=="string"||xk(y)})){e.sharedLibraries=dU(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:m}=await Promise.resolve().then(()=>(M(),Hs)),y=new Set(e.sharedLibraries.map(b=>kk(b)).filter(b=>E(b)&&!xk(b))),S=await m(e.sharedLibraries,{apiBaseUrl:C0()});e.sharedLibraries=s==="raw-json"?S:yU(S,y)}rD(e.sharedLibraries),xD(e)}Cf(e,e.designSystem);let[i,a]=_D(o,e);e.designSystem=i,e.registry=a,e.cases||(e.cases={}),e.shorthand&&Sf.prepareContext(e);let c=wD(t,e);if(e.state=c,bc(c),e.pages=SD(t,e),e.components=fD(e),e.utils=uD(e),_r[e.packageManager]){let p=hD(e);p&&p.deferred?(p.blocking&&await L0({...e,dependencies:p.blocking}),vk.set(e,p.deferred)):e.dependencies=await L0(e)}if(e.methods=dD(e),e.routerOptions=BP(t,e),e.defaultExtends=[qp],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(p=>!p||typeof p!="object")){let p=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 ${p.length} non-plugin entr${p.length===1?"y":"ies"} (${p.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=ao(e.globalScope));let f=(p,m)=>{s==="raw-json"&&nM(p,m)};f(t),f(e,"components"),f(e,"pages"),f(e,"functions"),f(e,"methods"),f(e,"snippets"),f(e,"app"),$c(e,l),Nc(e);let u=p=>p&&typeof p.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=p=>e.plugins.some(m=>m&&m.name===p);if(e.polyglot&&!d("polyglot")){e.plugins.push(Gi);for(let p in Af)typeof e.functions[p]!="function"&&(e.functions[p]=Af[p])}if(d("helmet")||e.plugins.push(dh),d("inertOutside")||e.plugins.push(Vp),e.fetch&&!d("fetch")&&e.plugins.push(eb),e.fetch)for(let p in ad)typeof e.functions[p]!="function"&&(e.functions[p]=ad[p]);if(e.designSystem?.typography?.useCapsize!==!1&&!d("capsize")&&(e.plugins.push(bh),e.cssPropsRegistry.useCapsize=r0),e.shorthand&&!d("shorthand")&&e.plugins.push(Sf),e.analyze&&!d("analyze")){let p=e.analyze===!0?{}:e.analyze;e.analyze=Oh(p),e.plugins.push(Xi)}e.sync!==!1&&!d("sync")&&e.plugins.push(TI),e.inspect&&!d("inspect")&&e.plugins.push(E0),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!d("notifications")&&e.plugins.push(OI);let g=(p,m,y)=>{if(e[p]!==!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",ck,sr),g("dropdown",hk,mk),g("tooltip",JI,tM),e},jf=async(t,e)=>{E(e)||(e={}),On(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 Ek(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=yL(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await mD({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 Sk(e),t;let i=e.parent||s.body;if(r){let l=(bU(e,n)?_U(ee,t,i,e,n,o):null)||wU(ee,t,i,e,n,o);return Sk(e),l}let a=ee(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return Sk(e),typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},bU=(t,e)=>!e||!E(e.__BR_REGISTRY__)||t.hydrate===!1?!1:t.hydrate===!0||e.__BRENDER_HYDRATE__===!0,_U=(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},rM(o),l},wU=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 rM(o),c},rM=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__,delete t.__BRENDER_HYDRATE__)};var Ak=(t,e)=>ct(t,E(e)?e:{}),SU=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},xU=()=>{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}},oM=t=>{let e=xU();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},Ck=(t,e=Ur,n)=>{let r={...Ur,...Ak(e,n)};return oM(r),SU(r),jf(t,r).then(s=>{if(qx(s,r),s.destroy=()=>ff(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=lf(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})},kU=(t,e=Ur,n)=>{let r=Ck(t,e,n),o={...Ur,...Ak(e,n)},s=o.key;return WP(r,s,{utils:cf,...o}),r},vU=async(t,e=Ur,n)=>{let r={...Ur,...Ak(e,n)};oM(r);let o=e.key;await HP(o,r);let s=await jf(t,r);return qx(s,r),s.destroy=()=>ff(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=lf(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},EU=(t={},e=Ur,n)=>Ck({deps:{isUndefined:$t},...t},ct({domqlOptions:{onlyResolveExtends:!0}},e),n);var Rk={};j(Rk,{BUILD_DOMQL_SYSTEM_PROMPT:()=>mM,DEFAULT_MAX_TOKENS:()=>Ag,DEFAULT_MODEL:()=>Kr,DEFAULT_PROVIDER:()=>Vf,DEFAULT_TEMPERATURE:()=>Eg,MODEL_TIER_ALIASES:()=>Ok,PROVIDER_MODELS:()=>Uf,SIMONE_BASE_URL:()=>Bf,SIMONE_CHAT_PATH:()=>Sg,SIMONE_CODE_PATH:()=>xg,SIMONE_CODE_SYMBOLS_PATH:()=>kg,SIMONE_HEALTH_PATH:()=>vg,SIMONE_TOOLS_PATH:()=>sM,WORKSPACE_SYSTEM_PROMPT:()=>gM,buildMessages:()=>fM,chat:()=>zf,health:()=>lM,parseSimoneResponse:()=>pM,resolveModel:()=>yM,streamChat:()=>zf,streamCode:()=>aM,streamCodeSymbols:()=>cM,toLegacyEnvelope:()=>hM});var Bf="https://symbols-service-production.up.railway.app",Sg="/api/chat",xg="/api/code",kg="/api/code-symbols",vg="/api/health",sM="/api/tools",Uf={"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"]},Vf="gemini",Kr=Uf[Vf][0],Eg=.7,Ag=4096;function AU(t){if(!t)return null;for(let[e,n]of Object.entries(Uf))if(n.includes(t))return e;return null}function iM(t,e){return t?t.replace(/\/$/,"")+e:e}function CU(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 zf(t,e={},n){let{baseUrl:r=Bf,path:o=Sg,model:s=Kr,provider:i=AU(s)||Vf,temperature:a=Eg,maxTokens:c=Ag,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 h={messages:t,provider:i,model:s,temperature:a,maxTokens:c};l&&(h.effort=l),f&&(h.apiKeys=f);let g=await fetch(iM(r,o),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(h),signal:u});if(!g.ok){let k=g.statusText;try{let w=await g.text();try{let _=JSON.parse(w);k=_.error||_.detail||k}catch{k=w||k}}catch{}let x=new Error(`simone: HTTP ${g.status} \u2014 ${k}`);throw x.status=g.status,x}if(!g.body||typeof g.body.getReader!="function"){let k=await g.text();return n&&n(k),{text:k,errors:[]}}let p=g.body.getReader(),m=new TextDecoder,y=[],S=[],b="";try{for(;;){let{done:k,value:x}=await p.read();if(k)break;b+=m.decode(x,{stream:!0});let w=b.indexOf(`
|
|
167
|
-
|
|
168
|
-
|
|
159
|
+
`,JH=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=ZH,document.head.appendChild(t)},o2=(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")},QH=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},tz=t=>{t.node&&(t.node.removeAttribute("data-smbls-open"),t.node.offsetWidth,t.node.setAttribute("data-smbls-open","true"))},ez=[["role","role"],["aria-label","ariaLabel"],["aria-labelledby","ariaLabelledby"]],s2=(t,e)=>{if(!t.node)return;let n=new Set;for(let[r,o]of ez){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)},nz='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',rz=t=>{let e=t.node;if(e){for(let n of e.querySelectorAll(nz)){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})}},gm={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(JH(),typeof window>"u")return;let e=r=>{r.key!=="Escape"||r.defaultPrevented||t.state?.layer&&(r.preventDefault(),Ls.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}Ls.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 br(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 br(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":Ha(br(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 Iv(e,br(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=z(()=>{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,s2(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=QH(t.content)),o2(t,n),s2(t,n),tz(t),n.focusIn&&rz(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;o2(t,n);let s=t.parent?.layer;if(!s?.anchor)return;let i=r2(t.node);t._lastSize=i;let a=br(s.anchor,i,s.placement);t.node.style.maxHeight=Iv(s,a),t.node.style.left=a.left+"px",t.node.style.top=a.top+"px",t.node.style.setProperty("--smbls-dropdown-from",Ha(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=r2(t.node),r=t._lastSize;(!r||Math.abs(r.width-n.width)>1||Math.abs(r.height-n.height)>1)&&(t._lastSize=n);let s=br(e.anchor,n,e.placement);t.node.style.maxHeight=Iv(e,s),t.node.style.left=s.left+"px",t.node.style.top=s.top+"px",t.node.style.setProperty("--smbls-dropdown-from",Ha(s.side))}}}};var Mv=t=>{let r=t?.getRoot?.()?.DropdownRoot?.state?.layer;if(r&&t.dropdownId&&r.id===t.dropdownId){t.call("closeDropdown");return}let o={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 s in o)o[s]===void 0&&delete o[s];t.call("openDropdown",o)},mm={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),Mv(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&Mv(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>Mv(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var ym={extends:"smbls.Dropdown"},bm={extends:"smbls.DropdownList"},_m={extends:"smbls.DropdownParent"},wm={extends:"smbls.DropdownParentFocus"},Sm={extends:"smbls.DropdownSiblingFocus"};var $v={DropdownRoot:gm,DropdownTrigger:mm,Dropdown:ym,DropdownList:bm,DropdownParent:_m,DropdownParentFocus:wm,DropdownSiblingFocus:Sm};var jv={};F(jv,{DROPDOWN_DEFAULTS:()=>uo,closeDropdown:()=>Ls,computePosition:()=>br,dropdownFunctions:()=>Fv,fadeInTransform:()=>Ha,openDropdown:()=>pm,setDropdownInert:()=>hm});var Fv={openDropdown:pm,closeDropdown:Ls,setDropdownInert:hm};var Hv={};F(Hv,{components:()=>S2,functions:()=>x2});var oz=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),sz=(t,e,n,r,o)=>{let s=oz(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},i2=(t,e,n)=>Math.max(e,Math.min(n,t)),a2=(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=sz(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=i2(i,6,r-e.width-6),a=i2(a,6,o-e.height-6),{left:i,top:a,side:s}},c2=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 xm={placement:"bottom",theme:"dialog",delay:250,hideDelay:100},iz=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}},l2=t=>t?.getRoot?.()?.TooltipRoot||null,f2=t=>{let e=t?.state?.tip;return e?typeof e.$parse=="function"?e.$parse():{...e}:null},u2=(t,e,n=0)=>{let r=f2(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(()=>u2(t,e,n+1),0);return}let s=o.getBoundingClientRect();t.state.update({tip:{...r,size:{width:s.width,height:s.height}}})},az=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},cz=0,lz=()=>`tooltip_${++cz}_${Date.now().toString(36)}`;function d2(t={}){let e=l2(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||iz(n);if(!r)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let o=t.id||lz(),s={id:o,text:t.text||"",anchor:r,placement:t.placement||xm.placement,theme:t.theme||xm.theme,open:!0,size:null};return e.state.update({tip:s}),az(()=>u2(e,o)),o}function p2(t){let e=l2(this);if(!e)return;let n=f2(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 Uv=t=>{let e=t.tip;return e?.anchor?a2(e.anchor,e.size||{width:0,height:0},e.placement):null},km=t=>{let e=t.tip;return!!(e&&e.open!==!1&&e.size)},h2={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=Uv(t);return e?e.left+"px":"-9999px"},top:t=>{let e=Uv(t);return e?e.top+"px":"-9999px"},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||xm.theme,width:"max-content",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>km(t)?"1":"0",visibility:t=>km(t)?"visible":"hidden",transform:t=>{if(km(t))return"none";let e=Uv(t);return c2(e?e.side:"bottom")},transition:t=>{let e=km(t)?"A":"Z";return`${e} opacity defaultBezier, ${e} transform defaultBezier, ${e} visibility defaultBezier`}}};var Vv=t=>{if(!t.tooltipText)return;let e=t.node;e&&e.hasAttribute&&e.hasAttribute("title")&&e.removeAttribute("title")},fz=t=>{t.tooltipText&&(Vv(t),t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key}))},g2=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,fz(t)},t.tooltipDelay??250))},m2=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))},y2={onMouseenter:(t,e)=>g2(e),onMouseleave:(t,e)=>m2(e),onFocus:(t,e)=>g2(e),onBlur:(t,e)=>m2(e),onMouseover:(t,e)=>Vv(e),onFocusin:(t,e)=>Vv(e)};var b2={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)}},_2={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]},w2={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 S2={TooltipRoot:h2,TooltipTrigger:y2,Tooltip:b2,TooltipHidden:_2,TooltipParent:w2};var x2={openTooltip:d2,closeTooltip:p2};var Au={};F(Au,{LEVELS:()=>ku,analyzePlugin:()=>vm,attachBrowserListeners:()=>Lm,attachNetworkListeners:()=>Eu,classifyEvent:()=>Xv,createAnalyzeState:()=>D2,createBeaconSink:()=>Qv,createConsoleSink:()=>Zv,createDedupe:()=>Kv,createEnrich:()=>Wv,createMemorySink:()=>Jv,createPipeline:()=>Tm,createRedact:()=>Cm,createRemoteSink:()=>Rm,createSample:()=>Gv,createSummarize:()=>qv,default:()=>vm,emitFetchEvent:()=>R2,makeEvent:()=>ot,meetsLevel:()=>Em,normalizeLevel:()=>vu,resolveSinks:()=>Dm,summarizeElement:()=>Is});var uz=0,dz=()=>`${Date.now().toString(36)}-${(uz++).toString(36)}`,ot=(t,e,n={})=>({id:dz(),ts:Date.now(),type:t,level:e,...n}),pz=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(" > ")},Is=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:pz(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var za=t=>t?.context?.analyze,hz={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"}},gz=(t,{category:e,type:n,level:r})=>o=>{let s=za(o);!s||!s.shouldCapture(e)||s.emit(ot(n,r,{hook:t,element:Is(o)}))},k2=t=>(e,n)=>{let r=za(e);!r||!r.shouldCapture("state")||r.emit(ot("state","debug",{hook:t,element:Is(e),changedKeys:n?.changedKeys||null}))},vm={name:"analyze",error(t,e){let n=za(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:Is(t),error:r,message:r?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=za(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=za(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=za(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:Is(t),durationMs:n}))},beforeStateUpdate:k2("beforeStateUpdate"),stateUpdate:k2("stateUpdate")};for(let[t,e]of Object.entries(hz))vm[t]=gz(t,e);M();var ku={error:0,warn:1,info:2,debug:3,trace:4};var Em=(t,e)=>{let n=ku[t],r=ku[e];return n==null||r==null?!0:n<=r},vu=t=>ku[t]!=null?t:"warn";M();var Am=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var mz=(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},yz=(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"***"}},zv=(t,e,n,r)=>{if(r>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>zv(s,e,n,r+1));let o={};for(let s of Object.keys(t))if(mz(s,e)||Am.test(s)){let a=yz(t[s],n);a!==void 0&&(o[s]=a)}else o[s]=zv(t[s],e,n,r+1);return o},Cm=(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=zv(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 Wv=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}}}},qv=()=>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},Kv=(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}},Gv=t=>e=>{if(!e)return e;let n=t[e.type];return n==null||n>=1?e:Math.random()>n?null:e},v2={redact:t=>Cm(t.config.redact||[],t.config.maskStrategy),enrich:t=>Wv(t),summarize:()=>qv(),dedupe:t=>Kv(t.config.cache?.dedupeWindowMs||1e3),sample:t=>Gv(t.config.sample||{})},bz=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let n=v2[t];return n?n(e):null}return null},Tm=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(v2.redact(t));for(let s of n){let i=bz(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}};M();M();var Om=typeof T<"u"&&typeof T.document<"u",_z=5e3,wz=50,Sz=3,xz=1500,kz=1e3,Xv=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",vz=t=>{try{return JSON.stringify(t)}catch{return null}},Ez=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},Az=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}},Cz=()=>{if(!Om)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}},Tz=()=>{if(!Om)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:Az(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:Ez(),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:Cz()}},Rm=(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:Xv,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:_z,y=t.maxBatch||wz,_=t.maxRetries!=null?t.maxRetries:Sz,S=t.backoffMs||xz,v=t.queueLimit||kz,x=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)}`,b=t.sessionId||w(),k=[],C=[],D=null,R=null,$=()=>{D||!k.length||(D=setTimeout(X,m))},N=q=>{if(R)return;let G=S*Math.pow(2,Math.max(0,q-1));R=setTimeout(()=>{if(R=null,!C.length)return;let nt=C.shift();et(nt.envelope,nt.attempt)},G)},B=(q,G=!1)=>{let nt=u?Yv(u):null,J={id:b,sentAt:Date.now()};G&&(J.endedAt=Date.now());let ft={v:1,session:J,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:Tz(),user:nt?.user||null,traits:nt?.traits||null,tags:nt?.tags||null,events:q};if((h?Yv(h)===!0:g)&&(ft.app.debug=!0),p)try{return p(ft)||null}catch{return ft}return ft},et=async(q,G=1)=>{if(q)try{let nt=!0;if(n){let J=await n(q);nt=J!==!1&&J?.ok!==!1}else nt=await Oz(e,q,{apiKey:o,getAuth:f});!nt&&G<_&&(C.push({envelope:q,attempt:G+1}),N(G+1))}catch{G<_&&(C.push({envelope:q,attempt:G+1}),N(G+1))}},X=(q=!1,G=!1)=>{if(D&&(clearTimeout(D),D=null),!k.length&&!G)return;let nt=k;k=[];let J=B(nt,G);if(J){if(q&&Om){if(typeof r=="function"&&Yv(()=>r(J)))return;if(navigator.sendBeacon&&e){let ft=vz(J);if(ft)try{navigator.sendBeacon(e,new T.Blob([ft],{type:"application/json"}));return}catch{}}}et(J)}},st=!1,Dt=()=>{st||(st=!0,X(!0,!0))};Om&&(T.addEventListener("pagehide",Dt,{passive:!0}),T.addEventListener("beforeunload",Dt,{passive:!0}),T.addEventListener("visibilitychange",()=>{T.document.visibilityState==="hidden"&&X(!0)},{passive:!0}));let Lt=q=>{if(!q||x<1&&Math.random()>x)return;st&&(st=!1);let G={...q,log_type:d(q)};k.push(G),k.length>v&&(k=k.slice(-v)),k.length>=y?X():$()},it=q=>(X(!1,!0),b=q||w(),st=!1,Lt.sessionId=b,b);return Lt.flush=()=>X(!1),Lt.endSession=Dt,Lt.startNewSession=it,Lt.sessionId=b,Lt},Yv=t=>{try{return t()}catch{return null}},Oz=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 Rz={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},Pz="\x1B[0m",Pm=typeof T<"u"&&typeof T.document<"u",Zv=(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(Pm)i(a,s);else{let c=Rz[s.level]||"";i(`${c}${a}${Pz}`,s)}}},Jv=(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},Qv=(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=Pm?new T.Blob([c],{type:"application/json"}):c;if(Pm&&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(()=>{})};Pm&&(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},E2={console:Zv,memory:Jv,beacon:Qv,remote:Rm},A2=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},Dm=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=E2[r];if(!o)continue;n.push(r==="memory"?o(t,{}):o(r==="remote"?A2(t,{}):{}))}else if(r&&typeof r=="object"&&r.type){let o=E2[r.type];if(!o)continue;n.push(r.type==="memory"?o(t,r):o(r.type==="remote"?A2(t,r):r))}return n};M();var Dz=typeof T<"u"&&typeof T.document<"u",Lz=new Set(["password","hidden"]),C2=(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))))}},tE="__analyzeKeyPath",Wa=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[tE])return e[tE];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[tE]=i}catch{}return i},Iz=(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"***"}},Mz=t=>!!(!t||t.tagName==="INPUT"&&Lz.has(t.type)||Am.test(t.name||"")||Am.test(t.id||"")||t.dataset?.analyze==="skip"),Lm=t=>{if(!Dz)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:Wa(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:T2(i)}))},{passive:!0,capture:!0}),o(T,"dblclick",i=>{t.emit(ot("pointer","info",{hook:"dblclick",target:Wa(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),o(T,"contextmenu",i=>{t.emit(ot("pointer","info",{hook:"contextmenu",target:Wa(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=C2(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:T2(s),target:Wa(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=Mz(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=Iz(a.value,t.config.maskStrategy)),t.emit(ot("forms","info",{hook:i.type,target:Wa(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:Wa(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=C2(()=>{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=Nc(()=>{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(O2)}))}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{}},T2=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),$z=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=O2(t.cause)),e},O2=t=>{if(t==null)return t;if(t instanceof Error)return $z(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};M();var Nz=typeof T<"u"&&typeof T.document<"u",R2=(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}))},Eu=t=>{if(Nz&&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 Fz={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},jz={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},Bz={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},Uz={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},Vz=t=>{let e={...Fz,...t};return e.replay&&Object.assign(e,jz),e.telemetry&&Object.assign(e,Bz),e.remote&&Object.assign(e,Uz),Object.assign(e,t),e},Hz=64,zz=()=>{if(typeof T>"u"||!T.location)return null;try{let e=new URLSearchParams(T.location.search).get("analyze");return e||null}catch{return null}},D2=(t={})=>{let e=t===!0?{}:{...t};e.capture=Vz(e.capture||{});let n=zz();(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=vu(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=Tm(r),r.__sinks=Dm(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&&Em(s.level,r.config.level)){if(!r.__ready){if(s.level!=="error"&&!r.config.captureDuringHydration)return;r.__preBuffer.length<Hz&&r.__preBuffer.push(s);return}o(),P2(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)P2(r,a)}try{Lm(r)}catch(a){console.error("[analyze] browser attach error:",a)}try{Eu(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=vu(s)},r.setCapture=(s,i)=>{if(r.config.capture[s]=!!i,s==="network"&&i&&r.__ready)try{Eu(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},P2=(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 cE={};F(cE,{shorthandPlugin:()=>Mm});var aE={};F(aE,{PRESERVE_VALUE_KEYS:()=>ee,SKIP_INLINE_KEYS:()=>po,abbrToProp:()=>te,decode:()=>N2,encode:()=>I2,expand:()=>$s,isComponentKey:()=>hn,isSelectorKey:()=>gn,parse:()=>Ns,parseFurther:()=>js,propToAbbr:()=>Je,shorten:()=>Cu,shorthandPlugin:()=>Mm,stringify:()=>Ms,stringifyFurther:()=>Fs});var Je={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"},te=Object.create(null);for(let t in Je)te[Je[t]]=t;var eE=Object.create(null);for(let t in Je){let e=Je[t];if(eE[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${eE[e]}"`);eE[e]=t}var ee=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),po=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function hn(t){return/^[A-Z]/.test(t)}function gn(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function I2(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=Je[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=>Im(i));e.push(o+":"+s.join(","))}else e.push(o+":"+Im(r))}return e.join(" ")}function Im(t){return String(t).replace(/ /g,"_")}function Cu(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Cu(n):n});let e={};for(let n in t){let r=t[n];if(hn(n)){e[n]=nE(r);continue}if(gn(n)){e[n]=nE(r);continue}let o=Je[n]||n;if(ee.has(n)||ee.has(o)){e[o]=r;continue}e[o]=nE(r)}return e}function nE(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Cu(e):e}):typeof t=="object"?Cu(t):t}function Ms(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Ms(r):r});let e={},n=[];for(let r in t){let o=t[r];if(hn(r)){e[r]=L2(o);continue}if(gn(r)){e[r]=L2(o);continue}let s=Je[r]||r;if(ee.has(r)||ee.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(po.has(r)||po.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"?Ms(a):a});continue}if(o.length<=1){e[s]=o;continue}n.push(s+":"+o.map(Im).join(","));continue}if(typeof o=="object"){e[s]=Ms(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+":"+Im(o))}return n.length&&(e.in=n.join(" ")),e}function L2(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ms(e):e}):typeof t=="object"?Ms(t):t}function N2(t){if(!t||typeof t!="string")return{};let e={},n=F2(t);for(let r of n){if(r.startsWith("!")){let c=r.slice(1),l=te[c]||c;e[l]=!1;continue}let o=r.indexOf(":");if(o===-1){let c=te[r]||r;e[c]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=te[s]||s;if(i.includes(",")){e[a]=i.split(",").map(M2);continue}e[a]=M2(i)}return e}function F2(t){return t.trim().split(/\s+/).filter(Boolean)}function M2(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function $2(t){return t.replace(/_/g," ")}function Wz(t){if(!t||typeof t!="string")return{};let e={},n=F2(t);for(let r of n){if(r.startsWith("!")){let c=r.slice(1),l=te[c]||c;e[l]=!1;continue}let o=r.indexOf(":");if(o===-1){let c=te[r]||r;e[c]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=te[s]||s;if(i.includes(",")){e[a]=i.split(",").map($2);continue}e[a]=$2(i)}return e}function $s(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?$s(n):n});let e={};for(let n in t){let r=t[n];if(hn(n)){e[n]=rE(r);continue}let o=te[n]||n;if(gn(n)&&o===n){e[n]=rE(r);continue}if(ee.has(o)||ee.has(n)){e[o]=r;continue}e[o]=rE(r)}return e}function rE(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?$s(e):e}):typeof t=="object"?$s(t):t}function Ns(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Ns(n):n});let e={};if(typeof t.in=="string"){let n=Wz(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(hn(n)){e[n]=oE(r);continue}let o=te[n]||n;if(gn(n)&&o===n){e[n]=oE(r);continue}if(ee.has(o)||ee.has(n)){e[o]=r;continue}e[o]=oE(r)}return e}function oE(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ns(e):e}):typeof t=="object"?Ns(t):t}function j2(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function qz(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 Kz(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 B2(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 Fs(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Fs(r):r});let e={},n=[];for(let r in t){let o=t[r];if(hn(r)){let i=U2(o);e[r]=B2(i)?i.in:i;continue}if(gn(r)){let i=U2(o);e[r]=B2(i)?i.in:i;continue}let s=Je[r]||r;if(ee.has(r)||ee.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(po.has(r)||po.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"?Fs(a):a});continue}if(o.length<=1){e[s]=o;continue}n.push(s+":"+o.map(j2).join(","));continue}if(typeof o=="object"){e[s]=Fs(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+":"+j2(o))}return n.length&&(e.in=n.join(" ")),e}function U2(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Fs(e):e}):typeof t=="object"?Fs(t):t}function V2(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):qz(t)}function sE(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=te[l]||l;e[f]=!1;continue}let o=r.indexOf(":");if(o===-1){let l=te[r]||r;e[l]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=te[s]||s,c=Kz(i);if(c.length>1){e[a]=c.map(V2);continue}e[a]=V2(i)}return e}function js(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?js(n):n});let e={};if(typeof t.in=="string"){let n=sE(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(hn(n)){typeof r=="string"?e[n]=sE(r):e[n]=iE(r);continue}let o=te[n]||n;if(gn(n)&&o===n){typeof r=="string"?e[n]=sE(r):e[n]=iE(r);continue}if(ee.has(o)||ee.has(n)){e[o]=r;continue}e[o]=iE(r)}return e}function iE(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?js(e):e}):typeof t=="object"?js(t):t}var Gz={shorten:$s,stringify:Ns,stringifyFurther:js};function Yz(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 Xz=["components","pages","snippets"],Mm={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let r=Gz[e===!0?"shorten":e];if(r){for(let o of Xz)t[o]&&(t[o]=Yz(t[o],r));t.app&&typeof t.app=="object"&&(t.app=r(t.app))}}};var Tu={};F(Tu,{Inspect:()=>$m,inspectPlugin:()=>Jz});M();function H2(t){return E(t)?t:I(t)?t.find(e=>E(e)):""}function lE(t){if(!t)return;let e=t.__ref.__componentKey,n=t.extends&&H2(t.extends),r=t.parent&&t.parent.childExtends&&H2(t.parent.childExtends);return(e||n||r||"").split("_")[0].split(".")[0].split("+")[0]}function Nm(t){if(!t||!t.__ref)return;let{components:e,pages:n,editor:r}=t.context,o=lE(t);return r&&r.onInitInspect&&!r.onInitInspect(o,t,t.state)?Nm(t.parent):o&&(e[o]||n[o])?t:Nm(t.parent)}var Zz=(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}))}},$m={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:Zz,onMousemove:(t,e,n)=>{let r=t.target.ref,o=Nm(r),s=e.Inspector.state;if(!o||!n.debugging||!o.__ref)return s.update({area:!1});let i=lE(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=Nm(r);if(!o)return;let s=lE(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)Fa[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=`
|
|
160
|
+
display: block !important;
|
|
161
|
+
top: ${a-6}px;
|
|
162
|
+
left: ${i-6}px;
|
|
163
|
+
width: ${c+12}px;
|
|
164
|
+
height: ${l+12}px;
|
|
165
|
+
`}return e.node.style=s,e.Span.node.innerText=n.focusKey,!1}}},Jz={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push($m):t.extends?t.extends=[t.extends,$m]:t.extends=[$m]}};var VE={};F(VE,{DefaultSyncApp:()=>V8,FORBIDDEN_SEGMENTS:()=>Ou,Notifications:()=>Bm,SyncComponent:()=>UE,applyOpsToCtx:()=>Ru,connectToSocket:()=>U$,deletePath:()=>fE,isSafePath:()=>Fm,liveSyncTransport:()=>jm,notificationsPlugin:()=>q8,onOps:()=>hE,onSnapshot:()=>pE,seedRawDesignSystem:()=>qa,setPath:()=>uE,syncPlugin:()=>W8,wantsLiveSync:()=>Bs});M();M();var Ou=new Set(["__proto__","constructor","prototype"]),Fm=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Ou.has(t[e]))return!1;return!0},fE=(t,e)=>{!t||!Fm(e)||e.reduce((n,r,o,s)=>{if(n&&r in n){if(o!==s.length-1)return n[r];delete n[r]}},t)},uE=(t,e,n,r=!1)=>{!t||!Fm(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)},Ru=(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":fE(t,o);break;case"update":case"set":uE(t,o,s,!0);break;default:break}return n},W2=(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))Ou.has(o)||Object.prototype.hasOwnProperty.call(n,o)||(r||(r={}),r[o]=e[o]);return r},Qz=()=>typeof T<"u"&&!!T&&!!T.__SYMBOLS_ENV__,t8=()=>{try{if(T.self!==T.top)return!0}catch{return!0}try{return new URLSearchParams(T.location.search).has("liveSync")}catch{return!1}},z2=Object.freeze({mode:null,baseUrl:null}),jm=t=>{let e=t&&t.editor&&t.editor.socketUrl||t&&t.settings&&t.settings.socketUrl;return typeof e=="string"&&e?Qz()&&!t8()?z2:{mode:"collab",baseUrl:e}:t&&t.editor&&t.editor.runtime==="runner"?{mode:"runner",baseUrl:null}:z2},Bs=t=>jm(t).mode!==null,qa=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},q2=(t,e,n,r="designSystem")=>{for(let o in e){if(Ou.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]={}}q2(t[o],i,n,s)}else o in t||(t[o]=Array.isArray(i)?JSON.parse(JSON.stringify(i)):i)}},dE=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let o={designSystem:t.__rawDesignSystem};Ru(o,e)}let n=JSON.parse(JSON.stringify(t.__rawDesignSystem)),r=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];return Dl(n,r,q2)};M();var pE=(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(qa(n,c),r){let l=dE(n);l&&Vn(l)}}else Po(n[a],c);else n[a]=c}),r=!0,i&&(n.schema=i))}},hE=(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=Ru(n,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=dE(n,s);c?Vn(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=W2(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 e8={success:"green",error:"red",warning:"yellow"},K2=(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)}},Bm={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:e8[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 $8=!1,N8=()=>$8?"http://localhost:8080":"https://api.symbols.app",BE=null,F8=()=>(BE||(BE=Promise.resolve().then(()=>(j$(),F$)).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))),BE),j8=async t=>{try{let e=t||N8(),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.warn("[sync] Failed to fetch service-token",e)}},B$=(t,e,n,r)=>{t.on("snapshot",pE(e,n,r)),t.on("ops",hE(e,n,r)),t.on("clients",o=>{r.editor?.verbose&&K2(o,e,n)}),t.on("disconnect",o=>{r.editor?.verbose&&console.info("[sync] disconnected",o)})},B8=async(t,e,n,r,o)=>{let s=await j8(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)")}),B$(l,t,e,n),l},U8=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)")}),B$(s,t,e,n),s.on("reload",()=>{typeof T<"u"&&T.location&&T.location.reload()}),s},U$=async(t,e,n)=>{let{mode:r,baseUrl:o}=jm(n);if(!r)return null;let s=F8();return r==="collab"?B8(t,e,n,o,s):r==="runner"?U8(t,e,n,s):null},UE={onInit:U$},V8={extends:[UE,Bm]},V$=t=>typeof t>"u",H8=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),z8=t=>t?.editor?.runtime==="runner",H$=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},W8={name:"sync",beforeCreate(t,e){let n=e&&e.editor;(n&&!V$(n.liveSync)?n.liveSync:Bs(e))&&(H8(e)&&!z8(e)&&!e?.key||H$(t,UE))}},q8={name:"notifications",beforeCreate(t,e){if(!e)return;let n=V$(e.notifications)?null:e.notifications,r=e.editor&&e.editor.verbose===!0;(n===!0||n!==!1&&r)&&H$(t,Bm)}};kp();var zE={};F(zE,{fetchAsync:()=>Z8,fetchSync:()=>X8});M();var z$=T&&T.location&&typeof T.location.host=="string"?T.location.host:null,HE=z$!==null?z$.includes("dev."):Pr(),W$=HE?"http://localhost:8080/get":"https://api.symbols.app/get",K8={endpoint:W$},q$=async(t,e=K8)=>{let n=e.endpoint||W$,r=e.serviceRoute?I(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)}},G8=async(t,e)=>{let{editor:n}=e;if(n&&n.remote){let r=await q$(t,n),o=HE||e.isDevelopment?ge(r):ge(r.releases[0]);n.serviceRoute?I(n.serviceRoute)?n.serviceRoute.forEach(s=>{ie(e[s],o[s.toLowerCase()])}):ie(e[n.serviceRoute],o):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{ie(e[s],o[s.toLowerCase()])})}return e},Y8=async(t,e,n)=>{let{editor:r}=e;if(r&&r.remote){let o=await q$(t,r),s=HE||e.isDevelopment?ge(o):ge(o.releases[0]);n(s)}},X8=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await G8(t,e)}catch(n){console.error(n)}},Z8=(t,e,n,r)=>{if(e&&n.editor)try{n.editor.async&&Y8(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 J8={windows:()=>Promise.resolve(Pv),dropdown:()=>Promise.resolve(Bv),tooltip:()=>Promise.resolve(Hv),analyze:()=>Promise.resolve(Au),shorthand:()=>Promise.resolve(cE),inspect:()=>Promise.resolve(Tu),sync:()=>Promise.resolve(VE),fetch:()=>Promise.resolve(Si),fetchOnCreate:()=>Promise.resolve(zE)},Uu={},K$={},Ft=t=>{if(Uu[t])return Uu[t];let e=J8[t];return e?(Uu[t]=e().then(n=>(K$[t]=n,n),n=>(delete Uu[t],console.error(`[smbls] the ${t} module failed to load; the app runs without it`,n),null)),Uu[t]):Promise.resolve(null)},ry=t=>K$[t]||null;var Vu=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{Fn(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 ZE={};F(ZE,{Helmet:()=>hN,applyElementMetadata:()=>cy,applyMetadata:()=>rW,default:()=>wW,extractMetadata:()=>eW,generateHeadHtml:()=>_W,helmetPlugin:()=>ly,resolveMetadata:()=>sy});M();Rt();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"}},vr=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}"]`},G$=t=>ge({v:t}).v,Y$=(t,e,n,r)=>{try{return St(t,e,n)}catch(o){console.warn(`[helmet] metadata factory for "${r}" threw; treating as unset:`,o&&o.message||o);return}},WE=Object.freeze({authored:!0}),sy=(t,e,n,r)=>{if(!t)return{};let o=t;E(o)&&se(o)&&(o=G$(o));let s=P(o),i=!s&&r?.authored===!0,a=s?Y$(o,e,n,"metadata"):A(o)?{...o}:{};if(!A(a))return{};for(let c in a){let l=a[c],f=i&&E(l)&&!se(l);E(l)&&se(l)&&(l=G$(l)),P(l)?l=Y$(l,e,n,c):E(l)&&se(l)&&(l=void 0),E(l)&&l.includes("{{")&&e?.call&&(l=f?e.call("replaceLiteralsWithObjectFields",l,n,WE):e.call("replaceLiteralsWithObjectFields",l,n)),a[c]=l}return a},Q8=t=>!!t&&typeof t=="object"&&(t.notFound===!0||t.metadata?.notFound===!0),tW=(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(Q8(t[n]))return t[n]},eW=(t,e="/",n,r)=>{let o=t.pages||{},s=tW(o,e),i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let l=sy(t.app.metadata,n,r,WE);i={...i,...l}}let a=new Set;if(s){let l=s.metadata||s.helmet||{},f=sy(l,n,r,WE);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 jo(i,t.files)},eN=(t,e)=>jo(sy(t,e,e.state),e.context?.files),nN=t=>t.context?.document||typeof document<"u"&&document,rN=t=>Object.prototype.hasOwnProperty.call(Qe,t),iy=new Map;for(let t in Qe){let e=vr(Qe[t]);iy.has(e)||iy.set(e,Qe[t])}var ay=t=>t.head||t.querySelector("head"),GE=(t,e)=>{let n=ay(t);return n?n.querySelector(e):null},qE=(t,e)=>e.tag==="title"?t.textContent:t.getAttribute(e.valueAttr||"content"),YE=(t,e,n)=>{e.tag==="title"?t.textContent=n:t.setAttribute(e.valueAttr||"content",n)},XE=(t,e)=>{let n=ay(e);if(!n)return null;let r=e.createElement(t.tag);return t.attr&&r.setAttribute(t.attr,t.key),n.appendChild(r),r},tc=(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 Map;n.forEach((a,c)=>{i.has(a)||i.set(a,c)});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,i.get(a));c&&(c.setAttribute(e,a),o.appendChild(c))}},oN=(t,e)=>{let r=(e||[]).filter(s=>s!=null).map(s=>E(s)?s:JSON.stringify(s)),o=r.map(Tn);tc(t,"data-smbls-jsonld",o,(s,i)=>{let a=t.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=r[i],a})},sN=(t,e)=>{let n=(e||[]).filter(o=>o!=null&&String(o).trim()),r=n.map(Tn);tc(t,"data-smbls-style",r,(o,s)=>{let i=t.createElement("style");return i.textContent=String(n[s]),i})},iN=t=>(t||[]).filter(e=>e&&(E(e)?e.trim():e.src)),aN=t=>E(t)?t:String(t.src),cN=(t,e)=>{let n=t.createElement("script");return E(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},nW=(t,e)=>{let n=iN(e),r=n.map(aN);tc(t,"data-smbls-script",r,(o,s)=>cN(t,n[s]))},lN=(t,e)=>{let n=(e||[]).filter(o=>A(o)),r=n.map(Fo);tc(t,"data-smbls-alternate",r,(o,s)=>{let i=t.createElement("link");i.setAttribute("rel","alternate");for(let[a,c]of Object.entries(n[s]))i.setAttribute(a,c);return i})},fN=(t,e)=>{let n=(e||[]).filter(o=>o!=null),r=n.map(jr);tc(t,"data-smbls-favicon",r,(o,s)=>{let 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})},uN=(t,e)=>{let n=e?String(e):"",r=n.endsWith(".svg")?"image/svg+xml":n.endsWith(".png")?"image/png":"";tc(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})},rW=(t,e)=>{if(!(!A(t)||!e)){for(let n in t){let r=t[n];if(r==null||!rN(n))continue;let o=Qe[n],s=GE(e,vr(o))||XE(o,e);s&&YE(s,o,r)}Array.isArray(t.jsonLd)&&oN(e,t.jsonLd),Array.isArray(t.styles)&&sN(e,t.styles),Array.isArray(t.scripts)&&nW(e,t.scripts),Array.isArray(t.alternate)&&lN(e,t.alternate),Array.isArray(t.favicons)&&fN(e,t.favicons),(t.icon||t.favicon)&&uN(e,t.icon||t.favicon)}},X$=new WeakMap,KE=new WeakMap,dN=t=>{let e=t.location;return e&&E(e.pathname)?e.pathname:null},oW=t=>{let e=X$.get(t);return e||(e={doc:t,layers:[],servedPath:dN(t),originals:new Map,owned:new Set,lists:new Set},X$.set(t,e)),e},sW=(t,e)=>{for(let n=e.parent;n&&n!==n.parent;n=n.parent)if(n===t)return!0;return!1},Z$=t=>{try{return JSON.stringify(t===void 0?null:t)??null}catch{return null}},iW=t=>{if(!A(t))return!0;for(let e in t)if(t[e]!==void 0&&t[e]!==null)return!1;return!0},aW=(t,e)=>{let n=KE.get(t);if(n)return n;let r=oW(e),o={element:t,values:null,signature:Z$(null),disposed:!1,set(i){if(o.disposed)return;let a=Z$(i);o.values=i,!(a!==null&&a===o.signature)&&(o.signature=a,Q$(r))},dispose(){if(o.disposed)return;o.disposed=!0;let i=r.layers.indexOf(o);if(i!==-1&&r.layers.splice(i,1),!iW(o.values))try{Q$(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(sW(t,r.layers[i].element)){s=i;break}return r.layers.splice(s,0,o),KE.set(t,o),o},pN=(t,e,n,r)=>{let o=aW(t,e),s=z(()=>{let a=n();o.set(a),r&&r(a)}),i=t.__ref?.__effects;i&&i.push(s,o)},cW=vr(Qe.title),lW=vr(Qe.description),fW=vr(Qe["og:title"]),uW=vr(Qe["og:description"]),dW=vr(Qe["twitter:title"]),pW=vr(Qe["twitter:description"]),J$=(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)},oy={jsonLd:oN,styles:sN,alternate:lN,favicons:fN,icon:uN},hW=Object.keys(oy).filter(t=>t!=="icon"),gW=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||!rN(a)||e.set(vr(Qe[a]),{value:String(c),rank:o})}for(let a of hW)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 J$(e,cW,fW,dW),J$(e,lW,uW,pW),{tags:e,lists:n,scripts:r}},mW=(t,e,n)=>{let{doc:r,originals:o}=t,s=iy.get(e),i=GE(r,e),a=o.get(e);a||(a={value:i?qE(i,s):null,rendered:!1},o.set(e,a)),a.value===n&&(a.rendered=!0),i||(i=XE(s,r)),i&&(qE(i,s)!==n&&YE(i,s,n),t.owned.add(e))},yW=(t,e)=>{let{doc:n}=t;t.owned.delete(e);let r=iy.get(e),o=GE(n,e),s=t.originals.get(e);if(s&&s.value!==null&&!s.rendered&&dN(n)===t.servedPath){let a=o||XE(r,n);a&&qE(a,r)!==s.value&&YE(a,r,s.value)}else o&&o.remove()},bW=(t,e)=>{let n=iN(e);if(!n.length)return;let r=ay(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=aN(s);if(o.has(i))continue;let a=cN(t,s);a.setAttribute("data-smbls-script",i),r.appendChild(a),o.add(i)}},Q$=t=>{let{doc:e}=t;if(!ay(e))return;let{tags:n,lists:r,scripts:o}=gW(t.layers);for(let s of[...t.owned])n.has(s)||yW(t,s);for(let[s,{value:i}]of n)mW(t,s,i);for(let s in oy)r[s]!==void 0?(oy[s](e,r[s]),t.lists.add(s)):t.lists.delete(s)&&oy[s](e,null);bW(e,o)},_W=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>${W(s)}</title>`);continue}if(o==="viewport"){r||(e.push(`<meta name="viewport" content="${W(s)}">`),r=!0);continue}if(o==="canonical"){e.push(`<link rel="canonical" href="${W(s)}">`);continue}if(o==="icon"||o==="favicon"){let f=W(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}="${W(p)}"`).join(" ");e.push(`<link rel="icon" ${u} data-smbls-favicon="${W(jr(f))}">`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${W(f)}" data-smbls-favicon="${W(jr(f))}">`)});continue}if(o==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(A(f)){let u=Object.entries(f).map(([d,p])=>`${d}="${W(p)}"`).join(" ");e.push(`<link rel="alternate" ${u} data-smbls-alternate="${W(Fo(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="${W(f)}" content="${W(s)}">`)}else if(o.startsWith("itemprop:")){let f=o.replace("itemprop:","");e.push(`<meta itemprop="${W(f)}" content="${W(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${W(o)}" content="${W(f)}">`)):e.push(`<meta property="${W(o)}" content="${W(s)}">`):l?e.push(`<meta name="${W(o)}" content="${W(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${W(o)}" content="${W(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${W(o)}" content="${W(s)}">`)}return r||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),e.push(...Oi(t)),e.join(`
|
|
166
|
+
`)},hN={define:{metadata:(t,e)=>{cy(t,e,n=>{let r=e.state?.root;A(r)&&(r.$helmet=n)})}}},cy=(t,e,n)=>{let r=nN(e);r&&pN(e,r,()=>eN(t,e),n)},tN=t=>{let e=t.metadata;return e?eN(e,t):null},ly={name:"helmet",create(t){if(!t.metadata)return;let e=nN(t);e&&pN(t,e,()=>tN(t))},update(t){let e=KE.get(t);if(!e)return ly.create(t);e.disposed||e.set(tN(t))}},wW=hN;var gN=(t,e,n,r)=>{if(!t||!r?.fetch)return;let o=ry("fetch");if(o){o.executeFetch(t,e,n,r);return}Ft("fetch").then(s=>{s&&s.executeFetch(t,e,n,r)})},mN=(t,e)=>{t&&cy(t,e)},yN=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},ec={routes:t=>t,metadata:mN,fetch:gN,$router:yN},bN=(t={})=>{let e={routes:n=>n};return t.metadata!==!1&&(e.metadata=mN),t.fetch!==!1&&(e.fetch=gN),t.router!==!1&&(e.$router=yN),e};var JE={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},fy={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},QE={...JE,router:fy},SW={state:{},pages:{},components:{},router:fy,define:ec},go=SW;M();M();var _N=(t,e)=>V(t.extends)?t.extends:[];M();var wN=(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 Pi(t,Di))r[o]||(r[o]=s);return r};var eA={};F(eA,{apiUrl:()=>tA,channelByApiUrl:()=>EW,channelNames:()=>kW,channels:()=>Ae,currentChannel:()=>mo,defaultChannel:()=>LW,deployTarget:()=>RW,isKnownChannel:()=>DW,mermaidUrl:()=>OW,normalizeOwnerSegment:()=>IW,normalizeProjectKey:()=>$W,normalizeProjectSlug:()=>MW,parseSymboLsHost:()=>NW,previewProjectUrl:()=>TW,previewUrl:()=>vN,resolveChannel:()=>Xs,screenshotCdnHost:()=>EN,screenshotCdnUrl:()=>PW,setChannel:()=>vW,shellUrl:()=>CW,socketUrl:()=>AW});var Ae={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 kW=Object.keys(Ae.channels),Er=t=>!!(t&&Ae.channels[t]),Xs=t=>Er(t)?Ae.channels[t]:Ae.channels[Ae.defaultChannel],vW=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=Er(t)?t:null,nc=void 0)},nc,Hu=t=>typeof process<"u"&&process.env&&process.env[t]||null,mo=()=>{if(nc!==void 0)return nc;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=Hu("SYMBOLS_CHANNEL"),n=Hu("NODE_ENV");return nc=Er(t)&&t||Er(e)&&e||Er(n)&&n||Ae.defaultChannel,nc===Ae.defaultChannel&&!Er(t)&&!Er(e)&&!Er(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 "${Ae.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),nc},SN=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],xN=t=>{let e=SN.indexOf(t);return e===-1?SN.length:e},EW=t=>{if(!t)return null;let e=Object.keys(Ae.channels).filter(n=>Ae.channels[n].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((n,r)=>xN(n)-xN(r))[0]},tA=(t=mo())=>Hu("SYMBOLS_API_URL")||Xs(t).api,AW=(t=mo())=>Hu("SYMBOLS_SOCKET_URL")||Xs(t).socket,CW=(t=mo())=>Xs(t).shell||null,vN=(t=mo())=>Xs(t).preview||null,TW=({owner:t,key:e,env:n="production"}={},r=mo())=>{let o=vN(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)}`},OW=({owner:t,key:e,env:n="production"}={},r=mo())=>{let o=Xs(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}`},RW=(t=mo())=>Xs(t).deploy||{},EN=()=>Hu("SYMBOLS_SCREENSHOT_CDN")||Ae.screenshotCdn,PW=({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://${EN()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},DW=Er,LW=Ae.defaultChannel,IW=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",MW=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",$W=(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},kN={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},NW=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=kN[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?kN[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"}};M();var AN='meta[name="brender"]',FW=3e3,nA=t=>t.document||(typeof document<"u"?document:null),CN=(t,e)=>{let n=t.parent;return n&&n.nodeType===1?n:n&&n.node&&n.node.nodeType===1?n.node:e?e.body:null},TN=(t,e)=>{if(e&&e.__BRENDER__)return!0;let n=nA(t);if(!n||typeof n.querySelector!="function")return!1;let r=n.documentElement;if(r&&typeof r.hasAttribute=="function"&&r.hasAttribute("data-brender")||n.querySelector(AN))return!0;let o=CN(t,n);for(let s=o&&o.firstElementChild;s;s=s.nextElementSibling)if(s.hasAttribute("data-br"))return!0;return!1},ON=t=>{let e=nA(t);return!e||!e.head?null:Array.from(e.head.querySelectorAll('style[data-emotion="smbls"], style[data-brender]'))},jW=t=>{console.warn("[smbls] the pre-render registry is not JSON \u2014 the page renders fresh:",t.message)},BW=(t,e)=>{let n=Io(e,El,{warn:jW});return n?{map:A(n.value)?n.value:null,block:n.block}:t&&A(t.__BR_REGISTRY__)?{map:t.__BR_REGISTRY__,legacy:!0}:null},UW=(t,e,n)=>!n||!n.map||t.hydrate===!1?!1:n.legacy?t.hydrate===!0||A(t.hydrate)||!!e&&e.__BRENDER_HYDRATE__===!0:!0,VW=t=>{let e=A(t.hydrate)?t.hydrate.timeout:void 0;return typeof e=="number"&&e>=0?e:FW},RN=(t,e,n)=>{if(t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__,delete t.__BRENDER_HYDRATE__),n&&n.block&&n.block.parentNode&&n.block.remove(),e&&typeof e.querySelector=="function"){let r=e.querySelector(AN);r&&r.remove();let o=e.documentElement;o&&typeof o.hasAttribute=="function"&&o.hasAttribute("data-brender")&&o.removeAttribute("data-brender")}},HW=()=>new Promise(t=>{if(typeof MessageChannel=="function"){let e=new MessageChannel;e.port1.onmessage=()=>{e.port1.close(),t()},e.port2.postMessage(null)}else setTimeout(t,0)}),zW=async(t,e)=>{let n=t.__firstNavigation;if(n&&typeof n.then=="function")try{await n}catch{}for(let r=0;r<20&&e.pending.size;r++){let o=ry("fetch"),s=o&&typeof o.whenRequestsIdle=="function"?o.whenRequestsIdle:null;if(s&&await s(),await HW(),!s||!(o.requestsInFlight()>0))return}},WW=["click","keydown"],qW=(t,e,n,r,o,s)=>{let i=!1,a=null,c=()=>f(),l=u=>{let d=u?"addEventListener":"removeEventListener";if(n&&typeof n[d]=="function")for(let p of WW)n[d](p,c,!0);e&&typeof e[d]=="function"&&e[d]("popstate",c)},f=()=>{if(i)return;i=!0,a!==null&&clearTimeout(a),l(!1),t.__hydration===r&&delete t.__hydration;let u=0;for(let d of r.pending)d.parentNode&&(d.remove(),u++);r.pending.clear(),r.pendingIn.clear(),s&&s.forEach(d=>{d.parentNode&&d.remove()}),e&&(e.__BRENDER_HYDRATION__={adopted:r.adopted,misses:r.misses,removed:u}),RN(e,n,o)};if(!r.pending.size)return f();a=setTimeout(f,VW(t)),l(!0),zW(t,r).then(f,f)},KW=(t,e,n,r,o,s,i,a,c,l)=>{if(!r||typeof r.querySelectorAll!="function")return null;let f=_=>{for(let S=_;S&&S!==r;S=S.parentNode)if(S.parentNode===r&&S.localName==="svg"&&S.id)return!0;return!1},u={};for(let _ of r.querySelectorAll("[data-br]")){let S=_.getAttribute("data-br");_.removeAttribute("data-br"),f(_)||(u[S]=_)}let d={},p=new Set,g=new Map,h=a.map;for(let _ in h){let S=h[_],v=u[S];if(!v||d[S])continue;d[S]=v,p.add(v);let x=v.parentNode;x&&g.set(x,(g.get(x)||0)+1)}let m={registry:h,nodes:d,claimed:new Set,pending:p,pendingIn:g,adopted:0,misses:0};o.__hydration=m;let y;try{y=t(e,n,o.key,l)}catch(_){console.error("[smbls] hydration failed, rendering fresh:",_),delete o.__hydration;for(let S of m.claimed)S.parentNode&&S.remove();return null}return qW(o,s,i,m,a,c),y},GW=(t,e,n,r,o,s,i,a,c,l)=>{if(c&&c.forEach(u=>{u.parentNode&&u.remove()}),r){let u=[];for(let d of r.childNodes){if(d.nodeType===1){let p=d.localName;if(p==="script"||p==="link"||p==="style"||p==="svg"&&d.id)continue}u.push(d)}u.forEach(d=>d.remove())}i&&typeof i.querySelectorAll=="function"&&i.querySelectorAll("[data-br]").forEach(u=>u.removeAttribute("data-br"));let f=t(e,n,o.key,l);return RN(s,i,a),f},PN=(t,e,n,r,o,s,i)=>{let a=nA(r),c=n&&n.nodeType?n:n&&n.node||CN(r,a),l=BW(o,a);if(r.prerendered=!0,UW(r,o,l)){let f=KW(t,e,n,c,r,o,a,l,s,i);if(f)return f}return GW(t,e,n,c,r,o,a,l,s,i)};M();var DN=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(LN(s)){let i=XW(s);i&&ZW(i)&&e.links++;continue}if(YW(s)){Et(s.trim()),e.faces++;continue}typeof s=="string"&&s.includes("font-family")&&(Et(`@font-face { ${s} }`),e.faces++)}}return e},LN=t=>typeof t=="string"&&t.trim().startsWith("@import"),YW=t=>typeof t=="string"&&t.trim().startsWith("@font-face"),XW=t=>{if(!LN(t))return null;let e=String(t).match(/url\(\s*['"]?([^'")]+)['"]?\s*\)/);return e?e[1].trim():null},ZW=(t,e)=>{if(typeof t!="string"||!t)return null;let n=e||cr();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 NN=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},IN=(t="smbls")=>{let e={};for(let n in Ds)Object.prototype.hasOwnProperty.call(Ds,n)&&(vn(n)?e[`smbls.${n}`]=Ds[n]:e[n]=Ds[n]);return e},FN=t=>t.components?{...IN(),...t.components}:IN(),jN=t=>({...wu,...Ma,...zr,...t.utils,...t.snippets,...t.functions}),BN=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var UN=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,JW=3e3,QW=(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=()=>n(e),s=Promise.resolve().then(o).then(a=>(a&&!r[t]&&(r[t]=a),r[t]||null)).catch(()=>null);return new Promise(a=>{let c=setTimeout(()=>a(null),JW);s.then(l=>{clearTimeout(c),a(l)})})}catch{return Promise.resolve(null)}},MN={},iA=async({dependencies:t,dependenciesOnDemand:e,document:n,preventCaching:r=!1,cdnProvider:o,packageManager:s,symbolsConfig:i,registerDependency:a=QW})=>{if(o||(o=Nr[s]||Ci(i)||"esmsh"),!t)return null;if(!No(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=Pr()&&r?`?${Math.random()}`:"",f=async(d,p)=>{let g=an(d,p,o)+l;try{await Promise.race([Ti(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=an(d,p,"symbols")+l;await Promise.race([Ti(m,{document:n,type:"module"}),new Promise((y,_)=>setTimeout(()=>_(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])&&!MN[d]&&(MN[d]=!0,!Fr(d))){if($o(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}UN(d)||u.push(f(d,p))}}return u.length&&await Promise.allSettled(u),t},$N=/\[smbls\] runtime dependency "([^"]+)" is not registered on globalThis\.__SMBLS_PKGS__/g,t7=t=>{if(typeof t=="string")return t;if(typeof t=="function")try{return typeof Oe=="function"?Oe(t):Function.prototype.toString.call(t)}catch{return""}return""},e7=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=t7(a);if(!c||c.indexOf("__SMBLS_PKGS__")===-1)continue;$N.lastIndex=0;let l;for(;(l=$N.exec(c))!==null;)e.add(l[1])}}return e},n7=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},r7=(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},VN=(t,{syncRead:e=e7(t),runtimeDocument:n=typeof document<"u"?document:null,importMap:r=n7(n)}={})=>{let o=t&&t.dependencies;if(!No(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)&&r7(l,r)?(c||(c={}))[l]=o[l]:(a||(a={}))[l]=o[l];return{blocking:a,deferred:c}},o7=t=>import(t),rA={},s7=(t,e)=>{if(!e||typeof globalThis>"u")return;let n=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});n[t]||(n[t]=e)},i7=(t,{importModule:e=o7}={})=>{let n=[];if(!t)return Promise.resolve([]);for(let r in t)if(!(Fr(r)||$o(r))&&!UN(r)){if(!rA[r]){let o=()=>e(r);rA[r]=Promise.resolve().then(o).then(s=>(s7(r,s),s||null),()=>null)}n.push(rA[r])}return Promise.all(n)},a7=2e3,c7=3e3,HN=(t,{win:e=typeof window<"u"?window:null,importModule:n,loadTimeoutMs:r=c7}={})=>t?new Promise(o=>{let s=()=>{i7(t,{importModule:n}).then(o,o)},i=()=>{e&&typeof e.requestIdleCallback=="function"?e.requestIdleCallback(s,{timeout:a7}):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,zN=async(t,e)=>{let n=e.window||window,r=e.cdnProvider||Ci(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]&&Fr(a))return await u.require(a,c);if(!u.packages[a]){let d=Pr()?`?${Math.random()}`:"";if(l&&l[a]){let p=l[a],g=an(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=an(a,p,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let p=an(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=an(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=Tt(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)},l7=/\s+/g,WN=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,f7=(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+=` ${WN(o,e)}`)}return n},u7=(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=f7(t,e));let o=t.replace(l7," ").trim();if(n&&typeof n.setAttribute=="function")n.setAttribute("class",o);else if(n)try{n.className=o}catch{}return o},d7=()=>(t,e,n)=>{let r=WN(t,e);if(t){let{__ref:o}=e;o.__class.style=r}qN()(e.classlist,e,e.state,!0)},qN=()=>(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=Ie(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&u7(i,e,e.node)}},p7=()=>({style:d7(),classlist:qN()}),h7=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],oA=new WeakSet,sA=!1,g7=t=>!!t&&typeof t=="object",KN=(t,e)=>{let n=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,r=e.initOptions||{},o=e.registry||p7(),s=e.designSystem?dt(pt(e.designSystem),pt(iu),Pe):pt(iu),i={};for(let m of h7)e[m]!==void 0&&(i[m]=e[m]);let a,c=g7(n),f=c&&oA.has(n)&&!e.skipDesignSystemInit,u=!f&&!sA,d=f?`[data-smbls-app="${t}"]`:":root";e.scopeSelector=d;let p={key:t,document:n,files:e.files,assets:e.assets,scopeSelector:d,...QE,...i,...r};if(e.skipDesignSystemInit){if(a=O(t)||O(),a&&(a.__domDocument=n),a?.CSS_VARS){bt(a);try{Et({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&Et(Zg(a.CSS_MEDIA_VARS,d));let m=os(a.cssSkinVars,a.cssSkinFallback,d);Object.keys(m).length&&Et(m)}finally{mt()}}}else if(e.isolateDesignSystem&&!f){let m=oh();m.__domDocument=n,bt(m);try{a=Vn(s,{...p,config:m})}finally{mt()}}else if(u){let m=O();m&&(m.__domDocument=n),a=Vn(s,p),a&&a!==m&&(a.__domDocument=n),c&&oA.add(n),sA=!0}else{let m=Gl(t,s,{cleanBase:!0});for(let y in i)m[y]=i[y];if(m.__domDocument=n,f){let y=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=y,m.varPrefix=y}bt(m);try{a=Vn(m,p)}finally{mt()}c&&oA.add(n),sA=!0}let g=a?.CONFIG||a,h=g?.font;if(h){bt(g);try{DN(h)}finally{mt()}}return[a,o]},GN=(t,e)=>{let n={};e.state&&dt(n,e.state),t&&t.state&&dt(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(!Do(e,u,n)){i.add(u);return}n[u]=d,a.add(u),En(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,pt(n)},YN=(t,e)=>{A(t.routes)&&A(e.pages)&&Tt(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},XN=t=>{Pl(t,t.sharedLibraries)};var aA={};F(aA,{default:()=>A7,getActiveLang:()=>yo,getLanguages:()=>qu,getLocalStateLang:()=>Zu,getPendingLang:()=>Wu,initPolyglot:()=>dy,loadTranslations:()=>Gu,polyglotPlugin:()=>oc,setLang:()=>Yu,translate:()=>Ku,upsertTranslation:()=>Xu});M();Rt();var m7="smbls_t_",y7="smbls_tv_",rc={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)}}},zu={},ZN=new WeakMap,eF=(t,e)=>t&&typeof t=="object"?t:e&&typeof e=="object"?e:null,nF=t=>{let e=ZN.get(t);return e||(e={seq:0,pending:nn(null),wake:null},ZN.set(t,e)),e},JN=(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))}),QN=(t,e)=>!!(t?.translations&&t.translations[e]),b7=3e3,_7=2147483647,w7=t=>{let e=t?.fontWait;return e===!1?0:typeof e=="number"?e>0?Math.min(e,_7):0:b7},S7=new RegExp("\\p{L}","gu"),x7=(...t)=>{let e=new Set,n=(r,o)=>{if(typeof r=="string"){let s=r.match(S7);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("")},k7=(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 yo(){let t=this?.context,e=t?.polyglot,n=this?.state?.root||t?.state?.root;return xl(n?.lang||t?.state?.lang,e)}function Wu(){let t=this?.context,e=eF(t,this?.state?.root||t?.state?.root);return e?nF(e).pending.get():null}function qu(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var uy=(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},tF=(t,e,n)=>{let r=e.lastIndexOf(".");if(r===-1)return t[e+"_"+n];let o=uy(t,e.substring(0,r));if(o!=null)return o[e.substring(r+1)+"_"+n]};function Ku(t,e){if(!t)return"";let n=this?.context,r=n?.polyglot,o=e||this.call("getActiveLang"),s=this?.state;if(s){let l=tF(s,t,o);if(l!==void 0)return l}if(r?.translations){let l=r.translations[o];if(l){let f=uy(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=uy(l,t);if(f!==void 0)return f}}let c=r?.defaultLang||"en";if(s){let l=tF(s,t,c);if(l!==void 0)return l}if(r?.translations){let l=r.translations[c];if(l){let f=uy(l,t);if(f!==void 0)return f}}return t}async function Gu(t){let e=this?.context,n=e?.polyglot,r=this?.state?.root||e?.state?.root;if(!n||!r)return;let o=n.storagePrefix||m7,s=n.storageVersionPrefix||(n.storagePrefix?n.storagePrefix.replace(/_$/,"v_"):y7);if(n.translations&&n.translations[t]&&!n.fetch||!n.fetch||n._fetchFailed?.[t])return;if(!r.translations?.[t]){let c=rc.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(zu[i])return zu[i];let a=this;return zu[i]=(async()=>{try{let c=n.fetch,l=parseInt(rc.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||{}},_=await h.rpc({from:m,params:y});if(_.error)throw n._fetchFailed||(n._fetchFailed={}),n._fetchFailed[t]=!0,_.error;let S=_.data;if(!S||!S.changed)return;f=S.translations||{},u=S.version||0,d=!0}else return;if(!d||!f)return;rc.set(o+t,JSON.stringify(f)),u&&rc.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 zu[i]}})(),zu[i]}var v7=(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 Yu(t,e){let n=this?.context,r=n?.polyglot,o=this?.state?.root||n?.state?.root,s=n?.document||globalThis.document;if(!o)return;e?.persist!==!1&&rc.set(vi(r),t);let i=nF(eF(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(!QN(o,t)){i.pending.set(t);let u=null;if(await JN(i,Promise.resolve(f).then(null,d=>{u=d}),0),!c())return;if(u)throw u;if(!QN(o,t)&&!r.translations?.[t])return}}let l=w7(r);if(l>0&&s?.fonts&&s.documentElement?.lang!==t){let f=k7(s,x7(r?.translations?.[t],o.translations?.[t]));if(f&&(i.pending.set(t),await JN(i,f,l),!c()))return}i.pending.set(null),E7(n,r,o,s,t)}finally{c()&&i.pending.set(null)}}function E7(t,e,n,r,o){t?.state&&(t.state.lang=o);let s=e?.translations?.[o],i={lang:o},a=c=>Jc(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"&&En(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];En(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{v7(f,l,f.call("replaceLiteralsWithObjectFields",u,f.state))}catch{}}}r?.documentElement&&(r.documentElement.lang=o)}async function Xu(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 dy(){let t=this?.context,e=t?.polyglot;if(!e)return;let n=this?.state?.root||t?.state?.root;if(!n)return;let o=rc.get(vi(e))||yo.call(this),s=t?.document||globalThis.document;s?.documentElement&&(s.documentElement.lang=o),n.update&&n.lang!==o&&n.update({lang:o}),e.fetch&&!(e.translations&&e.translations[o])&&await this.call("loadTranslations",o)}function Zu(t){try{let e=yo.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 oc={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,dy.call(t))}},A7=oc;var Ju={polyglot:Ku,getLocalStateLang:Zu,getActiveLang:yo,getLang:yo,setLang:Yu,getPendingLang:Wu,getLanguages:qu,loadTranslations:Gu,upsertTranslation:Xu};var lA={};F(lA,{SYSTEM_METRICS:()=>Qu,capsizeHandler:()=>cA,capsizePlugin:()=>hy,computeCapsize:()=>rF,default:()=>C7,resolveFontSizePx:()=>oF,resolveMetrics:()=>sF});var Qu={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}},py=t=>parseFloat(t.toFixed(4)),rF=(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:`${py(t/16)}rem`,lineHeight:`${py(f)}px`,capHeightTrim:`${py(-p)}em`,baselineTrim:`${py(-g)}em`}},oF=(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},sF=(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(Qu[i])return Qu[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(Qu[a])return Qu[a]}}return null},cA=(t,e,n,r)=>{if(!t)return;let o=oF(e.fontSize,r);if(!o)return;let s=sF(e.fontFamily,r);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=rF(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},hy={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},C7=hy;var dA=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),pA=t=>cn(t)?t.library!==void 0?t.library:t.key??t.name:t,T7=(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=pA(i);if(!dA(a))return i;let c=s(a);return c?cn(i)?{...i,library:c}:c:null}).filter(Boolean)},hA=new WeakMap,O7={lazy:!0,window:globalThis},iF=["components","pages","functions","methods","snippets"],R7=iF.filter(t=>t!=="methods"),fA=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},P7=(t,e)=>{if(Oo(e)||Oo(t))return"boot-revived";if(fA(t))return"local";if(e&&typeof e=="object"){if(fA(e.app))return"local";for(let n of R7)if(fA(e[n]))return"local"}return"raw-json"},aF=(t,e)=>{let n=e?t[e]:t;if(!A(n))return;let r=ge(n,{},O7);try{Object.assign(n,r)}catch(o){if(e)t[e]=r;else throw o}},D7=t=>{if(!A(t)||Oo(t))return t;for(let e of[...iF,"app"])aF(t,e);return li(t)},L7=(t,e)=>{if(!Array.isArray(t))return t;for(let n of t){let r=cn(n)?n.library:n;A(r)&&!e.has(r)&&D7(r)}return t},uA=t=>{let e=hA.get(t);e&&(hA.delete(t),HN(e))},tn=(t,e)=>Array.isArray(t.plugins)&&t.plugins.some(n=>n&&n.name===e),cF=t=>t.notifications===!0||t.notifications!==!1&&!!t.editor&&t.editor.verbose===!0,lF=t=>t.sync!==!1&&Bs(t)||cF(t),fF=t=>({shorthand:t.shorthand?Ft("shorthand"):null,analyze:t.analyze&&!tn(t,"analyze")?Ft("analyze"):null,inspect:t.inspect&&!tn(t,"inspect")?Ft("inspect"):null,fetch:t.fetch?Ft("fetch"):null,sync:lF(t)?Ft("sync"):null,windows:t.windows!==!1?Ft("windows"):null,dropdown:t.dropdown!==!1?Ft("dropdown"):null,tooltip:t.tooltip!==!1?Ft("tooltip"):null}),gA=async(t,e={})=>{let n=e.symbolsConfig,r=n?.owner&&n?.key?`${n.owner}--${n.key}`:n?.key,o=e.key=e.key||r||(E(t)?t:"smblsapp");e.define=e.define||ec,e.cssPropsRegistry=kt,e.window=NN(e);let s=fF(e),i=P7(t,e);if(e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(y=>{let _=pA(y);return typeof _=="string"||dA(_)})){e.sharedLibraries=T7(e.sharedLibraries,e.symbolsConfig);let y=new Set(e.sharedLibraries.map(S=>pA(S)).filter(S=>A(S)&&!dA(S))),_=await Ll(e.sharedLibraries,{apiBaseUrl:tA()});e.sharedLibraries=i==="raw-json"?_:L7(_,y)}wN(e.sharedLibraries),XN(e)}Bs(e)&&qa(e,e.designSystem);let[a,c]=KN(o,e);if(e.designSystem=a,e.registry=c,e.cases||(e.cases={}),e.shorthand){let m=await(s.shorthand||Ft("shorthand"));m&&m.shorthandPlugin.prepareContext(e)}let l=GN(t,e);if(e.state=l,fl(l),e.pages=YN(t,e),e.components=FN(e),e.utils=jN(e),Nr[e.packageManager]){let m=VN(e);m&&m.deferred?(m.blocking&&await iA({...e,dependencies:m.blocking}),hA.set(e,m.deferred)):e.dependencies=await iA(e)}if(e.methods=BN(e),e.routerOptions=ZM(t,e),e.defaultExtends=[Cg],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(m=>!m||typeof m!="object")){let m=e.plugins.filter(y=>!y||typeof y!="object");e.plugins=e.plugins.filter(y=>y&&typeof y=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${m.length} non-plugin entr${m.length===1?"y":"ies"} (${m.map(y=>JSON.stringify(y)).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 f=e.globalScope;e.globalScope&&A(e.globalScope)&&(e.globalScope=Ro(e.globalScope));let u=(m,y)=>{i==="raw-json"&&aF(m,y)};u(t),u(e,"components"),u(e,"pages"),u(e,"functions"),u(e,"methods"),u(e,"snippets"),u(e,"app"),Ol(e,f),Rl(e);let d=m=>m&&typeof m.select=="function";if(e.fetch?.__resolved&&!d(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!d(e.db.__resolved)&&delete e.db.__resolved,e.polyglot&&!tn(e,"polyglot")){e.plugins.push(oc);for(let m in Ju)typeof e.functions[m]!="function"&&(e.functions[m]=Ju[m])}if(tn(e,"helmet")||e.plugins.push(ly),tn(e,"inertOutside")||e.plugins.push(xg),e.fetch){let m=await(s.fetch||Ft("fetch"));if(m){tn(e,"fetch")||e.plugins.push(m.fetchPlugin);let{fetchFunctions:y}=m;for(let _ in y)typeof e.functions[_]!="function"&&(e.functions[_]=y[_])}}if(e.designSystem?.typography?.useCapsize!==!1&&!tn(e,"capsize")&&(e.plugins.push(hy),e.cssPropsRegistry.useCapsize=cA),e.shorthand&&!tn(e,"shorthand")){let m=await(s.shorthand||Ft("shorthand"));m&&e.plugins.push(m.shorthandPlugin)}if(e.analyze&&!tn(e,"analyze")){let m=await(s.analyze||Ft("analyze"));if(m){let y=e.analyze===!0?{}:e.analyze;e.analyze=m.createAnalyzeState(y),e.plugins.push(m.analyzePlugin)}}let p=e.sync!==!1&&Bs(e),g=lF(e)?await(s.sync||Ft("sync")):null;if(g&&p&&!tn(e,"sync")&&e.plugins.push(g.syncPlugin),e.inspect&&!tn(e,"inspect")){let m=await(s.inspect||Ft("inspect"));m&&e.plugins.push(m.inspectPlugin)}g&&cF(e)&&!tn(e,"notifications")&&e.plugins.push(g.notificationsPlugin);let h=async m=>{if(e[m]===!1)return;let y=await(s[m]||Ft(m));if(!y)return;let{components:_,functions:S}=y;for(let v in _)A(e.components[v])||(e.components[v]=_[v]);for(let v in S)typeof e.functions[v]!="function"&&(e.functions[v]=S[v])};return await h("windows"),await h("dropdown"),await h("tooltip"),e},td=async(t,e)=>{A(e)||(e={});let n=qM(e);fF(e),n&&await io(),qn(t)?(t={},e.parent=t):E(t)?(t={},e.key=t):A(t)||(t={});let r=e.window||(typeof window<"u"?window:null),o=TN(e,r),s=o?ON(e):null;if(await gA(t,e),e.useReset!==!1){let f=e.document||(typeof document<"u"?document:null);if(f){let u=f.head.querySelector("style[data-smbls]");u||(u=f.createElement("style"),u.setAttribute("data-smbls",""),f.head.appendChild(u));let d=u.sheet;if(d){try{d.insertRule("*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }",0)}catch{}try{d.insertRule("h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }",1)}catch{}}}}if(e.app&&A(e.app))for(let f in e.app)t[f]===void 0&&(t[f]=e.app[f]);t.extends=_N(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await zN({functions:e.functions,utils:e.utils,snippets:e.snippets,...e.files},e);for(let f of e.plugins)if(typeof f.beforeCreate=="function")try{f.beforeCreate(t,e)}catch(u){console.error(`[smbls] plugin "${f.name||"?"}" beforeCreate error:`,u)}let i=e.document;if(!i||!i.createElement)return uA(e),t;let a=e.parent||i.body,c={verbose:e.verbose,context:e,...e.domqlOptions};if(o){let f=PN(zt,t,a,e,r,s,c);return uA(e),f}let l=n?await GM(t,a,e,c,n):zt(t,a,e.key,c);return uA(e),typeof window<"u"&&!e.document&&(window.__smblsApp=l),l};var mA=(t,e)=>dt(t,A(e)?e:{}),I7=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},M7=()=>{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}},uF=t=>{let e=M7();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},yA=(t,e=go,n)=>{let r={...go,...mA(e,n)};return uF(r),I7(r),td(t,r).then(s=>{if(Cv(s,r),s.destroy=()=>Vu(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Su(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})},$7=(t,e=go,n)=>{let r=yA(t,e,n),o={...go,...mA(e,n)},s=o.key;return s&&o.editor&&o.editor.async&&Ft("fetchOnCreate").then(i=>{i&&i.fetchAsync(r,s,{utils:wu,...o})}),r},N7=async(t,e=go,n)=>{let r={...go,...mA(e,n)};uF(r);let o=e.key;if(o&&r.editor){let i=await Ft("fetchOnCreate");i&&await i.fetchSync(o,r)}let s=await td(t,r);return Cv(s,r),s.destroy=()=>Vu(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Su(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},F7=(t={},e=go,n)=>yA({deps:{isUndefined:Wt},...t},dt({domqlOptions:{onlyResolveExtends:!0}},e),n);Rt();M();kp();var dF={"@symbo.ls/signal":pc,"@symbo.ls/scratch":ZS,"@symbo.ls/element":kg,"@symbo.ls/css":Dh,"@symbo.ls/utils":Nl,"@symbo.ls/state":n0,"@symbo.ls/router":Ma,"@symbo.ls/polyglot":aA,"@symbo.ls/helmet":ZE,"@symbo.ls/fetch":Si,"@symbo.ls/capsize":lA,"@symbo.ls/shorthand":aE,"@symbo.ls/analyze":Au,"@symbo.ls/inspect":Tu,"@symbo.ls/channels":eA},pF=(t,e)=>{let n=t||(typeof globalThis<"u"?globalThis:{}),r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in dF)r[o]||(r[o]=dF[o]);if(e)for(let o in e)r[o]||(r[o]=e[o]);return r},hF=(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},gF=["@symbo.ls/sdk"],mF=(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};var wA={};F(wA,{BUILD_DOMQL_SYSTEM_PROMPT:()=>TF,DEFAULT_MAX_TOKENS:()=>wy,DEFAULT_MODEL:()=>bo,DEFAULT_PROVIDER:()=>rd,DEFAULT_TEMPERATURE:()=>_y,MODEL_TIER_ALIASES:()=>_A,PROVIDER_MODELS:()=>nd,SIMONE_BASE_URL:()=>ed,SIMONE_CHAT_PATH:()=>gy,SIMONE_CODE_PATH:()=>my,SIMONE_CODE_SYMBOLS_PATH:()=>yy,SIMONE_HEALTH_PATH:()=>by,SIMONE_TOOLS_PATH:()=>yF,WORKSPACE_SYSTEM_PROMPT:()=>CF,buildMessages:()=>xF,chat:()=>od,health:()=>SF,parseSimoneResponse:()=>EF,resolveModel:()=>OF,streamChat:()=>od,streamCode:()=>_F,streamCodeSymbols:()=>wF,toLegacyEnvelope:()=>AF});var ed="https://symbols-service-production.up.railway.app",gy="/api/chat",my="/api/code",yy="/api/code-symbols",by="/api/health",yF="/api/tools",nd={"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"]},rd="gemini",bo=nd[rd][0],_y=.7,wy=4096;function j7(t){if(!t)return null;for(let[e,n]of Object.entries(nd))if(n.includes(t))return e;return null}function bF(t,e){return t?t.replace(/\/$/,"")+e:e}function B7(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 od(t,e={},n){let{baseUrl:r=ed,path:o=gy,model:s=bo,provider:i=j7(s)||rd,temperature:a=_y,maxTokens:c=wy,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(bF(r,o),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(p),signal:u});if(!g.ok){let v=g.statusText;try{let w=await g.text();try{let b=JSON.parse(w);v=b.error||b.detail||v}catch{v=w||v}}catch{}let x=new Error(`simone: HTTP ${g.status} \u2014 ${v}`);throw x.status=g.status,x}if(!g.body||typeof g.body.getReader!="function"){let v=await g.text();return n&&n(v),{text:v,errors:[]}}let h=g.body.getReader(),m=new TextDecoder,y=[],_=[],S="";try{for(;;){let{done:v,value:x}=await h.read();if(v)break;S+=m.decode(x,{stream:!0});let w=S.indexOf(`
|
|
167
|
+
`);for(;w!==-1;){let b=S.slice(0,w).trim();if(S=S.slice(w+1),b){let k=B7(b);if(k?.done)return{text:y.join(""),errors:_};let C=k?.chunk;C?.delta&&(y.push(C.delta),n&&n(C.delta)),C?.error&&_.push(C.error)}w=S.indexOf(`
|
|
168
|
+
`)}}return{text:y.join(""),errors:_}}finally{h.cancel().catch(()=>{})}}function _F(t,e={},n){return od(t,{...e,path:my},n)}function wF(t,e={},n){return od(t,{...e,path:yy},n)}async function SF(t={}){let{baseUrl:e=ed,signal:n,headers:r}=t,o=await fetch(bF(e,by),{method:"GET",headers:r,signal:n});if(!o.ok)throw new Error(`simone health: HTTP ${o.status}`);return o.json()}function xF({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 vF=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,U7=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function V7(t){let e=[];for(let n of t.matchAll(vF))e.push({lang:(n.groups?.lang||"").toLowerCase(),code:n.groups?.code??""});return e}function H7(t){return t.replace(vF,"").trim()}function bA(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 kF(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&U7.has(t.type)}function EF(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let n=V7(e),r=n.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),o=n.filter(i=>i.lang==="json"),s=H7(e);for(let i of o){let a=bA(i.code);if(kF(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=bA("["+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=bA(e);if(kF(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 AF(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 CF=["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(" "),TF=["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
|
+
`),_A={Starter:bo,Free:bo,Pro:"claude-opus-4-6"};function OF(t){return t?_A[t]||t:bo}Xg(Tf);pF(void 0,{smbls:SA,"@symbo-ls/simone-server":wA});hF(void 0,{"@symbo.ls/windows":()=>({...Rv,...Tv}),"@symbo.ls/dropdown":()=>({...Nv,...jv})});
|
|
176
|
+
//# sourceMappingURL=smbls.cjs.map
|