smbls 3.14.797 → 3.14.798

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/smbls.cjs CHANGED
@@ -1,35 +1,35 @@
1
- "use strict";var jC=Object.create;var gc=Object.defineProperty;var BC=Object.getOwnPropertyDescriptor;var UC=Object.getOwnPropertyNames;var VC=Object.getPrototypeOf,zC=Object.prototype.hasOwnProperty;var F=(t,e)=>()=>(t&&(e=t(t=0)),e);var td=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),P=(t,e)=>{for(var r in e)gc(t,r,{get:e[r],enumerable:!0})},Ub=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of UC(e))!zC.call(t,n)&&n!==r&&gc(t,n,{get:()=>e[n],enumerable:!(o=BC(e,n))||o.enumerable});return t};var HC=(t,e,r)=>(r=t!=null?jC(VC(t)):{},Ub(e||!t||!t.__esModule?gc(r,"default",{value:t,enumerable:!0}):r,t)),WC=t=>Ub(gc({},"__esModule",{value:!0}),t);var _d,xd,v,Q,Ss=F(()=>{"use strict";_d=globalThis,xd=globalThis,v=globalThis,Q=v.document});var Qe,ks,Ht,vs=F(()=>{"use strict";Ss();Qe=t=>(typeof Node=="object"?t instanceof v.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,ks=t=>(typeof HTMLElement=="object"?t instanceof v.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,Ht=t=>typeof v<"u"&&(v.Node&&t instanceof v.Node||v.Window&&t instanceof v.Window||t===v||Q!==void 0&&t===Q)});var S,w,Fe,A,Ac,Tc,T,Oc,z,bt,Tt,Cs,Wt,wd,Ot=F(()=>{"use strict";vs();S=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,w=t=>typeof t=="string",Fe=t=>typeof t=="number",A=t=>typeof t=="function",Ac=t=>t===!0||t===!1,Tc=t=>t===null,T=t=>Array.isArray(t),Oc=t=>t instanceof Date,z=t=>t===null?!1:typeof t=="object",bt=t=>t!==void 0,Tt=t=>t===void 0,Cs={boolean:Ac,array:T,object:S,string:w,date:Oc,number:Fe,null:Tc,function:A,objectLike:z,node:Qe,htmlElement:ks,defined:bt},Wt=t=>(...e)=>e.some(r=>Cs[r](t)),wd=t=>(...e)=>!e.some(r=>Cs[r](t))});var Sd,kd,vd,Cd,Ho,Es,Ed,Ad,As,Td,Od,Rd,Pd,Id,Dd,$d,Wo,Ts,qo=F(()=>{"use strict";tr();Ot();Sd=(t,e)=>e.every(r=>t.includes(r)),kd=(t,e)=>{let r=0;for(let o=0;o<t.length;o++)t[o]===e&&r++;return r},vd=(t,e)=>{if(w(e)&&(e=parseInt(e)),Fe(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},Cd=(t,e,r)=>{e<0||r<0||e>=t.length||r>=t.length||([t[e],t[r]]=[t[r],t[e]])},Ho=(...t)=>[].concat(...t),Es=(t,e=[])=>t.reduce((r,o)=>st(r,ft(o,{exclude:e}),e),{}),Ed=(t,e)=>{let r=t.indexOf(e);return r!==-1?t.slice(0,r):t},Ad=(t,e)=>{if(!T(t))return;let r=t.indexOf(e);return r!==-1?t.slice(r+1):t},As=(t,e)=>{let r=t.indexOf(e);if(r>-1){let o=[...t];return o.splice(r,1),o}return t},Td=(t,e)=>t.filter(r=>r!==e),Od=(t,e)=>{let r=[];for(let o=0;o<t.length;o++)r.push(t[o]),o<t.length-1&&r.push(e);return r},Rd=(t,e,r)=>{let o=[...t],n=o.indexOf(e),s=o.indexOf(r);if(n!==-1&&s!==-1){let i=o.splice(n,1)[0],a=s<n?s:s+1;o.splice(a,0,i)}return o},Pd=(t,e)=>{if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0},Id=(t,e)=>t.filter(r=>!e.includes(r)),Dd=(t,e)=>{let r=new Set(e);return t.filter(o=>!r.has(o))},$d=(t,e)=>{if(!t)return 0;let r=0;for(let o=0;o<e.length;o++)t.includes(e[o])&&r++;return r},Wo=t=>T(t)?[...new Set(t)]:t,Ts=(t,e)=>{for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!1,configurable:!0,writable:!0})}});function eo(t,e,r={}){let{bracketsLength:o=2}=r,n=o===3?"{{{":"{{";if(!t.includes(n))return t;let s=cE[o],i=e||this.state||{},a=this;return t.replace(s,(c,l,f,u)=>{let d=f.trim();if(u){let h=a?.context,g=h?.functions?.[u]||h?.utils?.[u]||h?.methods?.[u]||h?.snippets?.[u]||a?.[u];if(g&&typeof g=="function")try{return String(g.call(a,d)??"")}catch{return""}return""}if(l){let h=(l.match(/\.\.\//g)||[]).length,g=i;for(let m=0;m<h;m++){if(!g||!g.parent)return"";g=g.parent}if(d==="parent")return String(g.value??"");let p=Os(g,d);return p!=null&&typeof p=="object"?"":String(p??"")}else{let h=Os(i,d);if(h!=null&&typeof h!="object")return String(h);let g=a?.context?.polyglot;if(g?.translations){let p=i?.root?.lang||i?.lang||a?.context?.state?.lang||g.defaultLang||"en",m=g.translations[p];if(m){let b=Os(m,d);if(b!=null&&typeof b!="object")return String(b);for(let y in m){let x=m[y];if(x&&typeof x=="object"&&!Array.isArray(x)){let k=Os(x,d);if(k!=null&&typeof k!="object")return String(k)}}}let _=Os(g.translations,d);if(_!=null&&typeof _!="object")return String(_)}return""}})}var Rs,Ld,cE,Os,ro,Md,lE,Fd,Nd,jd,fE,Bd,Ud,Ps=F(()=>{"use strict";Rs=(t,e)=>{for(let r of e)if(t.includes(r))return!0;return!1},Ld=(t,e)=>{let r=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(r,"")},cE={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},Os=(t,e)=>e.split(".").reduce((r,o)=>r?.[o],t);ro=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,Md=(t,e)=>{let r=t.split(`
2
- `),o=-1,n=-1,s=-1,i=-1,a=new RegExp(`\\b${e}\\b\\s*:\\s*`),c=0,l=!1;for(let f=0;f<r.length;f++)if(a.test(r[f])&&!l){if(l=!0,o=f+1,s=r[f].indexOf(e)+1,r[f].includes("{}")){n=o,i=r[f].indexOf("{}")+3;break}let u=r[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{n=f+1,i=r[f].length+1;break}}else if(l&&(c+=(r[f].match(/{/g)||[]).length,c+=(r[f].match(/\[/g)||[]).length,c-=(r[f].match(/}/g)||[]).length,c-=(r[f].match(/]/g)||[]).length,c===0)){n=f+1,i=r[f].lastIndexOf("}")!==-1?r[f].lastIndexOf("}")+2:r[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:o,endLineNumber:n}},lE=/\\([0-7]{1,3})/g,Fd=t=>t.replace(lE,(e,r)=>String.fromCharCode(parseInt(r,8))),Nd=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),jd=t=>t.replace(/\/\/\/\/\/n/g,`
3
- `).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),fE=/[^a-zA-Z0-9\s]/g,Bd=t=>t.replace(fE,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),Ud=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var br,Is,Vd,oo,_r,Ko,Ds,zd,Go=F(()=>{"use strict";br=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"]),Is=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),Vd=["ref","parent","__element","__depends","__ref","__children","root"],oo=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"]),_r=new Set(["update","__element"]),Ko=new Set(["set","reset","update","remove","updateContent","removeContent","lookup","lookdown","lookdownAll","getRef","getPath","setNodeStyles","spotByPath","keys","parse","setProps","parseDeep","variables","if","log","verbose","warn","error","call","nextElement","previousElement","getRootState","getRoot","getRootData","getRootContext","getContext","getQuery","getDB","getChildren","preventContentUpdate","preventContentRecreate"]),Ds=new Set(["node","context","extends","__element","__ref",...Ko,...oo,..._r]),zd=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var t_,no,ut,Hd,gt,st,n_,Wd,ft,Ls,uE,Ms,dE,pE,hE,Ne,gE,mE,e_,fe,s_,i_,a_,c_,l_,r_,$s,o_,Fs,qd,Kd,Rc,Gd,Yd,Ns,so,qt,Pc,yE,Xd,Jd,Ic,Zd,Qd,tp,ep,rp,op,np,tr=F(()=>{"use strict";Ss();Ot();qo();Ps();vs();Go();t_="production",no=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,ut=(t,e,r,o)=>{if(A(t))return e?typeof t.call!="function"?t:t.call(e,e,r||e.state,o||e.context):void 0;if(t!=null&&e?.context?.plugins&&(T(t)||S(t)&&!Ht(t))){let n=e.context.plugins;for(let s of n)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return ut(i,e,r,o)}}return t},Hd=(t,e,r)=>{for(let o in e)t[o]=ut(e[o],r)},gt=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(no(n)||(o?r.has(n):r.includes(n))||t[n]===void 0&&(t[n]=e[n]));return t},st=(t,e,r=Ds)=>n_(t,e,r,null),n_=(t,e,r,o)=>{if(t===e)return t;if(o){for(let s=0;s<o.length;s+=2)if(o[s]===t&&o[s+1]===e)return t}let n=r instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||no(s)||s==="constructor"||s==="prototype"||(n?r.has(s):r.includes(s)))continue;let i=t[s],a=e[s];if(z(i)&&z(a)){let c=o||[];c.push(t,e),n_(i,a,r,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},Wd=(t,e=[])=>{let r=e instanceof Set,o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(no(n)||(r?e.has(n):e.includes(n))||(o[n]=t[n]));return o},ft=(t,e={})=>{let{exclude:r=[],cleanUndefined:o=!1,cleanNull:n=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!z(t)||Ht(t))return t;if(s.has(t))return s.get(t);let a=r instanceof Set?r:r.length>3?new Set(r):null,c=u=>a?a.has(u):r.includes(u),l=T(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let h in u){if(!Object.prototype.hasOwnProperty.call(u,h)||no(h)||h==="__proto__"||c(h))continue;let g=u[h];if(!(o&&g===void 0)&&!(n&&g===null)){if(Ht(g)){d[h]=g;continue}if(i&&h==="extends"&&T(g)){d[h]=Es(g,r);continue}if(A(g)){d[h]=g;continue}if(z(g))if(s.has(g))d[h]=s.get(g);else{let p=T(g)?[]:{};s.set(g,p),d[h]=p,f.push([g,p])}else d[h]=g}}}return l},Ls=(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 r in t){let o=t[r];if(A(o))e[r]=o.toString();else if(S(o))e[r]={},Ls(o,e[r]);else if(T(o)){let n=e[r]=[];for(let s=0;s<o.length;s++){let i=o[s];S(i)?(n[s]={},Ls(i,n[s])):A(i)?n[s]=i.toString():n[s]=i}}else e[r]=o}return e},uE=new Set(["&","*","-",":","%","{","}",">","<","@",".","/","!"," "]),Ms=(t={},e=0)=>{if(t===null||typeof t!="object"||t instanceof RegExp)return String(t);let r=!1;for(let s in t){r=!0;break}if(!r)return"{}";let o=" ".repeat(e),n=`{
4
- `;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=!1;for(let l=0;l<s.length;l++)if(uE.has(s[l])){a=!0;break}let c=a?`'${s}'`:s;if(n+=`${o} ${c}: `,i instanceof RegExp)n+=String(i);else if(T(i)){n+=`[
1
+ "use strict";var XC=Object.create;var kc=Object.defineProperty;var ZC=Object.getOwnPropertyDescriptor;var JC=Object.getOwnPropertyNames;var QC=Object.getPrototypeOf,tE=Object.prototype.hasOwnProperty;var j=(t,e)=>()=>(t&&(e=t(t=0)),e);var cd=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),P=(t,e)=>{for(var r in e)kc(t,r,{get:e[r],enumerable:!0})},Qb=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of JC(e))!tE.call(t,n)&&n!==r&&kc(t,n,{get:()=>e[n],enumerable:!(o=ZC(e,n))||o.enumerable});return t};var eE=(t,e,r)=>(r=t!=null?XC(QC(t)):{},Qb(e||!t||!t.__esModule?kc(r,"default",{value:t,enumerable:!0}):r,t)),rE=t=>Qb(kc({},"__esModule",{value:!0}),t);var Ad,Td,v,tt,Rs=j(()=>{"use strict";Ad=globalThis,Td=globalThis,v=globalThis,tt=v.document});var or,Ps,Ht,Is=j(()=>{"use strict";Rs();or=t=>(typeof Node=="object"?t instanceof v.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,Ps=t=>(typeof HTMLElement=="object"?t instanceof v.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,Ht=t=>typeof v<"u"&&(v.Node&&t instanceof v.Node||v.Window&&t instanceof v.Window||t===v||tt!==void 0&&t===tt)});var S,w,je,A,Lc,Mc,T,Fc,H,yt,At,Ds,Wt,Od,Tt=j(()=>{"use strict";Is();S=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,w=t=>typeof t=="string",je=t=>typeof t=="number",A=t=>typeof t=="function",Lc=t=>t===!0||t===!1,Mc=t=>t===null,T=t=>Array.isArray(t),Fc=t=>t instanceof Date,H=t=>t===null?!1:typeof t=="object",yt=t=>t!==void 0,At=t=>t===void 0,Ds={boolean:Lc,array:T,object:S,string:w,date:Fc,number:je,null:Mc,function:A,objectLike:H,node:or,htmlElement:Ps,defined:yt},Wt=t=>(...e)=>e.some(r=>Ds[r](t)),Od=t=>(...e)=>!e.some(r=>Ds[r](t))});var Rd,Pd,Id,Dd,Yo,$s,$d,Ld,Ls,Md,Fd,Nd,jd,Bd,Ud,Vd,Xo,Ms,Zo=j(()=>{"use strict";nr();Tt();Rd=(t,e)=>e.every(r=>t.includes(r)),Pd=(t,e)=>{let r=0;for(let o=0;o<t.length;o++)t[o]===e&&r++;return r},Id=(t,e)=>{if(w(e)&&(e=parseInt(e)),je(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},Dd=(t,e,r)=>{e<0||r<0||e>=t.length||r>=t.length||([t[e],t[r]]=[t[r],t[e]])},Yo=(...t)=>[].concat(...t),$s=(t,e=[])=>t.reduce((r,o)=>st(r,lt(o,{exclude:e}),e),{}),$d=(t,e)=>{let r=t.indexOf(e);return r!==-1?t.slice(0,r):t},Ld=(t,e)=>{if(!T(t))return;let r=t.indexOf(e);return r!==-1?t.slice(r+1):t},Ls=(t,e)=>{let r=t.indexOf(e);if(r>-1){let o=[...t];return o.splice(r,1),o}return t},Md=(t,e)=>t.filter(r=>r!==e),Fd=(t,e)=>{let r=[];for(let o=0;o<t.length;o++)r.push(t[o]),o<t.length-1&&r.push(e);return r},Nd=(t,e,r)=>{let o=[...t],n=o.indexOf(e),s=o.indexOf(r);if(n!==-1&&s!==-1){let i=o.splice(n,1)[0],a=s<n?s:s+1;o.splice(a,0,i)}return o},jd=(t,e)=>{if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0},Bd=(t,e)=>t.filter(r=>!e.includes(r)),Ud=(t,e)=>{let r=new Set(e);return t.filter(o=>!r.has(o))},Vd=(t,e)=>{if(!t)return 0;let r=0;for(let o=0;o<e.length;o++)t.includes(e[o])&&r++;return r},Xo=t=>T(t)?[...new Set(t)]:t,Ms=(t,e)=>{for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!1,configurable:!0,writable:!0})}});function no(t,e,r={}){let{bracketsLength:o=2}=r,n=o===3?"{{{":"{{";if(!t.includes(n))return t;let s=_E[o],i=e||this.state||{},a=this;return t.replace(s,(c,l,f,u)=>{let d=f.trim();if(u){let h=a?.context,g=h?.functions?.[u]||h?.utils?.[u]||h?.methods?.[u]||h?.snippets?.[u]||a?.[u];if(g&&typeof g=="function")try{return String(g.call(a,d)??"")}catch{return""}return""}if(l){let h=(l.match(/\.\.\//g)||[]).length,g=i;for(let m=0;m<h;m++){if(!g||!g.parent)return"";g=g.parent}if(d==="parent")return String(g.value??"");let p=Fs(g,d);return p!=null&&typeof p=="object"?"":String(p??"")}else{let h=Fs(i,d);if(h!=null&&typeof h!="object")return String(h);let g=a?.context?.polyglot;if(g?.translations){let p=i?.root?.lang||i?.lang||a?.context?.state?.lang||g.defaultLang||"en",m=g.translations[p];if(m){let _=Fs(m,d);if(_!=null&&typeof _!="object")return String(_);for(let y in m){let x=m[y];if(x&&typeof x=="object"&&!Array.isArray(x)){let k=Fs(x,d);if(k!=null&&typeof k!="object")return String(k)}}}let b=Fs(g.translations,d);if(b!=null&&typeof b!="object")return String(b)}return""}})}var Ns,zd,_E,Fs,so,Hd,xE,Wd,qd,Kd,wE,Gd,Yd,js=j(()=>{"use strict";Ns=(t,e)=>{for(let r of e)if(t.includes(r))return!0;return!1},zd=(t,e)=>{let r=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(r,"")},_E={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},Fs=(t,e)=>e.split(".").reduce((r,o)=>r?.[o],t);so=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,Hd=(t,e)=>{let r=t.split(`
2
+ `),o=-1,n=-1,s=-1,i=-1,a=new RegExp(`\\b${e}\\b\\s*:\\s*`),c=0,l=!1;for(let f=0;f<r.length;f++)if(a.test(r[f])&&!l){if(l=!0,o=f+1,s=r[f].indexOf(e)+1,r[f].includes("{}")){n=o,i=r[f].indexOf("{}")+3;break}let u=r[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{n=f+1,i=r[f].length+1;break}}else if(l&&(c+=(r[f].match(/{/g)||[]).length,c+=(r[f].match(/\[/g)||[]).length,c-=(r[f].match(/}/g)||[]).length,c-=(r[f].match(/]/g)||[]).length,c===0)){n=f+1,i=r[f].lastIndexOf("}")!==-1?r[f].lastIndexOf("}")+2:r[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:o,endLineNumber:n}},xE=/\\([0-7]{1,3})/g,Wd=t=>t.replace(xE,(e,r)=>String.fromCharCode(parseInt(r,8))),qd=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),Kd=t=>t.replace(/\/\/\/\/\/n/g,`
3
+ `).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),wE=/[^a-zA-Z0-9\s]/g,Gd=t=>t.replace(wE,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),Yd=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var wr,Bs,Xd,io,Sr,Jo,Us,Zd,Qo=j(()=>{"use strict";wr=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"]),Bs=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),Xd=["ref","parent","__element","__depends","__ref","__children","root"],io=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"]),Sr=new Set(["update","__element"]),Jo=new Set(["set","reset","update","remove","updateContent","removeContent","lookup","lookdown","lookdownAll","getRef","getPath","setNodeStyles","spotByPath","keys","parse","setProps","parseDeep","variables","if","log","verbose","warn","error","call","nextElement","previousElement","getRootState","getRoot","getRootData","getRootContext","getContext","getQuery","getDB","getChildren","preventContentUpdate","preventContentRecreate"]),Us=new Set(["node","context","extends","__element","__ref",...Jo,...io,...Sr]),Zd=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var d_,ao,ft,Jd,ht,st,m_,Qd,lt,zs,SE,Hs,kE,vE,CE,Be,EE,AE,p_,de,y_,b_,__,x_,w_,h_,Vs,g_,Ws,tp,ep,Nc,rp,op,qs,co,qt,jc,TE,np,sp,Bc,ip,ap,cp,lp,fp,up,dp,nr=j(()=>{"use strict";Rs();Tt();Zo();js();Is();Qo();d_="production",ao=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,ft=(t,e,r,o)=>{if(A(t))return e?typeof t.call!="function"?t:t.call(e,e,r||e.state,o||e.context):void 0;if(t!=null&&e?.context?.plugins&&(T(t)||S(t)&&!Ht(t))){let n=e.context.plugins;for(let s of n)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return ft(i,e,r,o)}}return t},Jd=(t,e,r)=>{for(let o in e)t[o]=ft(e[o],r)},ht=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(ao(n)||(o?r.has(n):r.includes(n))||t[n]===void 0&&(t[n]=e[n]));return t},st=(t,e,r=Us)=>m_(t,e,r,null),m_=(t,e,r,o)=>{if(t===e)return t;if(o){for(let s=0;s<o.length;s+=2)if(o[s]===t&&o[s+1]===e)return t}let n=r instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||ao(s)||s==="constructor"||s==="prototype"||(n?r.has(s):r.includes(s)))continue;let i=t[s],a=e[s];if(H(i)&&H(a)){let c=o||[];c.push(t,e),m_(i,a,r,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},Qd=(t,e=[])=>{let r=e instanceof Set,o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(ao(n)||(r?e.has(n):e.includes(n))||(o[n]=t[n]));return o},lt=(t,e={})=>{let{exclude:r=[],cleanUndefined:o=!1,cleanNull:n=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!H(t)||Ht(t))return t;if(s.has(t))return s.get(t);let a=r instanceof Set?r:r.length>3?new Set(r):null,c=u=>a?a.has(u):r.includes(u),l=T(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let h in u){if(!Object.prototype.hasOwnProperty.call(u,h)||ao(h)||h==="__proto__"||c(h))continue;let g=u[h];if(!(o&&g===void 0)&&!(n&&g===null)){if(Ht(g)){d[h]=g;continue}if(i&&h==="extends"&&T(g)){d[h]=$s(g,r);continue}if(A(g)){d[h]=g;continue}if(H(g))if(s.has(g))d[h]=s.get(g);else{let p=T(g)?[]:{};s.set(g,p),d[h]=p,f.push([g,p])}else d[h]=g}}}return l},zs=(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 r in t){let o=t[r];if(A(o))e[r]=o.toString();else if(S(o))e[r]={},zs(o,e[r]);else if(T(o)){let n=e[r]=[];for(let s=0;s<o.length;s++){let i=o[s];S(i)?(n[s]={},zs(i,n[s])):A(i)?n[s]=i.toString():n[s]=i}}else e[r]=o}return e},SE=new Set(["&","*","-",":","%","{","}",">","<","@",".","/","!"," "]),Hs=(t={},e=0)=>{if(t===null||typeof t!="object"||t instanceof RegExp)return String(t);let r=!1;for(let s in t){r=!0;break}if(!r)return"{}";let o=" ".repeat(e),n=`{
4
+ `;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=!1;for(let l=0;l<s.length;l++)if(SE.has(s[l])){a=!0;break}let c=a?`'${s}'`:s;if(n+=`${o} ${c}: `,i instanceof RegExp)n+=String(i);else if(T(i)){n+=`[
5
5
  `;for(let l of i)l instanceof RegExp?n+=`${o} ${String(l)},
6
- `:z(l)&&l!==null?n+=`${o} ${Ms(l,e+2)},
6
+ `:H(l)&&l!==null?n+=`${o} ${Hs(l,e+2)},
7
7
  `:w(l)?n+=`${o} '${l}',
8
8
  `:n+=`${o} ${l},
9
- `;n+=`${o} ]`}else z(i)?n+=Ms(i,e+1):w(i)?n+=Rs(i,[`
9
+ `;n+=`${o} ]`}else H(i)?n+=Hs(i,e+1):w(i)?n+=Ns(i,[`
10
10
  `,"'"])?`\`${i}\``:`'${i}'`:n+=i;n+=`,
11
- `}return n+=`${o}}`,n},dE=[/^\(\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]*\}$/],pE=/^["[{]/,hE=/^(export|import)\s/,Ne=t=>{if(!t)return!1;let e=t.trim().replace(/\n\s*/g," ").trim();if(e===""||e==="{}"||e==="[]"||hE.test(e)||!dE.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0),n=e.includes("=>");return!(o===123&&!n||o===91||pE.test(e)&&!n)},gE=t=>(0,eval)(t),mE=(t,e)=>{let r=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(t);if(!r)return null;let o=r[0].length,n=[],s=o,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(`
11
+ `}return n+=`${o}}`,n},kE=[/^\(\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]*\}$/],vE=/^["[{]/,CE=/^(export|import)\s/,Be=t=>{if(!t)return!1;let e=t.trim().replace(/\n\s*/g," ").trim();if(e===""||e==="{}"||e==="[]"||CE.test(e)||!kE.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0),n=e.includes("=>");return!(o===123&&!n||o===91||vE.test(e)&&!n)},EE=t=>(0,eval)(t),AE=(t,e)=>{let r=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(t);if(!r)return null;let o=r[0].length,n=[],s=o,i=1,a=null,c=t.length,l=new RegExp("^(?:const|let|var)\\s+"+e+"\\b");for(;s<c&&i>0;){let u=t[s];if(u==="/"&&t[s+1]==="/"){let d=t.indexOf(`
12
12
  `,s);s=d===-1?c:d;continue}if(u==="/"&&t[s+1]==="*"){let d=t.indexOf("*/",s+2);s=d===-1?c:d+2;continue}if(u==='"'||u==="'"||u==="`"){let d=u;for(s++;s<c;){if(t[s]==="\\"){s+=2;continue}if(t[s]===d){s++;break}if(d==="`"&&t[s]==="$"&&t[s+1]==="{"){s+=2;let h=1;for(;s<c&&h>0;)t[s]==="{"?h++:t[s]==="}"&&h--,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,h=0,g=s;for(;g<c;){let p=t[g];if(p==='"'||p==="'"||p==="`"){let m=p;for(g++;g<c;){if(t[g]==="\\"){g+=2;continue}if(t[g]===m){g++;break}g++}continue}if(p==="("||p==="["||p==="{"){h++,g++;continue}if(p===")"||p==="]"||p==="}"){if(h===0)break;h--,g++;continue}if(h===0&&(p===";"||p===`
13
- `)){g++;break}g++}n.push([d,g]),s=g;continue}s++}if(!n.length)return null;let f=t;for(let u=n.length-1;u>=0;u--)f=f.slice(0,n[u][0])+f.slice(n[u][1]);return f},e_=(t,e,r)=>{let o=String(t).trimStart();if(/^(export|import)\s/.test(o))return t;try{return r.window.eval(`(${t})`)}catch(n){let s=n&&n.message?n.message:String(n),i=/await is only valid in async/.test(s),a=/Identifier '([^']+)' has already been declared/.exec(s),c=null;if(i){let l=String(t).trim();if(/^function[\s(]/.test(l))try{c=r.window.eval("(async "+l+")")}catch{}}else if(a){let l=String(t),f=a[1];for(let u=0;u<5;u++){let d=mE(l,f);if(!d||d===l)break;l=d;try{c=r.window.eval("("+l+")");break}catch(h){let g=/Identifier '([^']+)' has already been declared/.exec(h&&h.message||String(h));if(!g||g[1]!==f)break}}}if(!c&&/Unexpected (token '\{'|identifier)/.test(s))try{let l=r.window.eval("({"+t+"})");if(l&&typeof l=="object"){let f=Object.keys(l);f.length===1&&typeof l[f[0]]=="function"&&(c=l[f[0]])}}catch{}return c||(typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: eval failed on ${e} \u2014 value will be left as a string. Reason: `+s+`.
14
- First 200 chars of source: `+String(t).slice(0,200)),t)}},fe=(t,e={},r={window:{eval:gE}})=>{if(!t||typeof t!="object")return e;let o=[[t,e]];for(;o.length;){let[n,s]=o.pop();for(let i in n){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let a=n[i];if(w(a))Ne(a)?s[i]=e_(a,`"${i}"`,r):s[i]=a;else if(T(a)){let c=s[i]=[];for(let l=0;l<a.length;l++){let f=a[l];if(w(f))c.push(Ne(f)?e_(f,`array index ${l} (prop "${i}")`,r):f);else if(S(f)){let u=o_(f);if(u)c.push(u);else{let d={};c.push(d),o.push([f,d])}}else c.push(f)}}else if(S(a)){let c=o_(a);if(c){s[i]=c;continue}let l=s[i]&&typeof s[i]=="object"&&!T(s[i])?s[i]:s[i]={};o.push([a,l])}else s[i]=a}}return e},s_="Set",i_="Map",a_="RegExp",c_="WeakMap",l_="WeakSet",r_=t=>{let e=Object.keys(t);return e.length===1&&e[0]==="__type"},$s=(t,e)=>{if(!t||typeof t!="object")return t;let r=s=>$s(s,e||(e=new WeakMap));if(t.__type===s_&&T(t.values))return new Set(t.values.map(r));if(t.__type===i_&&T(t.entries))return new Map(t.entries.map(s=>T(s)?[r(s[0]),r(s[1])]:s));if(t.__type===c_&&r_(t))return new WeakMap;if(t.__type===l_&&r_(t))return new WeakSet;if(t.__type===a_&&w(t.source))try{return new RegExp(t.source,w(t.flags)?t.flags:"")}catch{return t}if(e||(e=new WeakMap),e.has(t))return e.get(t);let o=!1;if(T(t)){let s=new Array(t.length);e.set(t,s);for(let i=0;i<t.length;i++)s[i]=$s(t[i],e),s[i]!==t[i]&&(o=!0);return o||e.set(t,t),o?s:t}let n={};e.set(t,n);for(let s of Object.keys(t))n[s]=$s(t[s],e),n[s]!==t[s]&&(o=!0);return o||e.set(t,t),o?n:t},o_=t=>{if(!t||typeof t!="object")return null;let e=t.__type;if(e!==a_&&e!==s_&&e!==i_&&e!==c_&&e!==l_)return null;let r=$s(t);return r===t?null:r},Fs=t=>{if(!t||typeof t!="object")return t;let e={},r=[];for(let i of Object.keys(t)){let a=t[i];w(a)&&Ne(a)?r.push([i,a]):e[i]=$s(a)}if(r.length===0)return e;let o=i=>/^[A-Za-z_$][\w$]*$/.test(i),n=r.filter(([i])=>o(i)),s=Object.keys(e).filter(o).map(i=>`var ${i} = __gs__[${JSON.stringify(i)}];`).join(`
13
+ `)){g++;break}g++}n.push([d,g]),s=g;continue}s++}if(!n.length)return null;let f=t;for(let u=n.length-1;u>=0;u--)f=f.slice(0,n[u][0])+f.slice(n[u][1]);return f},p_=(t,e,r)=>{let o=String(t).trimStart();if(/^(export|import)\s/.test(o))return t;try{return r.window.eval(`(${t})`)}catch(n){let s=n&&n.message?n.message:String(n),i=/await is only valid in async/.test(s),a=/Identifier '([^']+)' has already been declared/.exec(s),c=null;if(i){let l=String(t).trim();if(/^function[\s(]/.test(l))try{c=r.window.eval("(async "+l+")")}catch{}}else if(a){let l=String(t),f=a[1];for(let u=0;u<5;u++){let d=AE(l,f);if(!d||d===l)break;l=d;try{c=r.window.eval("("+l+")");break}catch(h){let g=/Identifier '([^']+)' has already been declared/.exec(h&&h.message||String(h));if(!g||g[1]!==f)break}}}if(!c&&/Unexpected (token '\{'|identifier)/.test(s))try{let l=r.window.eval("({"+t+"})");if(l&&typeof l=="object"){let f=Object.keys(l);f.length===1&&typeof l[f[0]]=="function"&&(c=l[f[0]])}}catch{}return c||(typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: eval failed on ${e} \u2014 value will be left as a string. Reason: `+s+`.
14
+ First 200 chars of source: `+String(t).slice(0,200)),t)}},de=(t,e={},r={window:{eval:EE}})=>{if(!t||typeof t!="object")return e;let o=[[t,e]];for(;o.length;){let[n,s]=o.pop();for(let i in n){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let a=n[i];if(w(a))Be(a)?s[i]=p_(a,`"${i}"`,r):s[i]=a;else if(T(a)){let c=s[i]=[];for(let l=0;l<a.length;l++){let f=a[l];if(w(f))c.push(Be(f)?p_(f,`array index ${l} (prop "${i}")`,r):f);else if(S(f)){let u=g_(f);if(u)c.push(u);else{let d={};c.push(d),o.push([f,d])}}else c.push(f)}}else if(S(a)){let c=g_(a);if(c){s[i]=c;continue}let l=s[i]&&typeof s[i]=="object"&&!T(s[i])?s[i]:s[i]={};o.push([a,l])}else s[i]=a}}return e},y_="Set",b_="Map",__="RegExp",x_="WeakMap",w_="WeakSet",h_=t=>{let e=Object.keys(t);return e.length===1&&e[0]==="__type"},Vs=(t,e)=>{if(!t||typeof t!="object")return t;let r=s=>Vs(s,e||(e=new WeakMap));if(t.__type===y_&&T(t.values))return new Set(t.values.map(r));if(t.__type===b_&&T(t.entries))return new Map(t.entries.map(s=>T(s)?[r(s[0]),r(s[1])]:s));if(t.__type===x_&&h_(t))return new WeakMap;if(t.__type===w_&&h_(t))return new WeakSet;if(t.__type===__&&w(t.source))try{return new RegExp(t.source,w(t.flags)?t.flags:"")}catch{return t}if(e||(e=new WeakMap),e.has(t))return e.get(t);let o=!1;if(T(t)){let s=new Array(t.length);e.set(t,s);for(let i=0;i<t.length;i++)s[i]=Vs(t[i],e),s[i]!==t[i]&&(o=!0);return o||e.set(t,t),o?s:t}let n={};e.set(t,n);for(let s of Object.keys(t))n[s]=Vs(t[s],e),n[s]!==t[s]&&(o=!0);return o||e.set(t,t),o?n:t},g_=t=>{if(!t||typeof t!="object")return null;let e=t.__type;if(e!==__&&e!==y_&&e!==b_&&e!==x_&&e!==w_)return null;let r=Vs(t);return r===t?null:r},Ws=t=>{if(!t||typeof t!="object")return t;let e={},r=[];for(let i of Object.keys(t)){let a=t[i];w(a)&&Be(a)?r.push([i,a]):e[i]=Vs(a)}if(r.length===0)return e;let o=i=>/^[A-Za-z_$][\w$]*$/.test(i),n=r.filter(([i])=>o(i)),s=Object.keys(e).filter(o).map(i=>`var ${i} = __gs__[${JSON.stringify(i)}];`).join(`
15
15
  `);try{let i=n.map(([l,f])=>`var ${l} = (${f});`).join(`
16
16
  `),a="{ "+n.map(([l])=>`${JSON.stringify(l)}: ${l}`).join(", ")+" }",c=v.eval(`(function(__gs__) { ${s}
17
17
  ${i}
18
18
  return ${a}; })`)(e);Object.assign(e,c)}catch{for(let[a,c]of n)try{let l=Object.keys(e).filter(o).map(f=>`var ${f} = __gs__[${JSON.stringify(f)}];`).join(`
19
19
  `);e[a]=v.eval(`(function(__gs__) { ${l}
20
- return (${c}); })`)(e)}catch{try{e[a]=v.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of r)if(!o(i))try{e[i]=v.eval(`(${a})`)}catch{e[i]=a}return e},qd=(t,e={verbose:!0})=>{try{return t?v.eval("("+t+")"):{}}catch(r){e.verbose&&console.warn(r)}},Kd=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),Rc=t=>{for(let e in t)return!1;return!0},Gd=t=>S(t)&&Rc(t),Yd=()=>Object.create(null),Ns=(t,e,r={})=>{let o=r.exclude||[],n=r.preventUnderscore;for(let s in e)o.includes(s)||!n&&no(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},so=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)no(n)||n==="constructor"||n==="prototype"||(o?r.has(n):r.includes(n))||(t[n]=e[n]);return t},qt=(t,e,r={},o=new WeakMap)=>{if(!z(t)||!z(e)||Ht(t)||Ht(e))return e;if(o.has(t))return o.get(t);o.set(t,t);let n=r.exclude,s=n?n instanceof Set?n:new Set(n):null,i=!r.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&no(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];Ht(l)?t[a]=l:z(c)&&z(l)?t[a]=qt(c,l,r,o):l!==void 0&&(t[a]=l)}return t},Pc=(t,e,r=new Set)=>{if(typeof t!="object"||typeof e!="object"||t===null||e===null)return t===e;if(r.has(t)||r.has(e))return!0;r.add(t),r.add(e);let o=Object.keys(t),n=Object.keys(e);if(o.length!==n.length)return!1;for(let s=0;s<o.length;s++){let i=o[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!Pc(t[i],e[i],r))return!1}return!0},yE=new Set(["node","__ref"]),Xd=(t,e,r=yE)=>{if(t===e)return!0;if(!z(t)||!z(e)||Ht(t)||Ht(e))return t===e;let o=r instanceof Set?r:new Set(r),n=new WeakSet;function s(i,a){if(n.has(a))return!0;n.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||o.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(Ht(l)||Ht(f)){if(l!==f)return!1}else if(z(l)&&z(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},Jd=(t,e)=>{if(e==null)return t;if(Wt(e)("string","number"))delete t[e];else if(T(e))for(let r=0;r<e.length;r++)delete t[e[r]];else throw new Error("Invalid input: props must be a string or an array of strings");return t},Ic=t=>{if(t===null||typeof t!="object")return t;let e=Object.create(null);for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=Ic(t[r]));return e},Zd=(t,e)=>{if(t.length===0)return e;let r={},o=r;for(let n=0;n<t.length;n++)n===t.length-1&&e?o[t[n]]=e:(o[t[n]]={},o=o[t[n]]);return r},Qd=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let n=0;n<e.length-1;n++){if(r[e[n]]===void 0)return;r=r[e[n]]}let o=e[e.length-1];r&&Object.prototype.hasOwnProperty.call(r,o)&&delete r[o]},tp=(t,e,r)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let o=t;for(let n=0;n<e.length-1;n++)(!o[e[n]]||typeof o[e[n]]!="object")&&(o[e[n]]={}),o=o[e[n]];return o[e[e.length-1]]=r,t},ep=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length;o++){if(r==null)return;r=r[e[o]]}return r},rp=t=>{let r=[],o=0;for(let n=0;n<t.length;n++)if(r.length<2)r.push(t[n]);else if(t[n]===r[n%2]?o++:(r=[t[n-1],t[n]],o=1),o>=20)return(t_==="test"||t_==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},op=t=>{let e=new WeakSet;function r(o){if(o&&typeof o=="object"){if(e.has(o))return!0;e.add(o);for(let n in o)if(Object.prototype.hasOwnProperty.call(o,n)&&r(o[n]))return console.log(o,"cycle at "+n),!0}return!1}return r(t)},np=(t,e)=>{let r=e instanceof Set?e:new Set(e),o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&!r.has(n)&&(o[n]=t[n]);return o}});var js,Bs,Us,Dc=F(()=>{"use strict";tr();js=(function(){let t=0;function e(){return t++,t}return e})(),Bs=js,Us=(t,e,r)=>(ut(r,t)||r||t.key||js()).toString()});var ve,sp,xr,$c,ip,ap,cp,wr,lp,io,Pt,fp=F(()=>{"use strict";ve="production",sp=ve,xr=(t=ve)=>t==="production",$c=(t=ve)=>t==="testing"||t==="test",ip=$c,ap=(t=ve)=>t==="staging",cp=(t=ve)=>t==="local",wr=(t=ve)=>t==="development"||t==="dev"||t==="local",lp=(t,e=ve)=>e[t],io=(t=ve)=>!xr(t),Pt=t=>{let e=t&&"env"in t?t.env:typeof process<"u"&&process.env?"production":void 0;if(e&&e!=="production")return!0;let r=t&&"hostname"in t?t.hostname:typeof location<"u"?location.hostname:void 0;return typeof r=="string"&&r?r==="localhost"||r==="127.0.0.1"||r.endsWith(".localhost"):!1}});function Vs(t,e,r){let o;return function(){let n=this,s=arguments,i=function(){o=null,r||t.apply(n,s)},a=r&&!o;clearTimeout(o),o=setTimeout(i,e),a&&t.apply(n,s)}}function hp(t,e=window){let r=function(){return t.apply(e,arguments)};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r}var up,dp,bE,pp,Yo,Xo,At,Jo=F(()=>{"use strict";up=(t,e,r=300)=>{let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>{e.apply(t,n)},r)}},dp=t=>{let e={};return(...r)=>{let o=r[0];if(o in e)return e[o];{let n=t(o);return e[o]=n,n}}},bE=/^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/,pp=t=>bE.test(t),Yo=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let r of e)if(r.resolveHandler)return!0;return!1},Xo=(t,e)=>{if(typeof t=="function")return t;let r=e?.context?.plugins;if(!r)return t;for(let o of r)if(o.resolveHandler){let n=o.resolveHandler(t,e);if(typeof n=="function")return n}return t},At=(t,e,...r)=>{let o=e?.context?.plugins;if(!o)return!1;let n=!1;for(let s of o)typeof s[t]=="function"&&(s[t](e,...r),n=!0);return n}});var gp,f_=F(()=>{"use strict";Ot();tr();gp=(t,e)=>{let{__ref:r}=t,o=t.if;if(A(o)){let n;try{n=o(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete r.__if;return}n?r.__if=!0:delete r.__if}else o!=null&&typeof o=="object"?ut(o,t)?r.__if=!0:delete r.__if:r.__if=!0}});var mp,yp,u_=F(()=>{"use strict";mp=(t,...e)=>{t&&e.map(r=>console.log(r))},yp=(t,e,...r)=>{t&&(console.group(e),r.map(o=>console.log(o)),console.groupEnd(e))}});function Sp(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 kp(t,e){if(e!=null)try{if(!window.localStorage)return;let r=typeof e=="object"?JSON.stringify(e):e;window.localStorage.setItem(t,r)}catch{}}var bp,_p,xp,wp,d_=F(()=>{"use strict";Ot();Ss();bp=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),_p=(t,e,r=365)=>{if(Tt(Q)||Tt(Q.cookie))return;let o=new Date;o.setTime(o.getTime()+r*24*60*60*1e3);let n=`expires=${o.toUTCString()}`;Q.cookie=`${t}=${e};${n};path=/`},xp=t=>{if(Tt(Q)||Tt(Q.cookie))return;let e=`${t}=`,o=decodeURIComponent(Q.cookie).split(";");for(let n=0;n<o.length;n++){let s=o[n];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},wp=t=>{Tt(Q)||Tt(Q.cookie)||(Q.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var Zo,p_,vp,Cp=F(()=>{"use strict";Zo={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"])},p_=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"]),vp=t=>Zo.body.has(t)});var Ep,h_,Qo,Ws,Kt,Ap,Lc,qs,Tp,Ks,Mc,Fc,Gs,Nc,tn,_E,je,g_,zs,Ys,Op,Hs,Rp,Pp,jc,Bc,Uc,Vc,zc,Hc,m_,Wc=F(()=>{"use strict";qo();Ip();tr();Ot();Ep="production",h_=t=>t.sourcemap!==!1&&Ep!=="production",Qo=t=>{if(t.includes("+"))return t.split("+").filter(Be);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!Be(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},Ws=(t,e,r)=>{let o=[],n=Qo(r);n&&(o=[...n]);let s=t.extends;return s&&(o=T(s)?[...o,...s]:[...o,s]),o},Kt=(t,e)=>{let{__ref:r}=e,{__extends:o}=r;if(!t)return o;let n=e.variant,s=e.context;if(n&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${n}`;s.components[i]&&(t=i)}return o.includes(t)||(o=Array.isArray(t)?[...o,...t]:[...o,t],r.__extends=o),o},Ap=(t,e)=>{if(!t)return e;let{extends:r}=e,o=T(r)?r:[r],n=T(t)?t:[t];return{...e,extends:Ho(n,o)}},Lc=()=>Math.random().toString(36).substring(2),qs={},Tp={},Ks=t=>qs[t.__hash],Mc=(t,e)=>{let r=Lc();return w(t)||(t.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(qs[r]=e),e},Fc=(t,e)=>t.__hash?e.concat(Ks(t)):Mc(t,e),Gs=(t,e,r,o=new Set,n,s)=>{for(let i of t)T(i)?Gs(i,e,r,o,n,s):tn(i,e,r,o,n,void 0,s);return e},Nc=(t,e,r,o=new Set,n,s,i)=>{let a=t.extends,c={...t};delete c.extends;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),n&&n.push(s)),a&&tn(a,e,r,o,n,s,i),e},tn=(t,e,r,o=new Set,n,s,i)=>{if(!t||o.has(t))return e;if(T(t))return Gs(t,e,r,o,n,i);let a=s;return w(t)?(a=t,t=Ys(t,r)):i&&S(t)&&i.has(t)&&(a=i.get(t)),o.add(t),t?.extends?Nc(t,e,r,o,n,a,i):t&&(e.push(t),n&&n.push(a)),e},_E=new Set(["parent","node","__ref","__proto__","extends","childExtends","childExtendsRecursive"]),je=(t,e,r,o,n)=>{e=ft(e);for(let s in e){if(_E.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,r&&o?S(a)&&!T(a)?(r[s]=r[s]||{},g_(r[s],a,o)):r[s]=o:r&&n?.[s]&&(r[s]=n[s]);else if(S(i)&&S(a)){let c=r?r[s]=r[s]||{}:void 0,l=n?.[s];Be(s)?t[s]=je(i,a,c,o,l):je(i,a,c,o,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(T(i)&&T(a))t[s]=i.concat(a);else if(T(i)&&S(a)){let c=je({},i);t[s]=je(c,a)}}}}return t},g_=(t,e,r,o)=>{if(o||(o=new WeakSet),!o.has(e)){o.add(e);for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n)||n==="__proto__"||n==="constructor"||n==="prototype")continue;let s=e[n];S(s)&&!T(s)?(t[n]=t[n]||{},g_(t[n],s,r,o)):t[n]=r}}},zs=(t,e,r)=>t.reduce((o,n,s)=>{let i=ft(n),a=r?r[s]:void 0;return je(o,i,e,a)},{}),Ys=(t,e,r={},o)=>{let n=e?.components||r.components,s=e?.pages||r.pages;if(w(t)){let i=n&&(n[t+"."+o]||n[t]||n["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;r.verbose&&(Ep==="test"||Ep==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},Op=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),Hs=(t,e,r,o)=>{if(!t)return[];if(t.__hash)return Ks(t)||[];let s=tn(t,[],e,new Set,r,void 0,o);return r?s:Fc(t,s)},Rp=(t,e)=>{if(!t)return e;let r=T(t)?t:[t];return Ho(r,e)},Pp=t=>{let e=[];function r(o){for(let n in o)Object.prototype.hasOwnProperty.call(o,n)&&(Be(n)&&e.push(n),n==="extends"&&(typeof o[n]=="string"?e.push(o[n]):Array.isArray(o[n])&&(e=e.concat(o[n]))),typeof o[n]=="object"&&o[n]!==null&&r(o[n]))}return r(t),e},jc=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant;if(t.extends)if(Array.isArray(t.extends)&&t.extends.length>0){let[i,...a]=t.extends;if(typeof i=="string"&&s&&n?.components){let c=`${i}.${s}`;n.components[c]?Kt([c,...a],t):Kt(t.extends,t)}else Kt(t.extends,t)}else if(typeof t.extends=="string"&&s&&n?.components){let i=`${t.extends}.${s}`;n.components[i]?Kt(i,t):Kt(t.extends,t)}else Kt(t.extends,t);return Bc(t,e,r),Uc(t,e,r),Vc(t,e,r),t.component&&Kt(ut(t.component,t),t),n.defaultExtends&&Kt(n.defaultExtends,t),Wo(o.__extends)},Bc=(t,e,r={})=>{let{__ref:o}=t;return r.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&Kt(e.childProps.extends,t),o.__extends},Uc=(t,e,r={})=>{let{__ref:o}=t,n=r.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!n&&s&&Kt(s,t),o.__extends},Vc=(t,e,r={})=>{let{__ref:o}=t,n=e.childExtendsRecursive,s=r.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return n&&!i&&!s&&Kt(n,t),o.__extends},zc=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant,i=h_(r),a=i?[...o.__extends]:null,c=Wo(o.__extends.map((l,f)=>Ys(l,n,r,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&&S(h)&&w(g)&&l.set(h,g)}let f=[],u=Hs(c,n,f,l);o.__extendsStack=u,o.__extendsNames=f}else{let l=Hs(c,n);o.__extendsStack=l}return o.__extendsStack},Hc=(t,e,r={})=>{let{__ref:o}=t,{__extendsStack:n}=o;if(h_(r)){let s={},i=o.__extendsNames||[],a=zs(n,s,i),c={};je(t,a,c,void 0,s),o.__sourcemap=c}else{let s=zs(n);je(t,s)}return t},m_=(t,e,r={})=>(jc(t,e,r),zc(t,e,r),Hc(t,e,r),t)});function Dp(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function $p(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function Lp(t,e,r){let{context:o}=e||{},[n]=Qo(r),s=r||n;return o?.components?.[s]||o?.pages?.[s]}var Be,Ip=F(()=>{"use strict";Wc();Ot();Be=t=>{if(!w(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function y_(t,e){let{props:r,on:o}=e,n=ro(t.split("on")[1]),s=o[n],i=r[t];A(s)?o[n]=(...a)=>{if(s(...a)!==!1&&A(i))return i(...a)}:o[n]=i}var b_=F(()=>{"use strict";Ps();Ot()});function qc(t,e={}){let r=e.cachedKeys||[];for(let o in t){let n=t[o];if(o.length>2&&o.charCodeAt(0)===111&&o.charCodeAt(1)===110&&o[2]===o[2].toUpperCase()&&(A(n)||n!=null&&Yo(this.context))){let g=ro(o.slice(2));t.on&&(t.on[g]=n),delete t[o];continue}if(o==="childProps"){t.props[o]=n,delete t[o],r.push(o);continue}let a=this.define?.[o],c=this.context?.define?.[o],l=S(a)||A(a),f=S(c)||A(c);if(l||f)continue;let u=o.charAt(0);if(x_.has(u)){t.props[o]=n,delete t[o],r.push(o);continue}let d=Mp.test(o)||__.test(o)||wE(n),h=br.has(o);!d&&!h&&(o in t.props||(t.props[o]=n),delete t[o],r.push(o))}return t}function Kc(t=this,e){let r=e.cachedKeys||[];for(let o in t.props){let n=t.props[o],s=o.length>2&&o.charCodeAt(0)===111&&o.charCodeAt(1)===110,i=A(n)||n!=null&&Yo(this.context);if(s&&i){y_(o,t),delete t.props[o];continue}if(r.includes(o)||o==="childProps")continue;let a=o.charAt(0);if(x_.has(a))continue;let c=this.define?.[o],l=this.context?.define?.[o],f=S(c)||A(c),u=S(l)||A(l),d=Mp.test(o)||__.test(o),h=br.has(o);(d||h||f||u)&&(t[o]===void 0||n===null)&&(t[o]=n,t.props&&delete t.props[o])}return t}function Gc(t=this){let e=[];return qc.call(this,t,{cachedKeys:e}),Kc.call(this,t,{cachedKeys:e}),t}function Fp(t={}){return t.on||(t.on={}),t.props||(t.props={}),Gc.call(this,t)}function jp(t,e){this.__element.update({props:t},e)}function ti(t){let e={update:jp.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var Mp,__,x_,xE,wE,Zs,Xs,Np,Qs,ei,ri,Yc,Js,Bp,Up,Vp=F(()=>{"use strict";Go();b_();tr();Ot();Ps();Jo();Mp=/^[A-Z]/,__=/^\d+$/,x_=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),xE=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),wE=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(xE.has(e)||Mp.test(e))return!0;return!1},Zs=(t,e,r)=>{let{props:o,__ref:n}=t;if(n.__propsStack=[],o)n.__initialProps=o;else return{};return z(o)?{...o}:(n.__propsStack.push(o),{})};Xs=t=>Wt(t)("string","number")?{inheritedString:t}:t,Np=(t,e)=>!t||!e.length?!1:e.includes(t),Qs=(t,e)=>{let{__ref:r}=t,o=r.__propsStack||[],n=e.props;if(!n)return o;let s=n[t.key],i=n.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=Xs(i);o.unshift(c)}if(s){let c=Xs(s);o.unshift(c)}return o};ei=t=>{let e=new Set;return t.filter(r=>!r||_r.has(r)||e.has(r)?!1:(e.add(r),!0))},ri=(t,e,r)=>(e.props=t.reduce((o,n)=>{if(_r.has(n))return o;for(;A(n);)n=ut(n,e);return st(o,ft(n,{exclude:_r}))},{}),ti(e),e.props),Yc=(t,e)=>{let{props:r,__ref:o}=t,n=o.__propsStack||[];if(e?.props&&(n=[...Qs(t,e)]),S(r)?n.push(r):r==="inherit"&&e?.props?n.push(e.props):r&&n.push(r),T(o.__extendsStack))for(let s=0;s<o.__extendsStack.length;s++){let i=o.__extendsStack[s];i.props&&i.props!==r&&n.push(i.props)}return o.__propsStack=ei(n),o.__propsStack},Js=(t,e)=>{let{__ref:r}=t,o=Yc(t,e);o.length?ri(o,t):(r.__propsStack=[],t.props={})},Bp=function(t,e,r){let{__ref:o}=t;if(o.__if)Js(t,e);else try{Js(t,e)}catch(n){t.context?.designSystem?.verbose&&console.warn("initProps error at",o.path?.join("."),n),t.props={},o.__propsStack=[]}return ti(t),t},Up=(t,e,r)=>{let{__ref:o}=e,s=[...o.__propsStack||[]],i=Qs(e,r);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),o.__propsStack=ei(s),o.__propsStack.length&&ri(o.__propsStack,e),e}});var w_,Xc,Jc,Zc,Qc,zp,tl,el,rl,Hp,S_=F(()=>{"use strict";Wc();Dc();vs();Vp();Cp();Ot();w_="production",Xc=(t,e,r)=>{let o=e.childExtends&&e.childExtends.tag,n=e.childProps&&e.childProps.tag,s=Zo.body.has(r)&&r;return{text:t,tag:o||n||s||"string"}},Jc=(t,e,r)=>{if(t===void 0)return(w_==="test"||w_==="development")&&console.warn(r,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:Wt(t)("string","number")?Xc(t,e,r):A(t)?{props:t}:t},Zc=(t,e)=>{let r={};return r.origin=t,r.parent=e,r},Qc=(t,e,r,o,n)=>{if(!e)return n;if(Qe(e)){let s={key:":root",node:e};return n[`${r}_parent`]=s,s}return e},zp=(t,e)=>{let{__ref:r}=t,{__ref:o}=e,n=e&&e.key===":root";r?.root||(r.root=n?t:o?.root)},tl=(t,e,r)=>{let{__ref:o}=e;return o||(o=e.ref={}),o.path||(o.path=[]),o.path.concat(r)},el=(t,e,r,o,n)=>(o.context&&!n.context&&!t.context&&(n.context=o.context),o.context||e.context||n.context||t.context),rl=(t,e,r)=>{let o=Zc(t,e);return t.__ref=o,o.__defineCache||(o.__defineCache={}),o.__exec||(o.__exec={}),o.__execProps||(o.__execProps={}),o.__class||(o.__class={}),o.__classNames||(o.__classNames={}),o.__attr||(o.__attr={}),o.__changes||(o.__changes=[]),o.__children||(o.__children=[]),o.__extends=Ws(t,e,r),o.path=tl(t,e,r),o},Hp=(t,e,r,o,n)=>{let i=t?.__hash?{extends:[t]}:Jc(t,e,r);if(!i)return;let a=Qc(i,e,r,o,n),c=Us(i,a,r);rl(i,a,c);let l=Zs(i,a,c),f=el(i,a,c,o,n),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var Wp,ol,nl,sl,il,qp,al,Kp,Gp,Yp,Xp,k_,oi,er,Ue,v_=F(()=>{"use strict";qo();Go();tr();Ot();Wp=t=>{let{state:e,props:r,__ref:o}=t,n=r?.state||e;return Wt(n)("string","number")?(o.__state=n,{value:n}):n===!0?(o.__state=t.key,{}):n?(o.__hasRootState=!0,n):!1},ol=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},nl=(t,e)=>{if(!t.includes("../"))return;let o=t.split("../").length-1;for(let n=0;n<o;n++){if(!e.parent)return null;e=e.parent}return e},sl=(t,e,r={})=>{let o=w(t)?t.split("/"):[t],n=o.length-1;for(let s=0;s<n;s++){let i=o[s],a=o[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 r.returnParent?e:e[t]},il=(t,e,r={})=>{let n=t.__ref.__state;if(!al(t))return;let s=ol(n,e.state),i=e.state;if(s)i=s,n=n.replaceAll("~/","");else{let a=nl(n,e.state);a&&(i=a,n=n.replaceAll("../",""))}if(i)return sl(n,i,r)},qp=(t,e)=>{let r=t.__ref,o=il(t,e);if(o===void 0)return t.state;if(Wt(o)("object","array"))return ft(o);if(Wt(o)("string","number","boolean"))return r.__stateType=typeof o,{value:o};console.warn(r.__state,"is not present. Replacing with",{})},al=t=>{let{__ref:e}=t,r=e?.__state;return!!(r&&Wt(r)("number","string","boolean"))},Kp=function(t){return z(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},Gp=(t,e)=>{if(!t)return e||{};let r=t.split("/"),o={},n=o,s=r.length-1;for(let i=0;i<=s;i++)n[r[i]]=i===s?e||{}:{},n=n[r[i]];return o},Yp=(t,e)=>{let{__element:r}=e,o=r?.state;if(!o)return;let n=ft(o,oo),s={[t.key]:n},i=S(o.__depends)?{...o.__depends,...s}:s;return Array.isArray(o)?Ts(o,{...Object.getPrototypeOf(o),__depends:i}):Object.setPrototypeOf(o,{...Object.getPrototypeOf(o),__depends:i}),n},Xp=(t,e,r={})=>{let{overwrite:o}=r;if(!o)return;let n=o==="shallow";if(o==="merge"){st(t,e,oo);return}(n?so:qt)(t,e,oo)},k_="__polyglotSeededKeys",oi=t=>{if(!S(t))return new Set;let e=t[k_];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,k_,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},er=(t,e,r)=>oi(t).has(e)?!0:!S(r)||r[e]===void 0,Ue=(t,e)=>(oi(t).add(e),e)});var SE,Jp,C_=F(()=>{"use strict";SE=(t,e)=>{let r=e;for(;r;){if(r===t)return!0;r=Object.getPrototypeOf(r)}return!1},Jp=(t,e)=>{let{__ref:r}=t,o=t.context||e.context||r.root?.context;o&&!o.globalScope&&(o.globalScope={});let n=e.scope||r.root?.scope,s=o?.globalScope;if(!t.scope)n?t.scope=n: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=n||s;i&&!SE(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var E_,cl,Sr,ll,Zp,Qp=F(()=>{"use strict";Ot();Jo();E_=(t,e)=>{let r="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[r]},cl=(t,e,r,o,n)=>{if(t=Xo(t,e),!!A(t))try{let s=t.call(e,e,r||e.state,o||e.context,n);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}},Sr=(t,e,r)=>{if(!e)throw new Error("Element is required");At(t,e,r);let o=E_(t,e);if(o){let{state:n,context:s}=e;return cl(o,e,n,s,r)}},ll=(t,e,r,o,n,s)=>{if(t=Xo(t,r),!!A(t))try{let i=t.call(r,e,r,o||r.state,n||r.context,s);return i&&typeof i.then=="function"&&i.catch(a=>{r.error=a,console.error("[DOMQL] Async event update error:",a)}),i}catch(i){if(r.error=i,console.error("[DOMQL] Event update error:",i),r.context?.strictMode)throw i}},Zp=(t,e,r,o)=>{At(t,r,e,o);let n=E_(t,r);if(n){let{state:s,context:i}=r;return ll(n,e,r,s,i,o)}}});var th,ni,eh=F(()=>{"use strict";th={},ni={}});var T_={};P(T_,{restAdapter:()=>A_,setup:()=>vE});var kE,rr,vE,A_,O_=F(()=>{"use strict";kE=(t,e,r)=>{let o=e&&!e.startsWith("/")?"/":"",n=new URL(`${t}${o}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&n.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return n.toString()},rr=async(t,e)=>{let r=await globalThis.fetch(t,e),o=r.headers.get("content-type"),n=o&&o.includes("json")?await r.json():await r.text();return{data:n,error:r.ok?null:n?.message||n?.error||r.statusText,status:r.status}},vE=async({url:t,headers:e,auth:r,fetchOptions:o})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return A_(t,e,r,o)},A_=(t,e={},r,o={})=>{let n=r?.token||null,s=f=>{let u={...e,...f};return n&&(u.Authorization=`Bearer ${n}`),u},i=f=>({...s(f),"Content-Type":"application/json"}),a=f=>({...o,...f}),c=(f,u)=>{let d=u||t;if(f&&(f.startsWith("http://")||f.startsWith("https://")))return f;let h=f&&!f.startsWith("/")?"/":"";return`${d}${h}${f||""}`};return{name:"rest",setToken:f=>{n=f},getSession:async()=>{if(!r?.sessionUrl)return n?{token:n}:null;let f=await rr(c(r.sessionUrl,r.baseUrl),a({headers:s()}));return f.error?null:f.data},signIn:async f=>{if(!r?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let u=await rr(c(r.signInUrl,r.baseUrl),a({method:"POST",headers:i(),body:JSON.stringify(f)}));return u.data?.token&&(n=u.data.token),u},signOut:async()=>(r?.signOutUrl&&await rr(c(r.signOutUrl,r.baseUrl),a({method:"POST",headers:s()})),n=null,{error:null}),select:({from:f,params:u,select:d,limit:h,offset:g,order:p,single:m,headers:_,baseUrl:b})=>{let y={...u};return d&&(y.select=d),h&&(y.limit=h),g&&(y.offset=g),m&&(y.single=!0),p&&(typeof p=="string"?y.order=p:Array.isArray(p)?y.order=p.map(x=>`${x.by}:${x.asc===!1?"desc":"asc"}`).join(","):p.by&&(y.order=`${p.by}:${p.asc===!1?"desc":"asc"}`)),rr(kE(b||t,f||"",y),a({headers:s(_)}))},rpc:({from:f,params:u,headers:d,baseUrl:h})=>rr(c(`rpc/${f}`,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:d,baseUrl:h})=>rr(c(f,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),update:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,_=m?`${f}/${m}`:f;return rr(c(_,p),a({method:h||"PATCH",headers:i(g),body:JSON.stringify(u)}))},upsert:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,_=m?`${f}/${m}`:f;return rr(c(_,p),a({method:h||"PUT",headers:i(g),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:d,baseUrl:h})=>{let g=u?.id,p=g?`${f}/${g}`:f;return rr(c(p,h),a({method:"DELETE",headers:s(d)}))}}}});var P_={};P(P_,{localAdapter:()=>R_,setup:()=>EE});var fl,CE,EE,R_,I_=F(()=>{"use strict";fl=(t,e)=>{if(!e)return!0;for(let r in e){let o=e[r];if(o===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(o)){if(!o.includes(t[r]))return!1}else if(typeof o=="object"){for(let n in o)if(n==="gt"&&!(t[r]>o[n])||n==="gte"&&!(t[r]>=o[n])||n==="lt"&&!(t[r]<o[n])||n==="lte"&&!(t[r]<=o[n])||n==="neq"&&t[r]===o[n]||n==="like"&&!String(t[r]).includes(o[n]))return!1}else if(t[r]!==o)return!1}return!0},CE=(t,{order:e,limit:r,offset:o,single:n})=>{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 o&&(s=s.slice(o)),r&&(s=s.slice(0,r)),n?{data:s[0]||null,error:null}:{data:s,error:null}},EE=async({data:t,...e})=>R_(t,e),R_=(t={},e={})=>{let r={},o={},n=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(n)try{let u=localStorage.getItem(s+f);r[f]=u?JSON.parse(u):t[f]||[]}catch{r[f]=t[f]||[]}else r[f]=t[f]||[];return r[f]},a=f=>{if(n)try{localStorage.setItem(s+f,JSON.stringify(r[f]))}catch{}},c=(f,u,d,h)=>{let g=o[f];if(g)for(let p of g)p(d,h,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...d})=>{let g=i(f).filter(p=>fl(p,u));return CE(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(fl(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 _=d||(m.id!==void 0?{id:m.id}:null),b=_?h.findIndex(y=>fl(y,_)):-1;if(b>-1){let y={...h[b]};Object.assign(h[b],m),p.push(h[b]),c(f,"UPDATE",h[b],y)}else{let y={id:m.id||++l,...m};h.push(y),p.push(y),c(f,"INSERT",y,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--)fl(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)=>{o[f]||(o[f]=[]);let h=(g,p,m)=>{u&&u!=="*"&&u!==m.event||d(g,p,m)};return o[f].push(h),()=>{let g=o[f].indexOf(h);g>-1&&o[f].splice(g,1)}}}}});var co={};P(co,{createAdapter:()=>IE,default:()=>VE,executeFetch:()=>di,fetchPlugin:()=>ah,initAdapterAuth:()=>gl,parseDuration:()=>ai,queryClient:()=>UE,registerAdapter:()=>PE,resolveDb:()=>M_});var AE,TE,ul,ii,dl,nh,OE,RE,PE,IE,M_,ai,Nt,F_,si,DE,ui,ci,li,pl,sh,hl,$E,D_,rh,N_,j_,en,$_,LE,L_,ME,ml,B_,U_,gl,ih,ue,Ce,fi,ao,Ve,kr,FE,NE,jE,oh,BE,di,UE,ah,VE,vr=F(()=>{"use strict";R();AE=["select","rpc","insert","update","upsert","delete","subscribe"],TE={rest:()=>Promise.resolve().then(()=>(O_(),T_)),local:()=>Promise.resolve().then(()=>(I_(),P_))},ul=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),ii=(()=>{if(typeof globalThis<"u"&&globalThis[ul])return globalThis[ul];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,ul,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[ul]}catch{}return t})(),dl=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),nh=(()=>{if(typeof globalThis<"u"&&globalThis[dl])return globalThis[dl];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,dl,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[dl]}catch{}return t})(),OE=5e3,RE=t=>new Promise(e=>{if(ii[t])return e(ii[t]);let r=nh[t]||=[],o=!1,n=()=>{o||(o=!0,e(ii[t]||null))};r.push(n),setTimeout(n,OE)}),PE=(t,e)=>{ii[t]=e;let r=nh[t];if(r&&r.length){nh[t]=[];for(let o of r)o()}},IE=t=>{let e={};for(let r of AE)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},M_=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,o=typeof e=="string"?e:typeof t=="string"?t:null;if(!o)return null;let n=ii[o]||TE[o];if(!n&&(n=await RE(o),!n))throw new Error(`Unknown db adapter: "${o}". Use registerAdapter() for adapters with optional deps.`);let s=await n();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${o}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(r)},ai=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 r=parseInt(e[1]),o=e[2];return o==="ms"?r:o==="s"?r*1e3:o==="m"?r*6e4:o==="h"?r*36e5:0},Nt=new Map,F_=new Map,si=new Map,DE=(t,e,r)=>{if(t.cache?.key)return t.cache.key;let o=ME(t.params),n=r?`${r}:`:"",s=`${t.from}:${t.method}:${n}${JSON.stringify(o||"")}`;return e?`${s}:${e}`:s},ui=t=>Nt.get(t)||null,ci=(t,e,r)=>{let o=Nt.get(t),n={data:e,error:r,time:Date.now(),stale:!1};Nt.set(t,n);let s=F_.get(t);if(s)for(let i of s)A(i)&&i(n);return n},li=t=>{if(t){let e=Nt.get(t);e&&(e.stale=!0);return}for(let[,e]of Nt)e.stale=!0},pl=t=>{if(t){Nt.delete(t);return}Nt.clear()},sh=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)}:w(t)?{staleTime:ai(t),gcTime:3e5}:{staleTime:ai(t.stale||t.staleTime)||6e4,gcTime:ai(t.gc||t.gcTime||t.expire)||3e5,key:t.key},hl=null,$E=()=>{hl||(hl=setInterval(()=>{let t=Date.now();for(let[e,r]of Nt){let o=F_.get(e);!(o&&o.size>0)&&t-r.time>(r.gcTime||3e5)&&Nt.delete(e)}},3e4),hl.unref&&hl.unref())};$E();D_=3,rh=t=>Math.min(1e3*2**t,3e4),N_=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:D_,delay:rh}:typeof e=="number"?{count:e,delay:rh}:{count:e.count??D_,delay:A(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:rh}},j_=async(t,e)=>{let{count:r,delay:o}=e,n;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(n=i.error,s<r){let a=A(o)?o(s,n):o;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(n=i,s<r){let a=A(o)?o(s,i):o;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:n}},en={focus:new Set,online:new Set},$_=!1,LE=()=>{if($_||typeof window>"u")return;$_=!0;let t=()=>{for(let r of en.focus)r()},e=()=>{for(let r of en.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},L_=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(w(t))return{from:t,method:"select",query:!0,on:"create"};if(S(t)){let o={...t};return o.from=o.from||r.__state||e.key,o.method=o.method||"select",o.on=o.on||"create",o.query===void 0&&(o.query=!0),o}return null},ME=t=>(!t||A(t),t),ml=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},B_=(t,e)=>{let o=(t?.state?.root||e?.state?.root)?.__fetchScope;return o?String(o):void 0},U_=(t,e,r)=>{let o;if(!t)o=void 0;else if(A(t))o=t(e,e.state);else{o={};for(let n in t){let s=t[n];o[n]=A(s)?s(e,e.state):s}}return o},gl=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(o,n)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:o,session:n,loading:!1}})};try{let o=await t.getSession();r(o?.user||null,o)}catch(o){console.warn("[fetch] Failed to restore auth session:",o.message)}t.onAuthStateChange&&t.onAuthStateChange((o,n)=>{r(n?.user||null,n)})},ih=async(t,e)=>{if(A(t.select))return t.auth!==!1&&await gl(t,e),t;if(t.__resolved)return t.auth!==!1&&await gl(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=M_(t);let r=await t.__resolving;return delete t.__resolving,r?(r.auth=t.auth,r.url=t.url,r.key=t.key,t.__resolved=r,e.fetch=r,t.auth!==!1&&await gl(r,e),r):null},ue=(t,e,...r)=>{let o=A(t[e])?t[e]:null;o&&o.call(t,...r,t,t.state,t.context)},Ce=(t,e,r,...o)=>{let n=t&&A(t[r])?t[r]:null;n&&n.call(e,...o,e,e.state,e.context)},fi=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let n=new FormData(r);for(let[s,i]of n.entries())e[s]=i;return e}let o=r.querySelectorAll("input, textarea, select");for(let n=0;n<o.length;n++){let s=o[n],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},ao=(t,e,r,o={})=>{let n=r&&r.startsWith("~/"),s=n&&t.state?.root||t.state;if(s?.update)if(n){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&i in e?s.update(e,{preventFetch:!0,...o}):s.update({[i]:e},{preventFetch:!0,...o})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...o})}},Ve=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},kr=async(t,e,r,o={})=>{let n=r?.fetch;if(!n||!e||!e.__ref||t.enabled===!1||A(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||A(t.skip)&&t.skip(e,e.state))return;let s=await ih(n,r);if(!s||!e.__ref)return;let i=e.__ref,{from:a,method:c,query:l,params:f,cache:u,transform:d,single:h,auth:g,fields:p,as:m,limit:_,offset:b,order:y,headers:x,baseUrl:k,page:E,cursor:O,getNextPageParam:$,getPreviousPageParam:D,infinite:I,placeholderData:H,initialData:V,select:rt,keepPreviousData:at}=t,G=w(rt)?rt:void 0;if(l&&A(e.getQuery)){let nt=e.getQuery(s.name||"paths");nt&&(G=nt.select||nt.length&&nt.join(",")||G)}let K=U_(f,e,r),lt=sh(u),Vt=N_(t),W=ml(e,r),wt=B_(e,r),L=W?`:${W}`:"",ot=wt?`${wt}:`:"",U=lt?u?.key||`${a}:${c}:${ot}${JSON.stringify(K||"")}${I?":infinite":""}${E?":p"+JSON.stringify(E):""}${L}`:null;if(!i.__fetchInitialized&&U&&(i.__fetchInitialized=!0,V!==void 0)){let nt=A(V)?V():V;ci(U,nt,null)}if((c==="select"||c==="rpc")&&U&&lt){let nt=ui(U);if(nt&&!nt.error){let M=Date.now()-nt.time,ht=nt.stale||M>(lt.staleTime||0),q=nt.data;if(A(rt)&&(q=rt(q,e,e.state)),d&&(q=d(q,e,e.state)),ao(e,q,m),!ht){Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(H!==void 0){let M=A(H)?H(e,e.state):H;M!==void 0&&ao(e,M,m)}}if(U&&si.has(U)&&!o.force){let nt=si.get(U);try{let M=await Promise.race([nt,new Promise((ht,q)=>setTimeout(()=>q("DEDUP_TIMEOUT"),15e3))]);if(M?.data!==void 0){let ht=M.data;A(rt)&&(ht=rt(ht,e,e.state)),d&&(ht=d(ht,e,e.state)),ao(e,ht,m),ue(e,"onFetchComplete",ht),Ce(t,e,"onFetchComplete",ht)}}catch{}return}let Y=!ui(U)?.data;Ve(e,{isFetching:!0,isLoading:Y,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),ue(e,"onFetchStart"),Ce(t,e,"onFetchStart");let j=r?.analyze?.emitNetwork,pt=j?typeof performance<"u"?performance.now():Date.now():0;j&&j({phase:"start",mode:"query",from:a,method:c,cacheKey:U,lang:W});let Ye=j_(async()=>{if(g!==!1&&s.auth!==!1&&s.getSession){let q=await s.getSession();if(g===!0&&!q){let Mt={message:"Not authenticated"};return Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Mt,status:"error",fetchStatus:"idle"}),ue(e,"onFetchError",Mt),Ce(t,e,"onFetchError",Mt),{data:null,error:Mt}}}let nt=s[c];if(!A(nt))return{data:null,error:{message:`Method "${c}" not found on adapter`}};let M={from:a,select:G,params:K,single:h,limit:_,offset:b,order:y,headers:x,baseUrl:k},ht=ml(e,r);if(ht&&(M.headers={...M.headers,"Accept-Language":ht}),E!==void 0){if(S(E))E.offset!==void 0&&(M.offset=E.offset),E.limit!==void 0&&(M.limit=E.limit),E.cursor!==void 0&&(M.params={...M.params,cursor:E.cursor});else if(typeof E=="number"){let q=t.pageSize||_||20;M.offset=(E-1)*q,M.limit=q}}if(O!==void 0&&(M.params={...M.params,cursor:O}),c==="insert"||c==="update"||c==="upsert"){let q;if(p===!0||t.on==="submit")q=fi(e);else if(T(p)){let Mt=fi(e);q={};for(let Qu of p)q[Qu]=Mt[Qu]}else e.state?.parse?q=e.state.parse():S(e.state)&&(q={...e.state});d&&(q=d(q,e,e.state)),M.data=q}if(c==="rpc"){let q=K;if(t.on==="submit"){let Mt=fi(e);q=t.transformParams?t.transformParams(Mt,e,e.state):Mt}M.params=q}if(c==="subscribe"){let q=s.subscribe({from:a,params:K,on:t.subscribeOn},(Mt,Qu,iI)=>{ao(e,Mt,m),ue(e,"onFetchComplete",Mt),Ce(t,e,"onFetchComplete",Mt)});return i.__unsubscribe=q,{data:null,error:null,subscribed:!0}}return nt(M)},Vt);U&&si.set(U,Ye);try{let nt=await Ye;if(nt?.subscribed)return;let{data:M,error:ht}=nt||{};if(ht){U&&ci(U,null,ht),Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:ht,status:"error",fetchStatus:"idle"}),ue(e,"onFetchError",ht),Ce(t,e,"onFetchError",ht),j&&j({phase:"error",mode:"query",from:a,method:c,cacheKey:U,error:ht.message||ht,durationMs:(typeof performance<"u"?performance.now():Date.now())-pt});return}if(M!==void 0){if((c==="select"||c==="rpc")&&U){let Mt=ci(U,M,null);Mt.gcTime=lt?.gcTime||3e5}let q=M;I&&T(M)&&(i.__pages||(i.__pages=[]),o.direction==="previous"?i.__pages.unshift(M):i.__pages.push(M),q=i.__pages.flat(),$&&(i.__nextPageParam=$(M,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),D&&(i.__prevPageParam=D(M,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),A(rt)&&(q=rt(q,e,e.state)),d&&(q=d(q,e,e.state)),(!at||q!==void 0)&&ao(e,q,m),Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),ue(e,"onFetchComplete",q),Ce(t,e,"onFetchComplete",q),j&&j({phase:"success",mode:"query",ok:!0,from:a,method:c,cacheKey:U,durationMs:(typeof performance<"u"?performance.now():Date.now())-pt})}}catch(nt){Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:nt,status:"error",fetchStatus:"idle"}),ue(e,"onFetchError",nt),Ce(t,e,"onFetchError",nt),j&&j({phase:"error",mode:"query",from:a,method:c,cacheKey:U,error:nt.message||String(nt),durationMs:(typeof performance<"u"?performance.now():Date.now())-pt})}finally{U&&si.delete(U)}},FE=(t,e,r)=>{let o=t.on,n=e.__ref;n.__fetchListeners||(n.__fetchListeners=[]);let s=t.__runner||kr;if(o==="submit"){let i=c=>{c.preventDefault(),s(t,e,r)},a=e.node;a&&(a.addEventListener("submit",i),n.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(o==="click"){let i=()=>s(t,e,r),a=e.node;a&&(a.addEventListener("click",i),n.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else o==="stateChange"&&(n.__fetchOnStateChange=()=>s(t,e,r))},NE=(t,e,r)=>{let o=e.__ref;o.__fetchCleanups||(o.__fetchCleanups=[]),LE();let n=t.refetchInterval;if(n){let s=typeof n=="number"?n:ai(n);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&kr(t,e,r,{force:!0})},s);o.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=ml(e,r),a=B_(e,r),c=DE(t,i,a),l=ui(c),f=sh(t.cache);(!l||l.stale||Date.now()-l.time>(f?.staleTime||0))&&kr(t,e,r,{force:!0})};en.focus.add(s),o.__fetchCleanups.push(()=>en.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>kr(t,e,r,{force:!0});en.online.add(s),o.__fetchCleanups.push(()=>en.online.delete(s))}},jE=(t,e,r)=>{if(!e.optimistic)return null;let o=t.__ref,n=e.as,s=t.state?.parse?t.state.parse():S(t.state)?{...t.state}:t.state;o.__optimisticSnapshot=s;let i=A(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&ao(t,i,n),s},oh=(t,e)=>{let r=t.__ref,o=r.__optimisticSnapshot;o!==void 0&&(ao(t,o,e.as),delete r.__optimisticSnapshot)},BE=async(t,e,r)=>{let o=r?.fetch;if(!o)return;let n=await ih(o,r);if(!n)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:h,baseUrl:g,invalidates:p,optimistic:m,onMutate:_,onSuccess:b,onError:y,onSettled:x}=t,k;if(c===!0||u==="submit")k=fi(e);else if(T(c)){let D=fi(e);k={};for(let I of c)k[I]=D[I]}else e.state?.parse?k=e.state.parse():S(e.state)&&(k={...e.state});l&&(k=l(k,e,e.state)),A(_)&&_(k,e,e.state);let E=m?jE(e,t,k):null;s.__fetching=!0,Ve(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),ue(e,"onFetchStart"),Ce(t,e,"onFetchStart");let O=r?.analyze?.emitNetwork,$=O?typeof performance<"u"?performance.now():Date.now():0;O&&O({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&n.auth!==!1&&n.getSession){let K=await n.getSession();if(d===!0&&!K){E!==void 0&&oh(e,t);let lt={message:"Not authenticated"};ue(e,"onFetchError",lt),Ce(t,e,"onFetchError",lt);return}}let D=n[i];if(!A(D))return;let I={from:a,data:k,headers:h,baseUrl:g};t.params&&(I.params=U_(t.params,e,r));let H=ml(e,r);H&&(I.headers={...I.headers,"Accept-Language":H});let V=N_(t),rt=await j_(()=>D(I),V),{data:at,error:G}=rt||{};if(G){E!==void 0&&oh(e,t),Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:G,status:"error",fetchStatus:"idle"}),ue(e,"onFetchError",G),A(y)&&y(G,k,e),A(x)&&x(null,G,k,e),O&&O({phase:"error",mode:"mutation",from:a,method:i,error:G.message||String(G),durationMs:(typeof performance<"u"?performance.now():Date.now())-$});return}if(delete s.__optimisticSnapshot,at!==void 0){let K=f?{[f]:at}:at;e.state?.update&&e.state.update(K,{preventFetch:!0})}if(Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),ue(e,"onFetchComplete",at),Ce(t,e,"onFetchComplete",at),A(b)&&b(at,k,e),A(x)&&x(at,null,k,e),O&&O({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-$}),p){let K=T(p)?p:[p];for(let lt of K)if(lt===!0||lt==="*")for(let[Vt]of Nt)Vt.startsWith(a+":")&&li(Vt);else li(lt)}}catch(D){E!==void 0&&oh(e,t),Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:D,status:"error",fetchStatus:"idle"}),ue(e,"onFetchError",D),Ce(t,e,"onFetchError",D),A(y)&&y(D,k,e),A(x)&&x(null,D,k,e),O&&O({phase:"error",mode:"mutation",from:a,method:i,error:D.message||String(D),durationMs:(typeof performance<"u"?performance.now():Date.now())-$})}finally{s.__fetching=!1}},di=(t,e,r,o)=>{if(!t||!o?.fetch)return;let s=ut(t,e);if(!s)return;let i=T(s)?s.map(c=>L_(ut(c,e),e)).filter(Boolean):[L_(s,e)].filter(Boolean);for(let c of i){let l=c.method==="insert"||c.method==="update"||c.method==="upsert"||c.method==="delete",f=l?BE:kr;c.on==="create"?f(c,e,o):Promise.resolve().then(()=>{FE({...c,__runner:f},e,o)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&NE(c,e,o)}let a=e.__ref;a.refetch=c=>{for(let l of i)kr(l,e,o,{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};kr(f,e,o,{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};kr(f,e,o,{direction:"previous",force:!0})}},UE={invalidateQueries:t=>{if(!t){li();return}if(w(t))for(let[e]of Nt)(e.startsWith(t)||e.includes(t))&&li(e);else if(T(t)){let e=t.join(":");for(let[r]of Nt)r.includes(e)&&li(r)}},removeQueries:t=>{if(!t){pl();return}if(w(t))for(let[e]of Nt)(e.startsWith(t)||e.includes(t))&&pl(e)},getQueryData:t=>ui(t)?.data??void 0,setQueryData:(t,e)=>{let r=ui(t),o=A(e)?e(r?.data):e;ci(t,o,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let o=await ih(r,e);if(!o)return;let n=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=o[t.method||"select"];if(!A(s))return;let i=await s({from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single});if(i?.data!==void 0&&!i?.error){let a=ci(n,i.data,null);a.gcTime=sh(t.cache)?.gcTime||3e5}return i},getCache:()=>Nt,clear:()=>pl(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of Nt)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||pl(r))}},ah={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||si.clear(),di(e,t,t.state,t.context))}},VE=di});function hi(t){let e=this,{__ref:r}=e,o=[].concat(t),n=r.root[o[0]];if(!o||!o.length)return console.log(o,"on",e.key,"is undefined");for(;n.key===o[0]&&(o.shift(),!!o.length);)if(n=n[o[0]],!n)return;return n}function lh(t){let e=this,{parent:r}=e;if(A(t))return r.state&&t(r,r.state,r.context)?r:r.parent?r.lookup(t):void 0;if(e[t])return e[t];for(;r.param!==t;){if(r[t])return r[t];if(r=r.parent,!r)return}return r}function fh(t){let e=this,{__ref:r}=e,o=r?.__children;if(o)for(let n=0;n<o.length;n++){let s=o[n],i=e[s];if(s===t)return i;if(A(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 uh(t,e=[]){let r=this,{__ref:o}=r,n=o?.__children;if(n){for(let s=0;s<n.length;s++){let i=n[s],a=r[i];if(i===t)e.push(a);else if(A(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 yl(t={}){let e=this;if(e.node?.style){for(let r in t){let o=t[r],n=e[r];if(S(o)&&n)yl.call(n,o);else if(o!=null){let s=r.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(o).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function z_(t){let e=this;if(Sr("beforeRemove",e,t)===!1)return e;A(e.node.remove)?e.node.remove():xr()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=As(e.parent.__ref.__children,e.key)),Sr("remove",e,t)}function dh(t){return this[t]}function ph(t,e){let r=this;if(t)return r.update(t,e),r}function hh(t){return t?this.__ref&&this.__ref[t]:this.__ref}function gi(){return this.getRef("__children").map(e=>this[e])}function mi(){return this.getRef().path}function bi(t){let e=null,r=o=>o.__element&&o.root?.isRootState;if(!this)e=V_();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let o=this.state&&r(this.state),n=A(this.state)&&this.parent.state&&r(this.parent.state);(o||n)&&(e=this.state.root||this.parent.state.root)}return e||(e=V_()),t?e?.[t]:e}function _i(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function xi(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function wi(t){let e=this.getRoot()?.context;return t?e[t]:e}function Si(t){let e=this.context;return t?e[t]:e}function bl(){let t=this,e=[];for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||br.has(r)&&!Is.has(r)||e.push(r);return e}function _l(t=[]){let e=this,r={},o=bl.call(e),n=o.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<o.length;i++){let a=o[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||n&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=A(c&&c.parse)?c.parse():c;r[a]=A(l)?l:JSON.parse(JSON.stringify(l||{}))}else if(a==="scope"){if(e.__ref&&!e.__ref.__hasRootScope)continue;r[a]=JSON.parse(JSON.stringify(c||{}))}else if(a==="props"){let{__element:l,update:f,...u}=e[a];r[a]=u}else bt(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=c)}return r}function pi(t=[],e=new WeakSet){let r=this;if(e.has(r))return;e.add(r);let o=_l.call(r,t),n=t.length?new Set(t):null;for(let s in o){if(n&&n.has(s)||!Object.prototype.hasOwnProperty.call(r,s))continue;let i=o[s];Array.isArray(i)?o[s]=i.map(a=>z(a)?pi.call(a,t,e):a):z(i)&&(o[s]=pi.call(i,t,e))}return o}function rn(...t){if(Cr!=="test"&&Cr!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(o=>console.log(`%c${o}:
21
- `,"font-weight: bold",e[o])):(console.log(r.path),e.keys().forEach(n=>console.log(`%c${n}:`,"font-weight: bold",e[n]))),console.log(e),console.groupEnd(e.key),e}function mh(...t){(Cr==="test"||Cr==="development")&&console.log(...t)}function ki(...t){(Cr==="test"||Cr==="development")&&console.warn(...t)}function lo(...t){if(Cr==="test"||Cr==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&rn.call(this),new Error(...t)}}function vi(){let t=this,{key:e,parent:r}=t,{__children:o}=r.__ref,n=o.indexOf(e),s=o[n+1];return r[s]}function Ci(t){let e=t||this,{key:r,parent:o}=e,{__children:n}=o.__ref;if(!n)return;let s=n.indexOf(r);return o[n[s-1]]}function Ei(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let r=e.data.varCaches,o={},n;for(let s in t)t[s]!==r[s]&&(n=!0,o[s]=t[s]);return{changed:s=>{if(!n)return;let i=s(o,ft(r));for(let a in o)r[a]=o[a];return i},timeout:(s,i)=>{if(!n)return;let a=setTimeout(()=>{s(o),clearTimeout(a)},i)}}}function yh(t,...e){let r=this.context,o=r.utils?.[t]||r.functions?.[t]||r.methods?.[t]||r.snippets?.[t];if(o)try{let n=o.call(this,...e);return n&&typeof n.then=="function"&&n.catch(s=>{lo.call(this,s)}),n}catch(n){if(lo.call(this,n),r?.strictMode)throw n}}async function Ai(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(vr(),co));await n(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(vr(),co));await n(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(vr(),co)).then(({resolveDb:n})=>n(e));e.__resolving=r;let o=await r;if(e.__resolved=o,t.context.fetch=o,delete e.__resolving,o?.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(vr(),co));await n(o,t.context)}return o}function Ti(t){let e=this,r=t||ni.useStateQuery||e.context?.useStateQuery;if(!r)return null;let o={};if(ch(e,o),r===!0)return o;let n=YE[r];return n?n(o):o}function bh(t,e){return!!(Ko.has(t)||e?.context?.methods?.[t])}var Cr,H_,yi,V_,gh,ch,zE,W_,HE,WE,qE,KE,GE,YE,q_=F(()=>{"use strict";Qp();Go();Ot();tr();fp();qo();eh();Cr="production";H_=null,yi=t=>{H_=t||null},V_=()=>H_||null;gh=(t,e,r,o)=>Object.defineProperty(t,e,{get:r,set:o});ch=(t,e)=>{let r=t.__ref;if(!r)return;let o=r.__state;o&&typeof o=="string"&&zE(e,o);let n=r.__children;if(n)for(let a=0;a<n.length;a++){let c=t[n[a]];c&&c.__ref&&ch(c,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&ch(i,e)},zE=(t,e)=>{let o=e.replaceAll("../","").replaceAll("~/","").split("/"),n=t;for(let s=0;s<o.length;s++){let i=o[s];s===o.length-1?n[i]||(n[i]=!0):(n[i]===!0&&(n[i]={}),n[i]||(n[i]={}),n=n[i])}},W_=(t,e=0)=>{let r=" ".repeat(e),o=Object.entries(t);return o.length?o.map(([s,i])=>i===!0?`${r}${s}`:`${r}${s} {
22
- ${W_(i,e+1)}
20
+ return (${c}); })`)(e)}catch{try{e[a]=v.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of r)if(!o(i))try{e[i]=v.eval(`(${a})`)}catch{e[i]=a}return e},tp=(t,e={verbose:!0})=>{try{return t?v.eval("("+t+")"):{}}catch(r){e.verbose&&console.warn(r)}},ep=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),Nc=t=>{for(let e in t)return!1;return!0},rp=t=>S(t)&&Nc(t),op=()=>Object.create(null),qs=(t,e,r={})=>{let o=r.exclude||[],n=r.preventUnderscore;for(let s in e)o.includes(s)||!n&&ao(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},co=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)ao(n)||n==="constructor"||n==="prototype"||(o?r.has(n):r.includes(n))||(t[n]=e[n]);return t},qt=(t,e,r={},o=new WeakMap)=>{if(!H(t)||!H(e)||Ht(t)||Ht(e))return e;if(o.has(t))return o.get(t);o.set(t,t);let n=r.exclude,s=n?n instanceof Set?n:new Set(n):null,i=!r.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&ao(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];Ht(l)?t[a]=l:H(c)&&H(l)?t[a]=qt(c,l,r,o):l!==void 0&&(t[a]=l)}return t},jc=(t,e,r=new Set)=>{if(typeof t!="object"||typeof e!="object"||t===null||e===null)return t===e;if(r.has(t)||r.has(e))return!0;r.add(t),r.add(e);let o=Object.keys(t),n=Object.keys(e);if(o.length!==n.length)return!1;for(let s=0;s<o.length;s++){let i=o[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!jc(t[i],e[i],r))return!1}return!0},TE=new Set(["node","__ref"]),np=(t,e,r=TE)=>{if(t===e)return!0;if(!H(t)||!H(e)||Ht(t)||Ht(e))return t===e;let o=r instanceof Set?r:new Set(r),n=new WeakSet;function s(i,a){if(n.has(a))return!0;n.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||o.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(Ht(l)||Ht(f)){if(l!==f)return!1}else if(H(l)&&H(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},sp=(t,e)=>{if(e==null)return t;if(Wt(e)("string","number"))delete t[e];else if(T(e))for(let r=0;r<e.length;r++)delete t[e[r]];else throw new Error("Invalid input: props must be a string or an array of strings");return t},Bc=t=>{if(t===null||typeof t!="object")return t;let e=Object.create(null);for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=Bc(t[r]));return e},ip=(t,e)=>{if(t.length===0)return e;let r={},o=r;for(let n=0;n<t.length;n++)n===t.length-1&&e?o[t[n]]=e:(o[t[n]]={},o=o[t[n]]);return r},ap=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let n=0;n<e.length-1;n++){if(r[e[n]]===void 0)return;r=r[e[n]]}let o=e[e.length-1];r&&Object.prototype.hasOwnProperty.call(r,o)&&delete r[o]},cp=(t,e,r)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let o=t;for(let n=0;n<e.length-1;n++)(!o[e[n]]||typeof o[e[n]]!="object")&&(o[e[n]]={}),o=o[e[n]];return o[e[e.length-1]]=r,t},lp=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length;o++){if(r==null)return;r=r[e[o]]}return r},fp=t=>{let r=[],o=0;for(let n=0;n<t.length;n++)if(r.length<2)r.push(t[n]);else if(t[n]===r[n%2]?o++:(r=[t[n-1],t[n]],o=1),o>=20)return(d_==="test"||d_==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},up=t=>{let e=new WeakSet;function r(o){if(o&&typeof o=="object"){if(e.has(o))return!0;e.add(o);for(let n in o)if(Object.prototype.hasOwnProperty.call(o,n)&&r(o[n]))return console.log(o,"cycle at "+n),!0}return!1}return r(t)},dp=(t,e)=>{let r=e instanceof Set?e:new Set(e),o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&!r.has(n)&&(o[n]=t[n]);return o}});var Ks,Gs,Ys,Uc=j(()=>{"use strict";nr();Ks=(function(){let t=0;function e(){return t++,t}return e})(),Gs=Ks,Ys=(t,e,r)=>(ft(r,t)||r||t.key||Ks()).toString()});var Ce,pp,kr,Vc,hp,gp,mp,vr,yp,lo,It,bp=j(()=>{"use strict";Ce="production",pp=Ce,kr=(t=Ce)=>t==="production",Vc=(t=Ce)=>t==="testing"||t==="test",hp=Vc,gp=(t=Ce)=>t==="staging",mp=(t=Ce)=>t==="local",vr=(t=Ce)=>t==="development"||t==="dev"||t==="local",yp=(t,e=Ce)=>e[t],lo=(t=Ce)=>!kr(t),It=t=>{let e=t&&"env"in t?t.env:typeof process<"u"&&process.env?"production":void 0;if(e&&e!=="production")return!0;let r=t&&"hostname"in t?t.hostname:typeof location<"u"?location.hostname:void 0;return typeof r=="string"&&r?r==="localhost"||r==="127.0.0.1"||r.endsWith(".localhost"):!1}});function Xs(t,e,r){let o;return function(){let n=this,s=arguments,i=function(){o=null,r||t.apply(n,s)},a=r&&!o;clearTimeout(o),o=setTimeout(i,e),a&&t.apply(n,s)}}function Sp(t,e=window){let r=function(){return t.apply(e,arguments)};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r}var _p,xp,OE,wp,tn,en,Et,rn=j(()=>{"use strict";_p=(t,e,r=300)=>{let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>{e.apply(t,n)},r)}},xp=t=>{let e={};return(...r)=>{let o=r[0];if(o in e)return e[o];{let n=t(o);return e[o]=n,n}}},OE=/^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/,wp=t=>OE.test(t),tn=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let r of e)if(r.resolveHandler)return!0;return!1},en=(t,e)=>{if(typeof t=="function")return t;let r=e?.context?.plugins;if(!r)return t;for(let o of r)if(o.resolveHandler){let n=o.resolveHandler(t,e);if(typeof n=="function")return n}return t},Et=(t,e,...r)=>{let o=e?.context?.plugins;if(!o)return!1;let n=!1;for(let s of o)typeof s[t]=="function"&&(s[t](e,...r),n=!0);return n}});var kp,S_=j(()=>{"use strict";Tt();nr();kp=(t,e)=>{let{__ref:r}=t,o=t.if;if(A(o)){let n;try{n=o(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete r.__if;return}n?r.__if=!0:delete r.__if}else o!=null&&typeof o=="object"?ft(o,t)?r.__if=!0:delete r.__if:r.__if=!0}});var vp,Cp,k_=j(()=>{"use strict";vp=(t,...e)=>{t&&e.map(r=>console.log(r))},Cp=(t,e,...r)=>{t&&(console.group(e),r.map(o=>console.log(o)),console.groupEnd(e))}});function Rp(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 Pp(t,e){if(e!=null)try{if(!window.localStorage)return;let r=typeof e=="object"?JSON.stringify(e):e;window.localStorage.setItem(t,r)}catch{}}var Ep,Ap,Tp,Op,v_=j(()=>{"use strict";Tt();Rs();Ep=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),Ap=(t,e,r=365)=>{if(At(tt)||At(tt.cookie))return;let o=new Date;o.setTime(o.getTime()+r*24*60*60*1e3);let n=`expires=${o.toUTCString()}`;tt.cookie=`${t}=${e};${n};path=/`},Tp=t=>{if(At(tt)||At(tt.cookie))return;let e=`${t}=`,o=decodeURIComponent(tt.cookie).split(";");for(let n=0;n<o.length;n++){let s=o[n];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},Op=t=>{At(tt)||At(tt.cookie)||(tt.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var on,C_,Ip,Dp=j(()=>{"use strict";on={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"])},C_=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"]),Ip=t=>on.body.has(t)});var $p,E_,nn,pe,sn,Qs,Ue,Lp,zc,ti,Mp,ei,Hc,Wc,ri,qc,an,RE,Ve,A_,Zs,oi,Fp,Js,Np,jp,Kc,Gc,Yc,Xc,Zc,Jc,T_,Qc=j(()=>{"use strict";Zo();Bp();nr();Tt();$p="production",E_=t=>t.sourcemap!==!1&&$p!=="production",nn=t=>{if(!t)return[];let e=[],r=t.extends;r&&(T(r)?e.push(...r):e.push(r));let o=t.extend;return o&&(T(o)?e.push(...o):e.push(o)),e},pe=t=>{if(!T(t))return t;let e=[];for(let r=t.length-1;r>=0;r--){let o=t[r];e.push(T(o)?pe(o):o)}return e},sn=t=>{if(t.includes("+"))return t.split("+").filter(ze);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!ze(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},Qs=(t,e,r)=>{let o=[],n=sn(r);n&&(o=[...n]);let s=pe(nn(t));return s.length&&(o=[...o,...s]),o},Ue=(t,e)=>{let{__ref:r}=e,{__extends:o}=r;if(!t)return o;let n=e.variant,s=e.context;if(n&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${n}`;s.components[i]&&(t=i)}return o.includes(t)||(o=Array.isArray(t)?[...o,...t]:[...o,t],r.__extends=o),o},Lp=(t,e)=>{if(!t)return e;let{extends:r}=e,o=T(r)?r:[r],n=T(t)?t:[t];return{...e,extends:Yo(n,o)}},zc=()=>Math.random().toString(36).substring(2),ti={},Mp={},ei=t=>ti[t.__hash],Hc=(t,e)=>{let r=zc();return w(t)||(t.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(ti[r]=e),e},Wc=(t,e)=>t.__hash?e.concat(ei(t)):Hc(t,e),ri=(t,e,r,o=new Set,n,s)=>{for(let i of t)T(i)?ri(i,e,r,o,n,s):an(i,e,r,o,n,void 0,s);return e},qc=(t,e,r,o=new Set,n,s,i)=>{let a=nn(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),n&&n.push(s)),a.length&&an(pe(a),e,r,o,n,s,i),e},an=(t,e,r,o=new Set,n,s,i)=>{if(!t||o.has(t))return e;if(T(t))return ri(t,e,r,o,n,i);let a=s;return w(t)?(a=t,t=oi(t,r)):i&&S(t)&&i.has(t)&&(a=i.get(t)),o.has(t)||(o.add(t),t?.extends||t?.extend?qc(t,e,r,o,n,a,i):t&&(e.push(t),n&&n.push(a))),e},RE=new Set(["parent","node","__ref","__proto__","extends","extend","childExtends","childExtendsRecursive"]),Ve=(t,e,r,o,n)=>{e=lt(e);for(let s in e){if(RE.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,r&&o?S(a)&&!T(a)?(r[s]=r[s]||{},A_(r[s],a,o)):r[s]=o:r&&n?.[s]&&(r[s]=n[s]);else if(S(i)&&S(a)){let c=r?r[s]=r[s]||{}:void 0,l=n?.[s];ze(s)?t[s]=Ve(i,a,c,o,l):Ve(i,a,c,o,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(T(i)&&T(a))t[s]=i.concat(a);else if(T(i)&&S(a)){let c=Ve({},i);t[s]=Ve(c,a)}}}}return t},A_=(t,e,r,o)=>{if(o||(o=new WeakSet),!o.has(e)){o.add(e);for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n)||n==="__proto__"||n==="constructor"||n==="prototype")continue;let s=e[n];S(s)&&!T(s)?(t[n]=t[n]||{},A_(t[n],s,r,o)):t[n]=r}}},Zs=(t,e,r)=>t.reduce((o,n,s)=>{let i=lt(n),a=r?r[s]:void 0;return Ve(o,i,e,a)},{}),oi=(t,e,r={},o)=>{let n=e?.components||r.components,s=e?.pages||r.pages;if(w(t)){let i=n&&(n[t+"."+o]||n[t]||n["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;r.verbose&&($p==="test"||$p==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},Fp=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),Js=(t,e,r,o)=>{if(!t)return[];if(t.__hash)return ei(t)||[];let s=an(t,[],e,new Set,r,void 0,o);return r?s:Wc(t,s)},Np=(t,e)=>{if(!t)return e;let r=T(t)?t:[t];return Yo(r,e)},jp=t=>{let e=[];function r(o){for(let n in o)Object.prototype.hasOwnProperty.call(o,n)&&(ze(n)&&e.push(n),n==="extends"&&(typeof o[n]=="string"?e.push(o[n]):Array.isArray(o[n])&&(e=e.concat(o[n]))),typeof o[n]=="object"&&o[n]!==null&&r(o[n]))}return r(t),e},Kc=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant,i=nn(t);if(i.length){let a=pe(i),[c,...l]=a,f=typeof c=="string"&&s&&n?.components?`${c}.${s}`:null;f&&n.components[f]?Ue([f,...l],t):Ue(a,t)}return Gc(t,e,r),Yc(t,e,r),Xc(t,e,r),t.component&&Ue(pe(ft(t.component,t)),t),n.defaultExtends&&Ue(pe(n.defaultExtends),t),Xo(o.__extends)},Gc=(t,e,r={})=>{let{__ref:o}=t;return r.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&Ue(pe(e.childProps.extends),t),o.__extends},Yc=(t,e,r={})=>{let{__ref:o}=t,n=r.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!n&&s&&Ue(pe(s),t),o.__extends},Xc=(t,e,r={})=>{let{__ref:o}=t,n=e.childExtendsRecursive,s=r.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return n&&!i&&!s&&Ue(pe(n),t),o.__extends},Zc=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant,i=E_(r),a=i?[...o.__extends]:null,c=Xo(o.__extends.map((l,f)=>oi(l,n,r,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&&S(h)&&w(g)&&l.set(h,g)}let f=[],u=Js(c,n,f,l);o.__extendsStack=u,o.__extendsNames=f}else{let l=Js(c,n);o.__extendsStack=l}return o.__extendsStack},Jc=(t,e,r={})=>{let{__ref:o}=t,{__extendsStack:n}=o;if(E_(r)){let s={},i=o.__extendsNames||[],a=Zs(n,s,i),c={};Ve(t,a,c,void 0,s),o.__sourcemap=c}else{let s=Zs(n);Ve(t,s)}return t},T_=(t,e,r={})=>(Kc(t,e,r),Zc(t,e,r),Jc(t,e,r),t)});function Up(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function Vp(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function zp(t,e,r){let{context:o}=e||{},[n]=sn(r),s=r||n;return o?.components?.[s]||o?.pages?.[s]}var ze,Bp=j(()=>{"use strict";Qc();Tt();ze=t=>{if(!w(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function O_(t,e){let{props:r,on:o}=e,n=so(t.split("on")[1]),s=o[n],i=r[t];A(s)?o[n]=(...a)=>{if(s(...a)!==!1&&A(i))return i(...a)}:o[n]=i}var R_=j(()=>{"use strict";js();Tt()});function tl(t,e={}){let r=e.cachedKeys||[];for(let o in t){let n=t[o];if(o.length>2&&o.charCodeAt(0)===111&&o.charCodeAt(1)===110&&o[2]===o[2].toUpperCase()&&(A(n)||n!=null&&tn(this.context))){let g=so(o.slice(2));t.on&&(t.on[g]=n),delete t[o];continue}if(o==="childProps"){t.props[o]=n,delete t[o],r.push(o);continue}let a=this.define?.[o],c=this.context?.define?.[o],l=S(a)||A(a),f=S(c)||A(c);if(l||f)continue;let u=o.charAt(0);if(I_.has(u)){t.props[o]=n,delete t[o],r.push(o);continue}let d=Hp.test(o)||P_.test(o)||IE(n),h=wr.has(o);!d&&!h&&(o in t.props||(t.props[o]=n),delete t[o],r.push(o))}return t}function el(t=this,e){let r=e.cachedKeys||[];for(let o in t.props){let n=t.props[o],s=o.length>2&&o.charCodeAt(0)===111&&o.charCodeAt(1)===110,i=A(n)||n!=null&&tn(this.context);if(s&&i){O_(o,t),delete t.props[o];continue}if(r.includes(o)||o==="childProps")continue;let a=o.charAt(0);if(I_.has(a))continue;let c=this.define?.[o],l=this.context?.define?.[o],f=S(c)||A(c),u=S(l)||A(l),d=Hp.test(o)||P_.test(o),h=wr.has(o);(d||h||f||u)&&(t[o]===void 0||n===null)&&(t[o]=n,t.props&&delete t.props[o])}return t}function rl(t=this){let e=[];return tl.call(this,t,{cachedKeys:e}),el.call(this,t,{cachedKeys:e}),t}function Wp(t={}){return t.on||(t.on={}),t.props||(t.props={}),rl.call(this,t)}function Kp(t,e){this.__element.update({props:t},e)}function ci(t){let e={update:Kp.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var Hp,P_,I_,PE,IE,ii,ni,qp,ai,li,fi,ol,si,Gp,Yp,Xp=j(()=>{"use strict";Qo();R_();nr();Tt();js();rn();Hp=/^[A-Z]/,P_=/^\d+$/,I_=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),PE=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),IE=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(PE.has(e)||Hp.test(e))return!0;return!1},ii=(t,e,r)=>{let{props:o,__ref:n}=t;if(n.__propsStack=[],o)n.__initialProps=o;else return{};return H(o)?{...o}:(n.__propsStack.push(o),{})};ni=t=>Wt(t)("string","number")?{inheritedString:t}:t,qp=(t,e)=>!t||!e.length?!1:e.includes(t),ai=(t,e)=>{let{__ref:r}=t,o=r.__propsStack||[],n=e.props;if(!n)return o;let s=n[t.key],i=n.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=ni(i);o.unshift(c)}if(s){let c=ni(s);o.unshift(c)}return o};li=t=>{let e=new Set;return t.filter(r=>!r||Sr.has(r)||e.has(r)?!1:(e.add(r),!0))},fi=(t,e,r)=>(e.props=t.reduce((o,n)=>{if(Sr.has(n))return o;for(;A(n);)n=ft(n,e);return st(o,lt(n,{exclude:Sr}))},{}),ci(e),e.props),ol=(t,e)=>{let{props:r,__ref:o}=t,n=o.__propsStack||[];if(e?.props&&(n=[...ai(t,e)]),S(r)?n.push(r):r==="inherit"&&e?.props?n.push(e.props):r&&n.push(r),T(o.__extendsStack))for(let s=0;s<o.__extendsStack.length;s++){let i=o.__extendsStack[s];i.props&&i.props!==r&&n.push(i.props)}return o.__propsStack=li(n),o.__propsStack},si=(t,e)=>{let{__ref:r}=t,o=ol(t,e);o.length?fi(o,t):(r.__propsStack=[],t.props={})},Gp=function(t,e,r){let{__ref:o}=t;if(o.__if)si(t,e);else try{si(t,e)}catch(n){t.context?.designSystem?.verbose&&console.warn("initProps error at",o.path?.join("."),n),t.props={},o.__propsStack=[]}return ci(t),t},Yp=(t,e,r)=>{let{__ref:o}=e,s=[...o.__propsStack||[]],i=ai(e,r);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),o.__propsStack=li(s),o.__propsStack.length&&fi(o.__propsStack,e),e}});var D_,nl,sl,il,al,Zp,cl,ll,fl,Jp,$_=j(()=>{"use strict";Qc();Uc();Is();Xp();Dp();Tt();D_="production",nl=(t,e,r)=>{let o=e.childExtends&&e.childExtends.tag,n=e.childProps&&e.childProps.tag,s=on.body.has(r)&&r;return{text:t,tag:o||n||s||"string"}},sl=(t,e,r)=>{if(t===void 0)return(D_==="test"||D_==="development")&&console.warn(r,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:Wt(t)("string","number")?nl(t,e,r):A(t)?{props:t}:t},il=(t,e)=>{let r={};return r.origin=t,r.parent=e,r},al=(t,e,r,o,n)=>{if(!e)return n;if(or(e)){let s={key:":root",node:e};return n[`${r}_parent`]=s,s}return e},Zp=(t,e)=>{let{__ref:r}=t,{__ref:o}=e,n=e&&e.key===":root";r?.root||(r.root=n?t:o?.root)},cl=(t,e,r)=>{let{__ref:o}=e;return o||(o=e.ref={}),o.path||(o.path=[]),o.path.concat(r)},ll=(t,e,r,o,n)=>(o.context&&!n.context&&!t.context&&(n.context=o.context),o.context||e.context||n.context||t.context),fl=(t,e,r)=>{let o=il(t,e);return t.__ref=o,o.__defineCache||(o.__defineCache={}),o.__exec||(o.__exec={}),o.__execProps||(o.__execProps={}),o.__class||(o.__class={}),o.__classNames||(o.__classNames={}),o.__attr||(o.__attr={}),o.__changes||(o.__changes=[]),o.__children||(o.__children=[]),o.__extends=Qs(t,e,r),o.path=cl(t,e,r),o},Jp=(t,e,r,o,n)=>{let i=t?.__hash?{extends:[t]}:sl(t,e,r);if(!i)return;let a=al(i,e,r,o,n),c=Ys(i,a,r);fl(i,a,c);let l=ii(i,a,c),f=ll(i,a,c,o,n),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var Qp,ul,dl,pl,hl,th,gl,eh,rh,oh,nh,L_,ui,sr,He,M_=j(()=>{"use strict";Zo();Qo();nr();Tt();Qp=t=>{let{state:e,props:r,__ref:o}=t,n=r?.state||e;return Wt(n)("string","number")?(o.__state=n,{value:n}):n===!0?(o.__state=t.key,{}):n?(o.__hasRootState=!0,n):!1},ul=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},dl=(t,e)=>{if(!t.includes("../"))return;let o=t.split("../").length-1;for(let n=0;n<o;n++){if(!e.parent)return null;e=e.parent}return e},pl=(t,e,r={})=>{let o=w(t)?t.split("/"):[t],n=o.length-1;for(let s=0;s<n;s++){let i=o[s],a=o[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 r.returnParent?e:e[t]},hl=(t,e,r={})=>{let n=t.__ref.__state;if(!gl(t))return;let s=ul(n,e.state),i=e.state;if(s)i=s,n=n.replaceAll("~/","");else{let a=dl(n,e.state);a&&(i=a,n=n.replaceAll("../",""))}if(i)return pl(n,i,r)},th=(t,e)=>{let r=t.__ref,o=hl(t,e);if(o===void 0)return t.state;if(Wt(o)("object","array"))return lt(o);if(Wt(o)("string","number","boolean"))return r.__stateType=typeof o,{value:o};console.warn(r.__state,"is not present. Replacing with",{})},gl=t=>{let{__ref:e}=t,r=e?.__state;return!!(r&&Wt(r)("number","string","boolean"))},eh=function(t){return H(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},rh=(t,e)=>{if(!t)return e||{};let r=t.split("/"),o={},n=o,s=r.length-1;for(let i=0;i<=s;i++)n[r[i]]=i===s?e||{}:{},n=n[r[i]];return o},oh=(t,e)=>{let{__element:r}=e,o=r?.state;if(!o)return;let n=lt(o,io),s={[t.key]:n},i=S(o.__depends)?{...o.__depends,...s}:s;return Array.isArray(o)?Ms(o,{...Object.getPrototypeOf(o),__depends:i}):Object.setPrototypeOf(o,{...Object.getPrototypeOf(o),__depends:i}),n},nh=(t,e,r={})=>{let{overwrite:o}=r;if(!o)return;let n=o==="shallow";if(o==="merge"){st(t,e,io);return}(n?co:qt)(t,e,io)},L_="__polyglotSeededKeys",ui=t=>{if(!S(t))return new Set;let e=t[L_];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,L_,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},sr=(t,e,r)=>ui(t).has(e)?!0:!S(r)||r[e]===void 0,He=(t,e)=>(ui(t).add(e),e)});var DE,sh,F_=j(()=>{"use strict";DE=(t,e)=>{let r=e;for(;r;){if(r===t)return!0;r=Object.getPrototypeOf(r)}return!1},sh=(t,e)=>{let{__ref:r}=t,o=t.context||e.context||r.root?.context;o&&!o.globalScope&&(o.globalScope={});let n=e.scope||r.root?.scope,s=o?.globalScope;if(!t.scope)n?t.scope=n: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=n||s;i&&!DE(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var N_,ml,Cr,yl,ih,ah=j(()=>{"use strict";Tt();rn();N_=(t,e)=>{let r="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[r]},ml=(t,e,r,o,n)=>{if(t=en(t,e),!!A(t))try{let s=t.call(e,e,r||e.state,o||e.context,n);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}},Cr=(t,e,r)=>{if(!e)throw new Error("Element is required");Et(t,e,r);let o=N_(t,e);if(o){let{state:n,context:s}=e;return ml(o,e,n,s,r)}},yl=(t,e,r,o,n,s)=>{if(t=en(t,r),!!A(t))try{let i=t.call(r,e,r,o||r.state,n||r.context,s);return i&&typeof i.then=="function"&&i.catch(a=>{r.error=a,console.error("[DOMQL] Async event update error:",a)}),i}catch(i){if(r.error=i,console.error("[DOMQL] Event update error:",i),r.context?.strictMode)throw i}},ih=(t,e,r,o)=>{Et(t,r,e,o);let n=N_(t,r);if(n){let{state:s,context:i}=r;return yl(n,e,r,s,i,o)}}});var ch,di,lh=j(()=>{"use strict";ch={},di={}});var B_={};P(B_,{restAdapter:()=>j_,setup:()=>LE});var $E,ir,LE,j_,U_=j(()=>{"use strict";$E=(t,e,r)=>{let o=e&&!e.startsWith("/")?"/":"",n=new URL(`${t}${o}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&n.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return n.toString()},ir=async(t,e)=>{let r=await globalThis.fetch(t,e),o=r.headers.get("content-type"),n=o&&o.includes("json")?await r.json():await r.text();return{data:n,error:r.ok?null:n?.message||n?.error||r.statusText,status:r.status}},LE=async({url:t,headers:e,auth:r,fetchOptions:o})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return j_(t,e,r,o)},j_=(t,e={},r,o={})=>{let n=r?.token||null,s=f=>{let u={...e,...f};return n&&(u.Authorization=`Bearer ${n}`),u},i=f=>({...s(f),"Content-Type":"application/json"}),a=f=>({...o,...f}),c=(f,u)=>{let d=u||t;if(f&&(f.startsWith("http://")||f.startsWith("https://")))return f;let h=f&&!f.startsWith("/")?"/":"";return`${d}${h}${f||""}`};return{name:"rest",setToken:f=>{n=f},getSession:async()=>{if(!r?.sessionUrl)return n?{token:n}:null;let f=await ir(c(r.sessionUrl,r.baseUrl),a({headers:s()}));return f.error?null:f.data},signIn:async f=>{if(!r?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let u=await ir(c(r.signInUrl,r.baseUrl),a({method:"POST",headers:i(),body:JSON.stringify(f)}));return u.data?.token&&(n=u.data.token),u},signOut:async()=>(r?.signOutUrl&&await ir(c(r.signOutUrl,r.baseUrl),a({method:"POST",headers:s()})),n=null,{error:null}),select:({from:f,params:u,select:d,limit:h,offset:g,order:p,single:m,headers:b,baseUrl:_})=>{let y={...u};return d&&(y.select=d),h&&(y.limit=h),g&&(y.offset=g),m&&(y.single=!0),p&&(typeof p=="string"?y.order=p:Array.isArray(p)?y.order=p.map(x=>`${x.by}:${x.asc===!1?"desc":"asc"}`).join(","):p.by&&(y.order=`${p.by}:${p.asc===!1?"desc":"asc"}`)),ir($E(_||t,f||"",y),a({headers:s(b)}))},rpc:({from:f,params:u,headers:d,baseUrl:h})=>ir(c(`rpc/${f}`,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:d,baseUrl:h})=>ir(c(f,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),update:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,b=m?`${f}/${m}`:f;return ir(c(b,p),a({method:h||"PATCH",headers:i(g),body:JSON.stringify(u)}))},upsert:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,b=m?`${f}/${m}`:f;return ir(c(b,p),a({method:h||"PUT",headers:i(g),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:d,baseUrl:h})=>{let g=u?.id,p=g?`${f}/${g}`:f;return ir(c(p,h),a({method:"DELETE",headers:s(d)}))}}}});var z_={};P(z_,{localAdapter:()=>V_,setup:()=>FE});var bl,ME,FE,V_,H_=j(()=>{"use strict";bl=(t,e)=>{if(!e)return!0;for(let r in e){let o=e[r];if(o===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(o)){if(!o.includes(t[r]))return!1}else if(typeof o=="object"){for(let n in o)if(n==="gt"&&!(t[r]>o[n])||n==="gte"&&!(t[r]>=o[n])||n==="lt"&&!(t[r]<o[n])||n==="lte"&&!(t[r]<=o[n])||n==="neq"&&t[r]===o[n]||n==="like"&&!String(t[r]).includes(o[n]))return!1}else if(t[r]!==o)return!1}return!0},ME=(t,{order:e,limit:r,offset:o,single:n})=>{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 o&&(s=s.slice(o)),r&&(s=s.slice(0,r)),n?{data:s[0]||null,error:null}:{data:s,error:null}},FE=async({data:t,...e})=>V_(t,e),V_=(t={},e={})=>{let r={},o={},n=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(n)try{let u=localStorage.getItem(s+f);r[f]=u?JSON.parse(u):t[f]||[]}catch{r[f]=t[f]||[]}else r[f]=t[f]||[];return r[f]},a=f=>{if(n)try{localStorage.setItem(s+f,JSON.stringify(r[f]))}catch{}},c=(f,u,d,h)=>{let g=o[f];if(g)for(let p of g)p(d,h,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...d})=>{let g=i(f).filter(p=>bl(p,u));return ME(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(bl(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 b=d||(m.id!==void 0?{id:m.id}:null),_=b?h.findIndex(y=>bl(y,b)):-1;if(_>-1){let y={...h[_]};Object.assign(h[_],m),p.push(h[_]),c(f,"UPDATE",h[_],y)}else{let y={id:m.id||++l,...m};h.push(y),p.push(y),c(f,"INSERT",y,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--)bl(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)=>{o[f]||(o[f]=[]);let h=(g,p,m)=>{u&&u!=="*"&&u!==m.event||d(g,p,m)};return o[f].push(h),()=>{let g=o[f].indexOf(h);g>-1&&o[f].splice(g,1)}}}}});var uo={};P(uo,{createAdapter:()=>zE,default:()=>QE,executeFetch:()=>xi,fetchPlugin:()=>gh,initAdapterAuth:()=>kl,parseDuration:()=>gi,queryClient:()=>JE,registerAdapter:()=>VE,resolveDb:()=>G_});var NE,jE,_l,hi,xl,dh,BE,UE,VE,zE,G_,gi,Nt,Y_,pi,HE,_i,mi,yi,wl,ph,Sl,WE,W_,fh,X_,Z_,cn,q_,qE,K_,KE,vl,J_,Q_,kl,hh,he,Ee,bi,fo,We,Er,GE,YE,XE,uh,ZE,xi,JE,gh,QE,Ar=j(()=>{"use strict";R();NE=["select","rpc","insert","update","upsert","delete","subscribe"],jE={rest:()=>Promise.resolve().then(()=>(U_(),B_)),local:()=>Promise.resolve().then(()=>(H_(),z_))},_l=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),hi=(()=>{if(typeof globalThis<"u"&&globalThis[_l])return globalThis[_l];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,_l,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[_l]}catch{}return t})(),xl=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),dh=(()=>{if(typeof globalThis<"u"&&globalThis[xl])return globalThis[xl];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,xl,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[xl]}catch{}return t})(),BE=5e3,UE=t=>new Promise(e=>{if(hi[t])return e(hi[t]);let r=dh[t]||=[],o=!1,n=()=>{o||(o=!0,e(hi[t]||null))};r.push(n),setTimeout(n,BE)}),VE=(t,e)=>{hi[t]=e;let r=dh[t];if(r&&r.length){dh[t]=[];for(let o of r)o()}},zE=t=>{let e={};for(let r of NE)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},G_=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,o=typeof e=="string"?e:typeof t=="string"?t:null;if(!o)return null;let n=hi[o]||jE[o];if(!n&&(n=await UE(o),!n))throw new Error(`Unknown db adapter: "${o}". Use registerAdapter() for adapters with optional deps.`);let s=await n();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${o}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(r)},gi=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 r=parseInt(e[1]),o=e[2];return o==="ms"?r:o==="s"?r*1e3:o==="m"?r*6e4:o==="h"?r*36e5:0},Nt=new Map,Y_=new Map,pi=new Map,HE=(t,e,r)=>{if(t.cache?.key)return t.cache.key;let o=KE(t.params),n=r?`${r}:`:"",s=`${t.from}:${t.method}:${n}${JSON.stringify(o||"")}`;return e?`${s}:${e}`:s},_i=t=>Nt.get(t)||null,mi=(t,e,r)=>{let o=Nt.get(t),n={data:e,error:r,time:Date.now(),stale:!1};Nt.set(t,n);let s=Y_.get(t);if(s)for(let i of s)A(i)&&i(n);return n},yi=t=>{if(t){let e=Nt.get(t);e&&(e.stale=!0);return}for(let[,e]of Nt)e.stale=!0},wl=t=>{if(t){Nt.delete(t);return}Nt.clear()},ph=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)}:w(t)?{staleTime:gi(t),gcTime:3e5}:{staleTime:gi(t.stale||t.staleTime)||6e4,gcTime:gi(t.gc||t.gcTime||t.expire)||3e5,key:t.key},Sl=null,WE=()=>{Sl||(Sl=setInterval(()=>{let t=Date.now();for(let[e,r]of Nt){let o=Y_.get(e);!(o&&o.size>0)&&t-r.time>(r.gcTime||3e5)&&Nt.delete(e)}},3e4),Sl.unref&&Sl.unref())};WE();W_=3,fh=t=>Math.min(1e3*2**t,3e4),X_=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:W_,delay:fh}:typeof e=="number"?{count:e,delay:fh}:{count:e.count??W_,delay:A(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:fh}},Z_=async(t,e)=>{let{count:r,delay:o}=e,n;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(n=i.error,s<r){let a=A(o)?o(s,n):o;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(n=i,s<r){let a=A(o)?o(s,i):o;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:n}},cn={focus:new Set,online:new Set},q_=!1,qE=()=>{if(q_||typeof window>"u")return;q_=!0;let t=()=>{for(let r of cn.focus)r()},e=()=>{for(let r of cn.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},K_=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(w(t))return{from:t,method:"select",query:!0,on:"create"};if(S(t)){let o={...t};return o.from=o.from||r.__state||e.key,o.method=o.method||"select",o.on=o.on||"create",o.query===void 0&&(o.query=!0),o}return null},KE=t=>(!t||A(t),t),vl=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},J_=(t,e)=>{let o=(t?.state?.root||e?.state?.root)?.__fetchScope;return o?String(o):void 0},Q_=(t,e,r)=>{let o;if(!t)o=void 0;else if(A(t))o=t(e,e.state);else{o={};for(let n in t){let s=t[n];o[n]=A(s)?s(e,e.state):s}}return o},kl=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(o,n)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:o,session:n,loading:!1}})};try{let o=await t.getSession();r(o?.user||null,o)}catch(o){console.warn("[fetch] Failed to restore auth session:",o.message)}t.onAuthStateChange&&t.onAuthStateChange((o,n)=>{r(n?.user||null,n)})},hh=async(t,e)=>{if(A(t.select))return t.auth!==!1&&await kl(t,e),t;if(t.__resolved)return t.auth!==!1&&await kl(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=G_(t);let r=await t.__resolving;return delete t.__resolving,r?(r.auth=t.auth,r.url=t.url,r.key=t.key,t.__resolved=r,e.fetch=r,t.auth!==!1&&await kl(r,e),r):null},he=(t,e,...r)=>{let o=A(t[e])?t[e]:null;o&&o.call(t,...r,t,t.state,t.context)},Ee=(t,e,r,...o)=>{let n=t&&A(t[r])?t[r]:null;n&&n.call(e,...o,e,e.state,e.context)},bi=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let n=new FormData(r);for(let[s,i]of n.entries())e[s]=i;return e}let o=r.querySelectorAll("input, textarea, select");for(let n=0;n<o.length;n++){let s=o[n],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},fo=(t,e,r,o={})=>{let n=r&&r.startsWith("~/"),s=n&&t.state?.root||t.state;if(s?.update)if(n){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&i in e?s.update(e,{preventFetch:!0,...o}):s.update({[i]:e},{preventFetch:!0,...o})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...o})}},We=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},Er=async(t,e,r,o={})=>{let n=r?.fetch;if(!n||!e||!e.__ref||t.enabled===!1||A(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||A(t.skip)&&t.skip(e,e.state))return;let s=await hh(n,r);if(!s||!e.__ref)return;let i=e.__ref,{from:a,method:c,query:l,params:f,cache:u,transform:d,single:h,auth:g,fields:p,as:m,limit:b,offset:_,order:y,headers:x,baseUrl:k,page:E,cursor:O,getNextPageParam:$,getPreviousPageParam:I,infinite:D,placeholderData:W,initialData:Pt,select:F,keepPreviousData:Y}=t,at=w(F)?F:void 0;if(l&&A(e.getQuery)){let nt=e.getQuery(s.name||"paths");nt&&(at=nt.select||nt.length&&nt.join(",")||at)}let z=Q_(f,e,r),G=ph(u),Vt=X_(t),q=vl(e,r),xt=J_(e,r),M=q?`:${q}`:"",ot=xt?`${xt}:`:"",V=G?u?.key||`${a}:${c}:${ot}${JSON.stringify(z||"")}${D?":infinite":""}${E?":p"+JSON.stringify(E):""}${M}`:null;if(!i.__fetchInitialized&&V&&(i.__fetchInitialized=!0,Pt!==void 0)){let nt=A(Pt)?Pt():Pt;mi(V,nt,null)}if((c==="select"||c==="rpc")&&V&&G){let nt=_i(V);if(nt&&!nt.error){let N=Date.now()-nt.time,pt=nt.stale||N>(G.staleTime||0),K=nt.data;if(A(F)&&(K=F(K,e,e.state)),d&&(K=d(K,e,e.state)),fo(e,K,m),!pt){We(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(W!==void 0){let N=A(W)?W(e,e.state):W;N!==void 0&&fo(e,N,m)}}if(V&&pi.has(V)&&!o.force){let nt=pi.get(V);try{let N=await Promise.race([nt,new Promise((pt,K)=>setTimeout(()=>K("DEDUP_TIMEOUT"),15e3))]);if(N?.data!==void 0){let pt=N.data;A(F)&&(pt=F(pt,e,e.state)),d&&(pt=d(pt,e,e.state)),fo(e,pt,m),he(e,"onFetchComplete",pt),Ee(t,e,"onFetchComplete",pt)}}catch{}return}let X=!_i(V)?.data;We(e,{isFetching:!0,isLoading:X,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),he(e,"onFetchStart"),Ee(t,e,"onFetchStart");let B=r?.analyze?.emitNetwork,dt=B?typeof performance<"u"?performance.now():Date.now():0;B&&B({phase:"start",mode:"query",from:a,method:c,cacheKey:V,lang:q});let Qe=Z_(async()=>{if(g!==!1&&s.auth!==!1&&s.getSession){let K=await s.getSession();if(g===!0&&!K){let Mt={message:"Not authenticated"};return We(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Mt,status:"error",fetchStatus:"idle"}),he(e,"onFetchError",Mt),Ee(t,e,"onFetchError",Mt),{data:null,error:Mt}}}let nt=s[c];if(!A(nt))return{data:null,error:{message:`Method "${c}" not found on adapter`}};let N={from:a,select:at,params:z,single:h,limit:b,offset:_,order:y,headers:x,baseUrl:k},pt=vl(e,r);if(pt&&(N.headers={...N.headers,"Accept-Language":pt}),E!==void 0){if(S(E))E.offset!==void 0&&(N.offset=E.offset),E.limit!==void 0&&(N.limit=E.limit),E.cursor!==void 0&&(N.params={...N.params,cursor:E.cursor});else if(typeof E=="number"){let K=t.pageSize||b||20;N.offset=(E-1)*K,N.limit=K}}if(O!==void 0&&(N.params={...N.params,cursor:O}),c==="insert"||c==="update"||c==="upsert"){let K;if(p===!0||t.on==="submit")K=bi(e);else if(T(p)){let Mt=bi(e);K={};for(let ad of p)K[ad]=Mt[ad]}else e.state?.parse?K=e.state.parse():S(e.state)&&(K={...e.state});d&&(K=d(K,e,e.state)),N.data=K}if(c==="rpc"){let K=z;if(t.on==="submit"){let Mt=bi(e);K=t.transformParams?t.transformParams(Mt,e,e.state):Mt}N.params=K}if(c==="subscribe"){let K=s.subscribe({from:a,params:z,on:t.subscribeOn},(Mt,ad,SI)=>{fo(e,Mt,m),he(e,"onFetchComplete",Mt),Ee(t,e,"onFetchComplete",Mt)});return i.__unsubscribe=K,{data:null,error:null,subscribed:!0}}return nt(N)},Vt);V&&pi.set(V,Qe);try{let nt=await Qe;if(nt?.subscribed)return;let{data:N,error:pt}=nt||{};if(pt){V&&mi(V,null,pt),We(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:pt,status:"error",fetchStatus:"idle"}),he(e,"onFetchError",pt),Ee(t,e,"onFetchError",pt),B&&B({phase:"error",mode:"query",from:a,method:c,cacheKey:V,error:pt.message||pt,durationMs:(typeof performance<"u"?performance.now():Date.now())-dt});return}if(N!==void 0){if((c==="select"||c==="rpc")&&V){let Mt=mi(V,N,null);Mt.gcTime=G?.gcTime||3e5}let K=N;D&&T(N)&&(i.__pages||(i.__pages=[]),o.direction==="previous"?i.__pages.unshift(N):i.__pages.push(N),K=i.__pages.flat(),$&&(i.__nextPageParam=$(N,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),I&&(i.__prevPageParam=I(N,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),A(F)&&(K=F(K,e,e.state)),d&&(K=d(K,e,e.state)),(!Y||K!==void 0)&&fo(e,K,m),We(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),he(e,"onFetchComplete",K),Ee(t,e,"onFetchComplete",K),B&&B({phase:"success",mode:"query",ok:!0,from:a,method:c,cacheKey:V,durationMs:(typeof performance<"u"?performance.now():Date.now())-dt})}}catch(nt){We(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:nt,status:"error",fetchStatus:"idle"}),he(e,"onFetchError",nt),Ee(t,e,"onFetchError",nt),B&&B({phase:"error",mode:"query",from:a,method:c,cacheKey:V,error:nt.message||String(nt),durationMs:(typeof performance<"u"?performance.now():Date.now())-dt})}finally{V&&pi.delete(V)}},GE=(t,e,r)=>{let o=t.on,n=e.__ref;n.__fetchListeners||(n.__fetchListeners=[]);let s=t.__runner||Er;if(o==="submit"){let i=c=>{c.preventDefault(),s(t,e,r)},a=e.node;a&&(a.addEventListener("submit",i),n.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(o==="click"){let i=()=>s(t,e,r),a=e.node;a&&(a.addEventListener("click",i),n.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else o==="stateChange"&&(n.__fetchOnStateChange=()=>s(t,e,r))},YE=(t,e,r)=>{let o=e.__ref;o.__fetchCleanups||(o.__fetchCleanups=[]),qE();let n=t.refetchInterval;if(n){let s=typeof n=="number"?n:gi(n);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&Er(t,e,r,{force:!0})},s);o.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=vl(e,r),a=J_(e,r),c=HE(t,i,a),l=_i(c),f=ph(t.cache);(!l||l.stale||Date.now()-l.time>(f?.staleTime||0))&&Er(t,e,r,{force:!0})};cn.focus.add(s),o.__fetchCleanups.push(()=>cn.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>Er(t,e,r,{force:!0});cn.online.add(s),o.__fetchCleanups.push(()=>cn.online.delete(s))}},XE=(t,e,r)=>{if(!e.optimistic)return null;let o=t.__ref,n=e.as,s=t.state?.parse?t.state.parse():S(t.state)?{...t.state}:t.state;o.__optimisticSnapshot=s;let i=A(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&fo(t,i,n),s},uh=(t,e)=>{let r=t.__ref,o=r.__optimisticSnapshot;o!==void 0&&(fo(t,o,e.as),delete r.__optimisticSnapshot)},ZE=async(t,e,r)=>{let o=r?.fetch;if(!o)return;let n=await hh(o,r);if(!n)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:h,baseUrl:g,invalidates:p,optimistic:m,onMutate:b,onSuccess:_,onError:y,onSettled:x}=t,k;if(c===!0||u==="submit")k=bi(e);else if(T(c)){let I=bi(e);k={};for(let D of c)k[D]=I[D]}else e.state?.parse?k=e.state.parse():S(e.state)&&(k={...e.state});l&&(k=l(k,e,e.state)),A(b)&&b(k,e,e.state);let E=m?XE(e,t,k):null;s.__fetching=!0,We(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),he(e,"onFetchStart"),Ee(t,e,"onFetchStart");let O=r?.analyze?.emitNetwork,$=O?typeof performance<"u"?performance.now():Date.now():0;O&&O({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&n.auth!==!1&&n.getSession){let z=await n.getSession();if(d===!0&&!z){E!==void 0&&uh(e,t);let G={message:"Not authenticated"};he(e,"onFetchError",G),Ee(t,e,"onFetchError",G);return}}let I=n[i];if(!A(I))return;let D={from:a,data:k,headers:h,baseUrl:g};t.params&&(D.params=Q_(t.params,e,r));let W=vl(e,r);W&&(D.headers={...D.headers,"Accept-Language":W});let Pt=X_(t),F=await Z_(()=>I(D),Pt),{data:Y,error:at}=F||{};if(at){E!==void 0&&uh(e,t),We(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:at,status:"error",fetchStatus:"idle"}),he(e,"onFetchError",at),A(y)&&y(at,k,e),A(x)&&x(null,at,k,e),O&&O({phase:"error",mode:"mutation",from:a,method:i,error:at.message||String(at),durationMs:(typeof performance<"u"?performance.now():Date.now())-$});return}if(delete s.__optimisticSnapshot,Y!==void 0){let z=f?{[f]:Y}:Y;e.state?.update&&e.state.update(z,{preventFetch:!0})}if(We(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),he(e,"onFetchComplete",Y),Ee(t,e,"onFetchComplete",Y),A(_)&&_(Y,k,e),A(x)&&x(Y,null,k,e),O&&O({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-$}),p){let z=T(p)?p:[p];for(let G of z)if(G===!0||G==="*")for(let[Vt]of Nt)Vt.startsWith(a+":")&&yi(Vt);else yi(G)}}catch(I){E!==void 0&&uh(e,t),We(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:I,status:"error",fetchStatus:"idle"}),he(e,"onFetchError",I),Ee(t,e,"onFetchError",I),A(y)&&y(I,k,e),A(x)&&x(null,I,k,e),O&&O({phase:"error",mode:"mutation",from:a,method:i,error:I.message||String(I),durationMs:(typeof performance<"u"?performance.now():Date.now())-$})}finally{s.__fetching=!1}},xi=(t,e,r,o)=>{if(!t||!o?.fetch)return;let s=ft(t,e);if(!s)return;let i=T(s)?s.map(c=>K_(ft(c,e),e)).filter(Boolean):[K_(s,e)].filter(Boolean);for(let c of i){let l=c.method==="insert"||c.method==="update"||c.method==="upsert"||c.method==="delete",f=l?ZE:Er;c.on==="create"?f(c,e,o):Promise.resolve().then(()=>{GE({...c,__runner:f},e,o)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&YE(c,e,o)}let a=e.__ref;a.refetch=c=>{for(let l of i)Er(l,e,o,{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};Er(f,e,o,{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};Er(f,e,o,{direction:"previous",force:!0})}},JE={invalidateQueries:t=>{if(!t){yi();return}if(w(t))for(let[e]of Nt)(e.startsWith(t)||e.includes(t))&&yi(e);else if(T(t)){let e=t.join(":");for(let[r]of Nt)r.includes(e)&&yi(r)}},removeQueries:t=>{if(!t){wl();return}if(w(t))for(let[e]of Nt)(e.startsWith(t)||e.includes(t))&&wl(e)},getQueryData:t=>_i(t)?.data??void 0,setQueryData:(t,e)=>{let r=_i(t),o=A(e)?e(r?.data):e;mi(t,o,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let o=await hh(r,e);if(!o)return;let n=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=o[t.method||"select"];if(!A(s))return;let i=await s({from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single});if(i?.data!==void 0&&!i?.error){let a=mi(n,i.data,null);a.gcTime=ph(t.cache)?.gcTime||3e5}return i},getCache:()=>Nt,clear:()=>wl(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of Nt)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||wl(r))}},gh={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||pi.clear(),xi(e,t,t.state,t.context))}},QE=xi});function Si(t){let e=this,{__ref:r}=e,o=[].concat(t),n=r.root[o[0]];if(!o||!o.length)return console.log(o,"on",e.key,"is undefined");for(;n.key===o[0]&&(o.shift(),!!o.length);)if(n=n[o[0]],!n)return;return n}function yh(t){let e=this,{parent:r}=e;if(A(t))return r.state&&t(r,r.state,r.context)?r:r.parent?r.lookup(t):void 0;if(e[t])return e[t];for(;r.param!==t;){if(r[t])return r[t];if(r=r.parent,!r)return}return r}function bh(t){let e=this,{__ref:r}=e,o=r?.__children;if(o)for(let n=0;n<o.length;n++){let s=o[n],i=e[s];if(s===t)return i;if(A(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 _h(t,e=[]){let r=this,{__ref:o}=r,n=o?.__children;if(n){for(let s=0;s<n.length;s++){let i=n[s],a=r[i];if(i===t)e.push(a);else if(A(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 Cl(t={}){let e=this;if(e.node?.style){for(let r in t){let o=t[r],n=e[r];if(S(o)&&n)Cl.call(n,o);else if(o!=null){let s=r.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(o).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function ex(t){let e=this;if(Cr("beforeRemove",e,t)===!1)return e;A(e.node.remove)?e.node.remove():kr()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=Ls(e.parent.__ref.__children,e.key)),Cr("remove",e,t)}function xh(t){return this[t]}function wh(t,e){let r=this;if(t)return r.update(t,e),r}function Sh(t){return t?this.__ref&&this.__ref[t]:this.__ref}function ki(){return this.getRef("__children").map(e=>this[e])}function vi(){return this.getRef().path}function Ei(t){let e=null,r=o=>o.__element&&o.root?.isRootState;if(!this)e=tx();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let o=this.state&&r(this.state),n=A(this.state)&&this.parent.state&&r(this.parent.state);(o||n)&&(e=this.state.root||this.parent.state.root)}return e||(e=tx()),t?e?.[t]:e}function Ai(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function Ti(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function Oi(t){let e=this.getRoot()?.context;return t?e[t]:e}function Ri(t){let e=this.context;return t?e[t]:e}function El(){let t=this,e=[];for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||wr.has(r)&&!Bs.has(r)||e.push(r);return e}function Al(t=[]){let e=this,r={},o=El.call(e),n=o.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<o.length;i++){let a=o[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||n&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=A(c&&c.parse)?c.parse():c;r[a]=A(l)?l:JSON.parse(JSON.stringify(l||{}))}else if(a==="scope"){if(e.__ref&&!e.__ref.__hasRootScope)continue;r[a]=JSON.parse(JSON.stringify(c||{}))}else if(a==="props"){let{__element:l,update:f,...u}=e[a];r[a]=u}else yt(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=c)}return r}function wi(t=[],e=new WeakSet){let r=this;if(e.has(r))return;e.add(r);let o=Al.call(r,t),n=t.length?new Set(t):null;for(let s in o){if(n&&n.has(s)||!Object.prototype.hasOwnProperty.call(r,s))continue;let i=o[s];Array.isArray(i)?o[s]=i.map(a=>H(a)?wi.call(a,t,e):a):H(i)&&(o[s]=wi.call(i,t,e))}return o}function ln(...t){if(Tr!=="test"&&Tr!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(o=>console.log(`%c${o}:
21
+ `,"font-weight: bold",e[o])):(console.log(r.path),e.keys().forEach(n=>console.log(`%c${n}:`,"font-weight: bold",e[n]))),console.log(e),console.groupEnd(e.key),e}function vh(...t){(Tr==="test"||Tr==="development")&&console.log(...t)}function Pi(...t){(Tr==="test"||Tr==="development")&&console.warn(...t)}function po(...t){if(Tr==="test"||Tr==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&ln.call(this),new Error(...t)}}function Ii(){let t=this,{key:e,parent:r}=t,{__children:o}=r.__ref,n=o.indexOf(e),s=o[n+1];return r[s]}function Di(t){let e=t||this,{key:r,parent:o}=e,{__children:n}=o.__ref;if(!n)return;let s=n.indexOf(r);return o[n[s-1]]}function $i(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let r=e.data.varCaches,o={},n;for(let s in t)t[s]!==r[s]&&(n=!0,o[s]=t[s]);return{changed:s=>{if(!n)return;let i=s(o,lt(r));for(let a in o)r[a]=o[a];return i},timeout:(s,i)=>{if(!n)return;let a=setTimeout(()=>{s(o),clearTimeout(a)},i)}}}function Ch(t,...e){let r=this.context,o=r.utils?.[t]||r.functions?.[t]||r.methods?.[t]||r.snippets?.[t];if(o)try{let n=o.call(this,...e);return n&&typeof n.then=="function"&&n.catch(s=>{po.call(this,s)}),n}catch(n){if(po.call(this,n),r?.strictMode)throw n}}async function Li(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(Ar(),uo));await n(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(Ar(),uo));await n(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(Ar(),uo)).then(({resolveDb:n})=>n(e));e.__resolving=r;let o=await r;if(e.__resolved=o,t.context.fetch=o,delete e.__resolving,o?.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(Ar(),uo));await n(o,t.context)}return o}function Mi(t){let e=this,r=t||di.useStateQuery||e.context?.useStateQuery;if(!r)return null;let o={};if(mh(e,o),r===!0)return o;let n=iA[r];return n?n(o):o}function Eh(t,e){return!!(Jo.has(t)||e?.context?.methods?.[t])}var Tr,rx,Ci,tx,kh,mh,tA,ox,eA,rA,oA,nA,sA,iA,nx=j(()=>{"use strict";ah();Qo();Tt();nr();bp();Zo();lh();Tr="production";rx=null,Ci=t=>{rx=t||null},tx=()=>rx||null;kh=(t,e,r,o)=>Object.defineProperty(t,e,{get:r,set:o});mh=(t,e)=>{let r=t.__ref;if(!r)return;let o=r.__state;o&&typeof o=="string"&&tA(e,o);let n=r.__children;if(n)for(let a=0;a<n.length;a++){let c=t[n[a]];c&&c.__ref&&mh(c,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&mh(i,e)},tA=(t,e)=>{let o=e.replaceAll("../","").replaceAll("~/","").split("/"),n=t;for(let s=0;s<o.length;s++){let i=o[s];s===o.length-1?n[i]||(n[i]=!0):(n[i]===!0&&(n[i]={}),n[i]||(n[i]={}),n=n[i])}},ox=(t,e=0)=>{let r=" ".repeat(e),o=Object.entries(t);return o.length?o.map(([s,i])=>i===!0?`${r}${s}`:`${r}${s} {
22
+ ${ox(i,e+1)}
23
23
  ${r}}`).join(`
24
- `):""},HE=t=>`{
25
- ${W_(t,1)}
26
- }`,WE=t=>{let e={fields:{},include:[]},r=(o,n)=>{let s=[];for(let i in o)if(o[i]===!0)s.push(i);else{let a=n?`${n}.${i}`:i;e.include.push(a),r(o[i],a)}s.length&&(e.fields[n||"_root"]=s)};return r(t,""),e},qE=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:r,expand:o}=e(t),n=[];return r&&n.push(`$select=${r}`),o&&n.push(`$expand=${o}`),n.join("&")},KE=(t,e)=>{let r=[],o=[],n=new Set,s=(f,u,d)=>{n.add(u),d&&o.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let h in f)f[h]===!0?r.push(`${u}.${h}`):s(f[h],h,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=[...n][0]||"_root",c=r.length?r.join(", "):"*",l=o.length?`
24
+ `):""},eA=t=>`{
25
+ ${ox(t,1)}
26
+ }`,rA=t=>{let e={fields:{},include:[]},r=(o,n)=>{let s=[];for(let i in o)if(o[i]===!0)s.push(i);else{let a=n?`${n}.${i}`:i;e.include.push(a),r(o[i],a)}s.length&&(e.fields[n||"_root"]=s)};return r(t,""),e},oA=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:r,expand:o}=e(t),n=[];return r&&n.push(`$select=${r}`),o&&n.push(`$expand=${o}`),n.join("&")},nA=(t,e)=>{let r=[],o=[],n=new Set,s=(f,u,d)=>{n.add(u),d&&o.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let h in f)f[h]===!0?r.push(`${u}.${h}`):s(f[h],h,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=[...n][0]||"_root",c=r.length?r.join(", "):"*",l=o.length?`
27
27
  `+o.join(`
28
28
  `):"";return`SELECT ${c}
29
- FROM ${a}${l}`},GE=t=>{let e=[],r=(o,n)=>{for(let s in o){let i=n?`${n}/${s}`:s;o[s]===!0?e.push(i):r(o[s],i)}};return r(t,""),e},YE={graphql:HE,"json-api":WE,odata:qE,sql:KE,paths:GE}});var XE,_h,K_=F(()=>{"use strict";Dc();XE={snapshotId:Bs},_h=(t,e)=>{let r=t.__ref,{currentSnapshot:o,calleeElement:n}=e;if(!n||n===t){let a=XE.snapshotId();return r.__currentSnapshot=a,[a,t]}let i=n.__ref.__currentSnapshot;return o<i?[i,n,!0]:[i,n]}});var xl,xh,G_=F(()=>{xl=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),xh=t=>typeof t=="string"&&xl.has(t)});async function wh(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 Y_=F(()=>{"use strict"});var on,nn,Oi,de,Er,sn,Ri,Ee,wl,JE,fo,ZE,an,cn,Sh,X_=F(()=>{"use strict";on=t=>t!=="latest"?`@${t}`:"",nn=t=>t?`/${t}`:"",Oi=t=>{let e=typeof t=="string"?t.replace(/\/+$/,""):"";if(!e)return{name:"",subpath:""};let r=e.split("/"),o=e.startsWith("@")?2:1;return{name:r.slice(0,o).join("/"),subpath:r.slice(o).join("/")}},de={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,r)=>`${de.skypack.url}/${t}${on(e)}${nn(r)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,r)=>`${de.esmsh.url}/${t}${on(e)}${nn(r)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,r)=>`${de.unpkg.url}/${t}${on(e)}${nn(r)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,r)=>`${de.jsdelivr.url}/${t}${on(e)}${nn(r)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,r)=>`${de.symbols.url}/${t}${on(e)}${nn(r)}/+esm`}},Er={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},sn=(t={})=>{let{packageManager:e}=t;return Er[e]||null},Ri=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},Ee=(t,e="latest",r="esmsh")=>{let o=de[r]||de.esmsh,{name:n,subpath:s}=Oi(t);return o.formatUrl(n||t,Ri(e),s)},wl=(t,e="latest",r="esmsh")=>{let o=de[r]||de.esmsh,n=Ri(e),{name:s,subpath:i}=Oi(t);return`${o.url}/${s||t}${on(n)}${nn(i)}/`},JE=/^node:|^@symbo-ls\//,fo=t=>typeof t=="string"&&JE.test(t),ZE=/[<>…]/,an=t=>typeof t=="string"&&ZE.test(t),cn=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Sh=(t,e="skypack",r={})=>{let o=t.dependencies;if(!cn(o))return"";let n=Object.keys(o);if(!n.length)return"";let s=r.pin||{},i={};for(let f of n){if(fo(f)||an(f))continue;let u=s[f]||o[f]||"latest";i[f]=Ee(f,u,e),f.endsWith("/")||(i[f+"/"]=wl(f,u,e))}if(!Object.keys(i).length)return"";let a='<script type="importmap">',c="<\/script>",l=`{
29
+ FROM ${a}${l}`},sA=t=>{let e=[],r=(o,n)=>{for(let s in o){let i=n?`${n}/${s}`:s;o[s]===!0?e.push(i):r(o[s],i)}};return r(t,""),e},iA={graphql:eA,"json-api":rA,odata:oA,sql:nA,paths:sA}});var aA,Ah,sx=j(()=>{"use strict";Uc();aA={snapshotId:Gs},Ah=(t,e)=>{let r=t.__ref,{currentSnapshot:o,calleeElement:n}=e;if(!n||n===t){let a=aA.snapshotId();return r.__currentSnapshot=a,[a,t]}let i=n.__ref.__currentSnapshot;return o<i?[i,n,!0]:[i,n]}});var Tl,Th,ix=j(()=>{Tl=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),Th=t=>typeof t=="string"&&Tl.has(t)});async function Oh(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 ax=j(()=>{"use strict"});var fn,un,Fi,ge,Or,dn,Ni,Ae,Ol,cA,ho,lA,pn,hn,Rh,cx=j(()=>{"use strict";fn=t=>t!=="latest"?`@${t}`:"",un=t=>t?`/${t}`:"",Fi=t=>{let e=typeof t=="string"?t.replace(/\/+$/,""):"";if(!e)return{name:"",subpath:""};let r=e.split("/"),o=e.startsWith("@")?2:1;return{name:r.slice(0,o).join("/"),subpath:r.slice(o).join("/")}},ge={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,r)=>`${ge.skypack.url}/${t}${fn(e)}${un(r)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,r)=>`${ge.esmsh.url}/${t}${fn(e)}${un(r)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,r)=>`${ge.unpkg.url}/${t}${fn(e)}${un(r)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,r)=>`${ge.jsdelivr.url}/${t}${fn(e)}${un(r)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,r)=>`${ge.symbols.url}/${t}${fn(e)}${un(r)}/+esm`}},Or={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},dn=(t={})=>{let{packageManager:e}=t;return Or[e]||null},Ni=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},Ae=(t,e="latest",r="esmsh")=>{let o=ge[r]||ge.esmsh,{name:n,subpath:s}=Fi(t);return o.formatUrl(n||t,Ni(e),s)},Ol=(t,e="latest",r="esmsh")=>{let o=ge[r]||ge.esmsh,n=Ni(e),{name:s,subpath:i}=Fi(t);return`${o.url}/${s||t}${fn(n)}${un(i)}/`},cA=/^node:|^@symbo-ls\//,ho=t=>typeof t=="string"&&cA.test(t),lA=/[<>…]/,pn=t=>typeof t=="string"&&lA.test(t),hn=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Rh=(t,e="skypack",r={})=>{let o=t.dependencies;if(!hn(o))return"";let n=Object.keys(o);if(!n.length)return"";let s=r.pin||{},i={};for(let f of n){if(ho(f)||pn(f))continue;let u=s[f]||o[f]||"latest";i[f]=Ae(f,u,e),f.endsWith("/")||(i[f+"/"]=Ol(f,u,e))}if(!Object.keys(i).length)return"";let a='<script type="importmap">',c="<\/script>",l=`{
30
30
  "imports": ${JSON.stringify(i,null,2)}
31
- }`;return`${a}${l}${c}`}});var kh,J_=F(()=>{"use strict";kh=t=>{if(!t)return"";let e=new Date(t),r=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),o=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${o}, ${r}`}});var vh,Z_=F(()=>{"use strict";vh=(t,e)=>{let r=setTimeout(()=>{let{props:o}=t;if(!e.clientHeight){let{node:{clientHeight:n}}=t;n&&(e.clientHeight=n)}if(e.active){if(o.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let n=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(n)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(r)})}});var Ch,Q_=F(()=>{"use strict";Ch=function(e){let r=[0,1];for(let o=2;o<=e;o++)r[o]=r[o-1]+r[o-2];return r[e]}});var Eh,tx=F(()=>{"use strict";Eh=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function ln(t,e={}){let{window:r=globalThis}=e,{document:o=r.document}=e;return new Promise((n,s)=>{let i=o.querySelector(`script[src="${t}"]`);if(i)return n(i);let a=o.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,n(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},o.head.appendChild(a)})}async function Ih(t,e={}){let{window:r=globalThis}=e,{document:o=r.document}=e;return new Promise((n,s)=>{let i=o.querySelector(`link[href="${t}"]`);if(i)return n(i);let a=o.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,n(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},o.head.appendChild(a)})}var Ah,Th,Oh,Rh,Ph,ex=F(()=>{"use strict";Ah=(t,e=!1,r=document,o="text/javascript")=>new Promise((n,s)=>{try{let i=r.createElement("script");i.type=o,i.async=e,i.src=t,i.addEventListener("load",a=>{n({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),r.body.appendChild(i)}catch(i){s(i)}}),Th=(t,e=document,r="text/javascript")=>new Promise((o,n)=>{let s=e.createElement("script");s.type=r,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),o()},s.onerror=()=>{e.body.removeChild(i),n(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),Oh=(t,e=document,r,o="text/javascript")=>{let n=new window.XMLHttpRequest;if(n.open("GET",t,!1),n.send(),n.status===200){let s=e.createElement("script");s.type=o,s.text=n.responseText,e.body.appendChild(s),typeof r=="function"&&r()}else throw new Error(`Failed to load the script ${t}`)},Rh=(t,e=!1,r=document,o="text/javascript")=>new Promise((n,s)=>{try{let i=r.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{n({status:!0})}),r.head.appendChild(i)}catch(i){s(i)}}),Ph=(t,e=!1,r=document,o="text/javascript",n="smbls-script")=>{try{let s=r.createElement("script");s.type=o,s.async=e,s.id=n,s.innerHTML=t,r.body.appendChild(s)}catch(s){console.warn(s)}}});function rA(t,e){if(!e||typeof e!="object")return t;let r=n=>{if(!eA(n))return n;let s=e[n];return s?.src?s.src:n},o={...t};for(let[n,s]of Object.entries(o))typeof s=="string"?o[n]=r(s):Array.isArray(s)&&(o[n]=s.map(i=>typeof i=="string"?r(i):i));return o}function Sl(t,e){if(!t||!e)return;let r=e.split("."),o=t;for(let n of r){if(o==null||typeof o!="object")return;o=o[n]}return o}function oA(t,e,r){let n=(e.config||e.settings||{}).polyglot||e.polyglot,s=r?.lang||n?.defaultLang||"en",a=(n?.translations||{})[s]||{},c=r?.state||{},l={...t};for(let[f,u]of Object.entries(l))typeof u!="string"||!u.includes("{{")||(l[f]=u.replace(/\{\{\s*([^|{}]+?)\s*(?:\|\s*(\w+)\s*)?\}\}/g,(d,h,g)=>{let p=h.trim();if(g==="polyglot")return a[p]??Sl(a,p)??d;if(g==="getLocalStateLang")return Sl(c,p+s)??d;let m=Sl(c,p);return m!==void 0?m:a[p]??Sl(a,p)??d}));return l}function rx(t){let e={...t};for(let[r,o]of Object.entries(e))if(typeof o=="function"){let n=o.toString(),s=n.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=n.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[r]=`{{ ${i[1]} | polyglot }}`;continue}let a=n.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[r]=`{{ ${a[1]} }}`;continue}delete e[r]}else if(typeof o=="string"){let n=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(n){e[r]=`{{ ${n[1]} | getLocalStateLang }}`;continue}let s=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | polyglot }}`;continue}if(o.includes("=>")&&o.includes("s.")){let i=o.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[r]=`{{ ${i[1]} }}`;continue}}}return e}function $h(t,e,r,{isProduction:o=!1,channel:n="production"}={}){let s=t.pages?.[e],i=S(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=rx(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=rx(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let p=t.name||t.key;p?o?d.title=p:n==="development"?d.title=`${p} / dev:symbo.ls`:n==="staging"?d.title=`${p} / staging:symbo.ls`:d.title=`${p} / symbo.ls`:d.title="Symbols demo"}d=oA(d,t,r),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=r?.actualPathname||e;if(d["og:url"]||d.url){let p=(d["og:url"]||d.url||"").replace(/\/$/,"");if(p&&h&&h!=="/"){let m=h.startsWith("/")?h:"/"+h;d["og:url"]=p+m}}d=rA(d,t.files);let g=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[p,m]of Object.entries(d))if(typeof m=="string"&&m.includes("{{")){let _=m.replace(/\{\{[^}]*\}\}/g,"").trim();_?d[p]=_:p==="title"?d[p]=g:delete d[p]}return d}var Rt,QE,fn,tA,kl,Dh,eA,ox=F(()=>{"use strict";Ot();Rt=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},QE=t=>Object.entries(t||{}).filter(([e,r])=>r!==void 0).map(([e,r])=>`${e}="${Rt(r)}"`).join(" "),fn=t=>{let e=5381,r=String(t);for(let o=0;o<r.length;o++)e=(e*33^r.charCodeAt(o))>>>0;return e.toString(36)},tA=new Set(["jsonLd","styles","scripts"]),kl=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let r of t.jsonLd){if(r==null)continue;let o=typeof r=="string"?r:JSON.stringify(r),n=String(o).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${fn(o)}">${n}<\/script>`)}if(Array.isArray(t.styles))for(let r of t.styles){if(r==null||!String(r).trim())continue;let o=String(r).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${fn(o)}">${o}</style>`)}if(Array.isArray(t.scripts))for(let r of t.scripts){if(!r)continue;let o=typeof r=="string",n=o?r:r.src;if(!n&&!r.body)continue;let s=[];n&&s.push(`src="${Rt(n)}"`),o||(r.type&&s.push(`type="${Rt(r.type)}"`),r.async&&s.push("async"),r.defer&&s.push("defer"),r.integrity&&s.push(`integrity="${Rt(r.integrity)}"`),r.crossorigin&&s.push(`crossorigin="${Rt(r.crossorigin)}"`),r.referrerpolicy&&s.push(`referrerpolicy="${Rt(r.referrerpolicy)}"`),r.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Rt(n||fn(r.body||""))}"`;if(!o&&r.body){let a=String(r.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${s.join(" ")}${i}>${a}<\/script>`)}else e.push(`<script ${s.join(" ")}${i}><\/script>`)}return e},Dh=(t,e)=>{e||(t={...t,robots:"noindex"});let r=Object.entries(t).reduce((o,[n,s])=>{if(!s&&s!==0&&s!==!1||tA.has(n))return o;if(n==="title")return o.push(`<title>${Rt(s)}</title>`),o;if(n==="canonical")return o.push(`<link rel="canonical" href="${Rt(s)}">`),o;if(n==="manifest")return o.push(`<link rel="manifest" href="${Rt(s)}">`),o;if(n==="favicon"||n==="favicons"||n==="icon"||n==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="string")o.push(`<link rel="icon" href="${Rt(f)}">`);else if(typeof f=="object"){let u=QE(f);/rel=/.test(u)?o.push(`<link ${u}>`):o.push(`<link rel="icon" ${u}>`)}}),o;if(n==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).filter(([d,h])=>h!==void 0).map(([d,h])=>`${d}="${Rt(h)}"`).join(" ");o.push(`<link rel="alternate" ${u}>`)}}),o;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")o.push(`<meta ${u}="${Rt(l)}" content="${Rt(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")o.push(`<meta ${u}="${Rt(l)}" content="${Rt(d)}">`);else if(typeof d=="object"){let h=Object.entries(d).filter(([g,p])=>p!==void 0).map(([g,p])=>`${g}="${Rt(p)}"`).join(" ");o.push(`<meta ${h}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([h,g])=>g!==void 0).map(([h,g])=>`${h}="${Rt(g)}"`).join(" ");o.push(`<meta ${d}>`)}};if(n.startsWith("http-equiv:")){let l=n.replace("http-equiv:","");return i(l,s,"http-equiv"),o}if(n.startsWith("itemprop:")){let l=n.replace("itemprop:","");return i(l,s,"itemprop"),o}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>n.startsWith(l));if(c){let l=n.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),o}if(n.startsWith("apple:")||n.startsWith("msapplication:")){let l=n.startsWith("apple:")?"apple-":"msapplication-",f=n.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),o}return i(n,s),o},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return r.push(...kl(t)),r.join(`
32
- `)},eA=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http")});var vl,Lh,nx=F(()=>{"use strict";Ot();vl=(t,e)=>(T(e)?e:Object.values(e)).reduce((r,o)=>Math.abs(o-t)<Math.abs(r-t)?o:r),Lh=(t,e)=>(t=parseFloat(t),S(e)&&(e=Object.values(e)),vl(t,e))});function un(t){let e=String(t||"").trim();if(!e)return{owner:sx,key:"",full:""};let r=null,o=e;if(e.includes("/")){let s=e.indexOf("/");r=e.slice(0,s),o=e.slice(s+1)}o=o.replace(/\.symbo\.ls$/iu,""),r||(r=sx);let n=o?`${r}/${o}`:"";return{owner:r,key:o,full:n}}async function Cl(t,e={}){if((e.provider||"kv")==="api")return ax(t,e);let o=await uA(t,e);return o||ax(t,e)}async function uA(t,e={}){let r=e.kvBaseUrl||nA,o=e.env||"production",n=`${r}/kv/${encodeURIComponent(t)}?env=${o}`;try{let s=await fetch(n,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function ax(t,e={}){let r=e.apiBaseUrl||sA,{key:o}=un(t);try{let n=`${r}/core/projects/libraries/available?search=${encodeURIComponent(o)}&limit=10`,s=await fetch(n,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(h=>{let{key:g}=un(h?.key);return g.toLowerCase()===o.toLowerCase()});if(!c?.id&&!c?._id)return null;let l=c.id||c._id,f=`${r}/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 cx(t,e={}){if(S(t))return t;if(w(t)){let{full:r}=un(t);if(!r)return null;try{let o=await Cl(r,e);return o||console.warn(`[smbls] Shared library "${r}" not found`),o}catch(o){return console.warn(`[smbls] Failed to fetch shared library "${r}":`,o.message),null}}return null}async function Fh(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async o=>{if(Di(o)){let n=await cx(lA(o),e);return n?{library:n,ignoreList:o.ignoreList}:null}return cx(o,e)}))).filter(Boolean)}var sx,nA,sA,Pi,lx,iA,aA,ix,cA,Ii,Mh,Di,lA,fA,$i,fx=F(()=>{"use strict";Ot();sx="system",nA="https://smbls-kv.nika-980.workers.dev",sA="https://api.symbols.app";Pi=(t,e,r,o)=>{for(let n in e){let s=o?`${o}/${n}`:n;r&&r.has(s)||(n in t?S(t[n])&&S(e[n])&&Pi(t[n],e[n],r,s):t[n]=e[n])}},lx=(t,e,r)=>{if(!S(t)||!e.size)return t;let o=`${r}/`,n=!1;for(let i of e)if(i.startsWith(o)){n=!0;break}if(!n)return t;let s={};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=`${r}/${i}`;e.has(a)||(s[i]=lx(t[i],e,a))}return s},iA=new Set,aA=new Set(["components","pages","functions","snippets","methods"]),ix=(t,e)=>e===""&&aA.has(t),cA=t=>t.replace(/\.js$/iu,""),Ii=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let r of t){if(!w(r))continue;let o=r.split("/").map(n=>cA(n.trim())).filter(Boolean).join("/");o&&e.add(o)}return e},Mh=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),Di=t=>S(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),lA=t=>t.library!==void 0?t.library:t.key??t.name,fA=(t,e,r)=>{let o=Ii(e.sharedLibIgnore);e.sharePages===!1&&o.add("pages");let n=o.size?new Set([...r,...o]):r;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&!(s==="sharePages"||s==="sharedLibIgnore")&&s!=="app"&&!n.has(s))if(S(e[s])&&S(t[s]))if(s==="designSystem")Pi(t[s],e[s],n,s);else for(let i in e[s])n.has(`${s}/${i}`)||(i in t[s]?ix(s,t[s][i])&&!ix(s,e[s][i])&&(t[s][i]=e[s][i]):t[s][i]=e[s][i]);else s in t||(t[s]=lx(e[s],n,s))},$i=(t,e)=>{if(!(!e||!e.length))for(let r=0;r<e.length;r++){let o=e[r],n=iA;Di(o)&&(n=Ii(o.ignoreList),o=o.library),S(o)&&fA(t,o,n)}}});var Nh,jh,Bh,Li,Uh,Mi,Vh,uo,ux=F(()=>{"use strict";Ot();Nh=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},jh=async t=>{try{let e=new Blob([t],{type:"text/javascript"}),r=new window.ClipboardItem({"text/plain":e});await navigator.clipboard.write([r]),console.log("JavaScript code copied to clipboard as text/javascript")}catch(e){console.error("Failed to copy JavaScript code: ",e)}},Bh=t=>t.replace(/[^a-zA-Z0-9_]/g,""),Li=t=>(typeof t!="string"&&(t=String(t||"")),t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,r){return r===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")),Uh=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),Mi=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Vh=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},uo=t=>{if(T(t))return t;if(w(t))return t.split(" ");if(S(t))return Object.values(t);if(Fe(t))return[t]}});var zh,dx=F(()=>{"use strict";zh=()=>{let t=document.styleSheets[0],e="";if(t)try{let r=t.cssRules||t.rules;for(let o=0;o<r.length;o++)e+=r[o].cssText}catch(r){console.error("Unable to access CSS rules. This may be due to CORS restrictions:",r)}else console.log("No stylesheets found in document.styleSheets[0].");return e}});var Gt,dn,Fi,Ni,px=F(()=>{"use strict";Gt=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let r=t.context;if(!r)return null;let o=r.assets&&r.assets[e]||r.files&&r.files[e];return o?typeof o=="string"?{src:o,type:null,variants:null}:typeof o=="object"&&typeof o.src=="string"?o:null:null},dn=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let r=t.some(n=>typeof n.width=="number"),o=[];for(let n of t)r&&typeof n.width=="number"?o.push(`${n.src} ${n.width}w`):r||(n.scale===1&&e?o.push(n.src):n.scale&&n.scale!==1&&o.push(`${n.src} ${n.scale}x`));return o.join(", ")},Fi=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(r=>r.format===t.type);return dn(e,{keepOneX:!1})},Ni=(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 r=new Map;for(let a of t.variants)r.has(a.format)||r.set(a.format,[]),r.get(a.format).push(a);let o=[];for(let[a,c]of r)a!==t.type&&o.push({tag:"source",attr:{type:a,srcset:dn(c,{keepOneX:!0})}});let n=r.get(t.type)||[],s=dn(n,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...o,{tag:"img",attr:i}]}});var El={};P(El,{CDN_PROVIDERS:()=>de,DOMQL_EVENTS:()=>zd,DOMQ_PROPERTIES:()=>br,ENV:()=>sp,HTML_TAGS:()=>Zo,METHODS:()=>Ko,METHODS_EXL:()=>Ds,NODE_ENV:()=>ve,OPTIONS:()=>ni,PACKAGE_MANAGER_TO_CDN:()=>Er,PARSED_DOMQ_PROPERTIES:()=>Is,PROPS_METHODS:()=>_r,STATE_METHODS:()=>oo,STATE_PROPERTIES:()=>Vd,SVG_TAGS:()=>p_,TYPES:()=>Cs,UNIVERSAL_RESERVED_KEYS:()=>xl,addCaching:()=>rl,addContext:()=>el,addExtend:()=>Rp,addExtends:()=>Kt,addItemAfterEveryElement:()=>Od,addProtoToArray:()=>Ts,addRef:()=>Zc,applyDependentState:()=>Yp,applyEvent:()=>cl,applyEventUpdate:()=>ll,applyExtends:()=>m_,applyProps:()=>Js,arrayContainsOtherArray:()=>Sd,arraysEqual:()=>Pd,arrayzeValue:()=>uo,buildImgSrcset:()=>Fi,buildSourcesAndImg:()=>Ni,cache:()=>th,call:()=>yh,captureSnapshot:()=>_h,checkForStateTypes:()=>Wp,checkIfInherits:()=>al,checkIfStringIsInArray:()=>$d,clone:()=>Wd,cloneAndMergeArrayExtend:()=>zs,cloneFunction:()=>hp,concatAddExtends:()=>Ap,copyJavaScriptToClipboard:()=>jh,copyStringToClipboard:()=>Nh,createBasedOnType:()=>Jc,createElement:()=>Hp,createElementExtends:()=>jc,createExtends:()=>Ws,createExtendsFromKeys:()=>Qo,createExtendsStack:()=>zc,createIfConditionFlag:()=>gp,createInheritedState:()=>qp,createKey:()=>Us,createNestedObject:()=>Zd,createNestedObjectByKeyPath:()=>Gp,createObjectWithoutPrototype:()=>Ic,createParent:()=>Qc,createPath:()=>tl,createProps:()=>Zs,createPropsStack:()=>Yc,createRoot:()=>zp,createScope:()=>Jp,createSnapshotId:()=>Bs,customDecodeURIComponent:()=>Ud,customEncodeURIComponent:()=>Bd,cutArrayAfterValue:()=>Ad,cutArrayBeforeValue:()=>Ed,debounce:()=>Vs,debounceOnContext:()=>up,decodeNewlines:()=>jd,deepClone:()=>ft,deepContains:()=>Xd,deepDefaults:()=>Pi,deepDestringifyFunctions:()=>fe,deepExtend:()=>Nc,deepMerge:()=>st,deepMergeExtends:()=>je,deepStringifyFunctions:()=>Ls,defineSetter:()=>gh,destringifyGlobalScope:()=>Fs,detectHeightOnInit:()=>vh,detectInfiniteLoop:()=>rp,document:()=>Q,encodeNewlines:()=>Nd,error:()=>lo,excludeKeysFromObject:()=>np,exec:()=>ut,extendCachedRegistry:()=>Tp,extendStackRegistry:()=>qs,extractArrayExtend:()=>Gs,fetchLibraryData:()=>Cl,fibonacciNumberByIndex:()=>Ch,filterArrays:()=>Id,filterArraysFast:()=>Dd,finalizeExtends:()=>Hc,findClosestNumber:()=>vl,findClosestNumberInFactory:()=>Lh,findInheritedState:()=>il,findKeyPosition:()=>Md,flattenExtend:()=>tn,formatDate:()=>kh,generateHash:()=>Lc,generateHeadArrayTags:()=>kl,generateKey:()=>js,generateMetaTags:()=>Dh,get:()=>dh,getCDNDirUrl:()=>wl,getCDNUrl:()=>Ee,getCapitalCaseKeys:()=>Dp,getCdnProviderFromConfig:()=>sn,getChildStateInKey:()=>sl,getChildren:()=>gi,getContext:()=>Si,getCookie:()=>xp,getDB:()=>Ai,getEmotionStylesheet:()=>zh,getExtendsInElement:()=>Pp,getExtendsStack:()=>Hs,getExtendsStackRegistry:()=>Fc,getFrequencyInArray:()=>kd,getHashedExtend:()=>Ks,getImportMapScript:()=>Sh,getInObjectByPath:()=>ep,getLocalStorage:()=>Sp,getNev:()=>lp,getPageMetadata:()=>$h,getParentStateInKey:()=>nl,getPath:()=>mi,getQuery:()=>Ti,getRef:()=>hh,getRoot:()=>_i,getRootContext:()=>wi,getRootData:()=>xi,getRootState:()=>bi,getRootStateInKey:()=>ol,getSpreadChildren:()=>$p,global:()=>_d,hasFunction:()=>Ne,hasHandlerPlugin:()=>Yo,hasOwnProperty:()=>Kd,hashContent:()=>fn,inheritChildExtends:()=>Uc,inheritChildPropsExtends:()=>Bc,inheritParentProps:()=>Qs,inheritRecursiveChildExtends:()=>Vc,initProps:()=>Bp,is:()=>Wt,isArray:()=>T,isBoolean:()=>Ac,isContextComponent:()=>Lp,isCyclic:()=>op,isDOMNode:()=>Ht,isDate:()=>Oc,isDefined:()=>bt,isDevelopment:()=>wr,isEmpty:()=>Rc,isEmptyObject:()=>Gd,isEqualDeep:()=>Pc,isFunction:()=>A,isHtmlElement:()=>ks,isLocal:()=>cp,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>an,isMethod:()=>bh,isMobile:()=>bp,isNode:()=>Qe,isNot:()=>wd,isNotProduction:()=>io,isNull:()=>Tc,isNumber:()=>Fe,isObject:()=>S,isObjectLike:()=>z,isPhoto:()=>Eh,isPolyglotWritableKey:()=>er,isProduction:()=>xr,isStaging:()=>ap,isState:()=>Kp,isString:()=>w,isStringFunction:()=>pp,isTest:()=>$c,isTesting:()=>ip,isUndefined:()=>Tt,isUniversallyReservedKey:()=>xh,isUnresolvableDependency:()=>fo,isValidDependencyMap:()=>cn,isValidHtmlTag:()=>vp,isWrappedLibrary:()=>Di,joinArrays:()=>Ho,jointStacks:()=>Op,keys:()=>bl,loadCssFile:()=>Rh,loadJavascript:()=>Ph,loadJavascriptFile:()=>Ah,loadJavascriptFileEmbedSync:()=>Oh,loadJavascriptFileSync:()=>Th,loadRemoteCSS:()=>Ih,loadRemoteScript:()=>ln,log:()=>mh,logGroupIf:()=>yp,logIf:()=>mp,lookdown:()=>fh,lookdownAll:()=>uh,lookup:()=>lh,lowercaseFirstLetter:()=>ro,makeObjectWithoutPrototype:()=>Yd,map:()=>Hd,mapStringsWithContextComponents:()=>Ys,markPolyglotSeeded:()=>Ue,matchesComponentNaming:()=>Be,memoize:()=>dp,merge:()=>gt,mergeSharedLibraries:()=>$i,nextElement:()=>vi,normalizeIgnoreList:()=>Ii,normalizeLibraryKey:()=>un,objectToString:()=>Ms,objectizeStringProperty:()=>Xs,overwrite:()=>Ns,overwriteDeep:()=>qt,overwriteShallow:()=>so,overwriteState:()=>Xp,parse:()=>_l,parseDeep:()=>pi,pickupElementFromProps:()=>Kc,pickupPropsFromElement:()=>qc,polyglotSeededKeys:()=>oi,previousElement:()=>Ci,propExists:()=>Np,propertizeElement:()=>Gc,propertizeUpdate:()=>Fp,remove:()=>z_,removeChars:()=>Bh,removeCookie:()=>wp,removeDuplicateProps:()=>ei,removeDuplicatesInArray:()=>Wo,removeFromArray:()=>vd,removeFromObject:()=>Jd,removeNestedKeyByPath:()=>Qd,removeValueFromArray:()=>As,removeValueFromArrayAll:()=>Td,reorderArrayByValues:()=>Rd,replaceLiteralsWithObjectFields:()=>eo,replaceOctalEscapeSequences:()=>Fd,resolveAsset:()=>Gt,resolveHandler:()=>Xo,resolveSharedLibraries:()=>Fh,returnValueAsText:()=>Xc,runPluginHook:()=>At,self:()=>xd,setActiveRootState:()=>yi,setCookie:()=>_p,setHashedExtend:()=>Mc,setInObjectByPath:()=>tp,setLocalStorage:()=>kp,setNodeStyles:()=>yl,setProps:()=>ph,setPropsPrototype:()=>ti,sharedLibrary:()=>Mh,splitPackageSpecifier:()=>Oi,spotByPath:()=>hi,srcsetFor:()=>dn,stringIncludesAny:()=>Rs,stringToObject:()=>qd,stripVersionRangePrefix:()=>Ri,swapItemsInArray:()=>Cd,syncProps:()=>ri,toCamelCase:()=>Li,toDashCase:()=>Mi,toDescriptionCase:()=>Vh,toTitleCase:()=>Uh,toggleFullscreen:()=>wh,triggerEventOn:()=>Sr,triggerEventOnUpdate:()=>Zp,trimStringFromSymbols:()=>Ld,unstackArrayOfObjects:()=>Es,update:()=>jp,updateProps:()=>Up,variables:()=>Ei,verbose:()=>rn,warn:()=>ki,window:()=>v});var R=F(()=>{"use strict";Dc();fp();Ot();tr();Jo();qo();vs();f_();u_();Ps();Ss();d_();Cp();Ip();Vp();Wc();S_();v_();Go();C_();q_();eh();K_();Qp();G_();Y_();X_();J_();Z_();Q_();tx();ex();ox();nx();fx();ux();dx();px()});var Yv=td((yV,Gv)=>{var as=1e3,cs=as*60,ls=cs*60,Lo=ls*24,iP=Lo*7,aP=Lo*365.25;Gv.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return cP(t);if(r==="number"&&isFinite(t))return e.long?fP(t):lP(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function cP(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 r=parseFloat(e[1]),o=(e[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return r*aP;case"weeks":case"week":case"w":return r*iP;case"days":case"day":case"d":return r*Lo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ls;case"minutes":case"minute":case"mins":case"min":case"m":return r*cs;case"seconds":case"second":case"secs":case"sec":case"s":return r*as;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function lP(t){var e=Math.abs(t);return e>=Lo?Math.round(t/Lo)+"d":e>=ls?Math.round(t/ls)+"h":e>=cs?Math.round(t/cs)+"m":e>=as?Math.round(t/as)+"s":t+"ms"}function fP(t){var e=Math.abs(t);return e>=Lo?vu(t,e,Lo,"day"):e>=ls?vu(t,e,ls,"hour"):e>=cs?vu(t,e,cs,"minute"):e>=as?vu(t,e,as,"second"):t+" ms"}function vu(t,e,r,o){var n=e>=r*1.5;return Math.round(t/r)+" "+o+(n?"s":"")}});var Jv=td((bV,Xv)=>{function uP(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=n,r.enabled=a,r.humanize=Yv(),r.destroy=l,Object.keys(t).forEach(f=>{r[f]=t[f]}),r.names=[],r.skips=[],r.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 r.colors[Math.abs(u)%r.colors.length]}r.selectColor=e;function r(f){let u,d=null,h,g;function p(...m){if(!p.enabled)return;let _=p,b=Number(new Date),y=b-(u||b);_.diff=y,_.prev=u,_.curr=b,u=b,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let x=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(E,O)=>{if(E==="%%")return"%";x++;let $=r.formatters[O];if(typeof $=="function"){let D=m[x];E=$.call(_,D),m.splice(x,1),x--}return E}),r.formatArgs.call(_,m),(_.log||r.log).apply(_,m)}return p.namespace=f,p.useColors=r.useColors(),p.color=r.selectColor(f),p.extend=o,p.destroy=r.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,g=r.enabled(f)),g),set:m=>{d=m}}),typeof r.init=="function"&&r.init(p),p}function o(f,u){let d=r(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function n(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let u=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?r.skips.push(d.slice(1)):r.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=[...r.names,...r.skips.map(u=>"-"+u)].join(",");return r.enable(""),f}function a(f){for(let u of r.skips)if(s(f,u))return!1;for(let u of r.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 r.enable(r.load()),r}Xv.exports=uP});var Zv=td((Qt,Cu)=>{Qt.formatArgs=pP;Qt.save=hP;Qt.load=gP;Qt.useColors=dP;Qt.storage=mP();Qt.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`."))}})();Qt.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 dP(){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 pP(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Cu.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(o=r))}),t.splice(o,0,e)}Qt.log=console.debug||console.log||(()=>{});function hP(t){try{t?Qt.storage.setItem("debug",t):Qt.storage.removeItem("debug")}catch{}}function gP(){let t;try{t=Qt.storage.getItem("debug")||Qt.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function mP(){try{return localStorage}catch{}}Cu.exports=Jv()(Qt);var{formatters:yP}=Cu.exports;yP.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Bb={};P(Bb,{ANIMATION_PROPS:()=>rm,ARIA_ROLES:()=>_T,ATTR_TRANSFORMS:()=>Jg,BLOCK_PROPS:()=>om,CDN_PROVIDERS:()=>de,CONFIG:()=>yo,CONFIG_MERGE_EXL:()=>re,CSS_NAMED_COLOR_HEX:()=>Al,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_PROPS_REGISTRY:()=>xt,CSS_UNITS:()=>zo,DEFAULT_CONFIG:()=>Da,DEFAULT_CSS_PROPERTIES_LIST:()=>vt,DELEGATED_EVENTS:()=>Ln,DESIGN_SYSTEM_OPTIONS:()=>Py,DOMQL_EVENTS:()=>zd,DOMQ_PROPERTIES:()=>br,DOM_EVENTS:()=>ew,ENV:()=>sp,FACTORY:()=>ee,FLEX_PROPS:()=>fm,FONT_PROPS:()=>nm,GRID_PROPS:()=>um,HOST_REGISTERED_PACKAGES:()=>nv,HTML_ATTRIBUTES:()=>Sf,HTML_TAGS:()=>Zo,LIFECYCLE_EVENTS:()=>Lr,METHODS:()=>Ko,METHODS_EXL:()=>Ds,MISC_PROPS:()=>sm,MIXINS:()=>bf,NODE_ENV:()=>ve,OPTIONS:()=>ni,PACKAGE_MANAGER_TO_CDN:()=>Er,PARSED_DOMQ_PROPERTIES:()=>Is,POSITION_PROPS:()=>im,PROPS_METHODS:()=>_r,REGISTRY:()=>jt,RESERVED_STORE_METHODS:()=>Jb,ROUTER_OPTIONS:()=>Wf,SIGNAL_ENGINE_KEY:()=>Uo,SIGNAL_INSTANCES_KEY:()=>jo,STANDARD_SCHEME_QUERIES:()=>Jl,STATE_PROPERTIES:()=>Vd,STORE_METHOD_NAMES:()=>Xb,SVG_TAGS:()=>Dn,THEME_PROPS:()=>lm,TIMING_PROPS:()=>Ca,TYPES:()=>Cs,UNIVERSAL_RESERVED_KEYS:()=>xl,VALUE_TRANSFORMERS:()=>cf,VERSION:()=>Qb,__resetSignalEngine:()=>md,__resetSignalInstances:()=>gd,__resetStateShadowWarnings:()=>Zb,activateConfig:()=>bx,addCaching:()=>rl,addContext:()=>el,addDelegatedEvent:()=>ka,addExtend:()=>Rp,addExtends:()=>Kt,addItemAfterEveryElement:()=>Od,addMethods:()=>Un,addProtoToArray:()=>Ts,addRef:()=>Zc,aliasCaseVariants:()=>wn,animation:()=>hg,appendSVGSprite:()=>ya,appendSvgIconsSprite:()=>So,applyAttrTransforms:()=>Qg,applyCSS:()=>vy,applyDependentState:()=>Yp,applyDocument:()=>ma,applyEvent:()=>cl,applyEventUpdate:()=>ll,applyExtends:()=>Fn,applyHeadings:()=>ef,applyInitialState:()=>Pf,applyMediaSequenceVars:()=>Tr,applyProps:()=>Js,applyReset:()=>ba,applySequenceGlobalVars:()=>ta,applySequenceVars:()=>ir,applySpacingSequence:()=>oa,applyStateMethods:()=>ce,applyTimingSequence:()=>ga,applyTrueProps:()=>pm,applyTypographySequence:()=>da,arrayContainsOtherArray:()=>Sd,arraysEqual:()=>Pd,arrayzeValue:()=>uo,assertEmitIntegrity:()=>Ug,batch:()=>kc,breakpoints:()=>dg,buildImgSrcset:()=>Fi,buildSourcesAndImg:()=>Ni,buildThemeVarStyles:()=>Yn,cache:()=>th,cacheNode:()=>$r,call:()=>yh,callStateMethod:()=>Aa,camelToAttr:()=>Fr,camelToLowerAttr:()=>rw,captureSnapshot:()=>_h,changeGlobalTheme:()=>lf,changeLightness:()=>Yh,checkAttributeByTagName:()=>Nr,checkEventFunctions:()=>Zg,checkForStateTypes:()=>Wp,checkIfBoxSize:()=>ra,checkIfInherits:()=>al,checkIfStringIsInArray:()=>$d,class:()=>_g,clone:()=>Wd,cloneAndMergeArrayExtend:()=>zs,cloneFunction:()=>hp,color:()=>sg,colorStringToRgbaArray:()=>pe,components:()=>Kn,compositeOverBackdrop:()=>ho,concatAddExtends:()=>Ap,contrastRatio:()=>gn,convertSvgToSymbol:()=>ea,copyJavaScriptToClipboard:()=>jh,copyStringToClipboard:()=>Nh,create:()=>jb,createAsync:()=>oI,createBasedOnType:()=>Jc,createComputed:()=>Kb,createConfig:()=>Ki,createDefine:()=>lk,createEffect:()=>Z,createElement:()=>Hp,createElementExtends:()=>jc,createExtends:()=>Ws,createExtendsFromKeys:()=>Qo,createExtendsStack:()=>zc,createHTMLNode:()=>In,createIfConditionFlag:()=>gp,createInheritedState:()=>qp,createKey:()=>Us,createNestedObject:()=>Zd,createNestedObjectByKeyPath:()=>Gp,createObjectWithoutPrototype:()=>Ic,createParent:()=>Qc,createPath:()=>tl,createProps:()=>Zs,createPropsStack:()=>Yc,createRoot:()=>zp,createScope:()=>Jp,createScopeStore:()=>Cc,createSignal:()=>xs,createSkeleton:()=>sI,createSnapshotId:()=>Bs,createState:()=>bm,createStore:()=>Xe,createSync:()=>nI,css:()=>_e,cssMediaVars:()=>Wl,cssVars:()=>Hl,customDecodeURIComponent:()=>Ud,customEncodeURIComponent:()=>Bd,cutArrayAfterValue:()=>Ad,cutArrayBeforeValue:()=>Ed,debounce:()=>Vs,debounceOnContext:()=>up,decodeNewlines:()=>jd,deepClone:()=>ft,deepContains:()=>Xd,deepDefaults:()=>Pi,deepDestringifyFunctions:()=>fe,deepExtend:()=>Nc,deepMerge:()=>st,deepMergeExtends:()=>je,deepStringifyFunctions:()=>Ls,defaultDefine:()=>Jn,defineResolvedThemeSignal:()=>xn,defineSetter:()=>gh,defineThemeSignal:()=>_n,destringifyGlobalScope:()=>Fs,destroy:()=>ja,detectHeightOnInit:()=>vh,detectInfiniteLoop:()=>rp,detectTag:()=>Dr,devices:()=>pg,dispose:()=>jr,encodeNewlines:()=>Nd,error:()=>lo,excludeKeysFromObject:()=>np,exec:()=>ut,executeAttr:()=>kT,exetuteClassPerComponent:()=>QT,extendCachedRegistry:()=>Tp,extendStackRegistry:()=>qs,extractArrayExtend:()=>Gs,extractConditionalAttrs:()=>ET,fetchLibraryData:()=>Cl,fibonacciNumberByIndex:()=>Ch,filterArrays:()=>Id,filterArraysFast:()=>Dd,filterAttributesByTagName:()=>ST,finalizeExtends:()=>Hc,findClosestNumber:()=>vl,findClosestNumberInFactory:()=>Lh,findHeadingLetter:()=>Yl,findHeadings:()=>Qi,findInheritedState:()=>il,findKeyPosition:()=>Md,flattenExtend:()=>tn,font:()=>Qh,fontFace:()=>rg,fontFamily:()=>tg,fontFamilyTypes:()=>eg,formatDate:()=>kh,generateHash:()=>Lc,generateHeadArrayTags:()=>kl,generateKey:()=>js,generateMetaTags:()=>Dh,generateSequence:()=>Yt,generateSequencePosition:()=>vg,generateSprite:()=>Sn,generateSubSequence:()=>Ji,get:()=>dh,getActiveConfig:()=>C,getActiveDocument:()=>gf,getActiveLang:()=>Hr,getCDNDirUrl:()=>wl,getCDNUrl:()=>Ee,getCacheSize:()=>zg,getCapitalCaseKeys:()=>Dp,getCdnProviderFromConfig:()=>sn,getChildStateInKey:()=>sl,getChildren:()=>gi,getColor:()=>et,getColorShade:()=>Il,getContext:()=>Si,getCookie:()=>xp,getDB:()=>Ai,getDefaultOrFirstKey:()=>go,getEmitStats:()=>mf,getEmotionStylesheet:()=>zh,getExtendsInElement:()=>Pp,getExtendsStack:()=>Hs,getExtendsStackRegistry:()=>Fc,getFnPrefixAndValue:()=>sr,getFontFace:()=>Jh,getFontFaceEach:()=>mo,getFontFaceEachString:()=>Bl,getFontFaceString:()=>zi,getFontFamily:()=>ua,getFontFormat:()=>Nl,getFontSizeByKey:()=>pa,getFrequencyInArray:()=>kd,getHashedExtend:()=>Ks,getImportMapScript:()=>Sh,getInObjectByPath:()=>ep,getLanguages:()=>Va,getLocalStateLang:()=>Ka,getLocalStorage:()=>Sp,getMediaColor:()=>It,getMediaTheme:()=>me,getNev:()=>lp,getObserver:()=>vc,getPageMetadata:()=>$h,getParentStateInKey:()=>nl,getPath:()=>mi,getQuery:()=>Ti,getRef:()=>hh,getResolvedThemeSignal:()=>yx,getRgbTone:()=>ze,getRoot:()=>_i,getRootContext:()=>wi,getRootData:()=>xi,getRootState:()=>bi,getRootStateInKey:()=>ol,getSafeInk:()=>Zl,getSafeInkInfo:()=>Tg,getSequenceValue:()=>Zi,getSequenceValueBySymbols:()=>Gl,getSequenceValuePropertyPair:()=>We,getShadow:()=>sa,getShapeByKey:()=>ha,getSignals:()=>Yb,getSpacingBasedOnRatio:()=>Te,getSpacingByKey:()=>St,getSpreadChildren:()=>$p,getSubratio:()=>Xi,getSubratioDifference:()=>Yi,getSystemGlobalTheme:()=>xe,getTheme:()=>aa,getThemeSignal:()=>mx,getTimingByKey:()=>ne,getTimingFunction:()=>ye,global:()=>_d,gradient:()=>ig,grid:()=>bg,hasFunction:()=>Ne,hasHandlerPlugin:()=>Yo,hasOwnProperty:()=>Kd,hashContent:()=>fn,hexToRgb:()=>Wh,hexToRgbArray:()=>Tl,hexToRgba:()=>Kh,hslToRgb:()=>Pl,icons:()=>lg,inheritChildExtends:()=>Uc,inheritChildPropsExtends:()=>Bc,inheritParentProps:()=>Qs,inheritRecursiveChildExtends:()=>Vc,init:()=>ur,initPolyglot:()=>Gf,initProps:()=>Bp,injectGlobal:()=>kt,is:()=>Wt,isArray:()=>T,isBoolean:()=>Ac,isCSSVar:()=>mt,isContextComponent:()=>Lp,isCyclic:()=>op,isDOMNode:()=>Ht,isDate:()=>Oc,isDefined:()=>bt,isDevelopment:()=>wr,isDomDocument:()=>Je,isEmpty:()=>Rc,isEmptyObject:()=>Gd,isEnumeratedTrueFalseAttr:()=>cr,isEqualDeep:()=>Pc,isFunction:()=>A,isGoogleFontsUrl:()=>mn,isHostObject:()=>Ze,isHtmlElement:()=>ks,isLocal:()=>cp,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>an,isMethod:()=>bh,isMobile:()=>bp,isNode:()=>Qe,isNot:()=>wd,isNotProduction:()=>io,isNull:()=>Tc,isNumber:()=>Fe,isObject:()=>S,isObjectLike:()=>z,isPhoto:()=>Eh,isPolyglotWritableKey:()=>er,isProduction:()=>xr,isRawUnitValue:()=>ws,isResolvedColor:()=>Ae,isScalingUnit:()=>to,isStaging:()=>ap,isState:()=>Kp,isStore:()=>yt,isString:()=>w,isStringFunction:()=>pp,isSvgTag:()=>$n,isTest:()=>$c,isTesting:()=>ip,isTracking:()=>xm,isUndefined:()=>Tt,isUniversallyReservedKey:()=>xh,isUnresolvableDependency:()=>fo,isValidDependencyMap:()=>cn,isValidHtmlTag:()=>vp,isValidTag:()=>Pn,isWasmLoaded:()=>Y0,isWrappedLibrary:()=>Di,isWritableFamilyBucket:()=>bd,joinArrays:()=>Ho,jointStacks:()=>Op,keyframes:()=>Rn,keys:()=>bl,linearChannelToSrgb:()=>Ll,loadCssFile:()=>Rh,loadJavascript:()=>Ph,loadJavascriptFile:()=>Ah,loadJavascriptFileEmbedSync:()=>Oh,loadJavascriptFileSync:()=>Th,loadRemoteCSS:()=>Ih,loadRemoteScript:()=>ln,loadTranslations:()=>Ha,loadWasm:()=>G0,log:()=>mh,logGroupIf:()=>yp,logIf:()=>mp,lookdown:()=>fh,lookdownAll:()=>uh,lookup:()=>lh,lowercaseFirstLetter:()=>ro,makeObjectWithoutPrototype:()=>Yd,map:()=>Hd,mapStringsWithContextComponents:()=>Ys,markPolyglotSeeded:()=>Ue,matchesComponentNaming:()=>Be,media:()=>og,memoize:()=>dp,merge:()=>gt,mergeSharedLibraries:()=>$i,mixTwoColors:()=>Hh,mixTwoRgb:()=>Gh,mixTwoRgba:()=>Dl,nextElement:()=>vi,normalizeIgnoreList:()=>Ii,normalizeLibraryKey:()=>un,numToLetterMap:()=>He,objectToString:()=>Ms,objectizeStringProperty:()=>Xs,oklabToLinearSrgb:()=>Ml,oklabToOklch:()=>Bi,oklchToGamutSafeSrgb:()=>Ui,oklchToOklab:()=>Fl,opacify:()=>hn,overwrite:()=>Ns,overwriteDeep:()=>qt,overwriteShallow:()=>so,overwriteState:()=>Xp,parkHostObject:()=>yr,parse:()=>_l,parseColorToken:()=>Lt,parseDeep:()=>pi,pickupElementFromProps:()=>Kc,pickupPropsFromElement:()=>qc,polyglotFunctions:()=>oc,polyglotPlugin:()=>Qn,polyglotSeededKeys:()=>oi,popConfig:()=>tt,popStaticCssPass:()=>cm,previousElement:()=>Ci,propExists:()=>Np,propertizeElement:()=>Gc,propertizeUpdate:()=>Fp,pushConfig:()=>it,pushStaticCssPass:()=>am,quietColorProbe:()=>bo,refreshContextProto:()=>Ef,registerEvent:()=>Mn,registerHostPackages:()=>sv,registerSignalInstance:()=>Bo,reinit:()=>ky,relativeLuminance:()=>po,remove:()=>Bn,removeChars:()=>Bh,removeCookie:()=>wp,removeDelegatedEvent:()=>va,removeDuplicateProps:()=>ei,removeDuplicatesInArray:()=>Wo,removeFromArray:()=>vd,removeFromObject:()=>Jd,removeNestedKeyByPath:()=>Qd,removeValueFromArray:()=>As,removeValueFromArrayAll:()=>Td,reorderArrayByValues:()=>Rd,replaceLiteralsWithObjectFields:()=>eo,replaceOctalEscapeSequences:()=>Fd,resetEmitStats:()=>Bg,resolveAsset:()=>Gt,resolveBorderValue:()=>oe,resolveColorRgb:()=>_o,resolveColorsInGradient:()=>xa,resolveConfigDocument:()=>Vo,resolveFileSource:()=>Xg,resolveFileUrl:()=>he,resolveHandler:()=>Xo,resolvePropValue:()=>Mr,resolveShadowValue:()=>xo,resolveSharedLibraries:()=>Fh,returnSubThemeOrDefault:()=>Xh,returnValueAsText:()=>Xc,rgbArrayToHex:()=>Ol,rgbToHSL:()=>Rl,rgbToHex:()=>qh,runPluginHook:()=>At,runThroughMedia:()=>tf,scratchDefaultConfig:()=>bn,scratchSystem:()=>En,scratchUtils:()=>Or,self:()=>xd,semanticIcons:()=>fg,sequence:()=>nr,serializeAttrValue:()=>Ke,set:()=>ko,setActiveConfig:()=>ql,setActiveDocument:()=>jg,setActiveRootState:()=>yi,setAdaptiveSchemeVar:()=>Pr,setClass:()=>iO,setClassname:()=>t1,setColor:()=>Rr,setCookie:()=>_p,setCssEngineHook:()=>zf,setCustomFont:()=>Vi,setCustomFontMedia:()=>Ar,setEach:()=>Lg,setFont:()=>fa,setFontFamily:()=>vn,setFontImport:()=>yn,setGradient:()=>kn,setHashedExtend:()=>Mc,setInCustomFontMedia:()=>jl,setInObjectByPath:()=>tp,setLang:()=>Wa,setLocalStorage:()=>kp,setMediaTheme:()=>la,setNodeStyles:()=>yl,setObserver:()=>Gb,setProps:()=>ph,setPropsPrototype:()=>ti,setSVG:()=>Cn,setScalingVar:()=>Gi,setShadow:()=>Ir,setSubScalingVar:()=>Kl,setSvgIcon:()=>wo,setTheme:()=>ca,setValue:()=>$g,setVariables:()=>Cg,setWasmEngine:()=>Sa,shadow:()=>cg,shape:()=>Sg,sharedLibrary:()=>Mh,sizes:()=>wg,spacing:()=>ng,splitPackageSpecifier:()=>Oi,splitSpacedValue:()=>na,splitTopLevelCommas:()=>or,splitTransition:()=>af,spotByPath:()=>hi,srcsetFor:()=>dn,srgbChannelToLinear:()=>$l,srgbToOklab:()=>ji,stringIncludesAny:()=>Rs,stringToObject:()=>qd,stripVersionRangePrefix:()=>Ri,svg:()=>gg,svgData:()=>mg,swapItemsInArray:()=>Cd,syncProps:()=>ri,templates:()=>yg,theme:()=>ag,timing:()=>ug,toCamel:()=>qi,toCamelCase:()=>Li,toDashCase:()=>Mi,toDescriptionCase:()=>Vh,toLinearChannel:()=>pn,toTitleCase:()=>Uh,toggleFullscreen:()=>wh,transformBackgroundImage:()=>nf,transformBorder:()=>qe,transformBorderRadius:()=>ar,transformBoxShadow:()=>_a,transformClassname:()=>uw,transformDuration:()=>wa,transformShadow:()=>of,transformSize:()=>_t,transformSizeRatio:()=>N,transformTextStroke:()=>rf,transformTransition:()=>Dg,transformersByPrefix:()=>hm,transfromGap:()=>sf,translate:()=>za,triggerEventOn:()=>Sr,triggerEventOnUpdate:()=>Zp,trimStringFromSymbols:()=>Ld,typography:()=>Hi,unit:()=>Zh,unstackArrayOfObjects:()=>Es,update:()=>Nn,updateProps:()=>Up,updateVars:()=>sO,upsertTranslation:()=>qa,useCssInProps:()=>ae,useHostState:()=>_m,usePropsAsCSS:()=>lw,useSelectorsAsCSS:()=>fw,variables:()=>Ei,vars:()=>xg,verbose:()=>rn,warn:()=>ki,warnStateKeyShadowsMethod:()=>Ec,window:()=>v,wrapHoverRule:()=>Oe});module.exports=WC(Bb);var yd={};P(yd,{RESERVED_STORE_METHODS:()=>Jb,SIGNAL_ENGINE_KEY:()=>Uo,SIGNAL_INSTANCES_KEY:()=>jo,STORE_METHOD_NAMES:()=>Xb,VERSION:()=>Qb,__resetSignalEngine:()=>md,__resetSignalInstances:()=>gd,__resetStateShadowWarnings:()=>Zb,batch:()=>kc,createComputed:()=>Kb,createEffect:()=>Z,createScopeStore:()=>Cc,createSignal:()=>xs,createStore:()=>Xe,getObserver:()=>vc,getSignals:()=>Yb,isStore:()=>yt,registerSignalInstance:()=>Bo,setObserver:()=>Gb,warnStateKeyShadowsMethod:()=>Ec});var ad={};P(ad,{WRITE_JOURNAL:()=>ms,batch:()=>bs,createComputed:()=>KC,createEffect:()=>GC,createSignal:()=>Le,getObserver:()=>sd,journalWrite:()=>ys,setObserver:()=>qC});var zt=null,mc=0,yc=[],sd=()=>zt,qC=t=>{zt=t},bc=0,ed=[];function Le(t){let e=new Set;function r(){return zt&&(e.add(zt),zt._sources.add(s)),t}function o(i){i!==t&&(t=i,tE(e))}function n(){return t}let s={get:r,set:o,peek:n,_subscribers:e,_type:"signal"};return s}function KC(t){let e,r=!0,o=new Set,n={_sources:new Set,_type:"computed",_subscribers:o,_execute(){nd(n);let s=zt;zt=n;try{e=t(),r=!1}finally{zt=s}},_notify(){r=!0,o.size>0&&Wb(o)},get(){return zt&&(o.add(zt),zt._sources.add(n)),r&&n._execute(),e},peek(){return r&&n._execute(),e}};return n._execute(),n}var ke=new Set,rd=!1,ms=[];function ys(t){ms.push(t),ms.length>32&&ms.shift()}function GC(t,e){let r=e?.depth??0,o={_sources:new Set,_type:"effect",_depth:r,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(o._disposed)return;nd(o);let n=zt;zt=o;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{zt=n}},_notify(){o._disposed||(mc>0?yc.push(o):bc>0?ed.push(o):id(o))},dispose(){o._disposed=!0,nd(o)}};return o._execute(),o}function bs(t){mc++;try{t()}finally{mc--,mc===0&&QC()}}var od=!1,Vb=1e3,YC=8,XC=256,JC=4;function zb(){return typeof performance<"u"?performance.now():Date.now()}function id(t){ke.add(t),!od&&(rd||(rd=!0,queueMicrotask(Hb)))}var No=[];function ZC(){if(ke.size===1){let[e]=ke;return ke.clear(),e._disposed?0:(e._execute(),1)}No.length=0;for(let e of ke)No.push(e);ke.clear(),No.sort((e,r)=>e._depth-r._depth);let t=0;for(let e=0;e<No.length;e++){let r=No[e];r._disposed||(r._execute(),t++)}return No.length=0,t}function Hb(t=0,e=0){if(rd=!1,ke.size===0)return;od=!0;let r=zb(),o=!1;try{for(;ke.size>0;){if(++t>Vb){let n=new Map;for(let c of ke){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",n.set(l,(n.get(l)||0)+1),n.size>=12)break}let s=[...n.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of ms)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",Vb,"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>"),ke.clear();break}if(e+=ZC(),ke.size>0&&(e>=XC||t>=JC)&&zb()-r>YC){o=!0,setTimeout(()=>Hb(t,e),0);break}}}finally{o||(od=!1)}}function QC(){for(let t=0;t<yc.length;t++)id(yc[t]);yc.length=0}function Wb(t){bc++;try{for(let e of t)e._notify()}finally{if(bc--,bc===0&&ed.length>0){let e=ed.splice(0);for(let r=0;r<e.length;r++)id(e[r])}}}function tE(t){Wb(t)}function nd(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var hd={};P(hd,{RESERVED_STORE_METHODS:()=>_s,STORE_METHOD_NAMES:()=>pd,__resetStateShadowWarnings:()=>eE,createScopeStore:()=>sE,createStore:()=>_c,getSignals:()=>nE,isStore:()=>oE,warnStateKeyShadowsMethod:()=>dd});var Me=Symbol("store"),xc=Symbol("signals"),pd=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],_s=new Set(pd),ud=new Set,cd=(t,e)=>t?t+"."+e:String(e);function dd(t,e){let r=(e||"")+"::"+t;if(ud.has(r))return;ud.add(r);let o=e?`state.${e}`:"state",n=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${o}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${o}.${t}(\u2026)" no longer reaches the store method on this node. Use "${o}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${pd.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(n)}function eE(){ud.clear()}var ld=t=>!t||typeof t!="object"||Array.isArray(t)||t[Me]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!wc(t),rE=12,wc=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function Sc(t,e,r){if(t===e)return!0;if(r>rE)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!Sc(t[o],e[o],r+1))return!1;return!0}if(wc(t)&&wc(e)){let o=Object.keys(t),n=Object.keys(e);if(o.length!==n.length)return!1;for(let s of o)if(!Object.prototype.hasOwnProperty.call(e,s)||!Sc(t[s],e[s],r+1))return!1;return!0}return!1}function _c(t,e,r,o){r===void 0&&(r=0),o===void 0&&(o="");let n={},s={},i=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let b in t){if(b==="__proto__"||!Object.prototype.hasOwnProperty.call(t,b))continue;if(b.startsWith("__")){s[b]=t[b];continue}_s.has(b)&&dd(b,o);let y=t[b];r<i&&y&&typeof y=="object"&&!ld(y)?(s[b]=y,n[b]=Le(_c(y,e,r+1,cd(o,b)))):(s[b]=y,n[b]=Le(y))}let a=new Proxy(s,{get(b,y){if(y===Me)return!0;if(y===xc)return n;if(y==="__raw")return b;if(y==="$update")return c;if(y==="$parse")return f;if(y==="$clean")return u;if(y==="$keys")return d;if(y==="$values")return h;if(y==="$replace")return g;if(y==="$add")return p;if(y==="$remove")return m;if(y==="$destroy")return _;if(y==="$quietUpdate")return l;if(_s.has(y)&&!Object.prototype.hasOwnProperty.call(n,y))switch(y){case"update":return c;case"parse":return f;case"clean":return u;case"keys":return d;case"values":return h;case"replace":return g;case"add":return p;case"remove":return m;case"destroy":return _;case"quietUpdate":return l}if(y==="__element")return b.__element;if(y==="parent")return b.parent;if(y==="root")return b.root;if(Object.prototype.hasOwnProperty.call(n,y)){let k=n[y].get();if(k!==void 0||!(y!=="root"&&b.root&&b.root!==a))return k}if(b[y]!==void 0)return b[y];let x=typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&sd()!=null;if(y!=="root"&&b.root&&b.root!==a){let k=b.root[y];return x&&!Object.prototype.hasOwnProperty.call(n,y)&&(n[y]=Le(void 0),n[y].get()),k}if(x)return n[y]=Le(void 0),n[y].get()},set(b,y,x){if(y==="__proto__")return!1;if(y==="__element"||y==="parent"||y==="root"||typeof y=="string"&&y.startsWith("__")&&!Object.prototype.hasOwnProperty.call(n,y))return b[y]=x,!0;_s.has(y)&&dd(y,o);let k=cd(o,y);if(Object.prototype.hasOwnProperty.call(n,y))if(x&&typeof x=="object"&&!ld(x)){if(x===b[y])return!0;let E=n[y].peek(),O=E&&E[Me]?E.$parse():E;if(Sc(x,O,0))return!0;b[y]=x,ys(k),n[y].set(_c(x,e,r+1,k))}else{if(Array.isArray(x)&&x!==b[y]&&Array.isArray(n[y].peek())&&Sc(x,n[y].peek(),0))return!0;n[y].peek()!==x&&ys(k),b[y]=x,n[y].set(x)}else b[y]=x,x&&typeof x=="object"&&!ld(x)?n[y]=Le(_c(x,e,r+1,k)):n[y]=Le(x);return!0},has(b,y){return typeof y=="string"&&y.charCodeAt(0)===36&&_s.has(y.slice(1))?!0:y in n||y in b},ownKeys(b){return Object.keys(n)},getOwnPropertyDescriptor(b,y){return y in n?{enumerable:!0,configurable:!0,value:n[y].peek()}:Object.getOwnPropertyDescriptor(b,y)},deleteProperty(b,y){return n[y]&&(n[y].peek()!==void 0&&ys(cd(o,y)),n[y].set(void 0),delete n[y]),delete b[y],!0}});function c(b,y){bs(()=>{for(let k in b)k!=="__proto__"&&(a[k]=b[k])});let x=s.__element;return x&&x.onUpdate&&!y?.quiet&&x.onUpdate(x,a,x.context),a}function l(b){return c(b,{quiet:!0})}function f(b){if(b||(b=new Set),b.has(a))return"[Circular]";b.add(a);let y={};for(let x in n){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let k=n[x].peek();k&&k[Me]?y[x]=k.$parse(b):y[x]=k}return y}function u(){return bs(()=>{for(let b in n)delete a[b]}),a}function d(){return Object.keys(n)}function h(){return Object.keys(n).map(b=>n[b].peek())}function g(b){return bs(()=>{for(let y in n)y in b||delete a[y];for(let y in b)y!=="__proto__"&&(a[y]=b[y])}),a}function p(b,y){let x=Object.prototype.hasOwnProperty.call(n,b)?n[b].peek():s[b];if(Array.isArray(x))return a[b]=[...x,y],a;if(x&&typeof x=="object"&&!Array.isArray(x)){if(wc(y))x[Me]?x.$update(y):a[b]={...x,...y};else{let k=String(Object.keys(x).length);x[Me]?x.$update({[k]:y}):a[b]={...x,[k]:y}}return a}return a[b]=y,a}function m(b){return delete a[b],a}function _(){u(),s.__element=null,s.parent=null}return a}function oE(t){return t&&t[Me]===!0}function nE(t){return t[xc]}function sE(t,e){let r={},o={};if(t&&typeof t=="object")for(let i in t)o[i]=t[i],r[i]=Le(t[i]);let n=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let a=e;for(;a;){let c=a[xc];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[Me]?a[fd]:null}return null};return new Proxy(o,{get(i,a){return a===Me?!0:a===xc?r:a===fd?e:a==="__raw"?i:Object.prototype.hasOwnProperty.call(r,a)?r[a].get():e&&a!=="then"&&a!=="constructor"?e[a]:i[a]},set(i,a,c){let l=n(a);return l?(l===r&&(i[a]=c),l[a].set(c),!0):(i[a]=c,r[a]=Le(c),!0)},has(i,a){if(a in r||a in i)return!0;let c=e;for(;c;){if(a in c)return!0;c=c[Me]?c[fd]:null}return!1},ownKeys(){return Object.keys(r)},getOwnPropertyDescriptor(i,a){return a in r?{enumerable:!0,configurable:!0,value:r[a].peek()}:Object.getOwnPropertyDescriptor(i,a)}})}var fd=Symbol("scope.parent");var Qr="3.14.782";var jo="__SMBLS_SIGNAL_INSTANCES__",Bo=(t,e,r)=>{let o=e||(typeof globalThis<"u"?globalThis:null);if(!o)return null;let n=o[jo]||(o[jo]={versions:[],engines:0,reported:!1});return typeof n.engines!="number"&&(n.engines=n.versions.length),n.versions.push(t||Qr),r||n.engines++,n.engines>1&&!n.reported&&(n.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",n.engines,"copies of the reactive engine are loaded on this page:",n.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.")),n},gd=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[jo]};var Uo="__SMBLS_SIGNAL_ENGINE__",qb=(t,e,r)=>{let o=e||Qr,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[Uo];return s&&s.engine&&s.version===o?(Bo(o,n,!0),s.engine):(s||(n[Uo]={version:o,engine:t}),Bo(o,n,!1),t)},md=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Uo]};var Ft=qb({...ad,...hd,VERSION:Qr},Qr),xs=Ft.createSignal,Kb=Ft.createComputed,Z=Ft.createEffect,kc=Ft.batch,vc=Ft.getObserver,Gb=Ft.setObserver,Xe=Ft.createStore,Cc=Ft.createScopeStore,yt=Ft.isStore,Yb=Ft.getSignals,Xb=Ft.STORE_METHOD_NAMES,Jb=Ft.RESERVED_STORE_METHODS,Ec=Ft.warnStateKeyShadowsMethod,Zb=Ft.__resetStateShadowWarnings,Qb=Ft.VERSION;var Hg={};P(Hg,{assertEmitIntegrity:()=>Ug,css:()=>_e,getActiveDocument:()=>gf,getCacheSize:()=>zg,getEmitStats:()=>mf,injectGlobal:()=>kt,keyframes:()=>Rn,reset:()=>Wx,resetEmitStats:()=>Bg,setActiveDocument:()=>jg,setWasmEngine:()=>Sa,wrapHoverRule:()=>Oe});var Mg={};P(Mg,{CONFIG:()=>yo,CONFIG_MERGE_EXL:()=>re,CSS_NAMED_COLOR_HEX:()=>Al,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_UNITS:()=>zo,FACTORY:()=>ee,STANDARD_SCHEME_QUERIES:()=>Jl,VALUE_TRANSFORMERS:()=>cf,activateConfig:()=>bx,aliasCaseVariants:()=>wn,animation:()=>hg,appendSVGSprite:()=>ya,appendSvgIconsSprite:()=>So,applyDocument:()=>ma,applyHeadings:()=>ef,applyMediaSequenceVars:()=>Tr,applyReset:()=>ba,applySequenceGlobalVars:()=>ta,applySequenceVars:()=>ir,applySpacingSequence:()=>oa,applyTimingSequence:()=>ga,applyTypographySequence:()=>da,breakpoints:()=>dg,changeGlobalTheme:()=>lf,changeLightness:()=>Yh,checkIfBoxSize:()=>ra,class:()=>_g,color:()=>sg,colorStringToRgbaArray:()=>pe,compositeOverBackdrop:()=>ho,contrastRatio:()=>gn,convertSvgToSymbol:()=>ea,createConfig:()=>Ki,cssMediaVars:()=>Wl,cssVars:()=>Hl,defineResolvedThemeSignal:()=>xn,defineThemeSignal:()=>_n,devices:()=>pg,document:()=>hx,findHeadingLetter:()=>Yl,findHeadings:()=>Qi,font:()=>Qh,fontFace:()=>rg,fontFamily:()=>tg,fontFamilyTypes:()=>eg,generateSequence:()=>Yt,generateSequencePosition:()=>vg,generateSprite:()=>Sn,generateSubSequence:()=>Ji,getActiveConfig:()=>C,getColor:()=>et,getColorShade:()=>Il,getDefaultOrFirstKey:()=>go,getFnPrefixAndValue:()=>sr,getFontFace:()=>Jh,getFontFaceEach:()=>mo,getFontFaceEachString:()=>Bl,getFontFaceString:()=>zi,getFontFamily:()=>ua,getFontFormat:()=>Nl,getFontSizeByKey:()=>pa,getMediaColor:()=>It,getMediaTheme:()=>me,getResolvedThemeSignal:()=>yx,getRgbTone:()=>ze,getSafeInk:()=>Zl,getSafeInkInfo:()=>Tg,getSequenceValue:()=>Zi,getSequenceValueBySymbols:()=>Gl,getSequenceValuePropertyPair:()=>We,getShadow:()=>sa,getShapeByKey:()=>ha,getSpacingBasedOnRatio:()=>Te,getSpacingByKey:()=>St,getSubratio:()=>Xi,getSubratioDifference:()=>Yi,getTheme:()=>aa,getThemeSignal:()=>mx,getTimingByKey:()=>ne,getTimingFunction:()=>ye,gradient:()=>ig,grid:()=>bg,hexToRgb:()=>Wh,hexToRgbArray:()=>Tl,hexToRgba:()=>Kh,hslToRgb:()=>Pl,icons:()=>lg,isCSSVar:()=>mt,isDomDocument:()=>Je,isGoogleFontsUrl:()=>mn,isHostObject:()=>Ze,isRawUnitValue:()=>ws,isResolvedColor:()=>Ae,isScalingUnit:()=>to,isWritableFamilyBucket:()=>bd,linearChannelToSrgb:()=>Ll,media:()=>og,mixTwoColors:()=>Hh,mixTwoRgb:()=>Gh,mixTwoRgba:()=>Dl,numToLetterMap:()=>He,oklabToLinearSrgb:()=>Ml,oklabToOklch:()=>Bi,oklchToGamutSafeSrgb:()=>Ui,oklchToOklab:()=>Fl,opacify:()=>hn,parkHostObject:()=>yr,parseColorToken:()=>Lt,popConfig:()=>tt,pushConfig:()=>it,quietColorProbe:()=>bo,relativeLuminance:()=>po,reset:()=>gx,resolveBorderValue:()=>oe,resolveColorRgb:()=>_o,resolveColorsInGradient:()=>xa,resolveConfigDocument:()=>Vo,resolveFileUrl:()=>he,resolveShadowValue:()=>xo,returnSubThemeOrDefault:()=>Xh,rgbArrayToHex:()=>Ol,rgbToHSL:()=>Rl,rgbToHex:()=>qh,runThroughMedia:()=>tf,scratchDefaultConfig:()=>bn,scratchSystem:()=>En,scratchUtils:()=>Or,semanticIcons:()=>fg,sequence:()=>nr,set:()=>ko,setActiveConfig:()=>ql,setAdaptiveSchemeVar:()=>Pr,setColor:()=>Rr,setCustomFont:()=>Vi,setCustomFontMedia:()=>Ar,setEach:()=>Lg,setFont:()=>fa,setFontFamily:()=>vn,setFontImport:()=>yn,setGradient:()=>kn,setInCustomFontMedia:()=>jl,setMediaTheme:()=>la,setSVG:()=>Cn,setScalingVar:()=>Gi,setShadow:()=>Ir,setSubScalingVar:()=>Kl,setSvgIcon:()=>wo,setTheme:()=>ca,setValue:()=>$g,setVariables:()=>Cg,shadow:()=>cg,shape:()=>Sg,sizes:()=>wg,spacing:()=>ng,splitSpacedValue:()=>na,splitTopLevelCommas:()=>or,splitTransition:()=>af,srgbChannelToLinear:()=>$l,srgbToOklab:()=>ji,svg:()=>gg,svgData:()=>mg,templates:()=>yg,theme:()=>ag,timing:()=>ug,toCamel:()=>qi,toLinearChannel:()=>pn,transformBackgroundImage:()=>nf,transformBorder:()=>qe,transformBorderRadius:()=>ar,transformBoxShadow:()=>_a,transformDuration:()=>wa,transformShadow:()=>of,transformSize:()=>_t,transformSizeRatio:()=>N,transformTextStroke:()=>rf,transformTransition:()=>Dg,transfromGap:()=>sf,typography:()=>Hi,unit:()=>Zh,vars:()=>xg});var Or={};P(Or,{CSS_NAMED_COLOR_HEX:()=>Al,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_UNITS:()=>zo,applyMediaSequenceVars:()=>Tr,applySequenceGlobalVars:()=>ta,applySequenceVars:()=>ir,changeLightness:()=>Yh,colorStringToRgbaArray:()=>pe,compositeOverBackdrop:()=>ho,contrastRatio:()=>gn,convertSvgToSymbol:()=>ea,findHeadingLetter:()=>Yl,findHeadings:()=>Qi,generateSequence:()=>Yt,generateSequencePosition:()=>vg,generateSprite:()=>Sn,generateSubSequence:()=>Ji,getColorShade:()=>Il,getDefaultOrFirstKey:()=>go,getFnPrefixAndValue:()=>sr,getFontFace:()=>Jh,getFontFaceEach:()=>mo,getFontFaceEachString:()=>Bl,getFontFaceString:()=>zi,getFontFormat:()=>Nl,getRgbTone:()=>ze,getSequenceValue:()=>Zi,getSequenceValueBySymbols:()=>Gl,getSequenceValuePropertyPair:()=>We,getSubratio:()=>Xi,getSubratioDifference:()=>Yi,hexToRgb:()=>Wh,hexToRgbArray:()=>Tl,hexToRgba:()=>Kh,hslToRgb:()=>Pl,isCSSVar:()=>mt,isDomDocument:()=>Je,isGoogleFontsUrl:()=>mn,isHostObject:()=>Ze,isRawUnitValue:()=>ws,isResolvedColor:()=>Ae,isScalingUnit:()=>to,isWritableFamilyBucket:()=>bd,linearChannelToSrgb:()=>Ll,mixTwoColors:()=>Hh,mixTwoRgb:()=>Gh,mixTwoRgba:()=>Dl,numToLetterMap:()=>He,oklabToLinearSrgb:()=>Ml,oklabToOklch:()=>Bi,oklchToGamutSafeSrgb:()=>Ui,oklchToOklab:()=>Fl,opacify:()=>hn,parkHostObject:()=>yr,parseColorToken:()=>Lt,relativeLuminance:()=>po,resolveConfigDocument:()=>Vo,resolveFileUrl:()=>he,returnSubThemeOrDefault:()=>Xh,rgbArrayToHex:()=>Ol,rgbToHSL:()=>Rl,rgbToHex:()=>qh,setCustomFont:()=>Vi,setCustomFontMedia:()=>Ar,setFontImport:()=>yn,setInCustomFontMedia:()=>jl,setScalingVar:()=>Gi,setSubScalingVar:()=>Kl,setVariables:()=>Cg,splitTopLevelCommas:()=>or,srgbChannelToLinear:()=>$l,srgbToOklab:()=>ji,toLinearChannel:()=>pn});var Je=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),Ze=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)},bd=t=>t!==null&&typeof t=="object"&&!Ze(t),yr=(t,e,r)=>{if(!t)return;if(Je(r)){t.__domDocument||(t.__domDocument=r);return}let o=`__host_${e}`;t[o]||(t[o]=r)},Vo=t=>t?Je(t.__domDocument)?t.__domDocument:Je(t.document)?t.document:null:null;var to=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",zo=["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"],iE=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),aE=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${zo.filter(t=>t!=="auto").map(iE).join("|")})$`),ws=t=>aE.test(String(t).trim());R();var Al={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"},pe=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=Al[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&&Q&&v){let r=Q.body.appendChild(Q.createElement("fictum")),o="rgb(1, 2, 3)";if(r.style.color=o,r.style.color!==o){Q.body.removeChild(r);return}if(r.style.color=t,r.style.color===o||r.style.color==="")return Q.body.removeChild(r),[0,0,0,0];t=v.getComputedStyle(r).color,Q.body.removeChild(r)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(r=>+r)):[0,0,0,0]},Hh=(t,e,r=.5)=>(t=pe(t),e=pe(e),Dl(t,e,r)),Wh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${o},${n})`},Tl=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,o,n]},qh=(t,e,r)=>"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1),Ol=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1),Kh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${r},${o},${n},${e})`},Gh=(t,e,r=.5)=>{let o=[];for(let n=0;n<3;n++)o[n]=~~(t[n]+(e[n]-t[n])*r);return`rgb(${o})`},Yh=(t,e)=>{let[r,o,n]=e,s=Math.max(0,Math.min(100,n+parseFloat(t)));return[r,o,s]},Rl=(t,e,r)=>{let o=Math.max(t,e,r),n=o-Math.min(t,e,r),s=1-Math.abs(o+o-n-1),i=n&&(o==t?(e-r)/n:o==e?2+(r-t)/n:4+(t-e)/n);return[60*(i<0?i+6:i),s?n/s:0,(o+o-n)/2]},Pl=(t,e,r,o=e*Math.min(r,1-r),n=(s,i=(s+t/30)%12)=>r-o*Math.max(Math.min(i-3,9-i,1),-1))=>[n(0),n(8),n(4)],Il=(t,e)=>{let r=parseInt(t,16),o=(r>>16)+e;o>255?o=255:o<0&&(o=0);let n=(r>>8&255)+e;n>255?n=255:n<0&&(n=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|n<<8|o<<16)+16777216).toString(16).slice(1)},Dl=(t,e,r=.5)=>{let o=[];for(let n=0;n<4;n++){let s=n===3?i=>i:Math.round;o[n]=s(t[n]+(e[n]-t[n])*r)}return`rgba(${o})`},hn=(t,e)=>{let r=pe(t);if(!r){io()&&console.warn(t+" color is not rgba");return}return r[3]=e,`rgba(${r})`},mt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,te=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,dA=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Lt=t=>{if(!w(t))return null;if(te.test(t))return{passthrough:t};if(mt(t))return{cssVar:t};let e=t.match(dA);if(!e)return null;let[,r,o,n]=e,s=o!==void 0?`0.${o}`:void 0,i=n&&n[0]==="="?n.slice(1):n;return{name:r,alpha:s,tone:i}},Ae=t=>w(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),or=t=>{let e=[],r="",o=0;for(let n of t){if(n==="("?o+=1:n===")"&&o>0&&(o-=1),n===","&&o===0){e.push(r),r="";continue}r+=n}return(r.length||!e.length)&&e.push(r),e},pn=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),po=t=>.2126*pn(t[0])+.7152*pn(t[1])+.0722*pn(t[2]),gn=(t,e)=>{let r=po(t)+.05,o=po(e)+.05;return r>o?r/o:o/r},$l=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Ll=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,ji=([t,e,r])=>{let[o,n,s]=[t,e,r].map($l),i=.4122214708*o+.5363325363*n+.0514459929*s,a=.2119034982*o+.6806995451*n+.1073969566*s,c=.0883024619*o+.2817188376*n+.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]},Ml=([t,e,r])=>{let o=t+.3963377774*e+.2158037573*r,n=t-.1055613458*e-.0638541728*r,s=t-.0894841775*e-1.291485548*r,i=o**3,a=n**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]},Bi=([t,e,r])=>{let o=Math.atan2(r,e)*180/Math.PI;return o<0&&(o+=360),[t,Math.sqrt(e*e+r*r),o]},Fl=([t,e,r])=>{let o=r*Math.PI/180;return[t,e*Math.cos(o),e*Math.sin(o)]},Ui=(t,e,r,o=24)=>{let n=a=>Ml(Fl([t,a,r])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=n(e);if(!s(i)){let a=0,c=e;for(let l=0;l<o;l++){let f=(a+c)/2;s(n(f))?a=f:c=f}i=n(a)}return i.map(a=>Ll(Math.max(0,Math.min(1,a))))},ho=(t,e=1,r=[255,255,255])=>e>=1?t:t.map((o,n)=>o*e+r[n]*(1-e)),ze=(t,e)=>{w(t)&&t.includes("rgb")&&(t=pe(t).join(", ")),w(t)&&(t=t.split(",").map(n=>parseFloat(n.trim()))),Fe(e)&&(e+="");let r=Ol(t),o=e.slice(0,1);if(o==="-"||o==="+"){let n=Il(r,parseFloat(e));return Tl(n).join(", ")}else{let[n,s,i]=t,[a,c]=Rl(n/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return Pl(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var Xh=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var he=(t,e)=>{if(!t||!e)return null;try{return new URL(t),null}catch{}let r=e[t];return r?r.content&&r.content.src:null},go=(t,e)=>{if(t[e])return t[e].value;let r=()=>Object.keys(t).find(n=>n!=="default"&&t[n]&&t[n].value&&!t[n].isSystemFallback);if(t.default){let n=t[t.default];if(n&&n.isSystemFallback){let s=r();if(s)return t[s].value}if(n)return n.value}let o=r()||Object.keys(t).find(n=>n!=="default"&&t[n]&&t[n].value);return o&&t[o]&&t[o].value},Nl=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},mn=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),yn=t=>`@import url('${t}');`,jl=t=>`@font-face { ${t} }`,Vi=(t,e,r,o={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=Nl(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
31
+ }`;return`${a}${l}${c}`}});var Ph,lx=j(()=>{"use strict";Ph=t=>{if(!t)return"";let e=new Date(t),r=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),o=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${o}, ${r}`}});var Ih,fx=j(()=>{"use strict";Ih=(t,e)=>{let r=setTimeout(()=>{let{props:o}=t;if(!e.clientHeight){let{node:{clientHeight:n}}=t;n&&(e.clientHeight=n)}if(e.active){if(o.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let n=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(n)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(r)})}});var Dh,ux=j(()=>{"use strict";Dh=function(e){let r=[0,1];for(let o=2;o<=e;o++)r[o]=r[o-1]+r[o-2];return r[e]}});var $h,dx=j(()=>{"use strict";$h=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function gn(t,e={}){let{window:r=globalThis}=e,{document:o=r.document}=e;return new Promise((n,s)=>{let i=o.querySelector(`script[src="${t}"]`);if(i)return n(i);let a=o.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,n(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},o.head.appendChild(a)})}async function Bh(t,e={}){let{window:r=globalThis}=e,{document:o=r.document}=e;return new Promise((n,s)=>{let i=o.querySelector(`link[href="${t}"]`);if(i)return n(i);let a=o.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,n(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},o.head.appendChild(a)})}var Lh,Mh,Fh,Nh,jh,px=j(()=>{"use strict";Lh=(t,e=!1,r=document,o="text/javascript")=>new Promise((n,s)=>{try{let i=r.createElement("script");i.type=o,i.async=e,i.src=t,i.addEventListener("load",a=>{n({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),r.body.appendChild(i)}catch(i){s(i)}}),Mh=(t,e=document,r="text/javascript")=>new Promise((o,n)=>{let s=e.createElement("script");s.type=r,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),o()},s.onerror=()=>{e.body.removeChild(i),n(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),Fh=(t,e=document,r,o="text/javascript")=>{let n=new window.XMLHttpRequest;if(n.open("GET",t,!1),n.send(),n.status===200){let s=e.createElement("script");s.type=o,s.text=n.responseText,e.body.appendChild(s),typeof r=="function"&&r()}else throw new Error(`Failed to load the script ${t}`)},Nh=(t,e=!1,r=document,o="text/javascript")=>new Promise((n,s)=>{try{let i=r.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{n({status:!0})}),r.head.appendChild(i)}catch(i){s(i)}}),jh=(t,e=!1,r=document,o="text/javascript",n="smbls-script")=>{try{let s=r.createElement("script");s.type=o,s.async=e,s.id=n,s.innerHTML=t,r.body.appendChild(s)}catch(s){console.warn(s)}}});function pA(t,e){if(!e||typeof e!="object")return t;let r=n=>{if(!dA(n))return n;let s=e[n];return s?.src?s.src:n},o={...t};for(let[n,s]of Object.entries(o))typeof s=="string"?o[n]=r(s):Array.isArray(s)&&(o[n]=s.map(i=>typeof i=="string"?r(i):i));return o}function Rl(t,e){if(!t||!e)return;let r=e.split("."),o=t;for(let n of r){if(o==null||typeof o!="object")return;o=o[n]}return o}function hA(t,e,r){let n=(e.config||e.settings||{}).polyglot||e.polyglot,s=r?.lang||n?.defaultLang||"en",a=(n?.translations||{})[s]||{},c=r?.state||{},l={...t};for(let[f,u]of Object.entries(l))typeof u!="string"||!u.includes("{{")||(l[f]=u.replace(/\{\{\s*([^|{}]+?)\s*(?:\|\s*(\w+)\s*)?\}\}/g,(d,h,g)=>{let p=h.trim();if(g==="polyglot")return a[p]??Rl(a,p)??d;if(g==="getLocalStateLang")return Rl(c,p+s)??d;let m=Rl(c,p);return m!==void 0?m:a[p]??Rl(a,p)??d}));return l}function hx(t){let e={...t};for(let[r,o]of Object.entries(e))if(typeof o=="function"){let n=o.toString(),s=n.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=n.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[r]=`{{ ${i[1]} | polyglot }}`;continue}let a=n.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[r]=`{{ ${a[1]} }}`;continue}delete e[r]}else if(typeof o=="string"){let n=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(n){e[r]=`{{ ${n[1]} | getLocalStateLang }}`;continue}let s=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | polyglot }}`;continue}if(o.includes("=>")&&o.includes("s.")){let i=o.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[r]=`{{ ${i[1]} }}`;continue}}}return e}function Vh(t,e,r,{isProduction:o=!1,channel:n="production"}={}){let s=t.pages?.[e],i=S(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=hx(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=hx(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let p=t.name||t.key;p?o?d.title=p:n==="development"?d.title=`${p} / dev:symbo.ls`:n==="staging"?d.title=`${p} / staging:symbo.ls`:d.title=`${p} / symbo.ls`:d.title="Symbols demo"}d=hA(d,t,r),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=r?.actualPathname||e;if(d["og:url"]||d.url){let p=(d["og:url"]||d.url||"").replace(/\/$/,"");if(p&&h&&h!=="/"){let m=h.startsWith("/")?h:"/"+h;d["og:url"]=p+m}}d=pA(d,t.files);let g=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[p,m]of Object.entries(d))if(typeof m=="string"&&m.includes("{{")){let b=m.replace(/\{\{[^}]*\}\}/g,"").trim();b?d[p]=b:p==="title"?d[p]=g:delete d[p]}return d}var Ot,fA,mn,uA,Pl,Uh,dA,gx=j(()=>{"use strict";Tt();Ot=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},fA=t=>Object.entries(t||{}).filter(([e,r])=>r!==void 0).map(([e,r])=>`${e}="${Ot(r)}"`).join(" "),mn=t=>{let e=5381,r=String(t);for(let o=0;o<r.length;o++)e=(e*33^r.charCodeAt(o))>>>0;return e.toString(36)},uA=new Set(["jsonLd","styles","scripts"]),Pl=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let r of t.jsonLd){if(r==null)continue;let o=typeof r=="string"?r:JSON.stringify(r),n=String(o).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${mn(o)}">${n}<\/script>`)}if(Array.isArray(t.styles))for(let r of t.styles){if(r==null||!String(r).trim())continue;let o=String(r).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${mn(o)}">${o}</style>`)}if(Array.isArray(t.scripts))for(let r of t.scripts){if(!r)continue;let o=typeof r=="string",n=o?r:r.src;if(!n&&!r.body)continue;let s=[];n&&s.push(`src="${Ot(n)}"`),o||(r.type&&s.push(`type="${Ot(r.type)}"`),r.async&&s.push("async"),r.defer&&s.push("defer"),r.integrity&&s.push(`integrity="${Ot(r.integrity)}"`),r.crossorigin&&s.push(`crossorigin="${Ot(r.crossorigin)}"`),r.referrerpolicy&&s.push(`referrerpolicy="${Ot(r.referrerpolicy)}"`),r.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Ot(n||mn(r.body||""))}"`;if(!o&&r.body){let a=String(r.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${s.join(" ")}${i}>${a}<\/script>`)}else e.push(`<script ${s.join(" ")}${i}><\/script>`)}return e},Uh=(t,e)=>{e||(t={...t,robots:"noindex"});let r=Object.entries(t).reduce((o,[n,s])=>{if(!s&&s!==0&&s!==!1||uA.has(n))return o;if(n==="title")return o.push(`<title>${Ot(s)}</title>`),o;if(n==="canonical")return o.push(`<link rel="canonical" href="${Ot(s)}">`),o;if(n==="manifest")return o.push(`<link rel="manifest" href="${Ot(s)}">`),o;if(n==="favicon"||n==="favicons"||n==="icon"||n==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="string")o.push(`<link rel="icon" href="${Ot(f)}">`);else if(typeof f=="object"){let u=fA(f);/rel=/.test(u)?o.push(`<link ${u}>`):o.push(`<link rel="icon" ${u}>`)}}),o;if(n==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).filter(([d,h])=>h!==void 0).map(([d,h])=>`${d}="${Ot(h)}"`).join(" ");o.push(`<link rel="alternate" ${u}>`)}}),o;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")o.push(`<meta ${u}="${Ot(l)}" content="${Ot(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")o.push(`<meta ${u}="${Ot(l)}" content="${Ot(d)}">`);else if(typeof d=="object"){let h=Object.entries(d).filter(([g,p])=>p!==void 0).map(([g,p])=>`${g}="${Ot(p)}"`).join(" ");o.push(`<meta ${h}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([h,g])=>g!==void 0).map(([h,g])=>`${h}="${Ot(g)}"`).join(" ");o.push(`<meta ${d}>`)}};if(n.startsWith("http-equiv:")){let l=n.replace("http-equiv:","");return i(l,s,"http-equiv"),o}if(n.startsWith("itemprop:")){let l=n.replace("itemprop:","");return i(l,s,"itemprop"),o}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>n.startsWith(l));if(c){let l=n.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),o}if(n.startsWith("apple:")||n.startsWith("msapplication:")){let l=n.startsWith("apple:")?"apple-":"msapplication-",f=n.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),o}return i(n,s),o},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return r.push(...Pl(t)),r.join(`
32
+ `)},dA=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http")});var Il,zh,mx=j(()=>{"use strict";Tt();Il=(t,e)=>(T(e)?e:Object.values(e)).reduce((r,o)=>Math.abs(o-t)<Math.abs(r-t)?o:r),zh=(t,e)=>(t=parseFloat(t),S(e)&&(e=Object.values(e)),Il(t,e))});function yn(t){let e=String(t||"").trim();if(!e)return{owner:yx,key:"",full:""};let r=null,o=e;if(e.includes("/")){let s=e.indexOf("/");r=e.slice(0,s),o=e.slice(s+1)}o=o.replace(/\.symbo\.ls$/iu,""),r||(r=yx);let n=o?`${r}/${o}`:"";return{owner:r,key:o,full:n}}async function Dl(t,e={}){if((e.provider||"kv")==="api")return _x(t,e);let o=await SA(t,e);return o||_x(t,e)}async function SA(t,e={}){let r=e.kvBaseUrl||gA,o=e.env||"production",n=`${r}/kv/${encodeURIComponent(t)}?env=${o}`;try{let s=await fetch(n,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function _x(t,e={}){let r=e.apiBaseUrl||mA,{key:o}=yn(t);try{let n=`${r}/core/projects/libraries/available?search=${encodeURIComponent(o)}&limit=10`,s=await fetch(n,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(h=>{let{key:g}=yn(h?.key);return g.toLowerCase()===o.toLowerCase()});if(!c?.id&&!c?._id)return null;let l=c.id||c._id,f=`${r}/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 xx(t,e={}){if(S(t))return t;if(w(t)){let{full:r}=yn(t);if(!r)return null;try{let o=await Dl(r,e);return o||console.warn(`[smbls] Shared library "${r}" not found`),o}catch(o){return console.warn(`[smbls] Failed to fetch shared library "${r}":`,o.message),null}}return null}async function Wh(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async o=>{if(Ui(o)){let n=await xx(xA(o),e);return n?{library:n,ignoreList:o.ignoreList}:null}return xx(o,e)}))).filter(Boolean)}var yx,gA,mA,ji,wx,yA,bA,bx,_A,Bi,Hh,Ui,xA,wA,Vi,Sx=j(()=>{"use strict";Tt();yx="system",gA="https://smbls-kv.nika-980.workers.dev",mA="https://api.symbols.app";ji=(t,e,r,o)=>{for(let n in e){let s=o?`${o}/${n}`:n;r&&r.has(s)||(n in t?S(t[n])&&S(e[n])&&ji(t[n],e[n],r,s):t[n]=e[n])}},wx=(t,e,r)=>{if(!S(t)||!e.size)return t;let o=`${r}/`,n=!1;for(let i of e)if(i.startsWith(o)){n=!0;break}if(!n)return t;let s={};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=`${r}/${i}`;e.has(a)||(s[i]=wx(t[i],e,a))}return s},yA=new Set,bA=new Set(["components","pages","functions","snippets","methods"]),bx=(t,e)=>e===""&&bA.has(t),_A=t=>t.replace(/\.js$/iu,""),Bi=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let r of t){if(!w(r))continue;let o=r.split("/").map(n=>_A(n.trim())).filter(Boolean).join("/");o&&e.add(o)}return e},Hh=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),Ui=t=>S(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),xA=t=>t.library!==void 0?t.library:t.key??t.name,wA=(t,e,r)=>{let o=Bi(e.sharedLibIgnore);e.sharePages===!1&&o.add("pages");let n=o.size?new Set([...r,...o]):r;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&!(s==="sharePages"||s==="sharedLibIgnore")&&s!=="app"&&!n.has(s))if(S(e[s])&&S(t[s]))if(s==="designSystem")ji(t[s],e[s],n,s);else for(let i in e[s])n.has(`${s}/${i}`)||(i in t[s]?bx(s,t[s][i])&&!bx(s,e[s][i])&&(t[s][i]=e[s][i]):t[s][i]=e[s][i]);else s in t||(t[s]=wx(e[s],n,s))},Vi=(t,e)=>{if(!(!e||!e.length))for(let r=0;r<e.length;r++){let o=e[r],n=yA;Ui(o)&&(n=Bi(o.ignoreList),o=o.library),S(o)&&wA(t,o,n)}}});var qh,Kh,Gh,zi,Yh,Hi,Xh,go,kx=j(()=>{"use strict";Tt();qh=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},Kh=async t=>{try{let e=new Blob([t],{type:"text/javascript"}),r=new window.ClipboardItem({"text/plain":e});await navigator.clipboard.write([r]),console.log("JavaScript code copied to clipboard as text/javascript")}catch(e){console.error("Failed to copy JavaScript code: ",e)}},Gh=t=>t.replace(/[^a-zA-Z0-9_]/g,""),zi=t=>(typeof t!="string"&&(t=String(t||"")),t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,r){return r===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")),Yh=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),Hi=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Xh=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},go=t=>{if(T(t))return t;if(w(t))return t.split(" ");if(S(t))return Object.values(t);if(je(t))return[t]}});var Zh,vx=j(()=>{"use strict";Zh=()=>{let t=document.styleSheets[0],e="";if(t)try{let r=t.cssRules||t.rules;for(let o=0;o<r.length;o++)e+=r[o].cssText}catch(r){console.error("Unable to access CSS rules. This may be due to CORS restrictions:",r)}else console.log("No stylesheets found in document.styleSheets[0].");return e}});var Kt,bn,Wi,qi,Cx=j(()=>{"use strict";Kt=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let r=t.context;if(!r)return null;let o=r.assets&&r.assets[e]||r.files&&r.files[e];return o?typeof o=="string"?{src:o,type:null,variants:null}:typeof o=="object"&&typeof o.src=="string"?o:null:null},bn=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let r=t.some(n=>typeof n.width=="number"),o=[];for(let n of t)r&&typeof n.width=="number"?o.push(`${n.src} ${n.width}w`):r||(n.scale===1&&e?o.push(n.src):n.scale&&n.scale!==1&&o.push(`${n.src} ${n.scale}x`));return o.join(", ")},Wi=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(r=>r.format===t.type);return bn(e,{keepOneX:!1})},qi=(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 r=new Map;for(let a of t.variants)r.has(a.format)||r.set(a.format,[]),r.get(a.format).push(a);let o=[];for(let[a,c]of r)a!==t.type&&o.push({tag:"source",attr:{type:a,srcset:bn(c,{keepOneX:!0})}});let n=r.get(t.type)||[],s=bn(n,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...o,{tag:"img",attr:i}]}});var $l={};P($l,{CDN_PROVIDERS:()=>ge,DOMQL_EVENTS:()=>Zd,DOMQ_PROPERTIES:()=>wr,ENV:()=>pp,HTML_TAGS:()=>on,METHODS:()=>Jo,METHODS_EXL:()=>Us,NODE_ENV:()=>Ce,OPTIONS:()=>di,PACKAGE_MANAGER_TO_CDN:()=>Or,PARSED_DOMQ_PROPERTIES:()=>Bs,PROPS_METHODS:()=>Sr,STATE_METHODS:()=>io,STATE_PROPERTIES:()=>Xd,SVG_TAGS:()=>C_,TYPES:()=>Ds,UNIVERSAL_RESERVED_KEYS:()=>Tl,addCaching:()=>fl,addContext:()=>ll,addExtend:()=>Np,addExtends:()=>Ue,addItemAfterEveryElement:()=>Fd,addProtoToArray:()=>Ms,addRef:()=>il,applyDependentState:()=>oh,applyEvent:()=>ml,applyEventUpdate:()=>yl,applyExtends:()=>T_,applyProps:()=>si,arrayContainsOtherArray:()=>Rd,arraysEqual:()=>jd,arrayzeValue:()=>go,buildImgSrcset:()=>Wi,buildSourcesAndImg:()=>qi,cache:()=>ch,call:()=>Ch,captureSnapshot:()=>Ah,checkForStateTypes:()=>Qp,checkIfInherits:()=>gl,checkIfStringIsInArray:()=>Vd,clone:()=>Qd,cloneAndMergeArrayExtend:()=>Zs,cloneFunction:()=>Sp,collectExtendsList:()=>nn,concatAddExtends:()=>Lp,copyJavaScriptToClipboard:()=>Kh,copyStringToClipboard:()=>qh,createBasedOnType:()=>sl,createElement:()=>Jp,createElementExtends:()=>Kc,createExtends:()=>Qs,createExtendsFromKeys:()=>sn,createExtendsStack:()=>Zc,createIfConditionFlag:()=>kp,createInheritedState:()=>th,createKey:()=>Ys,createNestedObject:()=>ip,createNestedObjectByKeyPath:()=>rh,createObjectWithoutPrototype:()=>Bc,createParent:()=>al,createPath:()=>cl,createProps:()=>ii,createPropsStack:()=>ol,createRoot:()=>Zp,createScope:()=>sh,createSnapshotId:()=>Gs,customDecodeURIComponent:()=>Yd,customEncodeURIComponent:()=>Gd,cutArrayAfterValue:()=>Ld,cutArrayBeforeValue:()=>$d,debounce:()=>Xs,debounceOnContext:()=>_p,decodeNewlines:()=>Kd,deepClone:()=>lt,deepContains:()=>np,deepDefaults:()=>ji,deepDestringifyFunctions:()=>de,deepExtend:()=>qc,deepMerge:()=>st,deepMergeExtends:()=>Ve,deepStringifyFunctions:()=>zs,defineSetter:()=>kh,destringifyGlobalScope:()=>Ws,detectHeightOnInit:()=>Ih,detectInfiniteLoop:()=>fp,document:()=>tt,encodeNewlines:()=>qd,error:()=>po,excludeKeysFromObject:()=>dp,exec:()=>ft,extendCachedRegistry:()=>Mp,extendStackRegistry:()=>ti,extractArrayExtend:()=>ri,fetchLibraryData:()=>Dl,fibonacciNumberByIndex:()=>Dh,filterArrays:()=>Bd,filterArraysFast:()=>Ud,finalizeExtends:()=>Jc,findClosestNumber:()=>Il,findClosestNumberInFactory:()=>zh,findInheritedState:()=>hl,findKeyPosition:()=>Hd,flattenExtend:()=>an,formatDate:()=>Ph,generateHash:()=>zc,generateHeadArrayTags:()=>Pl,generateKey:()=>Ks,generateMetaTags:()=>Uh,get:()=>xh,getCDNDirUrl:()=>Ol,getCDNUrl:()=>Ae,getCapitalCaseKeys:()=>Up,getCdnProviderFromConfig:()=>dn,getChildStateInKey:()=>pl,getChildren:()=>ki,getContext:()=>Ri,getCookie:()=>Tp,getDB:()=>Li,getEmotionStylesheet:()=>Zh,getExtendsInElement:()=>jp,getExtendsStack:()=>Js,getExtendsStackRegistry:()=>Wc,getFrequencyInArray:()=>Pd,getHashedExtend:()=>ei,getImportMapScript:()=>Rh,getInObjectByPath:()=>lp,getLocalStorage:()=>Rp,getNev:()=>yp,getPageMetadata:()=>Vh,getParentStateInKey:()=>dl,getPath:()=>vi,getQuery:()=>Mi,getRef:()=>Sh,getRoot:()=>Ai,getRootContext:()=>Oi,getRootData:()=>Ti,getRootState:()=>Ei,getRootStateInKey:()=>ul,getSpreadChildren:()=>Vp,global:()=>Ad,hasFunction:()=>Be,hasHandlerPlugin:()=>tn,hasOwnProperty:()=>ep,hashContent:()=>mn,inheritChildExtends:()=>Yc,inheritChildPropsExtends:()=>Gc,inheritParentProps:()=>ai,inheritRecursiveChildExtends:()=>Xc,initProps:()=>Gp,is:()=>Wt,isArray:()=>T,isBoolean:()=>Lc,isContextComponent:()=>zp,isCyclic:()=>up,isDOMNode:()=>Ht,isDate:()=>Fc,isDefined:()=>yt,isDevelopment:()=>vr,isEmpty:()=>Nc,isEmptyObject:()=>rp,isEqualDeep:()=>jc,isFunction:()=>A,isHtmlElement:()=>Ps,isLocal:()=>mp,isLoudDevRuntime:()=>It,isMalformedDependency:()=>pn,isMethod:()=>Eh,isMobile:()=>Ep,isNode:()=>or,isNot:()=>Od,isNotProduction:()=>lo,isNull:()=>Mc,isNumber:()=>je,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>$h,isPolyglotWritableKey:()=>sr,isProduction:()=>kr,isStaging:()=>gp,isState:()=>eh,isString:()=>w,isStringFunction:()=>wp,isTest:()=>Vc,isTesting:()=>hp,isUndefined:()=>At,isUniversallyReservedKey:()=>Th,isUnresolvableDependency:()=>ho,isValidDependencyMap:()=>hn,isValidHtmlTag:()=>Ip,isWrappedLibrary:()=>Ui,joinArrays:()=>Yo,jointStacks:()=>Fp,keys:()=>El,loadCssFile:()=>Nh,loadJavascript:()=>jh,loadJavascriptFile:()=>Lh,loadJavascriptFileEmbedSync:()=>Fh,loadJavascriptFileSync:()=>Mh,loadRemoteCSS:()=>Bh,loadRemoteScript:()=>gn,log:()=>vh,logGroupIf:()=>Cp,logIf:()=>vp,lookdown:()=>bh,lookdownAll:()=>_h,lookup:()=>yh,lowercaseFirstLetter:()=>so,makeObjectWithoutPrototype:()=>op,map:()=>Jd,mapStringsWithContextComponents:()=>oi,markPolyglotSeeded:()=>He,matchesComponentNaming:()=>ze,memoize:()=>xp,merge:()=>ht,mergeSharedLibraries:()=>Vi,nextElement:()=>Ii,normalizeIgnoreList:()=>Bi,normalizeLibraryKey:()=>yn,objectToString:()=>Hs,objectizeStringProperty:()=>ni,overwrite:()=>qs,overwriteDeep:()=>qt,overwriteShallow:()=>co,overwriteState:()=>nh,parse:()=>Al,parseDeep:()=>wi,pickupElementFromProps:()=>el,pickupPropsFromElement:()=>tl,polyglotSeededKeys:()=>ui,previousElement:()=>Di,propExists:()=>qp,propertizeElement:()=>rl,propertizeUpdate:()=>Wp,remove:()=>ex,removeChars:()=>Gh,removeCookie:()=>Op,removeDuplicateProps:()=>li,removeDuplicatesInArray:()=>Xo,removeFromArray:()=>Id,removeFromObject:()=>sp,removeNestedKeyByPath:()=>ap,removeValueFromArray:()=>Ls,removeValueFromArrayAll:()=>Md,reorderArrayByValues:()=>Nd,replaceLiteralsWithObjectFields:()=>no,replaceOctalEscapeSequences:()=>Wd,resolveAsset:()=>Kt,resolveHandler:()=>en,resolveSharedLibraries:()=>Wh,returnValueAsText:()=>nl,runPluginHook:()=>Et,self:()=>Td,setActiveRootState:()=>Ci,setCookie:()=>Ap,setHashedExtend:()=>Hc,setInObjectByPath:()=>cp,setLocalStorage:()=>Pp,setNodeStyles:()=>Cl,setProps:()=>wh,setPropsPrototype:()=>ci,sharedLibrary:()=>Hh,splitPackageSpecifier:()=>Fi,spotByPath:()=>Si,srcsetFor:()=>bn,stringIncludesAny:()=>Ns,stringToObject:()=>tp,stripVersionRangePrefix:()=>Ni,swapItemsInArray:()=>Dd,syncProps:()=>fi,toCamelCase:()=>zi,toDashCase:()=>Hi,toDescriptionCase:()=>Xh,toPriorityOrder:()=>pe,toTitleCase:()=>Yh,toggleFullscreen:()=>Oh,triggerEventOn:()=>Cr,triggerEventOnUpdate:()=>ih,trimStringFromSymbols:()=>zd,unstackArrayOfObjects:()=>$s,update:()=>Kp,updateProps:()=>Yp,variables:()=>$i,verbose:()=>ln,warn:()=>Pi,window:()=>v});var R=j(()=>{"use strict";Uc();bp();Tt();nr();rn();Zo();Is();S_();k_();js();Rs();v_();Dp();Bp();Xp();Qc();$_();M_();Qo();F_();nx();lh();sx();ah();ix();ax();cx();lx();fx();ux();dx();px();gx();mx();Sx();kx();vx();Cx()});var iC=cd((LV,sC)=>{var gs=1e3,ms=gs*60,ys=ms*60,Bo=ys*24,SP=Bo*7,kP=Bo*365.25;sC.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return vP(t);if(r==="number"&&isFinite(t))return e.long?EP(t):CP(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function vP(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 r=parseFloat(e[1]),o=(e[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return r*kP;case"weeks":case"week":case"w":return r*SP;case"days":case"day":case"d":return r*Bo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ys;case"minutes":case"minute":case"mins":case"min":case"m":return r*ms;case"seconds":case"second":case"secs":case"sec":case"s":return r*gs;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function CP(t){var e=Math.abs(t);return e>=Bo?Math.round(t/Bo)+"d":e>=ys?Math.round(t/ys)+"h":e>=ms?Math.round(t/ms)+"m":e>=gs?Math.round(t/gs)+"s":t+"ms"}function EP(t){var e=Math.abs(t);return e>=Bo?Iu(t,e,Bo,"day"):e>=ys?Iu(t,e,ys,"hour"):e>=ms?Iu(t,e,ms,"minute"):e>=gs?Iu(t,e,gs,"second"):t+" ms"}function Iu(t,e,r,o){var n=e>=r*1.5;return Math.round(t/r)+" "+o+(n?"s":"")}});var cC=cd((MV,aC)=>{function AP(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=n,r.enabled=a,r.humanize=iC(),r.destroy=l,Object.keys(t).forEach(f=>{r[f]=t[f]}),r.names=[],r.skips=[],r.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 r.colors[Math.abs(u)%r.colors.length]}r.selectColor=e;function r(f){let u,d=null,h,g;function p(...m){if(!p.enabled)return;let b=p,_=Number(new Date),y=_-(u||_);b.diff=y,b.prev=u,b.curr=_,u=_,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let x=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(E,O)=>{if(E==="%%")return"%";x++;let $=r.formatters[O];if(typeof $=="function"){let I=m[x];E=$.call(b,I),m.splice(x,1),x--}return E}),r.formatArgs.call(b,m),(b.log||r.log).apply(b,m)}return p.namespace=f,p.useColors=r.useColors(),p.color=r.selectColor(f),p.extend=o,p.destroy=r.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,g=r.enabled(f)),g),set:m=>{d=m}}),typeof r.init=="function"&&r.init(p),p}function o(f,u){let d=r(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function n(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let u=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?r.skips.push(d.slice(1)):r.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=[...r.names,...r.skips.map(u=>"-"+u)].join(",");return r.enable(""),f}function a(f){for(let u of r.skips)if(s(f,u))return!1;for(let u of r.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 r.enable(r.load()),r}aC.exports=AP});var lC=cd((ee,Du)=>{ee.formatArgs=OP;ee.save=RP;ee.load=PP;ee.useColors=TP;ee.storage=IP();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 TP(){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 OP(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Du.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(o=r))}),t.splice(o,0,e)}ee.log=console.debug||console.log||(()=>{});function RP(t){try{t?ee.storage.setItem("debug",t):ee.storage.removeItem("debug")}catch{}}function PP(){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 IP(){try{return localStorage}catch{}}Du.exports=cC()(ee);var{formatters:DP}=Du.exports;DP.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Jb={};P(Jb,{ANIMATION_PROPS:()=>um,ARIA_ROLES:()=>$T,ATTR_TRANSFORMS:()=>im,BLOCK_PROPS:()=>dm,CDN_PROVIDERS:()=>ge,COMPOUND_CSS_KEYWORDS:()=>yo,CONFIG:()=>wo,CONFIG_MERGE_EXL:()=>ne,CSS_NAMED_COLOR_HEX:()=>Ll,CSS_NATIVE_COLOR_REGEX:()=>re,CSS_PROPS_REGISTRY:()=>_t,CSS_UNITS:()=>Go,DEFAULT_CONFIG:()=>Va,DEFAULT_CSS_PROPERTIES_LIST:()=>kt,DELEGATED_EVENTS:()=>Un,DESIGN_SYSTEM_OPTIONS:()=>zy,DOMQL_EVENTS:()=>Zd,DOMQ_PROPERTIES:()=>wr,DOM_EVENTS:()=>mw,ENV:()=>pp,FACTORY:()=>oe,FLEX_PROPS:()=>_m,FONT_PROPS:()=>pm,GRID_PROPS:()=>xm,HOST_REGISTERED_PACKAGES:()=>gv,HTML_ATTRIBUTES:()=>Of,HTML_TAGS:()=>on,LIFECYCLE_EVENTS:()=>Nr,METHODS:()=>Jo,METHODS_EXL:()=>Us,MISC_PROPS:()=>hm,MIXINS:()=>Cf,NODE_ENV:()=>Ce,OPTIONS:()=>di,PACKAGE_MANAGER_TO_CDN:()=>Or,PARSED_DOMQ_PROPERTIES:()=>Bs,POSITION_PROPS:()=>gm,PROPS_METHODS:()=>Sr,REGISTRY:()=>jt,RESERVED_STORE_METHODS:()=>l_,ROUTER_OPTIONS:()=>Qf,SIGNAL_ENGINE_KEY:()=>qo,SIGNAL_INSTANCES_KEY:()=>Ho,STANDARD_SCHEME_QUERIES:()=>sf,STATE_PROPERTIES:()=>Xd,STORE_METHOD_NAMES:()=>c_,SVG_TAGS:()=>jn,THEME_PROPS:()=>bm,TIMING_PROPS:()=>$a,TYPES:()=>Ds,UNIVERSAL_RESERVED_KEYS:()=>Tl,VALUE_TRANSFORMERS:()=>yf,VERSION:()=>u_,__resetSignalEngine:()=>vd,__resetSignalInstances:()=>kd,__resetStateShadowWarnings:()=>f_,activateConfig:()=>Rx,addCaching:()=>fl,addContext:()=>ll,addDelegatedEvent:()=>Ia,addExtend:()=>Np,addExtends:()=>Ue,addItemAfterEveryElement:()=>Fd,addMethods:()=>Kn,addProtoToArray:()=>Ms,addRef:()=>il,aliasCaseVariants:()=>An,animation:()=>Sg,appendSVGSprite:()=>Ca,appendSvgIconsSprite:()=>Ao,applyAttrTransforms:()=>cm,applyCSS:()=>Fy,applyDependentState:()=>oh,applyDocument:()=>va,applyEvent:()=>ml,applyEventUpdate:()=>yl,applyExtends:()=>zn,applyHeadings:()=>ff,applyInitialState:()=>Nf,applyMediaSequenceVars:()=>Pr,applyProps:()=>si,applyReset:()=>Ea,applySequenceGlobalVars:()=>ca,applySequenceVars:()=>fr,applySpacingSequence:()=>ua,applyStateMethods:()=>fe,applyTimingSequence:()=>ka,applyTrueProps:()=>Sm,applyTypographySequence:()=>xa,arrayContainsOtherArray:()=>Rd,arraysEqual:()=>jd,arrayzeValue:()=>go,assertEmitIntegrity:()=>Xg,batch:()=>Pc,breakpoints:()=>xg,buildImgSrcset:()=>Wi,buildSourcesAndImg:()=>qi,buildThemeVarStyles:()=>es,cache:()=>ch,cacheNode:()=>Fr,call:()=>Ch,callStateMethod:()=>Ma,camelToAttr:()=>Br,camelToLowerAttr:()=>yw,captureSnapshot:()=>Ah,changeGlobalTheme:()=>bf,changeLightness:()=>og,checkAttributeByTagName:()=>Ur,checkEventFunctions:()=>am,checkForStateTypes:()=>Qp,checkIfBoxSize:()=>fa,checkIfInherits:()=>gl,checkIfStringIsInArray:()=>Vd,class:()=>Ag,clone:()=>Qd,cloneAndMergeArrayExtend:()=>Zs,cloneFunction:()=>Sp,collectExtendsList:()=>nn,color:()=>pg,colorStringToRgbaArray:()=>me,components:()=>Qn,compositeOverBackdrop:()=>bo,concatAddExtends:()=>Lp,contrastRatio:()=>wn,convertSvgToSymbol:()=>la,copyJavaScriptToClipboard:()=>Kh,copyStringToClipboard:()=>qh,create:()=>Zb,createAsync:()=>_I,createBasedOnType:()=>sl,createComputed:()=>s_,createConfig:()=>ra,createDefine:()=>xk,createEffect:()=>Q,createElement:()=>Jp,createElementExtends:()=>Kc,createExtends:()=>Qs,createExtendsFromKeys:()=>sn,createExtendsStack:()=>Zc,createHTMLNode:()=>Nn,createIfConditionFlag:()=>kp,createInheritedState:()=>th,createKey:()=>Ys,createNestedObject:()=>ip,createNestedObjectByKeyPath:()=>rh,createObjectWithoutPrototype:()=>Bc,createParent:()=>al,createPath:()=>cl,createProps:()=>ii,createPropsStack:()=>ol,createRoot:()=>Zp,createScope:()=>sh,createScopeStore:()=>Dc,createSignal:()=>Ts,createSkeleton:()=>wI,createSnapshotId:()=>Gs,createState:()=>Pm,createStore:()=>tr,createSync:()=>xI,css:()=>we,cssMediaVars:()=>Ql,cssVars:()=>Jl,customDecodeURIComponent:()=>Yd,customEncodeURIComponent:()=>Gd,cutArrayAfterValue:()=>Ld,cutArrayBeforeValue:()=>$d,debounce:()=>Xs,debounceOnContext:()=>_p,decodeNewlines:()=>Kd,deepClone:()=>lt,deepContains:()=>np,deepDefaults:()=>ji,deepDestringifyFunctions:()=>de,deepExtend:()=>qc,deepMerge:()=>st,deepMergeExtends:()=>Ve,deepStringifyFunctions:()=>zs,defaultDefine:()=>ss,defineResolvedThemeSignal:()=>En,defineSetter:()=>kh,defineThemeSignal:()=>Cn,destringifyGlobalScope:()=>Ws,destroy:()=>Ga,detectHeightOnInit:()=>Ih,detectInfiniteLoop:()=>fp,detectTag:()=>Mr,devices:()=>wg,dispose:()=>Vr,encodeNewlines:()=>qd,error:()=>po,excludeKeysFromObject:()=>dp,exec:()=>ft,executeAttr:()=>NT,exetuteClassPerComponent:()=>g1,extendCachedRegistry:()=>Mp,extendStackRegistry:()=>ti,extractArrayExtend:()=>ri,extractConditionalAttrs:()=>UT,fetchLibraryData:()=>Dl,fibonacciNumberByIndex:()=>Dh,filterArrays:()=>Bd,filterArraysFast:()=>Ud,filterAttributesByTagName:()=>FT,finalizeExtends:()=>Jc,findClosestNumber:()=>Il,findClosestNumberInFactory:()=>zh,findHeadingLetter:()=>of,findHeadings:()=>aa,findInheritedState:()=>hl,findKeyPosition:()=>Hd,flattenExtend:()=>an,font:()=>ag,fontFace:()=>fg,fontFamily:()=>cg,fontFamilyTypes:()=>lg,formatDate:()=>Ph,generateHash:()=>zc,generateHeadArrayTags:()=>Pl,generateKey:()=>Ks,generateMetaTags:()=>Uh,generateSequence:()=>Gt,generateSequencePosition:()=>Ig,generateSprite:()=>Tn,generateSubSequence:()=>ia,get:()=>xh,getActiveConfig:()=>C,getActiveDocument:()=>Pa,getActiveLang:()=>Kr,getCDNDirUrl:()=>Ol,getCDNUrl:()=>Ae,getCacheSize:()=>Jg,getCapitalCaseKeys:()=>Up,getCdnProviderFromConfig:()=>dn,getChildStateInKey:()=>pl,getChildren:()=>ki,getColor:()=>rt,getColorShade:()=>Bl,getContext:()=>Ri,getCookie:()=>Tp,getDB:()=>Li,getDefaultOrFirstKey:()=>_o,getEmitStats:()=>kf,getEmotionStylesheet:()=>Zh,getExtendsInElement:()=>jp,getExtendsStack:()=>Js,getExtendsStackRegistry:()=>Wc,getFnPrefixAndValue:()=>lr,getFontFace:()=>sg,getFontFaceEach:()=>xo,getFontFaceEachString:()=>Gl,getFontFaceString:()=>Ji,getFontFamily:()=>_a,getFontFormat:()=>ql,getFontSizeByKey:()=>wa,getFrequencyInArray:()=>Pd,getHashedExtend:()=>ei,getImportMapScript:()=>Rh,getInObjectByPath:()=>lp,getLanguages:()=>Xa,getLocalStateLang:()=>ec,getLocalStorage:()=>Rp,getMediaColor:()=>Rt,getMediaTheme:()=>_e,getNev:()=>yp,getObserver:()=>Ic,getPageMetadata:()=>Vh,getParentStateInKey:()=>dl,getPath:()=>vi,getQuery:()=>Mi,getRef:()=>Sh,getResolvedThemeSignal:()=>Ox,getRgbTone:()=>qe,getRoot:()=>Ai,getRootContext:()=>Oi,getRootData:()=>Ti,getRootState:()=>Ei,getRootStateInKey:()=>ul,getSafeInk:()=>af,getSafeInkInfo:()=>Mg,getSequenceValue:()=>So,getSequenceValueBySymbols:()=>rf,getSequenceValuePropertyPair:()=>Ge,getShadow:()=>pa,getShapeByKey:()=>Sa,getSignals:()=>a_,getSpacingBasedOnRatio:()=>Oe,getSpacingByKey:()=>wt,getSpreadChildren:()=>Vp,getSubratio:()=>sa,getSubratioDifference:()=>na,getSystemGlobalTheme:()=>ce,getTheme:()=>ga,getThemeSignal:()=>Tx,getTimingByKey:()=>ie,getTimingFunction:()=>xe,global:()=>Ad,gradient:()=>hg,grid:()=>Eg,hasFunction:()=>Be,hasHandlerPlugin:()=>tn,hasOwnProperty:()=>ep,hashContent:()=>mn,hexToRgb:()=>Qh,hexToRgbArray:()=>Ml,hexToRgba:()=>eg,hslToRgb:()=>jl,icons:()=>yg,inheritChildExtends:()=>Yc,inheritChildPropsExtends:()=>Gc,inheritParentProps:()=>ai,inheritRecursiveChildExtends:()=>Xc,init:()=>hr,initPolyglot:()=>ru,initProps:()=>Gp,injectGlobal:()=>St,is:()=>Wt,isArray:()=>T,isBoolean:()=>Lc,isCSSVar:()=>gt,isContextComponent:()=>zp,isCyclic:()=>up,isDOMNode:()=>Ht,isDate:()=>Fc,isDefined:()=>yt,isDevelopment:()=>vr,isDomDocument:()=>er,isEmpty:()=>Nc,isEmptyObject:()=>rp,isEnumeratedTrueFalseAttr:()=>dr,isEqualDeep:()=>jc,isFunction:()=>A,isGoogleFontsUrl:()=>Sn,isHostObject:()=>rr,isHtmlElement:()=>Ps,isLocal:()=>mp,isLoudDevRuntime:()=>It,isMalformedDependency:()=>pn,isMethod:()=>Eh,isMobile:()=>Ep,isNode:()=>or,isNot:()=>Od,isNotProduction:()=>lo,isNull:()=>Mc,isNumber:()=>je,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>$h,isPolyglotWritableKey:()=>sr,isProduction:()=>kr,isRawUnitValue:()=>Os,isResolvedColor:()=>Te,isScalingUnit:()=>oo,isStaging:()=>gp,isState:()=>eh,isStore:()=>mt,isString:()=>w,isStringFunction:()=>wp,isSvgTag:()=>Bn,isTest:()=>Vc,isTesting:()=>hp,isTracking:()=>Dm,isUndefined:()=>At,isUniversallyReservedKey:()=>Th,isUnresolvableDependency:()=>ho,isValidDependencyMap:()=>hn,isValidHtmlTag:()=>Ip,isValidTag:()=>Fn,isWasmLoaded:()=>ik,isWrappedLibrary:()=>Ui,isWritableFamilyBucket:()=>Ed,joinArrays:()=>Yo,jointStacks:()=>Fp,keyframes:()=>Mn,keys:()=>El,linearChannelToSrgb:()=>zl,loadCssFile:()=>Nh,loadJavascript:()=>jh,loadJavascriptFile:()=>Lh,loadJavascriptFileEmbedSync:()=>Fh,loadJavascriptFileSync:()=>Mh,loadRemoteCSS:()=>Bh,loadRemoteScript:()=>gn,loadTranslations:()=>Ja,loadWasm:()=>sk,log:()=>vh,logGroupIf:()=>Cp,logIf:()=>vp,lookdown:()=>bh,lookdownAll:()=>_h,lookup:()=>yh,lowercaseFirstLetter:()=>so,makeObjectWithoutPrototype:()=>op,map:()=>Jd,mapStringsWithContextComponents:()=>oi,markPolyglotSeeded:()=>He,matchesComponentNaming:()=>ze,media:()=>ug,memoize:()=>xp,merge:()=>ht,mergeSharedLibraries:()=>Vi,mixTwoColors:()=>Jh,mixTwoRgb:()=>rg,mixTwoRgba:()=>Ul,nextElement:()=>Ii,normalizeIgnoreList:()=>Bi,normalizeLibraryKey:()=>yn,numToLetterMap:()=>Ke,objectToString:()=>Hs,objectizeStringProperty:()=>ni,oklabToLinearSrgb:()=>Hl,oklabToOklch:()=>Yi,oklchToGamutSafeSrgb:()=>Xi,oklchToOklab:()=>Wl,opacify:()=>xn,overwrite:()=>qs,overwriteDeep:()=>qt,overwriteShallow:()=>co,overwriteState:()=>nh,parkHostObject:()=>xr,parse:()=>Al,parseColorToken:()=>Lt,parseDeep:()=>wi,pickupElementFromProps:()=>el,pickupPropsFromElement:()=>tl,polyglotFunctions:()=>uc,polyglotPlugin:()=>as,polyglotSeededKeys:()=>ui,popConfig:()=>et,popStaticCssPass:()=>ym,previousElement:()=>Di,propExists:()=>qp,propertizeElement:()=>rl,propertizeUpdate:()=>Wp,pushConfig:()=>it,pushStaticCssPass:()=>mm,quietColorProbe:()=>ko,refreshContextProto:()=>Df,registerEvent:()=>Vn,registerHostPackages:()=>mv,registerSignalInstance:()=>Wo,reinit:()=>My,relativeLuminance:()=>mo,remove:()=>qn,removeChars:()=>Gh,removeCookie:()=>Op,removeDelegatedEvent:()=>Da,removeDuplicateProps:()=>li,removeDuplicatesInArray:()=>Xo,removeFromArray:()=>Id,removeFromObject:()=>sp,removeNestedKeyByPath:()=>ap,removeValueFromArray:()=>Ls,removeValueFromArrayAll:()=>Md,reorderArrayByValues:()=>Nd,replaceLiteralsWithObjectFields:()=>no,replaceOctalEscapeSequences:()=>Wd,resetEmitStats:()=>Yg,resolveAsset:()=>Kt,resolveBorderValue:()=>se,resolveColorRgb:()=>vo,resolveColorsInGradient:()=>Ta,resolveConfigDocument:()=>Ko,resolveFileSource:()=>sm,resolveFileUrl:()=>ye,resolveGridTracks:()=>ww,resolveHandler:()=>en,resolvePropValue:()=>jr,resolveShadowValue:()=>Co,resolveSharedLibraries:()=>Wh,returnSubThemeOrDefault:()=>ng,returnValueAsText:()=>nl,rgbArrayToHex:()=>Fl,rgbToHSL:()=>Nl,rgbToHex:()=>tg,runPluginHook:()=>Et,runThroughMedia:()=>lf,scratchDefaultConfig:()=>vn,scratchSystem:()=>In,scratchUtils:()=>Ir,self:()=>Td,semanticIcons:()=>bg,sequence:()=>cr,serializeAttrValue:()=>Xe,set:()=>To,setActiveConfig:()=>tf,setActiveDocument:()=>Gg,setActiveRootState:()=>Ci,setAdaptiveSchemeVar:()=>$r,setClass:()=>SO,setClassname:()=>m1,setColor:()=>Dr,setCookie:()=>Ap,setCssEngineHook:()=>Zf,setCustomFont:()=>Zi,setCustomFontMedia:()=>Rr,setEach:()=>zg,setFont:()=>ba,setFontFamily:()=>Rn,setFontImport:()=>kn,setGradient:()=>On,setHashedExtend:()=>Hc,setInCustomFontMedia:()=>Kl,setInObjectByPath:()=>cp,setLang:()=>Qa,setLocalStorage:()=>Pp,setMediaTheme:()=>ya,setNodeStyles:()=>Cl,setObserver:()=>i_,setProps:()=>wh,setPropsPrototype:()=>ci,setSVG:()=>Pn,setScalingVar:()=>oa,setShadow:()=>Lr,setSubScalingVar:()=>ef,setSvgIcon:()=>Eo,setTheme:()=>ma,setValue:()=>Vg,setVariables:()=>Dg,setWasmEngine:()=>Ra,shadow:()=>mg,shape:()=>Rg,sharedLibrary:()=>Hh,sizes:()=>Og,spacing:()=>dg,splitPackageSpecifier:()=>Fi,splitSpacedValue:()=>da,splitTopLevelCommas:()=>ar,splitTopLevelSpaces:()=>Ki,splitTransition:()=>mf,spotByPath:()=>Si,srcsetFor:()=>bn,srgbChannelToLinear:()=>Vl,srgbToOklab:()=>Gi,stringIncludesAny:()=>Ns,stringToObject:()=>tp,stripVersionRangePrefix:()=>Ni,svg:()=>kg,svgData:()=>vg,swapItemsInArray:()=>Dd,syncProps:()=>fi,templates:()=>Cg,theme:()=>gg,timing:()=>_g,toCamel:()=>ea,toCamelCase:()=>zi,toDashCase:()=>Hi,toDescriptionCase:()=>Xh,toLinearChannel:()=>_n,toPriorityOrder:()=>pe,toTitleCase:()=>Yh,toggleFullscreen:()=>Oh,transformBackgroundImage:()=>pf,transformBorder:()=>Ye,transformBorderRadius:()=>ur,transformBoxShadow:()=>Aa,transformClassname:()=>Aw,transformDuration:()=>Oa,transformGridTemplate:()=>gf,transformShadow:()=>df,transformSize:()=>bt,transformSizeRatio:()=>L,transformTextStroke:()=>uf,transformTransition:()=>Ug,transformersByPrefix:()=>km,transfromGap:()=>hf,translate:()=>Za,triggerEventOn:()=>Cr,triggerEventOnUpdate:()=>ih,trimStringFromSymbols:()=>zd,typography:()=>Qi,unit:()=>ig,unstackArrayOfObjects:()=>$s,update:()=>Hn,updateProps:()=>Yp,updateVars:()=>wO,upsertTranslation:()=>tc,useCssInProps:()=>le,useHostState:()=>Im,usePropsAsCSS:()=>Cw,useSelectorsAsCSS:()=>Ew,variables:()=>$i,vars:()=>Tg,verbose:()=>ln,warn:()=>Pi,warnStateKeyShadowsMethod:()=>$c,window:()=>v,wrapHoverRule:()=>Pe});module.exports=rE(Jb);var Cd={};P(Cd,{RESERVED_STORE_METHODS:()=>l_,SIGNAL_ENGINE_KEY:()=>qo,SIGNAL_INSTANCES_KEY:()=>Ho,STORE_METHOD_NAMES:()=>c_,VERSION:()=>u_,__resetSignalEngine:()=>vd,__resetSignalInstances:()=>kd,__resetStateShadowWarnings:()=>f_,batch:()=>Pc,createComputed:()=>s_,createEffect:()=>Q,createScopeStore:()=>Dc,createSignal:()=>Ts,createStore:()=>tr,getObserver:()=>Ic,getSignals:()=>a_,isStore:()=>mt,registerSignalInstance:()=>Wo,setObserver:()=>i_,warnStateKeyShadowsMethod:()=>$c});var gd={};P(gd,{WRITE_JOURNAL:()=>vs,batch:()=>Es,createComputed:()=>nE,createEffect:()=>sE,createSignal:()=>Fe,getObserver:()=>pd,journalWrite:()=>Cs,setObserver:()=>oE});var zt=null,vc=0,Cc=[],pd=()=>zt,oE=t=>{zt=t},Ec=0,ld=[];function Fe(t){let e=new Set;function r(){return zt&&(e.add(zt),zt._sources.add(s)),t}function o(i){i!==t&&(t=i,uE(e))}function n(){return t}let s={get:r,set:o,peek:n,_subscribers:e,_type:"signal"};return s}function nE(t){let e,r=!0,o=new Set,n={_sources:new Set,_type:"computed",_subscribers:o,_execute(){dd(n);let s=zt;zt=n;try{e=t(),r=!1}finally{zt=s}},_notify(){r=!0,o.size>0&&o_(o)},get(){return zt&&(o.add(zt),zt._sources.add(n)),r&&n._execute(),e},peek(){return r&&n._execute(),e}};return n._execute(),n}var ve=new Set,fd=!1,vs=[];function Cs(t){vs.push(t),vs.length>32&&vs.shift()}function sE(t,e){let r=e?.depth??0,o={_sources:new Set,_type:"effect",_depth:r,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(o._disposed)return;dd(o);let n=zt;zt=o;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{zt=n}},_notify(){o._disposed||(vc>0?Cc.push(o):Ec>0?ld.push(o):hd(o))},dispose(){o._disposed=!0,dd(o)}};return o._execute(),o}function Es(t){vc++;try{t()}finally{vc--,vc===0&&fE()}}var ud=!1,t_=1e3,iE=8,aE=256,cE=4;function e_(){return typeof performance<"u"?performance.now():Date.now()}function hd(t){ve.add(t),!ud&&(fd||(fd=!0,queueMicrotask(r_)))}var zo=[];function lE(){if(ve.size===1){let[e]=ve;return ve.clear(),e._disposed?0:(e._execute(),1)}zo.length=0;for(let e of ve)zo.push(e);ve.clear(),zo.sort((e,r)=>e._depth-r._depth);let t=0;for(let e=0;e<zo.length;e++){let r=zo[e];r._disposed||(r._execute(),t++)}return zo.length=0,t}function r_(t=0,e=0){if(fd=!1,ve.size===0)return;ud=!0;let r=e_(),o=!1;try{for(;ve.size>0;){if(++t>t_){let n=new Map;for(let c of ve){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",n.set(l,(n.get(l)||0)+1),n.size>=12)break}let s=[...n.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of vs)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",t_,"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>"),ve.clear();break}if(e+=lE(),ve.size>0&&(e>=aE||t>=cE)&&e_()-r>iE){o=!0,setTimeout(()=>r_(t,e),0);break}}}finally{o||(ud=!1)}}function fE(){for(let t=0;t<Cc.length;t++)hd(Cc[t]);Cc.length=0}function o_(t){Ec++;try{for(let e of t)e._notify()}finally{if(Ec--,Ec===0&&ld.length>0){let e=ld.splice(0);for(let r=0;r<e.length;r++)hd(e[r])}}}function uE(t){o_(t)}function dd(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Sd={};P(Sd,{RESERVED_STORE_METHODS:()=>As,STORE_METHOD_NAMES:()=>wd,__resetStateShadowWarnings:()=>dE,createScopeStore:()=>mE,createStore:()=>Ac,getSignals:()=>gE,isStore:()=>hE,warnStateKeyShadowsMethod:()=>xd});var Ne=Symbol("store"),Tc=Symbol("signals"),wd=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],As=new Set(wd),_d=new Set,md=(t,e)=>t?t+"."+e:String(e);function xd(t,e){let r=(e||"")+"::"+t;if(_d.has(r))return;_d.add(r);let o=e?`state.${e}`:"state",n=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${o}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${o}.${t}(\u2026)" no longer reaches the store method on this node. Use "${o}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${wd.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(n)}function dE(){_d.clear()}var yd=t=>!t||typeof t!="object"||Array.isArray(t)||t[Ne]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!Oc(t),pE=12,Oc=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function Rc(t,e,r){if(t===e)return!0;if(r>pE)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!Rc(t[o],e[o],r+1))return!1;return!0}if(Oc(t)&&Oc(e)){let o=Object.keys(t),n=Object.keys(e);if(o.length!==n.length)return!1;for(let s of o)if(!Object.prototype.hasOwnProperty.call(e,s)||!Rc(t[s],e[s],r+1))return!1;return!0}return!1}function Ac(t,e,r,o){r===void 0&&(r=0),o===void 0&&(o="");let n={},s={},i=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let _ in t){if(_==="__proto__"||!Object.prototype.hasOwnProperty.call(t,_))continue;if(_.startsWith("__")){s[_]=t[_];continue}As.has(_)&&xd(_,o);let y=t[_];r<i&&y&&typeof y=="object"&&!yd(y)?(s[_]=y,n[_]=Fe(Ac(y,e,r+1,md(o,_)))):(s[_]=y,n[_]=Fe(y))}let a=new Proxy(s,{get(_,y){if(y===Ne)return!0;if(y===Tc)return n;if(y==="__raw")return _;if(y==="$update")return c;if(y==="$parse")return f;if(y==="$clean")return u;if(y==="$keys")return d;if(y==="$values")return h;if(y==="$replace")return g;if(y==="$add")return p;if(y==="$remove")return m;if(y==="$destroy")return b;if(y==="$quietUpdate")return l;if(As.has(y)&&!Object.prototype.hasOwnProperty.call(n,y))switch(y){case"update":return c;case"parse":return f;case"clean":return u;case"keys":return d;case"values":return h;case"replace":return g;case"add":return p;case"remove":return m;case"destroy":return b;case"quietUpdate":return l}if(y==="__element")return _.__element;if(y==="parent")return _.parent;if(y==="root")return _.root;if(Object.prototype.hasOwnProperty.call(n,y)){let k=n[y].get();if(k!==void 0||!(y!=="root"&&_.root&&_.root!==a))return k}if(_[y]!==void 0)return _[y];let x=typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&pd()!=null;if(y!=="root"&&_.root&&_.root!==a){let k=_.root[y];return x&&!Object.prototype.hasOwnProperty.call(n,y)&&(n[y]=Fe(void 0),n[y].get()),k}if(x)return n[y]=Fe(void 0),n[y].get()},set(_,y,x){if(y==="__proto__")return!1;if(y==="__element"||y==="parent"||y==="root"||typeof y=="string"&&y.startsWith("__")&&!Object.prototype.hasOwnProperty.call(n,y))return _[y]=x,!0;As.has(y)&&xd(y,o);let k=md(o,y);if(Object.prototype.hasOwnProperty.call(n,y))if(x&&typeof x=="object"&&!yd(x)){if(x===_[y])return!0;let E=n[y].peek(),O=E&&E[Ne]?E.$parse():E;if(Rc(x,O,0))return!0;_[y]=x,Cs(k),n[y].set(Ac(x,e,r+1,k))}else{if(Array.isArray(x)&&x!==_[y]&&Array.isArray(n[y].peek())&&Rc(x,n[y].peek(),0))return!0;n[y].peek()!==x&&Cs(k),_[y]=x,n[y].set(x)}else _[y]=x,x&&typeof x=="object"&&!yd(x)?n[y]=Fe(Ac(x,e,r+1,k)):n[y]=Fe(x);return!0},has(_,y){return typeof y=="string"&&y.charCodeAt(0)===36&&As.has(y.slice(1))?!0:y in n||y in _},ownKeys(_){return Object.keys(n)},getOwnPropertyDescriptor(_,y){return y in n?{enumerable:!0,configurable:!0,value:n[y].peek()}:Object.getOwnPropertyDescriptor(_,y)},deleteProperty(_,y){return n[y]&&(n[y].peek()!==void 0&&Cs(md(o,y)),n[y].set(void 0),delete n[y]),delete _[y],!0}});function c(_,y){Es(()=>{for(let k in _)k!=="__proto__"&&(a[k]=_[k])});let x=s.__element;return x&&x.onUpdate&&!y?.quiet&&x.onUpdate(x,a,x.context),a}function l(_){return c(_,{quiet:!0})}function f(_){if(_||(_=new Set),_.has(a))return"[Circular]";_.add(a);let y={};for(let x in n){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let k=n[x].peek();k&&k[Ne]?y[x]=k.$parse(_):y[x]=k}return y}function u(){return Es(()=>{for(let _ in n)delete a[_]}),a}function d(){return Object.keys(n)}function h(){return Object.keys(n).map(_=>n[_].peek())}function g(_){return Es(()=>{for(let y in n)y in _||delete a[y];for(let y in _)y!=="__proto__"&&(a[y]=_[y])}),a}function p(_,y){let x=Object.prototype.hasOwnProperty.call(n,_)?n[_].peek():s[_];if(Array.isArray(x))return a[_]=[...x,y],a;if(x&&typeof x=="object"&&!Array.isArray(x)){if(Oc(y))x[Ne]?x.$update(y):a[_]={...x,...y};else{let k=String(Object.keys(x).length);x[Ne]?x.$update({[k]:y}):a[_]={...x,[k]:y}}return a}return a[_]=y,a}function m(_){return delete a[_],a}function b(){u(),s.__element=null,s.parent=null}return a}function hE(t){return t&&t[Ne]===!0}function gE(t){return t[Tc]}function mE(t,e){let r={},o={};if(t&&typeof t=="object")for(let i in t)o[i]=t[i],r[i]=Fe(t[i]);let n=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let a=e;for(;a;){let c=a[Tc];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[Ne]?a[bd]:null}return null};return new Proxy(o,{get(i,a){return a===Ne?!0:a===Tc?r:a===bd?e:a==="__raw"?i:Object.prototype.hasOwnProperty.call(r,a)?r[a].get():e&&a!=="then"&&a!=="constructor"?e[a]:i[a]},set(i,a,c){let l=n(a);return l?(l===r&&(i[a]=c),l[a].set(c),!0):(i[a]=c,r[a]=Fe(c),!0)},has(i,a){if(a in r||a in i)return!0;let c=e;for(;c;){if(a in c)return!0;c=c[Ne]?c[bd]:null}return!1},ownKeys(){return Object.keys(r)},getOwnPropertyDescriptor(i,a){return a in r?{enumerable:!0,configurable:!0,value:r[a].peek()}:Object.getOwnPropertyDescriptor(i,a)}})}var bd=Symbol("scope.parent");var ro="3.14.783";var Ho="__SMBLS_SIGNAL_INSTANCES__",Wo=(t,e,r)=>{let o=e||(typeof globalThis<"u"?globalThis:null);if(!o)return null;let n=o[Ho]||(o[Ho]={versions:[],engines:0,reported:!1});return typeof n.engines!="number"&&(n.engines=n.versions.length),n.versions.push(t||ro),r||n.engines++,n.engines>1&&!n.reported&&(n.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",n.engines,"copies of the reactive engine are loaded on this page:",n.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.")),n},kd=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Ho]};var qo="__SMBLS_SIGNAL_ENGINE__",n_=(t,e,r)=>{let o=e||ro,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[qo];return s&&s.engine&&s.version===o?(Wo(o,n,!0),s.engine):(s||(n[qo]={version:o,engine:t}),Wo(o,n,!1),t)},vd=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[qo]};var Ft=n_({...gd,...Sd,VERSION:ro},ro),Ts=Ft.createSignal,s_=Ft.createComputed,Q=Ft.createEffect,Pc=Ft.batch,Ic=Ft.getObserver,i_=Ft.setObserver,tr=Ft.createStore,Dc=Ft.createScopeStore,mt=Ft.isStore,a_=Ft.getSignals,c_=Ft.STORE_METHOD_NAMES,l_=Ft.RESERVED_STORE_METHODS,$c=Ft.warnStateKeyShadowsMethod,f_=Ft.__resetStateShadowWarnings,u_=Ft.VERSION;var Qg={};P(Qg,{assertEmitIntegrity:()=>Xg,css:()=>we,getActiveDocument:()=>Pa,getCacheSize:()=>Jg,getEmitStats:()=>kf,injectGlobal:()=>St,keyframes:()=>Mn,reset:()=>iw,resetEmitStats:()=>Yg,setActiveDocument:()=>Gg,setWasmEngine:()=>Ra,wrapHoverRule:()=>Pe});var Hg={};P(Hg,{COMPOUND_CSS_KEYWORDS:()=>yo,CONFIG:()=>wo,CONFIG_MERGE_EXL:()=>ne,CSS_NAMED_COLOR_HEX:()=>Ll,CSS_NATIVE_COLOR_REGEX:()=>re,CSS_UNITS:()=>Go,FACTORY:()=>oe,STANDARD_SCHEME_QUERIES:()=>sf,VALUE_TRANSFORMERS:()=>yf,activateConfig:()=>Rx,aliasCaseVariants:()=>An,animation:()=>Sg,appendSVGSprite:()=>Ca,appendSvgIconsSprite:()=>Ao,applyDocument:()=>va,applyHeadings:()=>ff,applyMediaSequenceVars:()=>Pr,applyReset:()=>Ea,applySequenceGlobalVars:()=>ca,applySequenceVars:()=>fr,applySpacingSequence:()=>ua,applyTimingSequence:()=>ka,applyTypographySequence:()=>xa,breakpoints:()=>xg,changeGlobalTheme:()=>bf,changeLightness:()=>og,checkIfBoxSize:()=>fa,class:()=>Ag,color:()=>pg,colorStringToRgbaArray:()=>me,compositeOverBackdrop:()=>bo,contrastRatio:()=>wn,convertSvgToSymbol:()=>la,createConfig:()=>ra,cssMediaVars:()=>Ql,cssVars:()=>Jl,defineResolvedThemeSignal:()=>En,defineThemeSignal:()=>Cn,devices:()=>wg,document:()=>Ex,findHeadingLetter:()=>of,findHeadings:()=>aa,font:()=>ag,fontFace:()=>fg,fontFamily:()=>cg,fontFamilyTypes:()=>lg,generateSequence:()=>Gt,generateSequencePosition:()=>Ig,generateSprite:()=>Tn,generateSubSequence:()=>ia,getActiveConfig:()=>C,getColor:()=>rt,getColorShade:()=>Bl,getDefaultOrFirstKey:()=>_o,getFnPrefixAndValue:()=>lr,getFontFace:()=>sg,getFontFaceEach:()=>xo,getFontFaceEachString:()=>Gl,getFontFaceString:()=>Ji,getFontFamily:()=>_a,getFontFormat:()=>ql,getFontSizeByKey:()=>wa,getMediaColor:()=>Rt,getMediaTheme:()=>_e,getResolvedThemeSignal:()=>Ox,getRgbTone:()=>qe,getSafeInk:()=>af,getSafeInkInfo:()=>Mg,getSequenceValue:()=>So,getSequenceValueBySymbols:()=>rf,getSequenceValuePropertyPair:()=>Ge,getShadow:()=>pa,getShapeByKey:()=>Sa,getSpacingBasedOnRatio:()=>Oe,getSpacingByKey:()=>wt,getSubratio:()=>sa,getSubratioDifference:()=>na,getTheme:()=>ga,getThemeSignal:()=>Tx,getTimingByKey:()=>ie,getTimingFunction:()=>xe,gradient:()=>hg,grid:()=>Eg,hexToRgb:()=>Qh,hexToRgbArray:()=>Ml,hexToRgba:()=>eg,hslToRgb:()=>jl,icons:()=>yg,isCSSVar:()=>gt,isDomDocument:()=>er,isGoogleFontsUrl:()=>Sn,isHostObject:()=>rr,isRawUnitValue:()=>Os,isResolvedColor:()=>Te,isScalingUnit:()=>oo,isWritableFamilyBucket:()=>Ed,linearChannelToSrgb:()=>zl,media:()=>ug,mixTwoColors:()=>Jh,mixTwoRgb:()=>rg,mixTwoRgba:()=>Ul,numToLetterMap:()=>Ke,oklabToLinearSrgb:()=>Hl,oklabToOklch:()=>Yi,oklchToGamutSafeSrgb:()=>Xi,oklchToOklab:()=>Wl,opacify:()=>xn,parkHostObject:()=>xr,parseColorToken:()=>Lt,popConfig:()=>et,pushConfig:()=>it,quietColorProbe:()=>ko,relativeLuminance:()=>mo,reset:()=>Ax,resolveBorderValue:()=>se,resolveColorRgb:()=>vo,resolveColorsInGradient:()=>Ta,resolveConfigDocument:()=>Ko,resolveFileUrl:()=>ye,resolveShadowValue:()=>Co,returnSubThemeOrDefault:()=>ng,rgbArrayToHex:()=>Fl,rgbToHSL:()=>Nl,rgbToHex:()=>tg,runThroughMedia:()=>lf,scratchDefaultConfig:()=>vn,scratchSystem:()=>In,scratchUtils:()=>Ir,semanticIcons:()=>bg,sequence:()=>cr,set:()=>To,setActiveConfig:()=>tf,setAdaptiveSchemeVar:()=>$r,setColor:()=>Dr,setCustomFont:()=>Zi,setCustomFontMedia:()=>Rr,setEach:()=>zg,setFont:()=>ba,setFontFamily:()=>Rn,setFontImport:()=>kn,setGradient:()=>On,setInCustomFontMedia:()=>Kl,setMediaTheme:()=>ya,setSVG:()=>Pn,setScalingVar:()=>oa,setShadow:()=>Lr,setSubScalingVar:()=>ef,setSvgIcon:()=>Eo,setTheme:()=>ma,setValue:()=>Vg,setVariables:()=>Dg,shadow:()=>mg,shape:()=>Rg,sizes:()=>Og,spacing:()=>dg,splitSpacedValue:()=>da,splitTopLevelCommas:()=>ar,splitTopLevelSpaces:()=>Ki,splitTransition:()=>mf,srgbChannelToLinear:()=>Vl,srgbToOklab:()=>Gi,svg:()=>kg,svgData:()=>vg,templates:()=>Cg,theme:()=>gg,timing:()=>_g,toCamel:()=>ea,toLinearChannel:()=>_n,transformBackgroundImage:()=>pf,transformBorder:()=>Ye,transformBorderRadius:()=>ur,transformBoxShadow:()=>Aa,transformDuration:()=>Oa,transformGridTemplate:()=>gf,transformShadow:()=>df,transformSize:()=>bt,transformSizeRatio:()=>L,transformTextStroke:()=>uf,transformTransition:()=>Ug,transfromGap:()=>hf,typography:()=>Qi,unit:()=>ig,vars:()=>Tg});var Ir={};P(Ir,{COMPOUND_CSS_KEYWORDS:()=>yo,CSS_NAMED_COLOR_HEX:()=>Ll,CSS_NATIVE_COLOR_REGEX:()=>re,CSS_UNITS:()=>Go,applyMediaSequenceVars:()=>Pr,applySequenceGlobalVars:()=>ca,applySequenceVars:()=>fr,changeLightness:()=>og,colorStringToRgbaArray:()=>me,compositeOverBackdrop:()=>bo,contrastRatio:()=>wn,convertSvgToSymbol:()=>la,findHeadingLetter:()=>of,findHeadings:()=>aa,generateSequence:()=>Gt,generateSequencePosition:()=>Ig,generateSprite:()=>Tn,generateSubSequence:()=>ia,getColorShade:()=>Bl,getDefaultOrFirstKey:()=>_o,getFnPrefixAndValue:()=>lr,getFontFace:()=>sg,getFontFaceEach:()=>xo,getFontFaceEachString:()=>Gl,getFontFaceString:()=>Ji,getFontFormat:()=>ql,getRgbTone:()=>qe,getSequenceValue:()=>So,getSequenceValueBySymbols:()=>rf,getSequenceValuePropertyPair:()=>Ge,getSubratio:()=>sa,getSubratioDifference:()=>na,hexToRgb:()=>Qh,hexToRgbArray:()=>Ml,hexToRgba:()=>eg,hslToRgb:()=>jl,isCSSVar:()=>gt,isDomDocument:()=>er,isGoogleFontsUrl:()=>Sn,isHostObject:()=>rr,isRawUnitValue:()=>Os,isResolvedColor:()=>Te,isScalingUnit:()=>oo,isWritableFamilyBucket:()=>Ed,linearChannelToSrgb:()=>zl,mixTwoColors:()=>Jh,mixTwoRgb:()=>rg,mixTwoRgba:()=>Ul,numToLetterMap:()=>Ke,oklabToLinearSrgb:()=>Hl,oklabToOklch:()=>Yi,oklchToGamutSafeSrgb:()=>Xi,oklchToOklab:()=>Wl,opacify:()=>xn,parkHostObject:()=>xr,parseColorToken:()=>Lt,relativeLuminance:()=>mo,resolveConfigDocument:()=>Ko,resolveFileUrl:()=>ye,returnSubThemeOrDefault:()=>ng,rgbArrayToHex:()=>Fl,rgbToHSL:()=>Nl,rgbToHex:()=>tg,setCustomFont:()=>Zi,setCustomFontMedia:()=>Rr,setFontImport:()=>kn,setInCustomFontMedia:()=>Kl,setScalingVar:()=>oa,setSubScalingVar:()=>ef,setVariables:()=>Dg,splitTopLevelCommas:()=>ar,splitTopLevelSpaces:()=>Ki,srgbChannelToLinear:()=>Vl,srgbToOklab:()=>Gi,toLinearChannel:()=>_n});var er=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),rr=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)},Ed=t=>t!==null&&typeof t=="object"&&!rr(t),xr=(t,e,r)=>{if(!t)return;if(er(r)){t.__domDocument||(t.__domDocument=r);return}let o=`__host_${e}`;t[o]||(t[o]=r)},Ko=t=>t?er(t.__domDocument)?t.__domDocument:er(t.document)?t.document:null:null;var oo=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",Go=["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"],yE=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),bE=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${Go.filter(t=>t!=="auto").map(yE).join("|")})$`),Os=t=>bE.test(String(t).trim());R();var Ll={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=Ll[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&&tt&&v){let r=tt.body.appendChild(tt.createElement("fictum")),o="rgb(1, 2, 3)";if(r.style.color=o,r.style.color!==o){tt.body.removeChild(r);return}if(r.style.color=t,r.style.color===o||r.style.color==="")return tt.body.removeChild(r),[0,0,0,0];t=v.getComputedStyle(r).color,tt.body.removeChild(r)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(r=>+r)):[0,0,0,0]},Jh=(t,e,r=.5)=>(t=me(t),e=me(e),Ul(t,e,r)),Qh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${o},${n})`},Ml=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,o,n]},tg=(t,e,r)=>"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1),Fl=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1),eg=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${r},${o},${n},${e})`},rg=(t,e,r=.5)=>{let o=[];for(let n=0;n<3;n++)o[n]=~~(t[n]+(e[n]-t[n])*r);return`rgb(${o})`},og=(t,e)=>{let[r,o,n]=e,s=Math.max(0,Math.min(100,n+parseFloat(t)));return[r,o,s]},Nl=(t,e,r)=>{let o=Math.max(t,e,r),n=o-Math.min(t,e,r),s=1-Math.abs(o+o-n-1),i=n&&(o==t?(e-r)/n:o==e?2+(r-t)/n:4+(t-e)/n);return[60*(i<0?i+6:i),s?n/s:0,(o+o-n)/2]},jl=(t,e,r,o=e*Math.min(r,1-r),n=(s,i=(s+t/30)%12)=>r-o*Math.max(Math.min(i-3,9-i,1),-1))=>[n(0),n(8),n(4)],Bl=(t,e)=>{let r=parseInt(t,16),o=(r>>16)+e;o>255?o=255:o<0&&(o=0);let n=(r>>8&255)+e;n>255?n=255:n<0&&(n=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|n<<8|o<<16)+16777216).toString(16).slice(1)},Ul=(t,e,r=.5)=>{let o=[];for(let n=0;n<4;n++){let s=n===3?i=>i:Math.round;o[n]=s(t[n]+(e[n]-t[n])*r)}return`rgba(${o})`},xn=(t,e)=>{let r=me(t);if(!r){lo()&&console.warn(t+" color is not rgba");return}return r[3]=e,`rgba(${r})`},gt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,yo=new Set(["currentcolor","transparent","thin","medium","thick"]),re=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,kA=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Lt=t=>{if(!w(t))return null;if(re.test(t))return{passthrough:t};if(gt(t))return{cssVar:t};let e=t.match(kA);if(!e)return null;let[,r,o,n]=e,s=o!==void 0?`0.${o}`:void 0,i=n&&n[0]==="="?n.slice(1):n;return{name:r,alpha:s,tone:i}},Te=t=>w(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),ar=t=>{let e=[],r="",o=0;for(let n of t){if(n==="("?o+=1:n===")"&&o>0&&(o-=1),n===","&&o===0){e.push(r),r="";continue}r+=n}return(r.length||!e.length)&&e.push(r),e},Ki=t=>{let e=[],r="",o=0;for(let n of t){if(n==="("?o+=1:n===")"&&o>0&&(o-=1),o===0&&/\s/.test(n)){r.length&&e.push(r),r="";continue}r+=n}return r.length&&e.push(r),e},_n=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),mo=t=>.2126*_n(t[0])+.7152*_n(t[1])+.0722*_n(t[2]),wn=(t,e)=>{let r=mo(t)+.05,o=mo(e)+.05;return r>o?r/o:o/r},Vl=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),zl=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,Gi=([t,e,r])=>{let[o,n,s]=[t,e,r].map(Vl),i=.4122214708*o+.5363325363*n+.0514459929*s,a=.2119034982*o+.6806995451*n+.1073969566*s,c=.0883024619*o+.2817188376*n+.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]},Hl=([t,e,r])=>{let o=t+.3963377774*e+.2158037573*r,n=t-.1055613458*e-.0638541728*r,s=t-.0894841775*e-1.291485548*r,i=o**3,a=n**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]},Yi=([t,e,r])=>{let o=Math.atan2(r,e)*180/Math.PI;return o<0&&(o+=360),[t,Math.sqrt(e*e+r*r),o]},Wl=([t,e,r])=>{let o=r*Math.PI/180;return[t,e*Math.cos(o),e*Math.sin(o)]},Xi=(t,e,r,o=24)=>{let n=a=>Hl(Wl([t,a,r])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=n(e);if(!s(i)){let a=0,c=e;for(let l=0;l<o;l++){let f=(a+c)/2;s(n(f))?a=f:c=f}i=n(a)}return i.map(a=>zl(Math.max(0,Math.min(1,a))))},bo=(t,e=1,r=[255,255,255])=>e>=1?t:t.map((o,n)=>o*e+r[n]*(1-e)),qe=(t,e)=>{w(t)&&t.includes("rgb")&&(t=me(t).join(", ")),w(t)&&(t=t.split(",").map(n=>parseFloat(n.trim()))),je(e)&&(e+="");let r=Fl(t),o=e.slice(0,1);if(o==="-"||o==="+"){let n=Bl(r,parseFloat(e));return Ml(n).join(", ")}else{let[n,s,i]=t,[a,c]=Nl(n/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return jl(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var ng=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var ye=(t,e)=>{if(!t||!e)return null;try{return new URL(t),null}catch{}let r=e[t];return r?r.content&&r.content.src:null},_o=(t,e)=>{if(t[e])return t[e].value;let r=()=>Object.keys(t).find(n=>n!=="default"&&t[n]&&t[n].value&&!t[n].isSystemFallback);if(t.default){let n=t[t.default];if(n&&n.isSystemFallback){let s=r();if(s)return t[s].value}if(n)return n.value}let o=r()||Object.keys(t).find(n=>n!=="default"&&t[n]&&t[n].value);return o&&t[o]&&t[o].value},ql=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},Sn=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),kn=t=>`@import url('${t}');`,Kl=t=>`@font-face { ${t} }`,Zi=(t,e,r,o={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=ql(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
33
33
  `);return`
34
34
  font-family: '${t}';
35
35
  font-style: ${o.fontStyle||"normal"};${r?`
@@ -37,24 +37,24 @@ FROM ${a}${l}`},GE=t=>{let e=[],r=(o,n)=>{for(let s in o){let i=n?`${n}/${s}`:s;
37
37
  font-stretch: ${o.fontStretch};`:""}${o.fontDisplay?`
38
38
  font-display: ${o.fontDisplay};`:""}${o.unicodeRange?`
39
39
  unicode-range: ${o.unicodeRange};`:""}
40
- src: ${i};`},Ar=(t,e,r,o)=>`@font-face {${Vi(t,e,r,o)}
41
- }`,mo=(t,e,r)=>Object.keys(e).map(n=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f}=e[n],u=Array.isArray(s)?s.map(d=>he(d,r)||d):he(s,r)||s;return Vi(t,u,i,{fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f})}),Jh=t=>Object.keys(t).map(r=>mo(r,t[r].value)),Bl=(t,e,r)=>{if(e&&e.isVariable){let s=he(e.url,r)||e.url;return mn(s)?yn(s):Ar(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap",unicodeRange:e.unicodeRange})}if(e[0])return mo(t,e,r).map(jl);let n=Array.isArray(e.url)?e.url.map(s=>he(s,r)||s):he(e.url,r)||e.url;return Ar(t,n,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch,unicodeRange:e.unicodeRange})},zi=(t,e)=>Object.keys(t).map(o=>Bl(o,t[o].value,e));R();R();R();R();var bn={};P(bn,{animation:()=>hg,breakpoints:()=>dg,class:()=>_g,color:()=>sg,devices:()=>pg,document:()=>hx,font:()=>Qh,fontFace:()=>rg,fontFamily:()=>tg,fontFamilyTypes:()=>eg,gradient:()=>ig,grid:()=>bg,icons:()=>lg,media:()=>og,reset:()=>gx,semanticIcons:()=>fg,sequence:()=>nr,shadow:()=>cg,shape:()=>Sg,sizes:()=>wg,spacing:()=>ng,svg:()=>gg,svgData:()=>mg,templates:()=>yg,theme:()=>ag,timing:()=>ug,typography:()=>Hi,unit:()=>Zh,vars:()=>xg});var nr={"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 Zh={default:"em"};var pA={browserDefault:16,base:16,type:"font-size",ratio:nr["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Hi=pA;var Qh={};var tg={},eg={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},rg={};var og={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var hA={base:Hi.base,type:"spacing",ratio:nr.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},ng=hA;var sg={},ig={};var ag={};var cg={};var lg={},fg={};var gA={default:150,base:150,type:"timing",ratio:nr["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},ug=gA;var hx={};var dg={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},pg={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 hg={};var gg={},mg={};var yg={};var mA={},bg=mA;var _g={};var gx={},xg={},wg={},Sg={};var Hl={},Wl={},re=new Set,Ul=bn,Vl={},qi=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Ul){let e=t.toLowerCase();Vl[e]=Ul[t];let r=qi(e);r!==e&&(Vl[r]=Ul[t]),e!==t&&(Vl[t]=Ul[t])}var yo={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Hl,cssMediaVars:Wl,CSS_VARS:Hl,CSS_MEDIA_VARS:Wl,_scratchConfig:!0,...Vl},_n=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return bt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let r=bt(e)?e:t.globalTheme,o=xs(bt(r)?r:"auto");return Object.defineProperty(t,"globalTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},mx=t=>t?_n(t):null,xn=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return bt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let r=bt(e)?e:t.resolvedTheme,o=xs(bt(r)?r:null);return Object.defineProperty(t,"resolvedTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},yx=t=>t?xn(t):null;_n(yo);xn(yo);var zl=ft(yo),ee={active:"0",0:yo},bx=t=>(bt(t)&&(ee.active=t),ee[t||ee.active]),Wi=[],it=t=>{t&&t._scratchConfig&&Wi.push(t)},tt=()=>{Wi.pop()},C=t=>Wi.length?Wi[Wi.length-1]:ee[t||ee.active]||yo,ql=t=>{if(S(t))return ee.active="1",ee[1]=st(t,ft(zl),re),wn(ee[1]),_n(ee[1]),xn(ee[1]),t},yA=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],bA=["useVariable","globalTheme","verbose"],_A=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],wn=t=>{for(let e of _A){let r;for(let o of e){let n=t[o];S(n)&&(r=r?st(r,n,re):n)}if(r)for(let o of e)S(t[o])&&(t[o]=r)}},Ki=(t,e,{cleanBase:r=!1}={})=>{let o=r?null:C(),n=ft(!r&&o&&o._scratchConfig?o:zl);for(let i of yA)delete n[i];for(let i of bA)Object.prototype.hasOwnProperty.call(zl,i)?n[i]=zl[i]:delete n[i];let s=st(e||{},n,re);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,wn(s),_n(s),xn(s),t&&(ee[t]=s),s};var He={"-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"},kg=(t,e)=>{let{key:r,variable:o,value:n,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(n*100)/100,val:~~n,scaling:s,index:i,scalingVariable:a,variable:o},e.scales[r]=s;let c=_x.has(e.unit)?"rem":e.unit;e.vars[o]=s+c},sr=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},_x=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Gi=(t,e)=>{let{base:r,type:o,unit:n}=e,s=_x.has(n)?"rem":n,i=(to(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(o&&o.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=He[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=He[t+1],u=Math.abs(t),d=Math.pow(xx,2*u),h=He[u];return h?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${h}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Kl=(t,e,r,o)=>{let{type:n}=o,i=t===2&&e.length===2?t+1:t,l=`${"--"+(o.varPrefix?o.varPrefix+"-":"")+(n&&n.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},Yi=(t,e)=>{let o=(t*e-t)/1.618,n=t*e-o,s=t+o,i=(n+s)/2;return[n,i,s]},Xi=(t,e)=>Yi(t,e).map(r=>r/t),Ji=(t,e)=>{let{key:r,base:o,value:n,ratio:s,variable:i,index:a}=t,l=~~(n*s)-~~n,f,[u,d,h]=Yi(n,s);l>16?f=[u,d,h]:f=[u,h],f.forEach((g,p)=>{let m=~~(g/o*1e3)/1e3,_=i+(p+1),b=a+(p+1)/10,y=Kl(p+1,f,i,e),x={key:r+(p+1),variable:_,value:g,scaling:m,scalingVariable:y,index:b};kg(x,e)})},xx=1.618,xA=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let o=Math.abs(t),n=e*Math.pow(r,t),s=e*Math.pow(r,o)/Math.pow(xx,2*o);return Math.max(n,s)},Yt=t=>{let{type:e,base:r,ratio:o,range:n,subSequence:s}=t,i=Math.abs(n[0])+Math.abs(n[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=n[1]-l,u=He[f],d=xA(f,r,o),h=~~(d/r*100)/100,g=c+u,p=Gi(f,t),m={key:u,variable:g,value:d,base:r,scaling:h,scalingVariable:p,ratio:o,index:f};kg(m,t),s&&Ji(m,t)}return t},vg=(t,e=0)=>{let{type:r,base:o,ratio:n,subSequence:s}=t,i=w(e)?e:He[e],a=w(e)?Object.entries(He).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=o*Math.pow(n,a),f=~~(l/o*100)/100,h="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,g=Gi(a,t),p={key:i,variable:h,value:l,base:o,scaling:f,scalingVariable:g,ratio:n,index:a};return kg(p,c),s&&Ji(p,c),c},Zi=(t="A",e)=>{let r=C(),{unit:o}=r;if(w(t)&&mt(t))return`var(${t})`;if(w(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(w(t)){let y=r.sizes;if(y){let x=y[t]||y[t.toLowerCase()];if(x!==void 0)return t.slice(0,1)==="-"?`calc(${x} * -1)`:x}}let{sequence:n,unit:s=o.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(ws(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+"-":""}${Mi(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=>a.test(y)?`var(${d}${y}${m})`:y;if(p.includes("+")){let[y,x]=p.split("+"),k=`${_(y)} + ${_(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("*")){let[y,x]=p.split("*"),k=`${_(y)} * ${_(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("-")){let[y,x]=p.split("-"),k=`${_(y)} - ${_(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}if(!n[p]&&p.length===2&&(r.verbose&&console.warn(p,"- value is not found because `subSequence` is set to false"),p=p.slice(0,1)),i||r.useVariable){let y=`var(${d}${p}${m})`;return g?`calc(${y} * -1)`:y}let b=n?n[p]:null;if(!b){if(console.warn("can't find",n,p),Pt())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+b.val+s:g+b.scaling+s},Gl=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let o=/(\s+-\s+|\s*[+*/,]\s*)/;return t.split(o).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:Zi(i,e)}).join("")},We=(t,e,r,o)=>{if(typeof t!="string")return C().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!o&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=sr(t);o=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Gl(t,r):t=Zi(t,r),{[e]:o?`${o}(${t})`:t}},Yl=(t,e)=>He[t-e],Qi=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((o,n)=>{let s=Yl(e,n);return r[s]})};R();var Cg=(t,e)=>{let r=C(),{cssVars:o}=r;z(t.value)||(o[t.var]=t.value)},ta=(t,e,r)=>{let o=C(),{unit:n}=o,s=e.unit||n.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]=Xi(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})`},wx=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),ir=(t,e={})=>{let r=C(),{unit:o,timing:n,cssVars:s}=r,i=t.unit||o.default,a=wx.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||ta(s,t,e);for(let u in l){let d=l[u],h=(t.type===n.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"})`)}},Tr=(t,e,r={})=>{let o=C(),{unit:n,media:s,cssVars:i}=o,a=e.slice(1),c=t[e],l=c.unit||t.unit||n.default,f=wx.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:h}=c,g=s[a];if(!g&&o.verbose&&console.warn("Can't find media query ",g),!u){let p=i[`@media ${g}`];p||(p=i[`@media ${g}`]={}),ta(p,c,r);let m=t.unit||n.default;if(f!==m&&d)for(let _ in d){let b=d[_],y=h[_]+f;p[b.variable+"_default"]=y,p[b.variable]=y}return}for(let p in d){let m=d[p],_=(to(f)?h[p]:d[p].val)+f;!g&&o.verbose&&console.warn("Can't find query ",g);let b=i[`@media ${g}`];b||(b=i[`@media ${g}`]={}),b[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=_}};R();var kx=io(),Sn=t=>{let e=C(),r="";for(let o in t)e.__svgCache[o]||(e.__svgCache[o]=!0,r+=t[o]);return r},wA=t=>{let e=t&&(t.default||t);if(!w(e))return kx&&console.warn("parseRootAttributes:",e,"is not a string"),{};let r=e.match(/<svg\s+(.*?)>/);if(!r||!r[1])return{};let n=r[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return n?n.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},SA=(t,e)=>{let r=[];if(t.replace(/id="([^"]*)"/g,(n,s)=>(r.push(s),n)),!r.length)return t;let o=t;for(let n of r){let s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${n}`;o=o.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 o},Sx=new Set,ea=(t,e)=>{let r=e&&e.default?e.default:e;if(!w(r))return kx&&!Sx.has(t)&&(Sx.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=r;let o=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(o){let u=o[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let n=wA(e),{width:s,height:i}=n,a=n.viewBox||`0 0 ${s||24} ${i||24}`,f=SA(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/width="[^"]*"/,""),f=f.replace(/height="[^"]*"/,""),f=f.replace("</svg","</symbol"),f=CA(f),f},kA="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",vA=new RegExp(`<(${kA})\\b([^>]*?)\\s*/>`,"g"),CA=t=>t.replace(vA,"<$1$2></$1>");var En={};P(En,{STANDARD_SCHEME_QUERIES:()=>Jl,appendSVGSprite:()=>ya,appendSvgIconsSprite:()=>So,applyDocument:()=>ma,applyHeadings:()=>ef,applyReset:()=>ba,applySpacingSequence:()=>oa,applyTimingSequence:()=>ga,applyTypographySequence:()=>da,checkIfBoxSize:()=>ra,getColor:()=>et,getFontFamily:()=>ua,getFontSizeByKey:()=>pa,getMediaColor:()=>It,getMediaTheme:()=>me,getSafeInk:()=>Zl,getSafeInkInfo:()=>Tg,getShadow:()=>sa,getShapeByKey:()=>ha,getSpacingBasedOnRatio:()=>Te,getSpacingByKey:()=>St,getTheme:()=>aa,getTimingByKey:()=>ne,getTimingFunction:()=>ye,quietColorProbe:()=>bo,resolveBorderValue:()=>oe,resolveColorRgb:()=>_o,resolveShadowValue:()=>xo,runThroughMedia:()=>tf,setAdaptiveSchemeVar:()=>Pr,setColor:()=>Rr,setFont:()=>fa,setFontFamily:()=>vn,setGradient:()=>kn,setMediaTheme:()=>la,setSVG:()=>Cn,setShadow:()=>Ir,setSvgIcon:()=>wo,setTheme:()=>ca,splitSpacedValue:()=>na});R();var Jl={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},ge=new Set,EA=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"]),Xl=new Set,vx=t=>{if(!t)return!1;let{color:e,gradient:r}=t;return!!(S(e)&&Object.keys(e).length||S(r)&&Object.keys(r).length)},Cx=new Set,Eg=0,bo=t=>{Eg++;try{return t()}finally{Eg--}},AA=(t,e)=>{if(!w(t)||t.indexOf(" ")===-1)return null;let r=t.replace(/\s+/g,""),o=Lt(r);if(!o||o.passthrough||o.cssVar)return null;let{color:n,gradient:s}=e;return!n[o.name]&&!s[o.name]?null:r},Ag=(t,e,r)=>{let o=AA(t,r);if(o){if(!Cx.has(t)){Cx.add(t);let i=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` has a space before its alpha/tone modifier${i} \u2014 did you mean \`${o}\`? 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 n=Lt(t);if(n&&n.name&&!n.passthrough&&!n.cssVar&&(n.alpha!==void 0||n.tone!==void 0)&&vx(r)&&!r.color[n.name]&&!r.gradient[n.name]){if(!Eg&&!Xl.has(t)){Xl.add(t);let i=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` does not resolve${i} \u2014 \`${n.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=w(e)?e.toLowerCase():"";if(!EA.has(s)||!vx(r))return t;if(!Xl.has(s)){Xl.add(s);let i=r&&r.name?` (design system \`${r.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.`)}},et=(t,e,r)=>{let o=r||C();if(!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let n,s,i;if(T(t))[n,s,i]=t;else{let u=Lt(t);if(!u){let{color:d,gradient:h}=o,g=h[t]||d[t];return g?(e&&g[e]&&(g=g[e]),o.useVariable?`var(${g.var})`:g.value):Ag(t,t,o)}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=o,l=a[n]||c[n];if(!l)return Ag(t,n,o);if(e)if(l[e]!==void 0)l=l[e];else if(T(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&o.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 o.verbose&&console.warn(t," - does not have ",e);if(w(l)){if(ge.has(n))return l;ge.add(n);try{return et(l,null,r)}finally{ge.delete(n)}}let f=l.rgb;if(!f){let u=o.useVariable?`var(${l.var})`:l.value;if((s||i)&&u){let d=s!==void 0?s:1;if(!i)return`rgb(from ${u} r g b / ${d})`;if(i.charCodeAt(0)===43||i.charCodeAt(0)===45){let g=parseFloat(i),p=g<0?"-":"+",m=Math.abs(g);return`rgb(from ${u} calc(r ${p} ${m}) calc(g ${p} ${m}) calc(b ${p} ${m}) / ${d})`}return`hsl(from ${u} h s ${i}% / ${d})`}return u}return i&&!l[i]&&(f=ze(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})`:o.useVariable?`var(${l.var})`:l.value!==void 0?l.value:`rgb(${f})`},Ex=t=>{let e=pe(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}},TA=(t,e)=>{if(!e)return t;let r=t.rgb;if(e.tone){let n=ze(r,e.tone);r=w(n)?n.split(",").map(s=>parseFloat(s.trim())):n}let o=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:r,alpha:o}},_o=(t,e,r)=>{let o=e||C();if(!w(t))return null;let n=Lt(t);if(n){if(n.passthrough){let d=pe(n.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(n.cssVar)return null}let s=n?n.name:t,{color:i,gradient:a}=o,c=i[s]||a[s];if(!c)return Ex(t);if(w(c)){let d;if(ge.has(s))d=Ex(c);else{ge.add(s);try{d=_o(c,o,r)}finally{ge.delete(s)}}return d?TA(d,n):null}if(c.rgb===void 0&&S(c)){let d=`@${r||"light"}`;c=c[d]!==void 0?c[d]:c["@light"]}if(!c||c.rgb===void 0)return null;let l=c.rgb;n&&n.tone&&(l=ze(l,n.tone));let f=w(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=n&&n.alpha!==void 0?parseFloat(n.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},It=(t,e,r)=>{let o=r||C();if(e||(e=o.globalTheme==="auto"?null:o.globalTheme),!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;let n,s,i;if(T(t))n=t[0];else{let u=Lt(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}else n=t}let{color:a,gradient:c}=o,l=a[n]||c[n],f=S(l);if(f&&l.value)return et(t,`@${e}`,r);if(f){if(o.useVariable&&l.var)return s||i?et(t,null,r):`var(${l.var})`;if(e)return et(t,`@${e}`,r);{let u={},d=o.scopeSelector||":root",h=d===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${d}:not([data-theme])`;for(let g in l){if(g.charCodeAt(0)!==64)continue;let p=g.slice(1),m=et(t,g,r);if(m!==void 0&&(u[`[data-theme="${p}"] &`]=m,p==="light"||p==="dark")){let _=o.media&&o.media[p]||Jl[p];if(!_)continue;let b="@media "+(_==="print"?`${_}`:`screen and ${_}`);u[b]={[`${h} &`]:m}}}return u}}else return Ag(t,n,o)},Pr=(t,e,r,o)=>{let s=`--${o.varPrefix?o.varPrefix+"-":""}${e}-${r}`,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){o.cssVars[s]=i,o.cssMediaVars||(o.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(o.cssMediaVars[l]||(o.cssMediaVars[l]={}),o.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;o.cssMediaVars[f]||(o.cssMediaVars[f]={}),o.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},Rr=(t,e,r)=>{let o=C();if(S(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0))return o.useVariable&&t.var&&(o.cssVars[t.var]=t.value),t;if(w(t)&&mt(t)){let p=t.slice(2);if(t=et(p),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=p.split(" "),_=o.color[m[0]];if(_&&!_.value&&!_.rgb&&(w(_)||T(_)||S(_))&&!ge.has(m[0])){ge.add(m[0]);try{o.color[m[0]]=Rr(_,m[0])}finally{ge.delete(m[0])}_=o.color[m[0]]}if(_&&_.value){let b=_.rgb,y=m[1]!==void 0?m[1]:"1",x=m[2];x&&(b=ze(b,x)),t=`rgba(${b}, ${y})`}else{let b=m[2],y=m[1]!==void 0?m[1]:"1";if(b)try{let x=pe(m[0]);x&&x.length>=3?t=`rgba(${ze(x.slice(0,3).join(", "),b)}, ${y})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(T(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let p={};for(let m in t)m!=="var"&&(p[m]=Rr(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return o.useVariable&&Pr(p,"color",e,o),p}let s=`--${o.varPrefix?o.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(w(i)&&!i.includes("(")&&!i.startsWith("#")){let p=Lt(i);if(p&&p.name&&!p.passthrough&&!p.cssVar){let m=o.color[p.name];if(m&&!m.value&&!m.rgb&&(w(m)||T(m)||S(m))&&!ge.has(p.name)){ge.add(p.name);try{o.color[p.name]=Rr(m,p.name)}finally{ge.delete(p.name)}}let _=o.color[p.name];if(_&&_.rgb){let b=_.rgb;p.tone&&(b=ze(b,p.tone));let y=p.alpha!==void 0?parseFloat(p.alpha):_.alpha!==void 0?_.alpha:1;i=`rgba(${b}, ${y})`}}}let a=pe(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),h=`${c}, ${l}, ${f}`,g=`rgba(${h}, ${d})`;return o.useVariable&&(o.cssVars[s]=g),{var:s,rgb:h,alpha:d,value:g}},kn=(t,e,r)=>{let o=C();if(S(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(w(t)&&mt(t)&&(t=et(t.slice(2))),T(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let i={};for(let a in t)a!=="var"&&(i[a]=kn(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return o.useVariable&&Pr(i,"gradient",e,o),i}let s=`--${o.varPrefix?o.varPrefix+"-":""}gradient-${e}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[s]=t.value||t),{var:s,value:t.value||t}};R();var Zl=(t,e,r={},o)=>{let n=o||C(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=r,f=i?3:s,u=a||(n.globalTheme&&n.globalTheme!=="auto"?n.globalTheme:"light"),d=w(e)?e:String(e),h=Lt(t),g=h&&!h.passthrough&&!h.cssVar?h.name:null,p=(Y,j)=>c?{value:Y,...j}:Y;if(g){let Y=n.color[`${g}Safe`];if(Y){let j=`${d}@${u}`,pt=Y[j]!==void 0?Y[j]:Y[d];if(pt!==void 0){let Et=pt&&pt.rgb!==void 0?n.useVariable&&pt.var?`var(${pt.var})`:pt.value:et(pt,null,n);return p(Et,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=et(t,u?`@${u}`:null,n),_=_o(t,n,u),b=_o(e,n,u);if(!_||!b)return n.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 y=ho(b.rgb,b.alpha),x=ho(_.rgb,_.alpha,y),k=gn(x,y);if(k>=f-.02)return p(m,{ratio:k,deviation:0,derived:!1,overridden:!1});let[E,O,$]=ji(_.rgb),[,D,I]=Bi([E,O,$]),H=po(y)>.5,V=H?E:1-E,rt=Y=>{let j=H?E-Y:E+Y,pt=Math.max(0,Math.min(1,j));return{rgb:Ui(pt,D,I),L:pt}},at=Y=>{let{rgb:j}=rt(Y),pt=ho(j.map(Et=>Math.round(Et)),_.alpha,y);return gn(pt,y)},G=0,K=V,lt=at(K)>=f;if(lt)for(let Y=0;Y<l;Y++){let j=(G+K)/2;at(j)>=f?K=j:G=j}else G=K;let{rgb:Vt,L:W}=rt(K),wt=Vt.map(Y=>Math.round(Y)),L=at(K),ot=_.alpha<1?`rgba(${wt.join(", ")}, ${_.alpha})`:`rgb(${wt.join(", ")})`,U=Math.abs(W-E)*100;return p(ot,{rgb:wt,ratio:L,startRatio:k,deviation:U,derived:!0,overridden:!1,reachable:lt})},Tg=(t,e,r={},o)=>Zl(t,e,{...r,meta:!0},o);R();R();var OA=t=>{let r=C().spacing||{},o=parseFloat(t.spacingRatio),n={...r,ratio:Number.isFinite(o)?o:r.ratio,sequence:{},scales:{}};return Yt(n),n},RA=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;gt(r,{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Yt(r),Tr(t,e)}},ra=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),o=e.includes("border")||e.includes("outline");return r&&!o},oa=()=>{let t=C(),{spacing:e}=t;Yt(e),ir(e),RA(e)},PA=t=>{let e=C(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Yt(t)},St=(t,e="padding",r,o)=>{let n=PA(r);if(w(t)){if(!o&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!o&&t.includes("(")){let i=sr(t);o=i[0],t=i[1]}}let s=o?[t]:uo(t);if(T(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)=>We(s[f],e+l+i,n,o);return a[s.length].map((l,f)=>c(l,f))}return We(t,e,n,o)}},Te=(t,e,r,o)=>{let n=C(),{spacing:s}=n,i=r||t[e];if(!o&&w(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!o&&w(i)&&i.includes("(")){let a=sr(i);o=a[0],i=a[1]}if(t.spacingRatio){let a=OA(t);return St(i,e,a,o)}return St(i,e,s,o)},na=t=>{let e=r=>{let o=["+","-","*","/"].includes(r),n=zo.some(i=>t.includes(i));return o||n?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};R();var xo=(t,e,r)=>!w(t)||te.test(t)?t:or(t).map(o=>(o=o.trim(),o.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(n.startsWith("--"))return`var(${n})`;let s=bo(()=>et(n,e));if(Ae(s))return s;if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em"||n==="inset"||n==="none")return n;r&&r(n);let i=St(n,"shadow");return i&&i.shadow?i.shadow:n}).join(" "))).join(", "),Ir=(t,e,r,o)=>{let n=C();if(T(t)){let a={"@light":Ir(t[0],e,"light"),"@dark":Ir(t[1],e,"dark")};return n.useVariable&&Pr(a,"shadow",e,n),a}if(S(t)){let a={};for(let c in t)a[c]=Ir(t[c],e,c.startsWith("@")?c.slice(1):c);return n.useVariable&&Pr(a,"shadow",e,n),a}w(t)&&!te.test(t)&&(t=xo(t));let i=`--${n.varPrefix?n.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[i]=t),{var:i,value:t}},sa=(t,e)=>{let r=C();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!w(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;let[o]=T(t)?t:t.split(" "),s=r.shadow[o],i=S(s);if(!s)return r.verbose&&console.warn("Can't find color ",o),t;if(e){let a=s["@"+e]||s[e];if(a)return a.value!==void 0?a.value:a;r.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={};for(let c in s){if(c.charCodeAt(0)!==64)continue;let l=r.media[c.slice(1)];if(!l)continue;let f="@media "+(l==="print"?`${l}`:`screen and ${l}`),u=s[c],d=u&&(u.value!==void 0?u.value:u);d!==void 0&&(a[f]=d)}return a}return r.verbose&&console.warn("Can't find color",t),t};var IA=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),DA=t=>IA.has(t),oe=(t,e,r)=>{if(t==null)return;let o=t+"";if(te.test(o))return o;let n=o.trim();return n==="none"||n==="0"||n==="initial"||n==="inherit"||n==="unset"?o:o.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(mt(s))return`var(${s})`;if(DA(s)||/^\d/.test(s)||s==="0")return s;let i=bo(()=>et(s,e));if(Ae(i))return i;r&&r(s);let a=St(s,"border");return a&&a.border?a.border:s}).join(" ")};R();var $A=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"]),Ax=["color","Color","background","Background","fill","Fill","stroke","Stroke"],LA=t=>{for(let e=0;e<Ax.length;e++)if(t.includes(Ax[e]))return!0;return!1},MA={boxShadow:xo,textShadow:xo,border:oe,borderTop:oe,borderRight:oe,borderBottom:oe,borderLeft:oe,outline:oe,columnRule:oe},FA=t=>{if(!t)return!1;let e=Lt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},Tx=new Set,NA=(t,e,r,o,n,s)=>{if(!Pt())return;let i=`${t}::${e}::${r||""}::${o}`;Tx.has(i)||(Tx.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(r?` (${r})`:"")+` did not fully resolve: "${o}" -> "${n}" 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.`))},Rx=(t,e,r,o)=>{let n=MA[e];if(!n)return et(r,o);let s=null,i=n(r,o,a=>{!s&&FA(a)&&(s=a)});return s&&NA(t,e,o,r,i,s),i},Ql=t=>{let e={},{state:r,media:o,helpers:n,...s}=t;return Object.keys(s).map(a=>{let l=["color","Color","background","border"].some(f=>a.includes(f));return e[a]=l?et(t[a]):t[a]}),e},ia=t=>(t.value||(t.value=Ql(t)),t.value),aa=(t,e)=>{let r=C();if(r.useVariable)return me(t,e);let o=r.theme;if(w(t)){let[n,s]=t.split(" "),i=o[n];if(i){if(!s&&!e)return ia(i);t=[n,s||e]}}if(z(t)&&t[1]){let n=t[0],s=t[1],{helpers:i,media:a,state:c}=o[n];if(a&&a[s])return ia(a[s]);if(i&&i[s])return ia(i[s]);if(c&&c[s])return ia(c[s])}else if(S(t))return Ql(t)},jA=(t,e,r)=>{if(S(e))t.variants.inverse.value=Ql(e);else if(e===!0){let{color:o,background:n}=r;t.variants.inverse={value:{color:n,background:o}}}},BA=(t,e,r,o)=>{let n=aa(r);o[`&:${e}`]=n,S(r)&&!r.value&&(r.value=n)},UA=(t,e)=>{let{state:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return BA(t,n,s,e),t}),t):void 0},VA=(t,e,r,o)=>{let n=aa(r);o[`@media (prefers-color-scheme: ${e})`]=n,S(r)&&!r.value&&(r.value=n)},zA=(t,e)=>{let{media:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return(n==="dark"||n==="light")&&VA(t,n,s,e),n==="inverse"&&jA(t,s,e),t}),t):void 0},HA=(t,e)=>{let r=C(),{helpers:o}=t;return o?(Object.keys(o).map(s=>{let i=o[s];return w(i)?o[s]=r.theme[i]:ia(o[s]),t}),t):void 0},ca=(t,e)=>{let r=C();if(r.useVariable)return la(t,e);let{state:o,media:n,helpers:s}=t,i=Ql(t,e),c=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}`;return UA(t,i),zA(t,i),HA(t,i),{var:c,value:i,state:o,media:n,helpers:s}};var Og=(t,e,r)=>{let{cssVars:o}=r;r.cssMediaVars||(r.cssMediaVars={});let n=r.cssMediaVars,s=r.globalTheme!==void 0?r.globalTheme:"auto",i={},a=new Set;for(let l in t)if(t[l])for(let f of Object.keys(t[l]))a.add(f);let c=new Set;for(let l of a){let f=l.slice(0,1);if(!(f==="@"||f==="."||f===":")&&LA(l))for(let u in t){if(c.has(u))continue;let d=t[u]?.[l];if(d===void 0)continue;let h=et(d,`@${u}`);h!==void 0&&w(h)&&/^[a-z][a-zA-Z]+$/.test(h)&&!$A.has(h)&&c.add(u)}}for(let l of a){let f=l.slice(0,1),u=Object.values(t).some(d=>z(d?.[l]));if(f==="."&&u){let d=l.slice(1),h={};for(let g in t)z(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=Og(h,`${e}-${d}`,r)}else if(f===":"&&u){let d=l.replace(/^:+/,""),h={};for(let g in t)z(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=Og(h,`${e}-${d}`,r)}else if(f!=="@"&&f!=="."&&f!==":"){let h=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${l}`,g=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,p;for(let m in t){if(c.has(m))continue;let _=t[m]?.[l];if(_===void 0)continue;let b=Rx(e,l,_,`@${m}`);if(b===void 0)continue;(g&&m===g||!g&&(m==="light"||p===void 0))&&(p=b);let y=`[data-theme="${m}"]`;if(n[y]||(n[y]={}),n[y][h]=b,m==="dark"||m==="light"){let x=`@media (prefers-color-scheme: ${m})`;n[x]||(n[x]={}),n[x][h]=b}}p!==void 0&&(o[h]=p),i[l]=`var(${h})`,i[`.${l}`]={[l]:i[l]}}}return(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color}),i},la=(t,e,r,o)=>{let n=C(),{cssVars:s}=n,i={value:t},a=!r&&!o;if(z(t)){if(a&&n.useVariable){let c={};for(let l in t)l.startsWith("@")&&z(t[l])&&(c[l.slice(1)]=t[l]);if(Object.keys(c).length){let l=Og(c,e,n);Object.assign(i,l)}}for(let c in t){let l=c.slice(0,1),f=t[c];if(l==="@"||l===":"||l==="."){let u=l==="@"&&c;i[c]=la(f,e,c,o||u)}else if(!a){let u=Rx(e,c,f,o),d=[...new Set([o,r].filter(m=>m).map(m=>m.slice(1)))],h=d.length?"-"+d.join("-"):"",p=`--${n.varPrefix?n.varPrefix+"-":""}theme-${e}${h}-${c}`;n.useVariable?(n.useThemeSuffixedVars&&(s[p]=u),i[c]=`var(${p})`):i[c]=u,i[`.${c}`]={[c]:i[c]}}}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(w(t)&&mt(t)){let l=n.theme[t.slice(2)];return me(l,o)}return i},Rg=t=>{let e=C(),r={};for(let o in t){let n=o.slice(0,1);if(z(t[o])){if(n==="@")continue;n===":"?r[`&${o}`]=Rg(t[o]):n==="."&&(r[`&${o}`]=Rg(t[o]))}else r[o]=t[o]}return r},Px=(t,e)=>{let r=e.shift();return t[r]?Px(t[r],e):t},Ox=(t,e)=>T(e)?Px(t,e):w(e)&&t[e]?t[e]:t;var me=(t,e)=>{let r=C();if(w(t)&&mt(t)&&(t=me(t.slice(2))),!t||!w(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[o,...n]=T(t)?t:t.split(" "),s=r.theme[o];return s&&n.length?s=Ox(s,n):s&&e&&(s=Ox(s,e)),Rg(s)};R();R();var fa=(t,e)=>{let r=C(),o=`--font-${e}`;if(!t||T(t)&&!t[0])return;let n;if(t.isVariable){let s=he(t.url,r.files)||t.url;mn(s)?n=yn(s):n=Ar(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap",unicodeRange:t.unicodeRange})}else if(t[0])n=mo(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>he(i,r.files)||i):he(t.url,r.files)||t.url;n=Ar(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch,unicodeRange:t.unicodeRange})}return{var:o,value:t,fontFace:n}},ua=(t,e)=>{let r=C(),{fontFamily:o}=r;return go(e||o,t)},vn=(t,e)=>{let r=C(),{fontFamily:o,fontFamilyTypes:n}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!o.default)&&(o.default=e),S(s)&&(s=uo(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${n[i]}`;return{var:a,value:c,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};R();var tf=t=>{let e=C(),{typography:r,media:o}=e;for(let n in t){let s=n.slice(0,1)==="@",i=t[n];if(!s)continue;let{mediaRegenerate:a}=t,c=n.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p}=t;gt(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"]),_=i.unit||p,b=!i.unit&&m.has(p)?"rem":_,y=o[c],x="@media "+(y==="print"?`${y}`:`screen and ${y}`);if(r.templates[x]={fontSize:i.base/r.browserDefault+b},!a){gt(i,{sequence:{},scales:{},vars:{}}),Yt(i),Tr(t,n);continue}gt(i,{sequence:{},scales:{},templates:{},vars:{}}),Yt(i),Tr(t,n)}},ef=t=>{let e=C();if(t.h1Matches){let r=t.unit,o=Qi(t),{templates:n}=t;for(let s in o){let i=`h${parseInt(s)+1}`,a=n[i];n[i]={fontSize:e.useVariable?`var(${o[s]?.variable})`:`${o[s]?.scaling}${r}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},da=()=>{let t=C(),{typography:e}=t;Yt(e),ef(e),ir(e),tf(e)},pa=t=>{let e=C(),{typography:r}=e;return We(t,"fontSize",r)};R();var ha=t=>{if(!w(t))return;let r=C().shape;if(r)return r[t]!==void 0?r[t]:r[t.toLowerCase()]};R();var ga=()=>{let t=C(),{timing:e}=t;Yt(e),ir(e)},ye=t=>{let e=C(),{timing:r}=e;return r[t]||r[Li(t)]||t},ne=(t,e="timing")=>{let r=C(),{timing:o}=r;return We(t,e,o)};R();var ma=()=>{let t=C(),{fontFamily:e,theme:r,typography:o}=t,n=t.document;return Ze(n)?(yr(t,"document",n),n=t.document={}):n||(n=t.document={}),gt(n,{theme:r.document,fontFamily:go(e),fontSize:o.base,lineHeight:o.lineHeight})};R();var Ig={document:Q},Cn=(t,e)=>{let r=C();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?ea(e,t):t},ya=(t,e=Ig)=>{let r=C(),o=Object.keys(t).length?{}:r.svg;for(let n in t)o[n]=t[n];Dx(o,e)},wo=(t,e)=>{let r=C();return r.useIconSprite&&!r.semanticIcons?.[e]?Cn(t,e):t},So=(t,e=Ig)=>{let r=C(),o=Object.keys(t).length?{}:r.icons;for(let n in t)o[n]=t[n];Dx(o,e)},Pg=(t,e={isRoot:!0})=>{if(!t||!t.createElementNS)return;let r=t.createElementNS("http://www.w3.org/2000/svg","svg");return e.isRoot&&(r.setAttribute("aria-hidden","true"),r.setAttribute("width","0"),r.setAttribute("height","0"),r.setAttribute("style","position:absolute"),r.setAttribute("id","svgSprite")),r},WA=(t,e)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let o=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new r().parseFromString(o,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},Ix=(t,e,r)=>{for(;e.firstChild;){let o=e.firstChild;r.appendChild(t.importNode(o,!0)),o.remove()}},Dx=(t,e=Ig)=>{let r=C(),o=e.document||Q;if(!o||!o.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),Sn(t);let n=o.querySelector("#svgSprite"),s=Sn(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=WA(o,s);if(n)if(a)Ix(o,a,n);else if(o.body.insertAdjacentHTML)n.insertAdjacentHTML("beforeend",s);else{let c=Pg(o,{isRoot:!1});c.innerHTML=s,n.append(...c.children)}else if(a){let c=Pg(o);c&&c.nodeType&&(Ix(o,a,c),o.body.prepend(c))}else if(o.body.insertAdjacentHTML)o.body.insertAdjacentHTML("afterbegin",i);else{let c=Pg(o);c&&c.nodeType&&(c.innerHTML=s,o.body.prepend(c))}};R();var ba=(t={})=>{let e=C(),r=e.typography||{},o=e.document||{},n=S(e.reset)?e.reset:e.reset={};if(n[":root"]){let c=n,l=r.templates||{};c.body={...e.useDocumentTheme?me("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}=r.templates||{},a=e.useDocumentTheme?me("document"):{};if(n.html&&qt(n.html,a),r.unit)for(let c in i){if(c.slice(0,6)!=="@media")continue;let l=i[c];delete i[c],!(!l||!l.fontSize)&&(n[c]||(n[c]={}),n[c].html||(n[c].html={}),n[c].html.fontSize===void 0&&(n[c].html.fontSize=l.fontSize))}if(r.unit){let c=e.media||{};for(let l in r){if(l.charAt(0)!=="@")continue;let f=r[l];if(!f||f.unit===r.unit||!f.unit)continue;let u=f.unit,d=f.base||r.base,h=f.browserDefault||r.browserDefault,g=l.slice(1),p=c[g];if(!p)continue;let m="@media "+(p==="print"?p:"screen and "+p);n[m]||(n[m]={}),n[m].html||(n[m].html={}),n[m].html.fontSize=d/h+u}}return st(gt(n,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",...a,fontSize:r.unit?r.base/r.browserDefault+r.unit:r.browserDefault+"px",fontFamily:o.fontFamily,lineHeight:o.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:o.fontFamily,fontSize:r.unit?"1"+e.unit.default:r.base/r.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}},re)};R();var qA=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),qe=t=>oe(t),rf=t=>te.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(mt(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=et(e);return Ae(r)?r:e}).join(" "),of=(t,e)=>sa(t,e),_a=(t,e)=>te.test(t)?t:or(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(mt(o))return`var(${o})`;if(o==="inset"||o==="none")return o;let n=et(o);if(Ae(n)){let i=It(o,e);return S(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em")return o;let s=St(o,"shadow");return s&&s.shadow?s.shadow:o}).join(" "):"")).join(", "),xa=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let o=t.slice(0,r+1),n=t.slice(r+1,t.lastIndexOf(")")),s=")",a=or(n).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||qA.has(f)||f==="transparent"||te.test(f))return f;let u=et(f);return Ae(u)?u:f}).join(" ")));return o+a.join(", ")+s},nf=(t,e)=>{let r=C();return or(t).map(o=>{let n=o.trim();if(mt(n))return`var(${n})`;if(/^var\(/.test(n)||n.includes("url"))return n;if(r.gradient?.[n]){let s=It(n,e);if(w(s))return s;if(S(s)){for(let i in s)if(w(s[i]))return s[i]}return n}return n.includes("gradient")?xa(n,e):n.includes("/")||n.startsWith("http")||n.includes(".")&&!Lt(n)?`url(${n})`:n}).join(", ")},sf=t=>w(t)&&t.split(" ").map(e=>St(e,"gap").gap).join(" "),Dg=t=>{let e=t.split(" ");return e.length?e.map(r=>mt(r)?`var(${r})`:r.length<3||r.includes("ms")?ne(r).timing||r:ye(r)?ye(r):r).join(" "):t},wa=(t,e,r)=>{if(w(t))return t.split(",").map(o=>ne(o).timing||o).join(",")},af=t=>{let e=t.split(",");if(e.length)return e.map(Dg).join(",")};function _t(t,e,r={},o={}){let n=ut.call(this,e||r[t]);if(n==null)return;let s;if(w(n)){if(/^(?:env|var)\(/.test(n.trim()))return{[t]:n};if(n.includes("(")){let c=sr(n);s=c[0],n=c[1]}let i=r.scaleBoxSize,a=ra(t);!i&&a&&!o.ratio&&(n=na(n))}return o.ratio?Te(r,t,n,s):St(n,t,void 0,s)}var N=(t,e=null,r)=>_t(t,e,r,{ratio:!0}),ar=(t,e,r,o="borderRadius")=>{if(w(t))return{[o]:t.split(" ").map(n=>{let s=ha(n);return s!==void 0?s:Te(e,r,n)[r]}).join(" ")}};R();var An="__smblsThemeRootOwner",Tn=t=>{let e=t&&t.__prefersListener,r=t&&t.__prefersMq;if(e&&r)try{typeof r.removeEventListener=="function"?r.removeEventListener("change",e):typeof r.removeListener=="function"&&r.removeListener(e)}catch{try{r.removeListener(e)}catch{}}t&&(t.__prefersListener=null,t.__prefersMq=null)},$x=(t,e,r)=>{if(!(!t||!e)){Tn(t),t.__prefersListener=r,t.__prefersMq=e;try{e.addEventListener("change",r)}catch{e.addListener(r)}}},KA=(t,e)=>{let r=C(),{cssVars:o}=r,n=e.startsWith("--")?e:`--${e}`;return o[n]=t,t},Xt=t=>t,cf={color:Rr,gradient:kn,font:fa,fontFamily:vn,fontfamily:vn,theme:ca,icons:wo,semanticIcons:Xt,semanticicons:Xt,svg:Cn,svgData:Xt,typography:Xt,shadow:Ir,spacing:Xt,media:Xt,grid:Xt,class:Xt,timing:Xt,reset:Xt,unit:Xt,animation:Xt,vars:KA,sizes:Xt,shape:Xt},GA=(t,e,r,o)=>{yr(t,r,e);let n={};for(let s of o)t[s]===e&&(t[s]=n);return t.verbose&&console.warn("[scratch] design-system family",r,"resolved to a host object; parked it and allocated a plain bucket"),n},$g=(t,e,r)=>{let o=C(),n=qi(t),s=n.toLowerCase(),i=o[n]||o[s]||o[t],a=Ze(i)?GA(o,i,s,[n,s,t]):i,c=cf[n]||cf[s];if(c)try{let l=c(e,r);return a&&(a[r]=l),a}catch(l){o.verbose&&console.warn("Error setting",s,"value",e,r,l)}if(!c){let l=a||(o[s]={});return l[r]=e,l}o.verbose&&console.warn("Can not find",s,"method in scratch")},Lg=(t,e)=>{let r=C(),o=t.toLowerCase();return Ze(e)?(yr(r,o,e),r.verbose&&console.warn("[scratch] ignoring host object passed as the",o,"design-system family"),r[o]||r[t]):e==null?(r.verbose&&console.warn("[scratch] skipping empty design-system family",o),r[o]||r[t]):(Object.keys(e).sort((s,i)=>{let a=S(e[s])||T(e[s])?1:0,c=S(e[i])||T(e[i])?1:0;return a-c}).forEach(s=>{try{return $g(o,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",o,"value",e[s],s,i)}}),r[o]||r[t])},lf=(t,e)=>{let r=e||C();r.globalTheme=t;let n=Vo(r)||(typeof document<"u"?document:null),s=n&&n.defaultView||(typeof window<"u"?window:null);if(n){let a=r.themeRoot||n.documentElement,c=t&&t!=="auto";if(a[An]=r,c)Tn(r),a.setAttribute("data-theme",t),r.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),r.resolvedTheme=d},f=s.matchMedia("(prefers-color-scheme: dark)");l(f),a.style.colorScheme="light dark",$x(r,f,l)}else Tn(r),a.setAttribute("data-theme","light"),r.resolvedTheme="light",a.style.colorScheme="light"}let i=r.varPrefix?`--${r.varPrefix}-theme-`:"--theme-";for(let a in r.cssVars)a.startsWith(i)&&delete r.cssVars[a];for(let a in r.cssMediaVars)delete r.cssMediaVars[a];if(n&&r.cssVars){let a=r.scopeSelector||":root",c=n.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 r.cssVars)f[u].style.setProperty(d,r.cssVars[d]);return r}}catch{}}return r},YA={},ko=(t,e=YA)=>{let r=e.config||C(),{version:o,verbose:n,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:h,semanticIcons:g,hoverMedia:p,files:m,assets:_,...b}=t;e.newConfig&&(r=ql(e.newConfig)),Je(b.document)&&(r.__domDocument=b.document,delete b.document),Je(r.document)&&(r.__domDocument||(r.__domDocument=r.document),r.document={}),m!==void 0&&(r.files=m),_!==void 0&&(r.assets=_),n!==void 0&&(r.verbose=n),s!==void 0&&(r.useVariable=s),i!==void 0&&(r.useReset=i),c!==void 0&&(r.useFontImport=c),a!==void 0&&(r.useSvgSprite=a),l!==void 0&&(r.useIconSprite=l),d!==void 0&&(r.useDocumentTheme=d),f!==void 0&&(r.globalTheme=f),u!==void 0&&(r.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(r.useThemeSuffixedVars=t.useThemeSuffixedVars),h!==void 0&&(r.useDefaultConfig=h),g!==void 0&&(r.semanticIcons=g),p!==void 0&&(r.hoverMedia=p),r.verbose&&console.log(r);let x=Vo(r)||(typeof document<"u"?document:null),k=x&&x.defaultView||(typeof window<"u"?window:null),E=x&&(r.themeRoot||x.documentElement);if(E&&typeof E.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")Tn(r),E.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,E[An]=r,r.globalTheme==="dark"||r.globalTheme==="light"?E.style.colorScheme=r.globalTheme:E.style.colorScheme="light dark";else if(E[An]&&E[An]!==r&&E.hasAttribute("data-theme"))Tn(r),r.resolvedTheme=E.getAttribute("data-theme");else if(k&&k.matchMedia){let H=rt=>{let at=rt.matches?"dark":"light";E.setAttribute("data-theme",at),r.resolvedTheme=at},V=k.matchMedia("(prefers-color-scheme: dark)");H(V),E.style.colorScheme="light dark",E[An]=r,$x(r,V,H)}else Tn(r),E.setAttribute("data-theme","light"),r.resolvedTheme="light",E.style.colorScheme="light",E[An]=r;r.__svgCache||(r.__svgCache={}),wn(b);let O=Object.keys(b).filter(I=>!I.startsWith("__")),$=new Set(O);if(O.forEach(I=>{let H=I.toLowerCase();H!==I&&$.has(H)&&st(b[H],b[I],re)}),O.map(I=>{let H=I.toLowerCase();if(!(H!==I&&$.has(H)))return Lg(I,b[I])}),r.varPrefix&&(r.typography&&(r.typography.varPrefix=r.varPrefix),r.spacing&&(r.spacing.varPrefix=r.varPrefix),r.timing&&(r.timing.varPrefix=r.varPrefix)),b.typography)try{da()}catch(I){r.verbose&&console.warn("Error applying typography sequence",I)}if(b.spacing)try{oa()}catch(I){r.verbose&&console.warn("Error applying spacing sequence",I)}if(b.timing)try{ga()}catch(I){r.verbose&&console.warn("Error applying timing sequence",I)}ma();let D=ba();return D&&(r.reset=D),r};var vo=new Map,Vx=null,Ng=null,XA=null;function Sa(t){t.batchAtomicCss&&(Ng=t.batchAtomicCss),t.compoundCssClass&&(XA=t.compoundCssClass)}var JA=new Set,Mx=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function jg(t){try{let e=C();e&&(e.__domDocument=t)}catch{}t&&JA.add(t)}function gf(){try{let t=C();if(t){if(Mx(t.__domDocument))return t.__domDocument;if(Mx(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var Jt={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function mf(){return{...Jt}}function Bg(){for(let t in Jt)Jt[t]=0;pf=!1}var pf=!1,uf=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function ZA(t){let e=Date.parse(t);if(!isFinite(e))return"";let r=Math.floor((Date.now()-e)/864e5);return r<1?" (today)":` (${uf(r,"day")} ago)`}function QA(){try{let t=yf();return t&&t.cssRules?t.cssRules.length:-1}catch{return-1}}function tT(t,e){if(pf)return!1;pf=!0;let r="n/a \u2014 running from src/ (unbuilt), so no dist is in play",o="this IS the source",n="@symbo.ls/css";return console.error(`[@symbo.ls/css] CSS EMIT FAILURE (${t}) \u2014 the engine emitted ${uf(Jt.variable,"variable rule")} and ${uf(Jt.atomic,"atomic rule")}, while the design system held ${uf(e,"CSS variable")}.
40
+ src: ${i};`},Rr=(t,e,r,o)=>`@font-face {${Zi(t,e,r,o)}
41
+ }`,xo=(t,e,r)=>Object.keys(e).map(n=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f}=e[n],u=Array.isArray(s)?s.map(d=>ye(d,r)||d):ye(s,r)||s;return Zi(t,u,i,{fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f})}),sg=t=>Object.keys(t).map(r=>xo(r,t[r].value)),Gl=(t,e,r)=>{if(e&&e.isVariable){let s=ye(e.url,r)||e.url;return Sn(s)?kn(s):Rr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap",unicodeRange:e.unicodeRange})}if(e[0])return xo(t,e,r).map(Kl);let n=Array.isArray(e.url)?e.url.map(s=>ye(s,r)||s):ye(e.url,r)||e.url;return Rr(t,n,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch,unicodeRange:e.unicodeRange})},Ji=(t,e)=>Object.keys(t).map(o=>Gl(o,t[o].value,e));R();R();R();R();var vn={};P(vn,{animation:()=>Sg,breakpoints:()=>xg,class:()=>Ag,color:()=>pg,devices:()=>wg,document:()=>Ex,font:()=>ag,fontFace:()=>fg,fontFamily:()=>cg,fontFamilyTypes:()=>lg,gradient:()=>hg,grid:()=>Eg,icons:()=>yg,media:()=>ug,reset:()=>Ax,semanticIcons:()=>bg,sequence:()=>cr,shadow:()=>mg,shape:()=>Rg,sizes:()=>Og,spacing:()=>dg,svg:()=>kg,svgData:()=>vg,templates:()=>Cg,theme:()=>gg,timing:()=>_g,typography:()=>Qi,unit:()=>ig,vars:()=>Tg});var cr={"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 ig={default:"em"};var vA={browserDefault:16,base:16,type:"font-size",ratio:cr["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Qi=vA;var ag={};var cg={},lg={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},fg={};var ug={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var CA={base:Qi.base,type:"spacing",ratio:cr.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},dg=CA;var pg={},hg={};var gg={};var mg={};var yg={},bg={};var EA={default:150,base:150,type:"timing",ratio:cr["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},_g=EA;var Ex={};var xg={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},wg={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 Sg={};var kg={},vg={};var Cg={};var AA={},Eg=AA;var Ag={};var Ax={},Tg={},Og={},Rg={};var Jl={},Ql={},ne=new Set,Yl=vn,Xl={},ea=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Yl){let e=t.toLowerCase();Xl[e]=Yl[t];let r=ea(e);r!==e&&(Xl[r]=Yl[t]),e!==t&&(Xl[t]=Yl[t])}var wo={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Jl,cssMediaVars:Ql,CSS_VARS:Jl,CSS_MEDIA_VARS:Ql,_scratchConfig:!0,...Xl},Cn=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return yt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let r=yt(e)?e:t.globalTheme,o=Ts(yt(r)?r:"auto");return Object.defineProperty(t,"globalTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},Tx=t=>t?Cn(t):null,En=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return yt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let r=yt(e)?e:t.resolvedTheme,o=Ts(yt(r)?r:null);return Object.defineProperty(t,"resolvedTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},Ox=t=>t?En(t):null;Cn(wo);En(wo);var Zl=lt(wo),oe={active:"0",0:wo},Rx=t=>(yt(t)&&(oe.active=t),oe[t||oe.active]),ta=[],it=t=>{t&&t._scratchConfig&&ta.push(t)},et=()=>{ta.pop()},C=t=>ta.length?ta[ta.length-1]:oe[t||oe.active]||wo,tf=t=>{if(S(t))return oe.active="1",oe[1]=st(t,lt(Zl),ne),An(oe[1]),Cn(oe[1]),En(oe[1]),t},TA=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],OA=["useVariable","globalTheme","verbose"],RA=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],An=t=>{for(let e of RA){let r;for(let o of e){let n=t[o];S(n)&&(r=r?st(r,n,ne):n)}if(r)for(let o of e)S(t[o])&&(t[o]=r)}},ra=(t,e,{cleanBase:r=!1}={})=>{let o=r?null:C(),n=lt(!r&&o&&o._scratchConfig?o:Zl);for(let i of TA)delete n[i];for(let i of OA)Object.prototype.hasOwnProperty.call(Zl,i)?n[i]=Zl[i]:delete n[i];let s=st(e||{},n,ne);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,An(s),Cn(s),En(s),t&&(oe[t]=s),s};var Ke={"-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"},Pg=(t,e)=>{let{key:r,variable:o,value:n,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(n*100)/100,val:~~n,scaling:s,index:i,scalingVariable:a,variable:o},e.scales[r]=s;let c=Px.has(e.unit)?"rem":e.unit;e.vars[o]=s+c},lr=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},Px=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),oa=(t,e)=>{let{base:r,type:o,unit:n}=e,s=Px.has(n)?"rem":n,i=(oo(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(o&&o.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=Ke[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=Ke[t+1],u=Math.abs(t),d=Math.pow(Ix,2*u),h=Ke[u];return h?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${h}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},ef=(t,e,r,o)=>{let{type:n}=o,i=t===2&&e.length===2?t+1:t,l=`${"--"+(o.varPrefix?o.varPrefix+"-":"")+(n&&n.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},na=(t,e)=>{let o=(t*e-t)/1.618,n=t*e-o,s=t+o,i=(n+s)/2;return[n,i,s]},sa=(t,e)=>na(t,e).map(r=>r/t),ia=(t,e)=>{let{key:r,base:o,value:n,ratio:s,variable:i,index:a}=t,l=~~(n*s)-~~n,f,[u,d,h]=na(n,s);l>16?f=[u,d,h]:f=[u,h],f.forEach((g,p)=>{let m=~~(g/o*1e3)/1e3,b=i+(p+1),_=a+(p+1)/10,y=ef(p+1,f,i,e),x={key:r+(p+1),variable:b,value:g,scaling:m,scalingVariable:y,index:_};Pg(x,e)})},Ix=1.618,PA=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let o=Math.abs(t),n=e*Math.pow(r,t),s=e*Math.pow(r,o)/Math.pow(Ix,2*o);return Math.max(n,s)},Gt=t=>{let{type:e,base:r,ratio:o,range:n,subSequence:s}=t,i=Math.abs(n[0])+Math.abs(n[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=n[1]-l,u=Ke[f],d=PA(f,r,o),h=~~(d/r*100)/100,g=c+u,p=oa(f,t),m={key:u,variable:g,value:d,base:r,scaling:h,scalingVariable:p,ratio:o,index:f};Pg(m,t),s&&ia(m,t)}return t},Ig=(t,e=0)=>{let{type:r,base:o,ratio:n,subSequence:s}=t,i=w(e)?e:Ke[e],a=w(e)?Object.entries(Ke).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=o*Math.pow(n,a),f=~~(l/o*100)/100,h="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,g=oa(a,t),p={key:i,variable:h,value:l,base:o,scaling:f,scalingVariable:g,ratio:n,index:a};return Pg(p,c),s&&ia(p,c),c},So=(t="A",e)=>{let r=C(),{unit:o}=r;if(w(t)&&gt(t))return`var(${t})`;if(w(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(w(t)){let y=r.sizes;if(y){let x=y[t]||y[t.toLowerCase()];if(x!==void 0)return t.slice(0,1)==="-"?`calc(${x} * -1)`:x}}let{sequence:n,unit:s=o.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(Os(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+"-":""}${Hi(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 b=y=>a.test(y)?`var(${d}${y}${m})`:y;if(p.includes("+")){let[y,x]=p.split("+"),k=`${b(y)} + ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("*")){let[y,x]=p.split("*"),k=`${b(y)} * ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("-")){let[y,x]=p.split("-"),k=`${b(y)} - ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}if(!n[p]&&p.length===2&&(r.verbose&&console.warn(p,"- value is not found because `subSequence` is set to false"),p=p.slice(0,1)),i||r.useVariable){let y=`var(${d}${p}${m})`;return g?`calc(${y} * -1)`:y}let _=n?n[p]:null;if(!_){if(console.warn("can't find",n,p),It())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},rf=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let o=/(\s+-\s+|\s*[+*/,]\s*)/;return t.split(o).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:So(i,e)}).join("")},Ge=(t,e,r,o)=>{if(typeof t!="string")return C().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!o&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=lr(t);o=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=rf(t,r):t=So(t,r),{[e]:o?`${o}(${t})`:t}},of=(t,e)=>Ke[t-e],aa=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((o,n)=>{let s=of(e,n);return r[s]})};R();var Dg=(t,e)=>{let r=C(),{cssVars:o}=r;H(t.value)||(o[t.var]=t.value)},ca=(t,e,r)=>{let o=C(),{unit:n}=o,s=e.unit||n.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]=sa(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})`},Dx=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),fr=(t,e={})=>{let r=C(),{unit:o,timing:n,cssVars:s}=r,i=t.unit||o.default,a=Dx.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||ca(s,t,e);for(let u in l){let d=l[u],h=(t.type===n.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"})`)}},Pr=(t,e,r={})=>{let o=C(),{unit:n,media:s,cssVars:i}=o,a=e.slice(1),c=t[e],l=c.unit||t.unit||n.default,f=Dx.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:h}=c,g=s[a];if(!g&&o.verbose&&console.warn("Can't find media query ",g),!u){let p=i[`@media ${g}`];p||(p=i[`@media ${g}`]={}),ca(p,c,r);let m=t.unit||n.default;if(f!==m&&d)for(let b in d){let _=d[b],y=h[b]+f;p[_.variable+"_default"]=y,p[_.variable]=y}return}for(let p in d){let m=d[p],b=(oo(f)?h[p]:d[p].val)+f;!g&&o.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]=b}};R();var Lx=lo(),Tn=t=>{let e=C(),r="";for(let o in t)e.__svgCache[o]||(e.__svgCache[o]=!0,r+=t[o]);return r},IA=t=>{let e=t&&(t.default||t);if(!w(e))return Lx&&console.warn("parseRootAttributes:",e,"is not a string"),{};let r=e.match(/<svg\s+(.*?)>/);if(!r||!r[1])return{};let n=r[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return n?n.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},DA=(t,e)=>{let r=[];if(t.replace(/id="([^"]*)"/g,(n,s)=>(r.push(s),n)),!r.length)return t;let o=t;for(let n of r){let s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${n}`;o=o.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 o},$x=new Set,la=(t,e)=>{let r=e&&e.default?e.default:e;if(!w(r))return Lx&&!$x.has(t)&&($x.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=r;let o=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(o){let u=o[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let n=IA(e),{width:s,height:i}=n,a=n.viewBox||`0 0 ${s||24} ${i||24}`,f=DA(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/width="[^"]*"/,""),f=f.replace(/height="[^"]*"/,""),f=f.replace("</svg","</symbol"),f=MA(f),f},$A="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",LA=new RegExp(`<(${$A})\\b([^>]*?)\\s*/>`,"g"),MA=t=>t.replace(LA,"<$1$2></$1>");var In={};P(In,{STANDARD_SCHEME_QUERIES:()=>sf,appendSVGSprite:()=>Ca,appendSvgIconsSprite:()=>Ao,applyDocument:()=>va,applyHeadings:()=>ff,applyReset:()=>Ea,applySpacingSequence:()=>ua,applyTimingSequence:()=>ka,applyTypographySequence:()=>xa,checkIfBoxSize:()=>fa,getColor:()=>rt,getFontFamily:()=>_a,getFontSizeByKey:()=>wa,getMediaColor:()=>Rt,getMediaTheme:()=>_e,getSafeInk:()=>af,getSafeInkInfo:()=>Mg,getShadow:()=>pa,getShapeByKey:()=>Sa,getSpacingBasedOnRatio:()=>Oe,getSpacingByKey:()=>wt,getTheme:()=>ga,getTimingByKey:()=>ie,getTimingFunction:()=>xe,quietColorProbe:()=>ko,resolveBorderValue:()=>se,resolveColorRgb:()=>vo,resolveShadowValue:()=>Co,runThroughMedia:()=>lf,setAdaptiveSchemeVar:()=>$r,setColor:()=>Dr,setFont:()=>ba,setFontFamily:()=>Rn,setGradient:()=>On,setMediaTheme:()=>ya,setSVG:()=>Pn,setShadow:()=>Lr,setSvgIcon:()=>Eo,setTheme:()=>ma,splitSpacedValue:()=>da});R();var sf={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},be=new Set,FA=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"]),nf=new Set,Mx=t=>{if(!t)return!1;let{color:e,gradient:r}=t;return!!(S(e)&&Object.keys(e).length||S(r)&&Object.keys(r).length)},Fx=new Set,$g=0,ko=t=>{$g++;try{return t()}finally{$g--}},NA=(t,e)=>{if(!w(t)||t.indexOf(" ")===-1)return null;let r=t.replace(/\s+/g,""),o=Lt(r);if(!o||o.passthrough||o.cssVar)return null;let{color:n,gradient:s}=e;return!n[o.name]&&!s[o.name]?null:r},Lg=(t,e,r)=>{let o=NA(t,r);if(o){if(!Fx.has(t)){Fx.add(t);let i=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` has a space before its alpha/tone modifier${i} \u2014 did you mean \`${o}\`? 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 n=Lt(t);if(n&&n.name&&!n.passthrough&&!n.cssVar&&(n.alpha!==void 0||n.tone!==void 0)&&Mx(r)&&!r.color[n.name]&&!r.gradient[n.name]){if(!$g&&!nf.has(t)){nf.add(t);let i=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` does not resolve${i} \u2014 \`${n.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=w(e)?e.toLowerCase():"";if(!FA.has(s)||!Mx(r))return t;if(!nf.has(s)){nf.add(s);let i=r&&r.name?` (design system \`${r.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.`)}},rt=(t,e,r)=>{let o=r||C();if(!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(gt(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let n,s,i;if(T(t))[n,s,i]=t;else{let u=Lt(t);if(!u){let{color:d,gradient:h}=o,g=h[t]||d[t];return g?(e&&g[e]&&(g=g[e]),o.useVariable?`var(${g.var})`:g.value):Lg(t,t,o)}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=o,l=a[n]||c[n];if(!l)return Lg(t,n,o);if(e)if(l[e]!==void 0)l=l[e];else if(T(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&o.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 o.verbose&&console.warn(t," - does not have ",e);if(w(l)){if(be.has(n))return l;be.add(n);try{return rt(l,null,r)}finally{be.delete(n)}}let f=l.rgb;if(!f){let u=o.useVariable?`var(${l.var})`:l.value;if((s||i)&&u){let d=s!==void 0?s:1;if(!i)return`rgb(from ${u} r g b / ${d})`;if(i.charCodeAt(0)===43||i.charCodeAt(0)===45){let g=parseFloat(i),p=g<0?"-":"+",m=Math.abs(g);return`rgb(from ${u} calc(r ${p} ${m}) calc(g ${p} ${m}) calc(b ${p} ${m}) / ${d})`}return`hsl(from ${u} h s ${i}% / ${d})`}return u}return i&&!l[i]&&(f=qe(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})`:o.useVariable?`var(${l.var})`:l.value!==void 0?l.value:`rgb(${f})`},Nx=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}},jA=(t,e)=>{if(!e)return t;let r=t.rgb;if(e.tone){let n=qe(r,e.tone);r=w(n)?n.split(",").map(s=>parseFloat(s.trim())):n}let o=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:r,alpha:o}},vo=(t,e,r)=>{let o=e||C();if(!w(t))return null;let n=Lt(t);if(n){if(n.passthrough){let d=me(n.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(n.cssVar)return null}let s=n?n.name:t,{color:i,gradient:a}=o,c=i[s]||a[s];if(!c)return Nx(t);if(w(c)){let d;if(be.has(s))d=Nx(c);else{be.add(s);try{d=vo(c,o,r)}finally{be.delete(s)}}return d?jA(d,n):null}if(c.rgb===void 0&&S(c)){let d=`@${r||"light"}`;c=c[d]!==void 0?c[d]:c["@light"]}if(!c||c.rgb===void 0)return null;let l=c.rgb;n&&n.tone&&(l=qe(l,n.tone));let f=w(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=n&&n.alpha!==void 0?parseFloat(n.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},Rt=(t,e,r)=>{let o=r||C();if(e||(e=o.globalTheme==="auto"?null:o.globalTheme),!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(gt(t))return`var(${t})`;let n,s,i;if(T(t))n=t[0];else{let u=Lt(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}else n=t}let{color:a,gradient:c}=o,l=a[n]||c[n],f=S(l);if(f&&l.value)return rt(t,`@${e}`,r);if(f){if(o.useVariable&&l.var)return s||i?rt(t,null,r):`var(${l.var})`;if(e)return rt(t,`@${e}`,r);{let u={},d=o.scopeSelector||":root",h=d===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${d}:not([data-theme])`;for(let g in l){if(g.charCodeAt(0)!==64)continue;let p=g.slice(1),m=rt(t,g,r);if(m!==void 0&&(u[`[data-theme="${p}"] &`]=m,p==="light"||p==="dark")){let b=o.media&&o.media[p]||sf[p];if(!b)continue;let _="@media "+(b==="print"?`${b}`:`screen and ${b}`);u[_]={[`${h} &`]:m}}}return u}}else return Lg(t,n,o)},$r=(t,e,r,o)=>{let s=`--${o.varPrefix?o.varPrefix+"-":""}${e}-${r}`,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){o.cssVars[s]=i,o.cssMediaVars||(o.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(o.cssMediaVars[l]||(o.cssMediaVars[l]={}),o.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;o.cssMediaVars[f]||(o.cssMediaVars[f]={}),o.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},Dr=(t,e,r)=>{let o=C();if(S(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0))return o.useVariable&&t.var&&(o.cssVars[t.var]=t.value),t;if(w(t)&&gt(t)){let p=t.slice(2);if(t=rt(p),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=p.split(" "),b=o.color[m[0]];if(b&&!b.value&&!b.rgb&&(w(b)||T(b)||S(b))&&!be.has(m[0])){be.add(m[0]);try{o.color[m[0]]=Dr(b,m[0])}finally{be.delete(m[0])}b=o.color[m[0]]}if(b&&b.value){let _=b.rgb,y=m[1]!==void 0?m[1]:"1",x=m[2];x&&(_=qe(_,x)),t=`rgba(${_}, ${y})`}else{let _=m[2],y=m[1]!==void 0?m[1]:"1";if(_)try{let x=me(m[0]);x&&x.length>=3?t=`rgba(${qe(x.slice(0,3).join(", "),_)}, ${y})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(T(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let p={};for(let m in t)m!=="var"&&(p[m]=Dr(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return o.useVariable&&$r(p,"color",e,o),p}let s=`--${o.varPrefix?o.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(w(i)&&!i.includes("(")&&!i.startsWith("#")){let p=Lt(i);if(p&&p.name&&!p.passthrough&&!p.cssVar){let m=o.color[p.name];if(m&&!m.value&&!m.rgb&&(w(m)||T(m)||S(m))&&!be.has(p.name)){be.add(p.name);try{o.color[p.name]=Dr(m,p.name)}finally{be.delete(p.name)}}let b=o.color[p.name];if(b&&b.rgb){let _=b.rgb;p.tone&&(_=qe(_,p.tone));let y=p.alpha!==void 0?parseFloat(p.alpha):b.alpha!==void 0?b.alpha:1;i=`rgba(${_}, ${y})`}}}let a=me(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),h=`${c}, ${l}, ${f}`,g=`rgba(${h}, ${d})`;return o.useVariable&&(o.cssVars[s]=g),{var:s,rgb:h,alpha:d,value:g}},On=(t,e,r)=>{let o=C();if(S(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(w(t)&&gt(t)&&(t=rt(t.slice(2))),T(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let i={};for(let a in t)a!=="var"&&(i[a]=On(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return o.useVariable&&$r(i,"gradient",e,o),i}let s=`--${o.varPrefix?o.varPrefix+"-":""}gradient-${e}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[s]=t.value||t),{var:s,value:t.value||t}};R();var af=(t,e,r={},o)=>{let n=o||C(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=r,f=i?3:s,u=a||(n.globalTheme&&n.globalTheme!=="auto"?n.globalTheme:"light"),d=w(e)?e:String(e),h=Lt(t),g=h&&!h.passthrough&&!h.cssVar?h.name:null,p=(X,B)=>c?{value:X,...B}:X;if(g){let X=n.color[`${g}Safe`];if(X){let B=`${d}@${u}`,dt=X[B]!==void 0?X[B]:X[d];if(dt!==void 0){let Ct=dt&&dt.rgb!==void 0?n.useVariable&&dt.var?`var(${dt.var})`:dt.value:rt(dt,null,n);return p(Ct,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=rt(t,u?`@${u}`:null,n),b=vo(t,n,u),_=vo(e,n,u);if(!b||!_)return n.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 y=bo(_.rgb,_.alpha),x=bo(b.rgb,b.alpha,y),k=wn(x,y);if(k>=f-.02)return p(m,{ratio:k,deviation:0,derived:!1,overridden:!1});let[E,O,$]=Gi(b.rgb),[,I,D]=Yi([E,O,$]),W=mo(y)>.5,Pt=W?E:1-E,F=X=>{let B=W?E-X:E+X,dt=Math.max(0,Math.min(1,B));return{rgb:Xi(dt,I,D),L:dt}},Y=X=>{let{rgb:B}=F(X),dt=bo(B.map(Ct=>Math.round(Ct)),b.alpha,y);return wn(dt,y)},at=0,z=Pt,G=Y(z)>=f;if(G)for(let X=0;X<l;X++){let B=(at+z)/2;Y(B)>=f?z=B:at=B}else at=z;let{rgb:Vt,L:q}=F(z),xt=Vt.map(X=>Math.round(X)),M=Y(z),ot=b.alpha<1?`rgba(${xt.join(", ")}, ${b.alpha})`:`rgb(${xt.join(", ")})`,V=Math.abs(q-E)*100;return p(ot,{rgb:xt,ratio:M,startRatio:k,deviation:V,derived:!0,overridden:!1,reachable:G})},Mg=(t,e,r={},o)=>af(t,e,{...r,meta:!0},o);R();R();var BA=t=>{let r=C().spacing||{},o=parseFloat(t.spacingRatio),n={...r,ratio:Number.isFinite(o)?o:r.ratio,sequence:{},scales:{}};return Gt(n),n},UA=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;ht(r,{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Gt(r),Pr(t,e)}},fa=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),o=e.includes("border")||e.includes("outline");return r&&!o},ua=()=>{let t=C(),{spacing:e}=t;Gt(e),fr(e),UA(e)},VA=t=>{let e=C(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Gt(t)},wt=(t,e="padding",r,o)=>{let n=VA(r);if(w(t)){if(!o&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!o&&t.includes("(")){let i=lr(t);o=i[0],t=i[1]}}let s=o?[t]:go(t);if(T(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)=>Ge(s[f],e+l+i,n,o);return a[s.length].map((l,f)=>c(l,f))}return Ge(t,e,n,o)}},Oe=(t,e,r,o)=>{let n=C(),{spacing:s}=n,i=r||t[e];if(!o&&w(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!o&&w(i)&&i.includes("(")){let a=lr(i);o=a[0],i=a[1]}if(t.spacingRatio){let a=BA(t);return wt(i,e,a,o)}return wt(i,e,s,o)},da=t=>{let e=r=>{let o=["+","-","*","/"].includes(r),n=Go.some(i=>t.includes(i));return o||n?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};R();var Co=(t,e,r)=>!w(t)||re.test(t)?t:ar(t).map(o=>(o=o.trim(),o.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(n.startsWith("--"))return`var(${n})`;let s=ko(()=>rt(n,e));if(Te(s))return s;if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em"||n==="inset"||n==="none"||yo.has(n.toLowerCase()))return n;r&&r(n);let i=wt(n,"shadow");return i&&i.shadow?i.shadow:n}).join(" "))).join(", "),Lr=(t,e,r,o)=>{let n=C();if(T(t)){let a={"@light":Lr(t[0],e,"light"),"@dark":Lr(t[1],e,"dark")};return n.useVariable&&$r(a,"shadow",e,n),a}if(S(t)){let a={};for(let c in t)a[c]=Lr(t[c],e,c.startsWith("@")?c.slice(1):c);return n.useVariable&&$r(a,"shadow",e,n),a}w(t)&&!re.test(t)&&(t=Co(t));let i=`--${n.varPrefix?n.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[i]=t),{var:i,value:t}},pa=(t,e)=>{let r=C();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!w(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(gt(t))return`var(${t})`;let[o]=T(t)?t:t.split(" "),s=r.shadow[o],i=S(s);if(!s)return r.verbose&&console.warn("Can't find color ",o),t;if(i&&!s.value&&r.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;r.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={};for(let c in s){if(c.charCodeAt(0)!==64)continue;let l=r.media[c.slice(1)];if(!l)continue;let f="@media "+(l==="print"?`${l}`:`screen and ${l}`),u=s[c],d=u&&(u.value!==void 0?u.value:u);d!==void 0&&(a[f]=d)}return a}return r.verbose&&console.warn("Can't find color",t),t};var zA=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),HA=t=>zA.has(t),se=(t,e,r)=>{if(t==null)return;let o=t+"";if(re.test(o))return o;let n=o.trim();return n==="none"||n==="0"||n==="initial"||n==="inherit"||n==="unset"?o:o.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(gt(s))return`var(${s})`;if(HA(s)||/^\d/.test(s)||s==="0")return s;let i=ko(()=>rt(s,e));if(Te(i))return i;if(yo.has(s.toLowerCase()))return s;r&&r(s);let a=wt(s,"border");return a&&a.border?a.border:s}).join(" ")};R();var WA=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"]),jx=["color","Color","background","Background","fill","Fill","stroke","Stroke"],qA=t=>{for(let e=0;e<jx.length;e++)if(t.includes(jx[e]))return!0;return!1},KA={boxShadow:Co,textShadow:Co,border:se,borderTop:se,borderRight:se,borderBottom:se,borderLeft:se,outline:se,columnRule:se},GA=t=>{if(!t)return!1;let e=Lt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},Bx=new Set,YA=(t,e,r,o,n,s)=>{if(!It())return;let i=`${t}::${e}::${r||""}::${o}`;Bx.has(i)||(Bx.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(r?` (${r})`:"")+` did not fully resolve: "${o}" -> "${n}" 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.`))},Vx=(t,e,r,o)=>{let n=KA[e];if(!n)return rt(r,o);let s=null,i=n(r,o,a=>{!s&&GA(a)&&(s=a)});return s&&YA(t,e,o,r,i,s),i},cf=t=>{let e={},{state:r,media:o,helpers:n,...s}=t;return Object.keys(s).map(a=>{let l=["color","Color","background","border"].some(f=>a.includes(f));return e[a]=l?rt(t[a]):t[a]}),e},ha=t=>(t.value||(t.value=cf(t)),t.value),ga=(t,e)=>{let r=C();if(r.useVariable)return _e(t,e);let o=r.theme;if(w(t)){let[n,s]=t.split(" "),i=o[n];if(i){if(!s&&!e)return ha(i);t=[n,s||e]}}if(H(t)&&t[1]){let n=t[0],s=t[1],{helpers:i,media:a,state:c}=o[n];if(a&&a[s])return ha(a[s]);if(i&&i[s])return ha(i[s]);if(c&&c[s])return ha(c[s])}else if(S(t))return cf(t)},XA=(t,e,r)=>{if(S(e))t.variants.inverse.value=cf(e);else if(e===!0){let{color:o,background:n}=r;t.variants.inverse={value:{color:n,background:o}}}},ZA=(t,e,r,o)=>{let n=ga(r);o[`&:${e}`]=n,S(r)&&!r.value&&(r.value=n)},JA=(t,e)=>{let{state:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return ZA(t,n,s,e),t}),t):void 0},QA=(t,e,r,o)=>{let n=ga(r);o[`@media (prefers-color-scheme: ${e})`]=n,S(r)&&!r.value&&(r.value=n)},tT=(t,e)=>{let{media:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return(n==="dark"||n==="light")&&QA(t,n,s,e),n==="inverse"&&XA(t,s,e),t}),t):void 0},eT=(t,e)=>{let r=C(),{helpers:o}=t;return o?(Object.keys(o).map(s=>{let i=o[s];return w(i)?o[s]=r.theme[i]:ha(o[s]),t}),t):void 0},ma=(t,e)=>{let r=C();if(r.useVariable)return ya(t,e);let{state:o,media:n,helpers:s}=t,i=cf(t,e),c=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}`;return JA(t,i),tT(t,i),eT(t,i),{var:c,value:i,state:o,media:n,helpers:s}};var Fg=(t,e,r)=>{let{cssVars:o}=r;r.cssMediaVars||(r.cssMediaVars={});let n=r.cssMediaVars,s=r.globalTheme!==void 0?r.globalTheme:"auto",i={},a=new Set;for(let l in t)if(t[l])for(let f of Object.keys(t[l]))a.add(f);let c=new Set;for(let l of a){let f=l.slice(0,1);if(!(f==="@"||f==="."||f===":")&&qA(l))for(let u in t){if(c.has(u))continue;let d=t[u]?.[l];if(d===void 0)continue;let h=rt(d,`@${u}`);h!==void 0&&w(h)&&/^[a-z][a-zA-Z]+$/.test(h)&&!WA.has(h)&&c.add(u)}}for(let l of a){let f=l.slice(0,1),u=Object.values(t).some(d=>H(d?.[l]));if(f==="."&&u){let d=l.slice(1),h={};for(let g in t)H(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=Fg(h,`${e}-${d}`,r)}else if(f===":"&&u){let d=l.replace(/^:+/,""),h={};for(let g in t)H(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=Fg(h,`${e}-${d}`,r)}else if(f!=="@"&&f!=="."&&f!==":"){let h=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${l}`,g=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,p;for(let m in t){if(c.has(m))continue;let b=t[m]?.[l];if(b===void 0)continue;let _=Vx(e,l,b,`@${m}`);if(_===void 0)continue;(g&&m===g||!g&&(m==="light"||p===void 0))&&(p=_);let y=`[data-theme="${m}"]`;if(n[y]||(n[y]={}),n[y][h]=_,m==="dark"||m==="light"){let x=`@media (prefers-color-scheme: ${m})`;n[x]||(n[x]={}),n[x][h]=_}}p!==void 0&&(o[h]=p),i[l]=`var(${h})`,i[`.${l}`]={[l]:i[l]}}}return(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color}),i},ya=(t,e,r,o)=>{let n=C(),{cssVars:s}=n,i={value:t},a=!r&&!o;if(H(t)){if(a&&n.useVariable){let c={};for(let l in t)l.startsWith("@")&&H(t[l])&&(c[l.slice(1)]=t[l]);if(Object.keys(c).length){let l=Fg(c,e,n);Object.assign(i,l)}}for(let c in t){let l=c.slice(0,1),f=t[c];if(l==="@"||l===":"||l==="."){let u=l==="@"&&c;i[c]=ya(f,e,c,o||u)}else if(!a){let u=Vx(e,c,f,o),d=[...new Set([o,r].filter(m=>m).map(m=>m.slice(1)))],h=d.length?"-"+d.join("-"):"",p=`--${n.varPrefix?n.varPrefix+"-":""}theme-${e}${h}-${c}`;n.useVariable?(n.useThemeSuffixedVars&&(s[p]=u),i[c]=`var(${p})`):i[c]=u,i[`.${c}`]={[c]:i[c]}}}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(w(t)&&gt(t)){let l=n.theme[t.slice(2)];return _e(l,o)}return i},Ng=t=>{let e=C(),r={};for(let o in t){let n=o.slice(0,1);if(H(t[o])){if(n==="@")continue;n===":"?r[`&${o}`]=Ng(t[o]):n==="."&&(r[`&${o}`]=Ng(t[o]))}else r[o]=t[o]}return r},zx=(t,e)=>{let r=e.shift();return t[r]?zx(t[r],e):t},Ux=(t,e)=>T(e)?zx(t,e):w(e)&&t[e]?t[e]:t;var _e=(t,e)=>{let r=C();if(w(t)&&gt(t)&&(t=_e(t.slice(2))),!t||!w(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[o,...n]=T(t)?t:t.split(" "),s=r.theme[o];return s&&n.length?s=Ux(s,n):s&&e&&(s=Ux(s,e)),Ng(s)};R();R();var ba=(t,e)=>{let r=C(),o=`--font-${e}`;if(!t||T(t)&&!t[0])return;let n;if(t.isVariable){let s=ye(t.url,r.files)||t.url;Sn(s)?n=kn(s):n=Rr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap",unicodeRange:t.unicodeRange})}else if(t[0])n=xo(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>ye(i,r.files)||i):ye(t.url,r.files)||t.url;n=Rr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch,unicodeRange:t.unicodeRange})}return{var:o,value:t,fontFace:n}},_a=(t,e)=>{let r=C(),{fontFamily:o}=r;return _o(e||o,t)},Rn=(t,e)=>{let r=C(),{fontFamily:o,fontFamilyTypes:n}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!o.default)&&(o.default=e),S(s)&&(s=go(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${n[i]}`;return{var:a,value:c,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};R();var lf=t=>{let e=C(),{typography:r,media:o}=e;for(let n in t){let s=n.slice(0,1)==="@",i=t[n];if(!s)continue;let{mediaRegenerate:a}=t,c=n.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p}=t;ht(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"]),b=i.unit||p,_=!i.unit&&m.has(p)?"rem":b,y=o[c],x="@media "+(y==="print"?`${y}`:`screen and ${y}`);if(r.templates[x]={fontSize:i.base/r.browserDefault+_},!a){ht(i,{sequence:{},scales:{},vars:{}}),Gt(i),Pr(t,n);continue}ht(i,{sequence:{},scales:{},templates:{},vars:{}}),Gt(i),Pr(t,n)}},ff=t=>{let e=C();if(t.h1Matches){let r=t.unit,o=aa(t),{templates:n}=t;for(let s in o){let i=`h${parseInt(s)+1}`,a=n[i];n[i]={fontSize:e.useVariable?`var(${o[s]?.variable})`:`${o[s]?.scaling}${r}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},xa=()=>{let t=C(),{typography:e}=t;Gt(e),ff(e),fr(e),lf(e)},wa=t=>{let e=C(),{typography:r}=e;return Ge(t,"fontSize",r)};R();var Sa=t=>{if(!w(t))return;let r=C().shape;if(r)return r[t]!==void 0?r[t]:r[t.toLowerCase()]};R();var ka=()=>{let t=C(),{timing:e}=t;Gt(e),fr(e)},xe=t=>{let e=C(),{timing:r}=e;return r[t]||r[zi(t)]||t},ie=(t,e="timing")=>{let r=C(),{timing:o}=r;return Ge(t,e,o)};R();var va=()=>{let t=C(),{fontFamily:e,theme:r,typography:o}=t,n=t.document;return rr(n)?(xr(t,"document",n),n=t.document={}):n||(n=t.document={}),ht(n,{theme:r.document,fontFamily:_o(e),fontSize:o.base,lineHeight:o.lineHeight})};R();var Bg={document:tt},Pn=(t,e)=>{let r=C();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?la(e,t):t},Ca=(t,e=Bg)=>{let r=C(),o=Object.keys(t).length?{}:r.svg;for(let n in t)o[n]=t[n];Wx(o,e)},Eo=(t,e)=>{let r=C();return r.useIconSprite&&!r.semanticIcons?.[e]?Pn(t,e):t},Ao=(t,e=Bg)=>{let r=C(),o=Object.keys(t).length?{}:r.icons;for(let n in t)o[n]=t[n];Wx(o,e)},jg=(t,e={isRoot:!0})=>{if(!t||!t.createElementNS)return;let r=t.createElementNS("http://www.w3.org/2000/svg","svg");return e.isRoot&&(r.setAttribute("aria-hidden","true"),r.setAttribute("width","0"),r.setAttribute("height","0"),r.setAttribute("style","position:absolute"),r.setAttribute("id","svgSprite")),r},rT=(t,e)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let o=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new r().parseFromString(o,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},Hx=(t,e,r)=>{for(;e.firstChild;){let o=e.firstChild;r.appendChild(t.importNode(o,!0)),o.remove()}},Wx=(t,e=Bg)=>{let r=C(),o=e.document||tt;if(!o||!o.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),Tn(t);let n=o.querySelector("#svgSprite"),s=Tn(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=rT(o,s);if(n)if(a)Hx(o,a,n);else if(o.body.insertAdjacentHTML)n.insertAdjacentHTML("beforeend",s);else{let c=jg(o,{isRoot:!1});c.innerHTML=s,n.append(...c.children)}else if(a){let c=jg(o);c&&c.nodeType&&(Hx(o,a,c),o.body.prepend(c))}else if(o.body.insertAdjacentHTML)o.body.insertAdjacentHTML("afterbegin",i);else{let c=jg(o);c&&c.nodeType&&(c.innerHTML=s,o.body.prepend(c))}};R();var Ea=(t={})=>{let e=C(),r=e.typography||{},o=e.document||{},n=S(e.reset)?e.reset:e.reset={};if(n[":root"]){let c=n,l=r.templates||{};c.body={...e.useDocumentTheme?_e("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}=r.templates||{},a=e.useDocumentTheme?_e("document"):{};if(n.html&&qt(n.html,a),r.unit)for(let c in i){if(c.slice(0,6)!=="@media")continue;let l=i[c];delete i[c],!(!l||!l.fontSize)&&(n[c]||(n[c]={}),n[c].html||(n[c].html={}),n[c].html.fontSize===void 0&&(n[c].html.fontSize=l.fontSize))}if(r.unit){let c=e.media||{};for(let l in r){if(l.charAt(0)!=="@")continue;let f=r[l];if(!f||f.unit===r.unit||!f.unit)continue;let u=f.unit,d=f.base||r.base,h=f.browserDefault||r.browserDefault,g=l.slice(1),p=c[g];if(!p)continue;let m="@media "+(p==="print"?p:"screen and "+p);n[m]||(n[m]={}),n[m].html||(n[m].html={}),n[m].html.fontSize=d/h+u}}return st(ht(n,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",...a,fontSize:r.unit?r.base/r.browserDefault+r.unit:r.browserDefault+"px",fontFamily:o.fontFamily,lineHeight:o.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:o.fontFamily,fontSize:r.unit?"1"+e.unit.default:r.base/r.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}},ne)};R();var oT=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),nT=/^-?[A-Z][0-9]?$/,Ye=t=>se(t),uf=t=>{if(w(t))return re.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(gt(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=rt(e);return Te(r)?r:e}).join(" ")},df=(t,e)=>pa(t,e),Aa=(t,e)=>{if(w(t))return re.test(t)?t:ar(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(gt(o))return`var(${o})`;if(o==="inset"||o==="none")return o;let n=rt(o);if(Te(n)){let i=Rt(o,e);return S(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em")return o;let s=wt(o,"shadow");return s&&s.shadow?s.shadow:o}).join(" "):"")).join(", ")},Ta=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let o=t.slice(0,r+1),n=t.slice(r+1,t.lastIndexOf(")")),s=")",a=ar(n).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||oT.has(f)||f==="transparent"||re.test(f))return f;let u=rt(f);return Te(u)?u:f}).join(" ")));return o+a.join(", ")+s},pf=(t,e)=>{if(!w(t))return;let r=C();return ar(t).map(o=>{let n=o.trim();if(gt(n))return`var(${n})`;if(/^var\(/.test(n)||n.includes("url"))return n;if(r.gradient?.[n]){let s=Rt(n,e);if(w(s))return s;if(S(s)){for(let i in s)if(w(s[i]))return s[i]}return n}return n.includes("gradient")?Ta(n,e):n.includes("/")||n.startsWith("http")||n.includes(".")&&!Lt(n)?`url(${n})`:n}).join(", ")},hf=t=>w(t)&&t.split(" ").map(e=>wt(e,"gap").gap).join(" "),gf=t=>{if(!w(t))return t;let e=C();return Ki(t).map(r=>nT.test(r)?So(r,e.spacing):r).join(" ")},Ug=t=>{if(!w(t))return;let e=t.split(" ");return e.length?e.map(r=>gt(r)?`var(${r})`:r.length<3||r.includes("ms")?ie(r).timing||r:xe(r)?xe(r):r).join(" "):t},Oa=(t,e,r)=>{if(w(t))return t.split(",").map(o=>ie(o).timing||o).join(",")},mf=t=>{if(!w(t))return;let e=t.split(",");if(e.length)return e.map(Ug).join(",")};function bt(t,e,r={},o={}){let n=ft.call(this,e||r[t]);if(n==null)return;let s;if(w(n)){if(/^(?:env|var)\(/.test(n.trim()))return{[t]:n};if(n.includes("(")){let c=lr(n);s=c[0],n=c[1]}let i=r.scaleBoxSize,a=fa(t);!i&&a&&!o.ratio&&(n=da(n))}return o.ratio?Oe(r,t,n,s):wt(n,t,void 0,s)}var L=(t,e=null,r)=>bt(t,e,r,{ratio:!0}),ur=(t,e,r,o="borderRadius")=>{if(w(t))return{[o]:t.split(" ").map(n=>{let s=Sa(n);return s!==void 0?s:Oe(e,r,n)[r]}).join(" ")}};R();var Dn="__smblsThemeRootOwner",$n=t=>{let e=t&&t.__prefersListener,r=t&&t.__prefersMq;if(e&&r)try{typeof r.removeEventListener=="function"?r.removeEventListener("change",e):typeof r.removeListener=="function"&&r.removeListener(e)}catch{try{r.removeListener(e)}catch{}}t&&(t.__prefersListener=null,t.__prefersMq=null)},qx=(t,e,r)=>{if(!(!t||!e)){$n(t),t.__prefersListener=r,t.__prefersMq=e;try{e.addEventListener("change",r)}catch{e.addListener(r)}}},sT=(t,e)=>{let r=C(),{cssVars:o}=r,n=e.startsWith("--")?e:`--${e}`;return o[n]=t,t},Yt=t=>t,yf={color:Dr,gradient:On,font:ba,fontFamily:Rn,fontfamily:Rn,theme:ma,icons:Eo,semanticIcons:Yt,semanticicons:Yt,svg:Pn,svgData:Yt,typography:Yt,shadow:Lr,spacing:Yt,media:Yt,grid:Yt,class:Yt,timing:Yt,reset:Yt,unit:Yt,animation:Yt,vars:sT,sizes:Yt,shape:Yt},iT=(t,e,r,o)=>{xr(t,r,e);let n={};for(let s of o)t[s]===e&&(t[s]=n);return t.verbose&&console.warn("[scratch] design-system family",r,"resolved to a host object; parked it and allocated a plain bucket"),n},Vg=(t,e,r)=>{let o=C(),n=ea(t),s=n.toLowerCase(),i=o[n]||o[s]||o[t],a=rr(i)?iT(o,i,s,[n,s,t]):i,c=yf[n]||yf[s];if(c)try{let l=c(e,r);return a&&(a[r]=l),a}catch(l){o.verbose&&console.warn("Error setting",s,"value",e,r,l)}if(!c){let l=a||(o[s]={});return l[r]=e,l}o.verbose&&console.warn("Can not find",s,"method in scratch")},zg=(t,e)=>{let r=C(),o=t.toLowerCase();return rr(e)?(xr(r,o,e),r.verbose&&console.warn("[scratch] ignoring host object passed as the",o,"design-system family"),r[o]||r[t]):e==null?(r.verbose&&console.warn("[scratch] skipping empty design-system family",o),r[o]||r[t]):(Object.keys(e).sort((s,i)=>{let a=S(e[s])||T(e[s])?1:0,c=S(e[i])||T(e[i])?1:0;return a-c}).forEach(s=>{try{return Vg(o,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",o,"value",e[s],s,i)}}),r[o]||r[t])},bf=(t,e)=>{let r=e||C();r.globalTheme=t;let n=Ko(r)||(typeof document<"u"?document:null),s=n&&n.defaultView||(typeof window<"u"?window:null);if(n){let a=r.themeRoot||n.documentElement,c=t&&t!=="auto";if(a[Dn]=r,c)$n(r),a.setAttribute("data-theme",t),r.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),r.resolvedTheme=d},f=s.matchMedia("(prefers-color-scheme: dark)");l(f),a.style.colorScheme="light dark",qx(r,f,l)}else $n(r),a.setAttribute("data-theme","light"),r.resolvedTheme="light",a.style.colorScheme="light"}let i=r.varPrefix?`--${r.varPrefix}-theme-`:"--theme-";for(let a in r.cssVars)a.startsWith(i)&&delete r.cssVars[a];for(let a in r.cssMediaVars)delete r.cssMediaVars[a];if(n&&r.cssVars){let a=r.scopeSelector||":root",c=n.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 r.cssVars)f[u].style.setProperty(d,r.cssVars[d]);return r}}catch{}}return r},aT={},To=(t,e=aT)=>{let r=e.config||C(),{version:o,verbose:n,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:h,semanticIcons:g,hoverMedia:p,files:m,assets:b,..._}=t;e.newConfig&&(r=tf(e.newConfig)),er(_.document)&&(r.__domDocument=_.document,delete _.document),er(r.document)&&(r.__domDocument||(r.__domDocument=r.document),r.document={}),m!==void 0&&(r.files=m),b!==void 0&&(r.assets=b),n!==void 0&&(r.verbose=n),s!==void 0&&(r.useVariable=s),i!==void 0&&(r.useReset=i),c!==void 0&&(r.useFontImport=c),a!==void 0&&(r.useSvgSprite=a),l!==void 0&&(r.useIconSprite=l),d!==void 0&&(r.useDocumentTheme=d),f!==void 0&&(r.globalTheme=f),u!==void 0&&(r.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(r.useThemeSuffixedVars=t.useThemeSuffixedVars),h!==void 0&&(r.useDefaultConfig=h),g!==void 0&&(r.semanticIcons=g),p!==void 0&&(r.hoverMedia=p),r.verbose&&console.log(r);let x=Ko(r)||(typeof document<"u"?document:null),k=x&&x.defaultView||(typeof window<"u"?window:null),E=x&&(r.themeRoot||x.documentElement);if(E&&typeof E.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")$n(r),E.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,E[Dn]=r,r.globalTheme==="dark"||r.globalTheme==="light"?E.style.colorScheme=r.globalTheme:E.style.colorScheme="light dark";else if(E[Dn]&&E[Dn]!==r&&E.hasAttribute("data-theme"))$n(r),r.resolvedTheme=E.getAttribute("data-theme");else if(k&&k.matchMedia){let W=F=>{let Y=F.matches?"dark":"light";E.setAttribute("data-theme",Y),r.resolvedTheme=Y},Pt=k.matchMedia("(prefers-color-scheme: dark)");W(Pt),E.style.colorScheme="light dark",E[Dn]=r,qx(r,Pt,W)}else $n(r),E.setAttribute("data-theme","light"),r.resolvedTheme="light",E.style.colorScheme="light",E[Dn]=r;r.__svgCache||(r.__svgCache={}),An(_);let O=Object.keys(_).filter(D=>!D.startsWith("__")),$=new Set(O);if(O.forEach(D=>{let W=D.toLowerCase();W!==D&&$.has(W)&&st(_[W],_[D],ne)}),O.map(D=>{let W=D.toLowerCase();if(!(W!==D&&$.has(W)))return zg(D,_[D])}),r.varPrefix&&(r.typography&&(r.typography.varPrefix=r.varPrefix),r.spacing&&(r.spacing.varPrefix=r.varPrefix),r.timing&&(r.timing.varPrefix=r.varPrefix)),_.typography)try{xa()}catch(D){r.verbose&&console.warn("Error applying typography sequence",D)}if(_.spacing)try{ua()}catch(D){r.verbose&&console.warn("Error applying spacing sequence",D)}if(_.timing)try{ka()}catch(D){r.verbose&&console.warn("Error applying timing sequence",D)}va();let I=Ea();return I&&(r.reset=I),r};var Oo=new Map,ow=null,qg=null,cT=null;function Ra(t){t.batchAtomicCss&&(qg=t.batchAtomicCss),t.compoundCssClass&&(cT=t.compoundCssClass)}var lT=new Set,Gx=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function Gg(t){try{let e=C();e&&(e.__domDocument=t)}catch{}t&&lT.add(t)}function Pa(){try{let t=C();if(t){if(Gx(t.__domDocument))return t.__domDocument;if(Gx(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var Xt={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function kf(){return{...Xt}}function Yg(){for(let t in Xt)Xt[t]=0;wf=!1}var wf=!1,xf=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function fT(t){let e=Date.parse(t);if(!isFinite(e))return"";let r=Math.floor((Date.now()-e)/864e5);return r<1?" (today)":` (${xf(r,"day")} ago)`}function uT(){try{let t=wT();if(!t.length)return-1;let e=0;for(let r=0;r<t.length;r++)e+=t[r].cssRules?t[r].cssRules.length:0;return e}catch{return-1}}function dT(t,e){if(wf)return!1;wf=!0;let r="n/a \u2014 running from src/ (unbuilt), so no dist is in play",o="this IS the source",n="@symbo.ls/css";return console.error(`[@symbo.ls/css] CSS EMIT FAILURE (${t}) \u2014 the engine emitted ${xf(Xt.variable,"variable rule")} and ${xf(Xt.atomic,"atomic rule")}, while the design system held ${xf(e,"CSS variable")}.
42
42
  The document will render UNSTYLED and nothing else will report an error.
43
43
  This is what a STALE dist/ looks like: an obsolete emitter against a current design system.
44
44
  package : ${n}
45
45
  built : ${r}
46
46
  source : ${o}
47
- emitted : ${JSON.stringify(Jt)}
48
- sheet : style[data-smbls] currently holds ${QA()} rule(s)
47
+ emitted : ${JSON.stringify(Xt)}
48
+ sheets : the style[data-smbls] tiers currently hold ${uT()} rule(s)
49
49
  FIX : cd smbls && npm run check:stale # every package whose src is newer than its dist
50
50
  then rebuild the listed packages and clear the app's .parcel-cache
51
- Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function zx(){try{let t=C(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function Fx(t){pf||Jt.variable>0||Jt.atomic>0||Hx(Math.max(t,zx()))}function Ug(t){let e=t&&(t.CSS_VARS||t.cssVars);return Hx(e?Object.keys(e).length:zx())}function Hx(t){let e=mf();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!yf())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 r=e.invalid>0?"every rule was rejected as malformed":"no rule was ever produced";return tT(r,t),{ok:!1,reason:r,stats:e,varCount:t}}var eT={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 Co(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function hf(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e.toString(36)}function rT(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():hf(e)}var oT={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"};function On(t,e){let r=oT[t];return r?`${t}:${e};${r}:${e};`:`${t}:${e};`}var nT="@media (hover: hover)",sT=/(?:^|[^\\]):hover(?![\w-])/;function Vg(){try{let t=C();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Oe(t,e,r){return r===!1||!sT.test(e)||r===void 0&&!Vg()?t:`${nT}{${t}}`}function Nx(t,e,r){let o=(r?r+"":"")+t+":"+e,n=vo.get(o),s=n?null:Co(t);if(!n){let c=eT[t]||hf(t),l=rT(e);n=r?`_${r}_${c}-${l}`:`_${c}-${l}`,vo.set(o,n)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return n;let i=s||Co(t),a=`.${n}{${On(i,e)}}`;return be(a,void 0,"atomic"),n}var jx=new WeakMap,Bx=new WeakMap,df=new WeakMap;function iT(t,e){let r=t.cssRules.length;if(e==="compound")return r;let o=df.get(t);return o===void 0||o>r?r:o}function be(t,e,r,o){let n=yf(e);if(!n)return Jt.dropped++,"dropped";let s=jx.get(n);if(s||(s=new Set,jx.set(n,s)),s.has(t))return Jt.duplicate++,Jt[r||"global"]++,"duplicate";let i=Bx.get(n);if(i&&i.has(t))return Jt.invalid++,"invalid";let a=iT(n,o);try{n.insertRule(t,a)}catch{return i||(i=new Set,Bx.set(n,i)),i.add(t),Jt.invalid++,"invalid"}return s.add(t),o==="compound"?df.has(n)||df.set(n,a):df.set(n,a+1),Jt[r||"global"]++,"inserted"}var Ux=new WeakMap;function yf(t){let e=t||gf();if(!e||!e.head)return null;let r=Ux.get(e);if(r&&r.ownerNode&&r.ownerNode.parentNode===e.head)return r;let o=e.head.querySelector("style[data-smbls]");o||(o=e.createElement("style"),o.setAttribute("data-smbls",""),e.head.appendChild(o));let n=o.sheet;return Ux.set(e,n),Vx=n,n}var aT=8;function _e(t,e,r){if(!t||typeof t!="object")return"";let o=null,n=0,s=[],i=[];for(let c in t){let l=t[c];l==null||l===!1||l===""||(typeof l=="object"?i.push([c,l]):Ng?(o||(o=[]),o.push(c,String(l)),n++):s.push(Nx(c,String(l),r)))}if(o&&n>=aT){let c=o.join("\0"),l=Ng(c),f=l.indexOf("\0"),u=l.substring(0,f),d=l.substring(f+1);if(d){let h=d.split(`
52
- `);for(let g=0;g<h.length;g++)h[g]&&be(h[g],void 0,"atomic")}s.push(u)}else if(o)for(let c=0;c<o.length;c+=2)s.push(Nx(o[c],o[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(fT(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var Fg=new Map,cT=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function lT(t){return typeof t!="string"||!t||t.startsWith("@media")||t.startsWith("@supports")?!1:t.split(",").every(e=>cT.test(e.trim()))}function fT(t,e,r){let o=JSON.stringify(e),n=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,s=n&&Vg(),i=(r?r+"":"")+t+o+(n&&!s?"rawhover":""),a=vo.get(i);if(a){let _=Fg.get(a);if(_)for(let b=0;b<_.length;b++)be(_[b],void 0,"atomic","compound");return a}a=r?`_${r}_c${hf(i)}`:`_c${hf(i)}`;let c=`.${a}`,l=lT(t)?`.${a}.${a}`:c,f="",u=[],d=_=>typeof _=="string"&&(_.indexOf("{")!==-1||_.indexOf("}")!==-1),h=(_,b)=>{let y="";for(let x in b){let k=b[x];if(k!=null)if(typeof k=="object")h([..._,x],k);else{if(d(k))continue;y+=On(Co(x),k)}}y&&(_.length===0?f+=y:u.push({chain:_,body:y}))};h([],e);let g=_=>{let b=_.length===1?l:c;if(!_.length)return b;let y=_[0].split(",").map(x=>x.trim()).map(x=>x.includes("&")?x.replace(/&/g,b):x.startsWith(":")?`${b}${x}`:`${b} ${x}`);for(let x=1;x<_.length;x++){let k=_[x].split(",").map(O=>O.trim()),E=[];for(let O of y)for(let $ of k)$.includes("&")?E.push($.replace(/&/g,O)):$.startsWith(":")?E.push(O+$):E.push(O+" "+$);y=E}return y.join(", ")},p=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(f){let _=`${t}{${c}{${f}}}`;p.push(_),be(_,void 0,"atomic","compound")}for(let _ of u){let b=g(_.chain),y=Oe(`${t}{${b}{${_.body}}}`,b,s);p.push(y),be(y,void 0,"atomic","compound")}return Fg.set(a,p),vo.set(i,a),a}let m=g([t]);if(f){let _=Oe(`${m}{${f}}`,m,s);p.push(_),be(_,void 0,"atomic","compound")}for(let _ of u){let b=g([t,..._.chain]),y=Oe(`${b}{${_.body}}`,b,s);p.push(y),be(y,void 0,"atomic","compound")}return Fg.set(a,p),vo.set(i,a),a}function kt(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(yf(),typeof t=="string"){let s=t.indexOf("--")!==-1;be(t,void 0,s?"variable":"global"),s&&Fx(1);return}let e=Vg(),r=0,o=Object.keys(t),n=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};o.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?n(i)-n(s):1:-1});for(let s of o){let i=t[s];if(s.startsWith("@media")||s.startsWith("@supports"))for(let a in i){let c=i[a];if(typeof c=="object"&&c!==null){let l="",f=0;for(let u in c){let d=u.charCodeAt(0)===45&&u.charCodeAt(1)===45;d&&f++;let h=d?u:Co(u);l+=On(h,c[u])}r+=f,be(Oe(`${s}{${a}{${l}}}`,a,e),void 0,f?"variable":"global")}else{let l=a.charCodeAt(0)===45&&a.charCodeAt(1)===45;l&&r++;let f=l?a:Co(a);be(`${s}{${On(f,c)}}`,void 0,l?"variable":"global")}}else{let a="",c=!1,l=0;for(let f in i){let u=i[f];if(typeof u=="object"&&u!==null)c=!0;else{let d=f.charCodeAt(0)===45&&f.charCodeAt(1)===45;d&&l++;let h=d?f:Co(f);a+=On(h,u)}}if(r+=l,a&&be(Oe(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let f=[],u=[];for(let d in i)typeof i[d]=="object"&&i[d]!==null&&(d.startsWith("@media")||d.startsWith("@supports")?f.push(d):u.push(d));f.sort((d,h)=>{let g=p=>{let m=p.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return g(h)-g(d)});for(let d of u)kt({[`${s} ${d}`]:i[d]});for(let d of f)kt({[d]:{[s]:i[d]}})}}}r>0&&Fx(r)}function Rn(t,e){let r="";for(let o in e){let n="";for(let s in e[o])n+=On(Co(s),e[o][s]);r+=`${o}{${n}}`}return be(`@keyframes ${t}{${r}}`,void 0,"keyframes"),t}function Wx(){vo.clear(),Vx=null}function zg(){return vo.size}R();var $m={};P($m,{DELEGATED_EVENTS:()=>Ln,LIFECYCLE_EVENTS:()=>Lr,MIXINS:()=>bf,NON_BUBBLING_EVENTS:()=>_f,REGISTRY:()=>jt,SVG_TAGS:()=>Dn,addDelegatedEvent:()=>ka,addMethods:()=>Un,applyExtends:()=>Fn,cacheNode:()=>$r,create:()=>se,createHTMLNode:()=>In,detectTag:()=>Dr,dispose:()=>jr,flushMounts:()=>Pa,globalEventKeyInfo:()=>xf,isSvgTag:()=>$n,isValidTag:()=>Pn,refreshContextProto:()=>Ef,registerEvent:()=>Mn,registerGlobalEvent:()=>wf,remove:()=>Bn,removeDelegatedEvent:()=>va,update:()=>Nn});var Wg="http://www.w3.org/2000/svg",Dn=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"]),uT=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 Pn(t){return uT.has(t)||Dn.has(t)}function $n(t){return Dn.has(t)}function Dr(t){let{tag:e,key:r}=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 "${r||"<anon>"}" \u2014 falling back to key-based tag detection:`,s?.message||s)}if(e===!0&&(e=r),typeof e=="string"&&Pn(e))return e;if(!r||typeof r!="string")return"div";let o=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),n=r.toLowerCase();return n.includes(".")&&(n=n.split(".")[0]),n.includes("_")&&(n=n.split("_")[0]),Pn(n)&&!o.has(n)?n:"div"}var qx={};function In(t,e){let r=e?.context?.document||globalThis.document;if(!r)return null;if(t==="string")return r.createTextNode(e?.text||"");if(t==="fragment")return r.createDocumentFragment();if($n(t)){let o=e?.parent;if(t==="svg"||o?.node?.namespaceURI===Wg)return r.createElementNS(Wg,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function $r(t){let e=t.tag=Dr(t),o=$n(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Wg)?"svg:"+e:e,n=t?.context?.document||globalThis.document,s=qx[o];if(s||(s=qx[o]=In(e,t)),!s)return null;let i=n&&s.ownerDocument!==n?In(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var jt=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","__name","__ref","__hash","__text","parent","node"]),bf={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Lr=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"]),_f=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"]),qg=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Ln=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"]);var Gg=new WeakMap,dT={passive:!0},pT={passive:!0,capture:!0},Yg=(t,e)=>qg.has(t)?e?pT:dT:e||!1;function Gx(t){let e=Gg.get(t);return e||(e={handlers:new Map,installed:new Set},Gg.set(t,e)),e}function hT(t,e){let r=Gx(e);if(r.installed.has(t))return;r.installed.add(t);let o=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",n=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let a=r.handlers.get(t);if(a){let c=a.get(i);if(c){if(n&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},Yg(t,o))}function ka(t,e,r,o){o||(o=e.ownerDocument?.documentElement||e.getRootNode());let n=Gx(o);hT(t,o),n.handlers.has(t)||n.handlers.set(t,new WeakMap),n.handlers.get(t).set(e,r)}function va(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=Gg.get(r);if(!o)return;let n=o.handlers.get(t);n&&n.delete(e)}function Kx(t){return Ln.has(t)&&!Lr.has(t)}function Yx(t,e){let{context:r}=t,o=r?.designSystem;return n=>{o&&it(o);try{let s=e.call(t,n,t,t.state,r);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{o&&tt()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),r?.strictMode)throw s}o&&tt()}}function Mn(t,e,r){let{node:o,context:n}=e;if(!o)return;let s=Yx(e,r),i=_f.has(t);if(!i&&Kx(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;ka(t,o,s,a)}else o.addEventListener(t,s,Yg(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&Kx(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;va(t,o,a)}else o.removeEventListener(t,s,Yg(t,!1))})}var Kg=[["onDocument","document"],["onWindow","window"]];function xf(t){if(typeof t!="string")return null;for(let e=0;e<Kg.length;e++){let r=Kg[e][0];if(t.length<=r.length||!t.startsWith(r))continue;let o=t.charCodeAt(r.length);if(!(o<65||o>90))return{target:Kg[e][1],eventName:t.slice(r.length).toLowerCase()}}return null}var gT=/^[A-Za-z_$][\w$]*$/;function mT(t,e,r){let o=e,n=!1,s,i=!1;if(e&&typeof e=="object"&&typeof e!="function"&&(o=e.handler,n=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive)),typeof o=="string"&&gT.test(o)){let a=o;o=function(l){return t.call(a,l)}}return typeof o!="function"?null:(s===void 0&&(s=qg.has(r)),{handler:o,capture:n,passive:s,once:i})}function yT(t,e){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);return o&&typeof o.addEventListener=="function"?o:null}function bT(t){let e=t.node;if(!e)return!1;let r=e.nodeType===11?t.__ref?.__fragmentAnchor:e;return r?r.isConnected!==!1:!1}function wf(t,e,r){let o=e.__ref;if(!o)return;let n=mT(e,r,t.eventName);if(!n)return;let s=yT(e,t.target);if(!s)return;o.__globalEvents||(o.__globalEvents=new Map);let i=t.target+":"+t.eventName+":"+(n.capture?1:0);if(o.__globalEvents.has(i))return;let a=Yx(e,n.handler),c=f=>{bT(e)&&a(f)},l={capture:n.capture,passive:n.passive,once:n.once};s.addEventListener(t.eventName,c,l),o.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:c,options:l}),o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{s.removeEventListener(t.eventName,c,l),o.__globalEvents&&o.__globalEvents.delete(i)})}function Xx(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 Fn(t,e,r){let o=Xx(e);if(!o.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<o.length;i++){let a=Jx(o[i],s);a&&a!==e&&Zx(t,a,r,new Set([e]))}}function Jx(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(n=>n.trim()),o=e[r[0]]||e[`smbls.${r[0]}`];for(let n=1;n<r.length&&o;n++)o=o[r[n]];return o||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function Zx(t,e,r,o=new Set){if(o.has(e))return;o.add(e);let n=Xx(e);if(n.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<n.length;a++){let c=Jx(n[a],i);c&&Zx(t,c,r,o)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=Qx(t[s],i):t[s]=i}}function Qx(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=Qx(n,s):r[o]=s}return r}Jo();R();var _T=["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"],Sf={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","hidden","id","lang","part","placeholder","slot","spellcheck","style","tabindex","title","translate","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","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","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["open"],del:["cite","datetime"],dialog:["open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["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","crossorigin","decoding","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alt","autocomplete","capture","checked","crossorigin","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","crossorigin","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"],slot:["name"],script:["async","charset","crossorigin","defer","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:["media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],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","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","offset","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"]},ew=["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"],Fr=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()):rw(t),xT=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),rw=t=>xT.has(t)?t.toLowerCase():null,wT=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),cr=t=>typeof t=="string"&&(wT.has(t)||t.startsWith("aria-")),Ke=(t,e)=>e!==!0&&e!==!1?e:cr(t)?e?"true":"false":e===!0?"":e,Nr=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Fr(e)||Sf.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Sf,t)?Sf[t].includes(e):!1,Zg=t=>{if(!w(t))return!1;let e=t.toLowerCase();return ew.includes(e)},ST=(t,e,r)=>{let o={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(r&&n in r)continue;if(n==="aria"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])bt(e[n][a])&&(o["aria-"+a]=e[n][a]);continue}if(n==="data"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])if(bt(e[n][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());o["data-"+c]=e[n][a]}continue}let s=Nr(t,n),i=Zg(n);if(bt(e[n])&&(s||i)){let a=Fr(n)||n;o[a]=e[n]}}return o},kT=(t,e)=>{let r={};if(t.attr)for(let o in t.attr)r[o]=t.attr[o](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let n=t.aria[o];typeof n=="function"&&(r["aria-"+o]=n(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let o in t.data){let n=t.data[o];if(typeof n=="function"){let s=o.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=n(e,e.state,e.context)}}return r},Mr=(t,e)=>{let r=t.call("exec",e,t);if(r)return w(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},Xg=(t,e)=>{let r=(t.preSrc||"")+(Mr(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:o}=t;if(!o.files&&!o.assets)return r;if(r.startsWith("/assets/")){let n=r.slice(8),s=o.assets&&(o.assets[r]||o.assets[n]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let n=r.slice(7),s=o.files&&(o.files[r]||o.files[n]);return s&&s.content?s.content.src:r}if(o.assets){let n=o.assets[r];if(n&&n.content)return n.content.src}if(o.files){let n=o.files[r];if(n&&n.content)return n.content.src}return r},Jg={src:t=>Xg(t,t.src),href:t=>Mr(t,t.href),action:t=>Mr(t,t.action),poster:t=>Xg(t,t.poster),data:t=>Mr(t,t.data)},Qg=t=>{let e=t.tag||"div",r={};for(let o in Jg)if(t[o]!==void 0&&Nr(e,o)){let n=Jg[o](t);n!==void 0&&(r[o]=n)}return r},tw=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},vT=(t,e,r)=>{if(t==="$"){let n=tw(e,r);return n===void 0&&(n=!!r[e]),n}let o=r[e]===!0||r.state[e];if(!o){let n=tw(e,r);n!==void 0&&(o=n)}return t==="."?!!o:!o},CT=new Set(["$",".","!"]),ET=(t,e,r)=>{let o={},n=(s,i,a,c)=>{let l=i;o[s]=f=>{if(vT(a,c,f))return A(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!CT.has(i))continue;let a=t[s];if(!a||typeof a!="object")continue;let c=s.slice(1);for(let l in a){if(r&&l in r)continue;if(l==="aria"&&a[l]&&typeof a[l]=="object"){for(let h in a[l])n("aria-"+h,a[l][h],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let h in a[l]){let g=h.replace(/([A-Z])/g,p=>"-"+p.toLowerCase());n("data-"+g,a[l][h],i,c)}continue}let f=Nr(e,l),u=Zg(l);if(!f&&!u)continue;let d=Fr(l)||l;n(d,a[l],i,c)}}return o};function Nn(t={},e={}){let r=this,o=r.__ref;if(!o)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&tm(o))try{let s=r.onBeforeUpdate(r,r.state,r.context,e);if(s&&typeof s.then=="function")s.then(()=>lr(o,!1),i=>{lr(o,!0),r.context?.plugins?.length&&At("error",r,{hook:"onBeforeUpdate",error:i})||console.error("[DOMQL] onBeforeUpdate error:",i)});else if(lr(o,!1),s===!1)return r}catch(s){throw lr(o,!0),s}let n=!t||Object.keys(t).length===0;if(kc(()=>{if(t.state&&yt(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!o.__exec.text&&r.node&&jn(r,t.text??"")),t.html!==void 0&&(r.html=t.html,!o.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!o.__exec.style)for(let s in t.style){let i=t.style[s];if(i==null)continue;let a=s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=String(i).replace(/\s*!important\s*$/,"");r.node.style.setProperty(a,c,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let s in t.attr){let i=t.attr[s];i==null||i===!1&&!cr(s)?r.node.removeAttribute(s):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(s,Ke(s,i))}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let s in t.data)r.node.dataset[s]=t.data[s];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let s in t){if(jt.has(s)||s==="state")continue;let i=t[s],a=r[s];if(a&&a.__ref&&typeof a.update=="function")a.update(i,e);else if(typeof i=="object"&&i!==null){let c=s.charCodeAt(0);c>=65&&c<=90&&se(i,r,s,e)}else s!=="text"&&s!=="html"&&s!=="style"&&s!=="attr"&&s!=="data"&&(r[s]=i)}}),r.node&&n&&o.__effects&&o.__effects.length)for(let s=0;s<o.__effects.length;s++){let i=o.__effects[s];i&&!i._disposed&&!i._isSubscribeToEffect&&typeof i._execute=="function"&&i._execute()}else if(r.node&&o.__conditionalRunners)for(let s of o.__conditionalRunners)s();return At("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function jr(t){if(!t)return;let e=t.__ref;if(!e)return;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(o){console.error("[smbls] onBeforeRemove error:",o)}if(e.__effects){for(let o=0;o<e.__effects.length;o++)e.__effects[o].dispose();e.__effects.length=0}if(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 n=0;n<o.length;n++){let s=t[o[n]];s&&s.__ref&&jr(s)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let r=t.state?.$destroy||t.state?.destroy;if(typeof r=="function"&&t.state.__element===t&&r.call(t.state),t.parent?.__ref?.__children){let o=t.parent.__ref.__children.indexOf(t.key);o!==-1&&t.parent.__ref.__children.splice(o,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(o){console.error("[smbls] onRemove error:",o)}t.node=null,t.parent=null,t.__ref=null}function Bn(){jr(this)}R();R();R();var AT=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],TT=["none","forwards","backwards","both"],OT=["normal","reverse","alternate","alternate-reverse"],RT=["running","paused"],PT=t=>/^[\d.]+m?s$/.test(t),IT=/^(?: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*\))$/,DT=t=>{let e=String(t).trim().toLowerCase();if(e===""||e==="none"||e==="initial"||e==="unset")return!0;let r=e.match(/[a-z0-9]+\([^()]*\)/g);return!r||r.join("").replace(/\s+/g,"")!==e.replace(/\s+/g,"")?!1:r.every(o=>IT.test(o.replace(/\s+/g,"")))},ow=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),$T={transform:DT,translate:ow,rotate:t=>ow(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},LT=t=>{let e=String(t).trim().toLowerCase();if(e==="from")return 0;if(e==="to")return 100;let r=e.match(/^(\d+(?:\.\d+)?)%$/);return r?Number(r[1]):null},MT=t=>{if(!S(t))return null;let e=null,r=-1;for(let o in t){let n=LT(o);n==null||!S(t[o])||n>=r&&(r=n,e=t[o])}return e},FT=t=>{let e=MT(t);if(!e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let o of r){let n=$T[o];if(!n)return!1;let s=e[o];if(s==null||typeof s=="object"||typeof s=="function"||!n(s))return!1}return!0},NT=(t,e)=>{if(S(t))return t;let{animation:r}=e.context&&e.context.designSystem||{},o=r&&r[t];return S(o)?o:null},jT=["reverse","alternate","alternate-reverse"],nw=(t,e,r)=>{let o=r||e.animationDirection;return o&&jT.includes(String(o))?"both":FT(NT(t,e))?"backwards":"both"},BT=0,sw=new Map,em=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(S(t)){let n=JSON.stringify(t),s=sw.get(n);if(s)return s;let i=`smbls-anim-${BT++}`,a=Rn(i,t);return sw.set(n,a),a}let o=r&&r[t];return S(o)?Rn(t,o):t},UT=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},o=t.split(/\s+/),n=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of o)r&&r[u]?n=u:PT(u)?s.push(u):AT.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):OT.includes(u)?c=u:TT.includes(u)?l=u:RT.includes(u)?f=u:n||(n=u);return{name:n,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},rm={animation:(t,e)=>{if(w(t)&&t.includes(" ")){let r=UT(t,e);return{animationName:em(r.name||t,e),animationDuration:r.durations[0]||ne(e.animationDuration||"A").timing,animationDelay:r.durations[1]||ne(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||ye(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||nw(r.name||t,e,r.direction),animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:em(t,e),animationDuration:ne(e.animationDuration||"A").timing,animationDelay:ne(e.animationDelay||"0s").timing,animationTimingFunction:ye(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||nw(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:em(t,e)}),animationDuration:t=>({animationDuration:ne(t).timing}),animationDelay:t=>({animationDelay:ne(t).timing}),animationTimingFunction:t=>({animationTimingFunction:ye(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};R();var om={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>N("height",t,e),width:(t,e)=>N("width",t,e),boxSizing:t=>Tt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("height",e),..._t("width",r||e)}},inlineSize:(t,e)=>N("inlineSize",t,e),blockSize:(t,e)=>N("blockSize",t,e),minWidth:(t,e)=>N("minWidth",t,e),maxWidth:(t,e)=>N("maxWidth",t,e),widthRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minWidth",e),..._t("maxWidth",r||e)}},minHeight:(t,e)=>N("minHeight",t,e),maxHeight:(t,e)=>N("maxHeight",t,e),heightRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minHeight",e),..._t("maxHeight",r||e)}},size:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...N("inlineSize",e),...N("blockSize",r||e)}},minBlockSize:(t,e)=>N("minBlockSize",t,e),minInlineSize:(t,e)=>N("minInlineSize",t,e),maxBlockSize:(t,e)=>N("maxBlockSize",t,e),maxInlineSize:(t,e)=>N("maxInlineSize",t,e),minSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minInlineSize",e),..._t("minBlockSize",r||e)}},maxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("maxInlineSize",e),..._t("maxBlockSize",r||e)}},borderWidth:(t,e)=>N("borderWidth",t,e),borderTopWidth:(t,e)=>N("borderTopWidth",t,e),borderRightWidth:(t,e)=>N("borderRightWidth",t,e),borderBottomWidth:(t,e)=>N("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>N("borderLeftWidth",t,e),padding:(t,e)=>N("padding",t,e),scrollPadding:(t,e)=>N("scrollPadding",t,e),paddingInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("paddingInlineStart",e),..._t("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("paddingBlockStart",e),..._t("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>N("paddingBlockStart",t,e),paddingBottom:(t,e)=>N("paddingBlockEnd",t,e),paddingLeft:(t,e)=>N("paddingInlineStart",t,e),paddingRight:(t,e)=>N("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>N("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>N("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>N("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>N("paddingInlineEnd",t,e),margin:(t,e)=>N("margin",t,e),marginInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("marginInlineStart",e),..._t("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!w(e.marginBlock))return;let[r,o]=e.marginBlock.split(" ");return{..._t("marginBlockStart",r),..._t("marginBlockEnd",o||r)}},marginTop:(t,e)=>N("marginBlockStart",t,e),marginBottom:(t,e)=>N("marginBlockEnd",t,e),marginLeft:(t,e)=>N("marginInlineStart",t,e),marginRight:(t,e)=>N("marginInlineEnd",t,e),marginInlineStart:(t,e)=>N("marginInlineStart",t,e),marginInlineEnd:(t,e)=>N("marginInlineEnd",t,e),marginBlockStart:(t,e)=>N("marginBlockStart",t,e),marginBlockEnd:(t,e)=>N("marginBlockEnd",t,e),gap:t=>({gap:sf(t)}),columnGap:(t,e)=>Te(e,"columnGap",t),rowGap:(t,e)=>Te(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},flexAlign:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>ar(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>ar(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>ar(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>ar(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>ar(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>ar(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var nm={fontSize:t=>pa(t)||t,fontFamily:t=>({fontFamily:ua(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 sm={overflow:t=>({overflow:t}),cursor:(t,e,r,o)=>{if(!t)return;let n=o.assets&&o.assets[t];if(n&&n.content)t=`url(${n.content.src})`;else{let s=o.files&&o.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 im={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>St(r,"k").k).join(" ")}},left:t=>St(t,"left"),top:t=>St(t,"top"),right:t=>St(t,"right"),bottom:t=>St(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>St(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>St(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};R();var kf=0,am=()=>{kf++},cm=()=>{kf>0&&kf--},xe=({context:t,state:e})=>{let r=t?.designSystem,o=e?.root?.globalTheme||r?.globalTheme;return o&&o!=="auto"?o:kf>0?null:r&&r.resolvedTheme||null},ie=(t,e)=>{if(e==null||e==="")return;if(!S(e))return{[t]:e};let r={},o=!1;for(let n in e){let s=e[n];if(!(s==null||s==="")){if(S(s)){let i=ie(t,s);i&&(r[n]=i,o=!0);continue}r[n]={[t]:s},o=!0}}return o?r:void 0},lm={theme:(t,e)=>{if(t)return e.themeModifier?me(t,`@${e.themeModifier}`):me(t)},color:(t,e)=>{let r=xe(e);if(t)return ie("color",It(t,r))},background:(t,e)=>{let r=xe(e);if(t)return w(t)&&t.includes("gradient")&&t.includes("(")?{background:xa(t,r)}:ie("background",It(t,r))},backgroundColor:(t,e)=>{let r=xe(e);if(t)return ie("backgroundColor",It(t,r))},backgroundImage:(t,e,r,o)=>{let n=xe(e);if(!t)return;let s=o.assets&&o.assets[t];if(s&&s.content)t=s.content.src;else{let i=o.files&&o.files[t];i&&i.content&&(t=i.content.src)}return ie("backgroundImage",nf(t,n))},textStroke:t=>({WebkitTextStroke:rf(t)}),outline:t=>({outline:qe(t)}),outlineOffset:(t,e)=>N("outlineOffset",t,e),border:t=>({border:qe(t)}),borderColor:(t,e)=>{let r=xe(e);if(t)return ie("borderColor",It(t,r))},borderTopColor:(t,e)=>{let r=xe(e);if(t)return ie("borderTopColor",It(t,r))},borderBottomColor:(t,e)=>{let r=xe(e);if(t)return ie("borderBottomColor",It(t,r))},borderLeftColor:(t,e)=>{let r=xe(e);if(t)return ie("borderLeftColor",It(t,r))},borderRightColor:(t,e)=>{let r=xe(e);if(t)return ie("borderRightColor",It(t,r))},borderLeft:t=>({borderLeft:qe(t)}),borderTop:t=>({borderTop:qe(t)}),borderRight:t=>({borderRight:qe(t)}),borderBottom:t=>({borderBottom:qe(t)}),shadow:(t,e)=>{let r=xe(e);if(t)return ie("boxShadow",of(t,r))},boxShadow:(t,e)=>{if(!w(t))return;let[r,o]=t.split("!importan"),n=xe(e),s=o?" !important":"",i=_a(r.trim(),n);return w(i)?{boxShadow:i+s}:ie("boxShadow",i)},textShadow:(t,{context:e})=>ie("textShadow",_a(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:qe(t)})};var Ca={transition:t=>({transition:af(t)}),transitionDuration:t=>({transitionDuration:wa(t)}),transitionDelay:t=>({transitionDelay:wa(t)}),transitionTimingFunction:t=>({transitionTimingFunction:ye(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};R();var fm={flow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,o]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:o}}};var um={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var xt={...rm,...om,...nm,...sm,...im,...lm,...Ca,...fm,...um};var vt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","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","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","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","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);R();var VT=/^-?[A-Z][0-9]?$/,zT=/^[a-z][0-9]?$/,iw=/var\(\s*(--[A-Za-z0-9-]+)/g,HT=t=>{let e=new Set,r=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:r};for(let o in t){let n=t[o];if(!(!n||typeof n!="object")){if(n.sequence&&typeof n.sequence=="object")for(let s in n.sequence)e.add(s);if(n.vars&&typeof n.vars=="object")for(let s in n.vars)r.add(s)}}return{knownLetters:e,knownVars:r}},WT=(t,e)=>{if(!e.size)return[];let r=t.split(/[(),\s]+/).filter(Boolean),o=new Set;for(let n of r){if(!VT.test(n))continue;let s=n.charCodeAt(0)===45?n.slice(1):n;e.has(s)&&o.add(n)}return[...o]},qT=(t,e)=>{if(!e.size)return[];let r=[];iw.lastIndex=0;let o;for(;o=iw.exec(t);){let n=o[1];if(e.has(n))continue;let s=n.lastIndexOf("-");if(s===-1)continue;let i=n.slice(s+1);if(!zT.test(i))continue;let a=n.slice(0,s+1)+i.toUpperCase();a!==n&&e.has(a)&&r.push({varName:n,corrected:a})}return r},vf=new Set,aw=(t,e,r)=>{if(!Pt()||!w(e)||!e)return;let o;try{o=C()}catch{return}let{knownLetters:n,knownVars:s}=HT(o);if(!n.size&&!s.size)return;let i=WT(e,n),a=qT(e,s);if(!i.length&&!a.length)return;let c=r?.__ref?.path?r.__ref.path.join("."):r?.key||"?";for(let l of i){let f=`${c}::${t}::bare::${l}::${e}`;vf.has(f)||(vf.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}`;vf.has(u)||(vf.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}"`))}};R();var KT=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,GT=(t,e,r)=>{let{context:o}=r;if(!o.designSystem?.media)return;let n=t.slice(1),s=o.designSystem.media[n],i=ae(e,r);if(!s)return{[t]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(KT),c=a?a[1]||a[2]:n,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=o.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},cw=(t,e,r)=>({[t]:ae(e,r)}),Ea=(t,e,r)=>{let o=`&${t}`,n=ae(e,r);if(t.includes(",")&&n){let s={},i={};for(let a in n)typeof n[a]=="object"&&n[a]!==null?i[a]=n[a]:s[a]=n[a];if(Object.keys(i).length){let a=o.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[o]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[o]:n}},dm=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},YT=(t,e,r)=>{let o=t.slice(1),n=dm(o,r);if(n===void 0&&(n=!!r[o]),!!n)return ae(e,r)},XT=(t,e,r)=>({[t]:e}),JT=(t,e,r)=>{let o=t.slice(1),n=r[o]===!0||r.state?.[o];if(!n)if(typeof r[o]=="function")try{n=r[o](r,r.state,r.context)}catch{}else{let s=dm(o,r);s!==void 0&&(n=s)}if(n)return ae(e,r)},ZT=(t,e,r)=>{let o=t.slice(1),n=r[o]===!0||r.state?.[o];if(!n)if(typeof r[o]=="function")try{n=r[o](r,r.state,r.context)}catch{}else{let s=dm(o,r);s!==void 0&&(n=s)}if(!n)return ae(e,r)},pm=(t,e)=>ae(t,e),hm={"@":GT,":":Ea,"[":Ea,"*":Ea,"+":Ea,"~":Ea,"&":cw,">":cw,$:YT,"-":XT,".":JT,"!":ZT};var Cf=xr(),lw=(t,e,r)=>{let o=e?.context?.designSystem;o&&it(o);try{let n={},s={},i=(a,c)=>{if(r.unpack){n={...n,...c};return}n[a]=c};for(let a in t){let c=t[a];if(c!==null)if(a==="class"&&e.call("isString",t.class)){let l=c.split(" ");if(l.length){let f=e.context.designSystem.class,u=l.reduce((d,h)=>gt(d,f[h]),{});n.designSystemClass=u}}else if(a==="true"){let l=ut(c,e);gt(n,pm(l,e))}else if(e.classlist[a]){let l=e.classlist[a],f=A(l)?l(e,e.state,e.context):l;f&&i(a,f),!Cf&&S(n[a])&&(n[a].label=a)}else if(xt[a]){let l=ut(c,e);if(l===null)continue;T(l)&&(l=l.reduce((u,d)=>gt(u,d),{}));let f=xt[a](l,e,e.state,e.context);T(f)&&(f=f.reduce((u,d)=>gt(u,d),{})),f&&i(a,f),!Cf&&S(n[a])&&(n[a].label=a)}else if(vt.has(a)){let l=ut(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),Cf||aw(a,l,e),i(a,{[a]:l}),!Cf&&S(n[a])&&(n[a].label=a)}else s[a]=c}return[n,s]}finally{o&&tt()}},fw=(t,e)=>{let r={};for(let o in t){let n=hm[o.slice(0,1)];if(n){let s=n(o,t[o],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?qt(r[i],s[i]):r[i]=s[i])}}return r},ae=(t,e,r={unpack:!0})=>{let[o,n]=lw(t,e,r),s=fw(n,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return Ns(o,s);o._selectors=s}return o},QT=(t,e)=>{let r={};if(t.class)for(let o in t.class)r[o]=t.class[o](e);return r};R();var uw=t=>{if(S(t))return ae(t,t)},t1=(t,e)=>{let r=uw(t);return typeof e=="function"?e(r):_e(r)};R();function mm(t,e,r){let o=t?.context?.analyze;if(!o||!o.emit||e==="warn"&&!o.shouldCapture("warnings")||e==="error"&&!o.shouldCapture("errors"))return;let n=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");o.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:n||null,args:r})}var dw=new Set;function e1(t,e,r){let o=String(e);if(dw.has(o))return;dw.add(o);let n=t?.__ref?.path,s=Array.isArray(n)&&n.length?n.join("."):t?.key!=null?String(t.key):"(unknown element)",i=r!=null?`resolves to a non-function (${typeof r}) \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('${o}') at <${s}>: "${o}" ${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.`;mm(t,"error",[a]),console.error(a)}function r1(...t){return mm(this,"warn",t),ki.apply(this,t)}function o1(...t){return mm(this,"error",t),lo.apply(this,t)}var pw={update:Nn,remove:Bn,getDB:Ai,getQuery:Ti,getRootData:xi,getChildren:gi,getPath:mi,nextElement:vi,previousElement:Ci,verbose:rn,warn:r1,error:o1,variables:Ei,spotByPath:hi,set(t,e){let r=this.__ref;if(r){if(r.__setLocked){r.__setQueued={content:t,options:e};return}r.__setLocked=!0}try{if(this.removeContent(),t!=null){let o=this.context?.__create;o&&o(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let o=r.__setQueued;o&&(r.__setQueued=null,this.set(o.content,o.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,o=this.key,n=this.parse();return this.remove(),e(n,r,o,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 r of e.__children){let o=this[r];if(!o)continue;if(typeof t=="function"){if(t(o))return o}else if(typeof t=="string"&&o.key===t)return o;let n=o.lookdown?.(t);if(n)return n}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let o of r.__children){let n=this[o];n&&(typeof t=="function"?t(n)&&e.push(n):typeof t=="string"&&n.key===t&&e.push(n),n.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:_i,getRootState:bi,getRootContext:wi,getContext:Si,parse(t){let e={},r=t?new Set(t):null,o=this.__ref?.__exec;for(let n in this)if(!(n==="parent"||n==="node"||n==="__ref")&&!r?.has(n)){if(o&&o[n]!==void 0){e[n]=o[n];continue}typeof this[n]!="function"&&(e[n]=this[n])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let o of r.__children)this[o]?.parseDeep&&(e[o]=this[o].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];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 r=t[e];if(r==null)continue;let o=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),n=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(o,n,"important")}},call(t,...e){let r=this.context,o=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof o=="function")return o.call(this,...e);Pt()&&e1(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 r=t.__children.indexOf("content");r!==-1&&t.__children.splice(r,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},gm=new WeakMap;function n1(t){if(!t)return pw;let e=gm.get(t);if(e)return e;e=Object.create(pw);let r=t.methods;if(r)for(let o in r)e[o]=r[o];return gm.set(t,e),e}function Un(t){let e=n1(t.context);Object.setPrototypeOf(t,e)}function Ef(t){if(!t)return!1;let e=gm.get(t);if(!e)return!1;let r=t.methods;if(!r)return!1;for(let o in r)e[o]=r[o];return!0}var Af=[],Tf=!1,Br=0;function Of(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function hw(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 r=new MessageChannel;r.port1.onmessage=()=>{r.port1.close(),t()},r.port2.postMessage(0);return}setTimeout(t,0)}function gw(){return Br?Of()-Br>=50:!1}var Vn=0;function mw(){Vn===0&&!Br&&(Br=Of()),Vn++}function yw(){Vn>0&&Vn--,Vn===0&&!Tf&&(Br=0)}function bw(t){Af.push(t),Tf||(Tf=!0,hw(_w))}function _w(){for(Br=Of();Af.length;){let t=Af.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(Of()-Br>=50)break}if(Af.length){hw(_w);return}Tf=!1,Br=0,Vn=0}R();Jo();var wm={};P(wm,{STATE_METHODS:()=>xw,applyInitialState:()=>Pf,applyStateMethods:()=>ce,callStateMethod:()=>Aa,createState:()=>bm,isTracking:()=>xm,useHostState:()=>_m});var xw=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"]),Rf=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Re=(t,e,r,{onlyIfAbsent:o}={})=>{Rf(t,"$"+e,r),!(o&&Object.prototype.hasOwnProperty.call(t,e))&&Rf(t,e,r)},Aa=(t,e,...r)=>{if(!t)return;let o=t["$"+e];if(typeof o=="function")return o.apply(t,r);let n=t[e];if(typeof n=="function")return n.apply(t,r)},ce=(t,e)=>{if(yt(e)){let n=e.__raw||e;Re(n,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Re(n,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Re(n,"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}),Re(n,"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}),Re(n,"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}),Re(n,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Re(n,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Re(n,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Re(n,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&yt(a.parent);)a=a.parent;return Aa(a,"update",s,i)}),Re(n,"parentUpdate",function(s,i={}){if(e.parent)return Aa(e.parent,"update",s,i)}),Re(n,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(n,"root")||Object.defineProperty(n,"root",{get:function(){let s=e,i=yt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,yt(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]},o={update(n){if(!n||typeof n!="object")return e;for(let s in n)e[s]=n[s];return e},apply(n){if(typeof n!="function")return e;let s=n(e);return s?e.$update(s):e},parse(){return{...e}},toggle(n){return e[n]=!e[n],e},set(n){if(!n||typeof n!="object")return e;r();for(let s in n)e[s]=n[s];return e},replace(n){return e.$set(n)},clean(){return r(),e}};for(let n in o)if(Rf(e,"$"+n,o[n]),typeof e[n]!="function"){if(Object.prototype.hasOwnProperty.call(e,n)){Ec(n,"");continue}Rf(e,n,o[n])}};var bm=function(t,e,r){return t.state=Pf(t,e,r),t.state},Pf=function(t,e,r){let{__ref:o}=t,n=t.state;if(n==null||n===!1){let s=e?.state||{};return ce(t,s),s}if(typeof n=="string")return o&&(o.__state=n),o.__stateType="string",s1(n,t,e);if(typeof n=="number"||typeof n=="boolean"){o&&(o.__state=n,o.__stateType=typeof n,o.__hasRootState=!0);let s=Xe({value:n});return s.__element=t,e?.state&&(s.parent=e.state),ce(t,s),s}if(typeof n=="function"&&(n=n(t,e?.state)||{}),typeof n=="object"&&!yt(n)){o&&(o.__hasRootState=!0),n.isRootState&&o&&(o.__hasRootState=!0);let s=Xe({...n});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)),ce(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return yt(n)?(n.__element=t,n):e?.state||{}};function ym(t,e){if(!e)return t;let r=e.split("/"),o=t;for(let n of r){if(o==null)return{};o=o[n]}return o??{}}function s1(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let n=t.slice(3),s=r.state?.parent;return n&&s?ym(s,n):s??r.state??{}}if(t.startsWith("~/")){let n=r.state;for(;n?.parent;)n=n.parent;let s=t.slice(2);return s?ym(n,s):n??{}}let o=ym(r.state,t);if(o&&typeof o=="object"&&!yt(o)&&!Object.getOwnPropertyDescriptor(o,"root")){let n=r.state?.root||r.state;Object.defineProperty(o,"root",{get:()=>n,enumerable:!1,configurable:!0})}return o}var _m=(t,e)=>{if(!t)return Sw;let r=a1(t,e);return!r||!r.state?Sw:l1(r.state)},xm=()=>vc()!=null,i1=128;function a1(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,o=t,n=null;for(let s=0;s<i1&&o;s++){if(r(o)&&o.state)return o;if(o.state&&!n&&(n=o),!o.parent||o.parent===o)break;o=o.parent}return n}var c1={get(t,e){return t[e]}},ww=new WeakMap,l1=t=>{let e=ww.get(t);return e||(e=new Proxy(t,c1),ww.set(t,e)),e},Sw=new Proxy(Object.create(null),{get(){},has(){return!1}});var If="3.14.781";var kw="__SMBLS_ELEMENT_ID_ENGINE__",vw=(t,e,r)=>{let o=e||If,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[kw];return s&&s.engine&&s.version===o?s.engine:(s||(n[kw]={version:o,engine:t}),t)};var Iw=vw({uniqId:1,scopedStyleId:0},If),Oa=[],Cm=!1;function Cw(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function f1(){return typeof document<"u"&&document.visibilityState==="hidden"}var u1=250;function Dw(){if(!Cm){if(Cm=!0,typeof requestAnimationFrame!="function"){setTimeout(Pa,0);return}f1()?setTimeout(Pa,u1):requestAnimationFrame(Pa)}}var d1=300,p1=15e4;function Pa(){if(Cm=!1,!Oa.length)return;let t=Oa.splice(0,Oa.length);for(let e=0;e<t.length;e++){let r=t[e];if(r.node){if(!r.node.isConnected){let o=r.__ref||(r.__ref={});o.__mountAttempts=(o.__mountAttempts||0)+1,o.__mountFirstAttemptAt==null&&(o.__mountFirstAttemptAt=Cw());let n=Cw()-o.__mountFirstAttemptAt;o.__mountAttempts<=d1&&n<p1?(Oa.push(r),Dw()):console.warn("[DOMQL] onMounted dropped after",o.__mountAttempts,"attempts /",n,"ms \u2014 node never connected:",r.key||r.tag||r);continue}fr("Mounted",r,r.__ref?.__mountOptions||{})}}}function $w(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,Oa.push(t),Dw())}function Ew(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&At("contentUpdate",t,e);let r=t.context?.designSystem;r&&it(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(o){if(t.context?.plugins?.length&&At("error",t,{hook:"onContentUpdate",error:o})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',o),t.context?.strictMode)throw o}finally{r&&tt()}}function Hn(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function h1(t){return t.charAt(2).toLowerCase()+t.slice(3)}function g1(t){return t.toLowerCase()}function Em(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function Ra(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=Ra(n,s):r[o]=s}return r}function se(t,e,r,o={},n){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${Iw.uniqId++}`,s.parent=e||null,s.context=t.context||e?.context||o.context||{},s.context.__create||(s.context.__create=se);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key],origin:t};if(r&&!t.extends&&!t.extend){let p=r.indexOf("_"),m=r.indexOf("."),_=p>0?p:-1;if(m>0&&(_<0||m<_)&&(_=m),_>0){let b=r.substring(0,_),y=s.context?.components;y&&(y[b]||y["smbls."+b])?t={...t,extends:b}:y&&Pt()&&(/^[A-Z]\w*_\d+$/.test(r)||/^[A-Z]\w*\.\w+$/.test(r))&&console.warn(`[smbls] auto-extend: key "${r}" looks like an instance of "${b}" but neither "${b}" nor "smbls.${b}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}Fn(s,t,o);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let p in t){if(p==="parent"||p==="node"||p==="__ref"||p==="extends"||p==="context"||p==="props")continue;let m=t[p],_=s[p],b=_&&m&&typeof _=="object"&&typeof m=="object"&&!Array.isArray(_)&&!Array.isArray(m)&&typeof _!="function"&&typeof m!="function";b&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?s[p]=Ra(_,m):b&&a.has(p)?s[p]={..._,...m}:b&&Em(p)?s[p]=Ra(_,m):s[p]=m}function l(p){for(let m in p){let _=p[m],b=s[m],y=b&&_&&typeof b=="object"&&typeof _=="object"&&!Array.isArray(b)&&!Array.isArray(_)&&typeof b!="function"&&typeof _!="function";y&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=Ra(b,_):y&&a.has(m)?s[m]={...b,..._}:y&&Em(m)?s[m]=Ra(b,_):s[m]=_}}c&&l(c),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,d=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,h=u||d||null;if(t.scope!==void 0||f){let p={};f&&Object.assign(p,f),t.scope!==void 0&&Object.assign(p,t.scope),s.scope=Cc(p,h)}else h&&(s.scope=h);if(t.if!==void 0&&(s.if=t.if),Un(s),m1(s,e,t),s.if!=null){let p;if(typeof s.if=="function")try{p=s.if(s,s.state,s.context)}catch(m){if(p=!1,i.__ifError=m,typeof console<"u"&&console.warn){let _=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${_} \u2014 treating as false:`,m?.message||m)}}else p=s.if;i.__if=!!p}if(i.__if)typeof s.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof s.if=="function"&&Fw(s,i,s.if),s;s.tag||(s.tag=Dr(s)),fr("Init",s,o);let g=s.node=$r(s);if(!g)return s;if(s.tag==="fragment"){let m=(s.context?.document||globalThis.document).createComment("");g.appendChild(m),i.__fragmentAnchor=m}fr("AttachNode",s,o),g.setAttribute&&s.key&&g.setAttribute("data-key",s.key),e&&(e[s.key]=s,e.__ref?.__children&&(e.__ref.__children.includes(s.key)||e.__ref.__children.push(s.key))),g.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&g.setAttribute("data-smbls-app",s.context.key),s.id&&g.setAttribute&&(g.id=s.id),Uw(s,o),Mw(s),Am(s),jw(s),P1(s);try{Vw(s,o)}catch(p){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,p?.message||p,p?.stack?`
51
+ Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function nw(){try{let t=C(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function Yx(t){wf||Xt.variable>0||Xt.atomic>0||sw(Math.max(t,nw()))}function Xg(t){let e=t&&(t.CSS_VARS||t.cssVars);return sw(e?Object.keys(e).length:nw())}function sw(t){let e=kf();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!vf())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 r=e.invalid>0?"every rule was rejected as malformed":"no rule was ever produced";return dT(r,t),{ok:!1,reason:r,stats:e,varCount:t}}var pT={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 Ro(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Sf(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e.toString(36)}function hT(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Sf(e)}var gT={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"};function Ln(t,e){let r=gT[t];return r?`${t}:${e};${r}:${e};`:`${t}:${e};`}function Kg(t){let e="";for(let r in t){let o=t[r];if(typeof o!="object"||o===null)continue;let n="";for(let s in o){let i=s.charCodeAt(0)===45&&s.charCodeAt(1)===45;n+=Ln(i?s:Ro(s),o[s])}e+=`${r}{${n}}`}return e}var mT="@media (hover: hover)",yT=/(?:^|[^\\]):hover(?![\w-])/;function Zg(){try{let t=C();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Pe(t,e,r){return r===!1||!yT.test(e)||r===void 0&&!Zg()?t:`${mT}{${t}}`}function Xx(t,e,r){let o=(r?r+"":"")+t+":"+e,n=Oo.get(o),s=n?null:Ro(t);if(!n){let c=pT[t]||Sf(t),l=hT(e);n=r?`_${r}_${c}-${l}`:`_${c}-${l}`,Oo.set(o,n)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return n;let i=s||Ro(t),a=`.${n}{${Ln(i,e)}}`;return Zt(a,void 0,"atomic"),n}var Zx=new WeakMap,Jx=new WeakMap;function Zt(t,e,r){let o=vf(e,bT(t));if(!o)return Xt.dropped++,"dropped";let n=Zx.get(o);if(n||(n=new Set,Zx.set(o,n)),n.has(t))return Xt.duplicate++,Xt[r||"global"]++,"duplicate";let s=Jx.get(o);if(s&&s.has(t))return Xt.invalid++,"invalid";try{o.insertRule(t,o.cssRules.length)}catch{return s||(s=new Set,Jx.set(o,s)),s.add(t),Xt.invalid++,"invalid"}return n.add(t),Xt[r||"global"]++,"inserted"}var Re="0:0",Qx="1:0",tw=/\((max|min)-width:\s*([\d.]+)(px|em|rem)?\)/g;function bT(t){if(typeof t!="string"||!t)return Re;if(t.charCodeAt(0)===64){if(!t.startsWith("@media")&&!t.startsWith("@supports")&&!t.startsWith("@container"))return Re;let e=1/0,r=-1/0;tw.lastIndex=0;let o;for(;o=tw.exec(t);){let n=parseFloat(o[2])*(o[3]==="em"||o[3]==="rem"?16:1);o[1]==="max"?e=Math.min(e,n):r=Math.max(r,n)}return e!==1/0?"2:"+-e:r!==-1/0?"3:"+r:Qx}return t.charCodeAt(0)!==46||/^\.[\w-]+\{/.test(t)?Re:Qx}var ew=t=>{let e=t.indexOf(":");return[Number(t.slice(0,e)),Number(t.slice(e+1))]},_T=(t,e)=>{let[r,o]=ew(t),[n,s]=ew(e);return r!==n?r<n:o<s},xT=t=>t.getAttribute("data-tier")||Re,rw=new WeakMap;function vf(t,e){let r=t||Pa();if(!r||!r.head)return null;let o=e||Re,n=rw.get(r);n||(n=new Map,rw.set(r,n));let s=n.get(o);if(s&&s.ownerNode&&s.ownerNode.parentNode===r.head)return s;o!==Re&&vf(r,Re);let i=o===Re?r.head.querySelector("style[data-smbls]:not([data-tier])"):r.head.querySelector(`style[data-smbls][data-tier="${o}"]`);if(!i){i=r.createElement("style"),i.setAttribute("data-smbls",""),o!==Re&&i.setAttribute("data-tier",o);let c=r.head.querySelectorAll("style[data-smbls]"),l=null;for(let u=0;u<c.length;u++)if(_T(o,xT(c[u]))){l=c[u];break}let f=c.length?c[c.length-1]:null;l?r.head.insertBefore(i,l):f?r.head.insertBefore(i,f.nextSibling):r.head.appendChild(i)}let a=i.sheet;return n.set(o,a),o===Re&&(ow=a),a}function wT(t){let e=t||Pa();if(!e||!e.head)return[];let r=[],o=e.head.querySelectorAll("style[data-smbls]");for(let n=0;n<o.length;n++)o[n].sheet&&r.push(o[n].sheet);return r}var ST=8;function we(t,e,r){if(!t||typeof t!="object")return"";let o=null,n=0,s=[],i=[];for(let c in t){let l=t[c];l==null||l===!1||l===""||(typeof l=="object"?i.push([c,l]):qg?(o||(o=[]),o.push(c,String(l)),n++):s.push(Xx(c,String(l),r)))}if(o&&n>=ST){let c=o.join("\0"),l=qg(c),f=l.indexOf("\0"),u=l.substring(0,f),d=l.substring(f+1);if(d){let h=d.split(`
52
+ `);for(let g=0;g<h.length;g++)h[g]&&Zt(h[g],void 0,"atomic")}s.push(u)}else if(o)for(let c=0;c<o.length;c+=2)s.push(Xx(o[c],o[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(CT(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var Wg=new Map,kT=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function vT(t){return typeof t!="string"||!t||t.startsWith("@media")||t.startsWith("@supports")?!1:t.split(",").every(e=>kT.test(e.trim()))}function CT(t,e,r){let o=JSON.stringify(e),n=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,s=n&&Zg(),i=(r?r+"":"")+t+o+(n&&!s?"rawhover":""),a=Oo.get(i);if(a){let b=Wg.get(a);if(b)for(let _=0;_<b.length;_++)Zt(b[_],void 0,"atomic");return a}a=r?`_${r}_c${Sf(i)}`:`_c${Sf(i)}`;let c=`.${a}`,l=vT(t)?`.${a}.${a}`:c,f="",u=[],d=b=>typeof b=="string"&&(b.indexOf("{")!==-1||b.indexOf("}")!==-1),h=(b,_)=>{let y="";for(let x in _){let k=_[x];if(k!=null)if(typeof k=="object")h([...b,x],k);else{if(d(k))continue;y+=Ln(Ro(x),k)}}y&&(b.length===0?f+=y:u.push({chain:b,body:y}))};h([],e);let g=b=>{let _=b.length===1?l:c;if(!b.length)return _;let y=b[0].split(",").map(x=>x.trim()).map(x=>x.includes("&")?x.replace(/&/g,_):x.startsWith(":")?`${_}${x}`:`${_} ${x}`);for(let x=1;x<b.length;x++){let k=b[x].split(",").map(O=>O.trim()),E=[];for(let O of y)for(let $ of k)$.includes("&")?E.push($.replace(/&/g,O)):$.startsWith(":")?E.push(O+$):E.push(O+" "+$);y=E}return y.join(", ")},p=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(f){let b=`${t}{${c}{${f}}}`;p.push(b),Zt(b,void 0,"atomic")}for(let b of u){let _=g(b.chain),y=Pe(`${t}{${_}{${b.body}}}`,_,s);p.push(y),Zt(y,void 0,"atomic")}return Wg.set(a,p),Oo.set(i,a),a}let m=g([t]);if(f){let b=Pe(`${m}{${f}}`,m,s);p.push(b),Zt(b,void 0,"atomic")}for(let b of u){let _=g([t,...b.chain]),y=Pe(`${_}{${b.body}}`,_,s);p.push(y),Zt(y,void 0,"atomic")}return Wg.set(a,p),Oo.set(i,a),a}function St(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(vf(),typeof t=="string"){let s=t.indexOf("--")!==-1;Zt(t,void 0,s?"variable":"global"),s&&Yx(1);return}let e=Zg(),r=0,o=Object.keys(t),n=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};o.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?n(i)-n(s):1:-1});for(let s of o){let i=t[s];if(s.startsWith("@keyframes")){let a=Kg(i);a&&Zt(`${s}{${a}}`,void 0,"keyframes");continue}if(s.startsWith("@media")||s.startsWith("@supports"))for(let a in i){let c=i[a];if(a.startsWith("@keyframes")){let l=Kg(c);l&&Zt(`${s}{${a}{${l}}}`,void 0,"keyframes");continue}if(typeof c=="object"&&c!==null){let l="",f=0;for(let u in c){let d=u.charCodeAt(0)===45&&u.charCodeAt(1)===45;d&&f++;let h=d?u:Ro(u);l+=Ln(h,c[u])}r+=f,Zt(Pe(`${s}{${a}{${l}}}`,a,e),void 0,f?"variable":"global")}else{let l=a.charCodeAt(0)===45&&a.charCodeAt(1)===45;l&&r++;let f=l?a:Ro(a);Zt(`${s}{${Ln(f,c)}}`,void 0,l?"variable":"global")}}else{let a="",c=!1,l=0;for(let f in i){let u=i[f];if(typeof u=="object"&&u!==null)c=!0;else{let d=f.charCodeAt(0)===45&&f.charCodeAt(1)===45;d&&l++;let h=d?f:Ro(f);a+=Ln(h,u)}}if(r+=l,a&&Zt(Pe(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let f=[],u=[];for(let d in i)typeof i[d]=="object"&&i[d]!==null&&(d.startsWith("@media")||d.startsWith("@supports")?f.push(d):u.push(d));f.sort((d,h)=>{let g=p=>{let m=p.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return g(h)-g(d)});for(let d of u)St({[`${s} ${d}`]:i[d]});for(let d of f)St({[d]:{[s]:i[d]}})}}}r>0&&Yx(r)}function Mn(t,e){return Zt(`@keyframes ${t}{${Kg(e)}}`,void 0,"keyframes"),t}function iw(){Oo.clear(),ow=null}function Jg(){return Oo.size}R();var Km={};P(Km,{DELEGATED_EVENTS:()=>Un,LIFECYCLE_EVENTS:()=>Nr,MIXINS:()=>Cf,NON_BUBBLING_EVENTS:()=>Ef,REGISTRY:()=>jt,SVG_TAGS:()=>jn,addDelegatedEvent:()=>Ia,addMethods:()=>Kn,applyExtends:()=>zn,cacheNode:()=>Fr,create:()=>ae,createHTMLNode:()=>Nn,detectTag:()=>Mr,dispose:()=>Vr,flushMounts:()=>Ba,globalEventKeyInfo:()=>Af,isSvgTag:()=>Bn,isValidTag:()=>Fn,refreshContextProto:()=>Df,registerEvent:()=>Vn,registerGlobalEvent:()=>Tf,remove:()=>qn,removeDelegatedEvent:()=>Da,update:()=>Hn});var tm="http://www.w3.org/2000/svg",jn=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"]),ET=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 Fn(t){return ET.has(t)||jn.has(t)}function Bn(t){return jn.has(t)}function Mr(t){let{tag:e,key:r}=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 "${r||"<anon>"}" \u2014 falling back to key-based tag detection:`,s?.message||s)}if(e===!0&&(e=r),typeof e=="string"&&Fn(e))return e;if(!r||typeof r!="string")return"div";let o=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),n=r.toLowerCase();return n.includes(".")&&(n=n.split(".")[0]),n.includes("_")&&(n=n.split("_")[0]),Fn(n)&&!o.has(n)?n:"div"}var aw={};function Nn(t,e){let r=e?.context?.document||globalThis.document;if(!r)return null;if(t==="string")return r.createTextNode(e?.text||"");if(t==="fragment")return r.createDocumentFragment();if(Bn(t)){let o=e?.parent;if(t==="svg"||o?.node?.namespaceURI===tm)return r.createElementNS(tm,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Fr(t){let e=t.tag=Mr(t),o=Bn(e)&&(e==="svg"||t.parent?.node?.namespaceURI===tm)?"svg:"+e:e,n=t?.context?.document||globalThis.document,s=aw[o];if(s||(s=aw[o]=Nn(e,t)),!s)return null;let i=n&&s.ownerDocument!==n?Nn(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var jt=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","__name","__ref","__hash","__text","parent","node"]),Cf={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Nr=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"]),Ef=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"]),em=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Un=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"]);var om=new WeakMap,AT={passive:!0},TT={passive:!0,capture:!0},nm=(t,e)=>em.has(t)?e?TT:AT:e||!1;function lw(t){let e=om.get(t);return e||(e={handlers:new Map,installed:new Set},om.set(t,e)),e}function OT(t,e){let r=lw(e);if(r.installed.has(t))return;r.installed.add(t);let o=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",n=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let a=r.handlers.get(t);if(a){let c=a.get(i);if(c){if(n&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},nm(t,o))}function Ia(t,e,r,o){o||(o=e.ownerDocument?.documentElement||e.getRootNode());let n=lw(o);OT(t,o),n.handlers.has(t)||n.handlers.set(t,new WeakMap),n.handlers.get(t).set(e,r)}function Da(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=om.get(r);if(!o)return;let n=o.handlers.get(t);n&&n.delete(e)}function cw(t){return Un.has(t)&&!Nr.has(t)}function fw(t,e){let{context:r}=t,o=r?.designSystem;return n=>{o&&it(o);try{let s=e.call(t,n,t,t.state,r);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{o&&et()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),r?.strictMode)throw s}o&&et()}}function Vn(t,e,r){let{node:o,context:n}=e;if(!o)return;let s=fw(e,r),i=Ef.has(t);if(!i&&cw(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;Ia(t,o,s,a)}else o.addEventListener(t,s,nm(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&cw(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;Da(t,o,a)}else o.removeEventListener(t,s,nm(t,!1))})}var rm=[["onDocument","document"],["onWindow","window"]];function Af(t){if(typeof t!="string")return null;for(let e=0;e<rm.length;e++){let r=rm[e][0];if(t.length<=r.length||!t.startsWith(r))continue;let o=t.charCodeAt(r.length);if(!(o<65||o>90))return{target:rm[e][1],eventName:t.slice(r.length).toLowerCase()}}return null}var RT=/^[A-Za-z_$][\w$]*$/;function PT(t,e,r){let o=e,n=!1,s,i=!1;if(e&&typeof e=="object"&&typeof e!="function"&&(o=e.handler,n=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive)),typeof o=="string"&&RT.test(o)){let a=o;o=function(l){return t.call(a,l)}}return typeof o!="function"?null:(s===void 0&&(s=em.has(r)),{handler:o,capture:n,passive:s,once:i})}function IT(t,e){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);return o&&typeof o.addEventListener=="function"?o:null}function DT(t){let e=t.node;if(!e)return!1;let r=e.nodeType===11?t.__ref?.__fragmentAnchor:e;return r?r.isConnected!==!1:!1}function Tf(t,e,r){let o=e.__ref;if(!o)return;let n=PT(e,r,t.eventName);if(!n)return;let s=IT(e,t.target);if(!s)return;o.__globalEvents||(o.__globalEvents=new Map);let i=t.target+":"+t.eventName+":"+(n.capture?1:0);if(o.__globalEvents.has(i))return;let a=fw(e,n.handler),c=f=>{DT(e)&&a(f)},l={capture:n.capture,passive:n.passive,once:n.once};s.addEventListener(t.eventName,c,l),o.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:c,options:l}),o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{s.removeEventListener(t.eventName,c,l),o.__globalEvents&&o.__globalEvents.delete(i)})}function uw(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 zn(t,e,r){let o=uw(e);if(!o.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<o.length;i++){let a=dw(o[i],s);a&&a!==e&&pw(t,a,r,new Set([e]))}}function dw(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(n=>n.trim()),o=e[r[0]]||e[`smbls.${r[0]}`];for(let n=1;n<r.length&&o;n++)o=o[r[n]];return o||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function pw(t,e,r,o=new Set){if(o.has(e))return;o.add(e);let n=uw(e);if(n.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<n.length;a++){let c=dw(n[a],i);c&&pw(t,c,r,o)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=hw(t[s],i):t[s]=i}}function hw(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=hw(n,s):r[o]=s}return r}rn();R();var $T=["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"],Of={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","hidden","id","lang","part","placeholder","slot","spellcheck","style","tabindex","title","translate","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","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","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["open"],del:["cite","datetime"],dialog:["open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["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","crossorigin","decoding","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alt","autocomplete","capture","checked","crossorigin","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","crossorigin","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"],slot:["name"],script:["async","charset","crossorigin","defer","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:["media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],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","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","offset","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"]},mw=["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"],Br=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()):yw(t),LT=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),yw=t=>LT.has(t)?t.toLowerCase():null,MT=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),dr=t=>typeof t=="string"&&(MT.has(t)||t.startsWith("aria-")),Xe=(t,e)=>e!==!0&&e!==!1?e:dr(t)?e?"true":"false":e===!0?"":e,Ur=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Br(e)||Of.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Of,t)?Of[t].includes(e):!1,am=t=>{if(!w(t))return!1;let e=t.toLowerCase();return mw.includes(e)},FT=(t,e,r)=>{let o={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(r&&n in r)continue;if(n==="aria"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])yt(e[n][a])&&(o["aria-"+a]=e[n][a]);continue}if(n==="data"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])if(yt(e[n][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());o["data-"+c]=e[n][a]}continue}let s=Ur(t,n),i=am(n);if(yt(e[n])&&(s||i)){let a=Br(n)||n;o[a]=e[n]}}return o},NT=(t,e)=>{let r={};if(t.attr)for(let o in t.attr)r[o]=t.attr[o](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let n=t.aria[o];typeof n=="function"&&(r["aria-"+o]=n(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let o in t.data){let n=t.data[o];if(typeof n=="function"){let s=o.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=n(e,e.state,e.context)}}return r},jr=(t,e)=>{let r=t.call("exec",e,t);if(r)return w(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},sm=(t,e)=>{let r=(t.preSrc||"")+(jr(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:o}=t;if(!o.files&&!o.assets)return r;if(r.startsWith("/assets/")){let n=r.slice(8),s=o.assets&&(o.assets[r]||o.assets[n]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let n=r.slice(7),s=o.files&&(o.files[r]||o.files[n]);return s&&s.content?s.content.src:r}if(o.assets){let n=o.assets[r];if(n&&n.content)return n.content.src}if(o.files){let n=o.files[r];if(n&&n.content)return n.content.src}return r},im={src:t=>sm(t,t.src),href:t=>jr(t,t.href),action:t=>jr(t,t.action),poster:t=>sm(t,t.poster),data:t=>jr(t,t.data)},cm=t=>{let e=t.tag||"div",r={};for(let o in im)if(t[o]!==void 0&&Ur(e,o)){let n=im[o](t);n!==void 0&&(r[o]=n)}return r},gw=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},jT=(t,e,r)=>{if(t==="$"){let n=gw(e,r);return n===void 0&&(n=!!r[e]),n}let o=r[e]===!0||r.state[e];if(!o){let n=gw(e,r);n!==void 0&&(o=n)}return t==="."?!!o:!o},BT=new Set(["$",".","!"]),UT=(t,e,r)=>{let o={},n=(s,i,a,c)=>{let l=i;o[s]=f=>{if(jT(a,c,f))return A(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!BT.has(i))continue;let a=t[s];if(!a||typeof a!="object")continue;let c=s.slice(1);for(let l in a){if(r&&l in r)continue;if(l==="aria"&&a[l]&&typeof a[l]=="object"){for(let h in a[l])n("aria-"+h,a[l][h],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let h in a[l]){let g=h.replace(/([A-Z])/g,p=>"-"+p.toLowerCase());n("data-"+g,a[l][h],i,c)}continue}let f=Ur(e,l),u=am(l);if(!f&&!u)continue;let d=Br(l)||l;n(d,a[l],i,c)}}return o};function Hn(t={},e={}){let r=this,o=r.__ref;if(!o)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&lm(o))try{let s=r.onBeforeUpdate(r,r.state,r.context,e);if(s&&typeof s.then=="function")s.then(()=>pr(o,!1),i=>{pr(o,!0),r.context?.plugins?.length&&Et("error",r,{hook:"onBeforeUpdate",error:i})||console.error("[DOMQL] onBeforeUpdate error:",i)});else if(pr(o,!1),s===!1)return r}catch(s){throw pr(o,!0),s}let n=!t||Object.keys(t).length===0;if(Pc(()=>{if(t.state&&mt(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!o.__exec.text&&r.node&&Wn(r,t.text??"")),t.html!==void 0&&(r.html=t.html,!o.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!o.__exec.style)for(let s in t.style){let i=t.style[s];if(i==null)continue;let a=s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=String(i).replace(/\s*!important\s*$/,"");r.node.style.setProperty(a,c,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let s in t.attr){let i=t.attr[s];i==null||i===!1&&!dr(s)?r.node.removeAttribute(s):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(s,Xe(s,i))}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let s in t.data)r.node.dataset[s]=t.data[s];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let s in t){if(jt.has(s)||s==="state")continue;let i=t[s],a=r[s];if(a&&a.__ref&&typeof a.update=="function")a.update(i,e);else if(typeof i=="object"&&i!==null){let c=s.charCodeAt(0);c>=65&&c<=90&&ae(i,r,s,e)}else s!=="text"&&s!=="html"&&s!=="style"&&s!=="attr"&&s!=="data"&&(r[s]=i)}}),r.node&&n&&o.__effects&&o.__effects.length)for(let s=0;s<o.__effects.length;s++){let i=o.__effects[s];i&&!i._disposed&&!i._isSubscribeToEffect&&typeof i._execute=="function"&&i._execute()}else if(r.node&&o.__conditionalRunners)for(let s of o.__conditionalRunners)s();return Et("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function Vr(t){if(!t)return;let e=t.__ref;if(!e)return;e.__disposed=!0;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(o){console.error("[smbls] onBeforeRemove error:",o)}if(e.__effects){for(let o=0;o<e.__effects.length;o++)e.__effects[o].dispose();e.__effects.length=0}if(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 n=0;n<o.length;n++){let s=t[o[n]];s&&s.__ref&&Vr(s)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let r=t.state?.$destroy||t.state?.destroy;if(typeof r=="function"&&t.state.__element===t&&r.call(t.state),t.parent?.__ref?.__children){let o=t.parent.__ref.__children.indexOf(t.key);o!==-1&&t.parent.__ref.__children.splice(o,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(o){console.error("[smbls] onRemove error:",o)}t.node=null,t.parent=null,t.__ref=null}function qn(){Vr(this)}R();R();R();var VT=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],zT=["none","forwards","backwards","both"],HT=["normal","reverse","alternate","alternate-reverse"],WT=["running","paused"],qT=t=>/^[\d.]+m?s$/.test(t),KT=/^(?: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*\))$/,GT=t=>{let e=String(t).trim().toLowerCase();if(e===""||e==="none"||e==="initial"||e==="unset")return!0;let r=e.match(/[a-z0-9]+\([^()]*\)/g);return!r||r.join("").replace(/\s+/g,"")!==e.replace(/\s+/g,"")?!1:r.every(o=>KT.test(o.replace(/\s+/g,"")))},bw=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),YT={transform:GT,translate:bw,rotate:t=>bw(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},XT=t=>{let e=String(t).trim().toLowerCase();if(e==="from")return 0;if(e==="to")return 100;let r=e.match(/^(\d+(?:\.\d+)?)%$/);return r?Number(r[1]):null},ZT=t=>{if(!S(t))return null;let e=null,r=-1;for(let o in t){let n=XT(o);n==null||!S(t[o])||n>=r&&(r=n,e=t[o])}return e},JT=t=>{let e=ZT(t);if(!e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let o of r){let n=YT[o];if(!n)return!1;let s=e[o];if(s==null||typeof s=="object"||typeof s=="function"||!n(s))return!1}return!0},QT=(t,e)=>{if(S(t))return t;let{animation:r}=e.context&&e.context.designSystem||{},o=r&&r[t];return S(o)?o:null},t1=["reverse","alternate","alternate-reverse"],_w=(t,e,r)=>{let o=r||e.animationDirection;return o&&t1.includes(String(o))?"both":JT(QT(t,e))?"backwards":"both"},e1=0,xw=new Map,fm=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(S(t)){let n=JSON.stringify(t),s=xw.get(n);if(s)return s;let i=`smbls-anim-${e1++}`,a=Mn(i,t);return xw.set(n,a),a}let o=r&&r[t];return S(o)?Mn(t,o):t},r1=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},o=t.split(/\s+/),n=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of o)r&&r[u]?n=u:qT(u)?s.push(u):VT.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):HT.includes(u)?c=u:zT.includes(u)?l=u:WT.includes(u)?f=u:n||(n=u);return{name:n,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},um={animation:(t,e)=>{if(t!=null){if(w(t)&&t.includes(" ")){let r=r1(t,e);return{animationName:fm(r.name||t,e),animationDuration:r.durations[0]||ie(e.animationDuration||"A").timing,animationDelay:r.durations[1]||ie(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||xe(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||_w(r.name||t,e,r.direction),animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:fm(t,e),animationDuration:ie(e.animationDuration||"A").timing,animationDelay:ie(e.animationDelay||"0s").timing,animationTimingFunction:xe(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||_w(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:fm(t,e)}),animationDuration:t=>({animationDuration:ie(t).timing}),animationDelay:t=>({animationDelay:ie(t).timing}),animationTimingFunction:t=>({animationTimingFunction:xe(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};R();var dm={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>L("height",t,e),width:(t,e)=>L("width",t,e),boxSizing:t=>At(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...bt("height",e),...bt("width",r||e)}},inlineSize:(t,e)=>L("inlineSize",t,e),blockSize:(t,e)=>L("blockSize",t,e),minWidth:(t,e)=>L("minWidth",t,e),maxWidth:(t,e)=>L("maxWidth",t,e),widthRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...bt("minWidth",e),...bt("maxWidth",r||e)}},minHeight:(t,e)=>L("minHeight",t,e),maxHeight:(t,e)=>L("maxHeight",t,e),heightRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...bt("minHeight",e),...bt("maxHeight",r||e)}},size:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...L("inlineSize",e),...L("blockSize",r||e)}},minBlockSize:(t,e)=>L("minBlockSize",t,e),minInlineSize:(t,e)=>L("minInlineSize",t,e),maxBlockSize:(t,e)=>L("maxBlockSize",t,e),maxInlineSize:(t,e)=>L("maxInlineSize",t,e),minSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...bt("minInlineSize",e),...bt("minBlockSize",r||e)}},maxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...bt("maxInlineSize",e),...bt("maxBlockSize",r||e)}},borderWidth:(t,e)=>L("borderWidth",t,e),borderTopWidth:(t,e)=>L("borderTopWidth",t,e),borderRightWidth:(t,e)=>L("borderRightWidth",t,e),borderBottomWidth:(t,e)=>L("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>L("borderLeftWidth",t,e),textDecorationThickness:(t,e)=>L("textDecorationThickness",t,e),textUnderlineOffset:(t,e)=>L("textUnderlineOffset",t,e),padding:(t,e)=>L("padding",t,e),scrollPadding:(t,e)=>L("scrollPadding",t,e),paddingInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...bt("paddingInlineStart",e),...bt("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...bt("paddingBlockStart",e),...bt("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>L("paddingBlockStart",t,e),paddingBottom:(t,e)=>L("paddingBlockEnd",t,e),paddingLeft:(t,e)=>L("paddingInlineStart",t,e),paddingRight:(t,e)=>L("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>L("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>L("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>L("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>L("paddingInlineEnd",t,e),margin:(t,e)=>L("margin",t,e),marginInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...bt("marginInlineStart",e),...bt("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!w(e.marginBlock))return;let[r,o]=e.marginBlock.split(" ");return{...bt("marginBlockStart",r),...bt("marginBlockEnd",o||r)}},marginTop:(t,e)=>L("marginBlockStart",t,e),marginBottom:(t,e)=>L("marginBlockEnd",t,e),marginLeft:(t,e)=>L("marginInlineStart",t,e),marginRight:(t,e)=>L("marginInlineEnd",t,e),marginInlineStart:(t,e)=>L("marginInlineStart",t,e),marginInlineEnd:(t,e)=>L("marginInlineEnd",t,e),marginBlockStart:(t,e)=>L("marginBlockStart",t,e),marginBlockEnd:(t,e)=>L("marginBlockEnd",t,e),gap:t=>({gap:hf(t)}),columnGap:(t,e)=>Oe(e,"columnGap",t),rowGap:(t,e)=>Oe(e,"rowGap",t),flexWrap:t=>{if(t!=null)return{display:"flex",flexWrap:t}},flexFlow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},flexAlign:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>ur(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>ur(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>ur(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>ur(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>ur(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>ur(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var pm={fontSize:t=>wa(t)||t,fontFamily:t=>({fontFamily:_a(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 hm={overflow:t=>({overflow:t}),cursor:(t,e,r,o)=>{if(!t)return;let n=o.assets&&o.assets[t];if(n&&n.content)t=`url(${n.content.src})`;else{let s=o.files&&o.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 gm={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>wt(r,"k").k).join(" ")}},left:t=>wt(t,"left"),top:t=>wt(t,"top"),right:t=>wt(t,"right"),bottom:t=>wt(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>wt(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>wt(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};R();var Rf=0,mm=()=>{Rf++},ym=()=>{Rf>0&&Rf--},ce=({context:t,state:e})=>{let r=t?.designSystem,o=e?.root?.globalTheme||r?.globalTheme;return o&&o!=="auto"?o:Rf>0?null:r&&r.resolvedTheme||null},Jt=(t,e)=>{if(e==null||e==="")return;if(!S(e))return{[t]:e};let r={},o=!1;for(let n in e){let s=e[n];if(!(s==null||s==="")){if(S(s)){let i=Jt(t,s);i&&(r[n]=i,o=!0);continue}r[n]={[t]:s},o=!0}}return o?r:void 0},bm={theme:(t,e)=>{if(t)return e.themeModifier?_e(t,`@${e.themeModifier}`):_e(t)},color:(t,e)=>{let r=ce(e);if(t)return Jt("color",Rt(t,r))},background:(t,e)=>{let r=ce(e);if(t)return w(t)&&t.includes("gradient")&&t.includes("(")?{background:Ta(t,r)}:Jt("background",Rt(t,r))},backgroundColor:(t,e)=>{let r=ce(e);if(t)return Jt("backgroundColor",Rt(t,r))},backgroundImage:(t,e,r,o)=>{let n=ce(e);if(!t)return;let s=o.assets&&o.assets[t];if(s&&s.content)t=s.content.src;else{let i=o.files&&o.files[t];i&&i.content&&(t=i.content.src)}return Jt("backgroundImage",pf(t,n))},textStroke:t=>{let e=uf(t);if(e!=null)return{WebkitTextStroke:e}},outline:t=>({outline:Ye(t)}),outlineWidth:(t,e)=>L("outlineWidth",t,e),outlineColor:(t,e)=>{let r=ce(e);if(t)return Jt("outlineColor",Rt(t,r))},outlineOffset:(t,e)=>L("outlineOffset",t,e),border:t=>({border:Ye(t)}),borderColor:(t,e)=>{let r=ce(e);if(t)return Jt("borderColor",Rt(t,r))},borderTopColor:(t,e)=>{let r=ce(e);if(t)return Jt("borderTopColor",Rt(t,r))},borderBottomColor:(t,e)=>{let r=ce(e);if(t)return Jt("borderBottomColor",Rt(t,r))},borderLeftColor:(t,e)=>{let r=ce(e);if(t)return Jt("borderLeftColor",Rt(t,r))},borderRightColor:(t,e)=>{let r=ce(e);if(t)return Jt("borderRightColor",Rt(t,r))},borderLeft:t=>({borderLeft:Ye(t)}),borderTop:t=>({borderTop:Ye(t)}),borderRight:t=>({borderRight:Ye(t)}),borderBottom:t=>({borderBottom:Ye(t)}),shadow:(t,e)=>{let r=ce(e);if(t)return Jt("boxShadow",df(t,r))},boxShadow:(t,e)=>{if(!w(t))return;let[r,o]=t.split("!importan"),n=ce(e),s=o?" !important":"",i=Aa(r.trim(),n);return w(i)?{boxShadow:i+s}:Jt("boxShadow",i)},textShadow:(t,{context:e})=>Jt("textShadow",Aa(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:Ye(t)})};var $a={transition:t=>{let e=mf(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:Oa(t)}),transitionDelay:t=>({transitionDelay:Oa(t)}),transitionTimingFunction:t=>({transitionTimingFunction:xe(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};R();var _m={flow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},wrap:(t,e)=>{if(t!=null)return{display:"flex",flexWrap:t}},align:(t,e)=>{if(!w(t))return;let[r,o]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:o}}};R();var o1=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,ww=t=>{if(!w(t))return t;let e=C().sizes;return e?t.replace(o1,(r,o,n)=>{let s=e[n];return s==null?r:o+String(s)}):t},Ze=t=>ww(gf(t)),xm={gridTemplateColumns:t=>({gridTemplateColumns:Ze(t)}),gridTemplateRows:t=>({gridTemplateRows:Ze(t)}),gridAutoColumns:t=>({gridAutoColumns:Ze(t)}),gridAutoRows:t=>({gridAutoRows:Ze(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:Ze(t)}),templateColumns:t=>({gridTemplateColumns:Ze(t)}),autoColumns:t=>({gridAutoColumns:Ze(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:Ze(t)}),templateRows:t=>({gridTemplateRows:Ze(t)}),autoRows:t=>({gridAutoRows:Ze(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var _t={...um,...dm,...pm,...hm,...gm,...bm,...$a,..._m,...xm};var kt=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","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","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","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);R();var n1=/^-?[A-Z][0-9]?$/,s1=/^[a-z][0-9]?$/,Sw=/var\(\s*(--[A-Za-z0-9-]+)/g,i1=t=>{let e=new Set,r=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:r};for(let o in t){let n=t[o];if(!(!n||typeof n!="object")){if(n.sequence&&typeof n.sequence=="object")for(let s in n.sequence)e.add(s);if(n.vars&&typeof n.vars=="object")for(let s in n.vars)r.add(s)}}return{knownLetters:e,knownVars:r}},a1=(t,e)=>{if(!e.size)return[];let r=t.split(/[(),\s]+/).filter(Boolean),o=new Set;for(let n of r){if(!n1.test(n))continue;let s=n.charCodeAt(0)===45?n.slice(1):n;e.has(s)&&o.add(n)}return[...o]},c1=(t,e)=>{if(!e.size)return[];let r=[];Sw.lastIndex=0;let o;for(;o=Sw.exec(t);){let n=o[1];if(e.has(n))continue;let s=n.lastIndexOf("-");if(s===-1)continue;let i=n.slice(s+1);if(!s1.test(i))continue;let a=n.slice(0,s+1)+i.toUpperCase();a!==n&&e.has(a)&&r.push({varName:n,corrected:a})}return r},Pf=new Set,kw=(t,e,r)=>{if(!It()||!w(e)||!e)return;let o;try{o=C()}catch{return}let{knownLetters:n,knownVars:s}=i1(o);if(!n.size&&!s.size)return;let i=a1(e,n),a=c1(e,s);if(!i.length&&!a.length)return;let c=r?.__ref?.path?r.__ref.path.join("."):r?.key||"?";for(let l of i){let f=`${c}::${t}::bare::${l}::${e}`;Pf.has(f)||(Pf.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}`;Pf.has(u)||(Pf.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}"`))}};R();var l1=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,f1=(t,e,r)=>{let{context:o}=r;if(!o.designSystem?.media)return;let n=t.slice(1),s=o.designSystem.media[n],i=le(e,r);if(!s)return{[t]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(l1),c=a?a[1]||a[2]:n,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=o.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},vw=(t,e,r)=>({[t]:le(e,r)}),La=(t,e,r)=>{let o=`&${t}`,n=le(e,r);if(t.includes(",")&&n){let s={},i={};for(let a in n)typeof n[a]=="object"&&n[a]!==null?i[a]=n[a]:s[a]=n[a];if(Object.keys(i).length){let a=o.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[o]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[o]:n}},wm=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},u1=(t,e,r)=>{let o=t.slice(1),n=wm(o,r);if(n===void 0&&(n=!!r[o]),!!n)return le(e,r)},d1=(t,e,r)=>({[t]:e}),p1=(t,e,r)=>{let o=t.slice(1),n=r[o]===!0||r.state?.[o];if(!n)if(typeof r[o]=="function")try{n=r[o](r,r.state,r.context)}catch{}else{let s=wm(o,r);s!==void 0&&(n=s)}if(n)return le(e,r)},h1=(t,e,r)=>{let o=t.slice(1),n=r[o]===!0||r.state?.[o];if(!n)if(typeof r[o]=="function")try{n=r[o](r,r.state,r.context)}catch{}else{let s=wm(o,r);s!==void 0&&(n=s)}if(!n)return le(e,r)},Sm=(t,e)=>le(t,e),km={"@":f1,":":La,"[":La,"*":La,"+":La,"~":La,"&":vw,">":vw,$:u1,"-":d1,".":p1,"!":h1};var If=kr(),Cw=(t,e,r)=>{let o=e?.context?.designSystem;o&&it(o);try{let n={},s={},i=(a,c)=>{if(r.unpack){n={...n,...c};return}n[a]=c};for(let a in t){let c=t[a];if(c!==null)if(a==="class"&&e.call("isString",t.class)){let l=c.split(" ");if(l.length){let f=e.context.designSystem.class,u=l.reduce((d,h)=>ht(d,f[h]),{});n.designSystemClass=u}}else if(a==="true"){let l=ft(c,e);ht(n,Sm(l,e))}else if(e.classlist[a]){let l=e.classlist[a],f=A(l)?l(e,e.state,e.context):l;f&&i(a,f),!If&&S(n[a])&&(n[a].label=a)}else if(_t[a]){let l=ft(c,e);if(l===null)continue;T(l)&&(l=l.reduce((u,d)=>ht(u,d),{}));let f=_t[a](l,e,e.state,e.context);T(f)&&(f=f.reduce((u,d)=>ht(u,d),{})),f&&i(a,f),!If&&S(n[a])&&(n[a].label=a)}else if(kt.has(a)){let l=ft(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),If||kw(a,l,e),i(a,{[a]:l}),!If&&S(n[a])&&(n[a].label=a)}else s[a]=c}return[n,s]}finally{o&&et()}},Ew=(t,e)=>{let r={};for(let o in t){let n=km[o.slice(0,1)];if(n){let s=n(o,t[o],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?qt(r[i],s[i]):r[i]=s[i])}}return r},le=(t,e,r={unpack:!0})=>{let[o,n]=Cw(t,e,r),s=Ew(n,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return qs(o,s);o._selectors=s}return o},g1=(t,e)=>{let r={};if(t.class)for(let o in t.class)r[o]=t.class[o](e);return r};R();var Aw=t=>{if(S(t))return le(t,t)},m1=(t,e)=>{let r=Aw(t);return typeof e=="function"?e(r):we(r)};R();function Cm(t,e,r){let o=t?.context?.analyze;if(!o||!o.emit||e==="warn"&&!o.shouldCapture("warnings")||e==="error"&&!o.shouldCapture("errors"))return;let n=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");o.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:n||null,args:r})}var Tw=new Set;function y1(t,e,r){let o=String(e);if(Tw.has(o))return;Tw.add(o);let n=t?.__ref?.path,s=Array.isArray(n)&&n.length?n.join("."):t?.key!=null?String(t.key):"(unknown element)",i=r!=null?`resolves to a non-function (${typeof r}) \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('${o}') at <${s}>: "${o}" ${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.`;Cm(t,"error",[a]),console.error(a)}function b1(...t){return Cm(this,"warn",t),Pi.apply(this,t)}function _1(...t){return Cm(this,"error",t),po.apply(this,t)}var Ow={update:Hn,remove:qn,getDB:Li,getQuery:Mi,getRootData:Ti,getChildren:ki,getPath:vi,nextElement:Ii,previousElement:Di,verbose:ln,warn:b1,error:_1,variables:$i,spotByPath:Si,set(t,e){let r=this.__ref;if(r){if(r.__setLocked){r.__setQueued={content:t,options:e};return}r.__setLocked=!0}try{if(this.removeContent(),t!=null){let o=this.context?.__create;o&&o(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let o=r.__setQueued;o&&(r.__setQueued=null,this.set(o.content,o.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,o=this.key,n=this.parse();return this.remove(),e(n,r,o,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 r of e.__children){let o=this[r];if(!o)continue;if(typeof t=="function"){if(t(o))return o}else if(typeof t=="string"&&o.key===t)return o;let n=o.lookdown?.(t);if(n)return n}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let o of r.__children){let n=this[o];n&&(typeof t=="function"?t(n)&&e.push(n):typeof t=="string"&&n.key===t&&e.push(n),n.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:Ai,getRootState:Ei,getRootContext:Oi,getContext:Ri,parse(t){let e={},r=t?new Set(t):null,o=this.__ref?.__exec;for(let n in this)if(!(n==="parent"||n==="node"||n==="__ref")&&!r?.has(n)){if(o&&o[n]!==void 0){e[n]=o[n];continue}typeof this[n]!="function"&&(e[n]=this[n])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let o of r.__children)this[o]?.parseDeep&&(e[o]=this[o].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];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 r=t[e];if(r==null)continue;let o=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),n=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(o,n,"important")}},call(t,...e){let r=this.context,o=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof o=="function")return o.call(this,...e);It()&&y1(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 r=t.__children.indexOf("content");r!==-1&&t.__children.splice(r,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},vm=new WeakMap;function x1(t){if(!t)return Ow;let e=vm.get(t);if(e)return e;e=Object.create(Ow);let r=t.methods;if(r)for(let o in r)e[o]=r[o];return vm.set(t,e),e}function Kn(t){let e=x1(t.context);Object.setPrototypeOf(t,e)}function Df(t){if(!t)return!1;let e=vm.get(t);if(!e)return!1;let r=t.methods;if(!r)return!1;for(let o in r)e[o]=r[o];return!0}var $f=[],Lf=!1,zr=0;function Mf(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function Rw(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 r=new MessageChannel;r.port1.onmessage=()=>{r.port1.close(),t()},r.port2.postMessage(0);return}setTimeout(t,0)}function Em(){return zr?Mf()-zr>=50:!1}var Gn=0;function Am(){Gn===0&&!zr&&(zr=Mf()),Gn++}function Tm(){Gn>0&&Gn--,Gn===0&&!Lf&&(zr=0)}function Om(t){$f.push(t),Lf||(Lf=!0,Rw(Pw))}function Pw(){for(zr=Mf();$f.length;){let t=$f.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(Mf()-zr>=50)break}if($f.length){Rw(Pw);return}Lf=!1,zr=0,Gn=0}R();rn();var $m={};P($m,{STATE_METHODS:()=>Iw,applyInitialState:()=>Nf,applyStateMethods:()=>fe,callStateMethod:()=>Ma,createState:()=>Pm,isTracking:()=>Dm,useHostState:()=>Im});var Iw=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,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Ie=(t,e,r,{onlyIfAbsent:o}={})=>{Ff(t,"$"+e,r),!(o&&Object.prototype.hasOwnProperty.call(t,e))&&Ff(t,e,r)},Ma=(t,e,...r)=>{if(!t)return;let o=t["$"+e];if(typeof o=="function")return o.apply(t,r);let n=t[e];if(typeof n=="function")return n.apply(t,r)},fe=(t,e)=>{if(mt(e)){let n=e.__raw||e;Ie(n,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Ie(n,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Ie(n,"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}),Ie(n,"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}),Ie(n,"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}),Ie(n,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Ie(n,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Ie(n,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Ie(n,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&mt(a.parent);)a=a.parent;return Ma(a,"update",s,i)}),Ie(n,"parentUpdate",function(s,i={}){if(e.parent)return Ma(e.parent,"update",s,i)}),Ie(n,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(n,"root")||Object.defineProperty(n,"root",{get:function(){let s=e,i=mt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,mt(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]},o={update(n){if(!n||typeof n!="object")return e;for(let s in n)e[s]=n[s];return e},apply(n){if(typeof n!="function")return e;let s=n(e);return s?e.$update(s):e},parse(){return{...e}},toggle(n){return e[n]=!e[n],e},set(n){if(!n||typeof n!="object")return e;r();for(let s in n)e[s]=n[s];return e},replace(n){return e.$set(n)},clean(){return r(),e}};for(let n in o)if(Ff(e,"$"+n,o[n]),typeof e[n]!="function"){if(Object.prototype.hasOwnProperty.call(e,n)){$c(n,"");continue}Ff(e,n,o[n])}};var Pm=function(t,e,r){return t.state=Nf(t,e,r),t.state},Nf=function(t,e,r){let{__ref:o}=t,n=t.state;if(n==null||n===!1){let s=e?.state||{};return fe(t,s),s}if(typeof n=="string")return o&&(o.__state=n),o.__stateType="string",w1(n,t,e);if(typeof n=="number"||typeof n=="boolean"){o&&(o.__state=n,o.__stateType=typeof n,o.__hasRootState=!0);let s=tr({value:n});return s.__element=t,e?.state&&(s.parent=e.state),fe(t,s),s}if(typeof n=="function"&&(n=n(t,e?.state)||{}),typeof n=="object"&&!mt(n)){o&&(o.__hasRootState=!0),n.isRootState&&o&&(o.__hasRootState=!0);let s=tr({...n});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)),fe(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return mt(n)?(n.__element=t,n):e?.state||{}};function Rm(t,e){if(!e)return t;let r=e.split("/"),o=t;for(let n of r){if(o==null)return{};o=o[n]}return o??{}}function w1(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let n=t.slice(3),s=r.state?.parent;return n&&s?Rm(s,n):s??r.state??{}}if(t.startsWith("~/")){let n=r.state;for(;n?.parent;)n=n.parent;let s=t.slice(2);return s?Rm(n,s):n??{}}let o=Rm(r.state,t);if(o&&typeof o=="object"&&!mt(o)&&!Object.getOwnPropertyDescriptor(o,"root")){let n=r.state?.root||r.state;Object.defineProperty(o,"root",{get:()=>n,enumerable:!1,configurable:!0})}return o}var Im=(t,e)=>{if(!t)return $w;let r=k1(t,e);return!r||!r.state?$w:C1(r.state)},Dm=()=>Ic()!=null,S1=128;function k1(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,o=t,n=null;for(let s=0;s<S1&&o;s++){if(r(o)&&o.state)return o;if(o.state&&!n&&(n=o),!o.parent||o.parent===o)break;o=o.parent}return n}var v1={get(t,e){return t[e]}},Dw=new WeakMap,C1=t=>{let e=Dw.get(t);return e||(e=new Proxy(t,v1),Dw.set(t,e)),e},$w=new Proxy(Object.create(null),{get(){},has(){return!1}});var jf="3.14.782";var Lw="__SMBLS_ELEMENT_ID_ENGINE__",Mw=(t,e,r)=>{let o=e||jf,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[Lw];return s&&s.engine&&s.version===o?s.engine:(s||(n[Lw]={version:o,engine:t}),t)};var Hw=Mw({uniqId:1,scopedStyleId:0},jf),Na=[],Nm=!1;function Fw(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function E1(){return typeof document<"u"&&document.visibilityState==="hidden"}var A1=250;function Ww(){if(!Nm){if(Nm=!0,typeof requestAnimationFrame!="function"){setTimeout(Ba,0);return}E1()?setTimeout(Ba,A1):requestAnimationFrame(Ba)}}var T1=300,O1=15e4;function Ba(){if(Nm=!1,!Na.length)return;let t=Na.splice(0,Na.length);for(let e=0;e<t.length;e++){let r=t[e];if(r.node){if(!r.node.isConnected){let o=r.__ref||(r.__ref={});o.__mountAttempts=(o.__mountAttempts||0)+1,o.__mountFirstAttemptAt==null&&(o.__mountFirstAttemptAt=Fw());let n=Fw()-o.__mountFirstAttemptAt;o.__mountAttempts<=T1&&n<O1?(Na.push(r),Ww()):console.warn("[DOMQL] onMounted dropped after",o.__mountAttempts,"attempts /",n,"ms \u2014 node never connected:",r.key||r.tag||r);continue}Qt("Mounted",r,r.__ref?.__mountOptions||{})}}}function jm(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,Na.push(t),Ww())}function Nw(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&Et("contentUpdate",t,e);let r=t.context?.designSystem;r&&it(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(o){if(t.context?.plugins?.length&&Et("error",t,{hook:"onContentUpdate",error:o})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',o),t.context?.strictMode)throw o}finally{r&&et()}}function Xn(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function R1(t){return t.charAt(2).toLowerCase()+t.slice(3)}function P1(t){return t.toLowerCase()}function Bm(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function ja(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=ja(n,s):r[o]=s}return r}function ae(t,e,r,o={},n){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${Hw.uniqId++}`,s.parent=e||null,s.context=t.context||e?.context||o.context||{},s.context.__create||(s.context.__create=ae);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key],origin:t};if(r&&!t.extends&&!t.extend){let p=r.indexOf("_"),m=r.indexOf("."),b=p>0?p:-1;if(m>0&&(b<0||m<b)&&(b=m),b>0){let _=r.substring(0,b),y=s.context?.components;y&&(y[_]||y["smbls."+_])?t={...t,extends:_}:y&&It()&&(/^[A-Z]\w*_\d+$/.test(r)||/^[A-Z]\w*\.\w+$/.test(r))&&console.warn(`[smbls] auto-extend: key "${r}" 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.`)}}zn(s,t,o);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let p in t){if(p==="parent"||p==="node"||p==="__ref"||p==="extends"||p==="context"||p==="props")continue;let m=t[p],b=s[p],_=b&&m&&typeof b=="object"&&typeof m=="object"&&!Array.isArray(b)&&!Array.isArray(m)&&typeof b!="function"&&typeof m!="function";_&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?s[p]=ja(b,m):_&&a.has(p)?s[p]={...b,...m}:_&&Bm(p)?s[p]=ja(b,m):s[p]=m}function l(p){for(let m in p){let b=p[m],_=s[m],y=_&&b&&typeof _=="object"&&typeof b=="object"&&!Array.isArray(_)&&!Array.isArray(b)&&typeof _!="function"&&typeof b!="function";y&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=ja(_,b):y&&a.has(m)?s[m]={..._,...b}:y&&Bm(m)?s[m]=ja(_,b):s[m]=b}}c&&l(c),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,d=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,h=u||d||null;if(t.scope!==void 0||f){let p={};f&&Object.assign(p,f),t.scope!==void 0&&Object.assign(p,t.scope),s.scope=Dc(p,h)}else h&&(s.scope=h);if(t.if!==void 0&&(s.if=t.if),Kn(s),I1(s,e,t),s.if!=null){let p;if(typeof s.if=="function")try{p=s.if(s,s.state,s.context)}catch(m){if(p=!1,i.__ifError=m,typeof console<"u"&&console.warn){let b=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${b} \u2014 treating as false:`,m?.message||m)}}else p=s.if;i.__if=!!p}if(i.__if)typeof s.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof s.if=="function"&&Gw(s,i,s.if),s;s.tag||(s.tag=Mr(s)),Qt("Init",s,o);let g=s.node=Fr(s);if(!g)return s;if(s.tag==="fragment"){let m=(s.context?.document||globalThis.document).createComment("");g.appendChild(m),i.__fragmentAnchor=m}Qt("AttachNode",s,o),g.setAttribute&&s.key&&g.setAttribute("data-key",s.key),e&&(e[s.key]=s,e.__ref?.__children&&(e.__ref.__children.includes(s.key)||e.__ref.__children.push(s.key))),g.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&g.setAttribute("data-smbls-app",s.context.key),s.id&&g.setAttribute&&(g.id=s.id),Jw(s,o),Kw(s),Um(s),Xw(s),K1(s);try{Qw(s,o)}catch(p){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,p?.message||p,p?.stack?`
53
53
  `+p.stack.split(`
54
54
  `).slice(0,6).join(`
55
- `):"")}}if(Rm(s,!0),zw(s,e,n),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let p=s.context?.designSystem;p&&it(p);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{p&&tt()}}if(fr("Create",s,o),fr("Complete",s,o),fr("Render",s,o),fr("RenderRouter",s,o),$w(s,o),typeof s.onFrame=="function"){let p=s.onFrame,m=s.context?.designSystem,_=()=>{if(s.node){if(s.node.isConnected){m&&it(m);try{p(s,s.state,s.context)}catch(b){console.error("[DOMQL] onFrame error:",b)}finally{m&&tt()}}requestAnimationFrame(_)}};requestAnimationFrame(_)}return s}function m1(t,e,r){let o=!e,n=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=o&&n&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!yt(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,ce(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},l=t.context?.polyglot;if(l?.translations){let f=t.context,u=a.lang||l.defaultLang||"en",d=new Set,h=(m,_)=>{d.has(m)||er(f,m,c)&&(c[m]=_,d.add(m),Ue(f,m))},g=l.translations[u];if(g&&typeof g=="object")for(let m in g)h(m,g[m]);let p=new Set(l.languages||[]);for(let m in l.translations)p.has(m)||h(m,l.translations[m])}t.state=yt(c)?c:Xe(c),t.state.__element=t,t.state.root=t.state,ce(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),ce(t,t.state);return}if(typeof i=="string"){if(t.state=Lw(i,e),t.state&&typeof t.state=="object"&&!yt(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}ce(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=yt(a)?a:Xe(a||{})}else yt(i)?t.state=i:t.state=Xe({...i});t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,ce(t,t.state)}function Sm(t,e){if(!e)return t;let r=e.split("/"),o=t;for(let n of r){if(o==null)return{};o=o[n]}return o??{}}function Lw(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let n=t.slice(3);return n?Sm(e.state,n):e.state??{}}if(t.startsWith("~/")){let n=e.state?.root||e.state,s=t.slice(2);return s?Sm(n,s):n??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=Sm(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let o=e.context?.polyglot;if(o?.translations){let n=e.state?.root?.lang||o.defaultLang||"en",s=o.translations[n];if(s?.[t]!==void 0)return s[t];if(o.translations[t]!==void 0)return o.translations[t]}return{}}var y1=new Set(["s","state","ctx","context"]);function b1(t){try{let r=Function.prototype.toString.call(t).match(/^[^(]*\(([^)]*)\)/);return r?r[1].split(",").map(o=>o.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function _1(t){if(typeof t!="function"||t.length!==2)return!1;let e=b1(t);if(e.length<2)return!1;let r=e[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!y1.has(r)}function x1(t){let e=t.__ref,r=t.tag||"div",o=t.context?.designSystem,n=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||jt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Hn(a)||xt[a]||vt&&vt.has(a)||Nr(r,a)||(Pt()&&_1(t[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).`),n.push({prop:a,fn:t[a]}))}for(let i=0;i<n.length;i++){let{prop:a,fn:c}=n[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){o&&it(o);try{return c(t,t.state,t.context)}catch{return}finally{o&&tt()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function w1(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let o=e[r];try{typeof o=="function"?o(t,t.state,t.context):typeof o=="string"&&t.state?.[o]}catch{}}}function Bt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...o){return w1(t,e),r.apply(this,o)}}function Ta(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function Ct(t,e){return()=>t.path.join(".")+"::"+e}function Mw(t,e){let r=t.__ref,o=!!(e&&e.skipIfEffect);if(x1(t),typeof t.text=="function"){let s=t.text,i=Bt(t,t.textDeps,s),a=Z(()=>{if(!r.contentManaged)try{let c=i(t,t.state,t.context);t.node&&c!=null&&typeof c!="function"&&typeof c!="object"&&(typeof c=="string"&&c.includes("{{")&&(c=eo.call(t,c,t.state)),jn(t,c))}catch{}},{depth:r.path.length,label:Ct(r,"text")});r.__effects.push(a),r.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){let s=t.text,i=Z(()=>{if(r.contentManaged)return;let a=eo.call(t,s,t.state);a!=null&&(t.text=a),t.node&&jn(t,a??"")},{depth:r.path.length,label:Ct(r,"text")});r.__effects.push(i),r.__exec.text=s}for(let s of Object.keys(t))if(typeof t[s]=="function"&&!jt.has(s)&&!Hn(s)&&!r.__exec[s]){if(xt[s]){let i=t[s],a=Bt(t,t[s+"Deps"],i),c=s,l,f=Z(()=>{let u=t.context?.designSystem;u&&it(u);try{let d=a(t,t.state,t.context),h=xt[c](d,t,t.state,t.context),g=c==="show"||c==="hide";if(h&&t.node){let p=Tm(h),m=g&&t.node.style.display!=="none";(p===null||p!==l||m)&&(l=p,zn(t.node,h))}else if(t.node&&g){l=void 0;let p=r.__explicitDisplay;t.node.style.display=typeof p=="string"?p:""}}finally{u&&tt()}},{depth:r.path.length,label:Ct(r,c)});r.__effects.push(f),r.__exec[s]=i}else if(vt&&vt.has(s)){let i=t[s],a=Bt(t,t[s+"Deps"],i),c=s,l,f=Z(()=>{let u=t.context?.designSystem;u&&it(u);try{let d=a(t,t.state,t.context);if(t.node)if(d!=null){let h=c+":"+String(d);h!==l&&(l=h,zn(t.node,{[c]:d}))}else l=void 0,t.node.style[c]=""}finally{u&&tt()}},{depth:r.path.length,label:Ct(r,c)});r.__effects.push(f),r.__exec[s]=i}}if(typeof t.html=="function"){let s=t.html,i=Bt(t,t.htmlDeps,s),a=Z(()=>{let c=t.context?.designSystem;c&&it(c);try{let l=i(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&(t.node.innerHTML=l)}finally{c&&tt()}},{depth:r.path.length,label:Ct(r,"html")});r.__effects.push(a),r.__exec.html=s}if(typeof t.value=="function"){let s=t.value,i=Bt(t,t.valueDeps,s),a=Z(()=>{try{let c=i(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let l=c==null?"":String(c);if(t.node.value===l)return;let f=typeof document<"u"&&document.activeElement===t.node,u=f&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,d=f&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=l,f&&u!=null&&d!=null)try{t.node.setSelectionRange(u,d)}catch{}}catch{}},{depth:r.path.length,label:Ct(r,"value")});r.__effects.push(a),r.__exec.value=s}if(typeof t.style=="function"){let s=t.style,i=Bt(t,t.styleDeps,s),a,c=Z(()=>{let l=i(t,t.state,t.context),f=Tm(l);(f===null||f!==a)&&(a=f,zn(t.node,l))},{depth:r.path.length,label:Ct(r,"style")});r.__effects.push(c),r.__exec.style=s}else if(t.style&&typeof t.style=="object")for(let s in t.style){let i=t.style[s];if(typeof i!="function")continue;let a=Bt(t,Ta(t.styleDeps,s),i),c,l=Z(()=>{try{let f=a(t,t.state,t.context);if(t.node){let u=s+":"+String(f);u!==c&&(c=u,zn(t.node,{[s]:f}))}}catch{}},{depth:r.path.length,label:Ct(r,"style."+s)});r.__effects.push(l)}if(t.attr&&typeof t.attr=="object"){for(let s in t.attr)if(typeof t.attr[s]=="function"){let i=Bt(t,Ta(t.attrDeps,s),t.attr[s]),a=s,c=Z(()=>{try{let l=i(t,t.state,t.context);t.node?.setAttribute&&(l==null||l===!1&&!cr(a)?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,Ke(a,l)))}catch{}},{depth:r.path.length,label:Ct(r,"attr."+a)});r.__effects.push(c)}}if(t.aria&&typeof t.aria=="object")for(let s in t.aria){if(typeof t.aria[s]!="function")continue;let i=Bt(t,Ta(t.ariaDeps,s),t.aria[s]),a="aria-"+s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=Z(()=>{try{let l=i(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,Ke(a,l))}catch{}},{depth:r.path.length,label:Ct(r,"aria."+s)});r.__effects.push(c)}if(t.data&&typeof t.data=="object")for(let s in t.data){if(typeof t.data[s]!="function")continue;let i=Bt(t,Ta(t.dataDeps,s),t.data[s]),c="data-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=Z(()=>{try{let f=i(t,t.state,t.context);if(!t.node?.setAttribute)return;f==null||f===!1?t.node.removeAttribute(c):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(c,f===!0?"":f)}catch{}},{depth:r.path.length,label:Ct(r,"data."+s)});r.__effects.push(l)}let n=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(n)for(let s in n){if(typeof n[s]!="function")continue;let i=Bt(t,Ta(t.classDeps,s),n[s]),a=Z(()=>{try{let c=i(t,t.state,t.context);if(!t.node?.classList)return;typeof c=="string"?t.node.classList.add(c):c?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:r.path.length,label:Ct(r,"class."+s)});r.__effects.push(a)}!o&&typeof t.if=="function"&&Fw(t,r,t.if);for(let s of Object.keys(t)){if(jt.has(s)||typeof t[s]!="function")continue;let i=s.charCodeAt(0);if(i>=65&&i<=90||Hn(s))continue;let a=t[s];r.__exec[s]=a;let c=t.tag||"div";if(Nr(c,s)&&!xt[s]&&!(vt&&vt.has(s))){let l=Fr(s)||s,f=Bt(t,t[s+"Deps"],a),u=Z(()=>{try{let d=f(t,t.state,t.context);t.node?.setAttribute&&(d==null||d===!1&&!cr(l)?t.node.removeAttribute(l):typeof d!="function"&&typeof d!="object"&&(l==="src"&&"src"in t.node?t.node.src=d:t.node.setAttribute(l,Ke(l,d))))}catch{}},{depth:r.path.length,label:Ct(r,s)});r.__effects.push(u)}}if(v1(t),A1(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let s=t.onStateUpdate,i=t.stateDeps,a=!1,c=[],l=Z(()=>{let f=[];for(let g=0;g<i.length;g++){let p=i[g];try{f[g]=typeof p=="function"?p(t,t.state,t.context):t.state?.[p]}catch{f[g]=void 0}}if(!a){a=!0,c=f;return}let u=f.length!==c.length;for(let g=0;!u&&g<f.length;g++)f[g]!==c[g]&&(u=!0);let d=c;if(c=f,!u)return;let h=t.context?.designSystem;h&&it(h);try{s(t,t.state,t.context,{prev:d,next:f})}catch(g){if(t.context?.plugins?.length&&At("error",t,{hook:"onStateUpdate",error:g})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',g),t.context?.strictMode)throw g}finally{h&&tt()}},{depth:r.path.length,label:Ct(r,"onStateUpdate")});r.__effects.push(l)}E1(t)}function Aw(t){let e=t.parent,r=e?.node;if(!r||!t.node){zw(t,t.parent);return}let o=null,n=Object.keys(e),s=n.indexOf(t.key);for(let i=s+1;i<n.length;i++){let a=e[n[i]];if(a?.node?.parentNode===r){o=a.node;break}}o?r.insertBefore(t.node,o):r.appendChild(t.node)}function Fw(t,e,r){let o=Bt(t,t.ifDeps,r),n=Z(()=>{let s;try{s=o(t,t.state,t.context)}catch(a){if(s=!1,e.__ifError=a,typeof console<"u"&&console.warn){let c=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,a?.message||a)}return}let i=e.__if;if(e.__if=!!s,i&&!e.__if&&t.node)t.node.remove();else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=$r(t)),t.node&&(t.node.ref=t),Aw(t),Am(t);else{if(e.__ifInitialized=!0,t.tag||(t.tag=Dr(t)),fr("Init",t,{}),t.node||(t.node=$r(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 c=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(c),e.__fragmentAnchor=c}fr("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),Uw(t,{}),Mw(t,{skipIfEffect:!0}),Am(t),jw(t),Vw(t,{}),Aw(t),$w(t,{})}},{depth:e.path.length,label:Ct(e,"if")});e.__effects.push(n)}function jn(t,e){let r=t.node;if(!r)return;let o=e==null||typeof e=="object"?"":String(e);if(t.tag==="string"){r.nodeValue!==o&&(r.nodeValue=o);return}let n=t.__ref,s=n?n.__textNode:null;if(s&&s.parentNode!==r&&(s=null),!s){let i=r.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==o&&(s.nodeValue=o):r.firstChild?(s=(r.ownerDocument||t.context?.document||globalThis.document).createTextNode(o),r.insertBefore(s,r.firstChild)):(r.textContent=o,s=r.firstChild&&r.firstChild.nodeType===3?r.firstChild:null),n&&(n.__textNode=s||null)}function Am(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&jn(t,t.text),O1(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"&&zn(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let o=t.attr[r];typeof o=="function"||typeof o=="object"||o!=null&&(o===!1&&!cr(r)||e.setAttribute&&e.setAttribute(r,Ke(r,o)))}if(t.data&&typeof t.data=="object")for(let r in t.data){let o=t.data[r];typeof o=="function"||typeof o=="object"||o==null||o===!1||e.dataset&&(e.dataset[r]=o===!0?"":o)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(o=>o&&e.classList.add(o));else if(typeof r=="object")for(let o in r){let n=typeof r[o]=="function"?r[o](t,t.state,t.context):r[o];n&&e.classList.add(typeof n=="string"?n:o)}}}}function Tm(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function zn(t,e){if(!t||!e||!t.style)return;let r=null;for(let o in e){let n=e[o];if(n!=null){if(o.charAt(0)==="&"&&typeof n=="object"){r||(r={}),r[o]=n;continue}try{let s=String(n),i=o.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,c?"important":"")}catch{}}}r&&S1(t,r)}function S1(t,e){let r=`_ds${Iw.scopedStyleId++}`;t.classList.add(r);let o=t.ownerDocument,n=o.querySelector("style[data-smbls-scoped]");n||(n=o.createElement("style"),n.setAttribute("data-smbls-scoped",""),o.head.appendChild(n));let s="";for(let i in e){let a="."+r,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+=`${m.replace(/[A-Z]/g,_=>"-"+_.toLowerCase())}: ${h[m]};`;u+=Oe(`${g} { ${p} }`,g)+`
56
- `}else f+=`${d.replace(/[A-Z]/g,g=>"-"+g.toLowerCase())}: ${h};`}f&&(s+=Oe(`${c} { ${f} }`,c)+`
57
- `),u&&(s+=u)}}s&&(n.textContent+=s)}var Tw=new Set;function Ow(t){if(!Array.isArray(t))return"";let e=[];for(let r=0;r<t.length;r++)typeof t[r]=="string"&&t[r].length&&e.push(t[r]);return e.sort(),e.join("|")}function k1(t,e,r){let o=Ow(r);queueMicrotask(()=>{if(!t.__ref)return;let n;try{n=e(t,t.state,t.context)}catch{return}if(Ow(n)===o)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";Tw.has(s)||(Tw.add(s),console.warn(`[smbls] subscribeTo function at "${s}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${r.join(", ")||"(none)"}], probed [${Array.isArray(n)?n.join(", "):String(n)}]. 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 v1(t){let e=t.subscribeTo,r=typeof e=="function",o=e;if(r)try{o=e(t,t.state,t.context)}catch{o=null}if(r&&Pt()&&k1(t,e,Array.isArray(o)?o:[]),!Array.isArray(o)||o.length===0)return;let n=t.__ref;for(let s=0;s<o.length;s++){let i=o[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&&(yt(t.state)?t.state.root:null);if(!d||!yt(d))return;let h=d;h=h[c];for(let p=0;p<l.length&&!(h==null||typeof h!="object");p++)if(yt(h))h=h[l[p]];else break;if(!f.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"){let p=t.context?.designSystem;p&&it(p);try{if(tm(n)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>lr(n,!1),_=>{lr(n,!0),t.context?.plugins?.length&&At("error",t,{hook:"onBeforeUpdate",error:_})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",_)}):(lr(n,!1),m===!1&&(g=!0))}}catch(m){lr(n,!0),t.context?.plugins?.length&&At("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{p&&tt()}}if(!g&&t.node&&n.__effects)for(let p=0;p<n.__effects.length;p++){let m=n.__effects[p];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!g&&typeof t.onUpdate=="function"){let p=t.context?.designSystem;p&&it(p);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&At("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{p&&tt()}}},{depth:n.path.length,label:Ct(n,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,n.__effects.push(u)}}function Im(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}var Rw=new Set;function C1(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",o=r+"::"+t;Rw.has(o)||(Rw.add(o),console.warn(`[smbls/css] "${t}" at ${r} 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.`))}function Wn(t,e,r){let o={},n=new Set,s=(i,a,c)=>{let l=c?new Set(Object.keys(o)):null;if(xt[i]){let f=xt[i](a,e,e.state,e.context);if(f){let u=Array.isArray(f)?f:[f];for(let d of u)d&&Object.assign(o,d)}}else o[i]=a;if(c)for(let f in o)l.has(f)||n.add(f)};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=t[i];if(typeof a=="function"&&(a=a(e,e.state,e.context)),a==null||typeof a=="function")continue;if(typeof a=="object"&&!Array.isArray(a)){if(i==="style"){for(let u in a){let d=a[u];if(typeof d=="function"&&(d=d(e,e.state,e.context)),d==null||typeof d=="function")continue;let h=typeof e[u]=="function"&&(xt[u]||vt&&vt.has(u));s(u,d,h)}continue}if(Im(i,e)){let u=Wn(a,e,!1);Object.keys(u).length&&(o[`[data-theme="${i.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(i)){Pt()&&C1(i,e);continue}let l=i;if(i.charCodeAt(0)===64&&!i.startsWith("@media")&&!i.startsWith("@keyframes")){let u=e.context?.designSystem?.media?.[i.slice(1)];u&&(l=`@media ${u}`)}let f=Wn(a,e,!1);Object.keys(f).length&&(o[l]=f);continue}let c=typeof e[i]=="function"&&(xt[i]||vt&&vt.has(i));s(i,a,c)}if(r)for(let i in o)n.add(i);for(let i of n){let a=o[i];typeof a=="string"&&!a.includes("!important")&&(o[i]=a+" !important")}return o}function Dm(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 r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Dm(t[r],e+1))return!0}return!1}function Nw(t,e,r){if(!e||typeof e!="object"||Array.isArray(e))return null;if(Im(t,r)){let s=Wn(e,r,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let o=t;if(t.charAt(0)==="@"&&!t.startsWith("@media")&&!t.startsWith("@keyframes")){let s=r.context?.designSystem?.media?.[t.slice(1)];s&&(o=`@media ${s}`)}let n=Wn(e,r,!1);return Object.keys(n).length?{cssProp:o,block:n}:null}function E1(t){let e=t.__ref;for(let r of Object.keys(t)){if(!Em(r))continue;let o=t[r];if(!o||typeof o!="object"||Array.isArray(o)||!Dm(o))continue;let n=null,s,i=Z(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&it(a);let c,l=!1;try{let f=Nw(r,o,t),u=f?Tm(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=_e({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&tt()}if(!(l||!t.node.classList)){if(n)for(let f of n)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);n=c}},{depth:e.path.length,label:Ct(e,"cssBlock("+r+")")});e.__effects.push(i)}}function A1(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let o of Object.keys(t)){let n=o.charAt(0);if(n!=="."&&n!=="!")continue;let s=o.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let u=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${n}\` is read as one prop name. Nest the selector inside instead: \`${n}${u}: { '${s.slice(u.length)}': {...} }\`.`)}continue}let i=t[o];if(!i||typeof i!="object")continue;let a=n==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=()=>{let u,d=t[s];if(d===void 0){let p=!!t.state&&s in t.state,m=t.state?t.state[s]:void 0;if(p||m!==void 0)u=m;else{let _=t.context?.cases?.[s];if(_===void 0)return;try{u=typeof _=="function"?_.call(t,t):_}catch(b){u=!1,e.__conditionalError=b,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,b?.message||b)}}}else if(typeof d=="function")try{u=d(t,t.state,t.context)}catch(p){u=!1,e.__conditionalError=p,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,p?.message||p)}else u=d;let h=a?!u:!!u;if(!t.node||h===c.lastMatch)return;c.lastMatch=h;let g=t.context?.designSystem;g&&it(g);try{if(h){let p={},m={},_=!1;for(let y in i){if(!Object.prototype.hasOwnProperty.call(i,y))continue;let x=i[y],k=y.charAt(0);if((k===":"||k==="@"||k==="&")&&x&&typeof x=="object"&&!Array.isArray(x)){if(Im(y,t)){let O=Wn(x,t,!1);Object.keys(O).length&&(m[`[data-theme="${y.slice(1)}"] &`]=O,_=!0)}else{let O=y;if(k==="@"&&!y.startsWith("@media")&&!y.startsWith("@keyframes")){let D=t.context?.designSystem?.media?.[y.slice(1)];D&&(O=`@media ${D}`)}let $=Wn(x,t,!1);Object.keys($).length&&(m[O]=$,_=!0)}continue}let E=typeof x=="function"?x(t,t.state,t.context):x;if(E!=null)if(xt[y]){let O=xt[y](E,t,t.state,t.context);if(O){let $=Array.isArray(O)?O:[O];for(let D of $)D&&Object.assign(p,D)}}else vt&&vt.has(y)&&(p[y]=E)}let b=Object.keys(p);if(b.length){zn(t.node,p);for(let y of b)r.set(y,o);c.appliedKeys=b}else c.appliedKeys=null;if(_){let y=_e(m,null,t.context?.cssPrefix),x=y?y.split(" ").filter(Boolean):[];if(x.length&&t.node.classList){for(let k of x)t.node.classList.add(k);c.appliedClasses=x}else c.appliedClasses=null}else if(c.appliedClasses){for(let y of c.appliedClasses)t.node.classList.remove(y);c.appliedClasses=null}}else{if(c.appliedKeys){for(let p of c.appliedKeys)r.get(p)===o&&(t.node.style[p]="",r.delete(p));c.appliedKeys=null}if(c.appliedClasses){for(let p of c.appliedClasses)t.node.classList.remove(p);c.appliedClasses=null}}}finally{g&&tt()}};e.__conditionalRunners.push(l);let f=Z(l,{depth:e.path.length,label:Ct(e,"conditional("+o+")")});e.__effects.push(f)}}var km=new WeakSet;function T1(t){let e=t.ownerDocument;!e||km.has(e)||(km.add(e),queueMicrotask(()=>{km.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var vm=new WeakSet,Pw=!1;function O1(t){let{node:e}=t;if(!e)return;if(Pw||(Pw=!0,_e({display:"none"})),vm.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}vm.add(t);let r=t.context?.designSystem;r&&it(r),am();try{let o={},n=!1;if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&xt.theme){let s=xt.theme(t.theme,t,t.state,t.context);if(s){if(Array.isArray(s))for(let i of s)i&&Object.assign(o,i);else Object.assign(o,s);n=!0}}for(let s of Object.keys(t)){if(typeof t[s]=="function"||jt.has(s)||s==="theme")continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!Hn(s)){if(xt[s]){let a=t[s],c=xt[s](a,t,t.state,t.context);if(c){if(Array.isArray(c))for(let l of c)l&&Object.assign(o,l);else Object.assign(o,c);n=!0}}else if(vt&&vt.has(s)){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charCodeAt(0)===45){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charAt(0)==="&"||s.charAt(0)==="@"||s.charAt(0)===":"){let a=t[s];if(a&&typeof a=="object"&&!Array.isArray(a)){if(Dm(a))continue;let c=Nw(s,a,t);c&&(o[c.cssProp]=c.block,n=!0)}}}}if(n){o.display&&String(o.display).includes("!important")&&(e.style.setProperty("display",String(o.display).replace(/\s*!important\s*$/,""),"important"),delete o.display);let s=_e(o,null,t.context?.cssPrefix);if(s&&e.classList){let a=s.split(" ").filter(Boolean),c=!1;for(let l of a)e.classList.add(l),c||(l.charCodeAt(0)===95&&l.charCodeAt(1)===99||l.charCodeAt(0)===95&&l.indexOf("_c",1)!==-1)&&(c=!0);c&&T1(e)}let i=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(i!=null){let a=o.display;if(a&&a!==i)if(i==="none"){let c=[];for(let l of e.classList)l.startsWith("_d-")&&l!=="_d-none"&&c.push(l);for(let l of c)e.classList.remove(l);e.classList.add("_d-none")}else e.style.display==="none"&&(typeof t.hide=="function"||typeof t.show=="function")||(e.style.display=t.display),t.__ref&&(t.__ref.__explicitDisplay=t.display)}}}finally{cm(),r&&tt(),vm.delete(t)}}function jw(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let s=t.aria[n];if(typeof s=="function"||typeof s=="object"||s==null)continue;let i="aria-"+n.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,Ke(i,s))}let r=Qg(t);for(let n in r){let s=r[n];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(n,s===!0?"":s)}let o=t.tag||"div";for(let n of Object.keys(t)){if(typeof t[n]=="function"||jt.has(n)||n==="on"||r[n]!==void 0)continue;let s=n.charCodeAt(0);if(!(s>=65&&s<=90)&&!Hn(n)&&!(xt[n]||vt&&vt.has(n))&&Nr(o,n)){let i=t[n];if(i==null||(typeof i=="string"&&i.includes("{{")&&(i=eo(i,t,t.state,t.context),t[n]=i),i==null||typeof i=="function"||typeof i=="object")||i===!1&&!cr(Fr(n)||n))continue;let a=Fr(n)||n;e.setAttribute(a,Ke(a,i))}}}function R1(t,e){let r=t.node,o=t.__ref,n=o.__autoGrow;if(!e){if(n&&n.active){try{r.removeEventListener("input",n.resize)}catch{}r.style.height="",n.appliedMax!=null&&r.style.maxHeight===n.appliedMax&&(r.style.maxHeight=""),n.active=!1,n.appliedMax=null,n.lastMeasure=0}return}n||(n=o.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,resize:()=>{if(r.scrollHeight===0&&n.lastMeasure>0)return;r.style.height="auto";let i=r.scrollHeight;r.style.height=i+"px",i>0&&(n.lastMeasure=i)}},o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{try{r.removeEventListener("input",n.resize)}catch{}})),n.active||(r.addEventListener("input",n.resize),n.active=!0);let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==n.appliedMax&&(s==null?n.appliedMax!=null&&r.style.maxHeight===n.appliedMax&&(r.style.maxHeight=""):r.style.maxHeight=s,n.appliedMax=s),n.resize()}function P1(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.__ref,o=t.autoGrow,n=typeof o=="function"?Bt(t,t.autoGrowDeps,o):null,s=Z(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===o&&n?n:i)(t,t.state,t.context)}catch{a=null}R1(t,a)},{depth:r.path.length,label:Ct(r,"autoGrow")});r.__effects||(r.__effects=[]),r.__effects.push(s),n&&(r.__exec.autoGrow=o)}var Bw=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Uw(t,e){for(let r of Object.keys(t)){if(!Hn(r)||Bw.has(r))continue;let o=xf(r);if(o){wf(o,t,t[r]);continue}let n=t[r];if(typeof n=="string"&&/^[A-Za-z_$][\w$]*$/.test(n)){let i=n;n=function(c){return t.call(i,c)}}if(typeof n!="function")continue;let s=h1(r);Lr.has(s)||Mn(g1(s),t,n)}I1(t)}function I1(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},o=!1;for(let d of Bw){let h=t[d];typeof h=="function"&&(r[d]=h,o=!0)}if(!o)return;let n=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 _=Math.abs(g),b=Math.abs(p);if(Math.max(_,b)<n)return;let y;if(_>b*1.2)y=g<0?"left":"right";else if(b>_*1.2)y=p<0?"up":"down";else return;let x="onSwipe"+y.charAt(0).toUpperCase()+y.slice(1),k=r[x],E=r.onSwipe;k&&k.call(t,d,t,t.state,t.context),E&&E.call(t,{direction:y,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 Ia(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=Ia(n,s):r[o]=s}return r}function Om(t,e,r){if(!e||!t.node)return;let o=t.childExtends;if(Array.isArray(e)){let n=t.tag==="fragment",s=t.context?.document||globalThis.document,i=n?null:s?.createDocumentFragment();if(!n&&!i)return;let a=t.childProps,c=t.childrenAs;for(let l=0;l<e.length;l++){let f=e[l],u=f;(typeof f=="string"||typeof f=="number")&&(f={text:f});let d=a;if(typeof a=="function")try{d=a(t,f)}catch{d=null}if(c==="state"){let p=u;(typeof u=="string"||typeof u=="number")&&(p={value:u,text:u}),f=d?{...d,state:p}:{state:p}}else d&&(f=Ia(d,f));if(o&&!f.ignoreChildExtends)if(f.extends){let p=Array.isArray(f.extends)?f.extends:[f.extends],m=Array.isArray(o)?o:[o];f={...f,extends:[...m,...p]}}else f={...f,extends:o};let h=f?.key||u&&typeof u=="object"&&u.key||`${l}`,g;try{g=se(f,t,h,r)}catch(p){if(typeof console<"u"&&console.error){let m=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${h}" failed to construct at ${m} (initial render, skipping this row):`,p?.message||p)}continue}!n&&g?.node&&i.appendChild(g.node)}return n||t.node.appendChild(i),!0}if(typeof e=="string"){let n=Lw(e,t);if(Array.isArray(n))return Om(t,n,r)}if(typeof e=="object")for(let n in e){if(jt.has(n))continue;let s=e[n];if(!(s==null||s===!1)){if((typeof s=="string"||typeof s=="number")&&(s={text:s}),t.childProps&&(s=Ia(t.childProps,s)),o&&!s.ignoreChildExtends)if(s.extends){let i=Array.isArray(s.extends)?s.extends:[s.extends],a=Array.isArray(o)?o:[o];s={...s,extends:[...a,...i]}}else s={...s,extends:o};se(s,t,n,r)}}}function Rm(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let o=r.options;if(!o||!o.length)return;let n=t.__ref,s=n&&n.__exec&&n.__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;let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let c=e||!(n&&n.__selectSynced);if(n&&(n.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<o.length;f++)o[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function Vw(t,e){let{children:r,content:o}=t,n=t.childExtends;if(typeof r=="function"){let u=r;try{r=u(t,t.state,t.context)}catch(m){if(r=void 0,typeof console<"u"&&console.error){let _=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${_} (initial run, treating as empty):`,m?.message||m)}}t.children=r;let d=t.__ref,h=!1,g=Bt(t,t.childrenDeps,u),p=Z(()=>{let m=h;h=!0;let _;try{_=g(t,t.state,t.context)}catch(D){if(typeof console<"u"&&console.error){let I=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${I}${m?"":" (initial tracking run)"}:`,D?.message||D)}return}if(!m||_===t.children)return;t.children=_;let b=typeof t.onContentUpdate=="function",y=b?[]:null,x=b?[]:null,k=b?[]:null;if(Array.isArray(_)&&t.childrenAs==="state"){let D=t.childProps,I=[],H=new Map;for(let W=0;W<_.length;W++){let wt=_[W],L=D;if(typeof D=="function")try{L=D(t,wt)}catch{L=null}let ot=L&&L.key||wt&&wt.key||`${W}`;I.push(ot),H.set(ot,{rawChild:wt,childProps:L})}let V=new Set(I),rt=d.__children.slice();for(let W of rt)if(!V.has(W)){let wt=t[W];wt?.remove&&wt.remove(),delete t[W],x&&x.push(W)}let at=t.childExtends,G=t.tag==="fragment",K=t.context?.document||globalThis.document,lt=G?null:K?.createDocumentFragment(),Vt=new Set;for(let W of I){let wt=H.get(W),L=wt.rawChild,ot=t[W];if(ot&&ot.state){if(L&&typeof L=="object"){let Et=ot.state,Ye=Et.$replace||Et.replace,nt=Et.$update||Et.update;try{if(typeof Ye=="function")Ye.call(Et,L);else if(typeof nt=="function"){for(let M in Et)if(!(M==="__element"||M==="root"||M==="parent"||M==="update")&&!Object.prototype.hasOwnProperty.call(L,M))try{Et[M]=void 0}catch{}nt.call(Et,L)}else for(let M in L)Et[M]=L[M]}catch(M){if(typeof console<"u"&&console.error){let ht=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${W}" failed to patch at ${ht} (reconcile, keeping its previous data for this pass):`,M?.message||M)}}}k&&k.push(W);continue}let U=L;(typeof L=="string"||typeof L=="number")&&(U={value:L,text:L});let Y=wt.childProps,j=Y?{...Y,state:U}:{state:U};if(at&&!j.ignoreChildExtends)if(j.extends){let Et=Array.isArray(j.extends)?j.extends:[j.extends],Ye=Array.isArray(at)?at:[at];j={...j,extends:[...Ye,...Et]}}else j={...j,extends:at};let pt;try{pt=se(j,t,W,e)}catch(Et){if(typeof console<"u"&&console.error){let Ye=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${W}" failed to construct at ${Ye} (reconcile, skipping this row):`,Et?.message||Et)}Vt.add(W);continue}!G&&pt?.node&&lt&&lt.appendChild(pt.node),y&&y.push(W)}if(!G&&lt&&lt.childNodes.length&&t.node&&t.node.appendChild(lt),!G&&t.node){let W=null;for(let wt of I){let L=t[wt]?.node;if(!L)continue;let ot=W?W.nextSibling:t.node.firstChild;L!==ot&&t.node.insertBefore(L,ot),W=L}}d.__children=Vt.size?I.filter(W=>!Vt.has(W)):I,b&&(y.length||x.length)&&Ew(t,{added:y,removed:x,kept:k}),Rm(t,!1);return}let $=b?[...d.__children]:null;for(let D of[...d.__children]){let I=t[D];I?.remove&&I.remove(),delete t[D]}d.__children=[],Om(t,_,e),Rm(t,!1),b&&Ew(t,{added:[...d.__children],removed:$,kept:[]})},{depth:d.path.length,label:Ct(d,"children")});d.__effects.push(p)}let s=Om(t,r,e);if(o!=null&&!(o&&o.__ref)){let u=o;if(typeof u=="string"||typeof u=="number"?u={text:u}:typeof u!="object"&&(u={}),t.childProps&&(u=Ia(t.childProps,u)),n&&!u.ignoreChildExtends)if(u.extends){let d=Array.isArray(u.extends)?u.extends:[u.extends],h=Array.isArray(n)?n:[n];u={...u,extends:[...h,...d]}}else u={...u,extends:n};se(u,t,"content",e)}if(r&&!s)return;let i=t.context?.components||{};{let u=Object.keys(t);for(let d=0;d<u.length;d++){let h=u[d];if(!h.endsWith("Extends")||typeof t[h]!="string")continue;let g=h.slice(0,-7);if(!g||g.charCodeAt(0)<65||g.charCodeAt(0)>90)continue;let p={extends:t[h]};delete t[h];for(let m=d+1;m<u.length;m++){let _=u[m],b=_.charCodeAt(0);if(b>=65&&b<=90||jt.has(_)||typeof t[_]=="function"&&(_.startsWith("on")||_.startsWith(".")))break;let y=t[_];y!==void 0&&(p[_]=y,delete t[_])}t[g]&&typeof t[g]=="object"?t[g]={...p,...t[g]}:t[g]=p}}let a=e?.mountYield===!0||t.yieldChildren===!0,c=Object.keys(t),l=u=>{if(jt.has(u)||typeof t[u]!="object"||t[u]===null)return;let d=u.charCodeAt(0);if(d<65||d>90)return;let h=t[u];if(!h.__ref){if(!h.extends&&!h.extend){let g=i[u]||i[`smbls.${u}`];g&&(h={...h,extends:g})}if(t.childProps&&(h=Ia(t.childProps,h)),n&&!h.ignoreChildExtends)if(h.extends){let g=Array.isArray(h.extends)?h.extends:[h.extends],p=Array.isArray(n)?n:[n];h={...h,extends:[...p,...g]}}else h={...h,extends:n};se(h,t,u,e)}};if(!a){for(let u of c)l(u);return}mw();let f=u=>{for(let d=u;d<c.length;d++)if(l(c[d]),d+1<c.length&&gw()){let h=d+1;bw(()=>f(h));return}};f(0),yw()}function zw(t,e,r){let{node:o}=t;if(!o)return;o.ref=t;let n=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(n){let i=n.parentNode;if(i){if(r?.position==="before"&&r.node)i.insertBefore(o,r.node);else if(r?.position==="after"&&r.node){let a=r.node.nextSibling;i.insertBefore(o,a||n)}else i.insertBefore(o,n);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(r?.position==="before"&&r.node)s.insertBefore(o,r.node);else if(r?.position==="after"&&r.node){let i=r.node.nextSibling;i?s.insertBefore(o,i):s.appendChild(o)}else s.appendChild(o)}var Pm=3;function tm(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=Pm?!1:(t.__inBeforeUpdate=!0,!0)}function lr(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===Pm&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${Pm}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function fr(t,e,r){let o=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&At(o,e,r);let n="on"+t,s=e[n];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&&it(l);let f=!!c;try{let u=s(e,e.state,e.context,r);if(u&&typeof u.then=="function"){let d=e.__ref;return u.catch(h=>{e.context?.plugins?.length&&At("error",e,{hook:n,error:h})||console.error(`[DOMQL] Lifecycle "${n}" error:`,h)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(e.context?.plugins?.length&&At("error",e,{hook:n,error:u})||console.error(`[DOMQL] Lifecycle "${n}" error:`,u),e.context?.strictMode)throw u}finally{l&&tt(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var Hw={blue:"#213eb0",green:"#389d34",red:"#e15c55",yellow:"#EDCB38",orange:"#e97c16",transparent:"rgba(0, 0, 0, 0)",black:"black",gray:"#4e4e50",white:"white",title:["--gray 1 -168","--gray 1 +168"],caption:["--gray 1 -68","--gray 1 +68"],paragraph:["--gray 1 -42","--gray 1 +42"],disabled:["--gray 1 -26","--gray 1 +26"],line:["--gray 1 -16","--gray 1 +16"],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"]},Ww={"gradient-blue-light":`linear-gradient(to right,
55
+ `):"")}}if(Bf(s,!0),tS(s,e,n),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let p=s.context?.designSystem;p&&it(p);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{p&&et()}}if(Qt("Create",s,o),Qt("Complete",s,o),Qt("Render",s,o),Qt("RenderRouter",s,o),jm(s,o),typeof s.onFrame=="function"){let p=s.onFrame,m=s.context?.designSystem,b=()=>{if(s.node){if(s.node.isConnected){m&&it(m);try{p(s,s.state,s.context)}catch(_){console.error("[DOMQL] onFrame error:",_)}finally{m&&et()}}requestAnimationFrame(b)}};requestAnimationFrame(b)}return s}function I1(t,e,r){let o=!e,n=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=o&&n&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!mt(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,fe(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},l=t.context?.polyglot;if(l?.translations){let f=t.context,u=a.lang||l.defaultLang||"en",d=new Set,h=(m,b)=>{d.has(m)||sr(f,m,c)&&(c[m]=b,d.add(m),He(f,m))},g=l.translations[u];if(g&&typeof g=="object")for(let m in g)h(m,g[m]);let p=new Set(l.languages||[]);for(let m in l.translations)p.has(m)||h(m,l.translations[m])}t.state=mt(c)?c:tr(c),t.state.__element=t,t.state.root=t.state,fe(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),fe(t,t.state);return}if(typeof i=="string"){if(t.state=qw(i,e),t.state&&typeof t.state=="object"&&!mt(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}fe(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=mt(a)?a:tr(a||{})}else mt(i)?t.state=i:t.state=tr({...i});t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,fe(t,t.state)}function Lm(t,e){if(!e)return t;let r=e.split("/"),o=t;for(let n of r){if(o==null)return{};o=o[n]}return o??{}}function qw(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let n=t.slice(3);return n?Lm(e.state,n):e.state??{}}if(t.startsWith("~/")){let n=e.state?.root||e.state,s=t.slice(2);return s?Lm(n,s):n??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=Lm(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let o=e.context?.polyglot;if(o?.translations){let n=e.state?.root?.lang||o.defaultLang||"en",s=o.translations[n];if(s?.[t]!==void 0)return s[t];if(o.translations[t]!==void 0)return o.translations[t]}return{}}var D1=new Set(["s","state","ctx","context"]);function $1(t){try{let r=Function.prototype.toString.call(t).match(/^[^(]*\(([^)]*)\)/);return r?r[1].split(",").map(o=>o.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function L1(t){if(typeof t!="function"||t.length!==2)return!1;let e=$1(t);if(e.length<2)return!1;let r=e[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!D1.has(r)}function M1(t){let e=t.__ref,r=t.tag||"div",o=t.context?.designSystem,n=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||jt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Xn(a)||_t[a]||kt&&kt.has(a)||Ur(r,a)||(It()&&L1(t[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).`),n.push({prop:a,fn:t[a]}))}for(let i=0;i<n.length;i++){let{prop:a,fn:c}=n[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){o&&it(o);try{return c(t,t.state,t.context)}catch{return}finally{o&&et()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function F1(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let o=e[r];try{typeof o=="function"?o(t,t.state,t.context):typeof o=="string"&&t.state?.[o]}catch{}}}function Bt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...o){return F1(t,e),r.apply(this,o)}}function Fa(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function vt(t,e){return()=>t.path.join(".")+"::"+e}function Kw(t,e){let r=t.__ref,o=!!(e&&e.skipIfEffect);if(M1(t),typeof t.text=="function"){let s=t.text,i=Bt(t,t.textDeps,s),a=Q(()=>{if(!r.contentManaged)try{let c=i(t,t.state,t.context);t.node&&c!=null&&typeof c!="function"&&typeof c!="object"&&(typeof c=="string"&&c.includes("{{")&&(c=no.call(t,c,t.state)),Wn(t,c))}catch{}},{depth:r.path.length,label:vt(r,"text")});r.__effects.push(a),r.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){let s=t.text,i=Q(()=>{if(r.contentManaged)return;let a=no.call(t,s,t.state);a!=null&&(t.text=a),t.node&&Wn(t,a??"")},{depth:r.path.length,label:vt(r,"text")});r.__effects.push(i),r.__exec.text=s}for(let s of Object.keys(t))if(typeof t[s]=="function"&&!jt.has(s)&&!Xn(s)&&!r.__exec[s]){if(_t[s]){let i=t[s],a=Bt(t,t[s+"Deps"],i),c=s,l,f=Q(()=>{let u=t.context?.designSystem;u&&it(u);try{let d=a(t,t.state,t.context),h=_t[c](d,t,t.state,t.context),g=c==="show"||c==="hide";if(h&&t.node){let p=Vm(h),m=g&&t.node.style.display!=="none";(p===null||p!==l||m)&&(l=p,Yn(t.node,h))}else if(t.node&&g){l=void 0;let p=r.__explicitDisplay;t.node.style.display=typeof p=="string"?p:""}}finally{u&&et()}},{depth:r.path.length,label:vt(r,c)});r.__effects.push(f),r.__exec[s]=i}else if(kt&&kt.has(s)){let i=t[s],a=Bt(t,t[s+"Deps"],i),c=s,l,f=Q(()=>{let u=t.context?.designSystem;u&&it(u);try{let d=a(t,t.state,t.context);if(t.node)if(d!=null){let h=c+":"+String(d);h!==l&&(l=h,Yn(t.node,{[c]:d}))}else l=void 0,t.node.style[c]=""}finally{u&&et()}},{depth:r.path.length,label:vt(r,c)});r.__effects.push(f),r.__exec[s]=i}}if(typeof t.html=="function"){let s=t.html,i=Bt(t,t.htmlDeps,s),a=Q(()=>{let c=t.context?.designSystem;c&&it(c);try{let l=i(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&(t.node.innerHTML=l)}finally{c&&et()}},{depth:r.path.length,label:vt(r,"html")});r.__effects.push(a),r.__exec.html=s}if(typeof t.value=="function"){let s=t.value,i=Bt(t,t.valueDeps,s),a=Q(()=>{try{let c=i(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let l=c==null?"":String(c);if(t.node.value===l)return;let f=typeof document<"u"&&document.activeElement===t.node,u=f&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,d=f&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=l,f&&u!=null&&d!=null)try{t.node.setSelectionRange(u,d)}catch{}}catch{}},{depth:r.path.length,label:vt(r,"value")});r.__effects.push(a),r.__exec.value=s}if(typeof t.style=="function"){let s=t.style,i=Bt(t,t.styleDeps,s),a,c=Q(()=>{let l=i(t,t.state,t.context),f=Vm(l);(f===null||f!==a)&&(a=f,Yn(t.node,l))},{depth:r.path.length,label:vt(r,"style")});r.__effects.push(c),r.__exec.style=s}else if(t.style&&typeof t.style=="object")for(let s in t.style){let i=t.style[s];if(typeof i!="function")continue;let a=Bt(t,Fa(t.styleDeps,s),i),c,l=Q(()=>{try{let f=a(t,t.state,t.context);if(t.node){let u=s+":"+String(f);u!==c&&(c=u,Yn(t.node,{[s]:f}))}}catch{}},{depth:r.path.length,label:vt(r,"style."+s)});r.__effects.push(l)}if(t.attr&&typeof t.attr=="object"){for(let s in t.attr)if(typeof t.attr[s]=="function"){let i=Bt(t,Fa(t.attrDeps,s),t.attr[s]),a=s,c=Q(()=>{try{let l=i(t,t.state,t.context);t.node?.setAttribute&&(l==null||l===!1&&!dr(a)?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,Xe(a,l)))}catch{}},{depth:r.path.length,label:vt(r,"attr."+a)});r.__effects.push(c)}}if(t.aria&&typeof t.aria=="object")for(let s in t.aria){if(typeof t.aria[s]!="function")continue;let i=Bt(t,Fa(t.ariaDeps,s),t.aria[s]),a="aria-"+s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=Q(()=>{try{let l=i(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,Xe(a,l))}catch{}},{depth:r.path.length,label:vt(r,"aria."+s)});r.__effects.push(c)}if(t.data&&typeof t.data=="object")for(let s in t.data){if(typeof t.data[s]!="function")continue;let i=Bt(t,Fa(t.dataDeps,s),t.data[s]),c="data-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=Q(()=>{try{let f=i(t,t.state,t.context);if(!t.node?.setAttribute)return;f==null||f===!1?t.node.removeAttribute(c):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(c,f===!0?"":f)}catch{}},{depth:r.path.length,label:vt(r,"data."+s)});r.__effects.push(l)}let n=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(n)for(let s in n){if(typeof n[s]!="function")continue;let i=Bt(t,Fa(t.classDeps,s),n[s]),a=Q(()=>{try{let c=i(t,t.state,t.context);if(!t.node?.classList)return;typeof c=="string"?t.node.classList.add(c):c?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:r.path.length,label:vt(r,"class."+s)});r.__effects.push(a)}!o&&typeof t.if=="function"&&Gw(t,r,t.if);for(let s of Object.keys(t)){if(jt.has(s)||typeof t[s]!="function")continue;let i=s.charCodeAt(0);if(i>=65&&i<=90||Xn(s))continue;let a=t[s];r.__exec[s]=a;let c=t.tag||"div";if(Ur(c,s)&&!_t[s]&&!(kt&&kt.has(s))){let l=Br(s)||s,f=Bt(t,t[s+"Deps"],a),u=Q(()=>{try{let d=f(t,t.state,t.context);t.node?.setAttribute&&(d==null||d===!1&&!dr(l)?t.node.removeAttribute(l):typeof d!="function"&&typeof d!="object"&&(l==="src"&&"src"in t.node?t.node.src=d:t.node.setAttribute(l,Xe(l,d))))}catch{}},{depth:r.path.length,label:vt(r,s)});r.__effects.push(u)}}if(B1(t),z1(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let s=t.onStateUpdate,i=t.stateDeps,a=!1,c=[],l=Q(()=>{let f=[];for(let g=0;g<i.length;g++){let p=i[g];try{f[g]=typeof p=="function"?p(t,t.state,t.context):t.state?.[p]}catch{f[g]=void 0}}if(!a){a=!0,c=f;return}let u=f.length!==c.length;for(let g=0;!u&&g<f.length;g++)f[g]!==c[g]&&(u=!0);let d=c;if(c=f,!u)return;let h=t.context?.designSystem;h&&it(h);try{s(t,t.state,t.context,{prev:d,next:f})}catch(g){if(t.context?.plugins?.length&&Et("error",t,{hook:"onStateUpdate",error:g})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',g),t.context?.strictMode)throw g}finally{h&&et()}},{depth:r.path.length,label:vt(r,"onStateUpdate")});r.__effects.push(l)}V1(t)}function jw(t){let e=t.parent,r=e?.node;if(!r||!t.node){tS(t,t.parent);return}let o=null,n=Object.keys(e),s=n.indexOf(t.key);for(let i=s+1;i<n.length;i++){let a=e[n[i]];if(a?.node?.parentNode===r){o=a.node;break}}o?r.insertBefore(t.node,o):r.appendChild(t.node)}function Gw(t,e,r){let o=Bt(t,t.ifDeps,r),n=Q(()=>{let s;try{s=o(t,t.state,t.context)}catch(a){if(s=!1,e.__ifError=a,typeof console<"u"&&console.warn){let c=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,a?.message||a)}return}let i=e.__if;if(e.__if=!!s,i&&!e.__if&&t.node){t.node.remove();try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(a){console.error("[smbls] onRemove error:",a)}}else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=Fr(t)),t.node&&(t.node.ref=t),jw(t),Um(t),Qt("Render",t,{}),jm(t,{});else{if(e.__ifInitialized=!0,t.tag||(t.tag=Mr(t)),Qt("Init",t,{}),t.node||(t.node=Fr(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 c=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(c),e.__fragmentAnchor=c}Qt("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),Jw(t,{}),Kw(t,{skipIfEffect:!0}),Um(t),Xw(t),Qw(t,{}),jw(t),Qt("Create",t,{}),Qt("Complete",t,{}),Qt("Render",t,{}),Qt("RenderRouter",t,{}),jm(t,{})}},{depth:e.path.length,label:vt(e,"if")});e.__effects.push(n)}function Wn(t,e){let r=t.node;if(!r)return;let o=e==null||typeof e=="object"?"":String(e);if(t.tag==="string"){r.nodeValue!==o&&(r.nodeValue=o);return}let n=t.__ref,s=n?n.__textNode:null;if(s&&s.parentNode!==r&&(s=null),!s){let i=r.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==o&&(s.nodeValue=o):r.firstChild?(s=(r.ownerDocument||t.context?.document||globalThis.document).createTextNode(o),r.insertBefore(s,r.firstChild)):(r.textContent=o,s=r.firstChild&&r.firstChild.nodeType===3?r.firstChild:null),n&&(n.__textNode=s||null)}function Um(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&Wn(t,t.text),W1(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"&&Yn(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let o=t.attr[r];typeof o=="function"||typeof o=="object"||o!=null&&(o===!1&&!dr(r)||e.setAttribute&&e.setAttribute(r,Xe(r,o)))}if(t.data&&typeof t.data=="object")for(let r in t.data){let o=t.data[r];typeof o=="function"||typeof o=="object"||o==null||o===!1||e.dataset&&(e.dataset[r]=o===!0?"":o)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(o=>o&&e.classList.add(o));else if(typeof r=="object")for(let o in r){let n=typeof r[o]=="function"?r[o](t,t.state,t.context):r[o];n&&e.classList.add(typeof n=="string"?n:o)}}}}function Vm(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Yn(t,e){if(!t||!e||!t.style)return;let r=null;for(let o in e){let n=e[o];if(n!=null){if(o.charAt(0)==="&"&&typeof n=="object"){r||(r={}),r[o]=n;continue}try{let s=String(n),i=o.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,c?"important":"")}catch{}}}r&&N1(t,r)}function N1(t,e){let r=`_ds${Hw.scopedStyleId++}`;t.classList.add(r);let o=t.ownerDocument,n=o.querySelector("style[data-smbls-scoped]");n||(n=o.createElement("style"),n.setAttribute("data-smbls-scoped",""),o.head.appendChild(n));let s="";for(let i in e){let a="."+r,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+=`${m.replace(/[A-Z]/g,b=>"-"+b.toLowerCase())}: ${h[m]};`;u+=Pe(`${g} { ${p} }`,g)+`
56
+ `}else f+=`${d.replace(/[A-Z]/g,g=>"-"+g.toLowerCase())}: ${h};`}f&&(s+=Pe(`${c} { ${f} }`,c)+`
57
+ `),u&&(s+=u)}}s&&(n.textContent+=s)}var Bw=new Set;function Uw(t){if(!Array.isArray(t))return"";let e=[];for(let r=0;r<t.length;r++)typeof t[r]=="string"&&t[r].length&&e.push(t[r]);return e.sort(),e.join("|")}function j1(t,e,r){let o=Uw(r);queueMicrotask(()=>{if(!t.__ref)return;let n;try{n=e(t,t.state,t.context)}catch{return}if(Uw(n)===o)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";Bw.has(s)||(Bw.add(s),console.warn(`[smbls] subscribeTo function at "${s}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${r.join(", ")||"(none)"}], probed [${Array.isArray(n)?n.join(", "):String(n)}]. 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 B1(t){let e=t.subscribeTo,r=typeof e=="function",o=e;if(r)try{o=e(t,t.state,t.context)}catch{o=null}if(r&&It()&&j1(t,e,Array.isArray(o)?o:[]),!Array.isArray(o)||o.length===0)return;let n=t.__ref;for(let s=0;s<o.length;s++){let i=o[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],l=a.slice(1),f={value:!1},u=Q(()=>{let d=t.state&&(mt(t.state)?t.state.root:null);if(!d||!mt(d))return;let h=d;h=h[c];for(let p=0;p<l.length&&!(h==null||typeof h!="object");p++)if(mt(h))h=h[l[p]];else break;if(!f.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"){let p=t.context?.designSystem;p&&it(p);try{if(lm(n)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>pr(n,!1),b=>{pr(n,!0),t.context?.plugins?.length&&Et("error",t,{hook:"onBeforeUpdate",error:b})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",b)}):(pr(n,!1),m===!1&&(g=!0))}}catch(m){pr(n,!0),t.context?.plugins?.length&&Et("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{p&&et()}}if(!g&&t.node&&n.__effects)for(let p=0;p<n.__effects.length;p++){let m=n.__effects[p];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!g&&typeof t.onUpdate=="function"){let p=t.context?.designSystem;p&&it(p);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&Et("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{p&&et()}}},{depth:n.path.length,label:vt(n,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,n.__effects.push(u)}}function Wm(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}var Vw=new Set;function U1(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",o=r+"::"+t;Vw.has(o)||(Vw.add(o),console.warn(`[smbls/css] "${t}" at ${r} 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.`))}function Zn(t,e,r){let o={},n=new Set,s=(i,a,c)=>{let l=c?new Set(Object.keys(o)):null;if(_t[i]){let f=_t[i](a,e,e.state,e.context);if(f){let u=Array.isArray(f)?f:[f];for(let d of u)d&&Object.assign(o,d)}}else o[i]=a;if(c)for(let f in o)l.has(f)||n.add(f)};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=t[i];if(typeof a=="function"&&(a=a(e,e.state,e.context)),a==null||typeof a=="function")continue;if(typeof a=="object"&&!Array.isArray(a)){if(i==="style"){for(let u in a){let d=a[u];if(typeof d=="function"&&(d=d(e,e.state,e.context)),d==null||typeof d=="function")continue;let h=typeof e[u]=="function"&&(_t[u]||kt&&kt.has(u));s(u,d,h)}continue}if(Wm(i,e)){let u=Zn(a,e,!1);Object.keys(u).length&&(o[`[data-theme="${i.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(i)){It()&&U1(i,e);continue}let l=i;if(i.charCodeAt(0)===64&&!i.startsWith("@media")&&!i.startsWith("@keyframes")){let u=e.context?.designSystem?.media?.[i.slice(1)];u&&(l=`@media ${u}`)}let f=Zn(a,e,!1);Object.keys(f).length&&(o[l]=f);continue}let c=typeof e[i]=="function"&&(_t[i]||kt&&kt.has(i));s(i,a,c)}if(r)for(let i in o)n.add(i);for(let i of n){let a=o[i];typeof a=="string"&&!a.includes("!important")&&(o[i]=a+" !important")}return o}function qm(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 r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&qm(t[r],e+1))return!0}return!1}function Yw(t,e,r){if(!e||typeof e!="object"||Array.isArray(e))return null;if(Wm(t,r)){let s=Zn(e,r,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let o=t;if(t.charAt(0)==="@"&&!t.startsWith("@media")&&!t.startsWith("@keyframes")){let s=r.context?.designSystem?.media?.[t.slice(1)];s&&(o=`@media ${s}`)}let n=Zn(e,r,!1);return Object.keys(n).length?{cssProp:o,block:n}:null}function V1(t){let e=t.__ref;for(let r of Object.keys(t)){if(!Bm(r))continue;let o=t[r];if(!o||typeof o!="object"||Array.isArray(o)||!qm(o))continue;let n=null,s,i=Q(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&it(a);let c,l=!1;try{let f=Yw(r,o,t),u=f?Vm(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=we({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&et()}if(!(l||!t.node.classList)){if(n)for(let f of n)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);n=c}},{depth:e.path.length,label:vt(e,"cssBlock("+r+")")});e.__effects.push(i)}}function z1(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let o of Object.keys(t)){let n=o.charAt(0);if(n!=="."&&n!=="!")continue;let s=o.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let u=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${n}\` is read as one prop name. Nest the selector inside instead: \`${n}${u}: { '${s.slice(u.length)}': {...} }\`.`)}continue}let i=t[o];if(!i||typeof i!="object")continue;let a=n==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=()=>{let u,d=t[s];if(d===void 0){let p=!!t.state&&s in t.state,m=t.state?t.state[s]:void 0;if(p||m!==void 0)u=m;else{let b=t.context?.cases?.[s];if(b===void 0)return;try{u=typeof b=="function"?b.call(t,t):b}catch(_){u=!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 d=="function")try{u=d(t,t.state,t.context)}catch(p){u=!1,e.__conditionalError=p,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,p?.message||p)}else u=d;let h=a?!u:!!u;if(!t.node||h===c.lastMatch)return;c.lastMatch=h;let g=t.context?.designSystem;g&&it(g);try{if(h){let p={},m={},b=!1;for(let y in i){if(!Object.prototype.hasOwnProperty.call(i,y))continue;let x=i[y],k=y.charAt(0);if((k===":"||k==="@"||k==="&")&&x&&typeof x=="object"&&!Array.isArray(x)){if(Wm(y,t)){let O=Zn(x,t,!1);Object.keys(O).length&&(m[`[data-theme="${y.slice(1)}"] &`]=O,b=!0)}else{let O=y;if(k==="@"&&!y.startsWith("@media")&&!y.startsWith("@keyframes")){let I=t.context?.designSystem?.media?.[y.slice(1)];I&&(O=`@media ${I}`)}let $=Zn(x,t,!1);Object.keys($).length&&(m[O]=$,b=!0)}continue}let E=typeof x=="function"?x(t,t.state,t.context):x;if(E!=null)if(_t[y]){let O=_t[y](E,t,t.state,t.context);if(O){let $=Array.isArray(O)?O:[O];for(let I of $)I&&Object.assign(p,I)}}else kt&&kt.has(y)&&(p[y]=E)}let _=Object.keys(p);if(_.length){Yn(t.node,p);for(let y of _)r.set(y,o);c.appliedKeys=_}else c.appliedKeys=null;if(b){let y=we(m,null,t.context?.cssPrefix),x=y?y.split(" ").filter(Boolean):[];if(x.length&&t.node.classList){for(let k of x)t.node.classList.add(k);c.appliedClasses=x}else c.appliedClasses=null}else if(c.appliedClasses){for(let y of c.appliedClasses)t.node.classList.remove(y);c.appliedClasses=null}}else{if(c.appliedKeys){for(let p of c.appliedKeys)r.get(p)===o&&(t.node.style[p]="",r.delete(p));c.appliedKeys=null}if(c.appliedClasses){for(let p of c.appliedClasses)t.node.classList.remove(p);c.appliedClasses=null}}}finally{g&&et()}};e.__conditionalRunners.push(l);let f=Q(l,{depth:e.path.length,label:vt(e,"conditional("+o+")")});e.__effects.push(f)}}var Mm=new WeakSet;function H1(t){let e=t.ownerDocument;!e||Mm.has(e)||(Mm.add(e),queueMicrotask(()=>{Mm.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var Fm=new WeakSet,zw=!1;function W1(t){let{node:e}=t;if(!e)return;if(zw||(zw=!0,we({display:"none"})),Fm.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}Fm.add(t);let r=t.context?.designSystem;r&&it(r),mm();try{let o={},n=!1;if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&_t.theme){let s=_t.theme(t.theme,t,t.state,t.context);if(s){if(Array.isArray(s))for(let i of s)i&&Object.assign(o,i);else Object.assign(o,s);n=!0}}for(let s of Object.keys(t)){if(typeof t[s]=="function"||jt.has(s)||s==="theme")continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!Xn(s)){if(_t[s]){let a=t[s],c=_t[s](a,t,t.state,t.context);if(c){if(Array.isArray(c))for(let l of c)l&&Object.assign(o,l);else Object.assign(o,c);n=!0}}else if(kt&&kt.has(s)){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charCodeAt(0)===45){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charAt(0)==="&"||s.charAt(0)==="@"||s.charAt(0)===":"){let a=t[s];if(a&&typeof a=="object"&&!Array.isArray(a)){if(qm(a))continue;let c=Yw(s,a,t);c&&(o[c.cssProp]=c.block,n=!0)}}}}if(n){o.display&&String(o.display).includes("!important")&&(e.style.setProperty("display",String(o.display).replace(/\s*!important\s*$/,""),"important"),delete o.display);let s=we(o,null,t.context?.cssPrefix);if(s&&e.classList){let a=s.split(" ").filter(Boolean),c=!1;for(let l of a)e.classList.add(l),c||(l.charCodeAt(0)===95&&l.charCodeAt(1)===99||l.charCodeAt(0)===95&&l.indexOf("_c",1)!==-1)&&(c=!0);c&&H1(e)}let i=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(i!=null){let a=o.display;if(a&&a!==i)if(i==="none"){let c=[];for(let l of e.classList)l.startsWith("_d-")&&l!=="_d-none"&&c.push(l);for(let l of c)e.classList.remove(l);e.classList.add("_d-none")}else e.style.display==="none"&&(typeof t.hide=="function"||typeof t.show=="function")||(e.style.display=t.display),t.__ref&&(t.__ref.__explicitDisplay=t.display)}}}finally{ym(),r&&et(),Fm.delete(t)}}function Xw(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let s=t.aria[n];if(typeof s=="function"||typeof s=="object"||s==null)continue;let i="aria-"+n.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,Xe(i,s))}let r=cm(t);for(let n in r){let s=r[n];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(n,s===!0?"":s)}let o=t.tag||"div";for(let n of Object.keys(t)){if(typeof t[n]=="function"||jt.has(n)||n==="on"||r[n]!==void 0)continue;let s=n.charCodeAt(0);if(!(s>=65&&s<=90)&&!Xn(n)&&!(_t[n]||kt&&kt.has(n))&&Ur(o,n)){let i=t[n];if(i==null||(typeof i=="string"&&i.includes("{{")&&(i=no(i,t,t.state,t.context),t[n]=i),i==null||typeof i=="function"||typeof i=="object")||i===!1&&!dr(Br(n)||n))continue;let a=Br(n)||n;e.setAttribute(a,Xe(a,i))}}}function q1(t,e){let r=t.node,o=t.__ref,n=o.__autoGrow;if(!e){if(n&&n.active){try{r.removeEventListener("input",n.resize)}catch{}r.style.height="",n.appliedMax!=null&&r.style.maxHeight===n.appliedMax&&(r.style.maxHeight=""),n.active=!1,n.appliedMax=null,n.lastMeasure=0}return}n||(n=o.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,resize:()=>{if(r.scrollHeight===0&&n.lastMeasure>0)return;r.style.height="auto";let i=r.scrollHeight;r.style.height=i+"px",i>0&&(n.lastMeasure=i)}},o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{try{r.removeEventListener("input",n.resize)}catch{}})),n.active||(r.addEventListener("input",n.resize),n.active=!0);let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==n.appliedMax&&(s==null?n.appliedMax!=null&&r.style.maxHeight===n.appliedMax&&(r.style.maxHeight=""):r.style.maxHeight=s,n.appliedMax=s),n.resize()}function K1(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.__ref,o=t.autoGrow,n=typeof o=="function"?Bt(t,t.autoGrowDeps,o):null,s=Q(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===o&&n?n:i)(t,t.state,t.context)}catch{a=null}q1(t,a)},{depth:r.path.length,label:vt(r,"autoGrow")});r.__effects||(r.__effects=[]),r.__effects.push(s),n&&(r.__exec.autoGrow=o)}var Zw=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Jw(t,e){for(let r of Object.keys(t)){if(!Xn(r)||Zw.has(r))continue;let o=Af(r);if(o){Tf(o,t,t[r]);continue}let n=t[r];if(typeof n=="string"&&/^[A-Za-z_$][\w$]*$/.test(n)){let i=n;n=function(c){return t.call(i,c)}}if(typeof n!="function")continue;let s=R1(r);Nr.has(s)||Vn(P1(s),t,n)}G1(t)}function G1(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},o=!1;for(let d of Zw){let h=t[d];typeof h=="function"&&(r[d]=h,o=!0)}if(!o)return;let n=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 b=Math.abs(g),_=Math.abs(p);if(Math.max(b,_)<n)return;let y;if(b>_*1.2)y=g<0?"left":"right";else if(_>b*1.2)y=p<0?"up":"down";else return;let x="onSwipe"+y.charAt(0).toUpperCase()+y.slice(1),k=r[x],E=r.onSwipe;k&&k.call(t,d,t,t.state,t.context),E&&E.call(t,{direction:y,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 Ua(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=Ua(n,s):r[o]=s}return r}function zm(t,e,r,o){if(!e||!t.node)return;let n=t.childExtends;if(Array.isArray(e)){let s=t.tag==="fragment",i=t.context?.document||globalThis.document,a=s?null:i?.createDocumentFragment();if(!s&&!a)return;let c=t.childProps,l=t.childrenAs,f=m=>{let b=e[m],_=b;(typeof b=="string"||typeof b=="number")&&(b={text:b});let y=c;if(typeof c=="function")try{y=c(t,b)}catch{y=null}if(l==="state"){let k=_;(typeof _=="string"||typeof _=="number")&&(k={value:_,text:_}),b=y?{...y,state:k}:{state:k}}else y&&(b=Ua(y,b));if(n&&!b.ignoreChildExtends)if(b.extends){let k=Array.isArray(b.extends)?b.extends:[b.extends],E=Array.isArray(n)?n:[n];b={...b,extends:[...E,...k]}}else b={...b,extends:n};let x=b?.key||_&&typeof _=="object"&&_.key||`${m}`;try{return ae(b,t,x,r)}catch(k){if(typeof console<"u"&&console.error){let E=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${x}" failed to construct at ${E} (initial render, skipping this row):`,k?.message||k)}return null}},u=t.__ref;if(!(o===!0&&!s&&!!u&&(r?.mountYield===!0||t.yieldChildren===!0))){for(let m=0;m<e.length;m++){let b=f(m);!s&&b?.node&&a.appendChild(b.node)}return s||t.node.appendChild(a),!0}let h=u.__childrenChunkGen=(u.__childrenChunkGen||0)+1;Am();let g=null,p=m=>{if(u.__disposed||u.__childrenChunkGen!==h){g&&g.parentNode&&g.remove();return}for(let b=m;b<e.length;b++){let _=f(b);if(_?.node&&(g?t.node.insertBefore(_.node,g):a.appendChild(_.node)),b+1<e.length&&Em()){g||(g=i.createComment("smbls-mount"),a.appendChild(g),t.node.appendChild(a));let y=b+1;Om(()=>p(y));return}}g?(g.remove(),t.node.tagName==="SELECT"&&Bf(t,!0)):t.node.appendChild(a)};return p(0),Tm(),!0}if(typeof e=="string"){let s=qw(e,t);if(Array.isArray(s))return zm(t,s,r,o)}if(typeof e=="object")for(let s in e){if(jt.has(s))continue;let i=e[s];if(!(i==null||i===!1)){if((typeof i=="string"||typeof i=="number")&&(i={text:i}),t.childProps&&(i=Ua(t.childProps,i)),n&&!i.ignoreChildExtends)if(i.extends){let a=Array.isArray(i.extends)?i.extends:[i.extends],c=Array.isArray(n)?n:[n];i={...i,extends:[...c,...a]}}else i={...i,extends:n};ae(i,t,s,r)}}}function Bf(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let o=r.options;if(!o||!o.length)return;let n=t.__ref,s=n&&n.__exec&&n.__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;let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let c=e||!(n&&n.__selectSynced);if(n&&(n.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<o.length;f++)o[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function Qw(t,e){let{children:r,content:o}=t,n=t.childExtends;if(typeof r=="function"){let u=r;try{r=u(t,t.state,t.context)}catch(m){if(r=void 0,typeof console<"u"&&console.error){let b=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${b} (initial run, treating as empty):`,m?.message||m)}}t.children=r;let d=t.__ref,h=!1,g=Bt(t,t.childrenDeps,u),p=Q(()=>{let m=h;h=!0;let b;try{b=g(t,t.state,t.context)}catch(I){if(typeof console<"u"&&console.error){let D=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${D}${m?"":" (initial tracking run)"}:`,I?.message||I)}return}if(!m||b===t.children)return;t.children=b,d.__childrenChunkGen!=null&&d.__childrenChunkGen++;let _=typeof t.onContentUpdate=="function",y=_?[]:null,x=_?[]:null,k=_?[]:null;if(Array.isArray(b)&&t.childrenAs==="state"){let I=t.childProps,D=[],W=new Map;for(let q=0;q<b.length;q++){let xt=b[q],M=I;if(typeof I=="function")try{M=I(t,xt)}catch{M=null}let ot=M&&M.key||xt&&xt.key||`${q}`;D.push(ot),W.set(ot,{rawChild:xt,childProps:M})}let Pt=new Set(D),F=d.__children.slice();for(let q of F)if(!Pt.has(q)){let xt=t[q];xt?.remove&&xt.remove(),delete t[q],x&&x.push(q)}let Y=t.childExtends,at=t.tag==="fragment",z=t.context?.document||globalThis.document,G=at?null:z?.createDocumentFragment(),Vt=new Set;for(let q of D){let xt=W.get(q),M=xt.rawChild,ot=t[q];if(ot&&ot.state){if(M&&typeof M=="object"){let Ct=ot.state,Qe=Ct.$replace||Ct.replace,nt=Ct.$update||Ct.update;try{if(typeof Qe=="function")Qe.call(Ct,M);else if(typeof nt=="function"){for(let N in Ct)if(!(N==="__element"||N==="root"||N==="parent"||N==="update")&&!Object.prototype.hasOwnProperty.call(M,N))try{Ct[N]=void 0}catch{}nt.call(Ct,M)}else for(let N in M)Ct[N]=M[N]}catch(N){if(typeof console<"u"&&console.error){let pt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${q}" failed to patch at ${pt} (reconcile, keeping its previous data for this pass):`,N?.message||N)}}}k&&k.push(q);continue}let V=M;(typeof M=="string"||typeof M=="number")&&(V={value:M,text:M});let X=xt.childProps,B=X?{...X,state:V}:{state:V};if(Y&&!B.ignoreChildExtends)if(B.extends){let Ct=Array.isArray(B.extends)?B.extends:[B.extends],Qe=Array.isArray(Y)?Y:[Y];B={...B,extends:[...Qe,...Ct]}}else B={...B,extends:Y};let dt;try{dt=ae(B,t,q,e)}catch(Ct){if(typeof console<"u"&&console.error){let Qe=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${q}" failed to construct at ${Qe} (reconcile, skipping this row):`,Ct?.message||Ct)}Vt.add(q);continue}!at&&dt?.node&&G&&G.appendChild(dt.node),y&&y.push(q)}if(!at&&G&&G.childNodes.length&&t.node&&t.node.appendChild(G),!at&&t.node){let q=null;for(let xt of D){let M=t[xt]?.node;if(!M)continue;let ot=q?q.nextSibling:t.node.firstChild;M!==ot&&t.node.insertBefore(M,ot),q=M}}d.__children=Vt.size?D.filter(q=>!Vt.has(q)):D,_&&(y.length||x.length)&&Nw(t,{added:y,removed:x,kept:k}),Bf(t,!1);return}let $=_?[...d.__children]:null;for(let I of[...d.__children]){let D=t[I];D?.remove&&D.remove(),delete t[I]}d.__children=[],zm(t,b,e),Bf(t,!1),_&&Nw(t,{added:[...d.__children],removed:$,kept:[]})},{depth:d.path.length,label:vt(d,"children")});d.__effects.push(p)}let s=zm(t,r,e,!0);if(o!=null&&!(o&&o.__ref)){let u=o;if(typeof u=="string"||typeof u=="number"?u={text:u}:typeof u!="object"&&(u={}),t.childProps&&(u=Ua(t.childProps,u)),n&&!u.ignoreChildExtends)if(u.extends){let d=Array.isArray(u.extends)?u.extends:[u.extends],h=Array.isArray(n)?n:[n];u={...u,extends:[...h,...d]}}else u={...u,extends:n};ae(u,t,"content",e)}if(r&&!s)return;let i=t.context?.components||{};{let u=Object.keys(t);for(let d=0;d<u.length;d++){let h=u[d];if(!h.endsWith("Extends")||typeof t[h]!="string")continue;let g=h.slice(0,-7);if(!g||g.charCodeAt(0)<65||g.charCodeAt(0)>90)continue;let p={extends:t[h]};delete t[h];for(let m=d+1;m<u.length;m++){let b=u[m],_=b.charCodeAt(0);if(_>=65&&_<=90||jt.has(b)||typeof t[b]=="function"&&(b.startsWith("on")||b.startsWith(".")))break;let y=t[b];y!==void 0&&(p[b]=y,delete t[b])}t[g]&&typeof t[g]=="object"?t[g]={...p,...t[g]}:t[g]=p}}let a=e?.mountYield===!0||t.yieldChildren===!0,c=Object.keys(t),l=u=>{if(jt.has(u)||typeof t[u]!="object"||t[u]===null)return;let d=u.charCodeAt(0);if(d<65||d>90)return;let h=t[u];if(!h.__ref){if(!h.extends&&!h.extend){let g=i[u]||i[`smbls.${u}`];g&&(h={...h,extends:g})}if(t.childProps&&(h=Ua(t.childProps,h)),n&&!h.ignoreChildExtends)if(h.extends){let g=Array.isArray(h.extends)?h.extends:[h.extends],p=Array.isArray(n)?n:[n];h={...h,extends:[...p,...g]}}else h={...h,extends:n};ae(h,t,u,e)}};if(!a){for(let u of c)l(u);return}Am();let f=u=>{for(let d=u;d<c.length;d++)if(l(c[d]),d+1<c.length&&Em()){let h=d+1;Om(()=>f(h));return}};f(0),Tm()}function tS(t,e,r){let{node:o}=t;if(!o)return;o.ref=t;let n=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(n){let i=n.parentNode;if(i){if(r?.position==="before"&&r.node)i.insertBefore(o,r.node);else if(r?.position==="after"&&r.node){let a=r.node.nextSibling;i.insertBefore(o,a||n)}else i.insertBefore(o,n);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(r?.position==="before"&&r.node)s.insertBefore(o,r.node);else if(r?.position==="after"&&r.node){let i=r.node.nextSibling;i?s.insertBefore(o,i):s.appendChild(o)}else s.appendChild(o)}var Hm=3;function lm(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=Hm?!1:(t.__inBeforeUpdate=!0,!0)}function pr(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===Hm&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${Hm}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function Qt(t,e,r){let o=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&Et(o,e,r);let n="on"+t,s=e[n];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&&it(l);let f=!!c;try{let u=s(e,e.state,e.context,r);if(u&&typeof u.then=="function"){let d=e.__ref;return u.catch(h=>{e.context?.plugins?.length&&Et("error",e,{hook:n,error:h})||console.error(`[DOMQL] Lifecycle "${n}" error:`,h)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(e.context?.plugins?.length&&Et("error",e,{hook:n,error:u})||console.error(`[DOMQL] Lifecycle "${n}" error:`,u),e.context?.strictMode)throw u}finally{l&&et(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var eS={blue:"#213eb0",green:"#389d34",red:"#e15c55",yellow:"#EDCB38",orange:"#e97c16",transparent:"rgba(0, 0, 0, 0)",black:"black",gray:"#4e4e50",white:"white",title:["--gray 1 -168","--gray 1 +168"],caption:["--gray 1 -68","--gray 1 +68"],paragraph:["--gray 1 -42","--gray 1 +42"],disabled:["--gray 1 -26","--gray 1 +26"],line:["--gray 1 -16","--gray 1 +16"],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"]},rS={"gradient-blue-light":`linear-gradient(to right,
58
58
  rgba(4, 116, 242, 1),
59
59
  rgba(0, 48, 103, 1)
60
60
  )`,"gradient-blue-dark":`linear-gradient(to right,
@@ -80,28 +80,28 @@ FROM ${a}${l}`},GE=t=>{let e=[],r=(o,n)=>{for(let s in o){let i=n?`${n}/${s}`:s;
80
80
  #1E54F0 36%,
81
81
  #8B4CCA 69%,
82
82
  #C66894 100%
83
- )`};var D1={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"}}}},$1={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},L1={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"}}},qw={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...D1,...$1,...L1,none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var Kw={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var Gw={ratio:1.618,subSequence:!0};var Yw={SourceSans:[{url:""}]},Xw={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 Jw={symbols:'<svg height="24" width="24"><path d="M13.843 2.7C19.063 2.7 23 6.366 23 11.228c0 3.754-2.862 6.584-6.658 6.584-3.287 0-5.007-2.318-5.007-4.609 0-2.395 1.923-4.344 4.287-4.344.566 0 1.023.12 1.309.223a.212.212 0 01.137.229l-.016.058-.514 1.18a.223.223 0 01-.245.13 2.965 2.965 0 00-.506-.046c-1.245 0-2.258 1.027-2.258 2.288 0 1.33 1.165 2.373 2.651 2.373 2.195 0 3.913-1.777 3.913-4.046 0-3.024-2.294-5.135-5.58-5.135-4.076 0-7.393 3.36-7.393 7.491a7.519 7.519 0 002.871 5.924l-4.96 3.18A12.042 12.042 0 012 14.7c0-6.617 5.313-12 11.843-12z" fill-rule="evenodd"/></svg>',logo:'<svg height="24" width="24"><path d="M13.843 2.7C19.063 2.7 23 6.366 23 11.228c0 3.754-2.862 6.584-6.658 6.584-3.287 0-5.007-2.318-5.007-4.609 0-2.395 1.923-4.344 4.287-4.344.566 0 1.023.12 1.309.223a.212.212 0 01.137.229l-.016.058-.514 1.18a.223.223 0 01-.245.13 2.965 2.965 0 00-.506-.046c-1.245 0-2.258 1.027-2.258 2.288 0 1.33 1.165 2.373 2.651 2.373 2.195 0 3.913-1.777 3.913-4.046 0-3.024-2.294-5.135-5.58-5.135-4.076 0-7.393 3.36-7.393 7.491a7.519 7.519 0 002.871 5.924l-4.96 3.18A12.042 12.042 0 012 14.7c0-6.617 5.313-12 11.843-12z" fill-rule="evenodd"/></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 Zw={tv:"(min-width: 2780px)",screenL:"(max-width: 1920px)","screenL<":"(min-width: 1920px)",screenM:"(max-width: 1680px)","screenM<":"(min-width: 1680px)",screenS:"(max-width: 1440px)","screenS<":"(min-width: 1440px)",tabletL:"(max-width: 1366px)","tabletL<":"(min-width: 1366px)",tabletM:"(max-width: 1280px)","tabletM<":"(min-width: 1280px)",tabletS:"(max-width: 1024px)","tabletS<":"(min-width: 1024px)",mobileL:"(max-width: 768px)","mobileL<":"(min-width: 768px)",mobileM:"(max-width: 560px)","mobileM<":"(min-width: 560px)",mobileS:"(max-width: 480px)","mobileS<":"(min-width: 480px)",mobileXS:"(max-width: 375px)","mobileXS<":"(min-width: 375px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var Qw={base:150,ratio:1.333,unit:"ms",subSequence:!0};var tS={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Da={version:"0.0.1",color:Hw,gradient:Ww,theme:qw,typography:Kw,spacing:Gw,font:Yw,fontFamily:Xw,timing:Qw,icons:Jw,media:Zw,sizes:tS,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Kn={};P(Kn,{A:()=>y0,AssetPicture:()=>bS,Audio:()=>wS,Avatar:()=>I0,B:()=>BS,Block:()=>eS,Box:()=>Ff,Br:()=>HS,Button:()=>x0,ButtonSet:()=>v0,COMPONENTS:()=>Eo,Caption:()=>PS,Checkbox:()=>t0,CheckboxHgroup:()=>e0,Circle:()=>gS,CircleButton:()=>S0,Clickable:()=>dS,Data:()=>VS,Dialog:()=>E0,DialogFooter:()=>T0,DialogHeader:()=>A0,Dropdown:()=>$0,DropdownList:()=>L0,DropdownParent:()=>M0,DropdownParentFocus:()=>F0,DropdownSiblingFocus:()=>N0,FileIcon:()=>p0,Flex:()=>oS,Focusable:()=>pS,FocusableComponent:()=>hS,Footnote:()=>jS,Form:()=>lS,Grid:()=>sS,Gutter:()=>aS,H1:()=>vS,H2:()=>CS,H3:()=>ES,H4:()=>AS,H5:()=>TS,H6:()=>OS,Headline:()=>FS,Hgroup:()=>YS,HgroupButton:()=>JS,HgroupRows:()=>XS,Hoverable:()=>uS,Hr:()=>zS,I:()=>US,Icon:()=>u0,IconButton:()=>C0,IconText:()=>d0,Iframe:()=>fS,Img:()=>cS,Inline:()=>rS,InlineFlex:()=>nS,InlineGrid:()=>iS,Input:()=>ZS,Italic:()=>LS,KangorooButton:()=>k0,Li:()=>WS,Link:()=>ly,Notification:()=>j0,NumberInput:()=>QS,Ol:()=>KS,P:()=>RS,Picture:()=>yS,Radio:()=>r0,RadioHgroup:()=>o0,Range:()=>D0,RouteLink:()=>b0,RouterLink:()=>fy,SHAPES:()=>Lf,Select:()=>_0,Shape:()=>Bm,Span:()=>kS,SquareButton:()=>w0,Strong:()=>IS,Subhead:()=>NS,Svg:()=>_S,Text:()=>SS,Textarea:()=>i0,TextareaWithButton:()=>a0,Theme:()=>mS,Title:()=>MS,Toggle:()=>n0,ToggleHgroup:()=>s0,Tooltip:()=>O0,TooltipHidden:()=>R0,TooltipParent:()=>P0,U:()=>DS,Ul:()=>qS,Underline:()=>$S,Video:()=>xS,depth:()=>Mf,focusableRingEnabled:()=>Df,getSystemGlobalTheme:()=>$a});var Lm={};P(Lm,{Block:()=>eS,Flex:()=>oS,Grid:()=>sS,Gutter:()=>aS,Inline:()=>rS,InlineFlex:()=>nS,InlineGrid:()=>iS});var eS={display:"block"},rS={display:"inline"},oS={display:"flex"},nS={display:"inline-flex"},sS={display:"grid"},iS={display:"inline-grid"},aS={boxSize:"C1"};var Mm={};P(Mm,{Img:()=>cS});R();var cS={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=Gt(t);return e&&e.src||t.src},srcset:t=>{let e=Gt(t);return(e?Fi(e):"")||t.srcset}}};var Fm={};P(Fm,{Form:()=>lS});var lS={tag:"form"};var Nm={};P(Nm,{Iframe:()=>fS});var fS={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var jm={};P(jm,{Clickable:()=>dS,Focusable:()=>pS,FocusableComponent:()=>hS,Hoverable:()=>uS,focusableRingEnabled:()=>Df});var M1={appearance:"none",cursor:"pointer",fontFamily:"inherit"},uS={transition:"C defaultBezier",transitionProperty:"opacity, transform",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}}},dS={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function Df(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}var pS={border:"none",outline:t=>Df(t)?"solid 0 blue.3":"none",":focus-visible":{opacity:1,outline:t=>Df(t)?"solid X blue.3":"none"},attr:{tabIndex:t=>t.tabIndex}},hS={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",style:M1};var zm={};P(zm,{Picture:()=>yS});var Vm={};P(Vm,{Theme:()=>mS,getSystemGlobalTheme:()=>$a});var Um={};P(Um,{Circle:()=>gS,SHAPES:()=>Lf,Shape:()=>Bm,default:()=>F1,depth:()=>Mf});R();var we=C(),Mf={4:{boxShadow:`rgba(0,0,0,.10) 0 2${we.unit.default} 4${we.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${we.unit.default} 6${we.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${we.unit.default} 10${we.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${we.unit.default} 16${we.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${we.unit.default} 26${we.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${we.unit.default} 42${we.unit.default}`}},qn=t=>et(t.shapeDirectionColor)||et(t.borderColor)||et(t.backgroundColor)||et(t.background),$f=t=>{let e=Ca.transition(t.transition,t);return e&&e.transition},Lf={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:qn(t),transition:$f(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:qn(t),transition:$f(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:qn(t),transition:$f(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:$f(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${qn(t)} 25%, transparent 25%), linear-gradient(315deg, ${qn(t)} 25%, transparent 25%)`},"&:after":{background:qn(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)"}}}},Bm={deps:{exec:ut,getSpacingBasedOnRatio:Te,getMediaColor:It},classlist:{shape:t=>t.deps.exec(Lf[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=Lf[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}}},gS={round:"100%"},F1=Bm;R();var $a=({context:t,state:e})=>{let r=e&&e.root,o=r&&r.globalTheme||t.designSystem&&t.designSystem.globalTheme;return o==="auto"?null:o},mS={deps:{depth:Mf},classlist:{depth:t=>!Tt(t.depth)&&t.deps.depth[t.depth]}};var yS={deps:{getSystemGlobalTheme:$a},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:$a},tag:"source",attr:{media:t=>{let{key:e,context:r,deps:o}=t,{media:n}=r.designSystem,s=o.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":n[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var Hm={};P(Hm,{AssetPicture:()=>bS});R();var bS={tag:"picture",children:t=>{let e=Gt(t);if(e)return Ni(e,t.alt)}};var Wm={};P(Wm,{Svg:()=>_S});var _S={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:r,utils:o}=e,n=r&&r.svg,s=t.spriteId||r&&r.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=o&&o.scratchSystem&&o.scratchSystem.appendSVGSprite;r&&!r.__svgCache&&(r.__svgCache={}),typeof m=="function"?m({[h]:i},{document:g}):o&&typeof o.init=="function"&&o.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(n&&n[i])return a(i);let l=Symbol.for(i),f=n[l];if(f&&n[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=n[l]=`svg-${(u>>>0).toString(36)}`,o.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var qm={};P(qm,{Video:()=>xS});R();var xS={tag:"video",controls:!0,attr:{src:t=>{let e=Gt(t);return e&&e.src||t.src}},children:t=>{let e=Gt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(r=>({tag:"source",attr:{src:r.src,type:r.format}}))},childExtends:{tag:"source"}};var Km={};P(Km,{Audio:()=>wS});R();var wS={tag:"audio",controls:!0,attr:{src:t=>{let e=Gt(t);return e&&e.src||t.src}},children:t=>{let e=Gt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(r=>({tag:"source",attr:{src:r.src,type:r.format}}))},childExtends:{tag:"source"}};var Gm={};P(Gm,{B:()=>BS,Caption:()=>PS,Data:()=>VS,Footnote:()=>jS,H1:()=>vS,H2:()=>CS,H3:()=>ES,H4:()=>AS,H5:()=>TS,H6:()=>OS,Headline:()=>FS,I:()=>US,Italic:()=>LS,P:()=>RS,Span:()=>kS,Strong:()=>IS,Subhead:()=>NS,Text:()=>SS,Title:()=>MS,U:()=>DS,Underline:()=>$S});var SS={},kS={tag:"span"},vS={tag:"h1"},CS={tag:"h2"},ES={tag:"h3"},AS={tag:"h4"},TS={tag:"h5"},OS={tag:"h6"},RS={tag:"p"},PS={tag:"caption"},IS={tag:"strong",fontWeight:"700"},DS={tag:"u"},$S={tag:"u"},LS={tag:"i"},MS={},FS={tag:"h6",fontSize:"B",fontWeight:500},NS={tag:"span",fontSize:"Z1"},jS={tag:"span",fontSize:"Z"},BS={tag:"b"},US={tag:"i"},VS={tag:"data"};var Ym={};P(Ym,{Box:()=>Ff,Br:()=>HS,Hr:()=>zS,Li:()=>WS,Ol:()=>KS,Ul:()=>qS});var N1=t=>{if(!t.context)return;let{props:e,__ref:r}=t,o=ae(e,t,{unpack:!1});r.__class=o},Ff={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:N1},zS={tag:"hr",margin:"C1 0"},HS={tag:"br"},WS={tag:"li"},qS={tag:"ul",childExtends:{extends:"Li"}},KS={tag:"ol",childExtends:{extends:"Li"}};var Xm={};P(Xm,{Hgroup:()=>YS,HgroupButton:()=>JS,HgroupRows:()=>XS});var GS=t=>{if(t.text!=null||t.html!=null)return!0;for(let e in t){let r=e.charCodeAt(0);if(r>=65&&r<=90)return!0}return!1},YS={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:GS,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:GS,margin:"0",color:"paragraph"}},XS={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},JS={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var Jm={};P(Jm,{Input:()=>ZS});var ZS={extends:["Focusable"],tag:"input",border:"none",type:"input",theme:"field",fontSize:"A",round:"C",lineHeight:"1",padding:"Z2 B",attr:{pattern:t=>t.pattern,minLength:t=>t.minlength,maxLength:t=>t.maxlength,name:t=>t.name,autocomplete:t=>t.autocomplete,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,readonly:t=>t.readonly,required:t=>t.required,type:t=>t.type}};var Zm={};P(Zm,{NumberInput:()=>QS});var QS={extends:["Flex","Input"],type:"number",boxSize:"C+X",align:"center center",textAlign:"center",round:"Y1",theme:"transparent",border:"solid gray3",borderWidth:"1px",placeholder:"0",fontWeight:"400","::-webkit-inner-spin-button":{appearance:"none"},attr:{step:t=>t.step,min:t=>t.min,max:t=>t.max}};var Qm={};P(Qm,{Checkbox:()=>t0,CheckboxHgroup:()=>e0});var t0={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:"solid X blue.3",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"}}},e0={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var ty={};P(ty,{Radio:()=>r0,RadioHgroup:()=>o0});var r0={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}},o0={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var ey={};P(ey,{Toggle:()=>n0,ToggleHgroup:()=>s0});var n0={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}},s0={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var ry={};P(ry,{Textarea:()=>i0,TextareaWithButton:()=>a0});var i0={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"}},a0={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 oy={};P(oy,{FileIcon:()=>p0,Icon:()=>u0,IconText:()=>d0});var c0=new Set,l0=(t,e)=>{if(!c0.has(t)&&(c0.add(t),typeof console<"u"&&console.warn)){let r=e&&e.__ref&&e.__ref.path,o=r&&r.length?` at <${r.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${o} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},f0=new WeakMap,j1=t=>{let e=f0.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},f0.set(t,e)),e},B1=(t,e)=>{if(!t)return null;let r=t.default||t;return typeof r=="string"?r.trim()?{[e]:r}:null:typeof r=="object"&&!Array.isArray(r)&&Object.keys(r).length?r:null},U1=(t,e,r)=>{let o=r&&r.context&&r.context.document||(typeof document<"u"?document:null);it(t);try{let n=C();n&&!n.__svgCache&&(n.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=wo(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&o&&Object.keys(s).length&&So(s,{document:o}),Object.keys(s).length>0}finally{tt()}},V1=(t,e,r,o,n)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=j1(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(n),a.pending.has(e))return!0;let l=Promise.resolve().then(()=>i(e,t)).then(f=>{let u=B1(f,r);return u?U1(s,u,o):!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},u0={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,r)=>{let{parent:o}=t,{icons:n,useIconSprite:s,verbose:i}=r&&r.designSystem,{toCamelCase:a}=r&&r.utils,c=g=>{let p=g[".isActive"];if(p)return g.call("exec",p.name||p.icon)},l=(g,p,m)=>{let{semanticIcons:_}=m&&m.designSystem,{toCamelCase:b}=m&&m.utils,y=f(g,p),k=b(y).split(/([a-z])([A-Z])/g),E=k[1]?k[0]:y.split(".")[0].split(" ")[0],O=_&&_[E];if(O){let $=y.includes(".")?"sfsymbols."+y.split(".").slice(1).join("."):"sfsymbols";return y=O[$]||O[y.split(".")[0].split(" ")[0]],{tag:"span",semanticIcons:!0,width:"A",height:"A",lineHeight:"1em",":after":{fontSize:"Z",fontWeight:"300",content:`"${y}"`,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,_=g.call("exec",g.name||g.icon||m,g);return g.call("isString",_)&&_.includes("{{")&&(_=g.call("replaceLiteralsWithObjectFields",_)),g.call("isString",_)?_:m},u=t.src,d,h=()=>{let g=f(t,e),p=g;if(g.includes(" ")){let I=g.split(" ");g=I[0]+I.slice(1).map(H=>H.charAt(0).toUpperCase()+H.slice(1)).join("")}let m=a(g),_=m.split(/([a-z])([A-Z])/g),b=l(t,e,r);if(b){Object.assign(t,b);return}let y;t.isActive&&(y=c(t));let x=o[".isActive"];o&&o.isActive&&x&&x.icon&&(y=t.call("exec",x.icon||x.Icon.name||x.Icon.icon,t)),t.call("isString",y)&&y.includes("{{")&&(y=t.call("replaceLiteralsWithObjectFields",y));let k;n[y]&&(k=y),n[m]?k=m:n[_[0]+_[1]]?k=_[0]+_[1]:n[_[0]]?k=_[0]:i&&t.warn("Can't find icon:",g,k);let E=n[k],O=o&&o.src||u;!E&&!O&&(V1(r,p,m,t,H=>{if(!(d&&d._disposed)){if(!H)return l0(p,t);h()}})||l0(p,t));let $=s&&k,D=E||O||n.noIcon;if(!(t.spriteId===$&&t.src===D&&t.node&&t.node.innerHTML)&&(t.spriteId=$,t.src=D,typeof t.html=="function"&&t.node)){let I=t.context&&t.context.designSystem;I&&it(I);try{let H=t.html(t,t.state,t.context);H!=null&&typeof H!="function"&&(t.node.innerHTML=H)}finally{I&&tt()}}};d=Z(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"}},d0={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,r=typeof t.icon=="string"&&t.icon;return t.call("exec",r||e.icon||t.name||t.sfSymbols||e.sfSymbols,t)},icon:t=>t.call("exec",t.parent.icon,t.parent)},text:t=>t.text},p0={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var uy={};P(uy,{A:()=>y0,Link:()=>ly,RouteLink:()=>b0,RouterLink:()=>fy});var La={};P(La,{default:()=>K1,getActiveRoute:()=>cy,lastLevel:()=>jf,lastPathname:()=>Nf,matchRoute:()=>sy,parseQuery:()=>iy,parseRoutePattern:()=>ny,router:()=>Ge,runGuards:()=>ay});R();var g0=/^:(.+)/,m0=/^\*$/,h0=new Map,ny=t=>{let e=h0.get(t);if(e)return e;let r=t.replace(/^\//,"").split("/"),o=[],n=!1;for(let i=0;i<r.length;i++){let a=r[i].match(g0);a?o.push({index:i,name:a[1]}):m0.test(r[i])&&(n=!0)}let s={segments:r,params:o,hasWildcard:n,pattern:t};return h0.set(t,s),s},sy=(t,e,r=0)=>{let n=t.replace(/^\//,"").split("/").filter(Boolean).slice(r),s="/"+(n[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=ny(l),u=z1(n,f);u>a&&(a=u,i=l,c=H1(n,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},z1=(t,e)=>{let{segments:r,hasWildcard:o}=e;if(!o&&r.length!==t.length&&r.length!==1&&r.length>t.length)return-1;let n=0,s=Math.min(r.length,t.length);for(let i=0;i<s;i++)if(r[i]===t[i])n+=3;else if(g0.test(r[i]))n+=1;else if(m0.test(r[i]))n+=.5;else return-1;return n},H1=(t,e)=>{let r={};for(let{index:o,name:n}of e.params)t[o]&&(r[n]=decodeURIComponent(t[o]));return r},iy=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((o,n)=>{e[n]!==void 0?(Array.isArray(e[n])||(e[n]=[e[n]]),e[n].push(o)):e[n]=o}),e},ay=async(t,e)=>{if(!t||!t.length)return!0;for(let r of t){let o=await r(e);if(o===!1)return!1;if(typeof o=="string")return o}return!0},cy=(t=0,e)=>{e||(e=typeof v<"u"?v.location.pathname:"/");let o=e.split("/")[t+1];if(o)return`/${o}`},Nf,jf=0,W1=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,q1={level:jf,pushState:!0,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof Q<"u"&&(Q.scrollingElement||Q.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0},Ge=async(t,e,r={},o={})=>{let n=e||void 0,s=n?.context?.window||v,i=n?.context?.document||Q,a={...q1,...n.context.routerOptions,...o};jf=a.lastLevel;let c=n.__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=W1(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=iy(g),_=n.node,b=p&&p!==s.location.hash.slice(1),y=h!==Nf;Nf=h;let x=c.__routerRendered,k,E,O,$;if(a.useParamsMatching){let V=sy(h,n.routes,a.level);k=V.key,E=V.routePath,O=V.content,$=V.params}else{k=cy(a.level,h),E=k;let V=n.routes;O=V?V[k||"/"]||V["/*"]:null,$={}}let D=a.scrollToNode?_:a.scrollNode;if(n.state?.root?.debugging){n.state.root.debugging=!1;return}if(!O){a.onNotFound?a.onNotFound({pathname:h,route:k,element:n}):a.silent||console.warn("[smbls/router] no content matched for path",h,"\u2014 available routes:",Object.keys(n.routes||{}));return}if(a.guards&&a.guards.length){let V={pathname:h,route:k,params:$,query:m,hash:p,element:n,state:r},rt=await ay(a.guards,V);if(rt===!1)return;if(typeof rt=="string")return Ge(rt,e,r,{...o,guards:[]})}if(a.pushState)try{s.history.pushState(r,null,h+(g||"")+(p||""))}catch{}if(y||!b){let V={route:k,routePath:E,hash:p,debugging:!1};Object.keys($).length&&(V.params=$),Object.keys(m).length&&(V.query=m),a.updateState&&n.state.update(V,{preventContentUpdate:!0})}let I=!x||x.content!==O||x.route!==k;if(y||I||a.force===!0){l&&a.removeOldElement&&n[l].remove();let V=n.__ref?.origin?.content,rt={};if(V)for(let G in V){let K=V[G];G==="__ref"||G==="props"||G==="node"||G==="parent"||G==="key"||(typeof K=="string"||typeof K=="number"||typeof K=="boolean"||typeof K=="object"&&K!==null&&!K.node&&!K.__ref)&&(rt[G]=K)}let at={...rt,...typeof O=="object"?O:{extends:O}};a.useFragment&&(at.tag="fragment");try{if(typeof n?.set!="function")return;n.set(at,{contentElementKey:l}),c.__routerRendered={content:O,route:k}}catch(G){console.error("[smbls/router] failed to render route content",h,G)}}if(a.scrollToTop&&D?.scrollTo&&D.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&O[l]?.node?.scrollTo&&O[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),p){let V=i.getElementById(p);if(V&&D?.scrollTo){let rt=V.getBoundingClientRect().top+_.scrollTop-(a.scrollToOffset||0);D.scrollTo({...a.scrollToOptions||{},top:rt,left:0})}}Sr("routeChanged",n,a)},K1=Ge;var G1=(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,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 _ of p){if(!m||!m[_]){m=null;break}m=m[_]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Ge)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}},ly={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>Mr(t,t.href)||Mr(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:G1},y0={extends:"Link"},fy={onClick:(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,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 _ of p){if(!m||!m[_]){m=null;break}m=m[_]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Ge)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}}},b0={extends:[ly,fy]};var dy={};P(dy,{Select:()=>_0});var _0={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 py={};P(py,{Button:()=>x0,ButtonSet:()=>v0,CircleButton:()=>S0,IconButton:()=>C0,KangorooButton:()=>k0,SquareButton:()=>w0});var x0={extends:["IconText","FocusableComponent"],tag:"button",minHeight:"controlH",fontSize:"Z2",type:"button",borderStyle:"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)},w0={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"},S0={extends:"SquareButton",round:"C"},k0={extends:"Button",childExtends:"IconText"},v0={tag:"nav",display:"flex",childExtends:"SquareButton"},C0={extends:["SquareButton","ClickableItem"],round:"Z"};var hy={};P(hy,{Dialog:()=>E0,DialogFooter:()=>T0,DialogHeader:()=>A0});var E0={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},A0={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},T0={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 gy={};P(gy,{Tooltip:()=>O0,TooltipHidden:()=>R0,TooltipParent:()=>P0});R();var O0={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=>bt(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)}},R0={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)}},P0={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,o=e||r;if(!o)return;let n=o&&o[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":n||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var my={};P(my,{Avatar:()=>I0});var Y1=t=>{let r=`<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(r)},I0={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 r=e.node.getAttribute("alt")||(e.key!=="no-avatar"?e.key:"");e.node.src=Y1(r)},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 yy={};P(yy,{Range:()=>D0});var D0={tag:"input",appearance:"none",width:"100%",height:"2px",outline:"none",flex:1,onInput:(t,e,r)=>{e.call("isFunction",e.onInput)?e.onInput(t,e,r):r.update({value:parseFloat(e.node.value)})},onChange:(t,e,r)=>{e.call("isFunction",e.onChange)?e.onChange(t,e,r):r.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:hn("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:hn("#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,r)=>{let o=t.call("exec",t[e],t);return(t.call("isFunction",o)?o(t,t.state):o!==void 0?o:r!==void 0?r: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 by={};P(by,{Dropdown:()=>$0,DropdownList:()=>L0,DropdownParent:()=>M0,DropdownParentFocus:()=>F0,DropdownSiblingFocus:()=>N0});var $0={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},L0={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},M0={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},F0={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()}}},N0={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 _y={};P(_y,{Notification:()=>j0});var j0={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 Eo=Object.assign({},Lm,Mm,Fm,Nm,jm,zm,Hm,Wm,Um,qm,Km,Vm,Gm,Ym,Xm,Jm,Zm,Qm,ty,ey,ry,oy,uy,dy,py,hy,gy,my,yy,by,_y);function Bf(t){if(t==null)return 0;if(typeof t!="object")return B0(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let o=0;o<t.length;o++)e=(e^Bf(t[o]))*16777619;return e>>>0}let r=Object.keys(t).sort();for(let o=0;o<r.length;o++)e=(e^B0(r[o]))*16777619,e=(e^Bf(t[r[o]]))*16777619;return e>>>0}function B0(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e}function Uf(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 n=0;n<t.length;n++)if(!Uf(t[n],e[n]))return!1;return!0}let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let n=0;n<r.length;n++){let s=r[n];if(!Object.prototype.hasOwnProperty.call(e,s)||!Uf(t[s],e[s]))return!1}return!0}function xy(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 r=!1,o={};for(let n in t)if(n in e){let s=xy(t[n],e[n]);o[n]=s,s!==t[n]&&(r=!0)}else o[n]=t[n];for(let n in e)n in t||(o[n]=e[n],r=!0);return r?o:t}function wy(t,e,r){if(!e||typeof e!="object")return t;if(!t||typeof t!="object")return e;if(r||(r=new WeakSet),r.has(e))return t;r.add(e);for(let o in e){let n=e[o];n&&typeof n=="object"&&!Array.isArray(n)&&t[o]&&typeof t[o]=="object"&&!Array.isArray(t[o])?wy(t[o],n,r):t[o]=n}return t}function Ur(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e.toString(36)}function Gn(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Ma(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Ur(e)}function U0(t){return t.split(`
84
- `).map(Ur).join(`
85
- `)}var V0={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 z0(t,e){let r=V0[t]||Ur(t),o=Ma(e),n=`_${r}-${o}`,s=Gn(t),i=Q1[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${n}{${a}}`;return`${n}
86
- ${c}`}var Q1={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"},tO="@media (hover: hover)",eO=/(?:^|[^\\]):hover(?![\w-])/,H0=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function W0(t){let e=t.split("\0"),r=[],o=[];for(let n=0;n+1<e.length;n+=2){let s=e[n],i=e[n+1];if(!i||H0(i))continue;let a=V0[s]||Ur(s),c=Ma(i),l=`_${a}-${c}`,f=Gn(s);r.push(l),o.push(`.${l}{${f}:${i}}`)}return r.join(" ")+"\0"+o.join(`
87
- `)}function q0(t,e,r){let o=t+e,n=`_c${Ur(o)}`,s=e.split("\0"),i="";for(let l=0;l+1<s.length;l+=2){let f=s[l],u=s[l+1];u&&(H0(u)||(i+=`${Gn(f)}:${u};`))}let a,c;if(t.startsWith("@media"))c=`.${n}`,a=`${t}{${c}{${i}}}`;else if(t.startsWith(":")||t.startsWith("&")){let l=t.startsWith("&")?t.slice(1):t;c=`.${n}${l}`,a=`${c}{${i}}`}else t.includes("&")?(c=t.replace("&",`.${n}`),a=`${c}{${i}}`):(c=`.${n} ${t}`,a=`${c}{${i}}`);return r!==!1&&eO.test(c)&&(a=`${tO}{${a}}`),`${n}
88
- ${a}`}var Sy=null;function zf(t){Sy=t}var Pe={structuralHash:Bf,deepEqual:Uf,mergeStructural:xy,overwriteDeep:wy,shortHash:Ur,toKebab:Gn,sanitizeValue:Ma,batchShortHash:U0,atomicCssClass:z0,batchAtomicCss:W0,compoundCssClass:q0},K0=!1,Vf=null;function G0(t){return Vf||(Vf=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(Pe.structuralHash=e.structuralHash),e.deepEqual&&(Pe.deepEqual=e.deepEqual),e.mergeStructural&&(Pe.mergeStructural=e.mergeStructural),e.overwriteDeep&&(Pe.overwriteDeep=e.overwriteDeep),e.shortHash&&(Pe.shortHash=e.shortHash),e.toKebab&&(Pe.toKebab=e.toKebab),e.sanitizeValue&&(Pe.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(Pe.batchShortHash=e.batchShortHash),e.atomicCssClass&&(Pe.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(Pe.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(Pe.compoundCssClass=e.compoundCssClass),K0=!0,Sy&&e.batchAtomicCss&&Sy({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),Vf)}function Y0(){return K0}R();var Fa={};P(Fa,{CDN_PROVIDERS:()=>de,DOMQL_EVENTS:()=>zd,DOMQ_PROPERTIES:()=>br,ENV:()=>sp,HTML_TAGS:()=>Zo,METHODS:()=>Ko,METHODS_EXL:()=>Ds,NODE_ENV:()=>ve,OPTIONS:()=>ni,PACKAGE_MANAGER_TO_CDN:()=>Er,PARSED_DOMQ_PROPERTIES:()=>Is,PROPS_METHODS:()=>_r,STATE_METHODS:()=>oo,STATE_PROPERTIES:()=>Vd,SVG_TAGS:()=>p_,TYPES:()=>Cs,UNIVERSAL_RESERVED_KEYS:()=>xl,addCaching:()=>rl,addContext:()=>el,addExtend:()=>Rp,addExtends:()=>Kt,addItemAfterEveryElement:()=>Od,addProtoToArray:()=>Ts,addRef:()=>Zc,applyCSS:()=>vy,applyDependentState:()=>Yp,applyEvent:()=>cl,applyEventUpdate:()=>ll,applyExtends:()=>m_,applyProps:()=>Js,arrayContainsOtherArray:()=>Sd,arraysEqual:()=>Pd,arrayzeValue:()=>uo,buildImgSrcset:()=>Fi,buildSourcesAndImg:()=>Ni,cache:()=>th,call:()=>yh,captureSnapshot:()=>_h,checkForStateTypes:()=>Wp,checkIfInherits:()=>al,checkIfStringIsInArray:()=>$d,clone:()=>Wd,cloneAndMergeArrayExtend:()=>zs,cloneFunction:()=>hp,concatAddExtends:()=>Ap,copyJavaScriptToClipboard:()=>jh,copyStringToClipboard:()=>Nh,createBasedOnType:()=>Jc,createElement:()=>Hp,createElementExtends:()=>jc,createExtends:()=>Ws,createExtendsFromKeys:()=>Qo,createExtendsStack:()=>zc,createIfConditionFlag:()=>gp,createInheritedState:()=>qp,createKey:()=>Us,createNestedObject:()=>Zd,createNestedObjectByKeyPath:()=>Gp,createObjectWithoutPrototype:()=>Ic,createParent:()=>Qc,createPath:()=>tl,createProps:()=>Zs,createPropsStack:()=>Yc,createRoot:()=>zp,createScope:()=>Jp,createSnapshotId:()=>Bs,customDecodeURIComponent:()=>Ud,customEncodeURIComponent:()=>Bd,cutArrayAfterValue:()=>Ad,cutArrayBeforeValue:()=>Ed,debounce:()=>Vs,debounceOnContext:()=>up,decodeNewlines:()=>jd,deepClone:()=>ft,deepContains:()=>Xd,deepDefaults:()=>Pi,deepDestringifyFunctions:()=>fe,deepExtend:()=>Nc,deepMerge:()=>st,deepMergeExtends:()=>je,deepStringifyFunctions:()=>Ls,defineSetter:()=>gh,destringifyGlobalScope:()=>Fs,detectHeightOnInit:()=>vh,detectInfiniteLoop:()=>rp,document:()=>Q,encodeNewlines:()=>Nd,error:()=>lo,excludeKeysFromObject:()=>np,exec:()=>ut,extendCachedRegistry:()=>Tp,extendStackRegistry:()=>qs,extractArrayExtend:()=>Gs,fetchLibraryData:()=>Cl,fibonacciNumberByIndex:()=>Ch,filterArrays:()=>Id,filterArraysFast:()=>Dd,finalizeExtends:()=>Hc,findClosestNumber:()=>vl,findClosestNumberInFactory:()=>Lh,findInheritedState:()=>il,findKeyPosition:()=>Md,flattenExtend:()=>tn,formatDate:()=>kh,generateHash:()=>Lc,generateHeadArrayTags:()=>kl,generateKey:()=>js,generateMetaTags:()=>Dh,get:()=>dh,getActiveRoute:()=>cy,getCDNDirUrl:()=>wl,getCDNUrl:()=>Ee,getCapitalCaseKeys:()=>Dp,getCdnProviderFromConfig:()=>sn,getChildStateInKey:()=>sl,getChildren:()=>gi,getContext:()=>Si,getCookie:()=>xp,getDB:()=>Ai,getEmotionStylesheet:()=>zh,getExtendsInElement:()=>Pp,getExtendsStack:()=>Hs,getExtendsStackRegistry:()=>Fc,getFrequencyInArray:()=>kd,getHashedExtend:()=>Ks,getImportMapScript:()=>Sh,getInObjectByPath:()=>ep,getLocalStorage:()=>Sp,getNev:()=>lp,getPageMetadata:()=>$h,getParentStateInKey:()=>nl,getPath:()=>mi,getQuery:()=>Ti,getRef:()=>hh,getRoot:()=>_i,getRootContext:()=>wi,getRootData:()=>xi,getRootState:()=>bi,getRootStateInKey:()=>ol,getSpreadChildren:()=>$p,global:()=>_d,hasFunction:()=>Ne,hasHandlerPlugin:()=>Yo,hasOwnProperty:()=>Kd,hashContent:()=>fn,inheritChildExtends:()=>Uc,inheritChildPropsExtends:()=>Bc,inheritParentProps:()=>Qs,inheritRecursiveChildExtends:()=>Vc,init:()=>ur,initProps:()=>Bp,is:()=>Wt,isArray:()=>T,isBoolean:()=>Ac,isContextComponent:()=>Lp,isCyclic:()=>op,isDOMNode:()=>Ht,isDate:()=>Oc,isDefined:()=>bt,isDevelopment:()=>wr,isEmpty:()=>Rc,isEmptyObject:()=>Gd,isEqualDeep:()=>Pc,isFunction:()=>A,isHtmlElement:()=>ks,isLocal:()=>cp,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>an,isMethod:()=>bh,isMobile:()=>bp,isNode:()=>Qe,isNot:()=>wd,isNotProduction:()=>io,isNull:()=>Tc,isNumber:()=>Fe,isObject:()=>S,isObjectLike:()=>z,isPhoto:()=>Eh,isPolyglotWritableKey:()=>er,isProduction:()=>xr,isStaging:()=>ap,isState:()=>Kp,isString:()=>w,isStringFunction:()=>pp,isTest:()=>$c,isTesting:()=>ip,isUndefined:()=>Tt,isUniversallyReservedKey:()=>xh,isUnresolvableDependency:()=>fo,isValidDependencyMap:()=>cn,isValidHtmlTag:()=>vp,isWrappedLibrary:()=>Di,joinArrays:()=>Ho,jointStacks:()=>Op,keys:()=>bl,lastLevel:()=>jf,lastPathname:()=>Nf,loadCssFile:()=>Rh,loadJavascript:()=>Ph,loadJavascriptFile:()=>Ah,loadJavascriptFileEmbedSync:()=>Oh,loadJavascriptFileSync:()=>Th,loadRemoteCSS:()=>Ih,loadRemoteScript:()=>ln,log:()=>mh,logGroupIf:()=>yp,logIf:()=>mp,lookdown:()=>fh,lookdownAll:()=>uh,lookup:()=>lh,lowercaseFirstLetter:()=>ro,makeObjectWithoutPrototype:()=>Yd,map:()=>Hd,mapStringsWithContextComponents:()=>Ys,markPolyglotSeeded:()=>Ue,matchRoute:()=>sy,matchesComponentNaming:()=>Be,memoize:()=>dp,merge:()=>gt,mergeSharedLibraries:()=>$i,nextElement:()=>vi,normalizeIgnoreList:()=>Ii,normalizeLibraryKey:()=>un,objectToString:()=>Ms,objectizeStringProperty:()=>Xs,overwrite:()=>Ns,overwriteDeep:()=>qt,overwriteShallow:()=>so,overwriteState:()=>Xp,parse:()=>_l,parseDeep:()=>pi,parseQuery:()=>iy,parseRoutePattern:()=>ny,pickupElementFromProps:()=>Kc,pickupPropsFromElement:()=>qc,polyglotSeededKeys:()=>oi,previousElement:()=>Ci,propExists:()=>Np,propertizeElement:()=>Gc,propertizeUpdate:()=>Fp,reinit:()=>ky,remove:()=>z_,removeChars:()=>Bh,removeCookie:()=>wp,removeDuplicateProps:()=>ei,removeDuplicatesInArray:()=>Wo,removeFromArray:()=>vd,removeFromObject:()=>Jd,removeNestedKeyByPath:()=>Qd,removeValueFromArray:()=>As,removeValueFromArrayAll:()=>Td,reorderArrayByValues:()=>Rd,replaceLiteralsWithObjectFields:()=>eo,replaceOctalEscapeSequences:()=>Fd,resolveAsset:()=>Gt,resolveHandler:()=>Xo,resolveSharedLibraries:()=>Fh,returnValueAsText:()=>Xc,router:()=>Ge,runGuards:()=>ay,runPluginHook:()=>At,scratchSystem:()=>En,scratchUtils:()=>Or,self:()=>xd,set:()=>ko,setActiveRootState:()=>yi,setCookie:()=>_p,setHashedExtend:()=>Mc,setInObjectByPath:()=>tp,setLocalStorage:()=>kp,setNodeStyles:()=>yl,setProps:()=>ph,setPropsPrototype:()=>ti,sharedLibrary:()=>Mh,splitPackageSpecifier:()=>Oi,spotByPath:()=>hi,srcsetFor:()=>dn,stringIncludesAny:()=>Rs,stringToObject:()=>qd,stripVersionRangePrefix:()=>Ri,swapItemsInArray:()=>Cd,syncProps:()=>ri,toCamelCase:()=>Li,toDashCase:()=>Mi,toDescriptionCase:()=>Vh,toTitleCase:()=>Uh,toggleFullscreen:()=>wh,triggerEventOn:()=>Sr,triggerEventOnUpdate:()=>Zp,trimStringFromSymbols:()=>Ld,unstackArrayOfObjects:()=>Es,update:()=>jp,updateProps:()=>Up,variables:()=>Ei,verbose:()=>rn,warn:()=>ki,window:()=>v});R();R();var oO=C(),X0=(t=oO,e)=>{let r=S(e.localFile)?e.localFile:{},o=ft(r.designSystem||{});return st(t,o,re)},nO={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},Yn=(t,e)=>{let r=!e||e===":root",o={};for(let n in t)if(n.startsWith("@media")){let s=r?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;o[n]={[s]:t[n]}}else r?o[n]=t[n]:o[`${e}${n}, ${n} ${e}`]=t[n];return o},ur=(t,e=nO)=>{let r=X0(t||{},e),o=e.scopeSelector||":root",n=e.globalTheme;if(typeof window<"u"&&window.location){let p=new URLSearchParams(window.location.search).get("globalTheme");p&&(n=p)}let s=ko({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:n,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...r},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=o);let i=zi(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&&kt(i),c&&(kt({[o]:s.CSS_VARS}),s.CSS_MEDIA_VARS&&kt(Yn(s.CSS_MEDIA_VARS,o))),a&&kt(s.reset);let g=s.animation;if(g){let p={};for(let m in g)p[`@keyframes ${m}`]=g[m];kt(p)}return(u||f)&&ya(s.svg,{document:e.document}),(h||d)&&So(s.icons,{document:e.document}),s},Hf={},ky=(t,e=Hf)=>{let r=X0(t||{},e),o=e.scopeSelector||":root",n=ko({verbose:!1,...r});return e.preventInject||(kt({[o]:n.CSS_VARS}),n.CSS_MEDIA_VARS&&kt(Yn(n.CSS_MEDIA_VARS,o)),kt(n.reset)),n},vy=(t,e=Hf)=>{kt(t)},sO=(t,e=Hf)=>{let r=e.scopeSelector||":root";kt({[r]:t.CSS_VARS}),t.CSS_MEDIA_VARS&&kt(Yn(t.CSS_MEDIA_VARS,r))};var iO=(t,e=Hf)=>{};R();var J0=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,aO=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},Cy={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},Na=(t,e)=>{if(!e)return t;let r=Array.isArray(e)?e:e.split("."),o=t;for(let n of r){if(!o||!o[n])return null;o=o[n]}return o},Z0=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=Cy:e.router=gt(e.router||{},Cy);let r=e.router,o=async(s,i)=>{let a=s.context?.window||v,c=aO(r);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=J0(f),c=f+u+d}let l=s;if(r.customRouterElement){let f=Na(s,r.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await Ge(c,l,{},{initialRender:!0,pushState:!1})},n=!Tt(t.onRenderRouter);return r&&r.initRouter&&!n&&(t.onRenderRouter=o),cO(e,r),r},Ey=(t,e)=>{if(e.router===!1)return;let r=e.router||Cy;if(!r.popState)return;let o=e.utils&&e.utils.router?e.utils.router:Ge,n=e.window||v,s=async i=>{let{pathname:a,search:c,hash:l}=n.location;a=J0(a);let f=a+c+l,u=t;if(r.customRouterElement){let d=Na(t,r.customRouterElement);d&&(u=d,t.routes&&(u.routes=t.routes))}await u.call("router",f,u,{},{pushState:!1,scrollToTop:!1,level:0,event:i})};n.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>n.removeEventListener("popstate",s))},cO=(t,e)=>{let{components:r}=t;if(e&&e.injectRouterInLinkComponent)return st(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};R();var Ay=v&&v.location?v.location.host.includes("dev."):wr(),Q0=Ay?"http://localhost:8080/get":"https://api.symbols.app/get",lO={endpoint:Q0},tk=async(t,e=lO)=>{let r=e.endpoint||Q0,o=e.serviceRoute?T(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",n;try{return n=await globalThis.fetch(r+"/?"+o,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await n.json()}catch(s){if(A(e.onError))return e.onError(s);console.error(s)}},fO=async(t,e)=>{let{editor:r}=e;if(r&&r.remote){let o=await tk(t,r),n=Ay||e.isDevelopment?fe(o):fe(o.releases[0]);r.serviceRoute?T(r.serviceRoute)?r.serviceRoute.forEach(s=>{qt(e[s],n[s.toLowerCase()])}):qt(e[r.serviceRoute],n):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{qt(e[s],n[s.toLowerCase()])})}return e},uO=async(t,e,r)=>{let{editor:o}=e;if(o&&o.remote){let n=await tk(t,o),s=Ay||e.isDevelopment?fe(n):fe(n.releases[0]);r(s)}},ek=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await fO(t,e)}catch(r){console.error(r)}},rk=(t,e,r,o)=>{if(e&&r.editor)try{r.editor.async&&uO(e,r,o||(n=>{let s=n.designSystem;S(s)&&r.utils.init(s),S(n.state)&&t.state.set(n.state)}))}catch(n){console.error(n)}};var ja=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 r of e.__teardowns)try{r()}catch(o){console.error("[smbls] destroy teardown error:",o)}e.__teardowns.length=0}try{jr(t)}catch(r){console.error("[smbls] dispose error:",r)}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(r){console.error("[analyze] destroy error:",r)}return t.__destroyed=!0,!0};var Ry={};P(Ry,{Helmet:()=>sk,applyMetadata:()=>Xn,default:()=>yO,extractMetadata:()=>hO,generateHeadHtml:()=>mO,helmetPlugin:()=>Oy,resolveMetadata:()=>Vr});R();var dO={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"}},pO=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}"]`},ok=t=>fe({v:t}).v,nk=(t,e,r,o)=>{try{return ut(t,e,r)}catch(n){console.warn(`[helmet] metadata factory for "${o}" threw; treating as unset:`,n&&n.message||n);return}},Vr=(t,e,r)=>{if(!t)return{};let o=t;w(o)&&Ne(o)&&(o=ok(o));let n=A(o)?nk(o,e,r,"metadata"):S(o)?{...o}:{};if(!S(n))return{};for(let s in n){let i=n[s];w(i)&&Ne(i)&&(i=ok(i)),A(i)?i=nk(i,e,r,s):w(i)&&Ne(i)&&(i=void 0),w(i)&&i.includes("{{")&&e?.call&&(i=e.call("replaceLiteralsWithObjectFields",i,r)),n[s]=i}return n},hO=(t,e="/",r,o)=>{let s=(t.pages||{})[e],i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=Vr(t.app.metadata,r,o);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=Vr(c,r,o);for(let f in l)a.add(f);i={...i,...l},!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"))}if(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),i["og:url"]||i.url){let c=(i["og:url"]||i.url||"").replace(/\/$/,"");if(c&&e&&e!=="/"){let l=e.startsWith("/")?e:"/"+e;i["og:url"]=c+l}}if(t.files)for(let c in i){let l=i[c];if(typeof l=="string"&&l.length>0&&!l.startsWith("/")&&!l.startsWith("http")){let f=t.files[l];f?.src&&(i[c]=f.src)}}return i},gO=(t,e)=>{let r=e.createElement(t.tag);return t.attr&&r.setAttribute(t.attr,t.key),(e.head||e.querySelector("head")).appendChild(r),r},Ba=t=>{let e=5381,r=String(t);for(let o=0;o<r.length;o++)e=(e*33^r.charCodeAt(o))>>>0;return e.toString(36)},Ty=(t,e,r,o)=>{let n=t.head||t.querySelector("head");if(!n)return;let s=new Map;for(let a of n.querySelectorAll(`[${e}]`))s.set(a.getAttribute(e),a);let i=new Set;for(let a of r)i.add(a);for(let[a,c]of s)i.has(a)||c.remove();for(let a of r){if(s.has(a))continue;let c=o(a);c&&(c.setAttribute(e,a),n.appendChild(c))}},Xn=(t,e)=>{if(!(!S(t)||!e)){for(let r in t){let o=t[r];if(o==null||r==="jsonLd"||r==="styles"||r==="scripts")continue;let n=dO[r];if(!n)continue;let s=pO(n),i=e.querySelector(s)||gO(n,e);i&&(r==="title"?i.textContent=o:n.valueAttr?i.setAttribute(n.valueAttr,o):i.setAttribute("content",o))}if(Array.isArray(t.jsonLd)){let o=t.jsonLd.filter(s=>s!=null).map(s=>w(s)?s:JSON.stringify(s)),n=o.map(Ba);Ty(e,"data-smbls-jsonld",n,s=>{let i=n.indexOf(s),a=e.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=o[i],a})}if(Array.isArray(t.styles)){let r=t.styles.filter(n=>n!=null&&String(n).trim()),o=r.map(Ba);Ty(e,"data-smbls-style",o,n=>{let s=o.indexOf(n),i=e.createElement("style");return i.textContent=String(r[s]),i})}if(Array.isArray(t.scripts)){let r=t.scripts.filter(n=>n&&(w(n)?n.trim():n.src)),o=r.map(n=>w(n)?n:String(n.src));Ty(e,"data-smbls-script",o,n=>{let s=o.indexOf(n),i=r[s],a=e.createElement("script");return w(i)?a.setAttribute("src",i):(i.src&&a.setAttribute("src",i.src),i.type&&a.setAttribute("type",i.type),i.async&&(a.async=!0),i.defer&&(a.defer=!0),i.integrity&&a.setAttribute("integrity",i.integrity),i.crossorigin&&a.setAttribute("crossorigin",i.crossorigin),i.referrerpolicy&&a.setAttribute("referrerpolicy",i.referrerpolicy),i.nomodule&&(a.noModule=!0),i.body&&(a.textContent=String(i.body))),a})}}},ct=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},mO=t=>{let e=['<meta charset="UTF-8">'],r=new Set(["charset","jsonLd","styles","scripts"]),o=!1;for(let[n,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||r.has(n)||typeof s=="function")continue;if(n==="title"){e.push(`<title>${ct(s)}</title>`);continue}if(n==="viewport"){o||(e.push(`<meta name="viewport" content="${ct(s)}">`),o=!0);continue}if(n==="canonical"){e.push(`<link rel="canonical" href="${ct(s)}">`);continue}if(n==="icon"||n==="favicon"){let f=ct(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";e.push(`<link rel="icon" href="${f}"${u}>`);continue}if(n==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${ct(h)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${ct(f)}">`)});continue}if(n==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${ct(h)}"`).join(" ");e.push(`<link rel="alternate" ${u}>`)}});continue}let i=["og:","article:","product:","fb:","profile:","book:","business:","music:","video:"],a=["twitter:","DC:","DCTERMS:"],c=i.some(f=>n.startsWith(f)),l=a.some(f=>n.startsWith(f));if(n.startsWith("http-equiv:")){let f=n.replace("http-equiv:","");e.push(`<meta http-equiv="${ct(f)}" content="${ct(s)}">`)}else if(n.startsWith("itemprop:")){let f=n.replace("itemprop:","");e.push(`<meta itemprop="${ct(f)}" content="${ct(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${ct(n)}" content="${ct(f)}">`)):e.push(`<meta property="${ct(n)}" content="${ct(s)}">`):l?e.push(`<meta name="${ct(n)}" content="${ct(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${ct(n)}" content="${ct(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${ct(n)}" content="${ct(s)}">`)}if(o||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let n of t.jsonLd){if(n==null)continue;let s=typeof n=="string"?n:JSON.stringify(n),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Ba(s)}">${i}<\/script>`)}if(Array.isArray(t.styles))for(let n of t.styles){if(n==null||!String(n).trim())continue;let s=String(n).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Ba(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let n of t.scripts){if(!n)continue;let s=typeof n=="string",i=s?n:n.src;if(!i&&!(n&&n.body))continue;let a=[];i&&a.push(`src="${ct(i)}"`),s||(n.type&&a.push(`type="${ct(n.type)}"`),n.async&&a.push("async"),n.defer&&a.push("defer"),n.integrity&&a.push(`integrity="${ct(n.integrity)}"`),n.crossorigin&&a.push(`crossorigin="${ct(n.crossorigin)}"`),n.referrerpolicy&&a.push(`referrerpolicy="${ct(n.referrerpolicy)}"`),n.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${ct(i||Ba(n.body||""))}"`;if(!s&&n.body){let l=String(n.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
89
- `)},sk={define:{metadata:(t,e,r)=>{let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Z(()=>{let s=Vr(t,e,e.state);Xn(s,o);let i=e.state?.root;S(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(n)}}},Oy={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;if(!e)return;let r=Z(()=>{let o=t.metadata;if(!o)return;let n=Vr(o,t,t.state);Xn(n,e)});t.__ref?.__effects&&t.__ref.__effects.push(r)},update(t){let e=t.metadata;if(!e)return;let r=t.context?.document||typeof document<"u"&&document;if(!r)return;let o=Vr(e,t,t.state);Xn(o,r)}},yO=sk;vr();var ik=(t,e,r,o)=>{t&&di(t,e,r,o)},ak=(t,e,r)=>{if(!t)return;let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Vr(t,e,r);Xn(n,o)},ck=async(t,e)=>{if(!t)return;let r={tag:"fragment",...t},o=async()=>{await e.set(r,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(o):await o(),r},Jn={routes:t=>t,metadata:ak,fetch:ik,$router:ck},lk=(t={})=>{let e={routes:r=>r};return t.metadata!==!1&&(e.metadata=ak),t.fetch!==!1&&(e.fetch=ik),t.router!==!1&&(e.$router=ck),e};var Py={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},Wf={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},qf={...Py,router:Wf},bO={state:{},pages:{},components:{},router:Wf,define:Jn},zr=bO;R();R();var fk=(t,e)=>z(t.extends)?t.extends:[];R();var Iy={};P(Iy,{default:()=>wO,getActiveLang:()=>Hr,getLanguages:()=>Va,getLocalStateLang:()=>Ka,initPolyglot:()=>Gf,loadTranslations:()=>Ha,polyglotPlugin:()=>Qn,setLang:()=>Wa,translate:()=>za,upsertTranslation:()=>qa});R();var dk="smbls_lang",_O="smbls_t_",xO="smbls_tv_",Zn={get(t){try{return window?.localStorage.getItem(t)}catch{return null}},set(t,e){try{window?.localStorage.setItem(t,e)}catch(r){console.warn("[polyglot] localStorage unavailable:",r.message)}},remove(t){try{window?.localStorage.removeItem(t)}catch(e){console.warn("[polyglot] localStorage unavailable:",e.message)}}},Ua={};function Hr(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||t?.state?.lang||e?.defaultLang||"en"}function Va(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var Kf=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let r=e.split("."),o=t;for(let n=0;n<r.length;n++){if(o==null)return;o=o[r[n]]}return o},uk=(t,e,r)=>{let o=e.lastIndexOf(".");if(o===-1)return t[e+"_"+r];let n=Kf(t,e.substring(0,o));if(n!=null)return n[e.substring(o+1)+"_"+r]};function za(t,e){if(!t)return"";let r=this?.context,o=r?.polyglot,n=e||this.call("getActiveLang"),s=this?.state;if(s){let l=uk(s,t,n);if(l!==void 0)return l}if(o?.translations){let l=o.translations[n];if(l){let f=Kf(l,t);if(f!==void 0)return f}}let a=(s?.root||r?.state?.root)?.translations;if(a){let l=a[n];if(l){let f=Kf(l,t);if(f!==void 0)return f}}let c=o?.defaultLang||"en";if(s){let l=uk(s,t,c);if(l!==void 0)return l}if(o?.translations){let l=o.translations[c];if(l){let f=Kf(l,t);if(f!==void 0)return f}}return t}async function Ha(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!r||!o)return;let n=r.storagePrefix||_O,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):xO);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!o.translations?.[t]){let c=Zn.get(n+t);if(c)try{let l=JSON.parse(c),f={translations:{...o.translations||{}}};f.translations[t]=l,o.update&&o.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(r.storagePrefix||"smbls")+":"+t;if(Ua[i])return Ua[i];let a=this;return Ua[i]=(async()=>{try{let c=r.fetch,l=parseInt(Zn.get(s+t),10)||0,f,u,d;if(A(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(S(c)){let g=a.getDB||(()=>e.fetch),p=A(g)?await g.call(a):e.fetch;if(!p)return;let m=c.rpc||c.from||"get_translations_if_changed",_={p_lang:t,p_cached_version:l,...c.params||{}},b=await p.rpc({from:m,params:_});if(b.error)throw r._fetchFailed||(r._fetchFailed={}),r._fetchFailed[t]=!0,b.error;let y=b.data;if(!y||!y.changed)return;f=y.translations||{},u=y.version||0,d=!0}else return;if(!d||!f)return;Zn.set(n+t,JSON.stringify(f)),u&&Zn.set(s+t,String(u));let h={translations:{...o.translations||{}}};h.translations[t]=f,o.update&&o.update(h)}catch(c){if(r.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 Ua[i]}})(),Ua[i]}async function Wa(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!o||this.call("getActiveLang")===t)return;let n=r?.storageLangKey||dk;Zn.set(n,t),r?.fetch&&await this.call("loadTranslations",t),e?.state&&(e.state.lang=t);let s=r?.translations?.[t],i={lang:t},a=l=>er(e,l,o);if(s&&typeof s=="object")for(let l in s){if(!a(l))continue;let f=s[l];(Array.isArray(f)||typeof f=="string"||typeof f=="number")&&(i[l]=f)}o.update&&o.update(i);for(let l in i)l!=="lang"&&Ue(e,l);if(s&&typeof s=="object")for(let l in s){if(!a(l))continue;let f=s[l];if(f&&typeof f=="object"&&!Array.isArray(f)&&o[l]&&typeof o[l]=="object"&&!Array.isArray(o[l])){for(let u in f)o[l][u]=f[u];Ue(e,l)}}let c=this?.context?.document||globalThis.document;if(c&&s){let l=c.querySelectorAll("[data-key]");for(let f of l){let u=f.ref;if(!u)continue;let d=u.__ref?.__exec?.text;if(typeof d=="string"&&d.includes("{{"))try{let h=u.call("replaceLiteralsWithObjectFields",d,u.state);h!=null&&f.textContent!==h&&(f.textContent=h)}catch{}}}}async function qa(t,e,r){let o=this?.context,n=o?.polyglot,s=this?.state?.root||o?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=r),n?.translations?.[e]&&(n.translations[e][t]=r),n?.fetch&&S(n.fetch)){let i=this.getDB||(()=>o.fetch),a=A(i)?await i.call(this):o.fetch;if(!a)return;let c=n.fetch.table||"translations",l=await a.upsert({from:c,data:{key:t,lang:e,text:r}});if(l?.error)throw l.error;return l.data}}async function Gf(){let t=this?.context,e=t?.polyglot;if(!e)return;let r=this?.state?.root||t?.state?.root;if(!r)return;let o=e.storageLangKey||dk,s=Zn.get(o)||Hr.call(this);r.update&&r.lang!==s&&r.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function Ka(t){try{let e=Hr.call(this),r=this?.state;if(!r)return"";let o=t.lastIndexOf(".");if(o===-1)return r[t+e]??"";let n=t.substring(0,o).split("."),s=r;for(let i=0;i<n.length;i++){if(s==null)return"";s=s[n[i]]}return s==null?"":s[t.substring(o+1)+e]??""}catch{return""}}var Qn={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,Gf.call(t))}},wO=Qn;vr();var $y={};P($y,{SYSTEM_METRICS:()=>Ga,capsizeHandler:()=>Dy,capsizePlugin:()=>Xf,computeCapsize:()=>pk,default:()=>SO,resolveFontSizePx:()=>hk,resolveMetrics:()=>gk});var Ga={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}},Yf=t=>parseFloat(t.toFixed(4)),pk=(t,e,r)=>{let{ascent:o,descent:n,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(n),l=o+c+s,f=r!==void 0?r:l/i*t,u=f/t,d=l/i,h=(o-a+s/2)/i-(u-d)/2,g=(c+s/2)/i-(u-d)/2;return{fontSize:`${Yf(t/16)}rem`,lineHeight:`${Yf(f)}px`,capHeightTrim:`${Yf(-h)}em`,baselineTrim:`${Yf(-g)}em`}},hk=(t,e)=>{if(typeof t=="number")return t;let r=e?.designSystem;if(!r)return null;let{typography:o}=r;if(o?.sequence){let s=String(t).toUpperCase(),i=o.sequence[s];if(i)return i.decimal||i.val}let n=parseFloat(t);return isNaN(n)?null:typeof t=="string"&&t.endsWith("rem")?n*(r.typography?.browserDefault||16):n},gk=(t,e)=>{let o=e?.designSystem?.font_family||{};if(t){let s=o[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(Ga[i])return Ga[i]}let n=o.default||Object.keys(o)[0];if(n){let s=o[n];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(Ga[a])return Ga[a]}}return null},Dy=(t,e,r,o)=>{if(!t)return;let n=hk(e.fontSize,o);if(!n)return;let s=gk(e.fontFamily,o);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=pk(n,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},Xf={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},SO=Xf;var Uy={};P(Uy,{PRESERVE_VALUE_KEYS:()=>$t,SKIP_INLINE_KEYS:()=>Wr,abbrToProp:()=>Dt,decode:()=>xk,encode:()=>yk,expand:()=>To,isComponentKey:()=>Ie,isSelectorKey:()=>De,parse:()=>Oo,parseFurther:()=>Po,propToAbbr:()=>Se,shorten:()=>Ya,shorthandPlugin:()=>Xa,stringify:()=>Ao,stringifyFurther:()=>Ro});var Se={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"},Dt=Object.create(null);for(let t in Se)Dt[Se[t]]=t;var Ly=Object.create(null);for(let t in Se){let e=Se[t];if(Ly[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${Ly[e]}"`);Ly[e]=t}var $t=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),Wr=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function Ie(t){return/^[A-Z]/.test(t)}function De(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function yk(t){if(!t||typeof t!="object")return"";let e=[];for(let r in t){let o=t[r];if(typeof o=="function"||o!==null&&typeof o=="object"&&!Array.isArray(o)||o===void 0)continue;let n=Se[r]||r;if(o===!0)e.push(n);else if(o===!1)e.push("!"+n);else if(Array.isArray(o)){let s=o.map(i=>Jf(i));e.push(n+":"+s.join(","))}else e.push(n+":"+Jf(o))}return e.join(" ")}function Jf(t){return String(t).replace(/ /g,"_")}function Ya(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Ya(r):r});let e={};for(let r in t){let o=t[r];if(Ie(r)){e[r]=My(o);continue}if(De(r)){e[r]=My(o);continue}let n=Se[r]||r;if($t.has(r)||$t.has(n)){e[n]=o;continue}e[n]=My(o)}return e}function My(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ya(e):e}):typeof t=="object"?Ya(t):t}function Ao(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?Ao(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Ie(o)){e[o]=mk(n);continue}if(De(o)){e[o]=mk(n);continue}let s=Se[o]||o;if($t.has(o)||$t.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Wr.has(o)||Wr.has(s)){e[s]=n;continue}if(Array.isArray(n)){if(n.some(function(a){return a!==null&&typeof a=="object"})){e[s]=n.map(function(a){return a!==null&&typeof a=="object"?Ao(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(Jf).join(","));continue}if(typeof n=="object"){e[s]=Ao(n);continue}n===!0?r.push(s):n===!1?r.push("!"+s):typeof n=="number"||typeof n=="string"&&(n.includes(",")||n.includes("_"))?e[s]=n:r.push(s+":"+Jf(n))}return r.length&&(e.in=r.join(" ")),e}function mk(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ao(e):e}):typeof t=="object"?Ao(t):t}function xk(t){if(!t||typeof t!="string")return{};let e={},r=wk(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Dt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Dt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(bk);continue}e[a]=bk(i)}return e}function wk(t){return t.trim().split(/\s+/).filter(Boolean)}function bk(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function _k(t){return t.replace(/_/g," ")}function kO(t){if(!t||typeof t!="string")return{};let e={},r=wk(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Dt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Dt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(_k);continue}e[a]=_k(i)}return e}function To(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?To(r):r});let e={};for(let r in t){let o=t[r];if(Ie(r)){e[r]=Fy(o);continue}let n=Dt[r]||r;if(De(r)&&n===r){e[r]=Fy(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Fy(o)}return e}function Fy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?To(e):e}):typeof t=="object"?To(t):t}function Oo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Oo(r):r});let e={};if(typeof t.in=="string"){let r=kO(t.in);for(let o in r)e[o]=r[o]}for(let r in t){if(r==="in")continue;let o=t[r];if(Ie(r)){e[r]=Ny(o);continue}let n=Dt[r]||r;if(De(r)&&n===r){e[r]=Ny(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Ny(o)}return e}function Ny(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Oo(e):e}):typeof t=="object"?Oo(t):t}function Sk(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function vO(t){let e="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){let o=t[r+1];if(o===","||o==="_"||o==="\\"){e+=o,r+=2;continue}}t[r]==="_"?e+=" ":e+=t[r],r++}return e}function CO(t){let e=[],r="",o=0;for(;o<t.length;){if(t[o]==="\\"&&o+1<t.length){r+=t[o]+t[o+1],o+=2;continue}if(t[o]===","){e.push(r),r="",o++;continue}r+=t[o],o++}return e.push(r),e}function kk(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 Ro(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?Ro(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Ie(o)){let i=vk(n);e[o]=kk(i)?i.in:i;continue}if(De(o)){let i=vk(n);e[o]=kk(i)?i.in:i;continue}let s=Se[o]||o;if($t.has(o)||$t.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Wr.has(o)||Wr.has(s)){e[s]=n;continue}if(Array.isArray(n)){if(n.some(function(a){return a!==null&&typeof a=="object"})){e[s]=n.map(function(a){return a!==null&&typeof a=="object"?Ro(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(Sk).join(","));continue}if(typeof n=="object"){e[s]=Ro(n);continue}if(n===!0){r.push(s);continue}if(n===!1){r.push("!"+s);continue}if(typeof n=="number"){r.push(s+":#"+n);continue}r.push(s+":"+Sk(n))}return r.length&&(e.in=r.join(" ")),e}function vk(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ro(e):e}):typeof t=="object"?Ro(t):t}function Ck(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):vO(t)}function jy(t){if(!t||typeof t!="string")return{};let e={},r=t.trim().split(/\s+/).filter(Boolean);for(let o of r){if(o.startsWith("!")){let l=o.slice(1),f=Dt[l]||l;e[f]=!1;continue}let n=o.indexOf(":");if(n===-1){let l=Dt[o]||o;e[l]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s,c=CO(i);if(c.length>1){e[a]=c.map(Ck);continue}e[a]=Ck(i)}return e}function Po(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Po(r):r});let e={};if(typeof t.in=="string"){let r=jy(t.in);for(let o in r)e[o]=r[o]}for(let r in t){if(r==="in")continue;let o=t[r];if(Ie(r)){typeof o=="string"?e[r]=jy(o):e[r]=By(o);continue}let n=Dt[r]||r;if(De(r)&&n===r){typeof o=="string"?e[r]=jy(o):e[r]=By(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=By(o)}return e}function By(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Po(e):e}):typeof t=="object"?Po(t):t}var EO={shorten:To,stringify:Oo,stringifyFurther:Po};function AO(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(o=>e(o));let r={};for(let o in t){let n=t[o];r[o]=n&&typeof n=="object"?e(n):n}return r}var TO=["components","pages","snippets"],Xa={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let o=EO[e===!0?"shorten":e];if(o){for(let n of TO)t[n]&&(t[n]=AO(t[n],o));t.app&&typeof t.app=="object"&&(t.app=o(t.app))}}};var Qy={};P(Qy,{LEVELS:()=>Ja,analyzePlugin:()=>es,attachBrowserListeners:()=>iu,attachNetworkListeners:()=>Qa,classifyEvent:()=>Gy,createAnalyzeState:()=>au,createBeaconSink:()=>Jy,createConsoleSink:()=>Yy,createDedupe:()=>Wy,createEnrich:()=>zy,createMemorySink:()=>Xy,createPipeline:()=>eu,createRedact:()=>tu,createRemoteSink:()=>ou,createSample:()=>qy,createSummarize:()=>Hy,default:()=>es,emitFetchEvent:()=>Dk,makeEvent:()=>X,meetsLevel:()=>Zf,normalizeLevel:()=>Za,resolveSinks:()=>su,summarizeElement:()=>Io});var OO=0,RO=()=>`${Date.now().toString(36)}-${(OO++).toString(36)}`,X=(t,e,r={})=>({id:RO(),ts:Date.now(),type:t,level:e,...r}),PO=t=>{let e=[],r=t,o=0;for(;r&&o<32;)r.key!=null&&e.unshift(String(r.key)),r=r.parent,o++;return e.join(" > ")},Io=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:PO(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var ts=t=>t?.context?.analyze,IO={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"}},DO=(t,{category:e,type:r,level:o})=>n=>{let s=ts(n);!s||!s.shouldCapture(e)||s.emit(X(r,o,{hook:t,element:Io(n)}))},Ek=t=>(e,r)=>{let o=ts(e);!o||!o.shouldCapture("state")||o.emit(X("state","debug",{hook:t,element:Io(e),changedKeys:r?.changedKeys||null}))},es={name:"analyze",error(t,e){let r=ts(t);if(!r||r.config.enabled===!1||!r.shouldCapture("errors"))return;let o=e?.error||e?.err||(e instanceof Error?e:null);r.emit(X("error","error",{hook:e?.hook||"error",element:Io(t),error:o,message:o?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=ts(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(X("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=ts(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=ts(t);if(!e||!e.shouldCapture("updates"))return;let r=null;t.__ref?.__analyzeUpdateStart!=null&&(r=(typeof performance<"u"?performance.now():Date.now())-t.__ref.__analyzeUpdateStart,t.__ref.__analyzeUpdateStart=null),e.emit(X("update","debug",{hook:"update",element:Io(t),durationMs:r}))},beforeStateUpdate:Ek("beforeStateUpdate"),stateUpdate:Ek("stateUpdate")};for(let[t,e]of Object.entries(IO))es[t]=DO(t,e);R();var Ja={error:0,warn:1,info:2,debug:3,trace:4};var Zf=(t,e)=>{let r=Ja[t],o=Ja[e];return r==null||o==null?!0:r<=o},Za=t=>Ja[t]!=null?t:"warn";R();var Qf=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var $O=(t,e)=>{for(let r of e)if(r instanceof RegExp){if(r.test(t))return!0}else if(typeof r=="string"&&t.toLowerCase().includes(r.toLowerCase()))return!0;return!1},LO=(t,e)=>{if(e!=="redact"){if(e==="hash"){let r=0,o=String(t);for(let n=0;n<o.length;n++)r=(r<<5)-r+o.charCodeAt(n)|0;return`#${(r>>>0).toString(36)}`}return"***"}},Vy=(t,e,r,o)=>{if(o>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>Vy(s,e,r,o+1));let n={};for(let s of Object.keys(t))if($O(s,e)||Qf.test(s)){let a=LO(t[s],r);a!==void 0&&(n[s]=a)}else n[s]=Vy(t[s],e,r,o+1);return n},tu=(t=[],e="mask")=>{let r=Array.isArray(t)?t:[t];return o=>{if(!o)return o;let{id:n,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...g}=o,p=Vy(g,r,e,0);return{id:n,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...p}}};var zy=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,r=typeof navigator<"u"?navigator.userAgent:null,o=t.config.buildHash||null,n=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=v,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:n,build:o,route:i},meta:{ua:r,viewport:c}}}},Hy=()=>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},Wy=(t=1e3,e=500)=>{let r=new Map;return o=>{if(!o)return o;let n=`${o.type}:${o.level}:${o.message||""}:${o.error?.message||""}`,s=r.get(n),i=o.ts||Date.now();if(s&&i-s<t)return null;if(r.set(n,i),r.size>e){let a=Math.ceil(e/10),c=0;for(let l of r.keys()){if(c++>=a)break;r.delete(l)}}return o}},qy=t=>e=>{if(!e)return e;let r=t[e.type];return r==null||r>=1?e:Math.random()>r?null:e},Ak={redact:t=>tu(t.config.redact||[],t.config.maskStrategy),enrich:t=>zy(t),summarize:()=>Hy(),dedupe:t=>Wy(t.config.cache?.dedupeWindowMs||1e3),sample:t=>qy(t.config.sample||{})},MO=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let r=Ak[t];return r?r(e):null}return null},eu=t=>{let e=t.config,r=Array.isArray(e.transformers)?e.transformers.slice():[],o=r.findIndex(s=>s==="redact");o>=0&&r.splice(o,1);let n=[];e.redact!==!1&&n.push(Ak.redact(t));for(let s of r){let i=MO(s,t);i&&n.push(i)}return s=>{let i=s;for(let a of n){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=n.slice(n.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}};R();R();var ru=typeof v<"u"&&typeof v.document<"u",FO=5e3,NO=50,jO=3,BO=1500,UO=1e3,Gy=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",VO=t=>{try{return JSON.stringify(t)}catch{return null}},zO=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},HO=t=>{if(!t)return null;let e=String(t),r;return(r=e.match(/Edg\/([\d.]+)/))?{name:"Edge",version:r[1]}:(r=e.match(/OPR\/([\d.]+)/))?{name:"Opera",version:r[1]}:(r=e.match(/Firefox\/([\d.]+)/))?{name:"Firefox",version:r[1]}:/Chrome\/([\d.]+)/.test(e)&&/Safari\//.test(e)?(r=e.match(/Chrome\/([\d.]+)/),{name:"Chrome",version:r[1]}):(r=e.match(/Version\/([\d.]+).*Safari/))?{name:"Safari",version:r[1]}:{name:null,version:null}},WO=()=>{if(!ru)return null;try{let t=v.document?.documentElement?.getAttribute("data-theme")||null,e=typeof v.matchMedia=="function"?v.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}},qO=()=>{if(!ru)return null;let t=v.location,e=typeof navigator<"u"?navigator:null,r=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:v.document?.referrer||null,title:v.document?.title||null,ua:e?.userAgent||null,browser:HO(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:zO(),viewport:v.innerWidth?{w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}:null,screen:r?{w:r.width||null,h:r.height||null,availW:r.availWidth||null,availH:r.availHeight||null,colorDepth:r.colorDepth||null,orientation:r.orientation?.type||null}:null,theme:WO()}},ou=(t={})=>{let e=t.url,r=typeof t.transport=="function"?t.transport:null,o=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!r)return()=>{};let n=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:Gy,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:FO,_=t.maxBatch||NO,b=t.maxRetries!=null?t.maxRetries:jO,y=t.backoffMs||BO,x=t.queueLimit||UO,k=t.sampleRate!=null?t.sampleRate:1,E=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,O=t.sessionId||E(),$=[],D=[],I=null,H=null,V=()=>{I||!$.length||(I=setTimeout(K,m))},rt=L=>{if(H)return;let ot=y*Math.pow(2,Math.max(0,L-1));H=setTimeout(()=>{if(H=null,!D.length)return;let U=D.shift();G(U.envelope,U.attempt)},ot)},at=(L,ot=!1)=>{let U=u?Ky(u):null,Y={id:O,sentAt:Date.now()};ot&&(Y.endedAt=Date.now());let j={v:1,session:Y,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:qO(),user:U?.user||null,traits:U?.traits||null,tags:U?.tags||null,events:L};if((p?Ky(p)===!0:g)&&(j.app.debug=!0),h)try{return h(j)||null}catch{return j}return j},G=async(L,ot=1)=>{if(L)try{let U=!0;if(r){let Y=await r(L);U=Y!==!1&&Y?.ok!==!1}else U=await KO(e,L,{apiKey:n,getAuth:f});!U&&ot<b&&(D.push({envelope:L,attempt:ot+1}),rt(ot+1))}catch{ot<b&&(D.push({envelope:L,attempt:ot+1}),rt(ot+1))}},K=(L=!1,ot=!1)=>{if(I&&(clearTimeout(I),I=null),!$.length&&!ot)return;let U=$;$=[];let Y=at(U,ot);if(Y){if(L&&ru){if(typeof o=="function"&&Ky(()=>o(Y)))return;if(navigator.sendBeacon&&e){let j=VO(Y);if(j)try{navigator.sendBeacon(e,new v.Blob([j],{type:"application/json"}));return}catch{}}}G(Y)}},lt=!1,Vt=()=>{lt||(lt=!0,K(!0,!0))};ru&&(v.addEventListener("pagehide",Vt,{passive:!0}),v.addEventListener("beforeunload",Vt,{passive:!0}),v.addEventListener("visibilitychange",()=>{v.document.visibilityState==="hidden"&&K(!0)},{passive:!0}));let W=L=>{if(!L||k<1&&Math.random()>k)return;lt&&(lt=!1);let ot={...L,log_type:d(L)};$.push(ot),$.length>x&&($=$.slice(-x)),$.length>=_?K():V()},wt=L=>(K(!1,!0),O=L||E(),lt=!1,W.sessionId=O,O);return W.flush=()=>K(!1),W.endSession=Vt,W.startNewSession=wt,W.sessionId=O,W},Ky=t=>{try{return t()}catch{return null}},KO=async(t,e,{apiKey:r,getAuth:o})=>{let n={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(r&&(n["X-Analyze-Key"]=r),o)try{let s=await o();s&&(n.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:n,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var GO={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},YO="\x1B[0m",nu=typeof v<"u"&&typeof v.document<"u",Yy=(t={})=>{let e=t.minLevel||null,r=console.error.bind(console),o=console.warn.bind(console),n=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?r:s.level==="warn"?o:n,a=`[analyze:${s.type}]`;if(nu)i(a,s);else{let c=GO[s.level]||"";i(`${c}${a}${YO}`,s)}}},Xy=(t,e={})=>{let r=e.max||t.config.cache?.max||500,o=new Array(r),n=0,s=0,i=a=>{o[n]=a,n=(n+1)%r,s<r&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(n-s+r)%r;for(let l=0;l<s;l++)a[l]=o[(c+l)%r];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:()=>{n=0,s=0}},i},Jy=(t={})=>{let e=t.url,r=t.batchMs!=null?t.batchMs:5e3,o=t.maxBatch||50;if(!e)return()=>{};let n=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!n.length)return;let c=JSON.stringify({events:n});n=[];let l=nu?new v.Blob([c],{type:"application/json"}):c;if(nu&&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(()=>{})};nu&&(v.addEventListener("pagehide",i,{passive:!0}),v.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(n.push(c),n.length>=o?i():s||(s=setTimeout(i,r)))};return a.flush=i,a},Tk={console:Yy,memory:Xy,beacon:Jy,remote:ou},Ok=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},su=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],r=[];for(let o of e)if(typeof o=="function")r.push(o);else if(typeof o=="string"){let n=Tk[o];if(!n)continue;r.push(o==="memory"?n(t,{}):n(o==="remote"?Ok(t,{}):{}))}else if(o&&typeof o=="object"&&o.type){let n=Tk[o.type];if(!n)continue;r.push(o.type==="memory"?n(t,o):n(o.type==="remote"?Ok(t,o):o))}return r};R();var XO=typeof v<"u"&&typeof v.document<"u",JO=new Set(["password","hidden"]),Rk=(t,e)=>{let r=0,o=null,n=null;return(...s)=>{let i=Date.now();i-r>=e?(r=i,t(...s)):(n=s,o||(o=setTimeout(()=>{r=Date.now(),o=null,n&&(t(...n),n=null)},e-(i-r))))}},Zy="__analyzeKeyPath",rs=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[Zy])return e[Zy];let r=[],o=e,n=0,s=null;for(;o&&n<64;){if(o.getAttribute){let a=o.getAttribute("data-key");a&&(s==null&&(s=a),r.unshift(a))}o=o.parentNode,n++}let i;if(r.length)i={selector:null,key:s,path:r.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[Zy]=i}catch{}return i},ZO=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let r=0,o=String(t||"");for(let n=0;n<o.length;n++)r=(r<<5)-r+o.charCodeAt(n)|0;return`#${(r>>>0).toString(36)}`}return"***"}},QO=t=>!!(!t||t.tagName==="INPUT"&&JO.has(t.type)||Qf.test(t.name||"")||Qf.test(t.id||"")||t.dataset?.analyze==="skip"),iu=t=>{if(!XO)return;let e=t.config.capture,r=t.config.throttle,o=t.__teardown,n=(s,i,a,c)=>{s.addEventListener(i,a,c),o.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(n(v,"error",s=>{t.emit(X("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}))}),n(v,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(X("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){n(v,"click",i=>{t.emit(X("pointer","info",{hook:"click",target:rs(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:Pk(i)}))},{passive:!0,capture:!0}),n(v,"dblclick",i=>{t.emit(X("pointer","info",{hook:"dblclick",target:rs(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),n(v,"contextmenu",i=>{t.emit(X("pointer","info",{hook:"contextmenu",target:rs(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=Rk(i=>{t.emit(X("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},r.pointermove);n(v,"pointermove",s,{passive:!0})}if(e.keyboard&&n(v,"keydown",s=>{t.emit(X("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:Pk(s),target:rs(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=QO(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=ZO(a.value,t.config.maskStrategy)),t.emit(X("forms","info",{hook:i.type,target:rs(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};n(v,"input",s,{passive:!0,capture:!0}),n(v,"change",s,{passive:!0,capture:!0}),n(v,"submit",i=>{t.emit(X("forms","info",{hook:"submit",target:rs(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=Rk(()=>{t.emit(X("scroll","trace",{hook:"scroll",x:v.scrollX,y:v.scrollY}))},r.scroll);n(v,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=Vs(()=>{t.emit(X("viewport","info",{hook:"resize",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))},r.resize);n(v,"resize",s,{passive:!0}),n(v,"orientationchange",()=>{t.emit(X("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),n(v.document,"visibilitychange",()=>{t.emit(X("viewport","info",{hook:"visibilitychange",hidden:v.document.hidden}))},{passive:!0}),t.emit(X("viewport","info",{hook:"initial",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(X("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(Ik)}))}catch{}return i.apply(console,a)},o.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(X("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{}o.push(()=>s.disconnect())}catch{}},Pk=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),tR=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=Ik(t.cause)),e},Ik=t=>{if(t==null)return t;if(t instanceof Error)return tR(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};R();var eR=typeof v<"u"&&typeof v.document<"u",Dk=(t,e)=>{let r=t?.analyze;if(!r||!r.shouldCapture("network"))return;let o=e.phase==="error"?"error":"info";r.emit(X("network",o,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},Qa=t=>{if(eR&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof v.fetch=="function"){let e=v.fetch.bind(v),r=function(o,n){if(n?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(o,n);let s=typeof o=="string"?o:o&&o.url||"",i=(n?.method||typeof o=="object"&&o?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(X("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(o,n).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(X("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(X("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};v.fetch=r,t.__teardown.push(()=>{v.fetch=e})}if(typeof v.XMLHttpRequest=="function"){let e=v.XMLHttpRequest,r=e.prototype.open,o=e.prototype.send;e.prototype.open=function(n,s){return this.__analyze={method:String(n).toUpperCase(),url:String(s)},r.apply(this,arguments)},e.prototype.send=function(n){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return o.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(X("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(X("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(X("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),o.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=r,e.prototype.send=o})}}};var rR={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},oR={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},nR={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},sR={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},iR=t=>{let e={...rR,...t};return e.replay&&Object.assign(e,oR),e.telemetry&&Object.assign(e,nR),e.remote&&Object.assign(e,sR),Object.assign(e,t),e},aR=64,cR=()=>{if(typeof v>"u"||!v.location)return null;try{let e=new URLSearchParams(v.location.search).get("analyze");return e||null}catch{return null}},au=(t={})=>{let e=t===!0?{}:{...t};e.capture=iR(e.capture||{});let r=cR();(r==="debug"||e.debug)&&(e.level="debug",e.debug=!0,e.capture={...e.capture,lifecycle:!0,state:!0,updates:!0,console:!0,network:!0}),r==="off"&&(e.enabled=!1),e.level=Za(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 o={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},n=()=>{o.__pipeline||(o.__pipeline=eu(o),o.__sinks=su(o))};return o.shouldCapture=s=>o.config.enabled===!1?!1:!!o.config.capture[s],o.emit=s=>{if(s&&o.config.enabled!==!1&&!o.__paused&&Zf(s.level,o.config.level)){if(!o.__ready){if(s.level!=="error"&&!o.config.captureDuringHydration)return;o.__preBuffer.length<aR&&o.__preBuffer.push(s);return}n(),$k(o,s)}},o.activate=s=>{if(o.context==null&&(o.context=s||null),o.__ready)return;o.__ready=!0;let i=o.__preBuffer;if(o.__preBuffer=[],i.length){n();for(let a of i)$k(o,a)}try{iu(o)}catch(a){console.error("[analyze] browser attach error:",a)}try{Qa(o)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of o.__onActivate||[])try{a(o)}catch(c){console.error("[analyze] onActivate error:",c)}},o.pause=()=>{o.__paused=!0},o.resume=()=>{o.__paused=!1},o.setLevel=s=>{o.config.level=Za(s)},o.setCapture=(s,i)=>{if(o.config.capture[s]=!!i,s==="network"&&i&&o.__ready)try{Qa(o)}catch(a){console.error("[analyze] network attach error:",a)}},o.query=s=>o.__memory?o.__memory.query(s):[],o.snapshot=()=>o.__memory?o.__memory.snapshot():[],o.emitNetwork=s=>{if(!o.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";o.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})},o.flush=()=>{if(o.__sinks)for(let s of o.__sinks)typeof s.flush=="function"&&s.flush()},o.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(o.config.sinks)?o.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(o.__sinks)for(let c of o.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},o.replay=()=>({initialSnapshot:o.__initialSnapshot,events:o.snapshot()}),o.destroy=()=>{for(let s of o.__teardown)try{s()}catch{}o.__teardown=[],o.__ready=!1,o.__paused=!0},o.__onActivate=[],o.onActivate=s=>{o.__onActivate.push(s)},o},$k=(t,e)=>{let r=t.__pipeline(e);if(r==null)return;let o=Array.isArray(r)?r:[r];for(let n of o){if(typeof t.config.onEvent=="function")try{t.config.onEvent(n)}catch{}for(let s of t.__sinks)try{s(n)}catch(i){console.error("[analyze] sink error:",i)}}};var rb={};P(rb,{Inspect:()=>cu,inspectPlugin:()=>eb});R();function Lk(t){return w(t)?t:T(t)?t.find(e=>w(e)):""}function tb(t){if(!t)return;let e=t.__ref.__componentKey,r=t.extends&&Lk(t.extends),o=t.parent&&t.parent.childExtends&&Lk(t.parent.childExtends);return(e||r||o||"").split("_")[0].split(".")[0].split("+")[0]}function lu(t){if(!t||!t.__ref)return;let{components:e,pages:r,editor:o}=t.context,n=tb(t);return o&&o.onInitInspect&&!o.onInitInspect(n,t,t.state)?lu(t.parent):n&&(e[n]||r[n])?t:lu(t.parent)}var lR=(t,e,r)=>{let o=r.window||window;o.onkeydown=n=>{n.altKey&&n.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},o.onkeyup=n=>{t.state.preventSelect&&(!n.altKey||!n.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},cu={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:lR,onMousemove:(t,e,r)=>{let o=t.target.ref,n=lu(o),s=e.Inspector.state;if(!n||!r.debugging||!n.__ref)return s.update({area:!1});let i=tb(n),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=n.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,r)=>{if(!r.debugging)return;let o=t.target.ref,n=lu(o);if(!n)return;let s=tb(n);if(!s)return;let i=o.context.editor;if(i&&i.onInspect)return i.onInspect(s,o,o.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return o.context.socket?.emit&&o.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(S(e)){let{Content:r,...o}=e;for(let n in o)Kn[n]||(o[n].__ref||(o[n].__ref={}),o[n].__ref.__componentKey||(o[n].__ref.__componentKey=n))}},onBeforeUpdate:(t,e,r)=>{let{area:o}=r,n=r.area&&r.parent.debugging,s;if(!n)s="display: none !important";else if(o){let{x:i,y:a,width:c,height:l}=o;s=`
83
+ )`};var Y1={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"}}}},X1={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},Z1={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"}}},oS={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...Y1,...X1,...Z1,none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var nS={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var sS={ratio:1.618,subSequence:!0};var iS={SourceSans:[{url:""}]},aS={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 cS={symbols:'<svg height="24" width="24"><path d="M13.843 2.7C19.063 2.7 23 6.366 23 11.228c0 3.754-2.862 6.584-6.658 6.584-3.287 0-5.007-2.318-5.007-4.609 0-2.395 1.923-4.344 4.287-4.344.566 0 1.023.12 1.309.223a.212.212 0 01.137.229l-.016.058-.514 1.18a.223.223 0 01-.245.13 2.965 2.965 0 00-.506-.046c-1.245 0-2.258 1.027-2.258 2.288 0 1.33 1.165 2.373 2.651 2.373 2.195 0 3.913-1.777 3.913-4.046 0-3.024-2.294-5.135-5.58-5.135-4.076 0-7.393 3.36-7.393 7.491a7.519 7.519 0 002.871 5.924l-4.96 3.18A12.042 12.042 0 012 14.7c0-6.617 5.313-12 11.843-12z" fill-rule="evenodd"/></svg>',logo:'<svg height="24" width="24"><path d="M13.843 2.7C19.063 2.7 23 6.366 23 11.228c0 3.754-2.862 6.584-6.658 6.584-3.287 0-5.007-2.318-5.007-4.609 0-2.395 1.923-4.344 4.287-4.344.566 0 1.023.12 1.309.223a.212.212 0 01.137.229l-.016.058-.514 1.18a.223.223 0 01-.245.13 2.965 2.965 0 00-.506-.046c-1.245 0-2.258 1.027-2.258 2.288 0 1.33 1.165 2.373 2.651 2.373 2.195 0 3.913-1.777 3.913-4.046 0-3.024-2.294-5.135-5.58-5.135-4.076 0-7.393 3.36-7.393 7.491a7.519 7.519 0 002.871 5.924l-4.96 3.18A12.042 12.042 0 012 14.7c0-6.617 5.313-12 11.843-12z" fill-rule="evenodd"/></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 lS={tv:"(min-width: 2780px)",screenL:"(max-width: 1920px)","screenL<":"(min-width: 1920px)",screenM:"(max-width: 1680px)","screenM<":"(min-width: 1680px)",screenS:"(max-width: 1440px)","screenS<":"(min-width: 1440px)",tabletL:"(max-width: 1366px)","tabletL<":"(min-width: 1366px)",tabletM:"(max-width: 1280px)","tabletM<":"(min-width: 1280px)",tabletS:"(max-width: 1024px)","tabletS<":"(min-width: 1024px)",mobileL:"(max-width: 768px)","mobileL<":"(min-width: 768px)",mobileM:"(max-width: 560px)","mobileM<":"(min-width: 560px)",mobileS:"(max-width: 480px)","mobileS<":"(min-width: 480px)",mobileXS:"(max-width: 375px)","mobileXS<":"(min-width: 375px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var fS={base:150,ratio:1.333,unit:"ms",subSequence:!0};var uS={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Va={version:"0.0.1",color:eS,gradient:rS,theme:oS,typography:nS,spacing:sS,font:iS,fontFamily:aS,timing:fS,icons:cS,media:lS,sizes:uS,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Qn={};P(Qn,{A:()=>T0,AssetPicture:()=>OS,Audio:()=>IS,Avatar:()=>z0,B:()=>ZS,Block:()=>dS,Box:()=>Wf,Br:()=>e0,Button:()=>P0,ButtonSet:()=>L0,COMPONENTS:()=>Po,Caption:()=>VS,Checkbox:()=>u0,CheckboxHgroup:()=>d0,Circle:()=>ES,CircleButton:()=>D0,Clickable:()=>kS,Data:()=>QS,Dialog:()=>F0,DialogFooter:()=>j0,DialogHeader:()=>N0,Dropdown:()=>W0,DropdownList:()=>q0,DropdownParent:()=>K0,DropdownParentFocus:()=>G0,DropdownSiblingFocus:()=>Y0,FileIcon:()=>v0,Flex:()=>hS,Focusable:()=>vS,FocusableComponent:()=>CS,Footnote:()=>XS,Form:()=>xS,Grid:()=>mS,Gutter:()=>bS,H1:()=>LS,H2:()=>MS,H3:()=>FS,H4:()=>NS,H5:()=>jS,H6:()=>BS,Headline:()=>GS,Hgroup:()=>i0,HgroupButton:()=>c0,HgroupRows:()=>a0,Hoverable:()=>SS,Hr:()=>t0,I:()=>JS,Icon:()=>S0,IconButton:()=>M0,IconText:()=>k0,Iframe:()=>wS,Img:()=>_S,Inline:()=>pS,InlineFlex:()=>gS,InlineGrid:()=>yS,Input:()=>l0,Italic:()=>qS,KangorooButton:()=>$0,Li:()=>r0,Link:()=>Sy,Notification:()=>X0,NumberInput:()=>f0,Ol:()=>n0,P:()=>US,Picture:()=>TS,Radio:()=>p0,RadioHgroup:()=>h0,Range:()=>H0,RouteLink:()=>O0,RouterLink:()=>ky,SHAPES:()=>zf,Select:()=>R0,Shape:()=>Qm,Span:()=>$S,SquareButton:()=>I0,Strong:()=>zS,Subhead:()=>YS,Svg:()=>RS,Text:()=>DS,Textarea:()=>y0,TextareaWithButton:()=>b0,Theme:()=>AS,Title:()=>KS,Toggle:()=>g0,ToggleHgroup:()=>m0,Tooltip:()=>B0,TooltipHidden:()=>U0,TooltipParent:()=>V0,U:()=>HS,Ul:()=>o0,Underline:()=>WS,Video:()=>PS,depth:()=>Hf,focusableRingEnabled:()=>Uf,getSystemGlobalTheme:()=>za});var Gm={};P(Gm,{Block:()=>dS,Flex:()=>hS,Grid:()=>mS,Gutter:()=>bS,Inline:()=>pS,InlineFlex:()=>gS,InlineGrid:()=>yS});var dS={display:"block"},pS={display:"inline"},hS={display:"flex"},gS={display:"inline-flex"},mS={display:"grid"},yS={display:"inline-grid"},bS={boxSize:"C1"};var Ym={};P(Ym,{Img:()=>_S});R();var _S={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=Kt(t);return e&&e.src||t.src},srcset:t=>{let e=Kt(t);return(e?Wi(e):"")||t.srcset}}};var Xm={};P(Xm,{Form:()=>xS});var xS={tag:"form"};var Zm={};P(Zm,{Iframe:()=>wS});var wS={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var Jm={};P(Jm,{Clickable:()=>kS,Focusable:()=>vS,FocusableComponent:()=>CS,Hoverable:()=>SS,focusableRingEnabled:()=>Uf});var J1={appearance:"none",cursor:"pointer",fontFamily:"inherit"},SS={transition:"C defaultBezier",transitionProperty:"opacity, transform",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}}},kS={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function Uf(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}var vS={border:"none",outline:t=>Uf(t)?"solid 0 currentColor":"none",":focus-visible":{opacity:1,outline:t=>Uf(t)?"solid X currentColor":"none"},attr:{tabIndex:t=>t.tabIndex}},CS={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",style:J1};var ry={};P(ry,{Picture:()=>TS});var ey={};P(ey,{Theme:()=>AS,getSystemGlobalTheme:()=>za});var ty={};P(ty,{Circle:()=>ES,SHAPES:()=>zf,Shape:()=>Qm,default:()=>Q1,depth:()=>Hf});R();var Se=C(),Hf={4:{boxShadow:`rgba(0,0,0,.10) 0 2${Se.unit.default} 4${Se.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${Se.unit.default} 6${Se.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${Se.unit.default} 10${Se.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${Se.unit.default} 16${Se.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${Se.unit.default} 26${Se.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${Se.unit.default} 42${Se.unit.default}`}},Jn=t=>rt(t.shapeDirectionColor)||rt(t.borderColor)||rt(t.backgroundColor)||rt(t.background),Vf=t=>{let e=$a.transition(t.transition,t);return e&&e.transition},zf={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:Jn(t),transition:Vf(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:Jn(t),transition:Vf(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:Jn(t),transition:Vf(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:Vf(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${Jn(t)} 25%, transparent 25%), linear-gradient(315deg, ${Jn(t)} 25%, transparent 25%)`},"&:after":{background:Jn(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)"}}}},Qm={deps:{exec:ft,getSpacingBasedOnRatio:Oe,getMediaColor:Rt},classlist:{shape:t=>t.deps.exec(zf[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=zf[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}}},ES={round:"100%"},Q1=Qm;R();var za=({context:t,state:e})=>{let r=e&&e.root,o=r&&r.globalTheme||t.designSystem&&t.designSystem.globalTheme;return o==="auto"?null:o},AS={deps:{depth:Hf},classlist:{depth:t=>!At(t.depth)&&t.deps.depth[t.depth]}};var TS={deps:{getSystemGlobalTheme:za},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:za},tag:"source",attr:{media:t=>{let{key:e,context:r,deps:o}=t,{media:n}=r.designSystem,s=o.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":n[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var oy={};P(oy,{AssetPicture:()=>OS});R();var OS={tag:"picture",children:t=>{let e=Kt(t);if(e)return qi(e,t.alt)}};var ny={};P(ny,{Svg:()=>RS});var RS={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:r,utils:o}=e,n=r&&r.svg,s=t.spriteId||r&&r.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=o&&o.scratchSystem&&o.scratchSystem.appendSVGSprite;r&&!r.__svgCache&&(r.__svgCache={}),typeof m=="function"?m({[h]:i},{document:g}):o&&typeof o.init=="function"&&o.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(n&&n[i])return a(i);let l=Symbol.for(i),f=n[l];if(f&&n[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=n[l]=`svg-${(u>>>0).toString(36)}`,o.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var sy={};P(sy,{Video:()=>PS});R();var PS={tag:"video",controls:!0,attr:{src:t=>{let e=Kt(t);return e&&e.src||t.src}},children:t=>{let e=Kt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(r=>({tag:"source",attr:{src:r.src,type:r.format}}))},childExtends:{tag:"source"}};var iy={};P(iy,{Audio:()=>IS});R();var IS={tag:"audio",controls:!0,attr:{src:t=>{let e=Kt(t);return e&&e.src||t.src}},children:t=>{let e=Kt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(r=>({tag:"source",attr:{src:r.src,type:r.format}}))},childExtends:{tag:"source"}};var ay={};P(ay,{B:()=>ZS,Caption:()=>VS,Data:()=>QS,Footnote:()=>XS,H1:()=>LS,H2:()=>MS,H3:()=>FS,H4:()=>NS,H5:()=>jS,H6:()=>BS,Headline:()=>GS,I:()=>JS,Italic:()=>qS,P:()=>US,Span:()=>$S,Strong:()=>zS,Subhead:()=>YS,Text:()=>DS,Title:()=>KS,U:()=>HS,Underline:()=>WS});var DS={},$S={tag:"span"},LS={tag:"h1"},MS={tag:"h2"},FS={tag:"h3"},NS={tag:"h4"},jS={tag:"h5"},BS={tag:"h6"},US={tag:"p"},VS={tag:"caption"},zS={tag:"strong",fontWeight:"700"},HS={tag:"u"},WS={tag:"u"},qS={tag:"i"},KS={},GS={tag:"h6",fontSize:"B",fontWeight:500},YS={tag:"span",fontSize:"Z1"},XS={tag:"span",fontSize:"Z"},ZS={tag:"b"},JS={tag:"i"},QS={tag:"data"};var cy={};P(cy,{Box:()=>Wf,Br:()=>e0,Hr:()=>t0,Li:()=>r0,Ol:()=>n0,Ul:()=>o0});var tO=t=>{if(!t.context)return;let{props:e,__ref:r}=t,o=le(e,t,{unpack:!1});r.__class=o},Wf={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:tO},t0={tag:"hr",margin:"C1 0"},e0={tag:"br"},r0={tag:"li"},o0={tag:"ul",childExtends:{extends:"Li"}},n0={tag:"ol",childExtends:{extends:"Li"}};var ly={};P(ly,{Hgroup:()=>i0,HgroupButton:()=>c0,HgroupRows:()=>a0});var s0=t=>{if(t.text!=null||t.html!=null)return!0;for(let e in t){let r=e.charCodeAt(0);if(r>=65&&r<=90)return!0}return!1},i0={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:s0,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:s0,margin:"0",color:"paragraph"}},a0={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},c0={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var fy={};P(fy,{Input:()=>l0});var l0={extends:["Focusable"],tag:"input",border:"none",type:"input",theme:"field",fontSize:"A",round:"C",lineHeight:"1",padding:"Z2 B",attr:{pattern:t=>t.pattern,minLength:t=>t.minlength,maxLength:t=>t.maxlength,name:t=>t.name,autocomplete:t=>t.autocomplete,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,readonly:t=>t.readonly,required:t=>t.required,type:t=>t.type}};var uy={};P(uy,{NumberInput:()=>f0});var f0={extends:["Flex","Input"],type:"number",boxSize:"C+X",align:"center center",textAlign:"center",round:"Y1",theme:"transparent",border:"solid gray3",borderWidth:"1px",placeholder:"0",fontWeight:"400","::-webkit-inner-spin-button":{appearance:"none"},attr:{step:t=>t.step,min:t=>t.min,max:t=>t.max}};var dy={};P(dy,{Checkbox:()=>u0,CheckboxHgroup:()=>d0});var u0={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:"solid X currentColor",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"}}},d0={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var py={};P(py,{Radio:()=>p0,RadioHgroup:()=>h0});var p0={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}},h0={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var hy={};P(hy,{Toggle:()=>g0,ToggleHgroup:()=>m0});var g0={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}},m0={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var gy={};P(gy,{Textarea:()=>y0,TextareaWithButton:()=>b0});var y0={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"}},b0={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 my={};P(my,{FileIcon:()=>v0,Icon:()=>S0,IconText:()=>k0});var _0=new Set,x0=(t,e)=>{if(!_0.has(t)&&(_0.add(t),typeof console<"u"&&console.warn)){let r=e&&e.__ref&&e.__ref.path,o=r&&r.length?` at <${r.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${o} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},w0=new WeakMap,eO=t=>{let e=w0.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},w0.set(t,e)),e},rO=(t,e)=>{if(!t)return null;let r=t.default||t;return typeof r=="string"?r.trim()?{[e]:r}:null:typeof r=="object"&&!Array.isArray(r)&&Object.keys(r).length?r:null},oO=(t,e,r)=>{let o=r&&r.context&&r.context.document||(typeof document<"u"?document:null);it(t);try{let n=C();n&&!n.__svgCache&&(n.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=Eo(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&o&&Object.keys(s).length&&Ao(s,{document:o}),Object.keys(s).length>0}finally{et()}},nO=(t,e,r,o,n)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=eO(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(n),a.pending.has(e))return!0;let l=Promise.resolve().then(()=>i(e,t)).then(f=>{let u=rO(f,r);return u?oO(s,u,o):!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},S0={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,r)=>{let{parent:o}=t,{icons:n,useIconSprite:s,verbose:i}=r&&r.designSystem,{toCamelCase:a}=r&&r.utils,c=g=>{let p=g[".isActive"];if(p)return g.call("exec",p.name||p.icon)},l=(g,p,m)=>{let{semanticIcons:b}=m&&m.designSystem,{toCamelCase:_}=m&&m.utils,y=f(g,p),k=_(y).split(/([a-z])([A-Z])/g),E=k[1]?k[0]:y.split(".")[0].split(" ")[0],O=b&&b[E];if(O){let $=y.includes(".")?"sfsymbols."+y.split(".").slice(1).join("."):"sfsymbols";return y=O[$]||O[y.split(".")[0].split(" ")[0]],{tag:"span",semanticIcons:!0,width:"A",height:"A",lineHeight:"1em",":after":{fontSize:"Z",fontWeight:"300",content:`"${y}"`,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,b=g.call("exec",g.name||g.icon||m,g);return g.call("isString",b)&&b.includes("{{")&&(b=g.call("replaceLiteralsWithObjectFields",b)),g.call("isString",b)?b: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(W=>W.charAt(0).toUpperCase()+W.slice(1)).join("")}let m=a(g),b=m.split(/([a-z])([A-Z])/g),_=l(t,e,r);if(_){Object.assign(t,_);return}let y;t.isActive&&(y=c(t));let x=o[".isActive"];o&&o.isActive&&x&&x.icon&&(y=t.call("exec",x.icon||x.Icon.name||x.Icon.icon,t)),t.call("isString",y)&&y.includes("{{")&&(y=t.call("replaceLiteralsWithObjectFields",y));let k;n[y]&&(k=y),n[m]?k=m:n[b[0]+b[1]]?k=b[0]+b[1]:n[b[0]]?k=b[0]:i&&t.warn("Can't find icon:",g,k);let E=n[k],O=o&&o.src||u;!E&&!O&&(nO(r,p,m,t,W=>{if(!(d&&d._disposed)){if(!W)return x0(p,t);h()}})||x0(p,t));let $=s&&k,I=E||O||n.noIcon;if(!(t.spriteId===$&&t.src===I&&t.node&&t.node.innerHTML)&&(t.spriteId=$,t.src=I,typeof t.html=="function"&&t.node)){let D=t.context&&t.context.designSystem;D&&it(D);try{let W=t.html(t,t.state,t.context);W!=null&&typeof W!="function"&&(t.node.innerHTML=W)}finally{D&&et()}}};d=Q(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"}},k0={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,r=typeof t.icon=="string"&&t.icon;return t.call("exec",r||e.icon||t.name||t.sfSymbols||e.sfSymbols,t)},icon:t=>t.call("exec",t.parent.icon,t.parent)},text:t=>t.text},v0={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var vy={};P(vy,{A:()=>T0,Link:()=>Sy,RouteLink:()=>O0,RouterLink:()=>ky});var Ha={};P(Ha,{default:()=>lO,getActiveRoute:()=>wy,lastLevel:()=>Kf,lastPathname:()=>qf,matchRoute:()=>by,parseQuery:()=>_y,parseRoutePattern:()=>yy,router:()=>Je,runGuards:()=>xy});R();var E0=/^:(.+)/,A0=/^\*$/,C0=new Map,yy=t=>{let e=C0.get(t);if(e)return e;let r=t.replace(/^\//,"").split("/"),o=[],n=!1;for(let i=0;i<r.length;i++){let a=r[i].match(E0);a?o.push({index:i,name:a[1]}):A0.test(r[i])&&(n=!0)}let s={segments:r,params:o,hasWildcard:n,pattern:t};return C0.set(t,s),s},by=(t,e,r=0)=>{let n=t.replace(/^\//,"").split("/").filter(Boolean).slice(r),s="/"+(n[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=yy(l),u=sO(n,f);u>a&&(a=u,i=l,c=iO(n,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},sO=(t,e)=>{let{segments:r,hasWildcard:o}=e;if(!o&&r.length!==t.length&&r.length!==1&&r.length>t.length)return-1;let n=0,s=Math.min(r.length,t.length);for(let i=0;i<s;i++)if(r[i]===t[i])n+=3;else if(E0.test(r[i]))n+=1;else if(A0.test(r[i]))n+=.5;else return-1;return n},iO=(t,e)=>{let r={};for(let{index:o,name:n}of e.params)t[o]&&(r[n]=decodeURIComponent(t[o]));return r},_y=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((o,n)=>{e[n]!==void 0?(Array.isArray(e[n])||(e[n]=[e[n]]),e[n].push(o)):e[n]=o}),e},xy=async(t,e)=>{if(!t||!t.length)return!0;for(let r of t){let o=await r(e);if(o===!1)return!1;if(typeof o=="string")return o}return!0},wy=(t=0,e)=>{e||(e=typeof v<"u"?v.location.pathname:"/");let o=e.split("/")[t+1];if(o)return`/${o}`},qf,Kf=0,aO=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,cO={level:Kf,pushState:!0,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof tt<"u"&&(tt.scrollingElement||tt.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0},Je=async(t,e,r={},o={})=>{let n=e||void 0,s=n?.context?.window||v,i=n?.context?.document||tt,a={...cO,...n.context.routerOptions,...o};Kf=a.lastLevel;let c=n.__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=aO(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=_y(g),b=n.node,_=p&&p!==s.location.hash.slice(1),y=h!==qf;qf=h;let x=c.__routerRendered,k,E,O,$;if(a.useParamsMatching){let F=by(h,n.routes,a.level);k=F.key,E=F.routePath,O=F.content,$=F.params}else{k=wy(a.level,h),E=k;let F=n.routes;O=F?F[k||"/"]||F["/*"]:null,$={}}let I=a.scrollToNode?b:a.scrollNode;if(n.state?.root?.debugging){n.state.root.debugging=!1;return}if(!O){a.onNotFound?a.onNotFound({pathname:h,route:k,element:n}):a.silent||console.warn("[smbls/router] no content matched for path",h,"\u2014 available routes:",Object.keys(n.routes||{}));return}if(a.guards&&a.guards.length){let F={pathname:h,route:k,params:$,query:m,hash:p,element:n,state:r},Y=await xy(a.guards,F);if(Y===!1)return;if(typeof Y=="string")return Je(Y,e,r,{...o,guards:[]})}if(a.pushState)try{s.history.pushState(r,null,h+(g||"")+(p||""))}catch{}if(y||!_){let F={route:k,routePath:E,hash:p,debugging:!1};Object.keys($).length&&(F.params=$),Object.keys(m).length&&(F.query=m),a.updateState&&n.state.update(F,{preventContentUpdate:!0})}let D=!x||x.content!==O||x.route!==k;if(y||D||a.force===!0){l&&a.removeOldElement&&n[l].remove();let F=n.__ref?.origin?.content,Y={};if(F)for(let z in F){let G=F[z];z==="__ref"||z==="props"||z==="node"||z==="parent"||z==="key"||(typeof G=="string"||typeof G=="number"||typeof G=="boolean"||typeof G=="object"&&G!==null&&!G.node&&!G.__ref)&&(Y[z]=G)}let at={...Y,...typeof O=="object"?O:{extends:O}};a.useFragment&&(at.tag="fragment");try{if(typeof n?.set!="function")return;n.set(at,{contentElementKey:l}),c.__routerRendered={content:O,route:k}}catch(z){console.error("[smbls/router] failed to render route content",h,z)}}let Pt=!y&&_;if(a.scrollToTop&&!Pt&&I?.scrollTo&&I.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&O[l]?.node?.scrollTo&&O[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),p){let F=i.getElementById(p.slice(1));if(F&&I?.scrollTo){let Y=s.getComputedStyle?s.getComputedStyle(F):null,at=Y&&parseFloat(Y.scrollMarginTop)||0,z=F.getBoundingClientRect().top+I.scrollTop-at-(a.scrollToOffset||0);I.scrollTo({...a.scrollToOptions||{},top:z,left:0})}}Cr("routeChanged",n,a)},lO=Je;var fO=(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,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 b of p){if(!m||!m[b]){m=null;break}m=m[b]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Je)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}},Sy={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>jr(t,t.href)||jr(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:fO},T0={extends:"Link"},ky={onClick:(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,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 b of p){if(!m||!m[b]){m=null;break}m=m[b]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Je)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}}},O0={extends:[Sy,ky]};var Cy={};P(Cy,{Select:()=>R0});var R0={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 Ey={};P(Ey,{Button:()=>P0,ButtonSet:()=>L0,CircleButton:()=>D0,IconButton:()=>M0,KangorooButton:()=>$0,SquareButton:()=>I0});var P0={extends:["IconText","FocusableComponent"],tag:"button",minHeight:"controlH",fontSize:"Z2",type:"button",borderStyle:"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)},I0={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"},D0={extends:"SquareButton",round:"C"},$0={extends:"Button",childExtends:"IconText"},L0={tag:"nav",display:"flex",childExtends:"SquareButton"},M0={extends:["SquareButton","ClickableItem"],round:"Z"};var Ay={};P(Ay,{Dialog:()=>F0,DialogFooter:()=>j0,DialogHeader:()=>N0});var F0={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},N0={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},j0={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 Ty={};P(Ty,{Tooltip:()=>B0,TooltipHidden:()=>U0,TooltipParent:()=>V0});R();var B0={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=>yt(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)}},U0={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)}},V0={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,o=e||r;if(!o)return;let n=o&&o[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":n||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var Oy={};P(Oy,{Avatar:()=>z0});var uO=t=>{let r=`<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(r)},z0={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 r=e.node.getAttribute("alt")||(e.key!=="no-avatar"?e.key:"");e.node.src=uO(r)},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 Ry={};P(Ry,{Range:()=>H0});var H0={tag:"input",appearance:"none",width:"100%",height:"2px",outline:"none",flex:1,onInput:(t,e,r)=>{e.call("isFunction",e.onInput)?e.onInput(t,e,r):r.update({value:parseFloat(e.node.value)})},onChange:(t,e,r)=>{e.call("isFunction",e.onChange)?e.onChange(t,e,r):r.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:xn("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:xn("#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,r)=>{let o=t.call("exec",t[e],t);return(t.call("isFunction",o)?o(t,t.state):o!==void 0?o:r!==void 0?r: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 Py={};P(Py,{Dropdown:()=>W0,DropdownList:()=>q0,DropdownParent:()=>K0,DropdownParentFocus:()=>G0,DropdownSiblingFocus:()=>Y0});var W0={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},q0={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},K0={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},G0={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()}}},Y0={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 Iy={};P(Iy,{Notification:()=>X0});var X0={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 Po=Object.assign({},Gm,Ym,Xm,Zm,Jm,ry,oy,ny,ty,sy,iy,ey,ay,cy,ly,fy,uy,dy,py,hy,gy,my,vy,Cy,Ey,Ay,Ty,Oy,Ry,Py,Iy);function Gf(t){if(t==null)return 0;if(typeof t!="object")return Z0(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let o=0;o<t.length;o++)e=(e^Gf(t[o]))*16777619;return e>>>0}let r=Object.keys(t).sort();for(let o=0;o<r.length;o++)e=(e^Z0(r[o]))*16777619,e=(e^Gf(t[r[o]]))*16777619;return e>>>0}function Z0(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e}function Yf(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 n=0;n<t.length;n++)if(!Yf(t[n],e[n]))return!1;return!0}let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let n=0;n<r.length;n++){let s=r[n];if(!Object.prototype.hasOwnProperty.call(e,s)||!Yf(t[s],e[s]))return!1}return!0}function Dy(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 r=!1,o={};for(let n in t)if(n in e){let s=Dy(t[n],e[n]);o[n]=s,s!==t[n]&&(r=!0)}else o[n]=t[n];for(let n in e)n in t||(o[n]=e[n],r=!0);return r?o:t}function $y(t,e,r){if(!e||typeof e!="object")return t;if(!t||typeof t!="object")return e;if(r||(r=new WeakSet),r.has(e))return t;r.add(e);for(let o in e){let n=e[o];n&&typeof n=="object"&&!Array.isArray(n)&&t[o]&&typeof t[o]=="object"&&!Array.isArray(t[o])?$y(t[o],n,r):t[o]=n}return t}function Hr(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e.toString(36)}function ts(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Wa(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Hr(e)}function J0(t){return t.split(`
84
+ `).map(Hr).join(`
85
+ `)}var Q0={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 tk(t,e){let r=Q0[t]||Hr(t),o=Wa(e),n=`_${r}-${o}`,s=ts(t),i=gO[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${n}{${a}}`;return`${n}
86
+ ${c}`}var gO={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"},mO="@media (hover: hover)",yO=/(?:^|[^\\]):hover(?![\w-])/,ek=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function rk(t){let e=t.split("\0"),r=[],o=[];for(let n=0;n+1<e.length;n+=2){let s=e[n],i=e[n+1];if(!i||ek(i))continue;let a=Q0[s]||Hr(s),c=Wa(i),l=`_${a}-${c}`,f=ts(s);r.push(l),o.push(`.${l}{${f}:${i}}`)}return r.join(" ")+"\0"+o.join(`
87
+ `)}function ok(t,e,r){let o=t+e,n=`_c${Hr(o)}`,s=e.split("\0"),i="";for(let l=0;l+1<s.length;l+=2){let f=s[l],u=s[l+1];u&&(ek(u)||(i+=`${ts(f)}:${u};`))}let a,c;if(t.startsWith("@media"))c=`.${n}`,a=`${t}{${c}{${i}}}`;else if(t.startsWith(":")||t.startsWith("&")){let l=t.startsWith("&")?t.slice(1):t;c=`.${n}${l}`,a=`${c}{${i}}`}else t.includes("&")?(c=t.replace("&",`.${n}`),a=`${c}{${i}}`):(c=`.${n} ${t}`,a=`${c}{${i}}`);return r!==!1&&yO.test(c)&&(a=`${mO}{${a}}`),`${n}
88
+ ${a}`}var Ly=null;function Zf(t){Ly=t}var De={structuralHash:Gf,deepEqual:Yf,mergeStructural:Dy,overwriteDeep:$y,shortHash:Hr,toKebab:ts,sanitizeValue:Wa,batchShortHash:J0,atomicCssClass:tk,batchAtomicCss:rk,compoundCssClass:ok},nk=!1,Xf=null;function sk(t){return Xf||(Xf=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(De.structuralHash=e.structuralHash),e.deepEqual&&(De.deepEqual=e.deepEqual),e.mergeStructural&&(De.mergeStructural=e.mergeStructural),e.overwriteDeep&&(De.overwriteDeep=e.overwriteDeep),e.shortHash&&(De.shortHash=e.shortHash),e.toKebab&&(De.toKebab=e.toKebab),e.sanitizeValue&&(De.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(De.batchShortHash=e.batchShortHash),e.atomicCssClass&&(De.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(De.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(De.compoundCssClass=e.compoundCssClass),nk=!0,Ly&&e.batchAtomicCss&&Ly({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),Xf)}function ik(){return nk}R();var qa={};P(qa,{CDN_PROVIDERS:()=>ge,DOMQL_EVENTS:()=>Zd,DOMQ_PROPERTIES:()=>wr,ENV:()=>pp,HTML_TAGS:()=>on,METHODS:()=>Jo,METHODS_EXL:()=>Us,NODE_ENV:()=>Ce,OPTIONS:()=>di,PACKAGE_MANAGER_TO_CDN:()=>Or,PARSED_DOMQ_PROPERTIES:()=>Bs,PROPS_METHODS:()=>Sr,STATE_METHODS:()=>io,STATE_PROPERTIES:()=>Xd,SVG_TAGS:()=>C_,TYPES:()=>Ds,UNIVERSAL_RESERVED_KEYS:()=>Tl,addCaching:()=>fl,addContext:()=>ll,addExtend:()=>Np,addExtends:()=>Ue,addItemAfterEveryElement:()=>Fd,addProtoToArray:()=>Ms,addRef:()=>il,applyCSS:()=>Fy,applyDependentState:()=>oh,applyEvent:()=>ml,applyEventUpdate:()=>yl,applyExtends:()=>T_,applyProps:()=>si,arrayContainsOtherArray:()=>Rd,arraysEqual:()=>jd,arrayzeValue:()=>go,buildImgSrcset:()=>Wi,buildSourcesAndImg:()=>qi,cache:()=>ch,call:()=>Ch,captureSnapshot:()=>Ah,checkForStateTypes:()=>Qp,checkIfInherits:()=>gl,checkIfStringIsInArray:()=>Vd,clone:()=>Qd,cloneAndMergeArrayExtend:()=>Zs,cloneFunction:()=>Sp,collectExtendsList:()=>nn,concatAddExtends:()=>Lp,copyJavaScriptToClipboard:()=>Kh,copyStringToClipboard:()=>qh,createBasedOnType:()=>sl,createElement:()=>Jp,createElementExtends:()=>Kc,createExtends:()=>Qs,createExtendsFromKeys:()=>sn,createExtendsStack:()=>Zc,createIfConditionFlag:()=>kp,createInheritedState:()=>th,createKey:()=>Ys,createNestedObject:()=>ip,createNestedObjectByKeyPath:()=>rh,createObjectWithoutPrototype:()=>Bc,createParent:()=>al,createPath:()=>cl,createProps:()=>ii,createPropsStack:()=>ol,createRoot:()=>Zp,createScope:()=>sh,createSnapshotId:()=>Gs,customDecodeURIComponent:()=>Yd,customEncodeURIComponent:()=>Gd,cutArrayAfterValue:()=>Ld,cutArrayBeforeValue:()=>$d,debounce:()=>Xs,debounceOnContext:()=>_p,decodeNewlines:()=>Kd,deepClone:()=>lt,deepContains:()=>np,deepDefaults:()=>ji,deepDestringifyFunctions:()=>de,deepExtend:()=>qc,deepMerge:()=>st,deepMergeExtends:()=>Ve,deepStringifyFunctions:()=>zs,defineSetter:()=>kh,destringifyGlobalScope:()=>Ws,detectHeightOnInit:()=>Ih,detectInfiniteLoop:()=>fp,document:()=>tt,encodeNewlines:()=>qd,error:()=>po,excludeKeysFromObject:()=>dp,exec:()=>ft,extendCachedRegistry:()=>Mp,extendStackRegistry:()=>ti,extractArrayExtend:()=>ri,fetchLibraryData:()=>Dl,fibonacciNumberByIndex:()=>Dh,filterArrays:()=>Bd,filterArraysFast:()=>Ud,finalizeExtends:()=>Jc,findClosestNumber:()=>Il,findClosestNumberInFactory:()=>zh,findInheritedState:()=>hl,findKeyPosition:()=>Hd,flattenExtend:()=>an,formatDate:()=>Ph,generateHash:()=>zc,generateHeadArrayTags:()=>Pl,generateKey:()=>Ks,generateMetaTags:()=>Uh,get:()=>xh,getActiveRoute:()=>wy,getCDNDirUrl:()=>Ol,getCDNUrl:()=>Ae,getCapitalCaseKeys:()=>Up,getCdnProviderFromConfig:()=>dn,getChildStateInKey:()=>pl,getChildren:()=>ki,getContext:()=>Ri,getCookie:()=>Tp,getDB:()=>Li,getEmotionStylesheet:()=>Zh,getExtendsInElement:()=>jp,getExtendsStack:()=>Js,getExtendsStackRegistry:()=>Wc,getFrequencyInArray:()=>Pd,getHashedExtend:()=>ei,getImportMapScript:()=>Rh,getInObjectByPath:()=>lp,getLocalStorage:()=>Rp,getNev:()=>yp,getPageMetadata:()=>Vh,getParentStateInKey:()=>dl,getPath:()=>vi,getQuery:()=>Mi,getRef:()=>Sh,getRoot:()=>Ai,getRootContext:()=>Oi,getRootData:()=>Ti,getRootState:()=>Ei,getRootStateInKey:()=>ul,getSpreadChildren:()=>Vp,global:()=>Ad,hasFunction:()=>Be,hasHandlerPlugin:()=>tn,hasOwnProperty:()=>ep,hashContent:()=>mn,inheritChildExtends:()=>Yc,inheritChildPropsExtends:()=>Gc,inheritParentProps:()=>ai,inheritRecursiveChildExtends:()=>Xc,init:()=>hr,initProps:()=>Gp,is:()=>Wt,isArray:()=>T,isBoolean:()=>Lc,isContextComponent:()=>zp,isCyclic:()=>up,isDOMNode:()=>Ht,isDate:()=>Fc,isDefined:()=>yt,isDevelopment:()=>vr,isEmpty:()=>Nc,isEmptyObject:()=>rp,isEqualDeep:()=>jc,isFunction:()=>A,isHtmlElement:()=>Ps,isLocal:()=>mp,isLoudDevRuntime:()=>It,isMalformedDependency:()=>pn,isMethod:()=>Eh,isMobile:()=>Ep,isNode:()=>or,isNot:()=>Od,isNotProduction:()=>lo,isNull:()=>Mc,isNumber:()=>je,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>$h,isPolyglotWritableKey:()=>sr,isProduction:()=>kr,isStaging:()=>gp,isState:()=>eh,isString:()=>w,isStringFunction:()=>wp,isTest:()=>Vc,isTesting:()=>hp,isUndefined:()=>At,isUniversallyReservedKey:()=>Th,isUnresolvableDependency:()=>ho,isValidDependencyMap:()=>hn,isValidHtmlTag:()=>Ip,isWrappedLibrary:()=>Ui,joinArrays:()=>Yo,jointStacks:()=>Fp,keys:()=>El,lastLevel:()=>Kf,lastPathname:()=>qf,loadCssFile:()=>Nh,loadJavascript:()=>jh,loadJavascriptFile:()=>Lh,loadJavascriptFileEmbedSync:()=>Fh,loadJavascriptFileSync:()=>Mh,loadRemoteCSS:()=>Bh,loadRemoteScript:()=>gn,log:()=>vh,logGroupIf:()=>Cp,logIf:()=>vp,lookdown:()=>bh,lookdownAll:()=>_h,lookup:()=>yh,lowercaseFirstLetter:()=>so,makeObjectWithoutPrototype:()=>op,map:()=>Jd,mapStringsWithContextComponents:()=>oi,markPolyglotSeeded:()=>He,matchRoute:()=>by,matchesComponentNaming:()=>ze,memoize:()=>xp,merge:()=>ht,mergeSharedLibraries:()=>Vi,nextElement:()=>Ii,normalizeIgnoreList:()=>Bi,normalizeLibraryKey:()=>yn,objectToString:()=>Hs,objectizeStringProperty:()=>ni,overwrite:()=>qs,overwriteDeep:()=>qt,overwriteShallow:()=>co,overwriteState:()=>nh,parse:()=>Al,parseDeep:()=>wi,parseQuery:()=>_y,parseRoutePattern:()=>yy,pickupElementFromProps:()=>el,pickupPropsFromElement:()=>tl,polyglotSeededKeys:()=>ui,previousElement:()=>Di,propExists:()=>qp,propertizeElement:()=>rl,propertizeUpdate:()=>Wp,reinit:()=>My,remove:()=>ex,removeChars:()=>Gh,removeCookie:()=>Op,removeDuplicateProps:()=>li,removeDuplicatesInArray:()=>Xo,removeFromArray:()=>Id,removeFromObject:()=>sp,removeNestedKeyByPath:()=>ap,removeValueFromArray:()=>Ls,removeValueFromArrayAll:()=>Md,reorderArrayByValues:()=>Nd,replaceLiteralsWithObjectFields:()=>no,replaceOctalEscapeSequences:()=>Wd,resolveAsset:()=>Kt,resolveHandler:()=>en,resolveSharedLibraries:()=>Wh,returnValueAsText:()=>nl,router:()=>Je,runGuards:()=>xy,runPluginHook:()=>Et,scratchSystem:()=>In,scratchUtils:()=>Ir,self:()=>Td,set:()=>To,setActiveRootState:()=>Ci,setCookie:()=>Ap,setHashedExtend:()=>Hc,setInObjectByPath:()=>cp,setLocalStorage:()=>Pp,setNodeStyles:()=>Cl,setProps:()=>wh,setPropsPrototype:()=>ci,sharedLibrary:()=>Hh,splitPackageSpecifier:()=>Fi,spotByPath:()=>Si,srcsetFor:()=>bn,stringIncludesAny:()=>Ns,stringToObject:()=>tp,stripVersionRangePrefix:()=>Ni,swapItemsInArray:()=>Dd,syncProps:()=>fi,toCamelCase:()=>zi,toDashCase:()=>Hi,toDescriptionCase:()=>Xh,toPriorityOrder:()=>pe,toTitleCase:()=>Yh,toggleFullscreen:()=>Oh,triggerEventOn:()=>Cr,triggerEventOnUpdate:()=>ih,trimStringFromSymbols:()=>zd,unstackArrayOfObjects:()=>$s,update:()=>Kp,updateProps:()=>Yp,variables:()=>$i,verbose:()=>ln,warn:()=>Pi,window:()=>v});R();R();var _O=C(),ak=(t=_O,e)=>{let r=S(e.localFile)?e.localFile:{},o=lt(r.designSystem||{});return st(t,o,ne)},xO={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},es=(t,e)=>{let r=!e||e===":root",o={};for(let n in t)if(n.startsWith("@media")){let s=r?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;o[n]={[s]:t[n]}}else r?o[n]=t[n]:o[`${e}${n}, ${n} ${e}`]=t[n];return o},hr=(t,e=xO)=>{let r=ak(t||{},e),o=e.scopeSelector||":root",n=e.globalTheme;if(typeof window<"u"&&window.location){let p=new URLSearchParams(window.location.search).get("globalTheme");p&&(n=p)}let s=To({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:n,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...r},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=o);let i=Ji(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({[o]:s.CSS_VARS}),s.CSS_MEDIA_VARS&&St(es(s.CSS_MEDIA_VARS,o))),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(u||f)&&Ca(s.svg,{document:e.document}),(h||d)&&Ao(s.icons,{document:e.document}),s},Jf={},My=(t,e=Jf)=>{let r=ak(t||{},e),o=e.scopeSelector||":root",n=To({verbose:!1,...r});return e.preventInject||(St({[o]:n.CSS_VARS}),n.CSS_MEDIA_VARS&&St(es(n.CSS_MEDIA_VARS,o)),St(n.reset)),n},Fy=(t,e=Jf)=>{St(t)},wO=(t,e=Jf)=>{let r=e.scopeSelector||":root";St({[r]:t.CSS_VARS}),t.CSS_MEDIA_VARS&&St(es(t.CSS_MEDIA_VARS,r))};var SO=(t,e=Jf)=>{};R();var ck=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,kO=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},Ny={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},Ka=(t,e)=>{if(!e)return t;let r=Array.isArray(e)?e:e.split("."),o=t;for(let n of r){if(!o||!o[n])return null;o=o[n]}return o},lk=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=Ny:e.router=ht(e.router||{},Ny);let r=e.router,o=async(s,i)=>{let a=s.context?.window||v,c=kO(r);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=ck(f),c=f+u+d}let l=s;if(r.customRouterElement){let f=Ka(s,r.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await Je(c,l,{},{initialRender:!0,pushState:!1})},n=!At(t.onRenderRouter);return r&&r.initRouter&&!n&&(t.onRenderRouter=o),vO(e,r),r},jy=(t,e)=>{if(e.router===!1)return;let r=e.router||Ny;if(!r.popState)return;let o=e.utils&&e.utils.router?e.utils.router:Je,n=e.window||v,s=async i=>{let{pathname:a,search:c,hash:l}=n.location;a=ck(a);let f=a+c+l,u=t;if(r.customRouterElement){let d=Ka(t,r.customRouterElement);d&&(u=d,t.routes&&(u.routes=t.routes))}await u.call("router",f,u,{},{pushState:!1,scrollToTop:!1,level:0,event:i})};n.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>n.removeEventListener("popstate",s))},vO=(t,e)=>{let{components:r}=t;if(e&&e.injectRouterInLinkComponent)return st(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};R();var By=v&&v.location?v.location.host.includes("dev."):vr(),fk=By?"http://localhost:8080/get":"https://api.symbols.app/get",CO={endpoint:fk},uk=async(t,e=CO)=>{let r=e.endpoint||fk,o=e.serviceRoute?T(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",n;try{return n=await globalThis.fetch(r+"/?"+o,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await n.json()}catch(s){if(A(e.onError))return e.onError(s);console.error(s)}},EO=async(t,e)=>{let{editor:r}=e;if(r&&r.remote){let o=await uk(t,r),n=By||e.isDevelopment?de(o):de(o.releases[0]);r.serviceRoute?T(r.serviceRoute)?r.serviceRoute.forEach(s=>{qt(e[s],n[s.toLowerCase()])}):qt(e[r.serviceRoute],n):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{qt(e[s],n[s.toLowerCase()])})}return e},AO=async(t,e,r)=>{let{editor:o}=e;if(o&&o.remote){let n=await uk(t,o),s=By||e.isDevelopment?de(n):de(n.releases[0]);r(s)}},dk=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await EO(t,e)}catch(r){console.error(r)}},pk=(t,e,r,o)=>{if(e&&r.editor)try{r.editor.async&&AO(e,r,o||(n=>{let s=n.designSystem;S(s)&&r.utils.init(s),S(n.state)&&t.state.set(n.state)}))}catch(n){console.error(n)}};var Ga=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 r of e.__teardowns)try{r()}catch(o){console.error("[smbls] destroy teardown error:",o)}e.__teardowns.length=0}try{Vr(t)}catch(r){console.error("[smbls] dispose error:",r)}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(r){console.error("[analyze] destroy error:",r)}return t.__destroyed=!0,!0};var Vy={};P(Vy,{Helmet:()=>mk,applyMetadata:()=>ns,default:()=>DO,extractMetadata:()=>RO,generateHeadHtml:()=>IO,helmetPlugin:()=>Uy,resolveMetadata:()=>Wr});R();var TO={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"}},OO=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}"]`},hk=t=>de({v:t}).v,gk=(t,e,r,o)=>{try{return ft(t,e,r)}catch(n){console.warn(`[helmet] metadata factory for "${o}" threw; treating as unset:`,n&&n.message||n);return}},Wr=(t,e,r)=>{if(!t)return{};let o=t;w(o)&&Be(o)&&(o=hk(o));let n=A(o)?gk(o,e,r,"metadata"):S(o)?{...o}:{};if(!S(n))return{};for(let s in n){let i=n[s];w(i)&&Be(i)&&(i=hk(i)),A(i)?i=gk(i,e,r,s):w(i)&&Be(i)&&(i=void 0),w(i)&&i.includes("{{")&&e?.call&&(i=e.call("replaceLiteralsWithObjectFields",i,r)),n[s]=i}return n},RO=(t,e="/",r,o)=>{let s=(t.pages||{})[e],i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=Wr(t.app.metadata,r,o);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=Wr(c,r,o);for(let f in l)a.add(f);i={...i,...l},!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"))}if(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),i["og:url"]||i.url){let c=(i["og:url"]||i.url||"").replace(/\/$/,"");if(c&&e&&e!=="/"){let l=e.startsWith("/")?e:"/"+e;i["og:url"]=c+l}}if(t.files)for(let c in i){let l=i[c];if(typeof l=="string"&&l.length>0&&!l.startsWith("/")&&!l.startsWith("http")){let f=t.files[l];f?.src&&(i[c]=f.src)}}return i},PO=(t,e)=>{let r=e.createElement(t.tag);return t.attr&&r.setAttribute(t.attr,t.key),(e.head||e.querySelector("head")).appendChild(r),r},os=t=>{let e=5381,r=String(t);for(let o=0;o<r.length;o++)e=(e*33^r.charCodeAt(o))>>>0;return e.toString(36)},rs=(t,e,r,o)=>{let n=t.head||t.querySelector("head");if(!n)return;let s=new Map;for(let a of n.querySelectorAll(`[${e}]`))s.set(a.getAttribute(e),a);let i=new Set;for(let a of r)i.add(a);for(let[a,c]of s)i.has(a)||c.remove();for(let a of r){if(s.has(a))continue;let c=o(a);c&&(c.setAttribute(e,a),n.appendChild(c))}},ns=(t,e)=>{if(!(!S(t)||!e)){for(let r in t){let o=t[r];if(o==null||r==="jsonLd"||r==="styles"||r==="scripts"||r==="alternate"||r==="favicons"||r==="icon"||r==="favicon")continue;let n=TO[r];if(!n)continue;let s=OO(n),i=e.querySelector(s)||PO(n,e);i&&(r==="title"?i.textContent=o:n.valueAttr?i.setAttribute(n.valueAttr,o):i.setAttribute("content",o))}if(Array.isArray(t.jsonLd)){let o=t.jsonLd.filter(s=>s!=null).map(s=>w(s)?s:JSON.stringify(s)),n=o.map(os);rs(e,"data-smbls-jsonld",n,s=>{let i=n.indexOf(s),a=e.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=o[i],a})}if(Array.isArray(t.styles)){let r=t.styles.filter(n=>n!=null&&String(n).trim()),o=r.map(os);rs(e,"data-smbls-style",o,n=>{let s=o.indexOf(n),i=e.createElement("style");return i.textContent=String(r[s]),i})}if(Array.isArray(t.scripts)){let r=t.scripts.filter(n=>n&&(w(n)?n.trim():n.src)),o=r.map(n=>w(n)?n:String(n.src));rs(e,"data-smbls-script",o,n=>{let s=o.indexOf(n),i=r[s],a=e.createElement("script");return w(i)?a.setAttribute("src",i):(i.src&&a.setAttribute("src",i.src),i.type&&a.setAttribute("type",i.type),i.async&&(a.async=!0),i.defer&&(a.defer=!0),i.integrity&&a.setAttribute("integrity",i.integrity),i.crossorigin&&a.setAttribute("crossorigin",i.crossorigin),i.referrerpolicy&&a.setAttribute("referrerpolicy",i.referrerpolicy),i.nomodule&&(a.noModule=!0),i.body&&(a.textContent=String(i.body))),a})}if(Array.isArray(t.alternate)){let r=t.alternate.filter(n=>S(n)),o=r.map(n=>`${n.hreflang||""}|${n.href||""}`);rs(e,"data-smbls-alternate",o,n=>{let s=o.indexOf(n),i=e.createElement("link");i.setAttribute("rel","alternate");for(let[a,c]of Object.entries(r[s]))i.setAttribute(a,c);return i})}if(Array.isArray(t.favicons)){let r=t.favicons.filter(n=>n!=null),o=r.map(n=>S(n)?os(JSON.stringify(n)):String(n));rs(e,"data-smbls-favicon",o,n=>{let s=o.indexOf(n),i=r[s],a=e.createElement("link");if(a.setAttribute("rel","icon"),S(i))for(let[c,l]of Object.entries(i))a.setAttribute(c,l);else a.setAttribute("href",String(i));return a})}if(t.icon||t.favicon){let r=String(t.icon||t.favicon),o=r.endsWith(".svg")?"image/svg+xml":r.endsWith(".png")?"image/png":"";rs(e,"data-smbls-single-icon",[r],n=>{let s=e.createElement("link");return s.setAttribute("rel","icon"),s.setAttribute("href",n),o&&s.setAttribute("type",o),s})}}},ct=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},IO=t=>{let e=['<meta charset="UTF-8">'],r=new Set(["charset","jsonLd","styles","scripts"]),o=!1;for(let[n,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||r.has(n)||typeof s=="function")continue;if(n==="title"){e.push(`<title>${ct(s)}</title>`);continue}if(n==="viewport"){o||(e.push(`<meta name="viewport" content="${ct(s)}">`),o=!0);continue}if(n==="canonical"){e.push(`<link rel="canonical" href="${ct(s)}">`);continue}if(n==="icon"||n==="favicon"){let f=ct(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";e.push(`<link rel="icon" href="${f}"${u}>`);continue}if(n==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${ct(h)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${ct(f)}">`)});continue}if(n==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${ct(h)}"`).join(" ");e.push(`<link rel="alternate" ${u}>`)}});continue}let i=["og:","article:","product:","fb:","profile:","book:","business:","music:","video:"],a=["twitter:","DC:","DCTERMS:"],c=i.some(f=>n.startsWith(f)),l=a.some(f=>n.startsWith(f));if(n.startsWith("http-equiv:")){let f=n.replace("http-equiv:","");e.push(`<meta http-equiv="${ct(f)}" content="${ct(s)}">`)}else if(n.startsWith("itemprop:")){let f=n.replace("itemprop:","");e.push(`<meta itemprop="${ct(f)}" content="${ct(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${ct(n)}" content="${ct(f)}">`)):e.push(`<meta property="${ct(n)}" content="${ct(s)}">`):l?e.push(`<meta name="${ct(n)}" content="${ct(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${ct(n)}" content="${ct(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${ct(n)}" content="${ct(s)}">`)}if(o||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let n of t.jsonLd){if(n==null)continue;let s=typeof n=="string"?n:JSON.stringify(n),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${os(s)}">${i}<\/script>`)}if(Array.isArray(t.styles))for(let n of t.styles){if(n==null||!String(n).trim())continue;let s=String(n).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${os(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let n of t.scripts){if(!n)continue;let s=typeof n=="string",i=s?n:n.src;if(!i&&!(n&&n.body))continue;let a=[];i&&a.push(`src="${ct(i)}"`),s||(n.type&&a.push(`type="${ct(n.type)}"`),n.async&&a.push("async"),n.defer&&a.push("defer"),n.integrity&&a.push(`integrity="${ct(n.integrity)}"`),n.crossorigin&&a.push(`crossorigin="${ct(n.crossorigin)}"`),n.referrerpolicy&&a.push(`referrerpolicy="${ct(n.referrerpolicy)}"`),n.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${ct(i||os(n.body||""))}"`;if(!s&&n.body){let l=String(n.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
89
+ `)},mk={define:{metadata:(t,e,r)=>{let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Q(()=>{let s=Wr(t,e,e.state);ns(s,o);let i=e.state?.root;S(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(n)}}},Uy={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;if(!e)return;let r=Q(()=>{let o=t.metadata;if(!o)return;let n=Wr(o,t,t.state);ns(n,e)});t.__ref?.__effects&&t.__ref.__effects.push(r)},update(t){let e=t.metadata;if(!e)return;let r=t.context?.document||typeof document<"u"&&document;if(!r)return;let o=Wr(e,t,t.state);ns(o,r)}},DO=mk;Ar();var yk=(t,e,r,o)=>{t&&xi(t,e,r,o)},bk=(t,e,r)=>{if(!t)return;let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Wr(t,e,r);ns(n,o)},_k=async(t,e)=>{if(!t)return;let r={tag:"fragment",...t},o=async()=>{await e.set(r,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(o):await o(),r},ss={routes:t=>t,metadata:bk,fetch:yk,$router:_k},xk=(t={})=>{let e={routes:r=>r};return t.metadata!==!1&&(e.metadata=bk),t.fetch!==!1&&(e.fetch=yk),t.router!==!1&&(e.$router=_k),e};var zy={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},Qf={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},tu={...zy,router:Qf},$O={state:{},pages:{},components:{},router:Qf,define:ss},qr=$O;R();R();var wk=(t,e)=>H(t.extends)?t.extends:[];R();var Hy={};P(Hy,{default:()=>FO,getActiveLang:()=>Kr,getLanguages:()=>Xa,getLocalStateLang:()=>ec,initPolyglot:()=>ru,loadTranslations:()=>Ja,polyglotPlugin:()=>as,setLang:()=>Qa,translate:()=>Za,upsertTranslation:()=>tc});R();var kk="smbls_lang",LO="smbls_t_",MO="smbls_tv_",is={get(t){try{return window?.localStorage.getItem(t)}catch{return null}},set(t,e){try{window?.localStorage.setItem(t,e)}catch(r){console.warn("[polyglot] localStorage unavailable:",r.message)}},remove(t){try{window?.localStorage.removeItem(t)}catch(e){console.warn("[polyglot] localStorage unavailable:",e.message)}}},Ya={};function Kr(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||t?.state?.lang||e?.defaultLang||"en"}function Xa(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var eu=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let r=e.split("."),o=t;for(let n=0;n<r.length;n++){if(o==null)return;o=o[r[n]]}return o},Sk=(t,e,r)=>{let o=e.lastIndexOf(".");if(o===-1)return t[e+"_"+r];let n=eu(t,e.substring(0,o));if(n!=null)return n[e.substring(o+1)+"_"+r]};function Za(t,e){if(!t)return"";let r=this?.context,o=r?.polyglot,n=e||this.call("getActiveLang"),s=this?.state;if(s){let l=Sk(s,t,n);if(l!==void 0)return l}if(o?.translations){let l=o.translations[n];if(l){let f=eu(l,t);if(f!==void 0)return f}}let a=(s?.root||r?.state?.root)?.translations;if(a){let l=a[n];if(l){let f=eu(l,t);if(f!==void 0)return f}}let c=o?.defaultLang||"en";if(s){let l=Sk(s,t,c);if(l!==void 0)return l}if(o?.translations){let l=o.translations[c];if(l){let f=eu(l,t);if(f!==void 0)return f}}return t}async function Ja(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!r||!o)return;let n=r.storagePrefix||LO,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):MO);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!o.translations?.[t]){let c=is.get(n+t);if(c)try{let l=JSON.parse(c),f={translations:{...o.translations||{}}};f.translations[t]=l,o.update&&o.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(r.storagePrefix||"smbls")+":"+t;if(Ya[i])return Ya[i];let a=this;return Ya[i]=(async()=>{try{let c=r.fetch,l=parseInt(is.get(s+t),10)||0,f,u,d;if(A(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(S(c)){let g=a.getDB||(()=>e.fetch),p=A(g)?await g.call(a):e.fetch;if(!p)return;let m=c.rpc||c.from||"get_translations_if_changed",b={p_lang:t,p_cached_version:l,...c.params||{}},_=await p.rpc({from:m,params:b});if(_.error)throw r._fetchFailed||(r._fetchFailed={}),r._fetchFailed[t]=!0,_.error;let y=_.data;if(!y||!y.changed)return;f=y.translations||{},u=y.version||0,d=!0}else return;if(!d||!f)return;is.set(n+t,JSON.stringify(f)),u&&is.set(s+t,String(u));let h={translations:{...o.translations||{}}};h.translations[t]=f,o.update&&o.update(h)}catch(c){if(r.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 Ya[i]}})(),Ya[i]}async function Qa(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!o)return;let n=r?.storageLangKey||kk;if(is.set(n,t),this.call("getActiveLang")===t)return;r?.fetch&&await this.call("loadTranslations",t),e?.state&&(e.state.lang=t);let s=r?.translations?.[t],i={lang:t},a=l=>sr(e,l,o);if(s&&typeof s=="object")for(let l in s){if(!a(l))continue;let f=s[l];(Array.isArray(f)||typeof f=="string"||typeof f=="number")&&(i[l]=f)}o.update&&o.update(i);for(let l in i)l!=="lang"&&He(e,l);if(s&&typeof s=="object")for(let l in s){if(!a(l))continue;let f=s[l];if(f&&typeof f=="object"&&!Array.isArray(f)&&o[l]&&typeof o[l]=="object"&&!Array.isArray(o[l])){for(let u in f)o[l][u]=f[u];He(e,l)}}let c=this?.context?.document||globalThis.document;if(c&&s){let l=c.querySelectorAll("[data-key]");for(let f of l){let u=f.ref;if(!u)continue;let d=u.__ref?.__exec?.text;if(typeof d=="string"&&d.includes("{{"))try{let h=u.call("replaceLiteralsWithObjectFields",d,u.state);h!=null&&f.textContent!==h&&(f.textContent=h)}catch{}}}}async function tc(t,e,r){let o=this?.context,n=o?.polyglot,s=this?.state?.root||o?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=r),n?.translations?.[e]&&(n.translations[e][t]=r),n?.fetch&&S(n.fetch)){let i=this.getDB||(()=>o.fetch),a=A(i)?await i.call(this):o.fetch;if(!a)return;let c=n.fetch.table||"translations",l=await a.upsert({from:c,data:{key:t,lang:e,text:r}});if(l?.error)throw l.error;return l.data}}async function ru(){let t=this?.context,e=t?.polyglot;if(!e)return;let r=this?.state?.root||t?.state?.root;if(!r)return;let o=e.storageLangKey||kk,s=is.get(o)||Kr.call(this);r.update&&r.lang!==s&&r.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function ec(t){try{let e=Kr.call(this),r=this?.state;if(!r)return"";let o=t.lastIndexOf(".");if(o===-1)return r[t+e]??"";let n=t.substring(0,o).split("."),s=r;for(let i=0;i<n.length;i++){if(s==null)return"";s=s[n[i]]}return s==null?"":s[t.substring(o+1)+e]??""}catch{return""}}var as={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,ru.call(t))}},FO=as;Ar();var qy={};P(qy,{SYSTEM_METRICS:()=>rc,capsizeHandler:()=>Wy,capsizePlugin:()=>nu,computeCapsize:()=>vk,default:()=>NO,resolveFontSizePx:()=>Ck,resolveMetrics:()=>Ek});var rc={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}},ou=t=>parseFloat(t.toFixed(4)),vk=(t,e,r)=>{let{ascent:o,descent:n,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(n),l=o+c+s,f=r!==void 0?r:l/i*t,u=f/t,d=l/i,h=(o-a+s/2)/i-(u-d)/2,g=(c+s/2)/i-(u-d)/2;return{fontSize:`${ou(t/16)}rem`,lineHeight:`${ou(f)}px`,capHeightTrim:`${ou(-h)}em`,baselineTrim:`${ou(-g)}em`}},Ck=(t,e)=>{if(typeof t=="number")return t;let r=e?.designSystem;if(!r)return null;let{typography:o}=r;if(o?.sequence){let s=String(t).toUpperCase(),i=o.sequence[s];if(i)return i.decimal||i.val}let n=parseFloat(t);return isNaN(n)?null:typeof t=="string"&&t.endsWith("rem")?n*(r.typography?.browserDefault||16):n},Ek=(t,e)=>{let o=e?.designSystem?.font_family||{};if(t){let s=o[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(rc[i])return rc[i]}let n=o.default||Object.keys(o)[0];if(n){let s=o[n];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(rc[a])return rc[a]}}return null},Wy=(t,e,r,o)=>{if(!t)return;let n=Ck(e.fontSize,o);if(!n)return;let s=Ek(e.fontFamily,o);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=vk(n,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},nu={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},NO=nu;var Qy={};P(Qy,{PRESERVE_VALUE_KEYS:()=>$t,SKIP_INLINE_KEYS:()=>Gr,abbrToProp:()=>Dt,decode:()=>Pk,encode:()=>Tk,expand:()=>Do,isComponentKey:()=>$e,isSelectorKey:()=>Le,parse:()=>$o,parseFurther:()=>Mo,propToAbbr:()=>ke,shorten:()=>oc,shorthandPlugin:()=>nc,stringify:()=>Io,stringifyFurther:()=>Lo});var ke={attr:"at",childExtends:"cex",childExtendsRecursive:"cexr",childProps:"cp",children:"ch",childrenAs:"cha",class:"cl",content:"cnt",context:"ctx",data:"dt",extends:"ext",hide:"hd",html:"htm",if:"if",ignoreChildExtends:"icex",key:"ky",query:"qy",routes:"rt",scope:"scp",show:"shw",state:"st",style:"sy",tag:"tg",text:"tx",align:"aln",boxSize:"bsz",flow:"fl",heightRange:"hr",horizontalInset:"hi",round:"rnd",shadow:"shd",size:"sz",templateColumns:"tcol",verticalInset:"vi",widthRange:"wr",wrap:"wrp",aspectRatio:"ar",blockSize:"bks",boxSizing:"bxs",height:"h",inlineSize:"ins",margin:"m",marginBottom:"mb",marginLeft:"ml",marginRight:"mr",marginTop:"mt",maxBlockSize:"mxbs",maxHeight:"mxh",maxInlineSize:"mxis",maxWidth:"mxw",minBlockSize:"mnbs",minHeight:"mnh",minInlineSize:"mnis",minWidth:"mnw",padding:"p",paddingBottom:"pb",paddingInline:"pil",paddingLeft:"pl",paddingRight:"pr",paddingTop:"pt",width:"w",alignContent:"ac",alignItems:"ai",alignSelf:"as",flex:"fx",flexBasis:"fxb",flexDirection:"fxd",flexFlow:"fxf",flexGrow:"fxg",flexShrink:"fxs",flexWrap:"fxw",gap:"g",justifyContent:"jc",justifyItems:"ji",justifySelf:"js",order:"od",placeContent:"pcn",placeItems:"pit",placeSelf:"psl",rowGap:"rg",columnGap:"cg",gridArea:"ga",gridAutoColumns:"gac",gridAutoFlow:"gaf",gridAutoRows:"gar",gridColumn:"gc",gridColumnEnd:"gce",gridColumnStart:"gcs",gridRow:"gr",gridRowEnd:"gre",gridRowStart:"grs",gridTemplateAreas:"gta",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",bottom:"bot",float:"flt",inset:"ist",left:"lft",position:"pos",right:"rgt",top:"tp",zIndex:"zi",clear:"clr",contain:"ctn",cursor:"cur",display:"d",opacity:"op",overflow:"ov",overflowX:"ovx",overflowY:"ovy",pointerEvents:"pe",resize:"rsz",userSelect:"us",visibility:"vis",background:"bg",backgroundAttachment:"bga",backgroundBlendMode:"bgbm",backgroundClip:"bgcl",backgroundColor:"bgc",backgroundImage:"bgi",backgroundOrigin:"bgo",backgroundPosition:"bgp",backgroundPositionX:"bgpx",backgroundPositionY:"bgpy",backgroundRepeat:"bgr",backgroundRepeatX:"bgrx",backgroundRepeatY:"bgry",backgroundSize:"bgs",color:"c",theme:"thm",themeModifier:"thmm",border:"bd",borderBottom:"bdb",borderBottomLeftRadius:"bdblr",borderBottomRightRadius:"bdbrr",borderCollapse:"bdcl",borderColor:"bdc",borderImage:"bdi",borderImageOutset:"bdio",borderImageRepeat:"bdir",borderImageSlice:"bdis",borderImageSource:"bdisrc",borderImageWidth:"bdiw",borderLeft:"bdl",borderRadius:"bdr",borderRight:"bdrg",borderSpacing:"bdsp",borderStyle:"bdst",borderTop:"bdt",borderTopLeftRadius:"bdtlr",borderTopRightRadius:"bdtrr",borderWidth:"bdw",outline:"ol",outlineColor:"olc",outlineOffset:"olo",outlineStyle:"ols",outlineWidth:"olw",boxShadow:"bxsh",textShadow:"txsh",direction:"dir",fontDisplay:"fdi",fontFamily:"ff",fontFeatureSettings:"ffs",fontKerning:"fk",fontOpticalSizing:"fos",fontPalette:"fpl",fontSize:"fs",fontSizeAdjust:"fsa",fontSmooth:"fsm",fontStretch:"fsr",fontStyle:"fsy",fontSynthesis:"fsyn",fontVariant:"fv",fontVariationSettings:"fvs",fontWeight:"fw",hyphens:"hyp",letterSpacing:"ls",lineHeight:"lh",tabSize:"tsz",textAlign:"ta",textDecoration:"td",textDecorationColor:"tdc",textDecorationLine:"tdl",textDecorationStyle:"tds",textIndent:"ti",textOverflow:"tov",textStroke:"tsk",textTransform:"tt",unicodeBidi:"ub",verticalAlign:"va",whiteSpace:"ws",wordBreak:"wbr",wordSpacing:"wsp",wordWrap:"wwr",writingMode:"wm",captionSide:"cps",counterIncrement:"ci",counterReset:"cr",emptyCells:"ec",listStyle:"lst",listStyleImage:"lsi",listStylePosition:"lsp",listStyleType:"lsty",quotes:"qt",tableLayout:"tl",columnCount:"cc",columnFill:"cf",columnRule:"crl",columnRuleColor:"crlc",columnRuleStyle:"crls",columnRuleWidth:"crlw",columnSpan:"cspn",columnWidth:"cwi",columns:"col",backdropFilter:"bdf",boxDecorationBreak:"bxdb",clipPath:"cpth",filter:"fil",isolation:"iso",mixBlendMode:"mbm",objectFit:"obf",objectPosition:"obp",perspective:"prs",perspectiveOrigin:"prso",willChange:"wc",transform:"tf",transformOrigin:"tfo",transformStyle:"tfs",transition:"trn",transitionDelay:"trnd",transitionDuration:"trndr",transitionProperty:"trnp",transitionTimingFunction:"trntf",animation:"an",animationDelay:"and",animationDirection:"andr",animationDuration:"andur",animationFillMode:"anfm",animationIterationCount:"anic",animationName:"ann",animationPlayState:"anps",animationTimingFunction:"antf",scrollBehavior:"sb",scrollMargin:"smr",scrollMarginBottom:"smrb",scrollMarginLeft:"smrl",scrollMarginRight:"smrr",scrollMarginTop:"smrt",scrollPadding:"spd",scrollPaddingBottom:"spdb",scrollPaddingLeft:"spdl",scrollPaddingRight:"spdr",scrollPaddingTop:"spdt",scrollSnapAlign:"ssa",scrollSnapStop:"sss",scrollSnapType:"sst",breakAfter:"bka",breakBefore:"bkb",breakInside:"bki",pageBreakAfter:"pbka",pageBreakBefore:"pbkb",pageBreakInside:"pbki",accessKey:"ack",className:"cn",contentEditable:"ced",contextMenu:"cmu",draggable:"drg",hidden:"hid",id:"id",is:"is",lang:"lng",nonce:"nnc",spellCheck:"spc",tabIndex:"tbi",title:"ttl",translate:"trl",accept:"acp",acceptCharset:"accs",action:"act",autoComplete:"atc",autoFocus:"atf",capture:"cap",challenge:"chg",checked:"chk",cols:"cls",colSpan:"csn",controls:"ctl",default:"def",defer:"dfr",disabled:"dis",encType:"ect",form:"frm",formAction:"fac",formEncType:"fect",formMethod:"fme",formNoValidate:"fnv",formTarget:"ftg",high:"hgh",inputMode:"imd",kind:"knd",label:"lbl",list:"lis",loop:"lp",low:"lw",max:"mx",maxLength:"mxl",method:"mtd",min:"mn",minLength:"mnl",multiple:"mul",muted:"mut",name:"nm",open:"opn",optimum:"opt",pattern:"ptn",placeholder:"phd",readOnly:"ro",required:"req",reversed:"rev",rows:"rws",rowSpan:"rsn",selected:"sel",span:"spn",start:"srt",step:"stp",type:"typ",value:"val",download:"dl",href:"hrf",hrefLang:"hrl",ping:"png",referrerPolicy:"rfp",rel:"rl",target:"tgt",allow:"alw",allowFullScreen:"afs",allowPaymentRequest:"apr",alt:"alt",cellPadding:"cpg",cellSpacing:"csg",cite:"cit",coords:"crd",crossOrigin:"cor",dateTime:"dtm",fetchPriority:"fpr",headers:"hds",httpEquiv:"hte",integrity:"itg",isMap:"ism",keyType:"kty",loading:"ldg",manifest:"mft",media:"mda",poster:"pst",preload:"prl",radioGroup:"rdg",sandbox:"sbx",scoped:"scod",seamless:"sml",shape:"shp",sizes:"szs",src:"src",srcDoc:"srd",srcLang:"srl",srcSet:"srs",useMap:"ump",ariaActiveDescendant:"aad",ariaAtomic:"aat",ariaBusy:"abu",ariaChecked:"achk",ariaControls:"acl",ariaCurrent:"acr",ariaDescribedBy:"adb",ariaDetails:"adt",ariaDisabled:"adis",ariaDropEffect:"ade",ariaErrorMessage:"aem",ariaExpanded:"aexp",ariaGrabbed:"agr",ariaHasPopup:"ahp",ariaHidden:"ahid",ariaInvalid:"ainv",ariaLabel:"alb",ariaLabelledBy:"alby",ariaLive:"alv",ariaModal:"amod",ariaMultiSelectable:"ams",ariaOrientation:"aor",ariaOwns:"aow",ariaPosInSet:"apis",ariaPressed:"aprs",ariaReadOnly:"aro",ariaRelevant:"arl",ariaRequired:"areq",ariaSelected:"asel",ariaSetSize:"assz",ariaValueMax:"avmx",ariaValueMin:"avmn",ariaValueNow:"avn",role:"role",onInit:"@in",onRender:"@rn",onUpdate:"@up",onStateChange:"@sc",onStateUpdate:"@su",onClick:"@ck",onContextMenu:"@cm",onDblClick:"@dc",onMouseDown:"@md",onMouseEnter:"@me",onMouseLeave:"@ml",onMouseMove:"@mm",onMouseOut:"@mo",onMouseOver:"@mv",onMouseUp:"@mu",onKeyDown:"@kd",onKeyPress:"@kp",onKeyUp:"@ku",onBlur:"@bl",onFocus:"@fc",onFocusIn:"@fi",onFocusOut:"@fo",onBeforeInput:"@bi",onChange:"@cg",onFormData:"@fd",onInput:"@ip",onInvalid:"@iv",onReset:"@rs",onSearch:"@sr",onSelect:"@sl",onSubmit:"@sm",onTouchCancel:"@tc",onTouchEnd:"@te",onTouchMove:"@tm",onTouchStart:"@ts",onPointerCancel:"@pc",onPointerDown:"@pd",onPointerEnter:"@pe",onPointerLeave:"@ple",onPointerMove:"@pm",onPointerOut:"@po",onPointerOver:"@pov",onPointerUp:"@pu",onDrag:"@dg",onDragEnd:"@dge",onDragEnter:"@dgn",onDragLeave:"@dgl",onDragOver:"@dgo",onDragStart:"@dgs",onDrop:"@dp",onResize:"@rz",onScroll:"@scl",onWheel:"@wh",onCopy:"@cy",onCut:"@ct",onPaste:"@pt",onCompositionEnd:"@cpe",onCompositionStart:"@cps",onCompositionUpdate:"@cpu",onAnimationEnd:"@ae",onAnimationIteration:"@ai",onAnimationStart:"@as",onTransitionEnd:"@tre",onTransitionStart:"@trs",onAbort:"@ab",onCanPlay:"@cap",onCanPlayThrough:"@cpt",onDurationChange:"@duc",onEmptied:"@em",onEncrypted:"@enc",onEnded:"@end",onError:"@er",onLoad:"@ld",onLoadedData:"@ldd",onLoadedMetadata:"@ldm",onPause:"@pa",onPlay:"@pl",onPlaying:"@plg",onProgress:"@prg",onRateChange:"@rc",onSeeked:"@sk",onSeeking:"@skg",onStalled:"@stl",onSuspend:"@ssp",onTimeUpdate:"@tu",onVolumeChange:"@vc",onWaiting:"@wt",icon:"ico",iconText:"ict",lookup:"lkp",router:"rtr",shapeModifier:"shpm"},Dt=Object.create(null);for(let t in ke)Dt[ke[t]]=t;var Ky=Object.create(null);for(let t in ke){let e=ke[t];if(Ky[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${Ky[e]}"`);Ky[e]=t}var $t=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),Gr=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function $e(t){return/^[A-Z]/.test(t)}function Le(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function Tk(t){if(!t||typeof t!="object")return"";let e=[];for(let r in t){let o=t[r];if(typeof o=="function"||o!==null&&typeof o=="object"&&!Array.isArray(o)||o===void 0)continue;let n=ke[r]||r;if(o===!0)e.push(n);else if(o===!1)e.push("!"+n);else if(Array.isArray(o)){let s=o.map(i=>su(i));e.push(n+":"+s.join(","))}else e.push(n+":"+su(o))}return e.join(" ")}function su(t){return String(t).replace(/ /g,"_")}function oc(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?oc(r):r});let e={};for(let r in t){let o=t[r];if($e(r)){e[r]=Gy(o);continue}if(Le(r)){e[r]=Gy(o);continue}let n=ke[r]||r;if($t.has(r)||$t.has(n)){e[n]=o;continue}e[n]=Gy(o)}return e}function Gy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?oc(e):e}):typeof t=="object"?oc(t):t}function Io(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?Io(o):o});let e={},r=[];for(let o in t){let n=t[o];if($e(o)){e[o]=Ak(n);continue}if(Le(o)){e[o]=Ak(n);continue}let s=ke[o]||o;if($t.has(o)||$t.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Gr.has(o)||Gr.has(s)){e[s]=n;continue}if(Array.isArray(n)){if(n.some(function(a){return a!==null&&typeof a=="object"})){e[s]=n.map(function(a){return a!==null&&typeof a=="object"?Io(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(su).join(","));continue}if(typeof n=="object"){e[s]=Io(n);continue}n===!0?r.push(s):n===!1?r.push("!"+s):typeof n=="number"||typeof n=="string"&&(n.includes(",")||n.includes("_"))?e[s]=n:r.push(s+":"+su(n))}return r.length&&(e.in=r.join(" ")),e}function Ak(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Io(e):e}):typeof t=="object"?Io(t):t}function Pk(t){if(!t||typeof t!="string")return{};let e={},r=Ik(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Dt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Dt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(Ok);continue}e[a]=Ok(i)}return e}function Ik(t){return t.trim().split(/\s+/).filter(Boolean)}function Ok(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function Rk(t){return t.replace(/_/g," ")}function jO(t){if(!t||typeof t!="string")return{};let e={},r=Ik(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Dt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Dt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(Rk);continue}e[a]=Rk(i)}return e}function Do(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Do(r):r});let e={};for(let r in t){let o=t[r];if($e(r)){e[r]=Yy(o);continue}let n=Dt[r]||r;if(Le(r)&&n===r){e[r]=Yy(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Yy(o)}return e}function Yy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Do(e):e}):typeof t=="object"?Do(t):t}function $o(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?$o(r):r});let e={};if(typeof t.in=="string"){let r=jO(t.in);for(let o in r)e[o]=r[o]}for(let r in t){if(r==="in")continue;let o=t[r];if($e(r)){e[r]=Xy(o);continue}let n=Dt[r]||r;if(Le(r)&&n===r){e[r]=Xy(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Xy(o)}return e}function Xy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?$o(e):e}):typeof t=="object"?$o(t):t}function Dk(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function BO(t){let e="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){let o=t[r+1];if(o===","||o==="_"||o==="\\"){e+=o,r+=2;continue}}t[r]==="_"?e+=" ":e+=t[r],r++}return e}function UO(t){let e=[],r="",o=0;for(;o<t.length;){if(t[o]==="\\"&&o+1<t.length){r+=t[o]+t[o+1],o+=2;continue}if(t[o]===","){e.push(r),r="",o++;continue}r+=t[o],o++}return e.push(r),e}function $k(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 Lo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?Lo(o):o});let e={},r=[];for(let o in t){let n=t[o];if($e(o)){let i=Lk(n);e[o]=$k(i)?i.in:i;continue}if(Le(o)){let i=Lk(n);e[o]=$k(i)?i.in:i;continue}let s=ke[o]||o;if($t.has(o)||$t.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Gr.has(o)||Gr.has(s)){e[s]=n;continue}if(Array.isArray(n)){if(n.some(function(a){return a!==null&&typeof a=="object"})){e[s]=n.map(function(a){return a!==null&&typeof a=="object"?Lo(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(Dk).join(","));continue}if(typeof n=="object"){e[s]=Lo(n);continue}if(n===!0){r.push(s);continue}if(n===!1){r.push("!"+s);continue}if(typeof n=="number"){r.push(s+":#"+n);continue}r.push(s+":"+Dk(n))}return r.length&&(e.in=r.join(" ")),e}function Lk(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Lo(e):e}):typeof t=="object"?Lo(t):t}function Mk(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):BO(t)}function Zy(t){if(!t||typeof t!="string")return{};let e={},r=t.trim().split(/\s+/).filter(Boolean);for(let o of r){if(o.startsWith("!")){let l=o.slice(1),f=Dt[l]||l;e[f]=!1;continue}let n=o.indexOf(":");if(n===-1){let l=Dt[o]||o;e[l]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s,c=UO(i);if(c.length>1){e[a]=c.map(Mk);continue}e[a]=Mk(i)}return e}function Mo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Mo(r):r});let e={};if(typeof t.in=="string"){let r=Zy(t.in);for(let o in r)e[o]=r[o]}for(let r in t){if(r==="in")continue;let o=t[r];if($e(r)){typeof o=="string"?e[r]=Zy(o):e[r]=Jy(o);continue}let n=Dt[r]||r;if(Le(r)&&n===r){typeof o=="string"?e[r]=Zy(o):e[r]=Jy(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Jy(o)}return e}function Jy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Mo(e):e}):typeof t=="object"?Mo(t):t}var VO={shorten:Do,stringify:$o,stringifyFurther:Mo};function zO(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(o=>e(o));let r={};for(let o in t){let n=t[o];r[o]=n&&typeof n=="object"?e(n):n}return r}var HO=["components","pages","snippets"],nc={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let o=VO[e===!0?"shorten":e];if(o){for(let n of HO)t[n]&&(t[n]=zO(t[n],o));t.app&&typeof t.app=="object"&&(t.app=o(t.app))}}};var ub={};P(ub,{LEVELS:()=>sc,analyzePlugin:()=>ls,attachBrowserListeners:()=>hu,attachNetworkListeners:()=>ac,classifyEvent:()=>ib,createAnalyzeState:()=>gu,createBeaconSink:()=>lb,createConsoleSink:()=>ab,createDedupe:()=>ob,createEnrich:()=>eb,createMemorySink:()=>cb,createPipeline:()=>lu,createRedact:()=>cu,createRemoteSink:()=>uu,createSample:()=>nb,createSummarize:()=>rb,default:()=>ls,emitFetchEvent:()=>Hk,makeEvent:()=>Z,meetsLevel:()=>iu,normalizeLevel:()=>ic,resolveSinks:()=>pu,summarizeElement:()=>Fo});var WO=0,qO=()=>`${Date.now().toString(36)}-${(WO++).toString(36)}`,Z=(t,e,r={})=>({id:qO(),ts:Date.now(),type:t,level:e,...r}),KO=t=>{let e=[],r=t,o=0;for(;r&&o<32;)r.key!=null&&e.unshift(String(r.key)),r=r.parent,o++;return e.join(" > ")},Fo=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:KO(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var cs=t=>t?.context?.analyze,GO={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"}},YO=(t,{category:e,type:r,level:o})=>n=>{let s=cs(n);!s||!s.shouldCapture(e)||s.emit(Z(r,o,{hook:t,element:Fo(n)}))},Fk=t=>(e,r)=>{let o=cs(e);!o||!o.shouldCapture("state")||o.emit(Z("state","debug",{hook:t,element:Fo(e),changedKeys:r?.changedKeys||null}))},ls={name:"analyze",error(t,e){let r=cs(t);if(!r||r.config.enabled===!1||!r.shouldCapture("errors"))return;let o=e?.error||e?.err||(e instanceof Error?e:null);r.emit(Z("error","error",{hook:e?.hook||"error",element:Fo(t),error:o,message:o?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=cs(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(Z("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=cs(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=cs(t);if(!e||!e.shouldCapture("updates"))return;let r=null;t.__ref?.__analyzeUpdateStart!=null&&(r=(typeof performance<"u"?performance.now():Date.now())-t.__ref.__analyzeUpdateStart,t.__ref.__analyzeUpdateStart=null),e.emit(Z("update","debug",{hook:"update",element:Fo(t),durationMs:r}))},beforeStateUpdate:Fk("beforeStateUpdate"),stateUpdate:Fk("stateUpdate")};for(let[t,e]of Object.entries(GO))ls[t]=YO(t,e);R();var sc={error:0,warn:1,info:2,debug:3,trace:4};var iu=(t,e)=>{let r=sc[t],o=sc[e];return r==null||o==null?!0:r<=o},ic=t=>sc[t]!=null?t:"warn";R();var au=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var XO=(t,e)=>{for(let r of e)if(r instanceof RegExp){if(r.test(t))return!0}else if(typeof r=="string"&&t.toLowerCase().includes(r.toLowerCase()))return!0;return!1},ZO=(t,e)=>{if(e!=="redact"){if(e==="hash"){let r=0,o=String(t);for(let n=0;n<o.length;n++)r=(r<<5)-r+o.charCodeAt(n)|0;return`#${(r>>>0).toString(36)}`}return"***"}},tb=(t,e,r,o)=>{if(o>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>tb(s,e,r,o+1));let n={};for(let s of Object.keys(t))if(XO(s,e)||au.test(s)){let a=ZO(t[s],r);a!==void 0&&(n[s]=a)}else n[s]=tb(t[s],e,r,o+1);return n},cu=(t=[],e="mask")=>{let r=Array.isArray(t)?t:[t];return o=>{if(!o)return o;let{id:n,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...g}=o,p=tb(g,r,e,0);return{id:n,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...p}}};var eb=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,r=typeof navigator<"u"?navigator.userAgent:null,o=t.config.buildHash||null,n=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=v,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:n,build:o,route:i},meta:{ua:r,viewport:c}}}},rb=()=>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},ob=(t=1e3,e=500)=>{let r=new Map;return o=>{if(!o)return o;let n=`${o.type}:${o.level}:${o.message||""}:${o.error?.message||""}`,s=r.get(n),i=o.ts||Date.now();if(s&&i-s<t)return null;if(r.set(n,i),r.size>e){let a=Math.ceil(e/10),c=0;for(let l of r.keys()){if(c++>=a)break;r.delete(l)}}return o}},nb=t=>e=>{if(!e)return e;let r=t[e.type];return r==null||r>=1?e:Math.random()>r?null:e},Nk={redact:t=>cu(t.config.redact||[],t.config.maskStrategy),enrich:t=>eb(t),summarize:()=>rb(),dedupe:t=>ob(t.config.cache?.dedupeWindowMs||1e3),sample:t=>nb(t.config.sample||{})},JO=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let r=Nk[t];return r?r(e):null}return null},lu=t=>{let e=t.config,r=Array.isArray(e.transformers)?e.transformers.slice():[],o=r.findIndex(s=>s==="redact");o>=0&&r.splice(o,1);let n=[];e.redact!==!1&&n.push(Nk.redact(t));for(let s of r){let i=JO(s,t);i&&n.push(i)}return s=>{let i=s;for(let a of n){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=n.slice(n.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}};R();R();var fu=typeof v<"u"&&typeof v.document<"u",QO=5e3,tR=50,eR=3,rR=1500,oR=1e3,ib=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",nR=t=>{try{return JSON.stringify(t)}catch{return null}},sR=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},iR=t=>{if(!t)return null;let e=String(t),r;return(r=e.match(/Edg\/([\d.]+)/))?{name:"Edge",version:r[1]}:(r=e.match(/OPR\/([\d.]+)/))?{name:"Opera",version:r[1]}:(r=e.match(/Firefox\/([\d.]+)/))?{name:"Firefox",version:r[1]}:/Chrome\/([\d.]+)/.test(e)&&/Safari\//.test(e)?(r=e.match(/Chrome\/([\d.]+)/),{name:"Chrome",version:r[1]}):(r=e.match(/Version\/([\d.]+).*Safari/))?{name:"Safari",version:r[1]}:{name:null,version:null}},aR=()=>{if(!fu)return null;try{let t=v.document?.documentElement?.getAttribute("data-theme")||null,e=typeof v.matchMedia=="function"?v.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}},cR=()=>{if(!fu)return null;let t=v.location,e=typeof navigator<"u"?navigator:null,r=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:v.document?.referrer||null,title:v.document?.title||null,ua:e?.userAgent||null,browser:iR(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:sR(),viewport:v.innerWidth?{w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}:null,screen:r?{w:r.width||null,h:r.height||null,availW:r.availWidth||null,availH:r.availHeight||null,colorDepth:r.colorDepth||null,orientation:r.orientation?.type||null}:null,theme:aR()}},uu=(t={})=>{let e=t.url,r=typeof t.transport=="function"?t.transport:null,o=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!r)return()=>{};let n=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:ib,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:QO,b=t.maxBatch||tR,_=t.maxRetries!=null?t.maxRetries:eR,y=t.backoffMs||rR,x=t.queueLimit||oR,k=t.sampleRate!=null?t.sampleRate:1,E=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,O=t.sessionId||E(),$=[],I=[],D=null,W=null,Pt=()=>{D||!$.length||(D=setTimeout(z,m))},F=M=>{if(W)return;let ot=y*Math.pow(2,Math.max(0,M-1));W=setTimeout(()=>{if(W=null,!I.length)return;let V=I.shift();at(V.envelope,V.attempt)},ot)},Y=(M,ot=!1)=>{let V=u?sb(u):null,X={id:O,sentAt:Date.now()};ot&&(X.endedAt=Date.now());let B={v:1,session:X,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:cR(),user:V?.user||null,traits:V?.traits||null,tags:V?.tags||null,events:M};if((p?sb(p)===!0:g)&&(B.app.debug=!0),h)try{return h(B)||null}catch{return B}return B},at=async(M,ot=1)=>{if(M)try{let V=!0;if(r){let X=await r(M);V=X!==!1&&X?.ok!==!1}else V=await lR(e,M,{apiKey:n,getAuth:f});!V&&ot<_&&(I.push({envelope:M,attempt:ot+1}),F(ot+1))}catch{ot<_&&(I.push({envelope:M,attempt:ot+1}),F(ot+1))}},z=(M=!1,ot=!1)=>{if(D&&(clearTimeout(D),D=null),!$.length&&!ot)return;let V=$;$=[];let X=Y(V,ot);if(X){if(M&&fu){if(typeof o=="function"&&sb(()=>o(X)))return;if(navigator.sendBeacon&&e){let B=nR(X);if(B)try{navigator.sendBeacon(e,new v.Blob([B],{type:"application/json"}));return}catch{}}}at(X)}},G=!1,Vt=()=>{G||(G=!0,z(!0,!0))};fu&&(v.addEventListener("pagehide",Vt,{passive:!0}),v.addEventListener("beforeunload",Vt,{passive:!0}),v.addEventListener("visibilitychange",()=>{v.document.visibilityState==="hidden"&&z(!0)},{passive:!0}));let q=M=>{if(!M||k<1&&Math.random()>k)return;G&&(G=!1);let ot={...M,log_type:d(M)};$.push(ot),$.length>x&&($=$.slice(-x)),$.length>=b?z():Pt()},xt=M=>(z(!1,!0),O=M||E(),G=!1,q.sessionId=O,O);return q.flush=()=>z(!1),q.endSession=Vt,q.startNewSession=xt,q.sessionId=O,q},sb=t=>{try{return t()}catch{return null}},lR=async(t,e,{apiKey:r,getAuth:o})=>{let n={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(r&&(n["X-Analyze-Key"]=r),o)try{let s=await o();s&&(n.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:n,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var fR={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},uR="\x1B[0m",du=typeof v<"u"&&typeof v.document<"u",ab=(t={})=>{let e=t.minLevel||null,r=console.error.bind(console),o=console.warn.bind(console),n=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?r:s.level==="warn"?o:n,a=`[analyze:${s.type}]`;if(du)i(a,s);else{let c=fR[s.level]||"";i(`${c}${a}${uR}`,s)}}},cb=(t,e={})=>{let r=e.max||t.config.cache?.max||500,o=new Array(r),n=0,s=0,i=a=>{o[n]=a,n=(n+1)%r,s<r&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(n-s+r)%r;for(let l=0;l<s;l++)a[l]=o[(c+l)%r];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:()=>{n=0,s=0}},i},lb=(t={})=>{let e=t.url,r=t.batchMs!=null?t.batchMs:5e3,o=t.maxBatch||50;if(!e)return()=>{};let n=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!n.length)return;let c=JSON.stringify({events:n});n=[];let l=du?new v.Blob([c],{type:"application/json"}):c;if(du&&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(()=>{})};du&&(v.addEventListener("pagehide",i,{passive:!0}),v.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(n.push(c),n.length>=o?i():s||(s=setTimeout(i,r)))};return a.flush=i,a},jk={console:ab,memory:cb,beacon:lb,remote:uu},Bk=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},pu=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],r=[];for(let o of e)if(typeof o=="function")r.push(o);else if(typeof o=="string"){let n=jk[o];if(!n)continue;r.push(o==="memory"?n(t,{}):n(o==="remote"?Bk(t,{}):{}))}else if(o&&typeof o=="object"&&o.type){let n=jk[o.type];if(!n)continue;r.push(o.type==="memory"?n(t,o):n(o.type==="remote"?Bk(t,o):o))}return r};R();var dR=typeof v<"u"&&typeof v.document<"u",pR=new Set(["password","hidden"]),Uk=(t,e)=>{let r=0,o=null,n=null;return(...s)=>{let i=Date.now();i-r>=e?(r=i,t(...s)):(n=s,o||(o=setTimeout(()=>{r=Date.now(),o=null,n&&(t(...n),n=null)},e-(i-r))))}},fb="__analyzeKeyPath",fs=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[fb])return e[fb];let r=[],o=e,n=0,s=null;for(;o&&n<64;){if(o.getAttribute){let a=o.getAttribute("data-key");a&&(s==null&&(s=a),r.unshift(a))}o=o.parentNode,n++}let i;if(r.length)i={selector:null,key:s,path:r.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[fb]=i}catch{}return i},hR=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let r=0,o=String(t||"");for(let n=0;n<o.length;n++)r=(r<<5)-r+o.charCodeAt(n)|0;return`#${(r>>>0).toString(36)}`}return"***"}},gR=t=>!!(!t||t.tagName==="INPUT"&&pR.has(t.type)||au.test(t.name||"")||au.test(t.id||"")||t.dataset?.analyze==="skip"),hu=t=>{if(!dR)return;let e=t.config.capture,r=t.config.throttle,o=t.__teardown,n=(s,i,a,c)=>{s.addEventListener(i,a,c),o.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(n(v,"error",s=>{t.emit(Z("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}))}),n(v,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(Z("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){n(v,"click",i=>{t.emit(Z("pointer","info",{hook:"click",target:fs(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:Vk(i)}))},{passive:!0,capture:!0}),n(v,"dblclick",i=>{t.emit(Z("pointer","info",{hook:"dblclick",target:fs(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),n(v,"contextmenu",i=>{t.emit(Z("pointer","info",{hook:"contextmenu",target:fs(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=Uk(i=>{t.emit(Z("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},r.pointermove);n(v,"pointermove",s,{passive:!0})}if(e.keyboard&&n(v,"keydown",s=>{t.emit(Z("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:Vk(s),target:fs(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=gR(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=hR(a.value,t.config.maskStrategy)),t.emit(Z("forms","info",{hook:i.type,target:fs(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};n(v,"input",s,{passive:!0,capture:!0}),n(v,"change",s,{passive:!0,capture:!0}),n(v,"submit",i=>{t.emit(Z("forms","info",{hook:"submit",target:fs(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=Uk(()=>{t.emit(Z("scroll","trace",{hook:"scroll",x:v.scrollX,y:v.scrollY}))},r.scroll);n(v,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=Xs(()=>{t.emit(Z("viewport","info",{hook:"resize",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))},r.resize);n(v,"resize",s,{passive:!0}),n(v,"orientationchange",()=>{t.emit(Z("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),n(v.document,"visibilitychange",()=>{t.emit(Z("viewport","info",{hook:"visibilitychange",hidden:v.document.hidden}))},{passive:!0}),t.emit(Z("viewport","info",{hook:"initial",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(Z("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(zk)}))}catch{}return i.apply(console,a)},o.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(Z("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{}o.push(()=>s.disconnect())}catch{}},Vk=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),mR=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=zk(t.cause)),e},zk=t=>{if(t==null)return t;if(t instanceof Error)return mR(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};R();var yR=typeof v<"u"&&typeof v.document<"u",Hk=(t,e)=>{let r=t?.analyze;if(!r||!r.shouldCapture("network"))return;let o=e.phase==="error"?"error":"info";r.emit(Z("network",o,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},ac=t=>{if(yR&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof v.fetch=="function"){let e=v.fetch.bind(v),r=function(o,n){if(n?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(o,n);let s=typeof o=="string"?o:o&&o.url||"",i=(n?.method||typeof o=="object"&&o?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(Z("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(o,n).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(Z("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(Z("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};v.fetch=r,t.__teardown.push(()=>{v.fetch=e})}if(typeof v.XMLHttpRequest=="function"){let e=v.XMLHttpRequest,r=e.prototype.open,o=e.prototype.send;e.prototype.open=function(n,s){return this.__analyze={method:String(n).toUpperCase(),url:String(s)},r.apply(this,arguments)},e.prototype.send=function(n){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return o.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(Z("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(Z("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(Z("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),o.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=r,e.prototype.send=o})}}};var bR={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},_R={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},xR={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},wR={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},SR=t=>{let e={...bR,...t};return e.replay&&Object.assign(e,_R),e.telemetry&&Object.assign(e,xR),e.remote&&Object.assign(e,wR),Object.assign(e,t),e},kR=64,vR=()=>{if(typeof v>"u"||!v.location)return null;try{let e=new URLSearchParams(v.location.search).get("analyze");return e||null}catch{return null}},gu=(t={})=>{let e=t===!0?{}:{...t};e.capture=SR(e.capture||{});let r=vR();(r==="debug"||e.debug)&&(e.level="debug",e.debug=!0,e.capture={...e.capture,lifecycle:!0,state:!0,updates:!0,console:!0,network:!0}),r==="off"&&(e.enabled=!1),e.level=ic(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 o={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},n=()=>{o.__pipeline||(o.__pipeline=lu(o),o.__sinks=pu(o))};return o.shouldCapture=s=>o.config.enabled===!1?!1:!!o.config.capture[s],o.emit=s=>{if(s&&o.config.enabled!==!1&&!o.__paused&&iu(s.level,o.config.level)){if(!o.__ready){if(s.level!=="error"&&!o.config.captureDuringHydration)return;o.__preBuffer.length<kR&&o.__preBuffer.push(s);return}n(),Wk(o,s)}},o.activate=s=>{if(o.context==null&&(o.context=s||null),o.__ready)return;o.__ready=!0;let i=o.__preBuffer;if(o.__preBuffer=[],i.length){n();for(let a of i)Wk(o,a)}try{hu(o)}catch(a){console.error("[analyze] browser attach error:",a)}try{ac(o)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of o.__onActivate||[])try{a(o)}catch(c){console.error("[analyze] onActivate error:",c)}},o.pause=()=>{o.__paused=!0},o.resume=()=>{o.__paused=!1},o.setLevel=s=>{o.config.level=ic(s)},o.setCapture=(s,i)=>{if(o.config.capture[s]=!!i,s==="network"&&i&&o.__ready)try{ac(o)}catch(a){console.error("[analyze] network attach error:",a)}},o.query=s=>o.__memory?o.__memory.query(s):[],o.snapshot=()=>o.__memory?o.__memory.snapshot():[],o.emitNetwork=s=>{if(!o.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";o.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})},o.flush=()=>{if(o.__sinks)for(let s of o.__sinks)typeof s.flush=="function"&&s.flush()},o.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(o.config.sinks)?o.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(o.__sinks)for(let c of o.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},o.replay=()=>({initialSnapshot:o.__initialSnapshot,events:o.snapshot()}),o.destroy=()=>{for(let s of o.__teardown)try{s()}catch{}o.__teardown=[],o.__ready=!1,o.__paused=!0},o.__onActivate=[],o.onActivate=s=>{o.__onActivate.push(s)},o},Wk=(t,e)=>{let r=t.__pipeline(e);if(r==null)return;let o=Array.isArray(r)?r:[r];for(let n of o){if(typeof t.config.onEvent=="function")try{t.config.onEvent(n)}catch{}for(let s of t.__sinks)try{s(n)}catch(i){console.error("[analyze] sink error:",i)}}};var hb={};P(hb,{Inspect:()=>mu,inspectPlugin:()=>pb});R();function qk(t){return w(t)?t:T(t)?t.find(e=>w(e)):""}function db(t){if(!t)return;let e=t.__ref.__componentKey,r=t.extends&&qk(t.extends),o=t.parent&&t.parent.childExtends&&qk(t.parent.childExtends);return(e||r||o||"").split("_")[0].split(".")[0].split("+")[0]}function yu(t){if(!t||!t.__ref)return;let{components:e,pages:r,editor:o}=t.context,n=db(t);return o&&o.onInitInspect&&!o.onInitInspect(n,t,t.state)?yu(t.parent):n&&(e[n]||r[n])?t:yu(t.parent)}var CR=(t,e,r)=>{let o=r.window||window;o.onkeydown=n=>{n.altKey&&n.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},o.onkeyup=n=>{t.state.preventSelect&&(!n.altKey||!n.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},mu={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:CR,onMousemove:(t,e,r)=>{let o=t.target.ref,n=yu(o),s=e.Inspector.state;if(!n||!r.debugging||!n.__ref)return s.update({area:!1});let i=db(n),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=n.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,r)=>{if(!r.debugging)return;let o=t.target.ref,n=yu(o);if(!n)return;let s=db(n);if(!s)return;let i=o.context.editor;if(i&&i.onInspect)return i.onInspect(s,o,o.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return o.context.socket?.emit&&o.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(S(e)){let{Content:r,...o}=e;for(let n in o)Qn[n]||(o[n].__ref||(o[n].__ref={}),o[n].__ref.__componentKey||(o[n].__ref.__componentKey=n))}},onBeforeUpdate:(t,e,r)=>{let{area:o}=r,n=r.area&&r.parent.debugging,s;if(!n)s="display: none !important";else if(o){let{x:i,y:a,width:c,height:l}=o;s=`
90
90
  display: block !important;
91
91
  top: ${a-6}px;
92
92
  left: ${i-6}px;
93
93
  width: ${c+12}px;
94
94
  height: ${l+12}px;
95
- `}return e.node.style=s,e.Span.node.innerText=r.focusKey,!1}}},eb={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(cu):t.extends?t.extends=[t.extends,cu]:t.extends=[cu]}};var nb={};P(nb,{apiUrl:()=>ob,channelByApiUrl:()=>pR,channelNames:()=>uR,channels:()=>Zt,currentChannel:()=>qr,defaultChannel:()=>wR,deployTarget:()=>bR,isKnownChannel:()=>xR,mermaidUrl:()=>yR,normalizeOwnerSegment:()=>SR,normalizeProjectKey:()=>vR,normalizeProjectSlug:()=>kR,parseSymboLsHost:()=>CR,previewProjectUrl:()=>mR,previewUrl:()=>jk,resolveChannel:()=>Do,screenshotCdnHost:()=>Bk,screenshotCdnUrl:()=>_R,setChannel:()=>dR,shellUrl:()=>gR,socketUrl:()=>hR});var Zt={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 uR=Object.keys(Zt.channels),dr=t=>!!(t&&Zt.channels[t]),Do=t=>dr(t)?Zt.channels[t]:Zt.channels[Zt.defaultChannel],dR=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=dr(t)?t:null,os=void 0)},os,tc=t=>typeof process<"u"&&process.env&&process.env[t]||null,qr=()=>{if(os!==void 0)return os;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=tc("SYMBOLS_CHANNEL"),r=tc("NODE_ENV");return os=dr(t)&&t||dr(e)&&e||dr(r)&&r||Zt.defaultChannel,os===Zt.defaultChannel&&!dr(t)&&!dr(e)&&!dr(r)&&typeof process<"u"&&process.versions&&process.versions.node&&console.warn(`[channels] no channel configured (NODE_ENV=${r||"unset"}, __SYMBOLS_CHANNEL__ unset) \u2014 falling back to "${Zt.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),os},Mk=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],Fk=t=>{let e=Mk.indexOf(t);return e===-1?Mk.length:e},pR=t=>{if(!t)return null;let e=Object.keys(Zt.channels).filter(r=>Zt.channels[r].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((r,o)=>Fk(r)-Fk(o))[0]},ob=(t=qr())=>tc("SYMBOLS_API_URL")||Do(t).api,hR=(t=qr())=>tc("SYMBOLS_SOCKET_URL")||Do(t).socket,gR=(t=qr())=>Do(t).shell||null,jk=(t=qr())=>Do(t).preview||null,mR=({owner:t,key:e,env:r="production"}={},o=qr())=>{let n=jk(o);if(!n||!t||!e)return null;let s=n.match(/^(https?:\/\/)(.+)$/);if(!s)return null;let[,i,a]=s,c=`${encodeURIComponent(t)}--${encodeURIComponent(e)}`,l=`${i}${c}.${a}/`;return!r||r==="production"||r==="prod"?l:`${l}?env=${encodeURIComponent(r)}`},yR=({owner:t,key:e,env:r="production"}={},o=qr())=>{let n=Do(o).mermaidApex;if(!n||!t||!e)return null;let i=!r||r==="production"||r==="prod"?"":`--${encodeURIComponent(r)}`,a=`${encodeURIComponent(t)}--${encodeURIComponent(e)}${i}`;return`${n.startsWith("localhost")?"http":"https"}://${a}.${n}`},bR=(t=qr())=>Do(t).deploy||{},Bk=()=>tc("SYMBOLS_SCREENSHOT_CDN")||Zt.screenshotCdn,_R=({owner:t,key:e,page:r="root",componentKey:o,env:n="production",width:s}={})=>{if(!t||!e)return null;let i=o?`component/${encodeURIComponent(o)}`:encodeURIComponent(String(r||"root").replace(/^\/+/,"").replace(/\//g,"-")||"root"),a=[];n&&n!=="production"&&a.push(`env=${encodeURIComponent(n)}`),s&&a.push(`w=${Number(s)}`);let c=a.length?`?${a.join("&")}`:"";return`https://${Bk()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},xR=dr,wR=Zt.defaultChannel,SR=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",kR=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",vR=(t,e={})=>{let r=String(t||"").trim();if(!r)return"";/\.symbo\.ls$/iu.test(r)&&(r=r.replace(/\.symbo\.ls$/iu,"")),r.includes("/")&&(r=r.split("/").pop());let o=typeof e.owner=="string"?e.owner.trim():"";return o&&r.startsWith(`${o}--`)?r=r.slice(o.length+2):!o&&r.includes("--")&&(r=r.slice(r.indexOf("--")+2)),r},Nk={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},CR=t=>{if(typeof t!="string"||!t)return null;let e=t.toLowerCase().replace(/^www\./,"").replace(/\/$/,"");if(!e.endsWith(".symbo.ls"))return null;let r=e.split(".");if(r.length<4||r.slice(-2).join(".")!=="symbo.ls")return null;if(r.length===4){let s=r[1],i=r[0],a=Nk[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?Nk[u]||u:null;return{projectKey:f,owner:l,env:d||a,sysEnv:a}}}}}if(r.length>=5)return{projectKey:r[1],owner:r[2],env:r[0]};let o=r[1],n=r[0];if(n.includes("--")){let[s,i]=n.split("--",2);return!s||!i?null:{projectKey:s,owner:o,env:i}}return{projectKey:n,owner:o,env:"production"}};var ab={};P(ab,{BUILD_DOMQL_SYSTEM_PROMPT:()=>Qk,DEFAULT_MAX_TOKENS:()=>mu,DEFAULT_MODEL:()=>Kr,DEFAULT_PROVIDER:()=>hu,DEFAULT_TEMPERATURE:()=>gu,MODEL_TIER_ALIASES:()=>ib,PROVIDER_MODELS:()=>Vk,SIMONE_BASE_URL:()=>ec,SIMONE_CHAT_PATH:()=>fu,SIMONE_CODE_PATH:()=>uu,SIMONE_CODE_SYMBOLS_PATH:()=>du,SIMONE_HEALTH_PATH:()=>pu,SIMONE_TOOLS_PATH:()=>Uk,WORKSPACE_SYSTEM_PROMPT:()=>Zk,buildMessages:()=>Kk,chat:()=>rc,health:()=>qk,parseSimoneResponse:()=>Xk,resolveModel:()=>tv,streamChat:()=>rc,streamCode:()=>Hk,streamCodeSymbols:()=>Wk,toLegacyEnvelope:()=>Jk});var ec="https://symbols-service-production.up.railway.app",fu="/api/chat",uu="/api/code",du="/api/code-symbols",pu="/api/health",Uk="/api/tools",hu="openai-compatible",Kr="claude-sonnet-4-6",gu=.7,mu=4096,Vk={"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-3-pro-preview"]};function zk(t,e){return t?t.replace(/\/$/,"")+e:e}function ER(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 rc(t,e={},r){let{baseUrl:o=ec,path:n=fu,provider:s=hu,model:i=Kr,temperature:a=.7,maxTokens:c=4096,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:s,model:i,temperature:a,maxTokens:c};l&&(h.effort=l),f&&(h.apiKeys=f);let g=await fetch(zk(o,n),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(h),signal:u});if(!g.ok){let x=g.statusText;try{let E=await g.text();try{let O=JSON.parse(E);x=O.error||O.detail||x}catch{x=E||x}}catch{}let k=new Error(`simone: HTTP ${g.status} \u2014 ${x}`);throw k.status=g.status,k}if(!g.body||typeof g.body.getReader!="function"){let x=await g.text();return r&&r(x),{text:x,errors:[]}}let p=g.body.getReader(),m=new TextDecoder,_=[],b=[],y="";try{for(;;){let{done:x,value:k}=await p.read();if(x)break;y+=m.decode(k,{stream:!0});let E=y.indexOf(`
96
- `);for(;E!==-1;){let O=y.slice(0,E).trim();if(y=y.slice(E+1),O){let $=ER(O);if($?.done)return{text:_.join(""),errors:b};let D=$?.chunk;D?.delta&&(_.push(D.delta),r&&r(D.delta)),D?.error&&b.push(D.error)}E=y.indexOf(`
97
- `)}}return{text:_.join(""),errors:b}}finally{p.cancel().catch(()=>{})}}function Hk(t,e={},r){return rc(t,{...e,path:uu},r)}function Wk(t,e={},r){return rc(t,{...e,path:du},r)}async function qk(t={}){let{baseUrl:e=ec,signal:r,headers:o}=t,n=await fetch(zk(e,pu),{method:"GET",headers:o,signal:r});if(!n.ok)throw new Error(`simone health: HTTP ${n.status}`);return n.json()}function Kk({system:t,history:e=[],user:r,context:o}){let n=[];t&&n.push({role:"system",content:t});for(let s of e)!s||!s.role||typeof s.content!="string"||!s.content||n.push({role:s.role,content:s.content});if(r){let s=r;if(o!=null){let i=typeof o=="string"?o:JSON.stringify(o,null,2);s=`${s}
95
+ `}return e.node.style=s,e.Span.node.innerText=r.focusKey,!1}}},pb={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(mu):t.extends?t.extends=[t.extends,mu]:t.extends=[mu]}};var mb={};P(mb,{apiUrl:()=>gb,channelByApiUrl:()=>OR,channelNames:()=>AR,channels:()=>te,currentChannel:()=>Yr,defaultChannel:()=>FR,deployTarget:()=>$R,isKnownChannel:()=>MR,mermaidUrl:()=>DR,normalizeOwnerSegment:()=>NR,normalizeProjectKey:()=>BR,normalizeProjectSlug:()=>jR,parseSymboLsHost:()=>UR,previewProjectUrl:()=>IR,previewUrl:()=>Xk,resolveChannel:()=>No,screenshotCdnHost:()=>Zk,screenshotCdnUrl:()=>LR,setChannel:()=>TR,shellUrl:()=>PR,socketUrl:()=>RR});var te={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 AR=Object.keys(te.channels),gr=t=>!!(t&&te.channels[t]),No=t=>gr(t)?te.channels[t]:te.channels[te.defaultChannel],TR=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=gr(t)?t:null,us=void 0)},us,cc=t=>typeof process<"u"&&process.env&&process.env[t]||null,Yr=()=>{if(us!==void 0)return us;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=cc("SYMBOLS_CHANNEL"),r=cc("NODE_ENV");return us=gr(t)&&t||gr(e)&&e||gr(r)&&r||te.defaultChannel,us===te.defaultChannel&&!gr(t)&&!gr(e)&&!gr(r)&&typeof process<"u"&&process.versions&&process.versions.node&&console.warn(`[channels] no channel configured (NODE_ENV=${r||"unset"}, __SYMBOLS_CHANNEL__ unset) \u2014 falling back to "${te.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),us},Kk=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],Gk=t=>{let e=Kk.indexOf(t);return e===-1?Kk.length:e},OR=t=>{if(!t)return null;let e=Object.keys(te.channels).filter(r=>te.channels[r].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((r,o)=>Gk(r)-Gk(o))[0]},gb=(t=Yr())=>cc("SYMBOLS_API_URL")||No(t).api,RR=(t=Yr())=>cc("SYMBOLS_SOCKET_URL")||No(t).socket,PR=(t=Yr())=>No(t).shell||null,Xk=(t=Yr())=>No(t).preview||null,IR=({owner:t,key:e,env:r="production"}={},o=Yr())=>{let n=Xk(o);if(!n||!t||!e)return null;let s=n.match(/^(https?:\/\/)(.+)$/);if(!s)return null;let[,i,a]=s,c=`${encodeURIComponent(t)}--${encodeURIComponent(e)}`,l=`${i}${c}.${a}/`;return!r||r==="production"||r==="prod"?l:`${l}?env=${encodeURIComponent(r)}`},DR=({owner:t,key:e,env:r="production"}={},o=Yr())=>{let n=No(o).mermaidApex;if(!n||!t||!e)return null;let i=!r||r==="production"||r==="prod"?"":`--${encodeURIComponent(r)}`,a=`${encodeURIComponent(t)}--${encodeURIComponent(e)}${i}`;return`${n.startsWith("localhost")?"http":"https"}://${a}.${n}`},$R=(t=Yr())=>No(t).deploy||{},Zk=()=>cc("SYMBOLS_SCREENSHOT_CDN")||te.screenshotCdn,LR=({owner:t,key:e,page:r="root",componentKey:o,env:n="production",width:s}={})=>{if(!t||!e)return null;let i=o?`component/${encodeURIComponent(o)}`:encodeURIComponent(String(r||"root").replace(/^\/+/,"").replace(/\//g,"-")||"root"),a=[];n&&n!=="production"&&a.push(`env=${encodeURIComponent(n)}`),s&&a.push(`w=${Number(s)}`);let c=a.length?`?${a.join("&")}`:"";return`https://${Zk()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},MR=gr,FR=te.defaultChannel,NR=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",jR=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",BR=(t,e={})=>{let r=String(t||"").trim();if(!r)return"";/\.symbo\.ls$/iu.test(r)&&(r=r.replace(/\.symbo\.ls$/iu,"")),r.includes("/")&&(r=r.split("/").pop());let o=typeof e.owner=="string"?e.owner.trim():"";return o&&r.startsWith(`${o}--`)?r=r.slice(o.length+2):!o&&r.includes("--")&&(r=r.slice(r.indexOf("--")+2)),r},Yk={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},UR=t=>{if(typeof t!="string"||!t)return null;let e=t.toLowerCase().replace(/^www\./,"").replace(/\/$/,"");if(!e.endsWith(".symbo.ls"))return null;let r=e.split(".");if(r.length<4||r.slice(-2).join(".")!=="symbo.ls")return null;if(r.length===4){let s=r[1],i=r[0],a=Yk[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?Yk[u]||u:null;return{projectKey:f,owner:l,env:d||a,sysEnv:a}}}}}if(r.length>=5)return{projectKey:r[1],owner:r[2],env:r[0]};let o=r[1],n=r[0];if(n.includes("--")){let[s,i]=n.split("--",2);return!s||!i?null:{projectKey:s,owner:o,env:i}}return{projectKey:n,owner:o,env:"production"}};var _b={};P(_b,{BUILD_DOMQL_SYSTEM_PROMPT:()=>fv,DEFAULT_MAX_TOKENS:()=>vu,DEFAULT_MODEL:()=>Xr,DEFAULT_PROVIDER:()=>Su,DEFAULT_TEMPERATURE:()=>ku,MODEL_TIER_ALIASES:()=>bb,PROVIDER_MODELS:()=>Qk,SIMONE_BASE_URL:()=>lc,SIMONE_CHAT_PATH:()=>bu,SIMONE_CODE_PATH:()=>_u,SIMONE_CODE_SYMBOLS_PATH:()=>xu,SIMONE_HEALTH_PATH:()=>wu,SIMONE_TOOLS_PATH:()=>Jk,WORKSPACE_SYSTEM_PROMPT:()=>lv,buildMessages:()=>nv,chat:()=>fc,health:()=>ov,parseSimoneResponse:()=>av,resolveModel:()=>uv,streamChat:()=>fc,streamCode:()=>ev,streamCodeSymbols:()=>rv,toLegacyEnvelope:()=>cv});var lc="https://symbols-service-production.up.railway.app",bu="/api/chat",_u="/api/code",xu="/api/code-symbols",wu="/api/health",Jk="/api/tools",Su="openai-compatible",Xr="claude-sonnet-4-6",ku=.7,vu=4096,Qk={"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-3-pro-preview"]};function tv(t,e){return t?t.replace(/\/$/,"")+e:e}function VR(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 fc(t,e={},r){let{baseUrl:o=lc,path:n=bu,provider:s=Su,model:i=Xr,temperature:a=.7,maxTokens:c=4096,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:s,model:i,temperature:a,maxTokens:c};l&&(h.effort=l),f&&(h.apiKeys=f);let g=await fetch(tv(o,n),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(h),signal:u});if(!g.ok){let x=g.statusText;try{let E=await g.text();try{let O=JSON.parse(E);x=O.error||O.detail||x}catch{x=E||x}}catch{}let k=new Error(`simone: HTTP ${g.status} \u2014 ${x}`);throw k.status=g.status,k}if(!g.body||typeof g.body.getReader!="function"){let x=await g.text();return r&&r(x),{text:x,errors:[]}}let p=g.body.getReader(),m=new TextDecoder,b=[],_=[],y="";try{for(;;){let{done:x,value:k}=await p.read();if(x)break;y+=m.decode(k,{stream:!0});let E=y.indexOf(`
96
+ `);for(;E!==-1;){let O=y.slice(0,E).trim();if(y=y.slice(E+1),O){let $=VR(O);if($?.done)return{text:b.join(""),errors:_};let I=$?.chunk;I?.delta&&(b.push(I.delta),r&&r(I.delta)),I?.error&&_.push(I.error)}E=y.indexOf(`
97
+ `)}}return{text:b.join(""),errors:_}}finally{p.cancel().catch(()=>{})}}function ev(t,e={},r){return fc(t,{...e,path:_u},r)}function rv(t,e={},r){return fc(t,{...e,path:xu},r)}async function ov(t={}){let{baseUrl:e=lc,signal:r,headers:o}=t,n=await fetch(tv(e,wu),{method:"GET",headers:o,signal:r});if(!n.ok)throw new Error(`simone health: HTTP ${n.status}`);return n.json()}function nv({system:t,history:e=[],user:r,context:o}){let n=[];t&&n.push({role:"system",content:t});for(let s of e)!s||!s.role||typeof s.content!="string"||!s.content||n.push({role:s.role,content:s.content});if(r){let s=r;if(o!=null){let i=typeof o=="string"?o:JSON.stringify(o,null,2);s=`${s}
98
98
 
99
99
  ---
100
100
  Context:
101
101
  \`\`\`json
102
102
  ${i}
103
- \`\`\``}n.push({role:"user",content:s})}return n}var Yk=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,AR=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function TR(t){let e=[];for(let r of t.matchAll(Yk))e.push({lang:(r.groups?.lang||"").toLowerCase(),code:r.groups?.code??""});return e}function OR(t){return t.replace(Yk,"").trim()}function sb(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 Gk(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&AR.has(t.type)}function Xk(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let r=TR(e),o=r.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),n=r.filter(i=>i.lang==="json"),s=OR(e);for(let i of n){let a=sb(i.code);if(Gk(a))return{kind:"asset",text:s||a.description||"",asset:a,message:a.description||s||`Generated ${a.type}: ${a.title||a.key||""}`.trim()}}if(o.length>0){let i=o[0].code,a=sb("["+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=sb(e);if(Gk(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 Jk(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 Zk=["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(" "),Qk=["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(`
104
- `),ib={Starter:Kr,Free:Kr,Pro:"claude-opus-4-6"};function tv(t){return t?ib[t]||t:Kr}var ev={"@symbo.ls/signal":yd,"@symbo.ls/scratch":Mg,"@symbo.ls/element":$m,"@symbo.ls/css":Hg,"@symbo.ls/utils":El,"@symbo.ls/state":wm,"@symbo.ls/router":La,"@symbo.ls/polyglot":Iy,"@symbo.ls/helmet":Ry,"@symbo.ls/fetch":co,"@symbo.ls/capsize":$y,"@symbo.ls/shorthand":Uy,"@symbo.ls/analyze":Qy,"@symbo.ls/inspect":rb,"@symbo.ls/channels":nb,"@symbo-ls/simone-server":ab},rv=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:{}),o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in ev)o[n]||(o[n]=ev[n]);if(e)for(let n in e)o[n]||(o[n]=e[n]);return o},ov=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:null);if(!r||!e||typeof e!="object")return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in e){let s=e[n];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(o,n))continue;let i=a=>(Object.defineProperty(o,n,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(o,n,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return o},nv=["@symbo.ls/sdk"],sv=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!t||typeof t!="object")return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in t){let s=t[n];!s||typeof s!="object"&&typeof s!="function"||o[n]||(o[n]=s)}return o},RR=/^@symbo[-.]ls\//,PR=t=>t.includes("/")?t.slice(t.indexOf("/")+1):t,iv=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!Array.isArray(t))return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n of t){let s=n&&n.library?n.library:n;if(!s||typeof s!="object"||s.__isStub)continue;let i=s.key||s.name||s.__libraryKey,a=[];for(let c of[s.key,s.name,s.__libraryKey,s.__libraryName]){if(typeof c!="string"||!c||c!==i&&!RR.test(c))continue;let l=PR(c);l&&!a.includes(l)&&a.push(l)}for(let c of a)for(let l of[`@symbo-ls/${c}`,`@symbo.ls/${c}`])o[l]||(o[l]=s)}return o};R();var lv=t=>{let e=typeof window<"u"?window:globalThis||{};e.document||(e.document={body:{}});let r=typeof document<"u"?document:e.document;t.document=t.document||r;let o=t.window;return o&&o!==e&&typeof o.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=o||e,t.window},av=(t="smbls")=>{let e={};for(let r in Eo)Object.prototype.hasOwnProperty.call(Eo,r)&&(Be(r)?e[`smbls.${r}`]=Eo[r]:e[r]=Eo[r]);return e},fv=t=>t.components?{...av(),...t.components}:av(),uv=t=>({...Fa,...La,...Or,...t.utils,...t.snippets,...t.functions}),dv=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var IR=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,DR=3e3,$R=(t,e,r=o=>import(o))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let o=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(o[t])return Promise.resolve(o[t]);let n=Promise.resolve().then(()=>r(e)).then(i=>(i&&!o[t]&&(o[t]=i),o[t]||null)).catch(()=>null);return new Promise(i=>{let a=setTimeout(()=>i(null),DR);n.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},cv={},pv=async({dependencies:t,dependenciesOnDemand:e,document:r,preventCaching:o=!1,cdnProvider:n,packageManager:s,symbolsConfig:i,registerDependency:a=$R})=>{if(n||(n=Er[s]||sn(i)||"esmsh"),!t)return null;if(!cn(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=wr()&&o?`?${Math.random()}`:"",f=async(d,h)=>{let g=Ee(d,h,n)+l;try{await Promise.race([ln(g,{document:r,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 ${n}:`,p),n!=="symbols")try{let m=Ee(d,h,"symbols")+l;await Promise.race([ln(m,{document:r,type:"module"}),new Promise((_,b)=>setTimeout(()=>b(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])&&!cv[d]&&(cv[d]=!0,!fo(d))){if(an(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}IR(d)||u.push(f(d,h))}}return u.length&&await Promise.allSettled(u),t},hv=async(t,e)=>{let r=e.window||window,o=e.cdnProvider||sn(e.symbolsConfig)||"esmsh",n=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=o)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&fo(a))return await u.require(a,c);if(!u.packages[a]){let d=wr()?`?${Math.random()}`:"";if(l&&l[a]){let h=l[a],g=Ee(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=Ee(a,h,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let h=Ee(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=Ee(a,"latest","symbols")+d;await i.utils.loadRemoteScript(p,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};r.packages?r.packages=gt(r.packages,t):r.packages=t,r.require||(e.utils.require=await n(e),r.require=e.utils.require),r.requireOnDemand||(e.utils.requireOnDemand=await s(e),r.requireOnDemand=e.utils.requireOnDemand)},LR=/\s+/g,gv=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,MR=(t,e)=>{let r="";for(let o in t){let n=t[o];typeof n=="boolean"&&n?r+=` ${o}`:typeof n=="string"?r+=` ${n}`:typeof n=="function"&&(r+=` ${gv(n,e)}`)}return r},FR=(t,e,r)=>{if(!t)return;let{key:o}=e;t===!0&&(t=e.classlist={key:o}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=MR(t,e));let n=t.replace(LR," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",n);else if(r)try{r.className=n}catch{}return n},NR=()=>(t,e,r)=>{let o=gv(t,e);if(t){let{__ref:n}=e;n.__class.style=o}mv()(e.classlist,e,e.state,!0)},mv=()=>(t,e,r,o)=>{if(e.style&&!o)return;let{__ref:n}=e,{__class:s,__classNames:i}=n;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=_e(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&FR(i,e,e.node)}},jR=()=>({style:NR(),classlist:mv()}),BR=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],cb=new WeakSet,lb=!1,UR=t=>!!t&&typeof t=="object",yv=(t,e)=>{let r=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,o=e.initOptions||{},n=e.registry||jR(),s=e.designSystem?st(ft(e.designSystem),ft(Da),re):ft(Da),i={};for(let p of BR)e[p]!==void 0&&(i[p]=e[p]);let a,c=UR(r),f=c&&cb.has(r)&&!e.skipDesignSystemInit,u=!f&&!lb,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=C(t)||C(),a&&(a.__domDocument=r),a?.CSS_VARS){it(a);try{kt({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&kt(Yn(a.CSS_MEDIA_VARS,d))}finally{tt()}}}else if(u){let p=C();p&&(p.__domDocument=r),a=ur(s,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...qf,...i,...o}),a&&a!==p&&(a.__domDocument=r),c&&cb.add(r),lb=!0}else{let p=Ki(t,s,{cleanBase:!0});for(let m in i)p[m]=i[m];if(p.__domDocument=r,f){let m=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=m,p.varPrefix=m}it(p);try{a=ur(p,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...qf,...i,...o})}finally{tt()}c&&cb.add(r),lb=!0}let h=a?.CONFIG||a,g=h?.font;if(g){it(h);try{for(let p in g){let m=g[p];if(!m?.fontFace)continue;let _=Array.isArray(m.fontFace)?m.fontFace:[m.fontFace];for(let b of _)typeof b=="string"&&b.includes("font-family")&&kt(`@font-face { ${b} }`)}}finally{tt()}}return[a,n]},bv=(t,e)=>{let r={};e.state&&st(r,e.state),t&&t.state&&st(r,t.state);let o=e.polyglot;if(o?.translations){let n=null;try{typeof localStorage<"u"&&(n=localStorage.getItem(o.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=n||r.lang||o.defaultLang||"en";n&&n!==r.lang&&(r.lang=n);let i=new Set,a=new Set,c=(u,d)=>{if(!a.has(u)){if(!er(e,u,r)){i.add(u);return}r[u]=d,a.add(u),Ue(e,u)}},l=o.translations[s];if(l&&typeof l=="object")for(let u in l)c(u,l[u]);let f=new Set(o.languages||[]);for(let u in o.translations)f.has(u)||c(u,o.translations[u]);i.size&&o.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 r.isRootState=!0,ft(r)},_v=(t,e)=>{S(t.routes)&&S(e.pages)&&gt(t.routes,e.pages);let r=t.routes||e.pages||{},o=[];for(let n in r){if(n.charCodeAt(0)===47)continue;let i="/"+(n==="index"?"":n);Object.prototype.hasOwnProperty.call(r,i)?o.push(`${n} -> ${i}`):r[i]=r[n],delete r[n]}return o.length&&e&&e.verbose!==!1&&console.warn(`[smbls] preparePages kept ${o.length} explicitly declared route${o.length===1?"":"s"} over a same-named page key (${o.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.`),r},xv=t=>{$i(t,t.sharedLibraries)};var oc={polyglot:za,getLocalStateLang:Ka,getActiveLang:Hr,getLang:Hr,setLang:Wa,getLanguages:Va,loadTranslations:Ha,upsertTranslation:qa};vr();var $e=Object.create(null);$e.open="0";$e.close="1";$e.ping="2";$e.pong="3";$e.message="4";$e.upgrade="5";$e.noop="6";var nc=Object.create(null);Object.keys($e).forEach(t=>{nc[$e[t]]=t});var sc={type:"error",data:"parser error"};var kv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",vv=typeof ArrayBuffer=="function",Cv=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,ic=({type:t,data:e},r,o)=>kv&&e instanceof Blob?r?o(e):wv(e,o):vv&&(e instanceof ArrayBuffer||Cv(e))?r?o(e):wv(new Blob([e]),o):o($e[t]+(e||"")),wv=(t,e)=>{let r=new FileReader;return r.onload=function(){let o=r.result.split(",")[1];e("b"+(o||""))},r.readAsDataURL(t)};function Sv(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var fb;function Ev(t,e){if(kv&&t.data instanceof Blob)return t.data.arrayBuffer().then(Sv).then(e);if(vv&&(t.data instanceof ArrayBuffer||Cv(t.data)))return e(Sv(t.data));ic(t,!1,r=>{fb||(fb=new TextEncoder),e(fb.encode(r))})}var Av="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ac=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Av.length;t++)ac[Av.charCodeAt(t)]=t;var Tv=t=>{let e=t.length*.75,r=t.length,o,n=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(o=0;o<r;o+=4)s=ac[t.charCodeAt(o)],i=ac[t.charCodeAt(o+1)],a=ac[t.charCodeAt(o+2)],c=ac[t.charCodeAt(o+3)],f[n++]=s<<2|i>>4,f[n++]=(i&15)<<4|a>>2,f[n++]=(a&3)<<6|c&63;return l};var VR=typeof ArrayBuffer=="function",cc=(t,e)=>{if(typeof t!="string")return{type:"message",data:Ov(t,e)};let r=t.charAt(0);return r==="b"?{type:"message",data:zR(t.substring(1),e)}:nc[r]?t.length>1?{type:nc[r],data:t.substring(1)}:{type:nc[r]}:sc},zR=(t,e)=>{if(VR){let r=Tv(t);return Ov(r,e)}else return{base64:!0,data:t}},Ov=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var Rv="",Pv=(t,e)=>{let r=t.length,o=new Array(r),n=0;t.forEach((s,i)=>{ic(s,!1,a=>{o[i]=a,++n===r&&e(o.join(Rv))})})},Iv=(t,e)=>{let r=t.split(Rv),o=[];for(let n=0;n<r.length;n++){let s=cc(r[n],e);if(o.push(s),s.type==="error")break}return o};function Dv(){return new TransformStream({transform(t,e){Ev(t,r=>{let o=r.length,n;if(o<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,o);else if(o<65536){n=new Uint8Array(3);let s=new DataView(n.buffer);s.setUint8(0,126),s.setUint16(1,o)}else{n=new Uint8Array(9);let s=new DataView(n.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(o))}t.data&&typeof t.data!="string"&&(n[0]|=128),e.enqueue(n),e.enqueue(r)})}})}var ub;function yu(t){return t.reduce((e,r)=>e+r.length,0)}function bu(t,e){if(t[0].length===e)return t.shift();let r=new Uint8Array(e),o=0;for(let n=0;n<e;n++)r[n]=t[0][o++],o===t[0].length&&(t.shift(),o=0);return t.length&&o<t[0].length&&(t[0]=t[0].slice(o)),r}function $v(t,e){ub||(ub=new TextDecoder);let r=[],o=0,n=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(o===0){if(yu(r)<1)break;let c=bu(r,1);s=(c[0]&128)===128,n=c[0]&127,n<126?o=3:n===126?o=1:o=2}else if(o===1){if(yu(r)<2)break;let c=bu(r,2);n=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),o=3}else if(o===2){if(yu(r)<8)break;let c=bu(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(sc);break}n=f*Math.pow(2,32)+l.getUint32(4),o=3}else{if(yu(r)<n)break;let c=bu(r,n);a.enqueue(cc(s?c:ub.decode(c),e)),o=0}if(n===0||n>t){a.enqueue(sc);break}}}})}var db=4;function dt(t){if(t)return HR(t)}function HR(t){for(var e in dt.prototype)t[e]=dt.prototype[e];return t}dt.prototype.on=dt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};dt.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};dt.prototype.off=dt.prototype.removeListener=dt.prototype.removeAllListeners=dt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,n=0;n<r.length;n++)if(o=r[n],o===e||o.fn===e){r.splice(n,1);break}return r.length===0&&delete this._callbacks["$"+t],this};dt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(r){r=r.slice(0);for(var o=0,n=r.length;o<n;++o)r[o].apply(this,e)}return this};dt.prototype.emitReserved=dt.prototype.emit;dt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};dt.prototype.hasListeners=function(t){return!!this.listeners(t).length};var pr=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),Ut=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Lv="arraybuffer";function _u(t,...e){return e.reduce((r,o)=>(t.hasOwnProperty(o)&&(r[o]=t[o]),r),{})}var WR=Ut.setTimeout,qR=Ut.clearTimeout;function hr(t,e){e.useNativeTimers?(t.setTimeoutFn=WR.bind(Ut),t.clearTimeoutFn=qR.bind(Ut)):(t.setTimeoutFn=Ut.setTimeout.bind(Ut),t.clearTimeoutFn=Ut.clearTimeout.bind(Ut))}var KR=1.33;function Mv(t){return typeof t=="string"?GR(t):Math.ceil((t.byteLength||t.size)*KR)}function GR(t){let e=0,r=0;for(let o=0,n=t.length;o<n;o++)e=t.charCodeAt(o),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(o++,r+=4);return r}function xu(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Fv(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function Nv(t){let e={},r=t.split("&");for(let o=0,n=r.length;o<n;o++){let s=r[o].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var wu=class extends Error{constructor(e,r,o){super(e),this.description=r,this.context=o,this.type="TransportError"}},gr=class extends dt{constructor(e){super(),this.writable=!1,hr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,o){return super.emitReserved("error",new wu(e,r,o)),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 r=cc(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,r={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_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 r=Fv(e);return r.length?"?"+r:""}};var lc=class extends gr{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||r()})),this.writable||(o++,this.once("drain",function(){--o||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let r=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};Iv(e,this.socket.binaryType).forEach(r),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,Pv(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=xu()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}};var jv=!1;try{jv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Bv=jv;function YR(){}var pb=class extends lc{constructor(e){if(super(e),typeof location<"u"){let r=location.protocol==="https:",o=location.port;o||(o=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||o!==e.port}}doWrite(e,r){let o=this.request({method:"POST",data:e});o.on("success",r),o.on("error",(n,s)=>{this.onError("xhr post error",n,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,o)=>{this.onError("xhr poll error",r,o)}),this.pollXhr=e}},Gr=class t extends dt{constructor(e,r,o){super(),this.createRequest=e,hr(this,o),this._opts=o,this._method=o.method||"GET",this._uri=r,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var e;let r=_u(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;let o=this._xhr=this.createRequest(r);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&o.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var n;o.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},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=YR,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()}};Gr.requestsCount=0;Gr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Uv);else if(typeof addEventListener=="function"){let t="onpagehide"in Ut?"pagehide":"unload";addEventListener(t,Uv,!1)}}function Uv(){for(let t in Gr.requests)Gr.requests.hasOwnProperty(t)&&Gr.requests[t].abort()}var XR=(function(){let t=Vv({xdomain:!1});return t&&t.responseType!==null})(),Yr=class extends pb{constructor(e){super(e);let r=e&&e.forceBase64;this.supportsBinary=XR&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Gr(Vv,this.uri(),e)}};function Vv(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Bv))return new XMLHttpRequest}catch{}if(!e)try{return new Ut[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var zv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",gb=class extends gr{get name(){return"websocket"}doOpen(){let e=this.uri(),r=this.opts.protocols,o=zv?{}:_u(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,o)}catch(n){return this.emitReserved("error",n)}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 r=0;r<e.length;r++){let o=e[r],n=r===e.length-1;ic(o,this.supportsBinary,s=>{try{this.doWrite(o,s)}catch{}n&&pr(()=>{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",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=xu()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}},hb=Ut.WebSocket||Ut.MozWebSocket,Xr=class extends gb{createSocket(e,r,o){return zv?new hb(e,r,o):r?new hb(e,r):new hb(e)}doWrite(e,r){this.ws.send(r)}};var ns=class extends gr{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 r=$v(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=e.readable.pipeThrough(r).getReader(),n=Dv();n.readable.pipeTo(e.writable),this._writer=n.writable.getWriter();let s=()=>{o.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 r=0;r<e.length;r++){let o=e[r],n=r===e.length-1;this._writer.write(o).then(()=>{n&&pr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var mb={websocket:Xr,webtransport:ns,polling:Yr};var JR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ZR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ss(t){if(t.length>8e3)throw"URI too long";let e=t,r=t.indexOf("["),o=t.indexOf("]");r!=-1&&o!=-1&&(t=t.substring(0,r)+t.substring(r,o).replace(/:/g,";")+t.substring(o,t.length));let n=JR.exec(t||""),s={},i=14;for(;i--;)s[ZR[i]]=n[i]||"";return r!=-1&&o!=-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=QR(s,s.path),s.queryKey=tP(s,s.query),s}function QR(t,e){let r=/\/{2,9}/g,o=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&o.splice(0,1),e.slice(-1)=="/"&&o.splice(o.length-1,1),o}function tP(t,e){let r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,n,s){n&&(r[n]=s)}),r}var yb=typeof addEventListener=="function"&&typeof removeEventListener=="function",Su=[];yb&&addEventListener("offline",()=>{Su.forEach(t=>t())},!1);var $o=class t extends dt{constructor(e,r){if(super(),this.binaryType=Lv,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){let o=ss(e);r.hostname=o.host,r.secure=o.protocol==="https"||o.protocol==="wss",r.port=o.port,o.query&&(r.query=o.query)}else r.host&&(r.hostname=ss(r.host).host);hr(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(o=>{let n=o.prototype.name;this.transports.push(n),this._transportsByName[n]=o}),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},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Nv(this.opts.query)),yb&&(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"})},Su.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let r=Object.assign({},this.opts.query);r.EIO=db,r.transport=e,this.id&&(r.sid=this.id);let o=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](o)}_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 r=this.createTransport(e);r.open(),this.setTransport(r)}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",r=>this._onClose("transport close",r))}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 r=new Error("server error");r.code=e.data,this._onError(r);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 r=1;for(let o=0;o<this.writeBuffer.length;o++){let n=this.writeBuffer[o].data;if(n&&(r+=Mv(n)),o>0&&r>this._maxPayload)return this.writeBuffer.slice(0,o);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,pr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,o){return this._sendPacket("message",e,r,o),this}send(e,r,o){return this._sendPacket("message",e,r,o),this}_sendPacket(e,r,o,n){if(typeof r=="function"&&(n=r,r=void 0),typeof o=="function"&&(n=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;let s={type:e,data:r,options:o};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),n&&this.once("flush",n),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},o=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():e()}):this.upgrading?o():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,r){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(),yb&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let o=Su.indexOf(this._offlineEventListener);o!==-1&&Su.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}};$o.protocol=db;var ku=class extends $o{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 r=this.createTransport(e),o=!1;$o.priorWebsocketSuccess=!1;let n=()=>{o||(r.send([{type:"ping",data:"probe"}]),r.once("packet",u=>{if(!o)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;$o.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(f(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{let d=new Error("probe error");d.transport=r.name,this.emitReserved("upgradeError",d)}}))};function s(){o||(o=!0,f(),r.close(),r=null)}let i=u=>{let d=new Error("probe error: "+u);d.transport=r.name,s(),this.emitReserved("upgradeError",d)};function a(){i("transport closed")}function c(){i("socket closed")}function l(u){r&&u.name!==r.name&&s()}let f=()=>{r.removeListener("open",n),r.removeListener("error",i),r.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};r.once("open",n),r.once("error",i),r.once("close",a),this.once("close",c),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{o||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let r=[];for(let o=0;o<e.length;o++)~this.transports.indexOf(e[o])&&r.push(e[o]);return r}},is=class extends ku{constructor(e,r={}){let o=typeof e=="object"?e:r;(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(n=>mb[n]).filter(n=>!!n)),super(e,o)}};var ZU=is.protocol;function Hv(t,e="",r){let o=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),o=ss(t)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";let s=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+s+":"+o.port+e,o.href=o.protocol+"://"+s+(r&&r.port===o.port?"":":"+o.port),o}var vb={};P(vb,{Decoder:()=>Sb,Encoder:()=>wb,PacketType:()=>B,isPacketValid:()=>wP,protocol:()=>eC});var rP=typeof ArrayBuffer=="function",oP=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Wv=Object.prototype.toString,nP=typeof Blob=="function"||typeof Blob<"u"&&Wv.call(Blob)==="[object BlobConstructor]",sP=typeof File=="function"||typeof File<"u"&&Wv.call(File)==="[object FileConstructor]";function uc(t){return rP&&(t instanceof ArrayBuffer||oP(t))||nP&&t instanceof Blob||sP&&t instanceof File}function fc(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,o=t.length;r<o;r++)if(fc(t[r]))return!0;return!1}if(uc(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return fc(t.toJSON(),!0);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&fc(t[r]))return!0;return!1}function qv(t){let e=[],r=t.data,o=t;return o.data=bb(r,e),o.attachments=e.length,{packet:o,buffers:e}}function bb(t,e){if(!t)return t;if(uc(t)){let r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){let r=new Array(t.length);for(let o=0;o<t.length;o++)r[o]=bb(t[o],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){let r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=bb(t[o],e));return r}return t}function Kv(t,e){return t.data=_b(t.data,e),delete t.attachments,t}function _b(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 r=0;r<t.length;r++)t[r]=_b(t[r],e);else if(typeof t=="object")for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=_b(t[r],e));return t}var Qv=HC(Zv(),1),xb=(0,Qv.default)("socket.io-parser"),tC=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],eC=5,B;(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"})(B||(B={}));var wb=class{constructor(e){this.replacer=e}encode(e){return xb("encoding packet %j",e),(e.type===B.EVENT||e.type===B.ACK)&&fc(e)?this.encodeAsBinary({type:e.type===B.EVENT?B.BINARY_EVENT:B.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===B.BINARY_EVENT||e.type===B.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),xb("encoded %j as %s",e,r),r}encodeAsBinary(e){let r=qv(e),o=this.encodeAsString(r.packet),n=r.buffers;return n.unshift(o),n}},Sb=class t extends dt{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);let o=r.type===B.BINARY_EVENT;o||r.type===B.BINARY_ACK?(r.type=o?B.EVENT:B.ACK,this.reconstructor=new kb(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(uc(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0,o={type:Number(e.charAt(0))};if(B[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===B.BINARY_EVENT||o.type===B.BINARY_ACK){let s=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);let i=e.substring(s,r);if(i!=Number(i)||e.charAt(r)!=="-")throw new Error("Illegal attachments");let a=Number(i);if(!rC(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");o.attachments=a}if(e.charAt(r+1)==="/"){let s=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););o.nsp=e.substring(s,r)}else o.nsp="/";let n=e.charAt(r+1);if(n!==""&&Number(n)==n){let s=r+1;for(;++r;){let i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}o.id=Number(e.substring(s,r+1))}if(e.charAt(++r)){let s=this.tryParse(e.substr(r));if(t.isPayloadValid(o.type,s))o.data=s;else throw new Error("invalid payload")}return xb("decoded %s as %j",e,o),o}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case B.CONNECT:return Eu(r);case B.DISCONNECT:return r===void 0;case B.CONNECT_ERROR:return typeof r=="string"||Eu(r);case B.EVENT:case B.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&tC.indexOf(r[0])===-1);case B.ACK:case B.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},kb=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 r=Kv(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function bP(t){return typeof t=="string"}var rC=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function _P(t){return t===void 0||rC(t)}function Eu(t){return Object.prototype.toString.call(t)==="[object Object]"}function xP(t,e){switch(t){case B.CONNECT:return e===void 0||Eu(e);case B.DISCONNECT:return e===void 0;case B.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&tC.indexOf(e[0])===-1);case B.ACK:return Array.isArray(e);case B.CONNECT_ERROR:return typeof e=="string"||Eu(e);default:return!1}}function wP(t){return bP(t.nsp)&&_P(t.id)&&xP(t.type,t.data)}function le(t,e,r){return t.on(e,r),function(){t.off(e,r)}}var SP=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),fs=class extends dt{constructor(e,r,o){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=r,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[le(e,"open",this.onopen.bind(this)),le(e,"packet",this.onpacket.bind(this)),le(e,"error",this.onerror.bind(this)),le(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var o,n,s;if(SP.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;let i={type:B.EVENT,data:r};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){let f=this.ids++,u=r.pop();this._registerAckCallback(f,u),i.id=f}let a=(n=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||n===void 0?void 0:n.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,r){var o;let n=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(n===void 0){this.acks[e]=r;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);r.call(this,new Error("operation has timed out"))},n),i=(...a)=>{this.io.clearTimeoutFn(s),r.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((o,n)=>{let s=(i,a)=>i?n(i):o(a);s.withError=!0,r.push(s),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());let o={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((n,...s)=>(this._queue[0],n!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(n)):(this._queue.shift(),r&&r(null,...s)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.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:B.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,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(o=>String(o.id)===e)){let o=this.acks[e];delete this.acks[e],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case B.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 B.EVENT:case B.BINARY_EVENT:this.onevent(e);break;case B.ACK:case B.BINARY_ACK:this.onack(e);break;case B.DISCONNECT:this.ondisconnect();break;case B.CONNECT_ERROR:this.destroy();let o=new Error(e.data.message);o.data=e.data.data,this.emitReserved("connect_error",o);break}}onevent(e){let r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let r=this._anyListeners.slice();for(let o of r)o.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 r=this,o=!1;return function(...n){o||(o=!0,r.packet({type:B.ACK,id:e,data:n}))}}onack(e){let r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,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:B.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 r=this._anyListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,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 r=this._anyOutgoingListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let r=this._anyOutgoingListeners.slice();for(let o of r)o.apply(this,e.data)}}};function Mo(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}Mo.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0};Mo.prototype.reset=function(){this.attempts=0};Mo.prototype.setMin=function(t){this.ms=t};Mo.prototype.setMax=function(t){this.max=t};Mo.prototype.setJitter=function(t){this.jitter=t};var us=class extends dt{constructor(e,r){var o;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,hr(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((o=r.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new Mo({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;let n=r.parser||vb;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=r.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 r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.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 is(this.uri,this.opts);let r=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;let n=le(r,"open",function(){o.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=le(r,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{n(),s(new Error("timeout")),r.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(n),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(le(e,"ping",this.onping.bind(this)),le(e,"data",this.ondata.bind(this)),le(e,"error",this.onerror.bind(this)),le(e,"close",this.onclose.bind(this)),le(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){pr(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let o=this.nsps[e];return o?this._autoConnect&&!o.active&&o.connect():(o=new fs(this,e,r),this.nsps[e]=o),o}_destroy(e){let r=Object.keys(this.nsps);for(let o of r)if(this.nsps[o].active)return;this._close()}_packet(e){let r=this.encoder.encode(e);for(let o=0;o<r.length;o++)this.engine.write(r[o],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,r){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),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 r=this.backoff.duration();this._reconnecting=!0;let o=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(n=>{n?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",n)):e.onreconnect()}))},r);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var dc={};function ds(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let r=Hv(t,e.path||"/socket.io"),o=r.source,n=r.id,s=r.path,i=dc[n]&&s in dc[n].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new us(o,e):(dc[n]||(dc[n]=new us(o,e)),c=dc[n]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(ds,{Manager:us,Socket:fs,io:ds,connect:ds});R();var Cb=new Set(["__proto__","constructor","prototype"]),Eb=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Cb.has(t[e]))return!1;return!0},oC=(t,e)=>{!t||!Eb(e)||e.reduce((r,o,n,s)=>{if(r&&o in r){if(n!==s.length-1)return r[o];delete r[o]}},t)},nC=(t,e,r,o=!1)=>{!t||!Eb(e)||e.reduce((n,s,i,a)=>{if(n){if(i!==a.length-1)return!n[s]&&o&&(n[s]={}),n[s];n[s]=r}},t)},Au=(t,e)=>{let r=new Set;if(!Array.isArray(e))return r;for(let[o,n,s]of e)if(!(!Array.isArray(n)||!n.length))switch(r.add(n[0]),o){case"delete":oC(t,n);break;case"update":case"set":nC(t,n,s,!0);break;default:break}return r},pc=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},sC=(t,e)=>{for(let r in e){if(Cb.has(r))continue;let o=e[r],n=t[r];if(o&&typeof o=="object"&&!Array.isArray(o)){if(!n||typeof n!="object"||Array.isArray(n)){r in t||(t[r]=JSON.parse(JSON.stringify(o)));continue}sC(n,o)}else r in t||(t[r]=o)}},Ab=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let n={designSystem:t.__rawDesignSystem};Au(n,e)}let r=JSON.parse(JSON.stringify(t.__rawDesignSystem)),o=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];for(let n of o){let s=n&&n.designSystem;s&&typeof s=="object"&&sC(r,s)}return r};R();var iC=(t,e,r)=>{let o=!1;return(n={})=>{let{data:s}=n,{schema:i}=n;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(r[a]&&typeof r[a]=="object")if(a==="designSystem"){if(pc(r,c),o){let l=Ab(r);l&&ur(l)}}else so(r[a],c);else r[a]=c}),o=!0,i&&(r.schema=i))}},aC=(t,e,r)=>(o={})=>{let{changes:n}=o;if(!n||!Array.isArray(n)||!n.length)return;n=t.call("deepDestringifyFunctions",n,Array.isArray(n)?[]:{});let s=n.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?n.filter(c=>!s.includes(c)):n,a=Au(r,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=Ab(r,s);c?ur(c):r.__warnedNoRawDesignSystem||(r.__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")&&e.update(r.state),["pages","components","snippets","functions","assets"].some(c=>a.has(c))){let{pathname:c,search:l,hash:f}=r.window.location;t.call("router",c+l+f,t.__ref.root,{},{scrollToTop:!1,force:!0})}};var kP={success:"green",error:"red",warning:"yellow"},cC=(t,e,r)=>{if(t.symbols){if(!r.connected){r.notifications.connected={title:"Connected",message:"to the Symbols live server"},r.update({connected:!0});let o=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(o)},3e3)}}else if(r.connected){r.notifications.connected={title:"Disconnected",type:"error"},r.update({connected:!1});let o=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(o)},3e3)}},lC={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:kP[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,r,o)=>{r.update({animation:"fadeInUp"})},onClick:(e,r,o)=>{delete o.notifications[r.key],r.update({animation:"fadeOutDown"}),o.onClose&&o.onClose(e,r,o)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var vP=!1,CP=()=>vP?"http://localhost:8080":"https://api.symbols.app",EP=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}},AP=async t=>{try{let e=t||CP(),r=await v.fetch(`${e}/service-token`,{method:"GET"}),o;try{let n=await r.clone().json();if(n&&typeof n.token=="string")return n.token.trim();o=await r.text()}catch{o=await r.text()}return(o||"").replace(/\s+/gu,"")||void 0}catch(e){console.error("[sync] Failed to fetch service-token",e)}},dC=(t,e,r,o)=>{t.on("snapshot",iC(e,r,o)),t.on("ops",aC(e,r,o)),t.on("clients",n=>{o.editor?.verbose&&cC(n,e,r)}),t.on("disconnect",n=>{o.editor?.verbose&&console.info("[sync] disconnected",n)})},TP=async(t,e,r,o)=>{let n=await AP(o);if(!n)return console.warn("[sync] no service token \u2014 collab disabled"),null;let s=r.key;if(!s)return console.warn("[sync] ctx.key missing \u2014 collab cannot authenticate"),null;let i=r.editor?.projectId||null,a=ds(o,{path:"/collab-socket",transports:["websocket"],auth:{token:n,projectId:i,projectKey:s,branch:"main",live:!0,clientType:"platform"},reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return a.on("connect",()=>{r.editor?.verbose&&console.info("[sync] connected (collab)")}),dC(a,t,e,r),a},OP=(t,e,r)=>{let o=ds({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return o.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),dC(o,t,e,r),o.on("reload",()=>{typeof v<"u"&&v.location&&v.location.reload()}),o},RP=async(t,e,r)=>{let{mode:o,baseUrl:n}=EP(r);return o?o==="collab"?TP(t,e,r,n):o==="runner"?OP(t,e,r):null:null},PP={onInit:RP};var pC=t=>typeof t>"u",fC=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),uC=t=>t?.editor?.runtime==="runner",hC=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},gC={name:"sync",beforeCreate(t,e){let r=e&&e.editor;(r&&!pC(r.liveSync)?r.liveSync:fC(e)||uC(e))&&(fC(e)&&!uC(e)&&!e?.key||hC(t,PP))}},mC={name:"notifications",beforeCreate(t,e){if(!e)return;let r=pC(e.notifications)?null:e.notifications,o=e.editor&&e.editor.verbose===!0;(r===!0||r!==!1&&o)&&hC(t,lC)}};var Rb={};P(Rb,{AlertTemplate:()=>ju,ConfirmTemplate:()=>Fu,CustomTemplate:()=>Uu,ModalLayer:()=>Mu,ModalRoot:()=>Lu,PromptTemplate:()=>Bu,windowsComponents:()=>Ob});var Tb={};P(Tb,{alertDialog:()=>Du,closeAllModals:()=>Pu,closeModal:()=>Ou,confirmDialog:()=>Iu,getLayer:()=>Tu,openModal:()=>Ru,promptDialog:()=>$u,windowsFunctions:()=>mr});function J(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function ps(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 r=t?.getRoot?.();return r?.ModalRoot?r.ModalRoot:typeof globalThis<"u"&&globalThis.__SMBLS_WINDOWS_MODAL_ROOT__?.__ref?globalThis.__SMBLS_WINDOWS_MODAL_ROOT__:null}function Tu(){return J(this)}var IP=(t,e)=>{let r=t&&t["ModalLayer_"+e],o=r?.node||r?.__ref?.node;!o||typeof o.style?.setProperty!="function"||(o.style.setProperty("display","none","important"),o.style.setProperty("opacity","0","important"),o.style.setProperty("visibility","hidden","important"),o.style.setProperty("pointer-events","none","important"))},yC=(t,e)=>{let r=t&&t["ModalLayer_"+e],o=r?.node||r?.__ref?.node;!o||typeof o.style?.removeProperty!="function"||(o.style.removeProperty("display"),o.style.removeProperty("opacity"),o.style.removeProperty("visibility"),o.style.removeProperty("pointer-events"))};function Ou(t){let e=ps(this);if(!e)return;let r=e.state?.stack||[];if(!r.length)return;let o,n,s;if(t){if(s=[],o=r.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),o.length===r.length)return;n=r.filter(i=>i.id===t)}else o=r.slice(0,-1),n=r.slice(-1),s=[r.length-1];e.state.update({stack:o});for(let i of s)IP(e,i);for(let i of n)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function Ru(t={}){let e=ps(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 r=t.id||`modal_${e.__modalIdCounter}_${Date.now().toString(36)}`,o={id:r,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},n=e.state?.stack||[];if(n.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=n.length;return yC(e,s),e.state.update({stack:[...n,o]}),r}function Pu(){let t=ps(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function Iu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function Du(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function $u(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var mr={openModal:Ru,closeModal:Ou,closeAllModals:Pu,confirmDialog:Iu,alertDialog:Du,promptDialog:$u,getLayer:Tu};var DP=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),bC=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(DP),r=[];for(let o=0;o<e.length;o++){let n=e[o];(n.offsetParent!==null||n===document.activeElement)&&r.push(n)}return r},_C=t=>{let e=t.state?.stack||[];if(!e.length)return null;let r=t["ModalLayer_"+(e.length-1)];return r?.node||r?.__ref?.node||null},Lu={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 r=t.context;if(r){r.functions||(r.functions={});for(let a in mr)a in r.functions||(r.functions[a]=mr[a])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let o=()=>{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)}},n=a=>{let c=t.state?.stack;if(c?.length){if(a.key==="Tab"){let l=_C(t);if(!l)return;let f=bC(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"&&c[c.length-1]?.dismissOnBackdrop!==!1&&(a.preventDefault(),o())}};window.addEventListener("keydown",n),t.__escHandler=n;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,r=t.__prevStackLen||0;if(e!==r)if(t.__prevStackLen=e,t.__modalOpeners=t.__modalOpeners||[],e>r)t.__modalOpeners[e]=document.activeElement&&document.activeElement!==document.body?document.activeElement:t.__modalOpeners[e]||null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{let o=_C(t);if(!o)return;let n=bC(o)[0]||o.querySelector&&o.querySelector('[role="dialog"]')||o;try{n.focus&&n.focus()}catch{}});else{let o=null;for(let n=r;n>e;n--)t.__modalOpeners[n]&&(o=o||t.__modalOpeners[n]),t.__modalOpeners[n]=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 Mu={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",background:"black.45",backdropFilter:"blur(4px)",transitionProperty:"opacity",transitionDuration:"200ms",transitionTimingFunction:"ease",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=J(t)?.id;return e?"modal-title-"+e:null}},width:t=>J(t)?.width||"H",maxWidth:t=>J(t)?.maxWidth||"90vw",maxHeight:t=>J(t)?.maxHeight||null,onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>J(t)?.template!=="confirm"},AlertTemplate:{hide:t=>J(t)?.template!=="alert"},PromptTemplate:{hide:t=>J(t)?.template!=="prompt"},CustomTemplate:{hide:t=>J(t)?.template!=="custom"}}};var hs=(t,e,r)=>J(t)?.[e]||r,$P=t=>{let e=J(t)?.icon;return e===null||e===!1},Fu={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>hs(t,"title","Are you sure?"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>hs(t,"message","This action cannot be undone."),color:"dim"}},Icons:{hide:t=>$P(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>hs(t,"icon","warning")}}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>hs(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=J(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] confirm.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:t=>hs(t,"confirmTheme","primary"),text:t=>hs(t,"confirmText","Confirm"),onClick:(t,e,r)=>{let o=J(e);if(o?.onConfirm)try{o.onConfirm()}catch(n){console.warn("[windows] confirm.onConfirm threw:",n)}e.call("closeModal",o?.id)}}}};var Nu=(t,e,r)=>J(t)?.[e]||r,ju={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>Nu(t,"title","Notice"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>Nu(t,"message",""),color:"dim"}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>Nu(t,"icon","info")}}},ModalFooter:{flow:"x",align:"center end",OkBtn:{extends:"Button",theme:"primary",text:t=>Nu(t,"okText","OK"),onClick:(t,e,r)=>{let o=J(e);if(o?.onOk)try{o.onOk()}catch(n){console.warn("[windows] alert.onOk threw:",n)}e.call("closeModal",o?.id)}}}};var hc=(t,e,r)=>J(t)?.[e]||r,Bu={tag:"div",flow:"y",gap:"B",scope:{value:""},onRender:(t,e)=>{let r=J(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},onUpdate:(t,e)=>{let r=J(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>hc(t,"title","Enter a value"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>hc(t,"message",""),color:"dim"}}},InputRow:{extends:"Input",autofocus:!0,placeholder:t=>hc(t,"placeholder",""),value:(t,e)=>t.parent.scope?.value||"",onInput:(t,e,r)=>{e.parent.scope.value=t.target.value},onKeydown:(t,e,r)=>{if(t.key!=="Enter")return;t.preventDefault();let o=J(e),n=e.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>hc(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=J(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] prompt.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>hc(t,"confirmText","OK"),onClick:(t,e,r)=>{let o=J(e),n=e.parent.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}}}};var Uu={tag:"div",flow:"y",gap:"B",Title:{tag:"h2",text:t=>J(t)?.title||"",hide:t=>!J(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=J(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",onInit:t=>{let e=Z(()=>{let r=J(t),o=r?.content||null,n=r?.id||null;if(!o){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in mr)i in s.functions||(s.functions[i]=mr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var Ob={ModalRoot:Lu,ModalLayer:Mu,ConfirmTemplate:Fu,AlertTemplate:ju,PromptTemplate:Bu,CustomTemplate:Uu};var $b={};P($b,{Dropdown:()=>Ku,DropdownList:()=>Gu,DropdownParent:()=>Yu,DropdownParentFocus:()=>Xu,DropdownRoot:()=>Wu,DropdownSiblingFocus:()=>Ju,DropdownTrigger:()=>qu,dropdownComponents:()=>Db});var xC=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),LP=(t,e,r,o)=>{let n=xC(t,r,o),s=i=>n[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":n.bottom>=n.top?"bottom":"top"},MP=(t,e,r,o,n)=>{let s=xC(e,o,n),i=t==="top"||t==="bottom"?r.height+8:r.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:t},Vu=(t,e,r)=>Math.max(e,Math.min(r,t)),Jr=(t,e,r="auto")=>{if(!t)return{left:0,top:0,side:"bottom",align:"start"};let o=typeof window<"u"?window.innerWidth:1024,n=typeof window<"u"?window.innerHeight:768,s={width:Math.max(120,e?.width||0),height:Math.max(40,e?.height||0)};if(r==="center"){let d=Vu((o-s.width)/2,8,Math.max(8,o-s.width-8)),h=Vu((n-s.height)/2,8,Math.max(8,n-s.height-8));return{left:d,top:h,side:"center",align:"center"}}let i,a;if(r==="auto")i=LP(t,s,o,n),a="start";else{let d=r.split("-");i=d[0],a=d[1]||"start",i=MP(i,t,s,o,n)}let c,l;i==="bottom"||i==="top"?(a==="start"?c=t.left:a==="end"?c=t.right-s.width:c=t.left+(t.width-s.width)/2,l=i==="bottom"?t.bottom+8:t.top-s.height-8):(a==="start"?l=t.top:a==="end"?l=t.bottom-s.height:l=t.top+(t.height-s.height)/2,c=i==="right"?t.right+8:t.left-s.width-8);let f=Math.max(8,o-s.width-8),u=Math.max(8,n-s.height-8);return c=Vu(c,8,f),l=Vu(l,8,u),{left:c,top:l,side:i,align:a}},gs=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 Zr={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:"70vh"},FP=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}},Pb=t=>t?.getRoot?.()?.DropdownRoot||null,NP=0,jP=()=>`dropdown_${++NP}_${Date.now().toString(36)}`;function zu(t={}){let e=Pb(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 r=t.anchorEl?.node||t.anchorEl,o=t.anchorRect||FP(r);if(!o)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let n=t.id||jP(),s=t.triggerEl?.node||t.triggerEl||r||(typeof document<"u"?document.activeElement:null),i={id:n,content:t.content||null,anchor:o,placement:t.placement||Zr.placement,trigger:t.trigger||Zr.trigger,offset:t.offset??Zr.offset,minWidth:t.minWidth||Zr.minWidth,maxWidth:t.maxWidth||Zr.maxWidth,maxHeight:t.maxHeight||Zr.maxHeight,theme:t.theme||null,shadow:t.shadow||null,background:t.background||null,round:t.round||null,onOpen:t.onOpen,onClose:t.onClose,triggerEl: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 n}function Hu(t){let e=Pb(this);if(!e)return;let r=e.state?.layer;r&&e.state.update({layer:{...r,inert:!!t}})}function Fo(t){let e=Pb(this);if(!e)return;let r=e.state?.layer;if(!r)return;let o=typeof t=="string"?t:t?.id;if(o&&r.id&&o!==r.id)return;let n=r.onClose;e.state.update({layer:null});let s=r.triggerEl;if(s&&typeof s.focus=="function")try{s.focus()}catch(i){console.warn("[dropdown] focus restore threw:",i)}if(typeof n=="function")try{n(r)}catch(i){console.warn("[dropdown] onClose threw:",i)}}var BP=`
103
+ \`\`\``}n.push({role:"user",content:s})}return n}var iv=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,zR=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function HR(t){let e=[];for(let r of t.matchAll(iv))e.push({lang:(r.groups?.lang||"").toLowerCase(),code:r.groups?.code??""});return e}function WR(t){return t.replace(iv,"").trim()}function yb(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 sv(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&zR.has(t.type)}function av(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let r=HR(e),o=r.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),n=r.filter(i=>i.lang==="json"),s=WR(e);for(let i of n){let a=yb(i.code);if(sv(a))return{kind:"asset",text:s||a.description||"",asset:a,message:a.description||s||`Generated ${a.type}: ${a.title||a.key||""}`.trim()}}if(o.length>0){let i=o[0].code,a=yb("["+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=yb(e);if(sv(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 cv(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 lv=["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(" "),fv=["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(`
104
+ `),bb={Starter:Xr,Free:Xr,Pro:"claude-opus-4-6"};function uv(t){return t?bb[t]||t:Xr}var dv={"@symbo.ls/signal":Cd,"@symbo.ls/scratch":Hg,"@symbo.ls/element":Km,"@symbo.ls/css":Qg,"@symbo.ls/utils":$l,"@symbo.ls/state":$m,"@symbo.ls/router":Ha,"@symbo.ls/polyglot":Hy,"@symbo.ls/helmet":Vy,"@symbo.ls/fetch":uo,"@symbo.ls/capsize":qy,"@symbo.ls/shorthand":Qy,"@symbo.ls/analyze":ub,"@symbo.ls/inspect":hb,"@symbo.ls/channels":mb,"@symbo-ls/simone-server":_b},pv=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:{}),o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in dv)o[n]||(o[n]=dv[n]);if(e)for(let n in e)o[n]||(o[n]=e[n]);return o},hv=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:null);if(!r||!e||typeof e!="object")return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in e){let s=e[n];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(o,n))continue;let i=a=>(Object.defineProperty(o,n,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(o,n,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return o},gv=["@symbo.ls/sdk"],mv=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!t||typeof t!="object")return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in t){let s=t[n];!s||typeof s!="object"&&typeof s!="function"||o[n]||(o[n]=s)}return o},qR=/^@symbo[-.]ls\//,KR=t=>t.includes("/")?t.slice(t.indexOf("/")+1):t,yv=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!Array.isArray(t))return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n of t){let s=n&&n.library?n.library:n;if(!s||typeof s!="object"||s.__isStub)continue;let i=s.key||s.name||s.__libraryKey,a=[];for(let c of[s.key,s.name,s.__libraryKey,s.__libraryName]){if(typeof c!="string"||!c||c!==i&&!qR.test(c))continue;let l=KR(c);l&&!a.includes(l)&&a.push(l)}for(let c of a)for(let l of[`@symbo-ls/${c}`,`@symbo.ls/${c}`])o[l]||(o[l]=s)}return o};R();var xv=t=>{let e=typeof window<"u"?window:globalThis||{};e.document||(e.document={body:{}});let r=typeof document<"u"?document:e.document;t.document=t.document||r;let o=t.window;return o&&o!==e&&typeof o.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=o||e,t.window},bv=(t="smbls")=>{let e={};for(let r in Po)Object.prototype.hasOwnProperty.call(Po,r)&&(ze(r)?e[`smbls.${r}`]=Po[r]:e[r]=Po[r]);return e},wv=t=>t.components?{...bv(),...t.components}:bv(),Sv=t=>({...qa,...Ha,...Ir,...t.utils,...t.snippets,...t.functions}),kv=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var GR=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,YR=3e3,XR=(t,e,r=o=>import(o))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let o=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(o[t])return Promise.resolve(o[t]);let n=Promise.resolve().then(()=>r(e)).then(i=>(i&&!o[t]&&(o[t]=i),o[t]||null)).catch(()=>null);return new Promise(i=>{let a=setTimeout(()=>i(null),YR);n.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},_v={},vv=async({dependencies:t,dependenciesOnDemand:e,document:r,preventCaching:o=!1,cdnProvider:n,packageManager:s,symbolsConfig:i,registerDependency:a=XR})=>{if(n||(n=Or[s]||dn(i)||"esmsh"),!t)return null;if(!hn(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=vr()&&o?`?${Math.random()}`:"",f=async(d,h)=>{let g=Ae(d,h,n)+l;try{await Promise.race([gn(g,{document:r,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 ${n}:`,p),n!=="symbols")try{let m=Ae(d,h,"symbols")+l;await Promise.race([gn(m,{document:r,type:"module"}),new Promise((b,_)=>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 h=t[d];if(!(e&&e[d])&&!_v[d]&&(_v[d]=!0,!ho(d))){if(pn(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}GR(d)||u.push(f(d,h))}}return u.length&&await Promise.allSettled(u),t},Cv=async(t,e)=>{let r=e.window||window,o=e.cdnProvider||dn(e.symbolsConfig)||"esmsh",n=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=o)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&ho(a))return await u.require(a,c);if(!u.packages[a]){let d=vr()?`?${Math.random()}`:"";if(l&&l[a]){let h=l[a],g=Ae(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=Ae(a,h,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let h=Ae(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=Ae(a,"latest","symbols")+d;await i.utils.loadRemoteScript(p,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};r.packages?r.packages=ht(r.packages,t):r.packages=t,r.require||(e.utils.require=await n(e),r.require=e.utils.require),r.requireOnDemand||(e.utils.requireOnDemand=await s(e),r.requireOnDemand=e.utils.requireOnDemand)},ZR=/\s+/g,Ev=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,JR=(t,e)=>{let r="";for(let o in t){let n=t[o];typeof n=="boolean"&&n?r+=` ${o}`:typeof n=="string"?r+=` ${n}`:typeof n=="function"&&(r+=` ${Ev(n,e)}`)}return r},QR=(t,e,r)=>{if(!t)return;let{key:o}=e;t===!0&&(t=e.classlist={key:o}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=JR(t,e));let n=t.replace(ZR," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",n);else if(r)try{r.className=n}catch{}return n},tP=()=>(t,e,r)=>{let o=Ev(t,e);if(t){let{__ref:n}=e;n.__class.style=o}Av()(e.classlist,e,e.state,!0)},Av=()=>(t,e,r,o)=>{if(e.style&&!o)return;let{__ref:n}=e,{__class:s,__classNames:i}=n;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=we(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&QR(i,e,e.node)}},eP=()=>({style:tP(),classlist:Av()}),rP=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],xb=new WeakSet,wb=!1,oP=t=>!!t&&typeof t=="object",Tv=(t,e)=>{let r=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,o=e.initOptions||{},n=e.registry||eP(),s=e.designSystem?st(lt(e.designSystem),lt(Va),ne):lt(Va),i={};for(let p of rP)e[p]!==void 0&&(i[p]=e[p]);let a,c=oP(r),f=c&&xb.has(r)&&!e.skipDesignSystemInit,u=!f&&!wb,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=C(t)||C(),a&&(a.__domDocument=r),a?.CSS_VARS){it(a);try{St({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&St(es(a.CSS_MEDIA_VARS,d))}finally{et()}}}else if(u){let p=C();p&&(p.__domDocument=r),a=hr(s,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...tu,...i,...o}),a&&a!==p&&(a.__domDocument=r),c&&xb.add(r),wb=!0}else{let p=ra(t,s,{cleanBase:!0});for(let m in i)p[m]=i[m];if(p.__domDocument=r,f){let m=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=m,p.varPrefix=m}it(p);try{a=hr(p,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...tu,...i,...o})}finally{et()}c&&xb.add(r),wb=!0}let h=a?.CONFIG||a,g=h?.font;if(g){it(h);try{for(let p in g){let m=g[p];if(!m?.fontFace)continue;let b=Array.isArray(m.fontFace)?m.fontFace:[m.fontFace];for(let _ of b)typeof _=="string"&&_.includes("font-family")&&St(`@font-face { ${_} }`)}}finally{et()}}return[a,n]},Ov=(t,e)=>{let r={};e.state&&st(r,e.state),t&&t.state&&st(r,t.state);let o=e.polyglot;if(o?.translations){let n=null;try{typeof localStorage<"u"&&(n=localStorage.getItem(o.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=n||r.lang||o.defaultLang||"en";n&&n!==r.lang&&(r.lang=n);let i=new Set,a=new Set,c=(u,d)=>{if(!a.has(u)){if(!sr(e,u,r)){i.add(u);return}r[u]=d,a.add(u),He(e,u)}},l=o.translations[s];if(l&&typeof l=="object")for(let u in l)c(u,l[u]);let f=new Set(o.languages||[]);for(let u in o.translations)f.has(u)||c(u,o.translations[u]);i.size&&o.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 r.isRootState=!0,lt(r)},Rv=(t,e)=>{S(t.routes)&&S(e.pages)&&ht(t.routes,e.pages);let r=t.routes||e.pages||{},o=[];for(let n in r){if(n.charCodeAt(0)===47)continue;let i="/"+(n==="index"?"":n);Object.prototype.hasOwnProperty.call(r,i)?o.push(`${n} -> ${i}`):r[i]=r[n],delete r[n]}return o.length&&e&&e.verbose!==!1&&console.warn(`[smbls] preparePages kept ${o.length} explicitly declared route${o.length===1?"":"s"} over a same-named page key (${o.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.`),r},Pv=t=>{Vi(t,t.sharedLibraries)};var uc={polyglot:Za,getLocalStateLang:ec,getActiveLang:Kr,getLang:Kr,setLang:Qa,getLanguages:Xa,loadTranslations:Ja,upsertTranslation:tc};Ar();var Me=Object.create(null);Me.open="0";Me.close="1";Me.ping="2";Me.pong="3";Me.message="4";Me.upgrade="5";Me.noop="6";var dc=Object.create(null);Object.keys(Me).forEach(t=>{dc[Me[t]]=t});var pc={type:"error",data:"parser error"};var $v=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Lv=typeof ArrayBuffer=="function",Mv=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,hc=({type:t,data:e},r,o)=>$v&&e instanceof Blob?r?o(e):Iv(e,o):Lv&&(e instanceof ArrayBuffer||Mv(e))?r?o(e):Iv(new Blob([e]),o):o(Me[t]+(e||"")),Iv=(t,e)=>{let r=new FileReader;return r.onload=function(){let o=r.result.split(",")[1];e("b"+(o||""))},r.readAsDataURL(t)};function Dv(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var Sb;function Fv(t,e){if($v&&t.data instanceof Blob)return t.data.arrayBuffer().then(Dv).then(e);if(Lv&&(t.data instanceof ArrayBuffer||Mv(t.data)))return e(Dv(t.data));hc(t,!1,r=>{Sb||(Sb=new TextEncoder),e(Sb.encode(r))})}var Nv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Nv.length;t++)gc[Nv.charCodeAt(t)]=t;var jv=t=>{let e=t.length*.75,r=t.length,o,n=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(o=0;o<r;o+=4)s=gc[t.charCodeAt(o)],i=gc[t.charCodeAt(o+1)],a=gc[t.charCodeAt(o+2)],c=gc[t.charCodeAt(o+3)],f[n++]=s<<2|i>>4,f[n++]=(i&15)<<4|a>>2,f[n++]=(a&3)<<6|c&63;return l};var nP=typeof ArrayBuffer=="function",mc=(t,e)=>{if(typeof t!="string")return{type:"message",data:Bv(t,e)};let r=t.charAt(0);return r==="b"?{type:"message",data:sP(t.substring(1),e)}:dc[r]?t.length>1?{type:dc[r],data:t.substring(1)}:{type:dc[r]}:pc},sP=(t,e)=>{if(nP){let r=jv(t);return Bv(r,e)}else return{base64:!0,data:t}},Bv=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var Uv="",Vv=(t,e)=>{let r=t.length,o=new Array(r),n=0;t.forEach((s,i)=>{hc(s,!1,a=>{o[i]=a,++n===r&&e(o.join(Uv))})})},zv=(t,e)=>{let r=t.split(Uv),o=[];for(let n=0;n<r.length;n++){let s=mc(r[n],e);if(o.push(s),s.type==="error")break}return o};function Hv(){return new TransformStream({transform(t,e){Fv(t,r=>{let o=r.length,n;if(o<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,o);else if(o<65536){n=new Uint8Array(3);let s=new DataView(n.buffer);s.setUint8(0,126),s.setUint16(1,o)}else{n=new Uint8Array(9);let s=new DataView(n.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(o))}t.data&&typeof t.data!="string"&&(n[0]|=128),e.enqueue(n),e.enqueue(r)})}})}var kb;function Cu(t){return t.reduce((e,r)=>e+r.length,0)}function Eu(t,e){if(t[0].length===e)return t.shift();let r=new Uint8Array(e),o=0;for(let n=0;n<e;n++)r[n]=t[0][o++],o===t[0].length&&(t.shift(),o=0);return t.length&&o<t[0].length&&(t[0]=t[0].slice(o)),r}function Wv(t,e){kb||(kb=new TextDecoder);let r=[],o=0,n=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(o===0){if(Cu(r)<1)break;let c=Eu(r,1);s=(c[0]&128)===128,n=c[0]&127,n<126?o=3:n===126?o=1:o=2}else if(o===1){if(Cu(r)<2)break;let c=Eu(r,2);n=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),o=3}else if(o===2){if(Cu(r)<8)break;let c=Eu(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(pc);break}n=f*Math.pow(2,32)+l.getUint32(4),o=3}else{if(Cu(r)<n)break;let c=Eu(r,n);a.enqueue(mc(s?c:kb.decode(c),e)),o=0}if(n===0||n>t){a.enqueue(pc);break}}}})}var vb=4;function ut(t){if(t)return iP(t)}function iP(t){for(var e in ut.prototype)t[e]=ut.prototype[e];return t}ut.prototype.on=ut.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};ut.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};ut.prototype.off=ut.prototype.removeListener=ut.prototype.removeAllListeners=ut.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,n=0;n<r.length;n++)if(o=r[n],o===e||o.fn===e){r.splice(n,1);break}return r.length===0&&delete this._callbacks["$"+t],this};ut.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(r){r=r.slice(0);for(var o=0,n=r.length;o<n;++o)r[o].apply(this,e)}return this};ut.prototype.emitReserved=ut.prototype.emit;ut.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};ut.prototype.hasListeners=function(t){return!!this.listeners(t).length};var mr=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),Ut=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),qv="arraybuffer";function Au(t,...e){return e.reduce((r,o)=>(t.hasOwnProperty(o)&&(r[o]=t[o]),r),{})}var aP=Ut.setTimeout,cP=Ut.clearTimeout;function yr(t,e){e.useNativeTimers?(t.setTimeoutFn=aP.bind(Ut),t.clearTimeoutFn=cP.bind(Ut)):(t.setTimeoutFn=Ut.setTimeout.bind(Ut),t.clearTimeoutFn=Ut.clearTimeout.bind(Ut))}var lP=1.33;function Kv(t){return typeof t=="string"?fP(t):Math.ceil((t.byteLength||t.size)*lP)}function fP(t){let e=0,r=0;for(let o=0,n=t.length;o<n;o++)e=t.charCodeAt(o),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(o++,r+=4);return r}function Tu(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Gv(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function Yv(t){let e={},r=t.split("&");for(let o=0,n=r.length;o<n;o++){let s=r[o].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var Ou=class extends Error{constructor(e,r,o){super(e),this.description=r,this.context=o,this.type="TransportError"}},br=class extends ut{constructor(e){super(),this.writable=!1,yr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,o){return super.emitReserved("error",new Ou(e,r,o)),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 r=mc(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,r={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_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 r=Gv(e);return r.length?"?"+r:""}};var yc=class extends br{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||r()})),this.writable||(o++,this.once("drain",function(){--o||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let r=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};zv(e,this.socket.binaryType).forEach(r),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,Vv(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=Tu()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}};var Xv=!1;try{Xv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Zv=Xv;function uP(){}var Cb=class extends yc{constructor(e){if(super(e),typeof location<"u"){let r=location.protocol==="https:",o=location.port;o||(o=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||o!==e.port}}doWrite(e,r){let o=this.request({method:"POST",data:e});o.on("success",r),o.on("error",(n,s)=>{this.onError("xhr post error",n,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,o)=>{this.onError("xhr poll error",r,o)}),this.pollXhr=e}},Zr=class t extends ut{constructor(e,r,o){super(),this.createRequest=e,yr(this,o),this._opts=o,this._method=o.method||"GET",this._uri=r,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var e;let r=Au(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;let o=this._xhr=this.createRequest(r);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&o.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var n;o.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},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=uP,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()}};Zr.requestsCount=0;Zr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Jv);else if(typeof addEventListener=="function"){let t="onpagehide"in Ut?"pagehide":"unload";addEventListener(t,Jv,!1)}}function Jv(){for(let t in Zr.requests)Zr.requests.hasOwnProperty(t)&&Zr.requests[t].abort()}var dP=(function(){let t=Qv({xdomain:!1});return t&&t.responseType!==null})(),Jr=class extends Cb{constructor(e){super(e);let r=e&&e.forceBase64;this.supportsBinary=dP&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Zr(Qv,this.uri(),e)}};function Qv(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Zv))return new XMLHttpRequest}catch{}if(!e)try{return new Ut[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var tC=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",Ab=class extends br{get name(){return"websocket"}doOpen(){let e=this.uri(),r=this.opts.protocols,o=tC?{}:Au(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,o)}catch(n){return this.emitReserved("error",n)}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 r=0;r<e.length;r++){let o=e[r],n=r===e.length-1;hc(o,this.supportsBinary,s=>{try{this.doWrite(o,s)}catch{}n&&mr(()=>{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",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=Tu()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}},Eb=Ut.WebSocket||Ut.MozWebSocket,Qr=class extends Ab{createSocket(e,r,o){return tC?new Eb(e,r,o):r?new Eb(e,r):new Eb(e)}doWrite(e,r){this.ws.send(r)}};var ds=class extends br{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 r=Wv(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=e.readable.pipeThrough(r).getReader(),n=Hv();n.readable.pipeTo(e.writable),this._writer=n.writable.getWriter();let s=()=>{o.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 r=0;r<e.length;r++){let o=e[r],n=r===e.length-1;this._writer.write(o).then(()=>{n&&mr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var Tb={websocket:Qr,webtransport:ds,polling:Jr};var pP=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,hP=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ps(t){if(t.length>8e3)throw"URI too long";let e=t,r=t.indexOf("["),o=t.indexOf("]");r!=-1&&o!=-1&&(t=t.substring(0,r)+t.substring(r,o).replace(/:/g,";")+t.substring(o,t.length));let n=pP.exec(t||""),s={},i=14;for(;i--;)s[hP[i]]=n[i]||"";return r!=-1&&o!=-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=gP(s,s.path),s.queryKey=mP(s,s.query),s}function gP(t,e){let r=/\/{2,9}/g,o=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&o.splice(0,1),e.slice(-1)=="/"&&o.splice(o.length-1,1),o}function mP(t,e){let r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,n,s){n&&(r[n]=s)}),r}var Ob=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ru=[];Ob&&addEventListener("offline",()=>{Ru.forEach(t=>t())},!1);var jo=class t extends ut{constructor(e,r){if(super(),this.binaryType=qv,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){let o=ps(e);r.hostname=o.host,r.secure=o.protocol==="https"||o.protocol==="wss",r.port=o.port,o.query&&(r.query=o.query)}else r.host&&(r.hostname=ps(r.host).host);yr(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(o=>{let n=o.prototype.name;this.transports.push(n),this._transportsByName[n]=o}),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},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Yv(this.opts.query)),Ob&&(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"})},Ru.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let r=Object.assign({},this.opts.query);r.EIO=vb,r.transport=e,this.id&&(r.sid=this.id);let o=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](o)}_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 r=this.createTransport(e);r.open(),this.setTransport(r)}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",r=>this._onClose("transport close",r))}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 r=new Error("server error");r.code=e.data,this._onError(r);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 r=1;for(let o=0;o<this.writeBuffer.length;o++){let n=this.writeBuffer[o].data;if(n&&(r+=Kv(n)),o>0&&r>this._maxPayload)return this.writeBuffer.slice(0,o);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,mr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,o){return this._sendPacket("message",e,r,o),this}send(e,r,o){return this._sendPacket("message",e,r,o),this}_sendPacket(e,r,o,n){if(typeof r=="function"&&(n=r,r=void 0),typeof o=="function"&&(n=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;let s={type:e,data:r,options:o};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),n&&this.once("flush",n),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},o=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():e()}):this.upgrading?o():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,r){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(),Ob&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let o=Ru.indexOf(this._offlineEventListener);o!==-1&&Ru.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}};jo.protocol=vb;var Pu=class extends jo{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 r=this.createTransport(e),o=!1;jo.priorWebsocketSuccess=!1;let n=()=>{o||(r.send([{type:"ping",data:"probe"}]),r.once("packet",u=>{if(!o)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;jo.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(f(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{let d=new Error("probe error");d.transport=r.name,this.emitReserved("upgradeError",d)}}))};function s(){o||(o=!0,f(),r.close(),r=null)}let i=u=>{let d=new Error("probe error: "+u);d.transport=r.name,s(),this.emitReserved("upgradeError",d)};function a(){i("transport closed")}function c(){i("socket closed")}function l(u){r&&u.name!==r.name&&s()}let f=()=>{r.removeListener("open",n),r.removeListener("error",i),r.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};r.once("open",n),r.once("error",i),r.once("close",a),this.once("close",c),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{o||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let r=[];for(let o=0;o<e.length;o++)~this.transports.indexOf(e[o])&&r.push(e[o]);return r}},hs=class extends Pu{constructor(e,r={}){let o=typeof e=="object"?e:r;(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(n=>Tb[n]).filter(n=>!!n)),super(e,o)}};var mV=hs.protocol;function eC(t,e="",r){let o=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),o=ps(t)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";let s=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+s+":"+o.port+e,o.href=o.protocol+"://"+s+(r&&r.port===o.port?"":":"+o.port),o}var Mb={};P(Mb,{Decoder:()=>$b,Encoder:()=>Db,PacketType:()=>U,isPacketValid:()=>FP,protocol:()=>dC});var bP=typeof ArrayBuffer=="function",_P=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,rC=Object.prototype.toString,xP=typeof Blob=="function"||typeof Blob<"u"&&rC.call(Blob)==="[object BlobConstructor]",wP=typeof File=="function"||typeof File<"u"&&rC.call(File)==="[object FileConstructor]";function _c(t){return bP&&(t instanceof ArrayBuffer||_P(t))||xP&&t instanceof Blob||wP&&t instanceof File}function bc(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,o=t.length;r<o;r++)if(bc(t[r]))return!0;return!1}if(_c(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return bc(t.toJSON(),!0);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&bc(t[r]))return!0;return!1}function oC(t){let e=[],r=t.data,o=t;return o.data=Rb(r,e),o.attachments=e.length,{packet:o,buffers:e}}function Rb(t,e){if(!t)return t;if(_c(t)){let r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){let r=new Array(t.length);for(let o=0;o<t.length;o++)r[o]=Rb(t[o],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){let r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=Rb(t[o],e));return r}return t}function nC(t,e){return t.data=Pb(t.data,e),delete t.attachments,t}function Pb(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 r=0;r<t.length;r++)t[r]=Pb(t[r],e);else if(typeof t=="object")for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Pb(t[r],e));return t}var fC=eE(lC(),1),Ib=(0,fC.default)("socket.io-parser"),uC=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],dC=5,U;(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"})(U||(U={}));var Db=class{constructor(e){this.replacer=e}encode(e){return Ib("encoding packet %j",e),(e.type===U.EVENT||e.type===U.ACK)&&bc(e)?this.encodeAsBinary({type:e.type===U.EVENT?U.BINARY_EVENT:U.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===U.BINARY_EVENT||e.type===U.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),Ib("encoded %j as %s",e,r),r}encodeAsBinary(e){let r=oC(e),o=this.encodeAsString(r.packet),n=r.buffers;return n.unshift(o),n}},$b=class t extends ut{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);let o=r.type===U.BINARY_EVENT;o||r.type===U.BINARY_ACK?(r.type=o?U.EVENT:U.ACK,this.reconstructor=new Lb(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(_c(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0,o={type:Number(e.charAt(0))};if(U[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===U.BINARY_EVENT||o.type===U.BINARY_ACK){let s=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);let i=e.substring(s,r);if(i!=Number(i)||e.charAt(r)!=="-")throw new Error("Illegal attachments");let a=Number(i);if(!pC(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");o.attachments=a}if(e.charAt(r+1)==="/"){let s=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););o.nsp=e.substring(s,r)}else o.nsp="/";let n=e.charAt(r+1);if(n!==""&&Number(n)==n){let s=r+1;for(;++r;){let i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}o.id=Number(e.substring(s,r+1))}if(e.charAt(++r)){let s=this.tryParse(e.substr(r));if(t.isPayloadValid(o.type,s))o.data=s;else throw new Error("invalid payload")}return Ib("decoded %s as %j",e,o),o}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case U.CONNECT:return $u(r);case U.DISCONNECT:return r===void 0;case U.CONNECT_ERROR:return typeof r=="string"||$u(r);case U.EVENT:case U.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&uC.indexOf(r[0])===-1);case U.ACK:case U.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Lb=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 r=nC(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function $P(t){return typeof t=="string"}var pC=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function LP(t){return t===void 0||pC(t)}function $u(t){return Object.prototype.toString.call(t)==="[object Object]"}function MP(t,e){switch(t){case U.CONNECT:return e===void 0||$u(e);case U.DISCONNECT:return e===void 0;case U.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&uC.indexOf(e[0])===-1);case U.ACK:return Array.isArray(e);case U.CONNECT_ERROR:return typeof e=="string"||$u(e);default:return!1}}function FP(t){return $P(t.nsp)&&LP(t.id)&&MP(t.type,t.data)}function ue(t,e,r){return t.on(e,r),function(){t.off(e,r)}}var NP=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),bs=class extends ut{constructor(e,r,o){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=r,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[ue(e,"open",this.onopen.bind(this)),ue(e,"packet",this.onpacket.bind(this)),ue(e,"error",this.onerror.bind(this)),ue(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,...r){var o,n,s;if(NP.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;let i={type:U.EVENT,data:r};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){let f=this.ids++,u=r.pop();this._registerAckCallback(f,u),i.id=f}let a=(n=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||n===void 0?void 0:n.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,r){var o;let n=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(n===void 0){this.acks[e]=r;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);r.call(this,new Error("operation has timed out"))},n),i=(...a)=>{this.io.clearTimeoutFn(s),r.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((o,n)=>{let s=(i,a)=>i?n(i):o(a);s.withError=!0,r.push(s),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());let o={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((n,...s)=>(this._queue[0],n!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(n)):(this._queue.shift(),r&&r(null,...s)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.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:U.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,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(o=>String(o.id)===e)){let o=this.acks[e];delete this.acks[e],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case U.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 U.EVENT:case U.BINARY_EVENT:this.onevent(e);break;case U.ACK:case U.BINARY_ACK:this.onack(e);break;case U.DISCONNECT:this.ondisconnect();break;case U.CONNECT_ERROR:this.destroy();let o=new Error(e.data.message);o.data=e.data.data,this.emitReserved("connect_error",o);break}}onevent(e){let r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let r=this._anyListeners.slice();for(let o of r)o.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 r=this,o=!1;return function(...n){o||(o=!0,r.packet({type:U.ACK,id:e,data:n}))}}onack(e){let r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,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:U.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 r=this._anyListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,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 r=this._anyOutgoingListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let r=this._anyOutgoingListeners.slice();for(let o of r)o.apply(this,e.data)}}};function Uo(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}Uo.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0};Uo.prototype.reset=function(){this.attempts=0};Uo.prototype.setMin=function(t){this.ms=t};Uo.prototype.setMax=function(t){this.max=t};Uo.prototype.setJitter=function(t){this.jitter=t};var _s=class extends ut{constructor(e,r){var o;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,yr(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((o=r.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new Uo({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;let n=r.parser||Mb;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=r.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 r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.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 hs(this.uri,this.opts);let r=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;let n=ue(r,"open",function(){o.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=ue(r,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{n(),s(new Error("timeout")),r.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(n),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(ue(e,"ping",this.onping.bind(this)),ue(e,"data",this.ondata.bind(this)),ue(e,"error",this.onerror.bind(this)),ue(e,"close",this.onclose.bind(this)),ue(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){mr(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let o=this.nsps[e];return o?this._autoConnect&&!o.active&&o.connect():(o=new bs(this,e,r),this.nsps[e]=o),o}_destroy(e){let r=Object.keys(this.nsps);for(let o of r)if(this.nsps[o].active)return;this._close()}_packet(e){let r=this.encoder.encode(e);for(let o=0;o<r.length;o++)this.engine.write(r[o],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,r){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),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 r=this.backoff.duration();this._reconnecting=!0;let o=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(n=>{n?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",n)):e.onreconnect()}))},r);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var xc={};function xs(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let r=eC(t,e.path||"/socket.io"),o=r.source,n=r.id,s=r.path,i=xc[n]&&s in xc[n].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new _s(o,e):(xc[n]||(xc[n]=new _s(o,e)),c=xc[n]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(xs,{Manager:_s,Socket:bs,io:xs,connect:xs});R();var Fb=new Set(["__proto__","constructor","prototype"]),Nb=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Fb.has(t[e]))return!1;return!0},hC=(t,e)=>{!t||!Nb(e)||e.reduce((r,o,n,s)=>{if(r&&o in r){if(n!==s.length-1)return r[o];delete r[o]}},t)},gC=(t,e,r,o=!1)=>{!t||!Nb(e)||e.reduce((n,s,i,a)=>{if(n){if(i!==a.length-1)return!n[s]&&o&&(n[s]={}),n[s];n[s]=r}},t)},Lu=(t,e)=>{let r=new Set;if(!Array.isArray(e))return r;for(let[o,n,s]of e)if(!(!Array.isArray(n)||!n.length))switch(r.add(n[0]),o){case"delete":hC(t,n);break;case"update":case"set":gC(t,n,s,!0);break;default:break}return r},wc=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},mC=(t,e)=>{for(let r in e){if(Fb.has(r))continue;let o=e[r],n=t[r];if(o&&typeof o=="object"&&!Array.isArray(o)){if(!n||typeof n!="object"||Array.isArray(n)){r in t||(t[r]=JSON.parse(JSON.stringify(o)));continue}mC(n,o)}else r in t||(t[r]=o)}},jb=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let n={designSystem:t.__rawDesignSystem};Lu(n,e)}let r=JSON.parse(JSON.stringify(t.__rawDesignSystem)),o=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];for(let n of o){let s=n&&n.designSystem;s&&typeof s=="object"&&mC(r,s)}return r};R();var yC=(t,e,r)=>{let o=!1;return(n={})=>{let{data:s}=n,{schema:i}=n;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(r[a]&&typeof r[a]=="object")if(a==="designSystem"){if(wc(r,c),o){let l=jb(r);l&&hr(l)}}else co(r[a],c);else r[a]=c}),o=!0,i&&(r.schema=i))}},bC=(t,e,r)=>(o={})=>{let{changes:n}=o;if(!n||!Array.isArray(n)||!n.length)return;n=t.call("deepDestringifyFunctions",n,Array.isArray(n)?[]:{});let s=n.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?n.filter(c=>!s.includes(c)):n,a=Lu(r,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=jb(r,s);c?hr(c):r.__warnedNoRawDesignSystem||(r.__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")&&e.update(r.state),["pages","components","snippets","functions","assets"].some(c=>a.has(c))){let{pathname:c,search:l,hash:f}=r.window.location;t.call("router",c+l+f,t.__ref.root,{},{scrollToTop:!1,force:!0})}};var jP={success:"green",error:"red",warning:"yellow"},_C=(t,e,r)=>{if(t.symbols){if(!r.connected){r.notifications.connected={title:"Connected",message:"to the Symbols live server"},r.update({connected:!0});let o=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(o)},3e3)}}else if(r.connected){r.notifications.connected={title:"Disconnected",type:"error"},r.update({connected:!1});let o=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(o)},3e3)}},xC={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:jP[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,r,o)=>{r.update({animation:"fadeInUp"})},onClick:(e,r,o)=>{delete o.notifications[r.key],r.update({animation:"fadeOutDown"}),o.onClose&&o.onClose(e,r,o)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var BP=!1,UP=()=>BP?"http://localhost:8080":"https://api.symbols.app",VP=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}},zP=async t=>{try{let e=t||UP(),r=await v.fetch(`${e}/service-token`,{method:"GET"}),o;try{let n=await r.clone().json();if(n&&typeof n.token=="string")return n.token.trim();o=await r.text()}catch{o=await r.text()}return(o||"").replace(/\s+/gu,"")||void 0}catch(e){console.error("[sync] Failed to fetch service-token",e)}},kC=(t,e,r,o)=>{t.on("snapshot",yC(e,r,o)),t.on("ops",bC(e,r,o)),t.on("clients",n=>{o.editor?.verbose&&_C(n,e,r)}),t.on("disconnect",n=>{o.editor?.verbose&&console.info("[sync] disconnected",n)})},HP=async(t,e,r,o)=>{let n=await zP(o);if(!n)return console.warn("[sync] no service token \u2014 collab disabled"),null;let s=r.key;if(!s)return console.warn("[sync] ctx.key missing \u2014 collab cannot authenticate"),null;let i=r.editor?.projectId||null,a=xs(o,{path:"/collab-socket",transports:["websocket"],auth:{token:n,projectId:i,projectKey:s,branch:"main",live:!0,clientType:"platform"},reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return a.on("connect",()=>{r.editor?.verbose&&console.info("[sync] connected (collab)")}),kC(a,t,e,r),a},WP=(t,e,r)=>{let o=xs({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return o.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),kC(o,t,e,r),o.on("reload",()=>{typeof v<"u"&&v.location&&v.location.reload()}),o},qP=async(t,e,r)=>{let{mode:o,baseUrl:n}=VP(r);return o?o==="collab"?HP(t,e,r,n):o==="runner"?WP(t,e,r):null:null},KP={onInit:qP};var vC=t=>typeof t>"u",wC=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),SC=t=>t?.editor?.runtime==="runner",CC=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},EC={name:"sync",beforeCreate(t,e){let r=e&&e.editor;(r&&!vC(r.liveSync)?r.liveSync:wC(e)||SC(e))&&(wC(e)&&!SC(e)&&!e?.key||CC(t,KP))}},AC={name:"notifications",beforeCreate(t,e){if(!e)return;let r=vC(e.notifications)?null:e.notifications,o=e.editor&&e.editor.verbose===!0;(r===!0||r!==!1&&o)&&CC(t,xC)}};var Vb={};P(Vb,{AlertTemplate:()=>Ku,ConfirmTemplate:()=>Wu,CustomTemplate:()=>Yu,ModalLayer:()=>Hu,ModalRoot:()=>zu,PromptTemplate:()=>Gu,windowsComponents:()=>Ub});var Bb={};P(Bb,{alertDialog:()=>Uu,closeAllModals:()=>ju,closeModal:()=>Fu,confirmDialog:()=>Bu,getLayer:()=>Mu,openModal:()=>Nu,promptDialog:()=>Vu,windowsFunctions:()=>_r});function J(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function ws(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 r=t?.getRoot?.();return r?.ModalRoot?r.ModalRoot:typeof globalThis<"u"&&globalThis.__SMBLS_WINDOWS_MODAL_ROOT__?.__ref?globalThis.__SMBLS_WINDOWS_MODAL_ROOT__:null}function Mu(){return J(this)}var GP=(t,e)=>{let r=t&&t["ModalLayer_"+e],o=r?.node||r?.__ref?.node;!o||typeof o.style?.setProperty!="function"||(o.style.setProperty("display","none","important"),o.style.setProperty("opacity","0","important"),o.style.setProperty("visibility","hidden","important"),o.style.setProperty("pointer-events","none","important"))},TC=(t,e)=>{let r=t&&t["ModalLayer_"+e],o=r?.node||r?.__ref?.node;!o||typeof o.style?.removeProperty!="function"||(o.style.removeProperty("display"),o.style.removeProperty("opacity"),o.style.removeProperty("visibility"),o.style.removeProperty("pointer-events"))};function Fu(t){let e=ws(this);if(!e)return;let r=e.state?.stack||[];if(!r.length)return;let o,n,s;if(t){if(s=[],o=r.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),o.length===r.length)return;n=r.filter(i=>i.id===t)}else o=r.slice(0,-1),n=r.slice(-1),s=[r.length-1];e.state.update({stack:o});for(let i of s)GP(e,i);for(let i of n)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function Nu(t={}){let e=ws(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 r=t.id||`modal_${e.__modalIdCounter}_${Date.now().toString(36)}`,o={id:r,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},n=e.state?.stack||[];if(n.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=n.length;return TC(e,s),e.state.update({stack:[...n,o]}),r}function ju(){let t=ws(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function Bu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function Uu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function Vu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var _r={openModal:Nu,closeModal:Fu,closeAllModals:ju,confirmDialog:Bu,alertDialog:Uu,promptDialog:Vu,getLayer:Mu};var YP=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),OC=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(YP),r=[];for(let o=0;o<e.length;o++){let n=e[o];(n.offsetParent!==null||n===document.activeElement)&&r.push(n)}return r},RC=t=>{let e=t.state?.stack||[];if(!e.length)return null;let r=t["ModalLayer_"+(e.length-1)];return r?.node||r?.__ref?.node||null},zu={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 r=t.context;if(r){r.functions||(r.functions={});for(let a in _r)a in r.functions||(r.functions[a]=_r[a])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let o=()=>{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)}},n=a=>{let c=t.state?.stack;if(c?.length){if(a.key==="Tab"){let l=RC(t);if(!l)return;let f=OC(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"&&c[c.length-1]?.dismissOnBackdrop!==!1&&(a.preventDefault(),o())}};window.addEventListener("keydown",n),t.__escHandler=n;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,r=t.__prevStackLen||0;if(e!==r)if(t.__prevStackLen=e,t.__modalOpeners=t.__modalOpeners||[],e>r)t.__modalOpeners[e]=document.activeElement&&document.activeElement!==document.body?document.activeElement:t.__modalOpeners[e]||null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{let o=RC(t);if(!o)return;let n=OC(o)[0]||o.querySelector&&o.querySelector('[role="dialog"]')||o;try{n.focus&&n.focus()}catch{}});else{let o=null;for(let n=r;n>e;n--)t.__modalOpeners[n]&&(o=o||t.__modalOpeners[n]),t.__modalOpeners[n]=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 Hu={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",background:"black.45",backdropFilter:"blur(4px)",transitionProperty:"opacity",transitionDuration:"200ms",transitionTimingFunction:"ease",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=J(t)?.id;return e?"modal-title-"+e:null}},width:t=>J(t)?.width||"H",maxWidth:t=>J(t)?.maxWidth||"90vw",maxHeight:t=>J(t)?.maxHeight||null,onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>J(t)?.template!=="confirm"},AlertTemplate:{hide:t=>J(t)?.template!=="alert"},PromptTemplate:{hide:t=>J(t)?.template!=="prompt"},CustomTemplate:{hide:t=>J(t)?.template!=="custom"}}};var Ss=(t,e,r)=>J(t)?.[e]||r,XP=t=>{let e=J(t)?.icon;return e===null||e===!1},Wu={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>Ss(t,"title","Are you sure?"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>Ss(t,"message","This action cannot be undone."),color:"dim"}},Icons:{hide:t=>XP(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>Ss(t,"icon","warning")}}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>Ss(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=J(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] confirm.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:t=>Ss(t,"confirmTheme","primary"),text:t=>Ss(t,"confirmText","Confirm"),onClick:(t,e,r)=>{let o=J(e);if(o?.onConfirm)try{o.onConfirm()}catch(n){console.warn("[windows] confirm.onConfirm threw:",n)}e.call("closeModal",o?.id)}}}};var qu=(t,e,r)=>J(t)?.[e]||r,Ku={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>qu(t,"title","Notice"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>qu(t,"message",""),color:"dim"}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>qu(t,"icon","info")}}},ModalFooter:{flow:"x",align:"center end",OkBtn:{extends:"Button",theme:"primary",text:t=>qu(t,"okText","OK"),onClick:(t,e,r)=>{let o=J(e);if(o?.onOk)try{o.onOk()}catch(n){console.warn("[windows] alert.onOk threw:",n)}e.call("closeModal",o?.id)}}}};var Sc=(t,e,r)=>J(t)?.[e]||r,Gu={tag:"div",flow:"y",gap:"B",scope:{value:""},onRender:(t,e)=>{let r=J(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},onUpdate:(t,e)=>{let r=J(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>Sc(t,"title","Enter a value"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>Sc(t,"message",""),color:"dim"}}},InputRow:{extends:"Input",autofocus:!0,placeholder:t=>Sc(t,"placeholder",""),value:(t,e)=>t.parent.scope?.value||"",onInput:(t,e,r)=>{e.parent.scope.value=t.target.value},onKeydown:(t,e,r)=>{if(t.key!=="Enter")return;t.preventDefault();let o=J(e),n=e.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>Sc(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=J(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] prompt.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>Sc(t,"confirmText","OK"),onClick:(t,e,r)=>{let o=J(e),n=e.parent.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}}}};var Yu={tag:"div",flow:"y",gap:"B",Title:{tag:"h2",text:t=>J(t)?.title||"",hide:t=>!J(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=J(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",onInit:t=>{let e=Q(()=>{let r=J(t),o=r?.content||null,n=r?.id||null;if(!o){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in _r)i in s.functions||(s.functions[i]=_r[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var Ub={ModalRoot:zu,ModalLayer:Hu,ConfirmTemplate:Wu,AlertTemplate:Ku,PromptTemplate:Gu,CustomTemplate:Yu};var qb={};P(qb,{Dropdown:()=>ed,DropdownList:()=>rd,DropdownParent:()=>od,DropdownParentFocus:()=>nd,DropdownRoot:()=>Qu,DropdownSiblingFocus:()=>sd,DropdownTrigger:()=>td,dropdownComponents:()=>Wb});var PC=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),ZP=(t,e,r,o)=>{let n=PC(t,r,o),s=i=>n[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":n.bottom>=n.top?"bottom":"top"},JP=(t,e,r,o,n)=>{let s=PC(e,o,n),i=t==="top"||t==="bottom"?r.height+8:r.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:t},Xu=(t,e,r)=>Math.max(e,Math.min(r,t)),to=(t,e,r="auto")=>{if(!t)return{left:0,top:0,side:"bottom",align:"start"};let o=typeof window<"u"?window.innerWidth:1024,n=typeof window<"u"?window.innerHeight:768,s={width:Math.max(120,e?.width||0),height:Math.max(40,e?.height||0)};if(r==="center"){let d=Xu((o-s.width)/2,8,Math.max(8,o-s.width-8)),h=Xu((n-s.height)/2,8,Math.max(8,n-s.height-8));return{left:d,top:h,side:"center",align:"center"}}let i,a;if(r==="auto")i=ZP(t,s,o,n),a="start";else{let d=r.split("-");i=d[0],a=d[1]||"start",i=JP(i,t,s,o,n)}let c,l;i==="bottom"||i==="top"?(a==="start"?c=t.left:a==="end"?c=t.right-s.width:c=t.left+(t.width-s.width)/2,l=i==="bottom"?t.bottom+8:t.top-s.height-8):(a==="start"?l=t.top:a==="end"?l=t.bottom-s.height:l=t.top+(t.height-s.height)/2,c=i==="right"?t.right+8:t.left-s.width-8);let f=Math.max(8,o-s.width-8),u=Math.max(8,n-s.height-8);return c=Xu(c,8,f),l=Xu(l,8,u),{left:c,top:l,side:i,align:a}},ks=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 eo={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:"70vh"},QP=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}},zb=t=>t?.getRoot?.()?.DropdownRoot||null,tI=0,eI=()=>`dropdown_${++tI}_${Date.now().toString(36)}`;function Zu(t={}){let e=zb(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 r=t.anchorEl?.node||t.anchorEl,o=t.anchorRect||QP(r);if(!o)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let n=t.id||eI(),s=t.triggerEl?.node||t.triggerEl||r||(typeof document<"u"?document.activeElement:null),i={id:n,content:t.content||null,anchor:o,placement:t.placement||eo.placement,trigger:t.trigger||eo.trigger,offset:t.offset??eo.offset,minWidth:t.minWidth||eo.minWidth,maxWidth:t.maxWidth||eo.maxWidth,maxHeight:t.maxHeight||eo.maxHeight,theme:t.theme||null,shadow:t.shadow||null,background:t.background||null,round:t.round||null,onOpen:t.onOpen,onClose:t.onClose,triggerEl: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 n}function Ju(t){let e=zb(this);if(!e)return;let r=e.state?.layer;r&&e.state.update({layer:{...r,inert:!!t}})}function Vo(t){let e=zb(this);if(!e)return;let r=e.state?.layer;if(!r)return;let o=typeof t=="string"?t:t?.id;if(o&&r.id&&o!==r.id)return;let n=r.onClose;e.state.update({layer:null});let s=r.triggerEl;if(s&&typeof s.focus=="function")try{s.focus()}catch(i){console.warn("[dropdown] focus restore threw:",i)}if(typeof n=="function")try{n(r)}catch(i){console.warn("[dropdown] onClose threw:",i)}}var rI=`
105
105
  @keyframes smbls-dropdown-fade-in {
106
106
  from { opacity: 0; transform: var(--smbls-dropdown-from, translateY(-6px)) scale(0.98); }
107
107
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
@@ -141,7 +141,7 @@ ${i}
141
141
  [data-smbls-dropdown="panel"]:not([data-smbls-shadowed]) {
142
142
  box-shadow: none !important;
143
143
  }
144
- `,UP=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=BP,document.head.appendChild(t)},wC=(t,e)=>{if(!t.node)return;let r=e?.background;if(!r)t.node.removeAttribute("data-smbls-surface");else{let o=/^[a-z][\w.+-]*$/i.test(r)?`var(--color-${r})`:r;t.node.style.setProperty("--smbls-dropdown-surface",o),t.node.setAttribute("data-smbls-surface","")}e?.theme?t.node.setAttribute("data-smbls-themed",""):t.node.removeAttribute("data-smbls-themed"),e?.shadow?t.node.setAttribute("data-smbls-shadowed",""):t.node.removeAttribute("data-smbls-shadowed")},VP=t=>{t.node&&(t.node.style.animation="none",t.node.offsetWidth,t.node.style.animation="smbls-dropdown-fade-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both")},Wu={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(UP(),typeof window>"u")return;let e=o=>{o.key==="Escape"&&t.state?.layer&&(o.preventDefault(),Fo.call(t))};window.addEventListener("keydown",e),t.__dropdownEscHandler=e;let r=o=>{let n=t.state?.layer;if(!n)return;let s=t.node?.querySelector('[data-smbls-dropdown="panel"]');if(s&&s.contains(o.target))return;let i=n.anchor;if(i){let a=o.clientX,c=o.clientY;if(a>=i.left&&a<=i.right&&c>=i.top&&c<=i.bottom)return}Fo.call(t)};document.addEventListener("mousedown",r,!0),t.__dropdownClickHandler=r},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 r=t._lastSize||{width:280,height:200};return Jr(e.anchor,r,e.placement).left+"px"},top:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:280,height:200};return Jr(e.anchor,r,e.placement).top+"px"},style:t=>{let e=t.parent?.layer;if(!e?.anchor)return{};let r=t._lastSize||{width:280,height:200};return{"--smbls-dropdown-from":gs(Jr(e.anchor,r,e.placement).side)}},minWidth:t=>t.parent?.layer?.minWidth||"180px",maxWidth:t=>t.parent?.layer?.maxWidth||"90vw",maxHeight:t=>t.parent?.layer?.maxHeight||"70vh",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||null,pointerEvents:t=>{let e=t.parent?.layer;return e?e.inert?"none":"auto":"none"},opacity:t=>t.parent?.layer?"0.999":"0",onClick:t=>t.stopPropagation(),onInit:t=>{let e=Z(()=>{let r=t.parent?.layer,o=r?.content||null,n=r?.id||null;if(!o){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null}return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o)}catch(s){console.warn("[dropdown] content set failed:",s)}wC(t,r),VP(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;wC(t,r);let s=t.parent?.layer;if(!s?.anchor)return;let i=t.node.getBoundingClientRect(),a={width:i.width,height:i.height};t._lastSize=a;let c=Jr(s.anchor,a,s.placement);t.node.style.left=c.left+"px",t.node.style.top=c.top+"px",t.node.style.setProperty("--smbls-dropdown-from",gs(c.side))})}});t.__ref&&t.__ref.__effects?.push(e)},onRender:t=>{if(t?.node&&(t.parent?.layer?t.node.setAttribute("data-smbls-open","true"):t.node.removeAttribute("data-smbls-open")),!t?.node)return;let e=t.parent?.layer;if(!e?.anchor)return;let r=t.node.getBoundingClientRect(),o={width:r.width,height:r.height},n=t._lastSize;(!n||Math.abs(n.width-o.width)>1||Math.abs(n.height-o.height)>1)&&(t._lastSize=o);let s=Jr(e.anchor,o,e.placement);t.node.style.left=s.left+"px",t.node.style.top=s.top+"px",t.node.style.setProperty("--smbls-dropdown-from",gs(s.side))}}}};var Ib=t=>{let e=t?.getRoot?.()?.DropdownRoot?.state?.layer;if(e&&t.dropdownId&&e.id===t.dropdownId){t.call("closeDropdown");return}let r={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 o in r)r[o]===void 0&&delete r[o];t.call("openDropdown",r)},qu={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),Ib(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&Ib(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>Ib(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var Ku={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},Gu={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},Yu={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},Xu={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()}}},Ju={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 Db={DropdownRoot:Wu,DropdownTrigger:qu,Dropdown:Ku,DropdownList:Gu,DropdownParent:Yu,DropdownParentFocus:Xu,DropdownSiblingFocus:Ju};var Mb={};P(Mb,{DROPDOWN_DEFAULTS:()=>Zr,closeDropdown:()=>Fo,computePosition:()=>Jr,dropdownFunctions:()=>Lb,fadeInTransform:()=>gs,openDropdown:()=>zu,setDropdownInert:()=>Hu});var Lb={openDropdown:zu,closeDropdown:Fo,setDropdownInert:Hu};var zP=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),HP=(t,e,r,o,n)=>{let s=zP(e,o,n),i=t==="top"||t==="bottom"?r.height+6:r.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},SC=(t,e,r)=>Math.max(e,Math.min(r,t)),Zu=(t,e,r="bottom")=>{if(!t)return{left:0,top:0,side:"bottom"};let o=typeof window<"u"?window.innerWidth:1024,n=typeof window<"u"?window.innerHeight:768,s=HP(r,t,e,o,n),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=SC(i,6,o-e.width-6),a=SC(a,6,n-e.height-6),{left:i,top:a,side:s}},kC=t=>{switch(t){case"bottom":return"translateY(-4px)";case"top":return"translateY(4px)";case"left":return"translateX(4px)";case"right":return"translateX(-4px)";default:return"translateY(-4px)"}};var WP=`
144
+ `,oI=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=rI,document.head.appendChild(t)},IC=(t,e)=>{if(!t.node)return;let r=e?.background;if(!r)t.node.removeAttribute("data-smbls-surface");else{let o=/^[a-z][\w.+-]*$/i.test(r)?`var(--color-${r})`:r;t.node.style.setProperty("--smbls-dropdown-surface",o),t.node.setAttribute("data-smbls-surface","")}e?.theme?t.node.setAttribute("data-smbls-themed",""):t.node.removeAttribute("data-smbls-themed"),e?.shadow?t.node.setAttribute("data-smbls-shadowed",""):t.node.removeAttribute("data-smbls-shadowed")},nI=t=>{t.node&&(t.node.style.animation="none",t.node.offsetWidth,t.node.style.animation="smbls-dropdown-fade-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both")},Qu={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(oI(),typeof window>"u")return;let e=o=>{o.key==="Escape"&&t.state?.layer&&(o.preventDefault(),Vo.call(t))};window.addEventListener("keydown",e),t.__dropdownEscHandler=e;let r=o=>{let n=t.state?.layer;if(!n)return;let s=t.node?.querySelector('[data-smbls-dropdown="panel"]');if(s&&s.contains(o.target))return;let i=n.anchor;if(i){let a=o.clientX,c=o.clientY;if(a>=i.left&&a<=i.right&&c>=i.top&&c<=i.bottom)return}Vo.call(t)};document.addEventListener("mousedown",r,!0),t.__dropdownClickHandler=r},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 r=t._lastSize||{width:280,height:200};return to(e.anchor,r,e.placement).left+"px"},top:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:280,height:200};return to(e.anchor,r,e.placement).top+"px"},style:t=>{let e=t.parent?.layer;if(!e?.anchor)return{};let r=t._lastSize||{width:280,height:200};return{"--smbls-dropdown-from":ks(to(e.anchor,r,e.placement).side)}},minWidth:t=>t.parent?.layer?.minWidth||"180px",maxWidth:t=>t.parent?.layer?.maxWidth||"90vw",maxHeight:t=>t.parent?.layer?.maxHeight||"70vh",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||null,pointerEvents:t=>{let e=t.parent?.layer;return e?e.inert?"none":"auto":"none"},opacity:t=>t.parent?.layer?"0.999":"0",onClick:t=>t.stopPropagation(),onInit:t=>{let e=Q(()=>{let r=t.parent?.layer,o=r?.content||null,n=r?.id||null;if(!o){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null}return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o)}catch(s){console.warn("[dropdown] content set failed:",s)}IC(t,r),nI(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;IC(t,r);let s=t.parent?.layer;if(!s?.anchor)return;let i=t.node.getBoundingClientRect(),a={width:i.width,height:i.height};t._lastSize=a;let c=to(s.anchor,a,s.placement);t.node.style.left=c.left+"px",t.node.style.top=c.top+"px",t.node.style.setProperty("--smbls-dropdown-from",ks(c.side))})}});t.__ref&&t.__ref.__effects?.push(e)},onRender:t=>{if(t?.node&&(t.parent?.layer?t.node.setAttribute("data-smbls-open","true"):t.node.removeAttribute("data-smbls-open")),!t?.node)return;let e=t.parent?.layer;if(!e?.anchor)return;let r=t.node.getBoundingClientRect(),o={width:r.width,height:r.height},n=t._lastSize;(!n||Math.abs(n.width-o.width)>1||Math.abs(n.height-o.height)>1)&&(t._lastSize=o);let s=to(e.anchor,o,e.placement);t.node.style.left=s.left+"px",t.node.style.top=s.top+"px",t.node.style.setProperty("--smbls-dropdown-from",ks(s.side))}}}};var Hb=t=>{let e=t?.getRoot?.()?.DropdownRoot?.state?.layer;if(e&&t.dropdownId&&e.id===t.dropdownId){t.call("closeDropdown");return}let r={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 o in r)r[o]===void 0&&delete r[o];t.call("openDropdown",r)},td={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),Hb(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&Hb(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>Hb(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var ed={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},rd={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},od={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},nd={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()}}},sd={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 Wb={DropdownRoot:Qu,DropdownTrigger:td,Dropdown:ed,DropdownList:rd,DropdownParent:od,DropdownParentFocus:nd,DropdownSiblingFocus:sd};var Gb={};P(Gb,{DROPDOWN_DEFAULTS:()=>eo,closeDropdown:()=>Vo,computePosition:()=>to,dropdownFunctions:()=>Kb,fadeInTransform:()=>ks,openDropdown:()=>Zu,setDropdownInert:()=>Ju});var Kb={openDropdown:Zu,closeDropdown:Vo,setDropdownInert:Ju};var sI=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),iI=(t,e,r,o,n)=>{let s=sI(e,o,n),i=t==="top"||t==="bottom"?r.height+6:r.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},DC=(t,e,r)=>Math.max(e,Math.min(r,t)),id=(t,e,r="bottom")=>{if(!t)return{left:0,top:0,side:"bottom"};let o=typeof window<"u"?window.innerWidth:1024,n=typeof window<"u"?window.innerHeight:768,s=iI(r,t,e,o,n),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=DC(i,6,o-e.width-6),a=DC(a,6,n-e.height-6),{left:i,top:a,side:s}},$C=t=>{switch(t){case"bottom":return"translateY(-4px)";case"top":return"translateY(4px)";case"left":return"translateX(4px)";case"right":return"translateX(-4px)";default:return"translateY(-4px)"}};var aI=`
145
145
  @keyframes smbls-tooltip-fade-in {
146
146
  from { opacity: 0; transform: var(--smbls-tooltip-from, translateY(-4px)); }
147
147
  to { opacity: 1; transform: translate3d(0, 0, 0); }
@@ -149,4 +149,4 @@ ${i}
149
149
  [data-smbls-tooltip="panel"][data-smbls-open="true"] {
150
150
  animation: smbls-tooltip-fade-in 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
151
151
  }
152
- `,qP=()=>{if(typeof document>"u"||document.getElementById("smbls-tooltip-css"))return;let t=document.createElement("style");t.id="smbls-tooltip-css",t.textContent=WP,document.head.appendChild(t)},vC={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},onInit:()=>{qP()},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},position:"fixed",subscribeTo:["tip"],tip:(t,e)=>e?.tip||null,left:t=>{let e=t.tip;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:200,height:32};return Zu(e.anchor,r,e.placement).left+"px"},top:t=>{let e=t.tip;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:200,height:32};return Zu(e.anchor,r,e.placement).top+"px"},style:t=>{let e=t.tip;if(!e?.anchor)return{};let r=t._lastSize||{width:200,height:32};return{"--smbls-tooltip-from":kC(Zu(e.anchor,r,e.placement).side)}},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||"tooltip .quaternary",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>t.tip?"1":"0",visibility:t=>t.tip?"visible":"hidden",transition:"B opacity defaultBezier, B visibility defaultBezier",onRender:t=>{if(t?.node&&(t.tip?t.node.setAttribute("data-smbls-open","true"):t.node.removeAttribute("data-smbls-open")),!t?.node)return;let e=t.node.getBoundingClientRect(),r={width:e.width,height:e.height},o=t._lastSize;if(!o||Math.abs(o.width-r.width)>1||Math.abs(o.height-r.height)>1){t._lastSize=r;let n=t.getParent?.();n?.state?.tip&&n.state.update({tip:{...n.state.tip}})}}}};var KP=t=>{t.tooltipText&&t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key})},CC=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,KP(t)},t.tooltipDelay??250))},EC=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))},AC={onMouseenter:(t,e)=>CC(e),onMouseleave:(t,e)=>EC(e),onFocus:(t,e)=>CC(e),onBlur:(t,e)=>EC(e)};R();var TC={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=>bt(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)}},OC={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)}},RC={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,o=e||r;if(!o)return;let n=o&&o[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":n||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var PC={TooltipRoot:vC,TooltipTrigger:AC,Tooltip:TC,TooltipHidden:OC,TooltipParent:RC};var IC={placement:"bottom",theme:"tooltip .quaternary",delay:250,hideDelay:100},GP=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}},DC=t=>t?.getRoot?.()?.TooltipRoot||null,YP=0,XP=()=>`tooltip_${++YP}_${Date.now().toString(36)}`;function $C(t={}){let e=DC(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 r=t.anchorEl?.node||t.anchorEl,o=t.anchorRect||GP(r);if(!o)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let n=t.id||XP(),s={id:n,text:t.text||"",anchor:o,placement:t.placement||IC.placement,theme:t.theme||IC.theme};return e.state.update({tip:s}),n}function LC(t){let e=DC(this);if(!e)return;let r=e.state?.tip;if(!r)return;let o=typeof t=="string"?t:t?.id;o&&r.id&&o!==r.id||e.state.update({tip:null})}var MC={openTooltip:$C,closeTooltip:LC};var FC=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),JP=(t,e)=>{let r=e?.sharedLibraries,o=Array.isArray(r)?r.map(s=>typeof s=="string"?s:s?.key||s?.name):r&&typeof r=="object"?Object.keys(r):null,n=0;return t.map(s=>{if(!FC(s))return s;let i=n++;if(typeof s.__libraryKey=="string"&&s.__libraryKey)return s.__libraryKey;if(o&&o[i])return o[i];if(typeof s.__stubId=="string"){let a=s.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(a)return a[1]}return null}).filter(Boolean)},ZP=async(t,e={})=>{let r=e.symbolsConfig,o=r?.owner&&r?.key?`${r.owner}--${r.key}`:r?.key,n=e.key=e.key||o||(w(t)?t:"smblsapp");if(e.define=e.define||Jn,e.cssPropsRegistry=xt,e.window=lv(e),e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(g=>typeof g=="string"||FC(g))){e.sharedLibraries=JP(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:g}=await Promise.resolve().then(()=>(R(),El));e.sharedLibraries=await g(e.sharedLibraries,{apiBaseUrl:ob()})}iv(e.sharedLibraries),xv(e)}pc(e,e.designSystem);let[s,i]=yv(n,e);e.designSystem=s,e.registry=i,e.cases||(e.cases={}),e.shorthand&&Xa.prepareContext(e);let a=bv(t,e);if(e.state=a,yi(a),e.pages=_v(t,e),e.components=fv(e),e.utils=uv(e),Er[e.packageManager]&&(e.dependencies=await pv(e)),e.methods=dv(e),e.routerOptions=Z0(t,e),e.defaultExtends=[Ff],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(h=>!h||typeof h!="object")){let h=e.plugins.filter(g=>!g||typeof g!="object");e.plugins=e.plugins.filter(g=>g&&typeof g=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${h.length} non-plugin entr${h.length===1?"y":"ies"} (${h.map(g=>JSON.stringify(g)).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.`)}e.globalScope&&S(e.globalScope)&&(e.globalScope=Fs(e.globalScope));let c=(h,g)=>{let p=g?h[g]:h;if(!S(p))return;let m=fe(p);try{Object.assign(p,m)}catch(_){if(g)h[g]=m;else throw _}};c(t),c(e,"components"),c(e,"pages"),c(e,"functions"),c(e,"methods"),c(e,"snippets"),c(e,"app");let l=h=>h&&typeof h.select=="function";e.fetch?.__resolved&&!l(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!l(e.db.__resolved)&&delete e.db.__resolved;let f=h=>e.plugins.some(g=>g&&g.name===h);if(e.polyglot&&!f("polyglot")){e.plugins.push(Qn);for(let h in oc)typeof e.functions[h]!="function"&&(e.functions[h]=oc[h])}if(f("helmet")||e.plugins.push(Oy),e.fetch&&!f("fetch")&&e.plugins.push(ah),e.designSystem?.typography?.useCapsize!==!1&&!f("capsize")&&(e.plugins.push(Xf),e.cssPropsRegistry.useCapsize=Dy),e.shorthand&&!f("shorthand")&&e.plugins.push(Xa),e.analyze&&!f("analyze")){let h=e.analyze===!0?{}:e.analyze;e.analyze=au(h),e.plugins.push(es)}e.sync!==!1&&!f("sync")&&e.plugins.push(gC),e.inspect&&!f("inspect")&&e.plugins.push(eb),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!f("notifications")&&e.plugins.push(mC);let d=(h,g,p)=>{if(e[h]!==!1){for(let m in g)S(e.components[m])||(e.components[m]=g[m]);for(let m in p)typeof e.functions[m]!="function"&&(e.functions[m]=p[m])}};return d("windows",Ob,mr),d("dropdown",Db,Lb),d("tooltip",PC,MC),e},Fb=async(t,e)=>{S(e)||(e={}),Qe(t)?(t={},e.parent=t):w(t)?(t={},e.key=t):S(t)||(t={});let r=e.window||(typeof window<"u"?window:null),o=r?.__BRENDER__,n=null;if(o){let c=e.document||(typeof document<"u"?document:null);c&&(n=Array.from(c.head.querySelectorAll("style")))}if(await ZP(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&&S(e.app))for(let c in e.app)t[c]===void 0&&(t[c]=e.app[c]);t.extends=fk(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await hv({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 t;let i=e.parent||s.body;if(o)return QP(se,t,i,e,r,n);let a=se(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},QP=async(t,e,r,o,n,s)=>{let i=r.ownerDocument||document;s&&s.forEach(l=>{l.parentNode&&l.remove()});let a=[];for(let l of r.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,r,o.key,{verbose:o.verbose,context:o,...o.domqlOptions});return tI(n),c},tI=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var Nb=(t,e)=>st(t,S(e)?e:{}),eI=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 r=t.globalTheme||"auto";try{if(typeof window<"u"&&window.location){let s=new URLSearchParams(window.location.search).get("globalTheme");s&&(r=s)}}catch{}let o=t.themeStorageKey;if(r==="auto"&&o&&typeof localStorage<"u")try{let s=localStorage.getItem(o);s&&(r=s)}catch{}let n=r==="auto"?(()=>{try{return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():r;e.setAttribute("data-theme",n),t.globalTheme=r,t.themeRoot=e},rI=()=>{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}},NC=t=>{let e=rI();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},jb=(t,e=zr,r)=>{let o={...zr,...Nb(e,r)};return NC(o),eI(o),Fb(t,o).then(s=>{if(Ey(s,o),s.destroy=()=>ja(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Na(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},s.onCreate&&s.onCreate(s,s.state,s.context,o),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})},oI=(t,e=zr,r)=>{let o=jb(t,e,r),n={...zr,...Nb(e,r)},s=n.key;return rk(o,s,{utils:Fa,...n}),o},nI=async(t,e=zr,r)=>{let o={...zr,...Nb(e,r)};NC(o);let n=e.key;await ek(n,o);let s=await Fb(t,o);return Ey(s,o),s.destroy=()=>ja(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Na(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},o.onCreate&&await o.onCreate(s,s.state,s.context,o),s},sI=(t={},e=zr,r)=>jb({deps:{isUndefined:Tt},...t},st({domqlOptions:{onlyResolveExtends:!0}},e),r);zf(Sa);rv(void 0,{smbls:Bb});ov(void 0,{"@symbo.ls/windows":()=>({...Rb,...Tb}),"@symbo.ls/dropdown":()=>({...$b,...Mb})});
152
+ `,cI=()=>{if(typeof document>"u"||document.getElementById("smbls-tooltip-css"))return;let t=document.createElement("style");t.id="smbls-tooltip-css",t.textContent=aI,document.head.appendChild(t)},LC={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},onInit:()=>{cI()},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},position:"fixed",subscribeTo:["tip"],tip:(t,e)=>e?.tip||null,left:t=>{let e=t.tip;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:200,height:32};return id(e.anchor,r,e.placement).left+"px"},top:t=>{let e=t.tip;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:200,height:32};return id(e.anchor,r,e.placement).top+"px"},style:t=>{let e=t.tip;if(!e?.anchor)return{};let r=t._lastSize||{width:200,height:32};return{"--smbls-tooltip-from":$C(id(e.anchor,r,e.placement).side)}},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||"tooltip .quaternary",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>t.tip?"1":"0",visibility:t=>t.tip?"visible":"hidden",transition:"B opacity defaultBezier, B visibility defaultBezier",onRender:t=>{if(t?.node&&(t.tip?t.node.setAttribute("data-smbls-open","true"):t.node.removeAttribute("data-smbls-open")),!t?.node)return;let e=t.node.getBoundingClientRect(),r={width:e.width,height:e.height},o=t._lastSize;if(!o||Math.abs(o.width-r.width)>1||Math.abs(o.height-r.height)>1){t._lastSize=r;let n=t.getParent?.();n?.state?.tip&&n.state.update({tip:{...n.state.tip}})}}}};var lI=t=>{t.tooltipText&&t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key})},MC=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,lI(t)},t.tooltipDelay??250))},FC=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))},NC={onMouseenter:(t,e)=>MC(e),onMouseleave:(t,e)=>FC(e),onFocus:(t,e)=>MC(e),onBlur:(t,e)=>FC(e)};R();var jC={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=>yt(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)}},BC={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)}},UC={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,o=e||r;if(!o)return;let n=o&&o[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":n||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var VC={TooltipRoot:LC,TooltipTrigger:NC,Tooltip:jC,TooltipHidden:BC,TooltipParent:UC};var zC={placement:"bottom",theme:"tooltip .quaternary",delay:250,hideDelay:100},fI=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}},HC=t=>t?.getRoot?.()?.TooltipRoot||null,uI=0,dI=()=>`tooltip_${++uI}_${Date.now().toString(36)}`;function WC(t={}){let e=HC(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 r=t.anchorEl?.node||t.anchorEl,o=t.anchorRect||fI(r);if(!o)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let n=t.id||dI(),s={id:n,text:t.text||"",anchor:o,placement:t.placement||zC.placement,theme:t.theme||zC.theme};return e.state.update({tip:s}),n}function qC(t){let e=HC(this);if(!e)return;let r=e.state?.tip;if(!r)return;let o=typeof t=="string"?t:t?.id;o&&r.id&&o!==r.id||e.state.update({tip:null})}var KC={openTooltip:WC,closeTooltip:qC};var GC=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),pI=(t,e)=>{let r=e?.sharedLibraries,o=Array.isArray(r)?r.map(s=>typeof s=="string"?s:s?.key||s?.name):r&&typeof r=="object"?Object.keys(r):null,n=0;return t.map(s=>{if(!GC(s))return s;let i=n++;if(typeof s.__libraryKey=="string"&&s.__libraryKey)return s.__libraryKey;if(o&&o[i])return o[i];if(typeof s.__stubId=="string"){let a=s.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(a)return a[1]}return null}).filter(Boolean)},hI=async(t,e={})=>{let r=e.symbolsConfig,o=r?.owner&&r?.key?`${r.owner}--${r.key}`:r?.key,n=e.key=e.key||o||(w(t)?t:"smblsapp");if(e.define=e.define||ss,e.cssPropsRegistry=_t,e.window=xv(e),e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(g=>typeof g=="string"||GC(g))){e.sharedLibraries=pI(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:g}=await Promise.resolve().then(()=>(R(),$l));e.sharedLibraries=await g(e.sharedLibraries,{apiBaseUrl:gb()})}yv(e.sharedLibraries),Pv(e)}wc(e,e.designSystem);let[s,i]=Tv(n,e);e.designSystem=s,e.registry=i,e.cases||(e.cases={}),e.shorthand&&nc.prepareContext(e);let a=Ov(t,e);if(e.state=a,Ci(a),e.pages=Rv(t,e),e.components=wv(e),e.utils=Sv(e),Or[e.packageManager]&&(e.dependencies=await vv(e)),e.methods=kv(e),e.routerOptions=lk(t,e),e.defaultExtends=[Wf],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(h=>!h||typeof h!="object")){let h=e.plugins.filter(g=>!g||typeof g!="object");e.plugins=e.plugins.filter(g=>g&&typeof g=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${h.length} non-plugin entr${h.length===1?"y":"ies"} (${h.map(g=>JSON.stringify(g)).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.`)}e.globalScope&&S(e.globalScope)&&(e.globalScope=Ws(e.globalScope));let c=(h,g)=>{let p=g?h[g]:h;if(!S(p))return;let m=de(p);try{Object.assign(p,m)}catch(b){if(g)h[g]=m;else throw b}};c(t),c(e,"components"),c(e,"pages"),c(e,"functions"),c(e,"methods"),c(e,"snippets"),c(e,"app");let l=h=>h&&typeof h.select=="function";e.fetch?.__resolved&&!l(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!l(e.db.__resolved)&&delete e.db.__resolved;let f=h=>e.plugins.some(g=>g&&g.name===h);if(e.polyglot&&!f("polyglot")){e.plugins.push(as);for(let h in uc)typeof e.functions[h]!="function"&&(e.functions[h]=uc[h])}if(f("helmet")||e.plugins.push(Uy),e.fetch&&!f("fetch")&&e.plugins.push(gh),e.designSystem?.typography?.useCapsize!==!1&&!f("capsize")&&(e.plugins.push(nu),e.cssPropsRegistry.useCapsize=Wy),e.shorthand&&!f("shorthand")&&e.plugins.push(nc),e.analyze&&!f("analyze")){let h=e.analyze===!0?{}:e.analyze;e.analyze=gu(h),e.plugins.push(ls)}e.sync!==!1&&!f("sync")&&e.plugins.push(EC),e.inspect&&!f("inspect")&&e.plugins.push(pb),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!f("notifications")&&e.plugins.push(AC);let d=(h,g,p)=>{if(e[h]!==!1){for(let m in g)S(e.components[m])||(e.components[m]=g[m]);for(let m in p)typeof e.functions[m]!="function"&&(e.functions[m]=p[m])}};return d("windows",Ub,_r),d("dropdown",Wb,Kb),d("tooltip",VC,KC),e},Yb=async(t,e)=>{S(e)||(e={}),or(t)?(t={},e.parent=t):w(t)?(t={},e.key=t):S(t)||(t={});let r=e.window||(typeof window<"u"?window:null),o=r?.__BRENDER__,n=null;if(o){let c=e.document||(typeof document<"u"?document:null);c&&(n=Array.from(c.head.querySelectorAll("style")))}if(await hI(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&&S(e.app))for(let c in e.app)t[c]===void 0&&(t[c]=e.app[c]);t.extends=wk(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await Cv({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 t;let i=e.parent||s.body;if(o)return gI(ae,t,i,e,r,n);let a=ae(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},gI=async(t,e,r,o,n,s)=>{let i=r.ownerDocument||document;s&&s.forEach(l=>{l.parentNode&&l.remove()});let a=[];for(let l of r.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,r,o.key,{verbose:o.verbose,context:o,...o.domqlOptions});return mI(n),c},mI=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var Xb=(t,e)=>st(t,S(e)?e:{}),yI=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 r=t.globalTheme||"auto";try{if(typeof window<"u"&&window.location){let s=new URLSearchParams(window.location.search).get("globalTheme");s&&(r=s)}}catch{}let o=t.themeStorageKey;if(r==="auto"&&o&&typeof localStorage<"u")try{let s=localStorage.getItem(o);s&&(r=s)}catch{}let n=r==="auto"?(()=>{try{return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():r;e.setAttribute("data-theme",n),t.globalTheme=r,t.themeRoot=e},bI=()=>{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}},YC=t=>{let e=bI();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},Zb=(t,e=qr,r)=>{let o={...qr,...Xb(e,r)};return YC(o),yI(o),Yb(t,o).then(s=>{if(jy(s,o),s.destroy=()=>Ga(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Ka(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},s.onCreate&&s.onCreate(s,s.state,s.context,o),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})},_I=(t,e=qr,r)=>{let o=Zb(t,e,r),n={...qr,...Xb(e,r)},s=n.key;return pk(o,s,{utils:qa,...n}),o},xI=async(t,e=qr,r)=>{let o={...qr,...Xb(e,r)};YC(o);let n=e.key;await dk(n,o);let s=await Yb(t,o);return jy(s,o),s.destroy=()=>Ga(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Ka(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},o.onCreate&&await o.onCreate(s,s.state,s.context,o),s},wI=(t={},e=qr,r)=>Zb({deps:{isUndefined:At},...t},st({domqlOptions:{onlyResolveExtends:!0}},e),r);Zf(Ra);pv(void 0,{smbls:Jb});hv(void 0,{"@symbo.ls/windows":()=>({...Vb,...Bb}),"@symbo.ls/dropdown":()=>({...qb,...Gb})});