smbls 3.14.825 → 3.14.826
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 +47 -44
- package/dist/smbls.esm.js +47 -44
- package/dist/smbls.iife-string.js +2 -2
- package/dist/smbls.iife.js +47 -44
- package/package.json +2 -2
package/dist/smbls.cjs
CHANGED
|
@@ -1,36 +1,39 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
`),n=-1,o=-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,n=f+1,s=r[f].indexOf(e)+1,r[f].includes("{}")){o=n,i=r[f].indexOf("{}")+3;break}let u=r[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{o=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)){o=f+1,i=r[f].lastIndexOf("}")!==-1?r[f].lastIndexOf("}")+2:r[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:n,endLineNumber:o}},
|
|
3
|
-
`).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),
|
|
4
|
-
`,"'"])?"`"+e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")+"`":"'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r")+"'"},
|
|
5
|
-
`;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=
|
|
1
|
+
"use strict";var DT=Object.create;var gl=Object.defineProperty;var LT=Object.getOwnPropertyDescriptor;var IT=Object.getOwnPropertyNames;var $T=Object.getPrototypeOf,MT=Object.prototype.hasOwnProperty;var U=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var yp=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},M=(t,e)=>{for(var r in e)gl(t,r,{get:e[r],enumerable:!0})},Zw=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of IT(e))!MT.call(t,o)&&o!==r&&gl(t,o,{get:()=>e[o],enumerable:!(n=LT(e,o))||n.enumerable});return t};var FT=(t,e,r)=>(r=t!=null?DT($T(t)):{},Zw(e||!t||!t.__esModule?gl(r,"default",{value:t,enumerable:!0}):r,t)),NT=t=>Zw(gl({},"__esModule",{value:!0}),t);var Mp,Fp,C,nt,hi=U(()=>{"use strict";Mp=globalThis,Fp=globalThis,C=globalThis,nt=C.document});var hr,gi,Xt,mi=U(()=>{"use strict";hi();hr=t=>(typeof Node=="object"?t instanceof C.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,gi=t=>(typeof HTMLElement=="object"?t instanceof C.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,Xt=t=>typeof C<"u"&&(C.Node&&t instanceof C.Node||C.Window&&t instanceof C.Window||t===C||nt!==void 0&&t===nt)});var v,x,Ge,R,El,Al,P,Tl,B,Tt,Pt,yi,Zt,Np,Dt=U(()=>{"use strict";mi();v=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,x=t=>typeof t=="string",Ge=t=>typeof t=="number",R=t=>typeof t=="function",El=t=>t===!0||t===!1,Al=t=>t===null,P=t=>Array.isArray(t),Tl=t=>t instanceof Date,B=t=>t===null?!1:typeof t=="object",Tt=t=>t!==void 0,Pt=t=>t===void 0,yi={boolean:El,array:P,object:v,string:x,date:Tl,number:Ge,null:Al,function:R,objectLike:B,node:hr,htmlElement:gi,defined:Tt},Zt=t=>(...e)=>e.some(r=>yi[r](t)),Np=t=>(...e)=>!e.some(r=>yi[r](t))});var jp,Bp,Vp,Up,Eo,bi,zp,Hp,_i,Wp,qp,Kp,Gp,Yp,Xp,Zp,Ao,wi,To=U(()=>{"use strict";Ye();Dt();jp=(t,e)=>e.every(r=>t.includes(r)),Bp=(t,e)=>{let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r},Vp=(t,e)=>{if(x(e)&&(e=parseInt(e)),Ge(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},Up=(t,e,r)=>{e<0||r<0||e>=t.length||r>=t.length||([t[e],t[r]]=[t[r],t[e]])},Eo=(...t)=>[].concat(...t),bi=(t,e=[])=>t.reduce((r,n)=>it(r,ft(n,{exclude:e}),e),{}),zp=(t,e)=>{let r=t.indexOf(e);return r!==-1?t.slice(0,r):t},Hp=(t,e)=>{if(!P(t))return;let r=t.indexOf(e);return r!==-1?t.slice(r+1):t},_i=(t,e)=>{let r=t.indexOf(e);if(r>-1){let n=[...t];return n.splice(r,1),n}return t},Wp=(t,e)=>t.filter(r=>r!==e),qp=(t,e)=>{let r=[];for(let n=0;n<t.length;n++)r.push(t[n]),n<t.length-1&&r.push(e);return r},Kp=(t,e,r)=>{let n=[...t],o=n.indexOf(e),s=n.indexOf(r);if(o!==-1&&s!==-1){let i=n.splice(o,1)[0],a=s<o?s:s+1;n.splice(a,0,i)}return n},Gp=(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},Yp=(t,e)=>t.filter(r=>!e.includes(r)),Xp=(t,e)=>{let r=new Set(e);return t.filter(n=>!r.has(n))},Zp=(t,e)=>{if(!t)return 0;let r=0;for(let n=0;n<e.length;n++)t.includes(e[n])&&r++;return r},Ao=t=>P(t)?[...new Set(t)]:t,wi=(t,e)=>{for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!1,configurable:!0,writable:!0})}});function Ft(t,e,r={}){let{bracketsLength:n=2,authored:o=!1}=r,s=n===3?"{{{":"{{";if(!t.includes(s)||o!==!0&&!rO(this,t))return t;let i=eO[n],a=e||this.state||{},c=this;return t.replace(i,(l,f,u,d)=>{let g=u.trim();if(d){let h=c?.context,p=h?.functions?.[d]||h?.utils?.[d]||h?.methods?.[d]||h?.snippets?.[d]||c?.[d];if(p&&typeof p=="function")try{return String(p.call(c,g)??"")}catch{return""}return""}if(f){let h=(f.match(/\.\.\//g)||[]).length,p=a;for(let y=0;y<h;y++){if(!p||!p.parent)return"";p=p.parent}if(g==="parent")return String(p.value??"");let m=Si(p,g);return m!=null&&typeof m=="object"?"":String(m??"")}else{let h=Si(a,g);if(h!=null&&typeof h!="object")return String(h);let p=c?.context?.polyglot;if(p?.translations){let m=a?.root?.lang||a?.lang||c?.context?.state?.lang||p.defaultLang||"en",y=p.translations[m];if(y){let b=Si(y,g);if(b!=null&&typeof b!="object")return String(b);for(let _ in y){let S=y[_];if(S&&typeof S=="object"&&!Array.isArray(S)){let k=Si(S,g);if(k!=null&&typeof k!="object")return String(k)}}}let w=Si(p.translations,g);if(w!=null&&typeof w!="object")return String(w)}return""}})}var xi,Jp,eO,Si,rO,_n,Qp,nO,th,eh,rh,oO,nh,oh,ki=U(()=>{"use strict";xi=(t,e)=>{for(let r of e)if(t.includes(r))return!0;return!1},Jp=(t,e)=>{let r=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(r,"")},eO={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},Si=(t,e)=>e.split(".").reduce((r,n)=>r?.[n],t),rO=(t,e)=>{if(!t||!t.__ref)return!0;let r=t;for(;r;){if(r.allowRuntimeTemplates===!0)return!0;let n=r.__ref&&r.__ref.__authoredTemplates;if(n&&n.has(e))return!0;r=r.parent}return!1};_n=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,Qp=(t,e)=>{let r=t.split(`
|
|
2
|
+
`),n=-1,o=-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,n=f+1,s=r[f].indexOf(e)+1,r[f].includes("{}")){o=n,i=r[f].indexOf("{}")+3;break}let u=r[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{o=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)){o=f+1,i=r[f].lastIndexOf("}")!==-1?r[f].lastIndexOf("}")+2:r[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:n,endLineNumber:o}},nO=/\\([0-7]{1,3})/g,th=t=>t.replace(nO,(e,r)=>String.fromCharCode(parseInt(r,8))),eh=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),rh=t=>t.replace(/\/\/\/\/\/n/g,`
|
|
3
|
+
`).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),oO=/[^a-zA-Z0-9\s]/g,nh=t=>t.replace(oO,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),oh=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var $r,vi,sh,wn,Mr,Fr,ih,Oo,Sn,Ci,ah,xn=U(()=>{"use strict";$r=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"]),vi=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),sh=["ref","parent","__element","__depends","__ref","__children","root"],wn=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"]),Mr=new Set(["update","__element"]),Fr=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"]),ih=t=>Fr.has(t),Oo=new Set(["log","warn","error","verbose"]),Sn=t=>Fr.has(t)&&!Oo.has(t),Ci=new Set(["node","context","extends","__element","__ref",...Fr,...wn,...Mr]),ah=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});function _O(){let t=kn.get(this);return t?t.src.trim():Function.prototype.toString.call(this)}var lS,vn,pt,lh,_t,it,yS,fh,ft,Ai,sO,iO,fS,Ti,aO,cO,lO,zt,bS,fO,Ol,_S,ch,kn,uO,dO,pO,hO,gO,uS,mO,dS,yO,pS,Rl,bO,wO,SO,xO,hS,uh,le,Cn,kO,vO,Jt,wS,SS,xS,kS,vS,CS,ES,Oi,Ri,Ro,En,gS,Ei,mS,An,dh,ph,Pl,hh,gh,Pi,Tn,Ht,Dl,CO,mh,yh,Ll,bh,_h,wh,Sh,xh,kh,vh,Ye=U(()=>{"use strict";hi();Dt();To();ki();mi();xn();lS="production",vn=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,pt=(t,e,r,n)=>{if(R(t))return e?typeof t.call!="function"?t:t.call(e,e,r||e.state,n||e.context):void 0;if(t!=null&&e?.context?.plugins&&(P(t)||v(t)&&!Xt(t))){let o=e.context.plugins;for(let s of o)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return pt(i,e,r,n)}}return t},lh=(t,e,r)=>{for(let n in e)t[n]=pt(e[n],r)},_t=(t,e,r=[])=>{let n=r instanceof Set;for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(vn(o)||(n?r.has(o):r.includes(o))||t[o]===void 0&&(t[o]=e[o]));return t},it=(t,e,r=Ci)=>yS(t,e,r,null),yS=(t,e,r,n)=>{if(t===e)return t;if(n){for(let s=0;s<n.length;s+=2)if(n[s]===t&&n[s+1]===e)return t}let o=r instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||vn(s)||s==="constructor"||s==="prototype"||(o?r.has(s):r.includes(s)))continue;let i=t[s],a=e[s];if(B(i)&&B(a)){let c=n||[];c.push(t,e),yS(i,a,r,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},fh=(t,e=[])=>{let r=e instanceof Set,n={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(vn(o)||(r?e.has(o):e.includes(o))||(n[o]=t[o]));return n},ft=(t,e={})=>{let{exclude:r=[],cleanUndefined:n=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!B(t)||Xt(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=P(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let g in u){if(!Object.prototype.hasOwnProperty.call(u,g)||vn(g)||g==="__proto__"||c(g))continue;let h=u[g];if(!(n&&h===void 0)&&!(o&&h===null)){if(Xt(h)){d[g]=h;continue}if(i&&g==="extends"&&P(h)){d[g]=bi(h,r);continue}if(R(h)){d[g]=h;continue}if(B(h))if(s.has(h))d[g]=s.get(h);else{let p=P(h)?[]:{};s.set(h,p),d[g]=p,f.push([h,p])}else d[g]=h}}}return l},Ai=(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 n=t[r];if(R(n))e[r]=n.toString();else if(v(n))e[r]={},Ai(n,e[r]);else if(P(n)){let o=e[r]=[];for(let s=0;s<n.length;s++){let i=n[s];v(i)?(o[s]={},Ai(i,o[s])):R(i)?o[s]=i.toString():o[s]=i}}else e[r]=n}return e},sO=/^[A-Za-z_$][A-Za-z0-9_$]*$/,iO=t=>`'${String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r").replace(/\n/g,"\\n")}'`,fS=t=>{let e=String(t);return xi(e,[`
|
|
4
|
+
`,"'"])?"`"+e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")+"`":"'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r")+"'"},Ti=(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 n=" ".repeat(e),o=`{
|
|
5
|
+
`;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=sO.test(s)?s:iO(s);if(o+=`${n} ${a}: `,i instanceof RegExp)o+=String(i);else if(P(i)){o+=`[
|
|
6
6
|
`;for(let c of i)c instanceof RegExp?o+=`${n} ${String(c)},
|
|
7
|
-
`:B(c)&&c!==null?o+=`${n} ${
|
|
8
|
-
`:
|
|
7
|
+
`:B(c)&&c!==null?o+=`${n} ${Ti(c,e+2)},
|
|
8
|
+
`:x(c)?o+=`${n} ${fS(c)},
|
|
9
9
|
`:o+=`${n} ${c},
|
|
10
|
-
`;o+=`${n} ]`}else B(i)?o+=
|
|
11
|
-
`}return o+=`${n}}`,o},
|
|
12
|
-
`,s);s=d===-1?c:d;continue}if(u==="/"&&t[s+1]==="*"){let d=t.indexOf("*/",s+2);s=d===-1?c:d+2;continue}if(u==='"'||u==="'"||u==="`"){let d=u;for(s++;s<c;){if(t[s]==="\\"){s+=2;continue}if(t[s]===d){s++;break}if(d==="`"&&t[s]==="$"&&t[s+1]==="{"){s+=2;let g=1;for(;s<c&&g>0;)t[s]==="{"?g++:t[s]==="}"&&g--,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,g=0,
|
|
13
|
-
`)){
|
|
14
|
-
First 200 chars of source: `+String(t).slice(0,200)),t)}},
|
|
15
|
-
First 200 chars of source: `+String(t.src).slice(0,200))),t.fn=r,t.opts=null,r},
|
|
10
|
+
`;o+=`${n} ]`}else B(i)?o+=Ti(i,e+1):x(i)?o+=fS(i):o+=i;o+=`,
|
|
11
|
+
`}return o+=`${n}}`,o},aO=[/^\(\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]*\}$/],cO=/^["[{]/,lO=/^(export|import)\s/,zt=t=>{if(!t)return!1;let e=t.trim();if(e===""||e==="{}"||e==="[]")return!1;let r=e.includes("=>");if(!r&&e.charCodeAt(0)!==40&&!e.startsWith("function")&&!e.startsWith("async")&&!(e.charCodeAt(e.length-1)===125&&e.includes("("))||lO.test(e)||!aO.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0);return!(o===123&&!r||o===91||cO.test(e)&&!r)},bS=t=>(0,eval)(t),fO=(t,e)=>{let r=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(t);if(!r)return null;let n=r[0].length,o=[],s=n,i=1,a=null,c=t.length,l=new RegExp("^(?:const|let|var)\\s+"+e+"\\b");for(;s<c&&i>0;){let u=t[s];if(u==="/"&&t[s+1]==="/"){let d=t.indexOf(`
|
|
12
|
+
`,s);s=d===-1?c:d;continue}if(u==="/"&&t[s+1]==="*"){let d=t.indexOf("*/",s+2);s=d===-1?c:d+2;continue}if(u==='"'||u==="'"||u==="`"){let d=u;for(s++;s<c;){if(t[s]==="\\"){s+=2;continue}if(t[s]===d){s++;break}if(d==="`"&&t[s]==="$"&&t[s+1]==="{"){s+=2;let g=1;for(;s<c&&g>0;)t[s]==="{"?g++:t[s]==="}"&&g--,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,g=0,h=s;for(;h<c;){let p=t[h];if(p==='"'||p==="'"||p==="`"){let m=p;for(h++;h<c;){if(t[h]==="\\"){h+=2;continue}if(t[h]===m){h++;break}h++}continue}if(p==="("||p==="["||p==="{"){g++,h++;continue}if(p===")"||p==="]"||p==="}"){if(g===0)break;g--,h++;continue}if(g===0&&(p===";"||p===`
|
|
13
|
+
`)){h++;break}h++}o.push([d,h]),s=h;continue}s++}if(!o.length)return null;let f=t;for(let u=o.length-1;u>=0;u--)f=f.slice(0,o[u][0])+f.slice(o[u][1]);return f},Ol=(t,e,r,n)=>{let o=String(t).trimStart();if(/^(export|import)\s/.test(o))return t;try{return r.window.eval(`(${t})`)}catch(s){let i=s&&s.message?s.message:String(s),a=/await is only valid in async/.test(i),c=/Identifier '([^']+)' has already been declared/.exec(i),l=null;if(a){let f=String(t).trim();if(/^function[\s(]/.test(f))try{l=r.window.eval("(async "+f+")")}catch{}}else if(c){let f=String(t),u=c[1];for(let d=0;d<5;d++){let g=fO(f,u);if(!g||g===f)break;f=g;try{l=r.window.eval("("+f+")");break}catch(h){let p=/Identifier '([^']+)' has already been declared/.exec(h&&h.message||String(h));if(!p||p[1]!==u)break}}}if(!l&&/Unexpected (token '\{'|identifier)/.test(i))try{let f=r.window.eval("({"+t+"})");if(f&&typeof f=="object"){let u=Object.keys(f);u.length===1&&typeof f[u[0]]=="function"&&(l=f[u[0]])}}catch{}return l||(typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: eval failed on ${e} \u2014 `+(n?"revived lazily, so its source compiled on this first use; it acts as the string it replaces (a call returns the source text, el.call treats it as not callable). Reason: ":"value will be left as a string. Reason: ")+i+`.
|
|
14
|
+
First 200 chars of source: `+String(t).slice(0,200)),t)}},_S=1,ch=2,kn=new WeakMap,uO=/^(async\s+)?function(?![\w$])\s*(\*)?\s*([A-Za-z_$][\w$]*)?\s*\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*\{/,dO=/^(async\s+)?[A-Za-z_$][\w$]*\s*=>/,pO=/^(async\s*)?\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*=>/,hO=/^(async\s+)?([A-Za-z_$][\w$]*)\s*\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*\{/,gO=new Set(["if","for","while","switch","catch","with","do","return","typeof","void","delete","new","in","of","instanceof","function","class","const","let","var","await","yield","import","export","try","else","throw","case","default","break","continue","debugger","finally","super","this","null","true","false","async","get","set","static"]),uS=t=>t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===36||t===95,mO=(t,e,r)=>{let n=t.indexOf(e,r);for(;n!==-1;){let o=n+e.length;if((n===0||!uS(t.charCodeAt(n-1)))&&(o>=t.length||!uS(t.charCodeAt(o))))return!0;n=t.indexOf(e,o)}return!1},dS=t=>{let e=t.length-1;for(;e>=0&&t.charCodeAt(e)<=32;)e--;return e<0?-1:t.charCodeAt(e)},yO=t=>{let e=t,r=0;for(;r<e.length&&e.charCodeAt(r)<=32;)r++;r&&(e=e.slice(r));let n=uO.exec(e);if(n){if(n[2]||dS(e)!==125)return null;let o=n[3]||"";return o&&mO(e,o,n[0].indexOf("("))||e.indexOf("arguments.callee")!==-1?null:{src:t,name:o,kind:n[1]?ch:_S,async:!!n[1],fn:void 0}}return n=dO.exec(e)||pO.exec(e),n?{src:t,name:"",kind:ch,async:!!n[1],fn:void 0}:(n=hO.exec(e),n&&!gO.has(n[2])&&dS(e)===125?e.indexOf("arguments.callee")!==-1?null:{src:t,name:n[2],kind:ch,async:!!n[1],fn:void 0}:null)},pS=t=>t.index===-1?`"${t.key}"`:`array index ${t.index} (prop "${t.key}")`,Rl=t=>{let e=Ol(t.src,pS(t),t.opts,!0),r=null;return typeof e=="function"?r=e:(t.value=e,typeof e!="string"&&typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: ${pS(t)} did not evaluate to a function \u2014 the lazily revived function returns that value.
|
|
15
|
+
First 200 chars of source: `+String(t.src).slice(0,200))),t.fn=r,t.opts=null,r},bO=(t,e,r)=>Reflect.construct(t,e,r);wO={length:{get(){let t=kn.get(this);if(!t)return 0;let e=t.fn===void 0?Rl(t):t.fn;return e?e.length:0},configurable:!0},name:{get(){let t=kn.get(this);return t?t.name:""},configurable:!0},toString:{value:_O,writable:!0,configurable:!0}},SO=Object.getPrototypeOf(async function(){}),xO=t=>{let e;return t.kind===_S?e=function(){let r=t.fn===void 0?Rl(t):t.fn;return r===null?t.value:new.target?bO(r,arguments,new.target):r.apply(this,arguments)}:e={lazy(){let r=t.fn===void 0?Rl(t):t.fn;return r===null?t.value:r.apply(this,arguments)}}.lazy,kn.set(e,t),Object.defineProperties(e,wO),t.async&&Object.setPrototypeOf(e,SO),e},hS=(t,e,r,n)=>{let o=yO(t);return o?(o.key=e,o.index=r,o.opts=n,xO(o)):Ol(t,r===-1?`"${e}"`:`array index ${r} (prop "${e}")`,n)},uh=t=>typeof t=="function"&&kn.has(t),le=t=>{let e=kn.get(t);return e?e.src.trim():Function.prototype.toString.call(t)},Cn=t=>{let e=typeof t=="function"?kn.get(t):void 0;return e?(e.fn===void 0?Rl(e):e.fn)===null:!1},kO=new Set(["components","pages","functions","methods","snippets","app","globalScope"]),vO={window:{eval:bS}},Jt=(t,e={},r=vO)=>{if(!t||typeof t!="object")return e;(!r||!r.window||typeof r.window.eval!="function")&&(r={...r,window:{eval:bS}});let n=r.lazy===!0,o=r.lazy==="context",s=(a,c,l)=>n||o&&(a===t?kO.has(c):l),i=[[t,e,n]];for(;i.length;){let[a,c,l]=i.pop();for(let f in a){if(!Object.prototype.hasOwnProperty.call(a,f))continue;let u=a[f];if(x(u))zt(u)?c[f]=l?hS(u,f,-1,r):Ol(u,`"${f}"`,r):c[f]=u;else if(P(u)){let d=c[f]=[],g=s(a,f,l);for(let h=0;h<u.length;h++){let p=u[h];if(x(p))d.push(zt(p)?g?hS(p,f,h,r):Ol(p,`array index ${h} (prop "${f}")`,r):p);else if(v(p)){let m=mS(p);if(m!==null)d.push(m);else{let y={};d.push(y),i.push([p,y,g])}}else d.push(p)}}else if(v(u)){let d=mS(u);if(d!==null){c[f]=d;continue}let g=c[f]&&typeof c[f]=="object"&&!P(c[f])?c[f]:c[f]={};i.push([u,g,s(a,f,l)])}else c[f]=u}}return Ro(e)},wS="Set",SS="Map",xS="RegExp",kS="WeakMap",vS="WeakSet",CS="String",ES=t=>{if(!t||typeof t!="object"||t.__type!==CS||!x(t.value))return!1;let e=Object.keys(t);return e.length===2&&e.includes("value")},Oi=ES,Ri=Symbol.for("smbls.revived"),Ro=t=>{if(t&&typeof t=="object")try{t[Ri]=!0}catch{}return t},En=t=>!!(t&&typeof t=="object"&&t[Ri]===!0),gS=t=>{let e=Object.keys(t);return e.length===1&&e[0]==="__type"},Ei=(t,e)=>{if(!t||typeof t!="object")return t;if(ES(t))return t.value;let r=s=>Ei(s,e||(e=new WeakMap));if(t.__type===wS&&P(t.values))return new Set(t.values.map(r));if(t.__type===SS&&P(t.entries))return new Map(t.entries.map(s=>P(s)?[r(s[0]),r(s[1])]:s));if(t.__type===kS&&gS(t))return new WeakMap;if(t.__type===vS&&gS(t))return new WeakSet;if(t.__type===xS&&x(t.source))try{return new RegExp(t.source,x(t.flags)?t.flags:"")}catch{return t}if(e||(e=new WeakMap),e.has(t))return e.get(t);let n=!1;if(P(t)){let s=new Array(t.length);e.set(t,s);for(let i=0;i<t.length;i++)s[i]=Ei(t[i],e),s[i]!==t[i]&&(n=!0);return n||e.set(t,t),n?s:t}let o={};e.set(t,o);for(let s of Object.keys(t))o[s]=Ei(t[s],e),o[s]!==t[s]&&(n=!0);return n||e.set(t,t),n?o:t},mS=t=>{if(!t||typeof t!="object")return null;let e=t.__type;if(e!==xS&&e!==wS&&e!==SS&&e!==kS&&e!==vS&&e!==CS)return null;let r=Ei(t);return r===t?null:r},An=t=>{if(!t||typeof t!="object")return t;let e={},r=[];for(let i of Object.keys(t)){let a=t[i];x(a)&&zt(a)?r.push([i,a]):e[i]=Ei(a)}if(r.length===0)return e;let n=i=>/^[A-Za-z_$][\w$]*$/.test(i),o=r.filter(([i])=>n(i)),s=Object.keys(e).filter(n).map(i=>`var ${i} = __gs__[${JSON.stringify(i)}];`).join(`
|
|
16
16
|
`);try{let i=o.map(([l,f])=>`var ${l} = (${f});`).join(`
|
|
17
17
|
`),a="{ "+o.map(([l])=>`${JSON.stringify(l)}: ${l}`).join(", ")+" }",c=C.eval(`(function(__gs__) { ${s}
|
|
18
18
|
${i}
|
|
19
19
|
return ${a}; })`)(e);Object.assign(e,c)}catch{for(let[a,c]of o)try{let l=Object.keys(e).filter(n).map(f=>`var ${f} = __gs__[${JSON.stringify(f)}];`).join(`
|
|
20
20
|
`);e[a]=C.eval(`(function(__gs__) { ${l}
|
|
21
|
-
return (${c}); })`)(e)}catch{try{e[a]=C.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of r)if(!n(i))try{e[i]=C.eval(`(${a})`)}catch{e[i]=a}return e},ch=(t,e={verbose:!0})=>{try{return t?C.eval("("+t+")"):{}}catch(r){e.verbose&&console.warn(r)}},lh=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),Al=t=>{for(let e in t)return!1;return!0},fh=t=>v(t)&&Al(t),uh=()=>Object.create(null),Ti=(t,e,r={})=>{let n=r.exclude||[],o=r.preventUnderscore;for(let s in e)n.includes(s)||!o&&kn(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},En=(t,e,r=[])=>{let n=r instanceof Set;for(let o in e)kn(o)||o==="constructor"||o==="prototype"||(n?r.has(o):r.includes(o))||(t[o]=e[o]);return t},zt=(t,e,r={},n=new WeakMap)=>{if(!B(t)||!B(e)||Yt(t)||Yt(e))return e;if(n.has(t))return n.get(t);n.set(t,t);let o=r.exclude,s=o?o instanceof Set?o:new Set(o):null,i=!r.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&kn(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];Yt(l)?t[a]=l:B(c)&&B(l)?t[a]=zt(c,l,r,n):l!==void 0&&(t[a]=l)}return t},Tl=(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 n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(let s=0;s<n.length;s++){let i=n[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!Tl(t[i],e[i],r))return!1}return!0},aO=new Set(["node","__ref"]),dh=(t,e,r=aO)=>{if(t===e)return!0;if(!B(t)||!B(e)||Yt(t)||Yt(e))return t===e;let n=r instanceof Set?r:new Set(r),o=new WeakSet;function s(i,a){if(o.has(a))return!0;o.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||n.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(Yt(l)||Yt(f)){if(l!==f)return!1}else if(B(l)&&B(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},ph=(t,e)=>{if(e==null)return t;if(Xt(e)("string","number"))delete t[e];else if(P(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},Ol=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]=Ol(t[r]));return e},hh=(t,e)=>{if(t.length===0)return e;let r={},n=r;for(let o=0;o<t.length;o++)o===t.length-1&&e?n[t[o]]=e:(n[t[o]]={},n=n[t[o]]);return r},gh=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length-1;o++){if(r[e[o]]===void 0)return;r=r[e[o]]}let n=e[e.length-1];r&&Object.prototype.hasOwnProperty.call(r,n)&&delete r[n]},mh=(t,e,r)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let o=0;o<e.length-1;o++)(!n[e[o]]||typeof n[e[o]]!="object")&&(n[e[o]]={}),n=n[e[o]];return n[e[e.length-1]]=r,t},yh=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let n=0;n<e.length;n++){if(r==null)return;r=r[e[n]]}return r},bh=t=>{let r=[],n=0;for(let o=0;o<t.length;o++)if(r.length<2)r.push(t[o]);else if(t[o]===r[o%2]?n++:(r=[t[o-1],t[o]],n=1),n>=20)return(rw==="test"||rw==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},_h=t=>{let e=new WeakSet;function r(n){if(n&&typeof n=="object"){if(e.has(n))return!0;e.add(n);for(let o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&r(n[o]))return console.log(n,"cycle at "+o),!0}return!1}return r(t)},xh=(t,e)=>{let r=e instanceof Set?e:new Set(e),n={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&!r.has(o)&&(n[o]=t[o]);return n}});var Oi,Ri,Pi,Rl=U(()=>{"use strict";pr();Oi=(function(){let t=0;function e(){return t++,t}return e})(),Ri=Oi,Pi=(t,e,r)=>(pt(r,t)||r||t.key||Oi()).toString()});var Ie,wh,Nr,Pl,Sh,kh,vh,jr,Ch,An,mt,Dl=U(()=>{"use strict";Ie="production",wh=Ie,Nr=(t=Ie)=>t==="production",Pl=(t=Ie)=>t==="testing"||t==="test",Sh=Pl,kh=(t=Ie)=>t==="staging",vh=(t=Ie)=>t==="local",jr=(t=Ie)=>t==="development"||t==="dev"||t==="local",Ch=(t,e=Ie)=>e[t],An=(t=Ie)=>!Nr(t),mt=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 Di(t,e,r){let n;return function(){let o=this,s=arguments,i=function(){n=null,r||t.apply(o,s)},a=r&&!n;clearTimeout(n),n=setTimeout(i,e),a&&t.apply(o,s)}}function Th(t,e=window){let r=function(){return t.apply(e,arguments)};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var Eh,Ah,cO,To,Oo,Ro,Ot,Tn=U(()=>{"use strict";Eh=(t,e,r=300)=>{let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(t,o)},r)}},Ah=t=>{let e={};return(...r)=>{let n=r[0];if(n in e)return e[n];{let o=t(n);return e[n]=o,o}}},cO=/^\s*(?:async\s+)?(?:function\b|\([^)]*\)\s*=>|[a-zA-Z_$][\w$]*\s*=>)/,To=t=>cO.test(t),Oo=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let r of e)if(r.resolveHandler)return!0;return!1},Ro=(t,e)=>{if(typeof t=="function")return t;let r=e?.context?.plugins;if(!r)return t;for(let n of r)if(n.resolveHandler){let o=n.resolveHandler(t,e);if(typeof o=="function")return o}return t},Ot=(t,e,...r)=>{let n=e?.context?.plugins;if(!n)return!1;let o=!1;for(let s of n)typeof s[t]=="function"&&(s[t](e,...r),o=!0);return o}});var Oh,xw=U(()=>{"use strict";Dt();pr();Oh=(t,e)=>{let{__ref:r}=t,n=t.if;if(R(n)){let o;try{o=n(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete r.__if;return}o?r.__if=!0:delete r.__if}else n!=null&&typeof n=="object"?pt(n,t)?r.__if=!0:delete r.__if:r.__if=!0}});var Rh,Ph,ww=U(()=>{"use strict";Rh=(t,...e)=>{t&&e.map(r=>console.log(r))},Ph=(t,e,...r)=>{t&&(console.group(e),r.map(n=>console.log(n)),console.groupEnd(e))}});function Mh(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 Fh(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 Dh,Lh,Ih,$h,Sw=U(()=>{"use strict";Dt();ui();Dh=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),Lh=(t,e,r=365)=>{if(Pt(nt)||Pt(nt.cookie))return;let n=new Date;n.setTime(n.getTime()+r*24*60*60*1e3);let o=`expires=${n.toUTCString()}`;nt.cookie=`${t}=${e};${o};path=/`},Ih=t=>{if(Pt(nt)||Pt(nt.cookie))return;let e=`${t}=`,n=decodeURIComponent(nt.cookie).split(";");for(let o=0;o<n.length;o++){let s=n[o];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},$h=t=>{Pt(nt)||Pt(nt.cookie)||(nt.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var Po,kw,Nh,jh=U(()=>{"use strict";Po={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"])},kw=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"]),Nh=t=>Po.body.has(t)});var Bh,vw,Do,ye,Lo,$i,Ye,Vh,Ll,Mi,Uh,Fi,Il,$l,Ni,Ml,Io,lO,Xe,Cw,Li,ji,zh,Ii,Hh,Wh,Fl,Nl,jl,Bl,Vl,Ul,Ew,zl=U(()=>{"use strict";Co();qh();pr();Dt();Bh="production",vw=t=>t.sourcemap!==!1&&Bh!=="production",Do=t=>{if(!t)return[];let e=[],r=t.extends;r&&(P(r)?e.push(...r):e.push(r));let n=t.extend;return n&&(P(n)?e.push(...n):e.push(n)),e},ye=t=>{if(!P(t))return t;let e=[];for(let r=t.length-1;r>=0;r--){let n=t[r];e.push(P(n)?ye(n):n)}return e},Lo=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]},$i=(t,e,r)=>{let n=[],o=Lo(r);o&&(n=[...o]);let s=ye(Do(t));return s.length&&(n=[...n,...s]),n},Ye=(t,e)=>{let{__ref:r}=e,{__extends:n}=r;if(!t)return n;let o=e.variant,s=e.context;if(o&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${o}`;s.components[i]&&(t=i)}return n.includes(t)||(n=Array.isArray(t)?[...n,...t]:[...n,t],r.__extends=n),n},Vh=(t,e)=>{if(!t)return e;let{extends:r}=e,n=P(r)?r:[r],o=P(t)?t:[t];return{...e,extends:ko(o,n)}},Ll=()=>Math.random().toString(36).substring(2),Mi={},Uh={},Fi=t=>Mi[t.__hash],Il=(t,e)=>{let r=Ll();return k(t)||(t.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(Mi[r]=e),e},$l=(t,e)=>t.__hash?e.concat(Fi(t)):Il(t,e),Ni=(t,e,r,n=new Set,o,s)=>{for(let i of t)P(i)?Ni(i,e,r,n,o,s):Io(i,e,r,n,o,void 0,s);return e},Ml=(t,e,r,n=new Set,o,s,i)=>{let a=Do(t),c={...t};delete c.extends,delete c.extend;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),o&&o.push(s)),a.length&&Io(ye(a),e,r,n,o,s,i),e},Io=(t,e,r,n=new Set,o,s,i)=>{if(!t||n.has(t))return e;if(P(t))return Ni(t,e,r,n,o,i);let a=s;return k(t)?(a=t,t=ji(t,r)):i&&v(t)&&i.has(t)&&(a=i.get(t)),n.has(t)||(n.add(t),t?.extends||t?.extend?Ml(t,e,r,n,o,a,i):t&&(e.push(t),o&&o.push(a))),e},lO=new Set(["parent","node","__ref","__proto__","extends","extend","childExtends","childExtendsRecursive"]),Xe=(t,e,r,n,o)=>{e=ft(e);for(let s in e){if(lO.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&&n?v(a)&&!P(a)?(r[s]=r[s]||{},Cw(r[s],a,n)):r[s]=n:r&&o?.[s]&&(r[s]=o[s]);else if(v(i)&&v(a)){let c=r?r[s]=r[s]||{}:void 0,l=o?.[s];Ze(s)?t[s]=Xe(i,a,c,n,l):Xe(i,a,c,n,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(P(i)&&P(a))t[s]=i.concat(a);else if(P(i)&&v(a)){let c=Xe({},i);t[s]=Xe(c,a)}}}}return t},Cw=(t,e,r,n)=>{if(n||(n=new WeakSet),!n.has(e)){n.add(e);for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||o==="__proto__"||o==="constructor"||o==="prototype")continue;let s=e[o];v(s)&&!P(s)?(t[o]=t[o]||{},Cw(t[o],s,r,n)):t[o]=r}}},Li=(t,e,r)=>t.reduce((n,o,s)=>{let i=ft(o),a=r?r[s]:void 0;return Xe(n,i,e,a)},{}),ji=(t,e,r={},n)=>{let o=e?.components||r.components,s=e?.pages||r.pages;if(k(t)){let i=o&&(o[t+"."+n]||o[t]||o["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;r.verbose&&(Bh==="test"||Bh==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},zh=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),Ii=(t,e,r,n)=>{if(!t)return[];if(t.__hash)return Fi(t)||[];let s=Io(t,[],e,new Set,r,void 0,n);return r?s:$l(t,s)},Hh=(t,e)=>{if(!t)return e;let r=P(t)?t:[t];return ko(r,e)},Wh=t=>{let e=[];function r(n){for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&(Ze(o)&&e.push(o),o==="extends"&&(typeof n[o]=="string"?e.push(n[o]):Array.isArray(n[o])&&(e=e.concat(n[o]))),typeof n[o]=="object"&&n[o]!==null&&r(n[o]))}return r(t),e},Fl=(t,e,r={})=>{let{__ref:n}=t,o=t.context||e.context,s=t.variant,i=Do(t);if(i.length){let a=ye(i),[c,...l]=a,f=typeof c=="string"&&s&&o?.components?`${c}.${s}`:null;f&&o.components[f]?Ye([f,...l],t):Ye(a,t)}return Nl(t,e,r),jl(t,e,r),Bl(t,e,r),t.component&&Ye(ye(pt(t.component,t)),t),o.defaultExtends&&Ye(ye(o.defaultExtends),t),vo(n.__extends)},Nl=(t,e,r={})=>{let{__ref:n}=t;return r.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&Ye(ye(e.childProps.extends),t),n.__extends},jl=(t,e,r={})=>{let{__ref:n}=t,o=r.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!o&&s&&Ye(ye(s),t),n.__extends},Bl=(t,e,r={})=>{let{__ref:n}=t,o=e.childExtendsRecursive,s=r.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return o&&!i&&!s&&Ye(ye(o),t),n.__extends},Vl=(t,e,r={})=>{let{__ref:n}=t,o=t.context||e.context,s=t.variant,i=vw(r),a=i?[...n.__extends]:null,c=vo(n.__extends.map((l,f)=>ji(l,o,r,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let g=c[d],p=a[d];g&&v(g)&&k(p)&&l.set(g,p)}let f=[],u=Ii(c,o,f,l);n.__extendsStack=u,n.__extendsNames=f}else{let l=Ii(c,o);n.__extendsStack=l}return n.__extendsStack},Ul=(t,e,r={})=>{let{__ref:n}=t,{__extendsStack:o}=n;if(vw(r)){let s={},i=n.__extendsNames||[],a=Li(o,s,i),c={};Xe(t,a,c,void 0,s),n.__sourcemap=c}else{let s=Li(o);Xe(t,s)}return t},Ew=(t,e,r={})=>(Fl(t,e,r),Vl(t,e,r),Ul(t,e,r),t)});function Kh(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function Gh(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function Yh(t,e,r){let{context:n}=e||{},[o]=Lo(r),s=r||o;return n?.components?.[s]||n?.pages?.[s]}var Ze,qh=U(()=>{"use strict";zl();Dt();Ze=t=>{if(!k(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function Aw(t,e){let{props:r,on:n}=e,o=bn(t.split("on")[1]),s=n[o],i=r[t];R(s)?n[o]=(...a)=>{if(s(...a)!==!1&&R(i))return i(...a)}:n[o]=i}var Tw=U(()=>{"use strict";xi();Dt()});function Hl(t,e={}){let r=e.cachedKeys||[];for(let n in t){let o=t[n];if(n.length>2&&n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n[2]===n[2].toUpperCase()&&(R(o)||o!=null&&Oo(this.context))){let p=bn(n.slice(2));t.on&&(t.on[p]=o),delete t[n];continue}if(n==="childProps"){t.props[n]=o,delete t[n],r.push(n);continue}let a=this.define?.[n],c=this.context?.define?.[n],l=v(a)||R(a),f=v(c)||R(c);if(l||f)continue;let u=n.charAt(0);if(Rw.has(u)){t.props[n]=o,delete t[n],r.push(n);continue}let d=Xh.test(n)||Ow.test(n)||uO(o),g=$r.has(n);!d&&!g&&(n in t.props||(t.props[n]=o),delete t[n],r.push(n))}return t}function Wl(t=this,e){let r=e.cachedKeys||[];for(let n in t.props){let o=t.props[n],s=n.length>2&&n.charCodeAt(0)===111&&n.charCodeAt(1)===110,i=R(o)||o!=null&&Oo(this.context);if(s&&i){Aw(n,t),delete t.props[n];continue}if(r.includes(n)||n==="childProps")continue;let a=n.charAt(0);if(Rw.has(a))continue;let c=this.define?.[n],l=this.context?.define?.[n],f=v(c)||R(c),u=v(l)||R(l),d=Xh.test(n)||Ow.test(n),g=$r.has(n);(d||g||f||u)&&(t[n]===void 0||o===null)&&(t[n]=o,t.props&&delete t.props[n])}return t}function ql(t=this){let e=[];return Hl.call(this,t,{cachedKeys:e}),Wl.call(this,t,{cachedKeys:e}),t}function Zh(t={}){return t.on||(t.on={}),t.props||(t.props={}),ql.call(this,t)}function Qh(t,e){this.__element.update({props:t},e)}function Hi(t){let e={update:Qh.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var Xh,Ow,Rw,fO,uO,Ui,Bi,Jh,zi,Wi,qi,Kl,Vi,tg,eg,rg=U(()=>{"use strict";wn();Tw();pr();Dt();xi();Tn();Xh=/^[A-Z]/,Ow=/^\d+$/,Rw=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),fO=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),uO=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(fO.has(e)||Xh.test(e))return!0;return!1},Ui=(t,e,r)=>{let{props:n,__ref:o}=t;if(o.__propsStack=[],n)o.__initialProps=n;else return{};return B(n)?{...n}:(o.__propsStack.push(n),{})};Bi=t=>Xt(t)("string","number")?{inheritedString:t}:t,Jh=(t,e)=>!t||!e.length?!1:e.includes(t),zi=(t,e)=>{let{__ref:r}=t,n=r.__propsStack||[],o=e.props;if(!o)return n;let s=o[t.key],i=o.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=Bi(i);n.unshift(c)}if(s){let c=Bi(s);n.unshift(c)}return n};Wi=t=>{let e=new Set;return t.filter(r=>!r||Mr.has(r)||e.has(r)?!1:(e.add(r),!0))},qi=(t,e,r)=>(e.props=t.reduce((n,o)=>{if(Mr.has(o))return n;for(;R(o);)o=pt(o,e);return it(n,ft(o,{exclude:Mr}))},{}),Hi(e),e.props),Kl=(t,e)=>{let{props:r,__ref:n}=t,o=n.__propsStack||[];if(e?.props&&(o=[...zi(t,e)]),v(r)?o.push(r):r==="inherit"&&e?.props?o.push(e.props):r&&o.push(r),P(n.__extendsStack))for(let s=0;s<n.__extendsStack.length;s++){let i=n.__extendsStack[s];i.props&&i.props!==r&&o.push(i.props)}return n.__propsStack=Wi(o),n.__propsStack},Vi=(t,e)=>{let{__ref:r}=t,n=Kl(t,e);n.length?qi(n,t):(r.__propsStack=[],t.props={})},tg=function(t,e,r){let{__ref:n}=t;if(n.__if)Vi(t,e);else try{Vi(t,e)}catch(o){t.context?.designSystem?.verbose&&console.warn("initProps error at",n.path?.join("."),o),t.props={},n.__propsStack=[]}return Hi(t),t},eg=(t,e,r)=>{let{__ref:n}=e,s=[...n.__propsStack||[]],i=zi(e,r);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),n.__propsStack=Wi(s),n.__propsStack.length&&qi(n.__propsStack,e),e}});var Pw,Gl,Yl,Xl,Zl,ng,Jl,Ql,tf,og,Dw=U(()=>{"use strict";zl();Rl();pi();rg();jh();Dt();Pw="production",Gl=(t,e,r)=>{let n=e.childExtends&&e.childExtends.tag,o=e.childProps&&e.childProps.tag,s=Po.body.has(r)&&r;return{text:t,tag:n||o||s||"string"}},Yl=(t,e,r)=>{if(t===void 0)return(Pw==="test"||Pw==="development")&&console.warn(r,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:Xt(t)("string","number")?Gl(t,e,r):R(t)?{props:t}:t},Xl=(t,e)=>{let r={};return r.origin=t,r.parent=e,r},Zl=(t,e,r,n,o)=>{if(!e)return o;if(dr(e)){let s={key:":root",node:e};return o[`${r}_parent`]=s,s}return e},ng=(t,e)=>{let{__ref:r}=t,{__ref:n}=e,o=e&&e.key===":root";r?.root||(r.root=o?t:n?.root)},Jl=(t,e,r)=>{let{__ref:n}=e;return n||(n=e.ref={}),n.path||(n.path=[]),n.path.concat(r)},Ql=(t,e,r,n,o)=>(n.context&&!o.context&&!t.context&&(o.context=n.context),n.context||e.context||o.context||t.context),tf=(t,e,r)=>{let n=Xl(t,e);return t.__ref=n,n.__defineCache||(n.__defineCache={}),n.__exec||(n.__exec={}),n.__execProps||(n.__execProps={}),n.__class||(n.__class={}),n.__classNames||(n.__classNames={}),n.__attr||(n.__attr={}),n.__changes||(n.__changes=[]),n.__children||(n.__children=[]),n.__extends=$i(t,e,r),n.path=Jl(t,e,r),n},og=(t,e,r,n,o)=>{let i=t?.__hash?{extends:[t]}:Yl(t,e,r);if(!i)return;let a=Zl(i,e,r,n,o),c=Pi(i,a,r);tf(i,a,c);let l=Ui(i,a,c),f=Ql(i,a,c,n,o),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var sg,ef,rf,nf,of,ig,sf,ag,cg,lg,fg,Lw,$o,On,Iw,$w,Mw,Ki,Je,Fw=U(()=>{"use strict";Co();wn();pr();Dt();sg=t=>{let{state:e,props:r,__ref:n}=t,o=r?.state||e;return Xt(o)("string","number")?(n.__state=o,{value:o}):o===!0?(n.__state=t.key,{}):o?(n.__hasRootState=!0,o):!1},ef=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},rf=(t,e)=>{if(!t.includes("../"))return;let n=t.split("../").length-1;for(let o=0;o<n;o++){if(!e.parent)return null;e=e.parent}return e},nf=(t,e,r={})=>{let n=k(t)?t.split("/"):[t],o=n.length-1;for(let s=0;s<o;s++){let i=n[s],a=n[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]},of=(t,e,r={})=>{let o=t.__ref.__state;if(!sf(t))return;let s=ef(o,e.state),i=e.state;if(s)i=s,o=o.replaceAll("~/","");else{let a=rf(o,e.state);a&&(i=a,o=o.replaceAll("../",""))}if(i)return nf(o,i,r)},ig=(t,e)=>{let r=t.__ref,n=of(t,e);if(n===void 0)return t.state;if(Xt(n)("object","array"))return ft(n);if(Xt(n)("string","number","boolean"))return r.__stateType=typeof n,{value:n};console.warn(r.__state,"is not present. Replacing with",{})},sf=t=>{let{__ref:e}=t,r=e?.__state;return!!(r&&Xt(r)("number","string","boolean"))},ag=function(t){return B(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},cg=(t,e)=>{if(!t)return e||{};let r=t.split("/"),n={},o=n,s=r.length-1;for(let i=0;i<=s;i++)o[r[i]]=i===s?e||{}:{},o=o[r[i]];return n},lg=(t,e)=>{let{__element:r}=e,n=r?.state;if(!n)return;let o=ft(n,_n),s={[t.key]:o},i=v(n.__depends)?{...n.__depends,...s}:s;return Array.isArray(n)?yi(n,{...Object.getPrototypeOf(n),__depends:i}):Object.setPrototypeOf(n,{...Object.getPrototypeOf(n),__depends:i}),o},fg=(t,e,r={})=>{let{overwrite:n}=r;if(!n)return;let o=n==="shallow";if(n==="merge"){it(t,e,_n);return}(o?En:zt)(t,e,_n)},Lw="__polyglotSeededKeys",$o=t=>{if(!v(t))return new Set;let e=t[Lw];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,Lw,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},On=(t,e,r)=>$o(t).has(e)?!0:!v(r)||r[e]===void 0,Iw="__polyglotSeededValues",$w=t=>{if(!v(t))return new Map;let e=t[Iw];if(!(e instanceof Map)){e=new Map;try{Object.defineProperty(t,Iw,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},Mw=t=>{if(t===null||typeof t!="object")return typeof t+":"+String(t);try{return"json:"+JSON.stringify(t)}catch{return null}},Ki=(t,e,r)=>{if(!$o(t).has(e))return!1;let n=$w(t);if(!n.has(e))return!0;let o=v(r)||Array.isArray(r)?r[e]:void 0,s=Mw(o);return s!==null&&s===n.get(e)},Je=(t,e,...r)=>($o(t).add(e),r.length&&$w(t).set(e,Mw(r[0])),e)});var dO,ug,Nw=U(()=>{"use strict";dO=(t,e)=>{let r=e;for(;r;){if(r===t)return!0;r=Object.getPrototypeOf(r)}return!1},ug=(t,e)=>{let{__ref:r}=t,n=t.context||e.context||r.root?.context;n&&!n.globalScope&&(n.globalScope={});let o=e.scope||r.root?.scope,s=n?.globalScope;if(!t.scope)o?t.scope=o:s?t.scope=Object.create(s):t.scope={};else if(typeof t.scope=="object"&&t.scope!==null&&Object.getPrototypeOf(t.scope)===Object.prototype){let i=o||s;i&&!dO(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var jw,af,hr,cf,dg,pg=U(()=>{"use strict";Dt();Tn();jw=(t,e)=>{let r="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[r]},af=(t,e,r,n,o)=>{if(t=Ro(t,e),!!R(t))try{let s=t.call(e,e,r||e.state,n||e.context,o);return s&&typeof s.then=="function"&&s.catch(i=>{e.error=i,i instanceof ReferenceError?console.warn("[DOMQL] Async event warning:",i.message):console.error("[DOMQL] Async event error:",i)}),s}catch(s){if(e.error=s,s instanceof ReferenceError?console.warn("[DOMQL] Event handler warning:",s.message):console.error("[DOMQL] Event handler error:",s),e.context?.strictMode)throw s}},hr=(t,e,r)=>{if(!e)throw new Error("Element is required");Ot(t,e,r);let n=jw(t,e);if(n){let{state:o,context:s}=e;return af(n,e,o,s,r)}},cf=(t,e,r,n,o,s)=>{if(t=Ro(t,r),!!R(t))try{let i=t.call(r,e,r,n||r.state,o||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}},dg=(t,e,r,n)=>{Ot(t,r,e,n);let o=jw(t,r);if(o){let{state:s,context:i}=r;return cf(o,e,r,s,i,n)}}});var hg,Gi,gg=U(()=>{"use strict";hg={},Gi={}});var Hw={};M(Hw,{restAdapter:()=>zw,setup:()=>SO});var pO,Uw,Bw,hO,gO,mO,Vw,gr,yO,bO,_O,mg,xO,wO,SO,zw,Ww=U(()=>{"use strict";pO=(t,e,r)=>{let n=e&&!e.startsWith("/")?"/":"",o=new URL(`${t}${n}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},Uw=t=>Object.prototype.toString.call(t).slice(8,-1),Bw=["auto","json","text","blob","arrayBuffer","stream","response"],hO={json:async t=>{let e=await t.text();return e?JSON.parse(e):null},text:t=>t.text(),blob:t=>t.blob(),arrayBuffer:t=>t.arrayBuffer(),stream:t=>t.body,response:t=>t},gO=t=>{let e=t.headers.get("content-type");return e&&e.includes("json")?t.json():t.text()},mO=async t=>{let e=await t.text(),r=t.headers.get("content-type");if(e&&r&&r.includes("json"))try{return JSON.parse(e)}catch{}return e},Vw=(t,e)=>t?.message||t?.error||e.statusText||`HTTP ${e.status}`,gr=async(t,e,r)=>{let n=r??"auto";if(!Bw.includes(n))throw new TypeError(`@symbo.ls/fetch rest: unknown responseType "${n}" \u2014 use one of: ${Bw.join(", ")}`);let o=await globalThis.fetch(t,e);if(n==="auto"){let s=await gO(o);return{data:s,error:o.ok?null:Vw(s,o),status:o.status}}if(!o.ok){let s=await mO(n==="response"?o.clone():o);return{data:n==="response"?o:s,error:Vw(s,o),status:o.status}}return{data:await hO[n](o),error:null,status:o.status}},yO=["FormData","Blob","File","URLSearchParams","ReadableStream","ArrayBuffer"],bO=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||yO.includes(Uw(t))),_O=t=>Array.isArray(t)?t:typeof t.entries=="function"?t.entries():Object.entries(t),mg=(...t)=>{let e={},r=new Map;for(let n of t)if(n)for(let[o,s]of _O(n)){let i=o.toLowerCase();if(r.has(i)&&delete e[r.get(i)],s==null){r.delete(i);continue}r.set(i,o),e[o]=s}return e},xO={"Content-Type":"application/json"},wO={"Content-Type":void 0},SO=async({url:t,headers:e,auth:r,fetchOptions:n})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return zw(t,e,r,n)},zw=(t,e={},r,n={})=>{let o=r?.token||null,s=()=>o?{Authorization:`Bearer ${o}`}:null,i=u=>mg(e,s(),u),a=u=>({...n,...u}),c=(u,d,g)=>{if(!bO(d))return a({method:u,headers:mg(e,s(),xO,g),body:JSON.stringify(d)});let p={method:u,headers:mg(e,s(),wO,g),body:d};return Uw(d)==="ReadableStream"&&(p.duplex="half"),a(p)},l=(u,d)=>{let g=d||t;if(u&&(u.startsWith("http://")||u.startsWith("https://")))return u;let p=u&&!u.startsWith("/")?"/":"";return`${g}${p}${u||""}`};return{name:"rest",setToken:u=>{o=u},getSession:async()=>{if(!r?.sessionUrl)return o?{token:o}:null;let u=await gr(l(r.sessionUrl,r.baseUrl),a({headers:i()}));return u.error?null:u.data},signIn:async u=>{if(!r?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let d=await gr(l(r.signInUrl,r.baseUrl),c("POST",u));return d.data?.token&&(o=d.data.token),d},signOut:async()=>(r?.signOutUrl&&await gr(l(r.signOutUrl,r.baseUrl),a({method:"POST",headers:i()})),o=null,{error:null}),select:({from:u,params:d,select:g,limit:p,offset:h,order:m,single:y,headers:x,baseUrl:b,responseType:_})=>{let w={...d};return g&&(w.select=g),p&&(w.limit=p),h&&(w.offset=h),y&&(w.single=!0),m&&(typeof m=="string"?w.order=m:Array.isArray(m)?w.order=m.map(S=>`${S.by}:${S.asc===!1?"desc":"asc"}`).join(","):m.by&&(w.order=`${m.by}:${m.asc===!1?"desc":"asc"}`)),gr(pO(b||t,u||"",w),a({headers:i(x)}),_)},rpc:({from:u,params:d,headers:g,baseUrl:p,responseType:h})=>gr(l(`rpc/${u}`,p),c("POST",d,g),h),insert:({from:u,data:d,headers:g,baseUrl:p,responseType:h})=>gr(l(u,p),c("POST",d,g),h),update:({from:u,data:d,params:g,method:p,headers:h,baseUrl:m,responseType:y})=>{let x=g?.id||d?.id,b=x?`${u}/${x}`:u;return gr(l(b,m),c(p||"PATCH",d,h),y)},upsert:({from:u,data:d,params:g,method:p,headers:h,baseUrl:m,responseType:y})=>{let x=g?.id||d?.id,b=x?`${u}/${x}`:u;return gr(l(b,m),c(p||"PUT",d,h),y)},delete:({from:u,params:d,headers:g,baseUrl:p,responseType:h})=>{let m=d?.id,y=m?`${u}/${m}`:u;return gr(l(y,p),a({method:"DELETE",headers:i(g)}),h)}}}});var Kw={};M(Kw,{localAdapter:()=>qw,setup:()=>vO});var lf,kO,vO,qw,Gw=U(()=>{"use strict";lf=(t,e)=>{if(!e)return!0;for(let r in e){let n=e[r];if(n===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(n)){if(!n.includes(t[r]))return!1}else if(typeof n=="object"){for(let o in n)if(o==="gt"&&!(t[r]>n[o])||o==="gte"&&!(t[r]>=n[o])||o==="lt"&&!(t[r]<n[o])||o==="lte"&&!(t[r]<=n[o])||o==="neq"&&t[r]===n[o]||o==="like"&&!String(t[r]).includes(n[o]))return!1}else if(t[r]!==n)return!1}return!0},kO=(t,{order:e,limit:r,offset:n,single:o})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,a=e.asc!==!1;s.sort((c,l)=>c[i]<l[i]?a?-1:1:c[i]>l[i]?a?1:-1:0)}return n&&(s=s.slice(n)),r&&(s=s.slice(0,r)),o?{data:s[0]||null,error:null}:{data:s,error:null}},vO=async({data:t,...e})=>qw(t,e),qw=(t={},e={})=>{let r={},n={},o=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(o)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(o)try{localStorage.setItem(s+f,JSON.stringify(r[f]))}catch{}},c=(f,u,d,g)=>{let p=n[f];if(p)for(let h of p)h(d,g,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...d})=>{let p=i(f).filter(h=>lf(h,u));return kO(p,d)},insert:async({from:f,data:u})=>{let d=i(f),p=(Array.isArray(u)?u:[u]).map(h=>{let m={id:h.id||++l,...h};return d.push(m),m});a(f);for(let h of p)c(f,"INSERT",h,null);return{data:Array.isArray(u)?p:p[0],error:null}},update:async({from:f,data:u,params:d})=>{let g=i(f),p=[];for(let h=0;h<g.length;h++)if(lf(g[h],d)){let m={...g[h]};Object.assign(g[h],u),p.push(g[h]),c(f,"UPDATE",g[h],m)}return a(f),{data:p,error:null}},upsert:async({from:f,data:u,params:d})=>{let g=i(f),p=Array.isArray(u)?u:[u],h=[];for(let m of p){let y=d||(m.id!==void 0?{id:m.id}:null),x=y?g.findIndex(b=>lf(b,y)):-1;if(x>-1){let b={...g[x]};Object.assign(g[x],m),h.push(g[x]),c(f,"UPDATE",g[x],b)}else{let b={id:m.id||++l,...m};g.push(b),h.push(b),c(f,"INSERT",b,null)}}return a(f),{data:Array.isArray(u)?h:h[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),g=[];for(let p=d.length-1;p>=0;p--)lf(d[p],u)&&(g.push(d[p]),d.splice(p,1),c(f,"DELETE",null,g[g.length-1]));return a(f),{data:g,error:null}},subscribe:({from:f,on:u},d)=>{n[f]||(n[f]=[]);let g=(p,h,m)=>{u&&u!=="*"&&u!==m.event||d(p,h,m)};return n[f].push(g),()=>{let p=n[f].indexOf(g);p>-1&&n[f].splice(p,1)}}}}});var mf={};M(mf,{createAdapter:()=>RO,default:()=>jO,executeFetch:()=>ea,fetchPlugin:()=>Eg,initAdapterAuth:()=>hf,parseDuration:()=>Xi,queryClient:()=>NO,registerAdapter:()=>OO,resolveDb:()=>Jw});var CO,EO,ff,Yi,uf,_g,AO,TO,OO,RO,Jw,Xi,Ht,Qw,Mo,tS,ta,Zi,Ji,df,Sg,pf,PO,Yw,yg,eS,rS,Fo,Xw,DO,Zw,gf,xg,kg,hf,vg,be,$e,Qi,Cg,LO,wg,Rn,Qe,Br,IO,$O,MO,bg,FO,ea,NO,Eg,jO,ra=U(()=>{"use strict";L();CO=["select","rpc","insert","update","upsert","delete","subscribe"],EO={rest:()=>Promise.resolve().then(()=>(Ww(),Hw)),local:()=>Promise.resolve().then(()=>(Gw(),Kw))},ff=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),Yi=(()=>{if(typeof globalThis<"u"&&globalThis[ff])return globalThis[ff];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,ff,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[ff]}catch{}return t})(),uf=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),_g=(()=>{if(typeof globalThis<"u"&&globalThis[uf])return globalThis[uf];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,uf,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[uf]}catch{}return t})(),AO=5e3,TO=t=>new Promise(e=>{if(Yi[t])return e(Yi[t]);let r=_g[t]||=[],n=!1,o=()=>{n||(n=!0,e(Yi[t]||null))};r.push(o),setTimeout(o,AO)}),OO=(t,e)=>{Yi[t]=e;let r=_g[t];if(r&&r.length){_g[t]=[];for(let n of r)n()}},RO=t=>{let e={};for(let r of CO)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},Jw=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,n=typeof e=="string"?e:typeof t=="string"?t:null;if(!n)return null;let o=Yi[n]||EO[n];if(!o&&(o=await TO(n),!o))throw new Error(`Unknown db adapter: "${n}". Use registerAdapter() for adapters with optional deps.`);let s=await o();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${n}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(r)},Xi=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]),n=e[2];return n==="ms"?r:n==="s"?r*1e3:n==="m"?r*6e4:n==="h"?r*36e5:0},Ht=new Map,Qw=new Map,Mo=new Map,tS=(t,e,r,n)=>{if(t.cache?.key)return t.cache.key;let{from:o,method:s,infinite:i,page:a}=t,c=r?`${r}:`:"",l=n?`:${n}`:"";return`${o}:${s}:${c}${JSON.stringify(e||"")}${i?":infinite":""}${a?":p"+JSON.stringify(a):""}${l}`},ta=t=>Ht.get(t)||null,Zi=(t,e,r)=>{let n=Ht.get(t),o={data:e,error:r,time:Date.now(),stale:!1};Ht.set(t,o);let s=Qw.get(t);if(s)for(let i of s)R(i)&&i(o);return o},Ji=t=>{if(t){let e=Ht.get(t);e&&(e.stale=!0);return}for(let[,e]of Ht)e.stale=!0},df=t=>{if(t){Ht.delete(t);return}Ht.clear()},Sg=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)}:k(t)?{staleTime:Xi(t),gcTime:3e5}:{staleTime:Xi(t.stale||t.staleTime)||6e4,gcTime:Xi(t.gc||t.gcTime||t.expire)||3e5,key:t.key},pf=null,PO=()=>{pf||(pf=setInterval(()=>{let t=Date.now();for(let[e,r]of Ht){let n=Qw.get(e);!(n&&n.size>0)&&t-r.time>(r.gcTime||3e5)&&Ht.delete(e)}},3e4),pf.unref&&pf.unref())};PO();Yw=3,yg=t=>Math.min(1e3*2**t,3e4),eS=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:Yw,delay:yg}:typeof e=="number"?{count:e,delay:yg}:{count:e.count??Yw,delay:R(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:yg}},rS=async(t,e)=>{let{count:r,delay:n}=e,o;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(o=i.error,s<r){let a=R(n)?n(s,o):n;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(o=i,s<r){let a=R(n)?n(s,i):n;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:o}},Fo={focus:new Set,online:new Set},Xw=!1,DO=()=>{if(Xw||typeof window>"u")return;Xw=!0;let t=()=>{for(let r of Fo.focus)r()},e=()=>{for(let r of Fo.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},Zw=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(k(t))return{from:t,method:"select",query:!0,on:"create"};if(v(t)){let n={...t};return n.from=n.from||r.__state||e.key,n.method=n.method||"select",n.on=n.on||"create",n.query===void 0&&(n.query=!0),n}return null},gf=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},xg=(t,e)=>{let n=(t?.state?.root||e?.state?.root)?.__fetchScope;return n?String(n):void 0},kg=(t,e,r)=>{let n;if(!t)n=void 0;else if(R(t))n=t(e,e.state);else{n={};for(let o in t){let s=t[o];n[o]=R(s)?s(e,e.state):s}}return n},hf=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(n,o)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:n,session:o,loading:!1}})};try{let n=await t.getSession();r(n?.user||null,n)}catch(n){console.warn("[fetch] Failed to restore auth session:",n.message)}t.onAuthStateChange&&t.onAuthStateChange((n,o)=>{r(o?.user||null,o)})},vg=async(t,e)=>{if(R(t.select))return t.auth!==!1&&await hf(t,e),t;if(t.__resolved)return t.auth!==!1&&await hf(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=Jw(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 hf(r,e),r):null},be=(t,e,...r)=>{let n=R(t[e])?t[e]:null;n&&n.call(t,...r,t,t.state,t.context)},$e=(t,e,r,...n)=>{let o=t&&R(t[r])?t[r]:null;o&&o.call(e,...n,e,e.state,e.context)},Qi=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let o=new FormData(r);for(let[s,i]of o.entries())e[s]=i;return e}let n=r.querySelectorAll("input, textarea, select");for(let o=0;o<n.length;o++){let s=n[o],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},Cg=t=>t.responseType==="stream"||t.responseType==="response",LO=["Blob","File","ArrayBuffer","ReadableStream","Response"],wg=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||LO.includes(Object.prototype.toString.call(t).slice(8,-1))),Rn=(t,e,r,n={})=>{if(!r&&wg(e))return;let o=r&&r.startsWith("~/"),s=o&&t.state?.root||t.state;if(s?.update)if(o){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&!wg(e)&&i in e?s.update(e,{preventFetch:!0,...n}):s.update({[i]:e},{preventFetch:!0,...n})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...n})}},Qe=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},Br=async(t,e,r,n={})=>{let o=r?.fetch;if(!o||!e||!e.__ref)return;let s=e.__ref,i=xg(e,r);(!s.__fetchScopeOwner||s.__fetchScopeOwner.scope!==i)&&(s.__fetchScopeOwner={scope:i});let a=s.__fetchScopeOwner,c=()=>e.__ref===s&&s.__fetchScopeOwner===a&&xg(e,r)===i;if(t.enabled===!1||R(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||R(t.skip)&&t.skip(e,e.state))return;let l=await vg(o,r);if(!l||!c())return;let{from:f,method:u,query:d,params:g,cache:p,transform:h,single:m,auth:y,fields:x,as:b,limit:_,offset:w,order:S,headers:E,baseUrl:T,responseType:I,page:O,cursor:F,getNextPageParam:z,getPreviousPageParam:Q,infinite:Mt,placeholderData:yt,initialData:N,select:q,keepPreviousData:bt}=t,kt=k(q)?q:void 0;if(d&&R(e.getQuery)){let rt=e.getQuery(l.name||"paths");rt&&(kt=rt.select||rt.length&&rt.join(",")||kt)}let Rt=kg(g,e,r),G=Cg(t)?null:Sg(p),j=eS(t),et=gf(e,r),D=G?tS(t,Rt,i,et):null;if(!s.__fetchInitialized&&D&&(s.__fetchInitialized=!0,N!==void 0)){let rt=R(N)?N():N;Zi(D,rt,null)}if((u==="select"||u==="rpc")&&D&&G){let rt=ta(D);if(rt&&!rt.error){let V=Date.now()-rt.time,ct=rt.stale||V>(G.staleTime||0),H=rt.data;if(R(q)&&(H=q(H,e,e.state)),h&&(H=h(H,e,e.state)),!c())return;if(Rn(e,H,b),!ct){Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(yt!==void 0){let V=R(yt)?yt(e,e.state):yt;V!==void 0&&Rn(e,V,b)}}if(D&&Mo.has(D)&&!n.force){let rt=Mo.get(D);try{let V=await Promise.race([rt,new Promise((ct,H)=>setTimeout(()=>H("DEDUP_TIMEOUT"),15e3))]);if(!c())return;if(V?.data!==void 0){let ct=V.data;if(R(q)&&(ct=q(ct,e,e.state)),h&&(ct=h(ct,e,e.state)),!c())return;Rn(e,ct,b),be(e,"onFetchComplete",ct),$e(t,e,"onFetchComplete",ct)}}catch{if(!c())return}return}let X=!ta(D)?.data;Qe(e,{isFetching:!0,isLoading:X,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),be(e,"onFetchStart"),$e(t,e,"onFetchStart");let st=r?.analyze?.emitNetwork,Oe=st?typeof performance<"u"?performance.now():Date.now():0;st&&st({phase:"start",mode:"query",from:f,method:u,cacheKey:D,lang:et});let ni=rS(async()=>{if(!c())return;if(y!==!1&&l.auth!==!1&&l.getSession){let H=await l.getSession();if(!c())return;if(y===!0&&!H){let lt={message:"Not authenticated"};return Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:lt,status:"error",fetchStatus:"idle"}),be(e,"onFetchError",lt),$e(t,e,"onFetchError",lt),{data:null,error:lt}}}let rt=l[u];if(!R(rt))return{data:null,error:{message:`Method "${u}" not found on adapter`}};let V={from:f,select:kt,params:Rt,single:m,limit:_,offset:w,order:S,headers:E,baseUrl:T};I!==void 0&&(V.responseType=I);let ct=gf(e,r);if(ct&&(V.headers={...V.headers,"Accept-Language":ct}),O!==void 0){if(v(O))O.offset!==void 0&&(V.offset=O.offset),O.limit!==void 0&&(V.limit=O.limit),O.cursor!==void 0&&(V.params={...V.params,cursor:O.cursor});else if(typeof O=="number"){let H=t.pageSize||_||20;V.offset=(O-1)*H,V.limit=H}}if(F!==void 0&&(V.params={...V.params,cursor:F}),u==="insert"||u==="update"||u==="upsert"){let H;if(x===!0||t.on==="submit")H=Qi(e);else if(P(x)){let lt=Qi(e);H={};for(let oi of x)H[oi]=lt[oi]}else e.state?.parse?H=e.state.parse():v(e.state)&&(H={...e.state});h&&(H=h(H,e,e.state)),V.data=H}if(u==="rpc"){let H=Rt;if(t.on==="submit"){let lt=Qi(e);H=t.transformParams?t.transformParams(lt,e,e.state):lt}V.params=H}if(u==="subscribe"){let H=l.subscribe({from:f,params:Rt,on:t.subscribeOn},(lt,oi,wM)=>{c()&&(Rn(e,lt,b),be(e,"onFetchComplete",lt),$e(t,e,"onFetchComplete",lt))});return c()?(s.__unsubscribe=H,{data:null,error:null,subscribed:!0}):(R(H)&&H(),{data:null,error:null,subscribed:!0})}return rt(V)},j);D&&Mo.set(D,ni);try{let rt=await ni;if(!c()||rt?.subscribed)return;let{data:V,error:ct}=rt||{};if(ct){D&&Zi(D,null,ct),Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:ct,status:"error",fetchStatus:"idle"}),be(e,"onFetchError",ct),$e(t,e,"onFetchError",ct),st&&st({phase:"error",mode:"query",from:f,method:u,cacheKey:D,error:ct.message||ct,durationMs:(typeof performance<"u"?performance.now():Date.now())-Oe});return}if(V!==void 0){if((u==="select"||u==="rpc")&&D){let lt=Zi(D,V,null);lt.gcTime=G?.gcTime||3e5}let H=V;if(Mt&&P(V)&&(s.__pages||(s.__pages=[]),n.direction==="previous"?s.__pages.unshift(V):s.__pages.push(V),H=s.__pages.flat(),z&&(s.__nextPageParam=z(V,s.__pages),s.__hasNextPage=s.__nextPageParam!=null),Q&&(s.__prevPageParam=Q(V,s.__pages),s.__hasPreviousPage=s.__prevPageParam!=null)),R(q)&&(H=q(H,e,e.state)),h&&(H=h(H,e,e.state)),!c())return;(!bt||H!==void 0)&&Rn(e,H,b),Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),be(e,"onFetchComplete",H),$e(t,e,"onFetchComplete",H),st&&st({phase:"success",mode:"query",ok:!0,from:f,method:u,cacheKey:D,durationMs:(typeof performance<"u"?performance.now():Date.now())-Oe})}}catch(rt){if(!c())return;Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:rt,status:"error",fetchStatus:"idle"}),be(e,"onFetchError",rt),$e(t,e,"onFetchError",rt),st&&st({phase:"error",mode:"query",from:f,method:u,cacheKey:D,error:rt.message||String(rt),durationMs:(typeof performance<"u"?performance.now():Date.now())-Oe})}finally{D&&Mo.get(D)===ni&&Mo.delete(D)}},IO=(t,e,r)=>{let n=t.on,o=e.__ref;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||Br;if(n==="submit"){let i=c=>{c.preventDefault(),s(t,e,r)},a=e.node;a&&(a.addEventListener("submit",i),o.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(n==="click"){let i=()=>s(t,e,r),a=e.node;a&&(a.addEventListener("click",i),o.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else n==="stateChange"&&(o.__fetchOnStateChange=()=>s(t,e,r))},$O=(t,e,r)=>{let n=e.__ref;n.__fetchCleanups||(n.__fetchCleanups=[]),DO();let o=t.refetchInterval;if(o){let c=typeof o=="number"?o:Xi(o);if(c>0){let l=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&Br(t,e,r,{force:!0})},c);n.__fetchCleanups.push(()=>clearInterval(l))}}let s=Cg(t),i=t.refetchOnWindowFocus===void 0?!s:t.refetchOnWindowFocus!==!1,a=t.refetchOnReconnect===void 0?!s:t.refetchOnReconnect!==!1;if(i){let c=()=>{let l=gf(e,r),f=xg(e,r),u=tS(t,kg(t.params,e,r),f,l),d=ta(u),g=Sg(t.cache);(!d||d.stale||Date.now()-d.time>(g?.staleTime||0))&&Br(t,e,r,{force:!0})};Fo.focus.add(c),n.__fetchCleanups.push(()=>Fo.focus.delete(c))}if(a){let c=()=>Br(t,e,r,{force:!0});Fo.online.add(c),n.__fetchCleanups.push(()=>Fo.online.delete(c))}},MO=(t,e,r)=>{if(!e.optimistic)return null;let n=t.__ref,o=e.as,s=t.state?.parse?t.state.parse():v(t.state)?{...t.state}:t.state;n.__optimisticSnapshot=s;let i=R(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&Rn(t,i,o),s},bg=(t,e)=>{let r=t.__ref,n=r.__optimisticSnapshot;n!==void 0&&(Rn(t,n,e.as),delete r.__optimisticSnapshot)},FO=async(t,e,r)=>{let n=r?.fetch;if(!n)return;let o=await vg(n,r);if(!o)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:g,baseUrl:p,responseType:h,invalidates:m,optimistic:y,onMutate:x,onSuccess:b,onError:_,onSettled:w}=t,S;if(c===!0||u==="submit")S=Qi(e);else if(P(c)){let O=Qi(e);S={};for(let F of c)S[F]=O[F]}else e.state?.parse?S=e.state.parse():v(e.state)&&(S={...e.state});l&&(S=l(S,e,e.state)),R(x)&&x(S,e,e.state);let E=y?MO(e,t,S):null;s.__fetching=!0,Qe(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),be(e,"onFetchStart"),$e(t,e,"onFetchStart");let T=r?.analyze?.emitNetwork,I=T?typeof performance<"u"?performance.now():Date.now():0;T&&T({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&o.auth!==!1&&o.getSession){let q=await o.getSession();if(d===!0&&!q){E!==void 0&&bg(e,t);let bt={message:"Not authenticated"};be(e,"onFetchError",bt),$e(t,e,"onFetchError",bt);return}}let O=o[i];if(!R(O))return;let F={from:a,data:S,headers:g,baseUrl:p};h!==void 0&&(F.responseType=h),t.params&&(F.params=kg(t.params,e,r));let z=gf(e,r);z&&(F.headers={...F.headers,"Accept-Language":z});let Q=eS(t),Mt=await rS(()=>O(F),Q),{data:yt,error:N}=Mt||{};if(N){E!==void 0&&bg(e,t),Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:N,status:"error",fetchStatus:"idle"}),be(e,"onFetchError",N),R(_)&&_(N,S,e),R(w)&&w(null,N,S,e),T&&T({phase:"error",mode:"mutation",from:a,method:i,error:N.message||String(N),durationMs:(typeof performance<"u"?performance.now():Date.now())-I});return}if(delete s.__optimisticSnapshot,yt!==void 0&&(f||!wg(yt))){let q=f?{[f]:yt}:yt;e.state?.update&&e.state.update(q,{preventFetch:!0})}if(Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),be(e,"onFetchComplete",yt),$e(t,e,"onFetchComplete",yt),R(b)&&b(yt,S,e),R(w)&&w(yt,null,S,e),T&&T({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-I}),m){let q=P(m)?m:[m];for(let bt of q)if(bt===!0||bt==="*")for(let[kt]of Ht)kt.startsWith(a+":")&&Ji(kt);else Ji(bt)}}catch(O){E!==void 0&&bg(e,t),Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:O,status:"error",fetchStatus:"idle"}),be(e,"onFetchError",O),$e(t,e,"onFetchError",O),R(_)&&_(O,S,e),R(w)&&w(null,O,S,e),T&&T({phase:"error",mode:"mutation",from:a,method:i,error:O.message||String(O),durationMs:(typeof performance<"u"?performance.now():Date.now())-I})}finally{s.__fetching=!1}},ea=(t,e,r,n)=>{if(!t||!n?.fetch)return;let s=pt(t,e);if(!s)return;let i=P(s)?s.map(c=>Zw(pt(c,e),e)).filter(Boolean):[Zw(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?FO:Br;c.on==="create"?f(c,e,n):Promise.resolve().then(()=>{IO({...c,__runner:f},e,n)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&$O(c,e,n)}let a=e.__ref;a.refetch=c=>{for(let l of i)Br(l,e,n,{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};Br(f,e,n,{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};Br(f,e,n,{direction:"previous",force:!0})}},NO={invalidateQueries:t=>{if(!t){Ji();return}if(k(t))for(let[e]of Ht)(e.startsWith(t)||e.includes(t))&&Ji(e);else if(P(t)){let e=t.join(":");for(let[r]of Ht)r.includes(e)&&Ji(r)}},removeQueries:t=>{if(!t){df();return}if(k(t))for(let[e]of Ht)(e.startsWith(t)||e.includes(t))&&df(e)},getQueryData:t=>ta(t)?.data??void 0,setQueryData:(t,e)=>{let r=ta(t),n=R(e)?e(r?.data):e;Zi(t,n,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let n=await vg(r,e);if(!n)return;let o=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=n[t.method||"select"];if(!R(s))return;let i={from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single,headers:t.headers,baseUrl:t.baseUrl};t.responseType!==void 0&&(i.responseType=t.responseType);let a=await s(i);if(a?.data!==void 0&&!a?.error&&!Cg(t)){let c=Zi(o,a.data,null);c.gcTime=Sg(t.cache)?.gcTime||3e5}return a},getCache:()=>Ht,clear:()=>df(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of Ht)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||df(r))}},Eg={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||Mo.clear(),ea(e,t,t.state,t.context))}},jO=ea});function oa(t){let e=this,{__ref:r}=e,n=[].concat(t),o=r.root[n[0]];if(!n||!n.length)return console.log(n,"on",e.key,"is undefined");for(;o.key===n[0]&&(n.shift(),!!n.length);)if(o=o[n[0]],!o)return;return o}function Tg(t){let e=this,{parent:r}=e;if(R(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 Og(t){let e=this,{__ref:r}=e,n=r?.__children;if(n)for(let o=0;o<n.length;o++){let s=n[o],i=e[s];if(s===t)return i;if(R(t)){let c=t(i,i.state,i.context);if(i.state&&c)return i}let a=i?.lookdown?.(t);if(a)return a}}function Rg(t,e=[]){let r=this,{__ref:n}=r,o=n?.__children;if(o){for(let s=0;s<o.length;s++){let i=o[s],a=r[i];if(i===t)e.push(a);else if(R(t)){let c=t(a,a.state,a.context);a.state&&c&&e.push(a)}a?.lookdownAll?.(t,e)}return e.length?e:void 0}}function _f(t={}){let e=this;if(e.node?.style){for(let r in t){let n=t[r],o=e[r];if(v(n)&&o)_f.call(o,n);else if(n!=null){let s=r.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(n).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function oS(t){let e=this;if(hr("beforeRemove",e,t)===!1)return e;R(e.node.remove)?e.node.remove():Nr()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=mi(e.parent.__ref.__children,e.key)),hr("remove",e,t)}function Pg(t){return this[t]}function Dg(t,e){let r=this;if(t)return r.update(t,e),r}function Lg(t){return t?this.__ref&&this.__ref[t]:this.__ref}function Ig(){let t=this.getRef("__children");return Array.isArray(t)?t.map(e=>this[e]):[]}function sa(){return this.getRef().path}function aa(t){let e=null,r=n=>n.__element&&n.root?.isRootState;if(!this)e=nS();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let n=this.state&&r(this.state),o=R(this.state)&&this.parent.state&&r(this.parent.state);(n||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=nS()),t?e?.[t]:e}function ca(t){let e=this?.__ref?.root||this.getRootState()?.__element;if(!e)throw new Error(`[smbls] getRoot() could not resolve a root element for "${this?.key||"<unknown>"}" \u2014 it has no __ref (never went through create()) and no root state is registered. Answering undefined here used to no-op silently for every caller.`);return Object.keys(e).length>0&&t?e[t]:e}function la(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function fa(t){let e=this.getRoot()?.context;return t?e[t]:e}function ua(t){let e=this.context;return t?e[t]:e}function xf(){let t=this,e=[];for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||$r.has(r)&&!wi.has(r)||e.push(r);return e}function wf(t=[]){let e=this,r={},n=xf.call(e),o=n.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<n.length;i++){let a=n[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||o&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=R(c&&c.parse)?c.parse():c;r[a]=R(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 Tt(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=c)}return r}function na(t=[],e=new WeakSet){let r=this;if(e.has(r))return;e.add(r);let n=wf.call(r,t),o=t.length?new Set(t):null;for(let s in n){if(o&&o.has(s)||!Object.prototype.hasOwnProperty.call(r,s))continue;let i=n[s];Array.isArray(i)?n[s]=i.map(a=>B(a)?na.call(a,t,e):a):B(i)&&(n[s]=na.call(i,t,e))}return n}function jo(...t){if(Vr!=="test"&&Vr!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(n=>console.log(`%c${n}:
|
|
22
|
-
`,"font-weight: bold",e[n])):(console.log(r.path),e.keys().forEach(o=>console.log(`%c${o}:`,"font-weight: bold",e[o]))),console.log(e),console.groupEnd(e.key),e}function
|
|
23
|
-
${
|
|
21
|
+
return (${c}); })`)(e)}catch{try{e[a]=C.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of r)if(!n(i))try{e[i]=C.eval(`(${a})`)}catch{e[i]=a}return e},dh=(t,e={verbose:!0})=>{try{return t?C.eval("("+t+")"):{}}catch(r){e.verbose&&console.warn(r)}},ph=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),Pl=t=>{for(let e in t)return!1;return!0},hh=t=>v(t)&&Pl(t),gh=()=>Object.create(null),Pi=(t,e,r={})=>{let n=r.exclude||[],o=r.preventUnderscore;for(let s in e)n.includes(s)||!o&&vn(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},Tn=(t,e,r=[])=>{let n=r instanceof Set;for(let o in e)vn(o)||o==="constructor"||o==="prototype"||(n?r.has(o):r.includes(o))||(t[o]=e[o]);return t},Ht=(t,e,r={},n=new WeakMap)=>{if(!B(t)||!B(e)||Xt(t)||Xt(e))return e;if(n.has(t))return n.get(t);n.set(t,t);let o=r.exclude,s=o?o instanceof Set?o:new Set(o):null,i=!r.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&vn(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];Xt(l)?t[a]=l:B(c)&&B(l)?t[a]=Ht(c,l,r,n):l!==void 0&&(t[a]=l)}return t},Dl=(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 n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(let s=0;s<n.length;s++){let i=n[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!Dl(t[i],e[i],r))return!1}return!0},CO=new Set(["node","__ref"]),mh=(t,e,r=CO)=>{if(t===e)return!0;if(!B(t)||!B(e)||Xt(t)||Xt(e))return t===e;let n=r instanceof Set?r:new Set(r),o=new WeakSet;function s(i,a){if(o.has(a))return!0;o.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||n.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(Xt(l)||Xt(f)){if(l!==f)return!1}else if(B(l)&&B(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},yh=(t,e)=>{if(e==null)return t;if(Zt(e)("string","number"))delete t[e];else if(P(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},Ll=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]=Ll(t[r]));return e},bh=(t,e)=>{if(t.length===0)return e;let r={},n=r;for(let o=0;o<t.length;o++)o===t.length-1&&e?n[t[o]]=e:(n[t[o]]={},n=n[t[o]]);return r},_h=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length-1;o++){if(r[e[o]]===void 0)return;r=r[e[o]]}let n=e[e.length-1];r&&Object.prototype.hasOwnProperty.call(r,n)&&delete r[n]},wh=(t,e,r)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let o=0;o<e.length-1;o++)(!n[e[o]]||typeof n[e[o]]!="object")&&(n[e[o]]={}),n=n[e[o]];return n[e[e.length-1]]=r,t},Sh=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let n=0;n<e.length;n++){if(r==null)return;r=r[e[n]]}return r},xh=t=>{let r=[],n=0;for(let o=0;o<t.length;o++)if(r.length<2)r.push(t[o]);else if(t[o]===r[o%2]?n++:(r=[t[o-1],t[o]],n=1),n>=20)return(lS==="test"||lS==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},kh=t=>{let e=new WeakSet;function r(n){if(n&&typeof n=="object"){if(e.has(n))return!0;e.add(n);for(let o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&r(n[o]))return console.log(n,"cycle at "+o),!0}return!1}return r(t)},vh=(t,e)=>{let r=e instanceof Set?e:new Set(e),n={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&!r.has(o)&&(n[o]=t[o]);return n}});var Di,Li,Ii,Il=U(()=>{"use strict";Ye();Di=(function(){let t=0;function e(){return t++,t}return e})(),Li=Di,Ii=(t,e,r)=>(pt(r,t)||r||t.key||Di()).toString()});var Ie,Ch,Nr,$l,Eh,Ah,Th,jr,Oh,On,mt,Ml=U(()=>{"use strict";Ie="production",Ch=Ie,Nr=(t=Ie)=>t==="production",$l=(t=Ie)=>t==="testing"||t==="test",Eh=$l,Ah=(t=Ie)=>t==="staging",Th=(t=Ie)=>t==="local",jr=(t=Ie)=>t==="development"||t==="dev"||t==="local",Oh=(t,e=Ie)=>e[t],On=(t=Ie)=>!Nr(t),mt=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 $i(t,e,r){let n;return function(){let o=this,s=arguments,i=function(){n=null,r||t.apply(o,s)},a=r&&!n;clearTimeout(n),n=setTimeout(i,e),a&&t.apply(o,s)}}function Dh(t,e=window){let r=function(){return t.apply(e,arguments)};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var Rh,Ph,EO,Po,Do,Lo,Ot,Rn=U(()=>{"use strict";Rh=(t,e,r=300)=>{let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(t,o)},r)}},Ph=t=>{let e={};return(...r)=>{let n=r[0];if(n in e)return e[n];{let o=t(n);return e[n]=o,o}}},EO=/^\s*(?:async\s+)?(?:function\b|\([^)]*\)\s*=>|[a-zA-Z_$][\w$]*\s*=>)/,Po=t=>EO.test(t),Do=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let r of e)if(r.resolveHandler)return!0;return!1},Lo=(t,e)=>{if(typeof t=="function")return t;let r=e?.context?.plugins;if(!r)return t;for(let n of r)if(n.resolveHandler){let o=n.resolveHandler(t,e);if(typeof o=="function")return o}return t},Ot=(t,e,...r)=>{let n=e?.context?.plugins;if(!n)return!1;let o=!1;for(let s of n)typeof s[t]=="function"&&(s[t](e,...r),o=!0);return o}});var Lh,AS=U(()=>{"use strict";Dt();Ye();Lh=(t,e)=>{let{__ref:r}=t,n=t.if;if(R(n)){let o;try{o=n(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete r.__if;return}o?r.__if=!0:delete r.__if}else n!=null&&typeof n=="object"?pt(n,t)?r.__if=!0:delete r.__if:r.__if=!0}});var Ih,$h,TS=U(()=>{"use strict";Ih=(t,...e)=>{t&&e.map(r=>console.log(r))},$h=(t,e,...r)=>{t&&(console.group(e),r.map(n=>console.log(n)),console.groupEnd(e))}});function Bh(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 Vh(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 Mh,Fh,Nh,jh,OS=U(()=>{"use strict";Dt();hi();Mh=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),Fh=(t,e,r=365)=>{if(Pt(nt)||Pt(nt.cookie))return;let n=new Date;n.setTime(n.getTime()+r*24*60*60*1e3);let o=`expires=${n.toUTCString()}`;nt.cookie=`${t}=${e};${o};path=/`},Nh=t=>{if(Pt(nt)||Pt(nt.cookie))return;let e=`${t}=`,n=decodeURIComponent(nt.cookie).split(";");for(let o=0;o<n.length;o++){let s=n[o];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},jh=t=>{Pt(nt)||Pt(nt.cookie)||(nt.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var Io,RS,Uh,zh=U(()=>{"use strict";Io={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"])},RS=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"]),Uh=t=>Io.body.has(t)});var Hh,PS,$o,_e,Mo,Ni,Xe,Wh,Fl,ji,qh,Bi,Nl,jl,Vi,Bl,Fo,AO,Ze,DS,Mi,Ui,Kh,Fi,Gh,Yh,Vl,Ul,zl,Hl,Wl,ql,LS,Kl=U(()=>{"use strict";To();Xh();Ye();Dt();Hh="production",PS=t=>t.sourcemap!==!1&&Hh!=="production",$o=t=>{if(!t)return[];let e=[],r=t.extends;r&&(P(r)?e.push(...r):e.push(r));let n=t.extend;return n&&(P(n)?e.push(...n):e.push(n)),e},_e=t=>{if(!P(t))return t;let e=[];for(let r=t.length-1;r>=0;r--){let n=t[r];e.push(P(n)?_e(n):n)}return e},Mo=t=>{if(t.includes("+"))return t.split("+").filter(Je);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!Je(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},Ni=(t,e,r)=>{let n=[],o=Mo(r);o&&(n=[...o]);let s=_e($o(t));return s.length&&(n=[...n,...s]),n},Xe=(t,e)=>{let{__ref:r}=e,{__extends:n}=r;if(!t)return n;let o=e.variant,s=e.context;if(o&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${o}`;s.components[i]&&(t=i)}return n.includes(t)||(n=Array.isArray(t)?[...n,...t]:[...n,t],r.__extends=n),n},Wh=(t,e)=>{if(!t)return e;let{extends:r}=e,n=P(r)?r:[r],o=P(t)?t:[t];return{...e,extends:Eo(o,n)}},Fl=()=>Math.random().toString(36).substring(2),ji={},qh={},Bi=t=>ji[t.__hash],Nl=(t,e)=>{let r=Fl();return x(t)||(t.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(ji[r]=e),e},jl=(t,e)=>t.__hash?e.concat(Bi(t)):Nl(t,e),Vi=(t,e,r,n=new Set,o,s)=>{for(let i of t)P(i)?Vi(i,e,r,n,o,s):Fo(i,e,r,n,o,void 0,s);return e},Bl=(t,e,r,n=new Set,o,s,i)=>{let a=$o(t),c={...t};delete c.extends,delete c.extend;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),o&&o.push(s)),a.length&&Fo(_e(a),e,r,n,o,s,i),e},Fo=(t,e,r,n=new Set,o,s,i)=>{if(!t||n.has(t))return e;if(P(t))return Vi(t,e,r,n,o,i);let a=s;return x(t)?(a=t,t=Ui(t,r)):i&&v(t)&&i.has(t)&&(a=i.get(t)),n.has(t)||(n.add(t),t?.extends||t?.extend?Bl(t,e,r,n,o,a,i):t&&(e.push(t),o&&o.push(a))),e},AO=new Set(["parent","node","__ref","__proto__","extends","extend","childExtends","childExtendsRecursive"]),Ze=(t,e,r,n,o)=>{e=ft(e);for(let s in e){if(AO.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&&n?v(a)&&!P(a)?(r[s]=r[s]||{},DS(r[s],a,n)):r[s]=n:r&&o?.[s]&&(r[s]=o[s]);else if(v(i)&&v(a)){let c=r?r[s]=r[s]||{}:void 0,l=o?.[s];Je(s)?t[s]=Ze(i,a,c,n,l):Ze(i,a,c,n,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(P(i)&&P(a))t[s]=i.concat(a);else if(P(i)&&v(a)){let c=Ze({},i);t[s]=Ze(c,a)}}}}return t},DS=(t,e,r,n)=>{if(n||(n=new WeakSet),!n.has(e)){n.add(e);for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||o==="__proto__"||o==="constructor"||o==="prototype")continue;let s=e[o];v(s)&&!P(s)?(t[o]=t[o]||{},DS(t[o],s,r,n)):t[o]=r}}},Mi=(t,e,r)=>t.reduce((n,o,s)=>{let i=ft(o),a=r?r[s]:void 0;return Ze(n,i,e,a)},{}),Ui=(t,e,r={},n)=>{let o=e?.components||r.components,s=e?.pages||r.pages;if(x(t)){let i=o&&(o[t+"."+n]||o[t]||o["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;r.verbose&&(Hh==="test"||Hh==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},Kh=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),Fi=(t,e,r,n)=>{if(!t)return[];if(t.__hash)return Bi(t)||[];let s=Fo(t,[],e,new Set,r,void 0,n);return r?s:jl(t,s)},Gh=(t,e)=>{if(!t)return e;let r=P(t)?t:[t];return Eo(r,e)},Yh=t=>{let e=[];function r(n){for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&(Je(o)&&e.push(o),o==="extends"&&(typeof n[o]=="string"?e.push(n[o]):Array.isArray(n[o])&&(e=e.concat(n[o]))),typeof n[o]=="object"&&n[o]!==null&&r(n[o]))}return r(t),e},Vl=(t,e,r={})=>{let{__ref:n}=t,o=t.context||e.context,s=t.variant,i=$o(t);if(i.length){let a=_e(i),[c,...l]=a,f=typeof c=="string"&&s&&o?.components?`${c}.${s}`:null;f&&o.components[f]?Xe([f,...l],t):Xe(a,t)}return Ul(t,e,r),zl(t,e,r),Hl(t,e,r),t.component&&Xe(_e(pt(t.component,t)),t),o.defaultExtends&&Xe(_e(o.defaultExtends),t),Ao(n.__extends)},Ul=(t,e,r={})=>{let{__ref:n}=t;return r.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&Xe(_e(e.childProps.extends),t),n.__extends},zl=(t,e,r={})=>{let{__ref:n}=t,o=r.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!o&&s&&Xe(_e(s),t),n.__extends},Hl=(t,e,r={})=>{let{__ref:n}=t,o=e.childExtendsRecursive,s=r.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return o&&!i&&!s&&Xe(_e(o),t),n.__extends},Wl=(t,e,r={})=>{let{__ref:n}=t,o=t.context||e.context,s=t.variant,i=PS(r),a=i?[...n.__extends]:null,c=Ao(n.__extends.map((l,f)=>Ui(l,o,r,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let g=c[d],h=a[d];g&&v(g)&&x(h)&&l.set(g,h)}let f=[],u=Fi(c,o,f,l);n.__extendsStack=u,n.__extendsNames=f}else{let l=Fi(c,o);n.__extendsStack=l}return n.__extendsStack},ql=(t,e,r={})=>{let{__ref:n}=t,{__extendsStack:o}=n;if(PS(r)){let s={},i=n.__extendsNames||[],a=Mi(o,s,i),c={};Ze(t,a,c,void 0,s),n.__sourcemap=c}else{let s=Mi(o);Ze(t,s)}return t},LS=(t,e,r={})=>(Vl(t,e,r),Wl(t,e,r),ql(t,e,r),t)});function Zh(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function Jh(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function Qh(t,e,r){let{context:n}=e||{},[o]=Mo(r),s=r||o;return n?.components?.[s]||n?.pages?.[s]}var Je,Xh=U(()=>{"use strict";Kl();Dt();Je=t=>{if(!x(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function IS(t,e){let{props:r,on:n}=e,o=_n(t.split("on")[1]),s=n[o],i=r[t];R(s)?n[o]=(...a)=>{if(s(...a)!==!1&&R(i))return i(...a)}:n[o]=i}var $S=U(()=>{"use strict";ki();Dt()});function Gl(t,e={}){let r=e.cachedKeys||[];for(let n in t){let o=t[n];if(n.length>2&&n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n[2]===n[2].toUpperCase()&&(R(o)||o!=null&&Do(this.context))){let h=_n(n.slice(2));t.on&&(t.on[h]=o),delete t[n];continue}if(n==="childProps"){t.props[n]=o,delete t[n],r.push(n);continue}let a=this.define?.[n],c=this.context?.define?.[n],l=v(a)||R(a),f=v(c)||R(c);if(l||f)continue;let u=n.charAt(0);if(FS.has(u)){t.props[n]=o,delete t[n],r.push(n);continue}let d=tg.test(n)||MS.test(n)||OO(o),g=$r.has(n);!d&&!g&&(n in t.props||(t.props[n]=o),delete t[n],r.push(n))}return t}function Yl(t=this,e){let r=e.cachedKeys||[];for(let n in t.props){let o=t.props[n],s=n.length>2&&n.charCodeAt(0)===111&&n.charCodeAt(1)===110,i=R(o)||o!=null&&Do(this.context);if(s&&i){IS(n,t),delete t.props[n];continue}if(r.includes(n)||n==="childProps")continue;let a=n.charAt(0);if(FS.has(a))continue;let c=this.define?.[n],l=this.context?.define?.[n],f=v(c)||R(c),u=v(l)||R(l),d=tg.test(n)||MS.test(n),g=$r.has(n);(d||g||f||u)&&(t[n]===void 0||o===null)&&(t[n]=o,t.props&&delete t.props[n])}return t}function Xl(t=this){let e=[];return Gl.call(this,t,{cachedKeys:e}),Yl.call(this,t,{cachedKeys:e}),t}function eg(t={}){return t.on||(t.on={}),t.props||(t.props={}),Xl.call(this,t)}function ng(t,e){this.__element.update({props:t},e)}function Ki(t){let e={update:ng.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var tg,MS,FS,TO,OO,Wi,zi,rg,qi,Gi,Yi,Zl,Hi,og,sg,ig=U(()=>{"use strict";xn();$S();Ye();Dt();ki();Rn();tg=/^[A-Z]/,MS=/^\d+$/,FS=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),TO=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),OO=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(TO.has(e)||tg.test(e))return!0;return!1},Wi=(t,e,r)=>{let{props:n,__ref:o}=t;if(o.__propsStack=[],n)o.__initialProps=n;else return{};return B(n)?{...n}:(o.__propsStack.push(n),{})};zi=t=>Zt(t)("string","number")?{inheritedString:t}:t,rg=(t,e)=>!t||!e.length?!1:e.includes(t),qi=(t,e)=>{let{__ref:r}=t,n=r.__propsStack||[],o=e.props;if(!o)return n;let s=o[t.key],i=o.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=zi(i);n.unshift(c)}if(s){let c=zi(s);n.unshift(c)}return n};Gi=t=>{let e=new Set;return t.filter(r=>!r||Mr.has(r)||e.has(r)?!1:(e.add(r),!0))},Yi=(t,e,r)=>(e.props=t.reduce((n,o)=>{if(Mr.has(o))return n;for(;R(o);)o=pt(o,e);return it(n,ft(o,{exclude:Mr}))},{}),Ki(e),e.props),Zl=(t,e)=>{let{props:r,__ref:n}=t,o=n.__propsStack||[];if(e?.props&&(o=[...qi(t,e)]),v(r)?o.push(r):r==="inherit"&&e?.props?o.push(e.props):r&&o.push(r),P(n.__extendsStack))for(let s=0;s<n.__extendsStack.length;s++){let i=n.__extendsStack[s];i.props&&i.props!==r&&o.push(i.props)}return n.__propsStack=Gi(o),n.__propsStack},Hi=(t,e)=>{let{__ref:r}=t,n=Zl(t,e);n.length?Yi(n,t):(r.__propsStack=[],t.props={})},og=function(t,e,r){let{__ref:n}=t;if(n.__if)Hi(t,e);else try{Hi(t,e)}catch(o){t.context?.designSystem?.verbose&&console.warn("initProps error at",n.path?.join("."),o),t.props={},n.__propsStack=[]}return Ki(t),t},sg=(t,e,r)=>{let{__ref:n}=e,s=[...n.__propsStack||[]],i=qi(e,r);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),n.__propsStack=Gi(s),n.__propsStack.length&&Yi(n.__propsStack,e),e}});var NS,Jl,Ql,tf,ef,ag,rf,nf,of,cg,jS=U(()=>{"use strict";Kl();Il();mi();ig();zh();Dt();NS="production",Jl=(t,e,r)=>{let n=e.childExtends&&e.childExtends.tag,o=e.childProps&&e.childProps.tag,s=Io.body.has(r)&&r;return{text:t,tag:n||o||s||"string"}},Ql=(t,e,r)=>{if(t===void 0)return(NS==="test"||NS==="development")&&console.warn(r,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:Zt(t)("string","number")?Jl(t,e,r):R(t)?{props:t}:t},tf=(t,e)=>{let r={};return r.origin=t,r.parent=e,r},ef=(t,e,r,n,o)=>{if(!e)return o;if(hr(e)){let s={key:":root",node:e};return o[`${r}_parent`]=s,s}return e},ag=(t,e)=>{let{__ref:r}=t,{__ref:n}=e,o=e&&e.key===":root";r?.root||(r.root=o?t:n?.root)},rf=(t,e,r)=>{let{__ref:n}=e;return n||(n=e.ref={}),n.path||(n.path=[]),n.path.concat(r)},nf=(t,e,r,n,o)=>(n.context&&!o.context&&!t.context&&(o.context=n.context),n.context||e.context||o.context||t.context),of=(t,e,r)=>{let n=tf(t,e);return t.__ref=n,n.__defineCache||(n.__defineCache={}),n.__exec||(n.__exec={}),n.__execProps||(n.__execProps={}),n.__class||(n.__class={}),n.__classNames||(n.__classNames={}),n.__attr||(n.__attr={}),n.__changes||(n.__changes=[]),n.__children||(n.__children=[]),n.__extends=Ni(t,e,r),n.path=rf(t,e,r),n},cg=(t,e,r,n,o)=>{let i=t?.__hash?{extends:[t]}:Ql(t,e,r);if(!i)return;let a=ef(i,e,r,n,o),c=Ii(i,a,r);of(i,a,c);let l=Wi(i,a,c),f=nf(i,a,c,n,o),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var lg,sf,af,cf,lf,fg,ff,ug,dg,pg,hg,BS,No,Pn,VS,US,zS,Xi,Qe,HS=U(()=>{"use strict";To();xn();Ye();Dt();lg=t=>{let{state:e,props:r,__ref:n}=t,o=r?.state||e;return Zt(o)("string","number")?(n.__state=o,{value:o}):o===!0?(n.__state=t.key,{}):o?(n.__hasRootState=!0,o):!1},sf=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},af=(t,e)=>{if(!t.includes("../"))return;let n=t.split("../").length-1;for(let o=0;o<n;o++){if(!e.parent)return null;e=e.parent}return e},cf=(t,e,r={})=>{let n=x(t)?t.split("/"):[t],o=n.length-1;for(let s=0;s<o;s++){let i=n[s],a=n[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]},lf=(t,e,r={})=>{let o=t.__ref.__state;if(!ff(t))return;let s=sf(o,e.state),i=e.state;if(s)i=s,o=o.replaceAll("~/","");else{let a=af(o,e.state);a&&(i=a,o=o.replaceAll("../",""))}if(i)return cf(o,i,r)},fg=(t,e)=>{let r=t.__ref,n=lf(t,e);if(n===void 0)return t.state;if(Zt(n)("object","array"))return ft(n);if(Zt(n)("string","number","boolean"))return r.__stateType=typeof n,{value:n};console.warn(r.__state,"is not present. Replacing with",{})},ff=t=>{let{__ref:e}=t,r=e?.__state;return!!(r&&Zt(r)("number","string","boolean"))},ug=function(t){return B(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},dg=(t,e)=>{if(!t)return e||{};let r=t.split("/"),n={},o=n,s=r.length-1;for(let i=0;i<=s;i++)o[r[i]]=i===s?e||{}:{},o=o[r[i]];return n},pg=(t,e)=>{let{__element:r}=e,n=r?.state;if(!n)return;let o=ft(n,wn),s={[t.key]:o},i=v(n.__depends)?{...n.__depends,...s}:s;return Array.isArray(n)?wi(n,{...Object.getPrototypeOf(n),__depends:i}):Object.setPrototypeOf(n,{...Object.getPrototypeOf(n),__depends:i}),o},hg=(t,e,r={})=>{let{overwrite:n}=r;if(!n)return;let o=n==="shallow";if(n==="merge"){it(t,e,wn);return}(o?Tn:Ht)(t,e,wn)},BS="__polyglotSeededKeys",No=t=>{if(!v(t))return new Set;let e=t[BS];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,BS,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},Pn=(t,e,r)=>No(t).has(e)?!0:!v(r)||r[e]===void 0,VS="__polyglotSeededValues",US=t=>{if(!v(t))return new Map;let e=t[VS];if(!(e instanceof Map)){e=new Map;try{Object.defineProperty(t,VS,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},zS=t=>{if(t===null||typeof t!="object")return typeof t+":"+String(t);try{return"json:"+JSON.stringify(t)}catch{return null}},Xi=(t,e,r)=>{if(!No(t).has(e))return!1;let n=US(t);if(!n.has(e))return!0;let o=v(r)||Array.isArray(r)?r[e]:void 0,s=zS(o);return s!==null&&s===n.get(e)},Qe=(t,e,...r)=>(No(t).add(e),r.length&&US(t).set(e,zS(r[0])),e)});var RO,gg,WS=U(()=>{"use strict";RO=(t,e)=>{let r=e;for(;r;){if(r===t)return!0;r=Object.getPrototypeOf(r)}return!1},gg=(t,e)=>{let{__ref:r}=t,n=t.context||e.context||r.root?.context;n&&!n.globalScope&&(n.globalScope={});let o=e.scope||r.root?.scope,s=n?.globalScope;if(!t.scope)o?t.scope=o:s?t.scope=Object.create(s):t.scope={};else if(typeof t.scope=="object"&&t.scope!==null&&Object.getPrototypeOf(t.scope)===Object.prototype){let i=o||s;i&&!RO(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var qS,uf,gr,df,mg,yg=U(()=>{"use strict";Dt();Rn();qS=(t,e)=>{let r="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[r]},uf=(t,e,r,n,o)=>{if(t=Lo(t,e),!!R(t))try{let s=t.call(e,e,r||e.state,n||e.context,o);return s&&typeof s.then=="function"&&s.catch(i=>{e.error=i,i instanceof ReferenceError?console.warn("[DOMQL] Async event warning:",i.message):console.error("[DOMQL] Async event error:",i)}),s}catch(s){if(e.error=s,s instanceof ReferenceError?console.warn("[DOMQL] Event handler warning:",s.message):console.error("[DOMQL] Event handler error:",s),e.context?.strictMode)throw s}},gr=(t,e,r)=>{if(!e)throw new Error("Element is required");Ot(t,e,r);let n=qS(t,e);if(n){let{state:o,context:s}=e;return uf(n,e,o,s,r)}},df=(t,e,r,n,o,s)=>{if(t=Lo(t,r),!!R(t))try{let i=t.call(r,e,r,n||r.state,o||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}},mg=(t,e,r,n)=>{Ot(t,r,e,n);let o=qS(t,r);if(o){let{state:s,context:i}=r;return df(o,e,r,s,i,n)}}});var bg,Zi,_g=U(()=>{"use strict";bg={},Zi={}});var ZS={};M(ZS,{restAdapter:()=>XS,setup:()=>BO});var PO,YS,KS,DO,LO,IO,GS,mr,$O,MO,FO,wg,NO,jO,BO,XS,JS=U(()=>{"use strict";PO=(t,e,r)=>{let n=e&&!e.startsWith("/")?"/":"",o=new URL(`${t}${n}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},YS=t=>Object.prototype.toString.call(t).slice(8,-1),KS=["auto","json","text","blob","arrayBuffer","stream","response"],DO={json:async t=>{let e=await t.text();return e?JSON.parse(e):null},text:t=>t.text(),blob:t=>t.blob(),arrayBuffer:t=>t.arrayBuffer(),stream:t=>t.body,response:t=>t},LO=t=>{let e=t.headers.get("content-type");return e&&e.includes("json")?t.json():t.text()},IO=async t=>{let e=await t.text(),r=t.headers.get("content-type");if(e&&r&&r.includes("json"))try{return JSON.parse(e)}catch{}return e},GS=(t,e)=>t?.message||t?.error||e.statusText||`HTTP ${e.status}`,mr=async(t,e,r)=>{let n=r??"auto";if(!KS.includes(n))throw new TypeError(`@symbo.ls/fetch rest: unknown responseType "${n}" \u2014 use one of: ${KS.join(", ")}`);let o=await globalThis.fetch(t,e);if(n==="auto"){let s=await LO(o);return{data:s,error:o.ok?null:GS(s,o),status:o.status}}if(!o.ok){let s=await IO(n==="response"?o.clone():o);return{data:n==="response"?o:s,error:GS(s,o),status:o.status}}return{data:await DO[n](o),error:null,status:o.status}},$O=["FormData","Blob","File","URLSearchParams","ReadableStream","ArrayBuffer"],MO=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||$O.includes(YS(t))),FO=t=>Array.isArray(t)?t:typeof t.entries=="function"?t.entries():Object.entries(t),wg=(...t)=>{let e={},r=new Map;for(let n of t)if(n)for(let[o,s]of FO(n)){let i=o.toLowerCase();if(r.has(i)&&delete e[r.get(i)],s==null){r.delete(i);continue}r.set(i,o),e[o]=s}return e},NO={"Content-Type":"application/json"},jO={"Content-Type":void 0},BO=async({url:t,headers:e,auth:r,fetchOptions:n})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return XS(t,e,r,n)},XS=(t,e={},r,n={})=>{let o=r?.token||null,s=()=>o?{Authorization:`Bearer ${o}`}:null,i=u=>wg(e,s(),u),a=u=>({...n,...u}),c=(u,d,g)=>{if(!MO(d))return a({method:u,headers:wg(e,s(),NO,g),body:JSON.stringify(d)});let h={method:u,headers:wg(e,s(),jO,g),body:d};return YS(d)==="ReadableStream"&&(h.duplex="half"),a(h)},l=(u,d)=>{let g=d||t;if(u&&(u.startsWith("http://")||u.startsWith("https://")))return u;let h=u&&!u.startsWith("/")?"/":"";return`${g}${h}${u||""}`};return{name:"rest",setToken:u=>{o=u},getSession:async()=>{if(!r?.sessionUrl)return o?{token:o}:null;let u=await mr(l(r.sessionUrl,r.baseUrl),a({headers:i()}));return u.error?null:u.data},signIn:async u=>{if(!r?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let d=await mr(l(r.signInUrl,r.baseUrl),c("POST",u));return d.data?.token&&(o=d.data.token),d},signOut:async()=>(r?.signOutUrl&&await mr(l(r.signOutUrl,r.baseUrl),a({method:"POST",headers:i()})),o=null,{error:null}),select:({from:u,params:d,select:g,limit:h,offset:p,order:m,single:y,headers:w,baseUrl:b,responseType:_})=>{let S={...d};return g&&(S.select=g),h&&(S.limit=h),p&&(S.offset=p),y&&(S.single=!0),m&&(typeof m=="string"?S.order=m:Array.isArray(m)?S.order=m.map(k=>`${k.by}:${k.asc===!1?"desc":"asc"}`).join(","):m.by&&(S.order=`${m.by}:${m.asc===!1?"desc":"asc"}`)),mr(PO(b||t,u||"",S),a({headers:i(w)}),_)},rpc:({from:u,params:d,headers:g,baseUrl:h,responseType:p})=>mr(l(`rpc/${u}`,h),c("POST",d,g),p),insert:({from:u,data:d,headers:g,baseUrl:h,responseType:p})=>mr(l(u,h),c("POST",d,g),p),update:({from:u,data:d,params:g,method:h,headers:p,baseUrl:m,responseType:y})=>{let w=g?.id||d?.id,b=w?`${u}/${w}`:u;return mr(l(b,m),c(h||"PATCH",d,p),y)},upsert:({from:u,data:d,params:g,method:h,headers:p,baseUrl:m,responseType:y})=>{let w=g?.id||d?.id,b=w?`${u}/${w}`:u;return mr(l(b,m),c(h||"PUT",d,p),y)},delete:({from:u,params:d,headers:g,baseUrl:h,responseType:p})=>{let m=d?.id,y=m?`${u}/${m}`:u;return mr(l(y,h),a({method:"DELETE",headers:i(g)}),p)}}}});var tx={};M(tx,{localAdapter:()=>QS,setup:()=>UO});var pf,VO,UO,QS,ex=U(()=>{"use strict";pf=(t,e)=>{if(!e)return!0;for(let r in e){let n=e[r];if(n===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(n)){if(!n.includes(t[r]))return!1}else if(typeof n=="object"){for(let o in n)if(o==="gt"&&!(t[r]>n[o])||o==="gte"&&!(t[r]>=n[o])||o==="lt"&&!(t[r]<n[o])||o==="lte"&&!(t[r]<=n[o])||o==="neq"&&t[r]===n[o]||o==="like"&&!String(t[r]).includes(n[o]))return!1}else if(t[r]!==n)return!1}return!0},VO=(t,{order:e,limit:r,offset:n,single:o})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,a=e.asc!==!1;s.sort((c,l)=>c[i]<l[i]?a?-1:1:c[i]>l[i]?a?1:-1:0)}return n&&(s=s.slice(n)),r&&(s=s.slice(0,r)),o?{data:s[0]||null,error:null}:{data:s,error:null}},UO=async({data:t,...e})=>QS(t,e),QS=(t={},e={})=>{let r={},n={},o=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(o)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(o)try{localStorage.setItem(s+f,JSON.stringify(r[f]))}catch{}},c=(f,u,d,g)=>{let h=n[f];if(h)for(let p of h)p(d,g,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...d})=>{let h=i(f).filter(p=>pf(p,u));return VO(h,d)},insert:async({from:f,data:u})=>{let d=i(f),h=(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 h)c(f,"INSERT",p,null);return{data:Array.isArray(u)?h:h[0],error:null}},update:async({from:f,data:u,params:d})=>{let g=i(f),h=[];for(let p=0;p<g.length;p++)if(pf(g[p],d)){let m={...g[p]};Object.assign(g[p],u),h.push(g[p]),c(f,"UPDATE",g[p],m)}return a(f),{data:h,error:null}},upsert:async({from:f,data:u,params:d})=>{let g=i(f),h=Array.isArray(u)?u:[u],p=[];for(let m of h){let y=d||(m.id!==void 0?{id:m.id}:null),w=y?g.findIndex(b=>pf(b,y)):-1;if(w>-1){let b={...g[w]};Object.assign(g[w],m),p.push(g[w]),c(f,"UPDATE",g[w],b)}else{let b={id:m.id||++l,...m};g.push(b),p.push(b),c(f,"INSERT",b,null)}}return a(f),{data:Array.isArray(u)?p:p[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),g=[];for(let h=d.length-1;h>=0;h--)pf(d[h],u)&&(g.push(d[h]),d.splice(h,1),c(f,"DELETE",null,g[g.length-1]));return a(f),{data:g,error:null}},subscribe:({from:f,on:u},d)=>{n[f]||(n[f]=[]);let g=(h,p,m)=>{u&&u!=="*"&&u!==m.event||d(h,p,m)};return n[f].push(g),()=>{let h=n[f].indexOf(g);h>-1&&n[f].splice(h,1)}}}}});var wf={};M(wf,{createAdapter:()=>GO,default:()=>nR,executeFetch:()=>oa,fetchPlugin:()=>Rg,initAdapterAuth:()=>bf,parseDuration:()=>Qi,queryClient:()=>rR,registerAdapter:()=>KO,resolveDb:()=>sx});var zO,HO,hf,Ji,gf,kg,WO,qO,KO,GO,sx,Qi,Wt,ix,jo,ax,na,ta,ea,mf,Eg,yf,YO,rx,Sg,cx,lx,Bo,nx,XO,ox,_f,vg,Ag,bf,Tg,we,$e,ra,Og,ZO,Cg,Dn,tr,Br,JO,QO,tR,xg,eR,oa,rR,Rg,nR,sa=U(()=>{"use strict";L();zO=["select","rpc","insert","update","upsert","delete","subscribe"],HO={rest:()=>Promise.resolve().then(()=>(JS(),ZS)),local:()=>Promise.resolve().then(()=>(ex(),tx))},hf=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),Ji=(()=>{if(typeof globalThis<"u"&&globalThis[hf])return globalThis[hf];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,hf,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[hf]}catch{}return t})(),gf=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),kg=(()=>{if(typeof globalThis<"u"&&globalThis[gf])return globalThis[gf];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,gf,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[gf]}catch{}return t})(),WO=5e3,qO=t=>new Promise(e=>{if(Ji[t])return e(Ji[t]);let r=kg[t]||=[],n=!1,o=()=>{n||(n=!0,e(Ji[t]||null))};r.push(o),setTimeout(o,WO)}),KO=(t,e)=>{Ji[t]=e;let r=kg[t];if(r&&r.length){kg[t]=[];for(let n of r)n()}},GO=t=>{let e={};for(let r of zO)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},sx=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,n=typeof e=="string"?e:typeof t=="string"?t:null;if(!n)return null;let o=Ji[n]||HO[n];if(!o&&(o=await qO(n),!o))throw new Error(`Unknown db adapter: "${n}". Use registerAdapter() for adapters with optional deps.`);let s=await o();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${n}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(r)},Qi=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]),n=e[2];return n==="ms"?r:n==="s"?r*1e3:n==="m"?r*6e4:n==="h"?r*36e5:0},Wt=new Map,ix=new Map,jo=new Map,ax=(t,e,r,n)=>{if(t.cache?.key)return t.cache.key;let{from:o,method:s,infinite:i,page:a}=t,c=r?`${r}:`:"",l=n?`:${n}`:"";return`${o}:${s}:${c}${JSON.stringify(e||"")}${i?":infinite":""}${a?":p"+JSON.stringify(a):""}${l}`},na=t=>Wt.get(t)||null,ta=(t,e,r)=>{let n=Wt.get(t),o={data:e,error:r,time:Date.now(),stale:!1};Wt.set(t,o);let s=ix.get(t);if(s)for(let i of s)R(i)&&i(o);return o},ea=t=>{if(t){let e=Wt.get(t);e&&(e.stale=!0);return}for(let[,e]of Wt)e.stale=!0},mf=t=>{if(t){Wt.delete(t);return}Wt.clear()},Eg=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)}:x(t)?{staleTime:Qi(t),gcTime:3e5}:{staleTime:Qi(t.stale||t.staleTime)||6e4,gcTime:Qi(t.gc||t.gcTime||t.expire)||3e5,key:t.key},yf=null,YO=()=>{yf||(yf=setInterval(()=>{let t=Date.now();for(let[e,r]of Wt){let n=ix.get(e);!(n&&n.size>0)&&t-r.time>(r.gcTime||3e5)&&Wt.delete(e)}},3e4),yf.unref&&yf.unref())};YO();rx=3,Sg=t=>Math.min(1e3*2**t,3e4),cx=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:rx,delay:Sg}:typeof e=="number"?{count:e,delay:Sg}:{count:e.count??rx,delay:R(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:Sg}},lx=async(t,e)=>{let{count:r,delay:n}=e,o;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(o=i.error,s<r){let a=R(n)?n(s,o):n;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(o=i,s<r){let a=R(n)?n(s,i):n;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:o}},Bo={focus:new Set,online:new Set},nx=!1,XO=()=>{if(nx||typeof window>"u")return;nx=!0;let t=()=>{for(let r of Bo.focus)r()},e=()=>{for(let r of Bo.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},ox=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(x(t))return{from:t,method:"select",query:!0,on:"create"};if(v(t)){let n={...t};return n.from=n.from||r.__state||e.key,n.method=n.method||"select",n.on=n.on||"create",n.query===void 0&&(n.query=!0),n}return null},_f=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},vg=(t,e)=>{let n=(t?.state?.root||e?.state?.root)?.__fetchScope;return n?String(n):void 0},Ag=(t,e,r)=>{let n;if(!t)n=void 0;else if(R(t))n=t(e,e.state);else{n={};for(let o in t){let s=t[o];n[o]=R(s)?s(e,e.state):s}}return n},bf=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(n,o)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:n,session:o,loading:!1}})};try{let n=await t.getSession();r(n?.user||null,n)}catch(n){console.warn("[fetch] Failed to restore auth session:",n.message)}t.onAuthStateChange&&t.onAuthStateChange((n,o)=>{r(o?.user||null,o)})},Tg=async(t,e)=>{if(R(t.select))return t.auth!==!1&&await bf(t,e),t;if(t.__resolved)return t.auth!==!1&&await bf(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=sx(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 bf(r,e),r):null},we=(t,e,...r)=>{let n=R(t[e])?t[e]:null;n&&n.call(t,...r,t,t.state,t.context)},$e=(t,e,r,...n)=>{let o=t&&R(t[r])?t[r]:null;o&&o.call(e,...n,e,e.state,e.context)},ra=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let o=new FormData(r);for(let[s,i]of o.entries())e[s]=i;return e}let n=r.querySelectorAll("input, textarea, select");for(let o=0;o<n.length;o++){let s=n[o],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},Og=t=>t.responseType==="stream"||t.responseType==="response",ZO=["Blob","File","ArrayBuffer","ReadableStream","Response"],Cg=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||ZO.includes(Object.prototype.toString.call(t).slice(8,-1))),Dn=(t,e,r,n={})=>{if(!r&&Cg(e))return;let o=r&&r.startsWith("~/"),s=o&&t.state?.root||t.state;if(s?.update)if(o){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&!Cg(e)&&i in e?s.update(e,{preventFetch:!0,...n}):s.update({[i]:e},{preventFetch:!0,...n})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...n})}},tr=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},Br=async(t,e,r,n={})=>{let o=r?.fetch;if(!o||!e||!e.__ref)return;let s=e.__ref,i=vg(e,r);(!s.__fetchScopeOwner||s.__fetchScopeOwner.scope!==i)&&(s.__fetchScopeOwner={scope:i});let a=s.__fetchScopeOwner,c=()=>e.__ref===s&&s.__fetchScopeOwner===a&&vg(e,r)===i;if(t.enabled===!1||R(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||R(t.skip)&&t.skip(e,e.state))return;let l=await Tg(o,r);if(!l||!c())return;let{from:f,method:u,query:d,params:g,cache:h,transform:p,single:m,auth:y,fields:w,as:b,limit:_,offset:S,order:k,headers:E,baseUrl:T,responseType:I,page:O,cursor:F,getNextPageParam:z,getPreviousPageParam:Q,infinite:Mt,placeholderData:yt,initialData:N,select:q,keepPreviousData:bt}=t,kt=x(q)?q:void 0;if(d&&R(e.getQuery)){let rt=e.getQuery(l.name||"paths");rt&&(kt=rt.select||rt.length&&rt.join(",")||kt)}let Rt=Ag(g,e,r),G=Og(t)?null:Eg(h),j=cx(t),et=_f(e,r),D=G?ax(t,Rt,i,et):null;if(!s.__fetchInitialized&&D&&(s.__fetchInitialized=!0,N!==void 0)){let rt=R(N)?N():N;ta(D,rt,null)}if((u==="select"||u==="rpc")&&D&&G){let rt=na(D);if(rt&&!rt.error){let V=Date.now()-rt.time,ct=rt.stale||V>(G.staleTime||0),H=rt.data;if(R(q)&&(H=q(H,e,e.state)),p&&(H=p(H,e,e.state)),!c())return;if(Dn(e,H,b),!ct){tr(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(yt!==void 0){let V=R(yt)?yt(e,e.state):yt;V!==void 0&&Dn(e,V,b)}}if(D&&jo.has(D)&&!n.force){let rt=jo.get(D);try{let V=await Promise.race([rt,new Promise((ct,H)=>setTimeout(()=>H("DEDUP_TIMEOUT"),15e3))]);if(!c())return;if(V?.data!==void 0){let ct=V.data;if(R(q)&&(ct=q(ct,e,e.state)),p&&(ct=p(ct,e,e.state)),!c())return;Dn(e,ct,b),we(e,"onFetchComplete",ct),$e(t,e,"onFetchComplete",ct)}}catch{if(!c())return}return}let X=!na(D)?.data;tr(e,{isFetching:!0,isLoading:X,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),we(e,"onFetchStart"),$e(t,e,"onFetchStart");let st=r?.analyze?.emitNetwork,Pe=st?typeof performance<"u"?performance.now():Date.now():0;st&&st({phase:"start",mode:"query",from:f,method:u,cacheKey:D,lang:et});let ii=lx(async()=>{if(!c())return;if(y!==!1&&l.auth!==!1&&l.getSession){let H=await l.getSession();if(!c())return;if(y===!0&&!H){let lt={message:"Not authenticated"};return tr(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:lt,status:"error",fetchStatus:"idle"}),we(e,"onFetchError",lt),$e(t,e,"onFetchError",lt),{data:null,error:lt}}}let rt=l[u];if(!R(rt))return{data:null,error:{message:`Method "${u}" not found on adapter`}};let V={from:f,select:kt,params:Rt,single:m,limit:_,offset:S,order:k,headers:E,baseUrl:T};I!==void 0&&(V.responseType=I);let ct=_f(e,r);if(ct&&(V.headers={...V.headers,"Accept-Language":ct}),O!==void 0){if(v(O))O.offset!==void 0&&(V.offset=O.offset),O.limit!==void 0&&(V.limit=O.limit),O.cursor!==void 0&&(V.params={...V.params,cursor:O.cursor});else if(typeof O=="number"){let H=t.pageSize||_||20;V.offset=(O-1)*H,V.limit=H}}if(F!==void 0&&(V.params={...V.params,cursor:F}),u==="insert"||u==="update"||u==="upsert"){let H;if(w===!0||t.on==="submit")H=ra(e);else if(P(w)){let lt=ra(e);H={};for(let ai of w)H[ai]=lt[ai]}else e.state?.parse?H=e.state.parse():v(e.state)&&(H={...e.state});p&&(H=p(H,e,e.state)),V.data=H}if(u==="rpc"){let H=Rt;if(t.on==="submit"){let lt=ra(e);H=t.transformParams?t.transformParams(lt,e,e.state):lt}V.params=H}if(u==="subscribe"){let H=l.subscribe({from:f,params:Rt,on:t.subscribeOn},(lt,ai,eF)=>{c()&&(Dn(e,lt,b),we(e,"onFetchComplete",lt),$e(t,e,"onFetchComplete",lt))});return c()?(s.__unsubscribe=H,{data:null,error:null,subscribed:!0}):(R(H)&&H(),{data:null,error:null,subscribed:!0})}return rt(V)},j);D&&jo.set(D,ii);try{let rt=await ii;if(!c()||rt?.subscribed)return;let{data:V,error:ct}=rt||{};if(ct){D&&ta(D,null,ct),tr(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:ct,status:"error",fetchStatus:"idle"}),we(e,"onFetchError",ct),$e(t,e,"onFetchError",ct),st&&st({phase:"error",mode:"query",from:f,method:u,cacheKey:D,error:ct.message||ct,durationMs:(typeof performance<"u"?performance.now():Date.now())-Pe});return}if(V!==void 0){if((u==="select"||u==="rpc")&&D){let lt=ta(D,V,null);lt.gcTime=G?.gcTime||3e5}let H=V;if(Mt&&P(V)&&(s.__pages||(s.__pages=[]),n.direction==="previous"?s.__pages.unshift(V):s.__pages.push(V),H=s.__pages.flat(),z&&(s.__nextPageParam=z(V,s.__pages),s.__hasNextPage=s.__nextPageParam!=null),Q&&(s.__prevPageParam=Q(V,s.__pages),s.__hasPreviousPage=s.__prevPageParam!=null)),R(q)&&(H=q(H,e,e.state)),p&&(H=p(H,e,e.state)),!c())return;(!bt||H!==void 0)&&Dn(e,H,b),tr(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),we(e,"onFetchComplete",H),$e(t,e,"onFetchComplete",H),st&&st({phase:"success",mode:"query",ok:!0,from:f,method:u,cacheKey:D,durationMs:(typeof performance<"u"?performance.now():Date.now())-Pe})}}catch(rt){if(!c())return;tr(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:rt,status:"error",fetchStatus:"idle"}),we(e,"onFetchError",rt),$e(t,e,"onFetchError",rt),st&&st({phase:"error",mode:"query",from:f,method:u,cacheKey:D,error:rt.message||String(rt),durationMs:(typeof performance<"u"?performance.now():Date.now())-Pe})}finally{D&&jo.get(D)===ii&&jo.delete(D)}},JO=(t,e,r)=>{let n=t.on,o=e.__ref;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||Br;if(n==="submit"){let i=c=>{c.preventDefault(),s(t,e,r)},a=e.node;a&&(a.addEventListener("submit",i),o.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(n==="click"){let i=()=>s(t,e,r),a=e.node;a&&(a.addEventListener("click",i),o.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else n==="stateChange"&&(o.__fetchOnStateChange=()=>s(t,e,r))},QO=(t,e,r)=>{let n=e.__ref;n.__fetchCleanups||(n.__fetchCleanups=[]),XO();let o=t.refetchInterval;if(o){let c=typeof o=="number"?o:Qi(o);if(c>0){let l=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&Br(t,e,r,{force:!0})},c);n.__fetchCleanups.push(()=>clearInterval(l))}}let s=Og(t),i=t.refetchOnWindowFocus===void 0?!s:t.refetchOnWindowFocus!==!1,a=t.refetchOnReconnect===void 0?!s:t.refetchOnReconnect!==!1;if(i){let c=()=>{let l=_f(e,r),f=vg(e,r),u=ax(t,Ag(t.params,e,r),f,l),d=na(u),g=Eg(t.cache);(!d||d.stale||Date.now()-d.time>(g?.staleTime||0))&&Br(t,e,r,{force:!0})};Bo.focus.add(c),n.__fetchCleanups.push(()=>Bo.focus.delete(c))}if(a){let c=()=>Br(t,e,r,{force:!0});Bo.online.add(c),n.__fetchCleanups.push(()=>Bo.online.delete(c))}},tR=(t,e,r)=>{if(!e.optimistic)return null;let n=t.__ref,o=e.as,s=t.state?.parse?t.state.parse():v(t.state)?{...t.state}:t.state;n.__optimisticSnapshot=s;let i=R(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&Dn(t,i,o),s},xg=(t,e)=>{let r=t.__ref,n=r.__optimisticSnapshot;n!==void 0&&(Dn(t,n,e.as),delete r.__optimisticSnapshot)},eR=async(t,e,r)=>{let n=r?.fetch;if(!n)return;let o=await Tg(n,r);if(!o)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:g,baseUrl:h,responseType:p,invalidates:m,optimistic:y,onMutate:w,onSuccess:b,onError:_,onSettled:S}=t,k;if(c===!0||u==="submit")k=ra(e);else if(P(c)){let O=ra(e);k={};for(let F of c)k[F]=O[F]}else e.state?.parse?k=e.state.parse():v(e.state)&&(k={...e.state});l&&(k=l(k,e,e.state)),R(w)&&w(k,e,e.state);let E=y?tR(e,t,k):null;s.__fetching=!0,tr(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),we(e,"onFetchStart"),$e(t,e,"onFetchStart");let T=r?.analyze?.emitNetwork,I=T?typeof performance<"u"?performance.now():Date.now():0;T&&T({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&o.auth!==!1&&o.getSession){let q=await o.getSession();if(d===!0&&!q){E!==void 0&&xg(e,t);let bt={message:"Not authenticated"};we(e,"onFetchError",bt),$e(t,e,"onFetchError",bt);return}}let O=o[i];if(!R(O))return;let F={from:a,data:k,headers:g,baseUrl:h};p!==void 0&&(F.responseType=p),t.params&&(F.params=Ag(t.params,e,r));let z=_f(e,r);z&&(F.headers={...F.headers,"Accept-Language":z});let Q=cx(t),Mt=await lx(()=>O(F),Q),{data:yt,error:N}=Mt||{};if(N){E!==void 0&&xg(e,t),tr(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:N,status:"error",fetchStatus:"idle"}),we(e,"onFetchError",N),R(_)&&_(N,k,e),R(S)&&S(null,N,k,e),T&&T({phase:"error",mode:"mutation",from:a,method:i,error:N.message||String(N),durationMs:(typeof performance<"u"?performance.now():Date.now())-I});return}if(delete s.__optimisticSnapshot,yt!==void 0&&(f||!Cg(yt))){let q=f?{[f]:yt}:yt;e.state?.update&&e.state.update(q,{preventFetch:!0})}if(tr(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),we(e,"onFetchComplete",yt),$e(t,e,"onFetchComplete",yt),R(b)&&b(yt,k,e),R(S)&&S(yt,null,k,e),T&&T({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-I}),m){let q=P(m)?m:[m];for(let bt of q)if(bt===!0||bt==="*")for(let[kt]of Wt)kt.startsWith(a+":")&&ea(kt);else ea(bt)}}catch(O){E!==void 0&&xg(e,t),tr(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:O,status:"error",fetchStatus:"idle"}),we(e,"onFetchError",O),$e(t,e,"onFetchError",O),R(_)&&_(O,k,e),R(S)&&S(null,O,k,e),T&&T({phase:"error",mode:"mutation",from:a,method:i,error:O.message||String(O),durationMs:(typeof performance<"u"?performance.now():Date.now())-I})}finally{s.__fetching=!1}},oa=(t,e,r,n)=>{if(!t||!n?.fetch)return;let s=pt(t,e);if(!s)return;let i=P(s)?s.map(c=>ox(pt(c,e),e)).filter(Boolean):[ox(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?eR:Br;c.on==="create"?f(c,e,n):Promise.resolve().then(()=>{JO({...c,__runner:f},e,n)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&QO(c,e,n)}let a=e.__ref;a.refetch=c=>{for(let l of i)Br(l,e,n,{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};Br(f,e,n,{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};Br(f,e,n,{direction:"previous",force:!0})}},rR={invalidateQueries:t=>{if(!t){ea();return}if(x(t))for(let[e]of Wt)(e.startsWith(t)||e.includes(t))&&ea(e);else if(P(t)){let e=t.join(":");for(let[r]of Wt)r.includes(e)&&ea(r)}},removeQueries:t=>{if(!t){mf();return}if(x(t))for(let[e]of Wt)(e.startsWith(t)||e.includes(t))&&mf(e)},getQueryData:t=>na(t)?.data??void 0,setQueryData:(t,e)=>{let r=na(t),n=R(e)?e(r?.data):e;ta(t,n,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let n=await Tg(r,e);if(!n)return;let o=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=n[t.method||"select"];if(!R(s))return;let i={from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single,headers:t.headers,baseUrl:t.baseUrl};t.responseType!==void 0&&(i.responseType=t.responseType);let a=await s(i);if(a?.data!==void 0&&!a?.error&&!Og(t)){let c=ta(o,a.data,null);c.gcTime=Eg(t.cache)?.gcTime||3e5}return a},getCache:()=>Wt,clear:()=>mf(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of Wt)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||mf(r))}},Rg={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||jo.clear(),oa(e,t,t.state,t.context))}},nR=oa});function aa(t){let e=this,{__ref:r}=e,n=[].concat(t),o=r.root[n[0]];if(!n||!n.length)return console.log(n,"on",e.key,"is undefined");for(;o.key===n[0]&&(n.shift(),!!n.length);)if(o=o[n[0]],!o)return;return o}function Dg(t){let e=this,{parent:r}=e;if(R(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 Lg(t){let e=this,{__ref:r}=e,n=r?.__children;if(n)for(let o=0;o<n.length;o++){let s=n[o],i=e[s];if(s===t)return i;if(R(t)){let c=t(i,i.state,i.context);if(i.state&&c)return i}let a=i?.lookdown?.(t);if(a)return a}}function Ig(t,e=[]){let r=this,{__ref:n}=r,o=n?.__children;if(o){for(let s=0;s<o.length;s++){let i=o[s],a=r[i];if(i===t)e.push(a);else if(R(t)){let c=t(a,a.state,a.context);a.state&&c&&e.push(a)}a?.lookdownAll?.(t,e)}return e.length?e:void 0}}function kf(t={}){let e=this;if(e.node?.style){for(let r in t){let n=t[r],o=e[r];if(v(n)&&o)kf.call(o,n);else if(n!=null){let s=r.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(n).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function ux(t){let e=this;if(gr("beforeRemove",e,t)===!1)return e;R(e.node.remove)?e.node.remove():Nr()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=_i(e.parent.__ref.__children,e.key)),gr("remove",e,t)}function $g(t){return this[t]}function Mg(t,e){let r=this;if(t)return r.update(t,e),r}function Fg(t){return t?this.__ref&&this.__ref[t]:this.__ref}function Ng(){let t=this.getRef("__children");return Array.isArray(t)?t.map(e=>this[e]):[]}function ca(){return this.getRef().path}function fa(t){let e=null,r=n=>n.__element&&n.root?.isRootState;if(!this)e=fx();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let n=this.state&&r(this.state),o=R(this.state)&&this.parent.state&&r(this.parent.state);(n||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=fx()),t?e?.[t]:e}function ua(t){let e=this?.__ref?.root||this.getRootState()?.__element;if(!e)throw new Error(`[smbls] getRoot() could not resolve a root element for "${this?.key||"<unknown>"}" \u2014 it has no __ref (never went through create()) and no root state is registered. Answering undefined here used to no-op silently for every caller.`);return Object.keys(e).length>0&&t?e[t]:e}function da(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function pa(t){let e=this.getRoot()?.context;return t?e[t]:e}function ha(t){let e=this.context;return t?e[t]:e}function vf(){let t=this,e=[];for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||$r.has(r)&&!vi.has(r)||e.push(r);return e}function Cf(t=[]){let e=this,r={},n=vf.call(e),o=n.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<n.length;i++){let a=n[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||o&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=R(c&&c.parse)?c.parse():c;r[a]=R(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 Tt(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=c)}return r}function ia(t=[],e=new WeakSet){let r=this;if(e.has(r))return;e.add(r);let n=Cf.call(r,t),o=t.length?new Set(t):null;for(let s in n){if(o&&o.has(s)||!Object.prototype.hasOwnProperty.call(r,s))continue;let i=n[s];Array.isArray(i)?n[s]=i.map(a=>B(a)?ia.call(a,t,e):a):B(i)&&(n[s]=ia.call(i,t,e))}return n}function Uo(...t){if(Vr!=="test"&&Vr!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(n=>console.log(`%c${n}:
|
|
22
|
+
`,"font-weight: bold",e[n])):(console.log(r.path),e.keys().forEach(o=>console.log(`%c${o}:`,"font-weight: bold",e[o]))),console.log(e),console.groupEnd(e.key),e}function Bg(...t){(Vr==="test"||Vr==="development")&&console.log(...t)}function ga(...t){(Vr==="test"||Vr==="development")&&console.warn(...t)}function Ln(...t){if(Vr==="test"||Vr==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&Uo.call(this),new Error(...t)}}function ma(){let t=this,{key:e,parent:r}=t,{__children:n}=r.__ref,o=n.indexOf(e),s=n[o+1];return r[s]}function ya(t){let e=t||this,{key:r,parent:n}=e,{__children:o}=n.__ref;if(!o)return;let s=o.indexOf(r);return n[o[s-1]]}function ba(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let r=e.data.varCaches,n={},o;for(let s in t)t[s]!==r[s]&&(o=!0,n[s]=t[s]);return{changed:s=>{if(!o)return;let i=s(n,ft(r));for(let a in n)r[a]=n[a];return i},timeout:(s,i)=>{if(!o)return;let a=setTimeout(()=>{s(n),clearTimeout(a)},i)}}}function Vg(t,...e){let r=this.context,n=r.utils?.[t]||r.functions?.[t]||r.methods?.[t]||r.snippets?.[t];if(n&&!Cn(n))try{let o=n.call(this,...e);return o&&typeof o.then=="function"&&o.catch(s=>{Ln.call(this,s)}),o}catch(o){if(Ln.call(this,o),r?.strictMode)throw o}}async function _a(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:o}=await Sf();await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await Sf();await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Sf().then(({resolveDb:o})=>o(e));e.__resolving=r;let n=await r;if(e.__resolved=n,t.context.fetch=n,delete e.__resolving,n?.getSession){let{initAdapterAuth:o}=await Sf();await o(n,t.context)}return n}function wa(t){let e=this,r=t||Zi.useStateQuery||e.context?.useStateQuery;if(!r)return null;let n={};if(Pg(e,n),r===!0)return n;let o=uR[r];return o?o(n):n}function Ug(t,e){return!!(Fr.has(t)||e?.context?.methods?.[t])}var Vr,xf,la,Vo,fx,jg,oR,Sf,Pg,sR,dx,iR,aR,cR,lR,fR,uR,px=U(()=>{"use strict";yg();xn();Dt();Ye();Ml();To();_g();Vr="production";xf=null,la=t=>{xf=t||null},Vo=(t,e)=>{t&&e&&xf===t&&(xf=e)},fx=()=>xf||null;jg=(t,e,r,n)=>Object.defineProperty(t,e,{get:r,set:n});oR="[smbls] getDB needs @symbo.ls/fetch, which the smbls embed bundle does not include: add @symbo.ls/fetch to the page's importmap (the runtime import then resolves) or use the full smbls bundle.",Sf=()=>Promise.resolve().then(()=>(sa(),wf)).catch(t=>{throw new Error(oR,{cause:t})});Pg=(t,e)=>{let r=t.__ref;if(!r)return;let n=r.__state;n&&typeof n=="string"&&sR(e,n);let o=r.__children;if(o)for(let a=0;a<o.length;a++){let c=t[o[a]];c&&c.__ref&&Pg(c,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&Pg(i,e)},sR=(t,e)=>{let n=e.replaceAll("../","").replaceAll("~/","").split("/"),o=t;for(let s=0;s<n.length;s++){let i=n[s];s===n.length-1?o[i]||(o[i]=!0):(o[i]===!0&&(o[i]={}),o[i]||(o[i]={}),o=o[i])}},dx=(t,e=0)=>{let r=" ".repeat(e),n=Object.entries(t);return n.length?n.map(([s,i])=>i===!0?`${r}${s}`:`${r}${s} {
|
|
23
|
+
${dx(i,e+1)}
|
|
24
24
|
${r}}`).join(`
|
|
25
|
-
`):""},
|
|
26
|
-
${
|
|
27
|
-
}`,
|
|
25
|
+
`):""},iR=t=>`{
|
|
26
|
+
${dx(t,1)}
|
|
27
|
+
}`,aR=t=>{let e={fields:{},include:[]},r=(n,o)=>{let s=[];for(let i in n)if(n[i]===!0)s.push(i);else{let a=o?`${o}.${i}`:i;e.include.push(a),r(n[i],a)}s.length&&(e.fields[o||"_root"]=s)};return r(t,""),e},cR=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:n}=e(t),o=[];return r&&o.push(`$select=${r}`),n&&o.push(`$expand=${n}`),o.join("&")},lR=(t,e)=>{let r=[],n=[],o=new Set,s=(f,u,d)=>{o.add(u),d&&n.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let g in f)f[g]===!0?r.push(`${u}.${g}`):s(f[g],g,u)},i=Object.keys(t);i.length===1&&t[i[0]]!==!0?s(t[i[0]],i[0],null):s(t,"_root",null);let a=[...o][0]||"_root",c=r.length?r.join(", "):"*",l=n.length?`
|
|
28
28
|
`+n.join(`
|
|
29
29
|
`):"";return`SELECT ${c}
|
|
30
|
-
FROM ${a}${l}`},
|
|
30
|
+
FROM ${a}${l}`},fR=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;n[s]===!0?e.push(i):r(n[s],i)}};return r(t,""),e},uR={graphql:iR,"json-api":aR,odata:cR,sql:lR,paths:fR}});var dR,zg,hx=U(()=>{"use strict";Il();dR={snapshotId:Li},zg=(t,e)=>{let r=t.__ref,{currentSnapshot:n,calleeElement:o}=e;if(!o||o===t){let a=dR.snapshotId();return r.__currentSnapshot=a,[a,t]}let i=o.__ref.__currentSnapshot;return n<i?[i,o,!0]:[i,o]}});var Ef,Hg,gx=U(()=>{Ef=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),Hg=t=>typeof t=="string"&&Ef.has(t)});async function Wg(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 mx=U(()=>{"use strict"});var zo,Ho,Sa,Se,Ur,Wo,xa,Me,Af,pR,zr,hR,In,$n,qg,yx=U(()=>{"use strict";zo=t=>t!=="latest"?`@${t}`:"",Ho=t=>t?`/${t}`:"",Sa=t=>{let e=typeof t=="string"?t.replace(/\/+$/,""):"";if(!e)return{name:"",subpath:""};let r=e.split("/"),n=e.startsWith("@")?2:1;return{name:r.slice(0,n).join("/"),subpath:r.slice(n).join("/")}},Se={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,r)=>`${Se.skypack.url}/${t}${zo(e)}${Ho(r)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,r)=>`${Se.esmsh.url}/${t}${zo(e)}${Ho(r)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,r)=>`${Se.unpkg.url}/${t}${zo(e)}${Ho(r)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,r)=>`${Se.jsdelivr.url}/${t}${zo(e)}${Ho(r)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,r)=>`${Se.symbols.url}/${t}${zo(e)}${Ho(r)}/+esm`}},Ur={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},Wo=(t={})=>{let{packageManager:e}=t;return Ur[e]||null},xa=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},Me=(t,e="latest",r="esmsh")=>{let n=Se[r]||Se.esmsh,{name:o,subpath:s}=Sa(t);return n.formatUrl(o||t,xa(e),s)},Af=(t,e="latest",r="esmsh")=>{let n=Se[r]||Se.esmsh,o=xa(e),{name:s,subpath:i}=Sa(t);return`${n.url}/${s||t}${zo(o)}${Ho(i)}/`},pR=/^node:|^@symbo-ls\//,zr=t=>typeof t=="string"&&pR.test(t),hR=/[<>…]/,In=t=>typeof t=="string"&&hR.test(t),$n=t=>!!t&&typeof t=="object"&&!Array.isArray(t),qg=(t,e="skypack",r={})=>{let n=t.dependencies;if(!$n(n))return"";let o=Object.keys(n);if(!o.length)return"";let s=r.pin||{},i={};for(let f of o){if(zr(f)||In(f))continue;let u=s[f]||n[f]||"latest";i[f]=Me(f,u,e),f.endsWith("/")||(i[f+"/"]=Af(f,u,e))}if(!Object.keys(i).length)return"";let a='<script type="importmap">',c="<\/script>",l=`{
|
|
31
31
|
"imports": ${JSON.stringify(i,null,2)}
|
|
32
|
-
}`;return`${a}${l}${c}`}});var zg,uS=U(()=>{"use strict";zg=t=>{if(!t)return"";let e=new Date(t),r=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),n=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${n}, ${r}`}});var Hg,dS=U(()=>{"use strict";Hg=(t,e)=>{let r=setTimeout(()=>{let{props:n}=t;if(!e.clientHeight){let{node:{clientHeight:o}}=t;o&&(e.clientHeight=o)}if(e.active){if(n.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let o=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(o)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(r)})}});var Wg,pS=U(()=>{"use strict";Wg=function(e){let r=[0,1];for(let n=2;n<=e;n++)r[n]=r[n-1]+r[n-2];return r[e]}});var qg,hS=U(()=>{"use strict";qg=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function zo(t,e={}){let{window:r=globalThis}=e,{document:n=r.document}=e;return new Promise((o,s)=>{let i=n.querySelector(`script[src="${t}"]`);if(i)return o(i);let a=n.createElement("script");a.src=t,a.async=e.async===!0,a.type=e.type||"text/javascript",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},n.head.appendChild(a)})}async function Jg(t,e={}){let{window:r=globalThis}=e,{document:n=r.document}=e;return new Promise((o,s)=>{let i=n.querySelector(`link[href="${t}"]`);if(i)return o(i);let a=n.createElement("link");a.href=t,a.rel=e.rel||"stylesheet",a.type="text/css",a.media=e.media||"all",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},n.head.appendChild(a)})}var Kg,Gg,Yg,Xg,Zg,gS=U(()=>{"use strict";Kg=(t,e=!1,r=document,n="text/javascript")=>new Promise((o,s)=>{try{let i=r.createElement("script");i.type=n,i.async=e,i.src=t,i.addEventListener("load",a=>{o({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),r.body.appendChild(i)}catch(i){s(i)}}),Gg=(t,e=document,r="text/javascript")=>new Promise((n,o)=>{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),n()},s.onerror=()=>{e.body.removeChild(i),o(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),Yg=(t,e=document,r,n="text/javascript")=>{let o=new window.XMLHttpRequest;if(o.open("GET",t,!1),o.send(),o.status===200){let s=e.createElement("script");s.type=n,s.text=o.responseText,e.body.appendChild(s),typeof r=="function"&&r()}else throw new Error(`Failed to load the script ${t}`)},Xg=(t,e=!1,r=document,n="text/javascript")=>new Promise((o,s)=>{try{let i=r.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{o({status:!0})}),r.head.appendChild(i)}catch(i){s(i)}}),Zg=(t,e=!1,r=document,n="text/javascript",o="smbls-script")=>{try{let s=r.createElement("script");s.type=n,s.async=e,s.id=o,s.innerHTML=t,r.body.appendChild(s)}catch(s){console.warn(s)}}});function In(t,e){if(!e||typeof e!="object")return t;let r=o=>!QO(o)||!Object.prototype.hasOwnProperty.call(e,o)?o:Cf(e[o])||o,n={...t};for(let[o,s]of Object.entries(n))typeof s=="string"?n[o]=r(s):Array.isArray(s)&&(n[o]=s.map(i=>typeof i=="string"?r(i):i));return n}function tm(t,e){if(!t||!e)return;let r=e.split("."),n=t;for(let o of r){if(n==null||typeof n!="object")return;n=n[o]}return n}function tR(t,e){let r=tm(t,e);if(typeof r=="number")return Number.isFinite(r)?r:void 0;if(typeof r=="string"&&!To(r))return r}function eR(t,e,r){let o=(e.config||e.settings||{}).polyglot||e.polyglot,s=r?.lang||o?.defaultLang||"en",a=(o?.translations||{})[s]||{},c=[r?.state,e.state].filter(u=>u&&typeof u=="object"),l=u=>{for(let d of c){let g=tR(d,u);if(g!==void 0)return g}},f={...t};for(let[u,d]of Object.entries(f))typeof d!="string"||!d.includes("{{")||(f[u]=d.replace(/\{\{\s*([^|{}]+?)\s*(?:\|\s*(\w+)\s*)?\}\}/g,(g,p,h)=>{let m=p.trim();if(h==="polyglot")return a[m]??tm(a,m)??g;if(h==="getLocalStateLang")return l(m+s)??g;let y=l(m);return y!==void 0?y:a[m]??tm(a,m)??g}));return f}function mS(t){if(!v(t))return{};let e={...t};for(let[r,n]of Object.entries(e))if(typeof n=="function"){let o=n.toString(),s=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[r]=`{{ ${i[1]} | polyglot }}`;continue}let a=o.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[r]=`{{ ${a[1]} }}`;continue}delete e[r]}else if(typeof n=="string"){let o=n.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(o){e[r]=`{{ ${o[1]} | getLocalStateLang }}`;continue}let s=n.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | polyglot }}`;continue}if(n.includes("=>")&&n.includes("s.")){let i=n.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[r]=`{{ ${i[1]} }}`;continue}}To(n)&&delete e[r]}return e}function rm(t,e,r,{isProduction:n=!1,channel:o="production"}={}){let s=t.pages?.[e],i=v(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=mS(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=mS(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let h=t.name||t.key;h?n?d.title=h:o==="development"?d.title=`${h} / dev:symbo.ls`:o==="staging"?d.title=`${h} / staging:symbo.ls`:d.title=`${h} / symbo.ls`:d.title="Symbols demo"}d=eR(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 g=r?.actualPathname||e;if(d["og:url"]||d.url){let h=(d["og:url"]||d.url||"").replace(/\/$/,"");if(h&&g&&g!=="/"){let m=g.startsWith("/")?g:"/"+g;d["og:url"]=h+m}}d=In(d,t.files);let p=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[h,m]of Object.entries(d))if(typeof m=="string"&&m.includes("{{")){let y=m.replace(/\{\{[^}]*\}\}/g,"").trim();y?d[h]=y:h==="title"?d[h]=p:delete d[h]}return d}var Lt,ZO,Ho,JO,vf,em,QO,Qg,Cf,yS=U(()=>{"use strict";Dt();Tn();Lt=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,r=>e[r])},ZO=t=>Object.entries(t||{}).filter(([e,r])=>r!==void 0).map(([e,r])=>`${e}="${Lt(r)}"`).join(" "),Ho=t=>{let e=5381,r=String(t);for(let n=0;n<r.length;n++)e=(e*33^r.charCodeAt(n))>>>0;return e.toString(36)},JO=new Set(["jsonLd","styles","scripts"]),vf=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let r of t.jsonLd){if(r==null)continue;let n=typeof r=="string"?r:JSON.stringify(r),o=String(n).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Ho(n)}">${o}<\/script>`)}if(Array.isArray(t.styles))for(let r of t.styles){if(r==null||!String(r).trim())continue;let n=String(r).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Ho(n)}">${n}</style>`)}if(Array.isArray(t.scripts))for(let r of t.scripts){if(!r)continue;let n=typeof r=="string",o=n?r:r.src;if(!o&&!r.body)continue;let s=[];o&&s.push(`src="${Lt(o)}"`),n||(r.type&&s.push(`type="${Lt(r.type)}"`),r.async&&s.push("async"),r.defer&&s.push("defer"),r.integrity&&s.push(`integrity="${Lt(r.integrity)}"`),r.crossorigin&&s.push(`crossorigin="${Lt(r.crossorigin)}"`),r.referrerpolicy&&s.push(`referrerpolicy="${Lt(r.referrerpolicy)}"`),r.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Lt(o||Ho(r.body||""))}"`;if(!n&&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},em=(t,e)=>{e||(t={...t,robots:"noindex"});let r=Object.entries(t).reduce((n,[o,s])=>{if(!s&&s!==0&&s!==!1||JO.has(o))return n;if(o==="title")return n.push(`<title>${Lt(s)}</title>`),n;if(o==="canonical")return n.push(`<link rel="canonical" href="${Lt(s)}">`),n;if(o==="manifest")return n.push(`<link rel="manifest" href="${Lt(s)}">`),n;if(o==="favicon"||o==="favicons"||o==="icon"||o==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="string")n.push(`<link rel="icon" href="${Lt(f)}">`);else if(typeof f=="object"){let u=ZO(f);/rel=/.test(u)?n.push(`<link ${u}>`):n.push(`<link rel="icon" ${u}>`)}}),n;if(o==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).filter(([d,g])=>g!==void 0).map(([d,g])=>`${d}="${Lt(g)}"`).join(" ");n.push(`<link rel="alternate" ${u}>`)}}),n;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")n.push(`<meta ${u}="${Lt(l)}" content="${Lt(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")n.push(`<meta ${u}="${Lt(l)}" content="${Lt(d)}">`);else if(typeof d=="object"){let g=Object.entries(d).filter(([p,h])=>h!==void 0).map(([p,h])=>`${p}="${Lt(h)}"`).join(" ");n.push(`<meta ${g}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([g,p])=>p!==void 0).map(([g,p])=>`${g}="${Lt(p)}"`).join(" ");n.push(`<meta ${d}>`)}};if(o.startsWith("http-equiv:")){let l=o.replace("http-equiv:","");return i(l,s,"http-equiv"),n}if(o.startsWith("itemprop:")){let l=o.replace("itemprop:","");return i(l,s,"itemprop"),n}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>o.startsWith(l));if(c){let l=o.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),n}if(o.startsWith("apple:")||o.startsWith("msapplication:")){let l=o.startsWith("apple:")?"apple-":"msapplication-",f=o.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),n}return i(o,s),n},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return r.push(...vf(t)),r.join(`
|
|
33
|
-
`)},QO=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http"),Qg=t=>typeof t=="string"&&t.length>0,Cf=t=>{if(!t||typeof t!="object")return null;if(Qg(t.src))return t.src;let e=t.content;return!e||typeof e!="object"?null:Qg(e.src)?e.src:Qg(e.storageUrl)?e.storageUrl:null}});var Ef,nm,bS=U(()=>{"use strict";Dt();Ef=(t,e)=>(P(e)?e:Object.values(e)).reduce((r,n)=>Math.abs(n-t)<Math.abs(r-t)?n:r),nm=(t,e)=>(t=parseFloat(t),v(e)&&(e=Object.values(e)),Ef(t,e))});function $n(t){let e=String(t||"").trim();if(!e)return{owner:om,key:"",full:""};let r=null,n=e;if(e.includes("/")){let s=e.indexOf("/");r=e.slice(0,s),n=e.slice(s+1)}n=n.replace(/\.symbo\.ls$/iu,""),r||(r=om);let o=n?`${r}/${n}`:"";return{owner:r,key:n,full:o}}async function Af(t,e={}){if((e.provider||"kv")==="api")return wS(t,e);let n=await gR(t,e);return n||wS(t,e)}async function gR(t,e={}){let r=e.kvBaseUrl||rR,n=e.env||"production",o=`${r}/kv/${encodeURIComponent(t)}?env=${n}`;try{let s=await fetch(o,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function wS(t,e={}){let r=e.apiBaseUrl||nR,{key:n}=$n(t);try{let o=`${r}/core/projects/libraries/available?search=${encodeURIComponent(n)}&limit=10`,s=await fetch(o,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(g=>{let{key:p}=$n(g?.key);return p.toLowerCase()===n.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 SS(t,e={}){if(v(t))return t;if(k(t)){let{full:r}=$n(t);if(!r)return null;try{let n=await Af(r,e);return n||console.warn(`[smbls] Shared library "${r}" not found`),n}catch(n){return console.warn(`[smbls] Failed to fetch shared library "${r}":`,n.message),null}}return null}async function cm(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async n=>{if(mr(n)){let o=await SS(ES(n),e);return o?{library:o,ignoreList:n.ignoreList}:null}return SS(n,e)}))).filter(Boolean)}var om,rR,nR,Wo,kS,oR,sR,_S,vS,xS,CS,iR,xa,im,mr,ES,sm,am,aR,cR,AS,lR,fR,uR,dR,pR,hR,TS,wa,Sa,OS=U(()=>{"use strict";Dt();wn();Dl();om="system",rR="https://smbls-kv.nika-980.workers.dev",nR="https://api.symbols.app";Wo=(t,e,r,n)=>{for(let o in e){let s=n?`${n}/${o}`:o;r&&r.has(s)||(o in t?v(t[o])&&v(e[o])&&Wo(t[o],e[o],r,s):t[o]=e[o])}},kS=(t,e,r)=>{if(!v(t)||!e.size)return t;let n=`${r}/`,o=!1;for(let i of e)if(i.startsWith(n)){o=!0;break}if(!o)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]=kS(t[i],e,a))}return s},oR=new Set,sR=new Set(["components","pages","functions","snippets","methods"]),_S=(t,e)=>e===""&&sR.has(t),vS=["fontFamily","fontfamily","font_family","FONT_FAMILY"],xS=t=>{let e=new Map;if(!v(t))return e;for(let r of vS){let n=t[r];if(v(n))for(let o in n)!v(n[o])||!n[o].isDefault||(e.has(r)||e.set(r,new Set),e.get(r).add(o))}return e},CS=(t,e)=>{for(let r of vS){let n=t[r];if(!v(n))continue;let o=e.get(r),s=null;for(let i in n){let a=n[i];if(!v(a)||!a.isDefault||o&&o.has(i))continue;let c={...a};delete c.isDefault,s||(s={...n}),s[i]=c}s&&(t[r]=s)}},iR=t=>t.replace(/\.js$/iu,""),xa=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let r of t){if(!k(r))continue;let n=r.split("/").map(o=>iR(o.trim())).filter(Boolean).join("/");n&&e.add(n)}return e},im=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),mr=t=>v(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),ES=t=>t.library!==void 0?t.library:t.key??t.name,sm=new Set,am=()=>{sm.clear()},aR=(t,e)=>{let r=e.filter(n=>!sm.has(n));if(r.length){for(let n of r)sm.add(n);mt()&&console.warn(`[smbls] shared library "${t}" ships ${r.map(n=>`methods.${n}`).join(", ")} \u2014 named like a built-in element method. Refused: the built-in wins; a library cannot replace an element method on the consuming app. If the app wants this version, declare it in the app's OWN methods.`)}},cR=(t,e,r)=>{let n=null;for(let o in t)if(xn(o)&&(e.has(`methods/${o}`)||r.push(o),!n)){n={};for(let s in t)xn(s)||(n[s]=t[s])}return n||t},AS=(t,e)=>{let r=xa(t.sharedLibIgnore);return t.sharePages===!1&&r.add("pages"),r.size?new Set([...e,...r]):e},lR=(t,e,r,n="library")=>{let o=AS(e,r),s=[];for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&!(i==="sharePages"||i==="sharedLibIgnore")&&i!=="app"&&!o.has(i)){if(v(e[i])&&v(t[i])){if(i==="designSystem")Wo(t[i],e[i],o,i);else for(let a in e[i])if(!o.has(`${i}/${a}`)){if(i==="methods"&&xn(a)){a in t[i]||s.push(a);continue}a in t[i]?_S(i,t[i][a])&&!_S(i,e[i][a])&&(t[i][a]=e[i][a]):t[i][a]=e[i][a]}}else if(!(i in t)){let a=e[i],c=i==="methods"&&a&&typeof a=="object"?cR(a,o,s):a;t[i]=kS(c,o,i)}}s.length&&aR(n,s)},fR=(t,e,r)=>{if(t!==e){let n=ES(t);if(k(n)&&n)return n;if(t.key||t.name)return t.key||t.name}return e&&(e.key||e.name)||`sharedLibraries[${r}]`},uR=`${om}/default`,dR=t=>k(t)&&t!==""&&$n(t).full===uR,pR=(t,e)=>{if(k(e.key)&&e.key)return e.key;if(t!==e){if(k(t.key)&&t.key)return t.key;if(k(t.name)&&t.name)return t.name}return null},hR=t=>{let e=[],r=[];for(let n=0;n<t.length;n++){let o=t[n],s=o,i=oR;if(mr(s)&&(i=xa(s.ignoreList),s=s.library),!v(s))continue;let a={entry:o,lib:s,ignore:i,index:n};dR(pR(o,s))?r.push(a):e.push(a)}return{linked:e,bases:r}},TS=(t,e,r)=>{let n=xS(e()),{linked:o,bases:s}=hR(t);for(let a of o)r(a);let i=!n.size&&s.length?xS(e()):null;for(let a of s)r(a);return n.size?n:i&&i.size?i:null},wa=(t,e)=>{if(!e||!e.length)return;let r=t.designSystem,n=TS(e,()=>t.designSystem,({entry:o,lib:s,ignore:i,index:a})=>lR(t,s,i,fR(o,s,a)));n&&(t.designSystem!==r&&(t.designSystem={...t.designSystem}),CS(t.designSystem,n))},Sa=(t,e,r=Wo)=>{if(!v(t)||!Array.isArray(e)||!e.length)return t;let n=TS(e,()=>t,({lib:o,ignore:s})=>{let i=o.designSystem;if(!i||typeof i!="object")return;let a=AS(o,s);a.has("designSystem")||r(t,i,a,"designSystem")});return n&&CS(t,n),t}});var lm,fm,um,ka,dm,va,pm,Mn,RS=U(()=>{"use strict";Dt();lm=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},fm=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)}},um=t=>t.replace(/[^a-zA-Z0-9_]/g,""),ka=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,"")),dm=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),va=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),pm=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},Mn=t=>{if(P(t))return t;if(k(t))return t.split(" ");if(v(t))return Object.values(t);if(Ge(t))return[t]}});var hm,PS=U(()=>{"use strict";hm=()=>{let t=document.styleSheets[0],e="";if(t)try{let r=t.cssRules||t.rules;for(let n=0;n<r.length;n++)e+=r[n].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 Zt,qo,Ca,Ea,DS=U(()=>{"use strict";Zt=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let r=t.context;if(!r)return null;let n=r.assets&&r.assets[e]||r.files&&r.files[e];if(!n)return null;if(typeof n=="string")return{src:n,type:null,variants:null};if(typeof n=="object"){if(typeof n.src=="string")return n;let o=n.content,s=o&&o.src;if(typeof s=="string")return{...n,src:s,type:n.type??o.type??null,variants:n.variants??o.variants??null}}return null},qo=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let r=t.some(o=>typeof o.width=="number"),n=[];for(let o of t)r&&typeof o.width=="number"?n.push(`${o.src} ${o.width}w`):r||(o.scale===1&&e?n.push(o.src):o.scale&&o.scale!==1&&n.push(`${o.src} ${o.scale}x`));return n.join(", ")},Ca=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(r=>r.format===t.type);return qo(e,{keepOneX:!1})},Ea=(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 n=[];for(let[a,c]of r)a!==t.type&&n.push({tag:"source",attr:{type:a,srcset:qo(c,{keepOneX:!0})}});let o=r.get(t.type)||[],s=qo(o,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...n,{tag:"img",attr:i}]}});var Ko={};M(Ko,{CDN_PROVIDERS:()=>_e,DOMQL_EVENTS:()=>rh,DOMQ_PROPERTIES:()=>$r,ELEMENT_METHOD_OVERRIDE_POINTS:()=>Eo,ENV:()=>wh,HTML_TAGS:()=>Po,METHODS:()=>Fr,METHODS_EXL:()=>Si,NODE_ENV:()=>Ie,OPTIONS:()=>Gi,PACKAGE_MANAGER_TO_CDN:()=>Ur,PARSED_DOMQ_PROPERTIES:()=>wi,PROPS_METHODS:()=>Mr,REVIVED_MARK:()=>Ei,STATE_METHODS:()=>_n,STATE_PROPERTIES:()=>th,SVG_TAGS:()=>kw,TYPES:()=>hi,UNIVERSAL_RESERVED_KEYS:()=>Sf,__resetBuiltinMethodWarnings:()=>am,addCaching:()=>tf,addContext:()=>Ql,addExtend:()=>Hh,addExtends:()=>Ye,addItemAfterEveryElement:()=>Vp,addProtoToArray:()=>yi,addRef:()=>Xl,applyDependentState:()=>lg,applyEvent:()=>af,applyEventUpdate:()=>cf,applyExtends:()=>Ew,applyProps:()=>Vi,arrayContainsOtherArray:()=>Ip,arraysEqual:()=>zp,arrayzeValue:()=>Mn,buildImgSrcset:()=>Ca,buildSourcesAndImg:()=>Ea,cache:()=>hg,call:()=>Fg,captureSnapshot:()=>jg,checkForStateTypes:()=>sg,checkIfInherits:()=>sf,checkIfStringIsInArray:()=>qp,clone:()=>sh,cloneAndMergeArrayExtend:()=>Li,cloneFunction:()=>Th,collectExtendsList:()=>Do,concatAddExtends:()=>Vh,copyJavaScriptToClipboard:()=>fm,copyStringToClipboard:()=>lm,createBasedOnType:()=>Yl,createElement:()=>og,createElementExtends:()=>Fl,createExtends:()=>$i,createExtendsFromKeys:()=>Lo,createExtendsStack:()=>Vl,createIfConditionFlag:()=>Oh,createInheritedState:()=>ig,createKey:()=>Pi,createNestedObject:()=>hh,createNestedObjectByKeyPath:()=>cg,createObjectWithoutPrototype:()=>Ol,createParent:()=>Zl,createPath:()=>Jl,createProps:()=>Ui,createPropsStack:()=>Kl,createRoot:()=>ng,createScope:()=>ug,createSnapshotId:()=>Ri,customDecodeURIComponent:()=>Qp,customEncodeURIComponent:()=>Jp,cutArrayAfterValue:()=>jp,cutArrayBeforeValue:()=>Np,debounce:()=>Di,debounceOnContext:()=>Eh,decodeNewlines:()=>Zp,deepClone:()=>ft,deepContains:()=>dh,deepDefaults:()=>Wo,deepDestringifyFunctions:()=>me,deepExtend:()=>Ml,deepMerge:()=>it,deepMergeExtends:()=>Xe,deepStringifyFunctions:()=>vi,defineSetter:()=>$g,destringifyGlobalScope:()=>Ai,detectHeightOnInit:()=>Hg,detectInfiniteLoop:()=>bh,document:()=>nt,encodeNewlines:()=>Xp,error:()=>Pn,excludeKeysFromObject:()=>xh,exec:()=>pt,extendCachedRegistry:()=>Uh,extendStackRegistry:()=>Mi,extractArrayExtend:()=>Ni,fetchLibraryData:()=>Af,fibonacciNumberByIndex:()=>Wg,fileEntryUrl:()=>Cf,filterArrays:()=>Hp,filterArraysFast:()=>Wp,finalizeExtends:()=>Ul,findClosestNumber:()=>Ef,findClosestNumberInFactory:()=>nm,findInheritedState:()=>of,findKeyPosition:()=>Gp,flattenExtend:()=>Io,formatDate:()=>zg,generateHash:()=>Ll,generateHeadArrayTags:()=>vf,generateKey:()=>Oi,generateMetaTags:()=>em,get:()=>Pg,getCDNDirUrl:()=>kf,getCDNUrl:()=>Me,getCapitalCaseKeys:()=>Kh,getCdnProviderFromConfig:()=>Uo,getChildStateInKey:()=>nf,getChildren:()=>Ig,getContext:()=>ua,getCookie:()=>Ih,getDB:()=>ma,getEmotionStylesheet:()=>hm,getExtendsInElement:()=>Wh,getExtendsStack:()=>Ii,getExtendsStackRegistry:()=>$l,getFrequencyInArray:()=>$p,getFunctionSource:()=>Le,getHashedExtend:()=>Fi,getImportMapScript:()=>Ug,getInObjectByPath:()=>yh,getLocalStorage:()=>Mh,getNev:()=>Ch,getPageMetadata:()=>rm,getParentStateInKey:()=>rf,getPath:()=>sa,getQuery:()=>ya,getRef:()=>Lg,getRoot:()=>ca,getRootContext:()=>fa,getRootData:()=>la,getRootState:()=>aa,getRootStateInKey:()=>ef,getSpreadChildren:()=>Gh,global:()=>Pp,hasFunction:()=>De,hasHandlerPlugin:()=>Oo,hasOwnProperty:()=>lh,hashContent:()=>Ho,inheritChildExtends:()=>jl,inheritChildPropsExtends:()=>Nl,inheritParentProps:()=>zi,inheritRecursiveChildExtends:()=>Bl,initProps:()=>tg,is:()=>Xt,isArray:()=>P,isBoolean:()=>Sl,isBuiltinElementMethod:()=>eh,isContextComponent:()=>Yh,isCyclic:()=>_h,isDOMNode:()=>Yt,isDate:()=>vl,isDefined:()=>Tt,isDevelopment:()=>jr,isEmpty:()=>Al,isEmptyObject:()=>fh,isEqualDeep:()=>Tl,isFailedRevival:()=>vn,isFunction:()=>R,isHtmlElement:()=>di,isLazyFunction:()=>ih,isLocal:()=>vh,isLoudDevRuntime:()=>mt,isMalformedDependency:()=>Dn,isMethod:()=>Ng,isMobile:()=>Dh,isNode:()=>dr,isNot:()=>Lp,isNotProduction:()=>An,isNull:()=>kl,isNumber:()=>Ge,isObject:()=>v,isObjectLike:()=>B,isPhoto:()=>qg,isPolyglotRetranslatableKey:()=>Ki,isPolyglotWritableKey:()=>On,isProduction:()=>Nr,isProtectedElementMethod:()=>xn,isRevived:()=>Cn,isStaging:()=>kh,isState:()=>ag,isString:()=>k,isStringFunction:()=>To,isStringTag:()=>ah,isTest:()=>Pl,isTesting:()=>Sh,isUndefined:()=>Pt,isUniversallyReservedKey:()=>Bg,isUnresolvableDependency:()=>zr,isValidDependencyMap:()=>Ln,isValidHtmlTag:()=>Nh,isWrappedLibrary:()=>mr,joinArrays:()=>ko,jointStacks:()=>zh,keys:()=>xf,loadCssFile:()=>Xg,loadJavascript:()=>Zg,loadJavascriptFile:()=>Kg,loadJavascriptFileEmbedSync:()=>Yg,loadJavascriptFileSync:()=>Gg,loadRemoteCSS:()=>Jg,loadRemoteScript:()=>zo,log:()=>Mg,logGroupIf:()=>Ph,logIf:()=>Rh,lookdown:()=>Og,lookdownAll:()=>Rg,lookup:()=>Tg,lowercaseFirstLetter:()=>bn,makeObjectWithoutPrototype:()=>uh,map:()=>oh,mapStringsWithContextComponents:()=>ji,markPolyglotSeeded:()=>Je,markRevived:()=>Ao,matchesComponentNaming:()=>Ze,memoize:()=>Ah,merge:()=>_t,mergeSharedLibraries:()=>wa,mergeSharedLibraryDesignSystems:()=>Sa,nextElement:()=>pa,normalizeIgnoreList:()=>xa,normalizeLibraryKey:()=>$n,objectToString:()=>Ci,objectizeStringProperty:()=>Bi,overwrite:()=>Ti,overwriteDeep:()=>zt,overwriteShallow:()=>En,overwriteState:()=>fg,parse:()=>wf,parseDeep:()=>na,pickupElementFromProps:()=>Wl,pickupPropsFromElement:()=>Hl,polyglotSeededKeys:()=>$o,previousElement:()=>ha,promoteActiveRootState:()=>No,propExists:()=>Jh,propertizeElement:()=>ql,propertizeUpdate:()=>Zh,remove:()=>oS,removeChars:()=>um,removeCookie:()=>$h,removeDuplicateProps:()=>Wi,removeDuplicatesInArray:()=>vo,removeFromArray:()=>Mp,removeFromObject:()=>ph,removeNestedKeyByPath:()=>gh,removeValueFromArray:()=>mi,removeValueFromArrayAll:()=>Bp,reorderArrayByValues:()=>Up,replaceLiteralsWithObjectFields:()=>Ft,replaceOctalEscapeSequences:()=>Yp,resolveAsset:()=>Zt,resolveFileReferences:()=>In,resolveHandler:()=>Ro,resolveSharedLibraries:()=>cm,returnValueAsText:()=>Gl,runPluginHook:()=>Ot,self:()=>Dp,setActiveRootState:()=>ia,setCookie:()=>Lh,setHashedExtend:()=>Il,setInObjectByPath:()=>mh,setLocalStorage:()=>Fh,setNodeStyles:()=>_f,setProps:()=>Dg,setPropsPrototype:()=>Hi,sharedLibrary:()=>im,splitPackageSpecifier:()=>ba,spotByPath:()=>oa,srcsetFor:()=>qo,stringIncludesAny:()=>_i,stringToObject:()=>ch,stripVersionRangePrefix:()=>_a,swapItemsInArray:()=>Fp,syncProps:()=>qi,toCamelCase:()=>ka,toDashCase:()=>va,toDescriptionCase:()=>pm,toPriorityOrder:()=>ye,toTitleCase:()=>dm,toggleFullscreen:()=>Vg,triggerEventOn:()=>hr,triggerEventOnUpdate:()=>dg,trimStringFromSymbols:()=>Kp,unstackArrayOfObjects:()=>gi,update:()=>Qh,updateProps:()=>eg,variables:()=>ga,verbose:()=>jo,warn:()=>da,window:()=>C});var L=U(()=>{"use strict";Rl();Dl();Dt();pr();Tn();Co();pi();xw();ww();xi();ui();Sw();jh();qh();rg();zl();Dw();Fw();wn();Nw();iS();gg();aS();pg();cS();lS();fS();uS();dS();pS();hS();gS();yS();bS();OS();RS();PS();DS()});var yA=dp((Zz,mA)=>{var Ks=1e3,Gs=Ks*60,Ys=Gs*60,ho=Ys*24,h$=ho*7,g$=ho*365.25;mA.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return m$(t);if(r==="number"&&isFinite(t))return e.long?b$(t):y$(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function m$(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]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*g$;case"weeks":case"week":case"w":return r*h$;case"days":case"day":case"d":return r*ho;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*Gs;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ks;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function y$(t){var e=Math.abs(t);return e>=ho?Math.round(t/ho)+"d":e>=Ys?Math.round(t/Ys)+"h":e>=Gs?Math.round(t/Gs)+"m":e>=Ks?Math.round(t/Ks)+"s":t+"ms"}function b$(t){var e=Math.abs(t);return e>=ho?Md(t,e,ho,"day"):e>=Ys?Md(t,e,Ys,"hour"):e>=Gs?Md(t,e,Gs,"minute"):e>=Ks?Md(t,e,Ks,"second"):t+" ms"}function Md(t,e,r,n){var o=e>=r*1.5;return Math.round(t/r)+" "+n+(o?"s":"")}});var _A=dp((Jz,bA)=>{function _$(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=o,r.enabled=a,r.humanize=yA(),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,g,p;function h(...m){if(!h.enabled)return;let y=h,x=Number(new Date),b=x-(u||x);y.diff=b,y.prev=u,y.curr=x,u=x,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let _=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(S,E)=>{if(S==="%%")return"%";_++;let T=r.formatters[E];if(typeof T=="function"){let I=m[_];S=T.call(y,I),m.splice(_,1),_--}return S}),r.formatArgs.call(y,m),(y.log||r.log).apply(y,m)}return h.namespace=f,h.useColors=r.useColors(),h.color=r.selectColor(f),h.extend=n,h.destroy=r.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(g!==r.namespaces&&(g=r.namespaces,p=r.enabled(f)),p),set:m=>{d=m}}),typeof r.init=="function"&&r.init(h),h}function n(f,u){let d=r(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function o(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,g=0,p=-1,h=0;for(;d<f.length;)if(g<u.length&&(u[g]===f[d]||u[g]==="*"))u[g]==="*"?(p=g,h=d,g++):(d++,g++);else if(p!==-1)g=p+1,h++,d=h;else return!1;for(;g<u.length&&u[g]==="*";)g++;return g===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}bA.exports=_$});var xA=dp((ie,Fd)=>{ie.formatArgs=w$;ie.save=S$;ie.load=k$;ie.useColors=x$;ie.storage=v$();ie.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`."))}})();ie.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 x$(){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 w$(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Fd.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),t.splice(n,0,e)}ie.log=console.debug||console.log||(()=>{});function S$(t){try{t?ie.storage.setItem("debug",t):ie.storage.removeItem("debug")}catch{}}function k$(){let t;try{t=ie.storage.getItem("debug")||ie.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function v$(){try{return localStorage}catch{}}Fd.exports=_A()(ie);var{formatters:C$}=Fd.exports;C$.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var zx={};M(zx,{ANIMATION_PROPS:()=>Fy,ARIA_ROLES:()=>BP,ATTR_TRANSFORMS:()=>Qn,BLOCK_PROPS:()=>Ny,CDN_PROVIDERS:()=>_e,COMPOUND_CSS_KEYWORDS:()=>Nn,CONFIG:()=>Un,CONFIG_MERGE_EXL:()=>le,CSS_NAMED_COLOR_HEX:()=>Tf,CSS_NATIVE_COLOR_REGEX:()=>ae,CSS_PROPS_REGISTRY:()=>St,CSS_UNITS:()=>So,DEFAULT_CONFIG:()=>Tc,DEFAULT_CSS_PROPERTIES_LIST:()=>At,DELEGATED_EVENTS:()=>ys,DESIGN_SYSTEM_OPTIONS:()=>v_,DOMQL_EVENTS:()=>rh,DOMQ_PROPERTIES:()=>$r,DOM_EVENTS:()=>z0,ELEMENT_METHOD_OVERRIDE_POINTS:()=>Eo,ENV:()=>wh,FACTORY:()=>ce,FLEX_PROPS:()=>zy,FONT_PROPS:()=>jy,GRID_PROPS:()=>Hy,HOST_REGISTERED_PACKAGES:()=>w1,HTML_ATTRIBUTES:()=>xu,HTML_TAGS:()=>Po,LIFECYCLE_EVENTS:()=>en,METHODS:()=>Fr,METHODS_EXL:()=>Si,MISC_PROPS:()=>By,MIXINS:()=>mu,NODE_ENV:()=>Ie,OPTIONS:()=>Gi,PACKAGE_MANAGER_TO_CDN:()=>Ur,PARSED_DOMQ_PROPERTIES:()=>wi,POSITION_PROPS:()=>Vy,PROPS_METHODS:()=>Mr,REGISTRY:()=>Nt,RESERVED_STORE_METHODS:()=>Qx,REVIVED_MARK:()=>Ei,ROUTER_OPTIONS:()=>od,SIGNAL_ENGINE_KEY:()=>xo,SIGNAL_INSTANCES_KEY:()=>bo,STANDARD_SCHEME_QUERIES:()=>Zf,STATE_PROPERTIES:()=>th,STORE_METHOD_NAMES:()=>Jx,SVG_TAGS:()=>gs,THEME_PROPS:()=>Uy,TIMING_PROPS:()=>hc,TYPES:()=>hi,UNIVERSAL_RESERVED_KEYS:()=>Sf,VALUE_TRANSFORMERS:()=>au,VERSION:()=>ew,__resetBuiltinMethodWarnings:()=>am,__resetSignalEngine:()=>Tp,__resetSignalInstances:()=>Ap,__resetSkinWarnings:()=>uy,__resetStateShadowWarnings:()=>tw,activateConfig:()=>FS,addCaching:()=>tf,addContext:()=>Ql,addDelegatedEvent:()=>dc,addExtend:()=>Hh,addExtends:()=>Ye,addItemAfterEveryElement:()=>Vp,addMethods:()=>ks,addProtoToArray:()=>yi,addRef:()=>Xl,aliasCaseVariants:()=>rs,animation:()=>jm,appendSVGSprite:()=>oc,appendSvgIconsSprite:()=>Gn,applyAttrTransforms:()=>Iy,applyCSS:()=>g_,applyDependentState:()=>lg,applyDocument:()=>nc,applyEvent:()=>af,applyEventUpdate:()=>cf,applyExtends:()=>_s,applyHeadings:()=>tu,applyInitialState:()=>Du,applyMediaSequenceVars:()=>Wr,applyProps:()=>Vi,applyReset:()=>sc,applySequenceGlobalVars:()=>Ua,applySequenceVars:()=>xr,applySkins:()=>ic,applySpacingSequence:()=>qa,applyStateMethods:()=>he,applyTimingSequence:()=>rc,applyTrueProps:()=>qy,applyTypographySequence:()=>Qa,arrayContainsOtherArray:()=>Ip,arraysEqual:()=>zp,arrayzeValue:()=>Mn,assertEmitIntegrity:()=>ky,batch:()=>_l,breakpoints:()=>Fm,buildImgSrcset:()=>Ca,buildSkinVarStyles:()=>Yn,buildSourcesAndImg:()=>Ea,buildThemeVarStyles:()=>rd,cache:()=>hg,cacheNode:()=>tn,call:()=>Fg,callStateMethod:()=>mc,camelToAttr:()=>or,camelToLowerAttr:()=>H0,captureSnapshot:()=>jg,changeGlobalTheme:()=>cu,changeLightness:()=>xm,checkAttributeByTagName:()=>Ee,checkEventFunctions:()=>Ly,checkForStateTypes:()=>sg,checkIfBoxSize:()=>Wa,checkIfInherits:()=>sf,checkIfStringIsInArray:()=>qp,class:()=>Hm,clone:()=>sh,cloneAndMergeArrayExtend:()=>Li,cloneFunction:()=>Th,collectExtendsList:()=>Do,color:()=>Rm,colorStringToRgbaArray:()=>xe,components:()=>Ps,compositeOverBackdrop:()=>jn,concatAddExtends:()=>Vh,contrastRatio:()=>Xo,convertSvgToSymbol:()=>Ha,copyJavaScriptToClipboard:()=>fm,copyStringToClipboard:()=>lm,create:()=>Ux,createAsync:()=>bM,createBasedOnType:()=>Yl,createComputed:()=>Xx,createConfig:()=>$a,createDefine:()=>AE,createEffect:()=>Y,createElement:()=>og,createElementExtends:()=>Fl,createExtends:()=>$i,createExtendsFromKeys:()=>Lo,createExtendsStack:()=>Vl,createHTMLNode:()=>hs,createIfConditionFlag:()=>Oh,createInheritedState:()=>ig,createKey:()=>Pi,createNestedObject:()=>hh,createNestedObjectByKeyPath:()=>cg,createObjectWithoutPrototype:()=>Ol,createParent:()=>Zl,createPath:()=>Jl,createProps:()=>Ui,createPropsStack:()=>Kl,createRoot:()=>ng,createScope:()=>ug,createScopeStore:()=>xl,createSignal:()=>li,createSkeleton:()=>xM,createSnapshotId:()=>Ri,createState:()=>rb,createStore:()=>lr,createSync:()=>_M,css:()=>de,cssMediaVars:()=>qf,cssVars:()=>Wf,customDecodeURIComponent:()=>Qp,customEncodeURIComponent:()=>Jp,cutArrayAfterValue:()=>jp,cutArrayBeforeValue:()=>Np,debounce:()=>Di,debounceOnContext:()=>Eh,decodeNewlines:()=>Zp,deepClone:()=>ft,deepContains:()=>dh,deepDefaults:()=>Wo,deepDestringifyFunctions:()=>me,deepExtend:()=>Ml,deepMerge:()=>it,deepMergeExtends:()=>Xe,deepStringifyFunctions:()=>vi,defaultDefine:()=>Fs,defineResolvedThemeSignal:()=>es,defineSetter:()=>$g,defineThemeSignal:()=>ts,destringifyGlobalScope:()=>Ai,destroy:()=>Ic,detectHeightOnInit:()=>Hg,detectInfiniteLoop:()=>bh,detectTag:()=>Qr,devices:()=>Nm,dispose:()=>vr,encodeNewlines:()=>Xp,error:()=>Pn,excludeKeysFromObject:()=>xh,exec:()=>pt,executeAttr:()=>HP,exetuteClassPerComponent:()=>S2,extendCachedRegistry:()=>Uh,extendStackRegistry:()=>Mi,extractArrayExtend:()=>Ni,extractConditionalAttrs:()=>KP,fetchLibraryData:()=>Af,fibonacciNumberByIndex:()=>Wg,fileEntryUrl:()=>Cf,filterArrays:()=>Hp,filterArraysFast:()=>Wp,filterAttributesByTagName:()=>zP,finalizeExtends:()=>Ul,findClosestNumber:()=>Ef,findClosestNumberInFactory:()=>nm,findHeadingLetter:()=>Yf,findHeadings:()=>Va,findInheritedState:()=>of,findKeyPosition:()=>Gp,flattenExtend:()=>Io,font:()=>vm,fontFace:()=>Am,fontFamily:()=>Cm,fontFamilyTypes:()=>Em,formatDate:()=>zg,generateHash:()=>Ll,generateHeadArrayTags:()=>vf,generateKey:()=>Oi,generateMetaTags:()=>em,generateSequence:()=>Jt,generateSequencePosition:()=>Zm,generateSprite:()=>za,generateSubSequence:()=>ja,get:()=>Pg,getActiveConfig:()=>A,getActiveDocument:()=>Jn,getActiveLang:()=>cn,getCDNDirUrl:()=>kf,getCDNUrl:()=>Me,getCacheSize:()=>Cy,getCapitalCaseKeys:()=>Kh,getCdnProviderFromConfig:()=>Uo,getChildStateInKey:()=>nf,getChildren:()=>Ig,getColor:()=>tt,getColorShade:()=>Lf,getContext:()=>ua,getCookie:()=>Ih,getDB:()=>ma,getDefaultOrFirstKey:()=>Bn,getEmitStats:()=>hu,getEmotionStylesheet:()=>hm,getExtendsInElement:()=>Wh,getExtendsStack:()=>Ii,getExtendsStackRegistry:()=>$l,getFnPrefixAndValue:()=>_r,getFontFace:()=>Sm,getFontFaceEach:()=>Vn,getFontFaceEachString:()=>Vf,getFontFaceString:()=>Pa,getFontFamily:()=>Ja,getFontFormat:()=>jf,getFontSizeByKey:()=>tc,getFrequencyInArray:()=>$p,getFunctionSource:()=>Le,getHashedExtend:()=>Fi,getImportMapScript:()=>Ug,getInObjectByPath:()=>yh,getLanguages:()=>Mc,getLocalStateLang:()=>Vc,getLocalStorage:()=>Mh,getMediaColor:()=>It,getMediaTheme:()=>ve,getNev:()=>Ch,getObserver:()=>cr,getPageMetadata:()=>rm,getParentStateInKey:()=>rf,getPath:()=>sa,getQuery:()=>ya,getRef:()=>Lg,getResolvedThemeSignal:()=>MS,getRgbTone:()=>tr,getRoot:()=>ca,getRootContext:()=>fa,getRootData:()=>la,getRootState:()=>aa,getRootStateInKey:()=>ef,getSafeInk:()=>Jf,getSafeInkInfo:()=>ey,getSequenceValue:()=>zn,getSequenceValueBySymbols:()=>Ba,getSequenceValuePropertyPair:()=>rr,getShadow:()=>Ga,getShapeByKey:()=>ec,getSignals:()=>Zx,getSpacingBasedOnRatio:()=>ke,getSpacingByKey:()=>Et,getSpreadChildren:()=>Gh,getSubratio:()=>Na,getSubratioDifference:()=>Fa,getSystemGlobalTheme:()=>pe,getTheme:()=>sy,getThemeSignal:()=>$S,getTimingByKey:()=>ue,getTimingFunction:()=>Ce,global:()=>Pp,gradient:()=>Pm,grid:()=>zm,hasFunction:()=>De,hasHandlerPlugin:()=>Oo,hasOwnProperty:()=>lh,hashContent:()=>Ho,hexToRgb:()=>mm,hexToRgbArray:()=>Of,hexToRgba:()=>bm,hslToRgb:()=>Df,icons:()=>Im,inheritChildExtends:()=>jl,inheritChildPropsExtends:()=>Nl,inheritParentProps:()=>zi,inheritRecursiveChildExtends:()=>Bl,init:()=>Ar,initPolyglot:()=>ad,initProps:()=>tg,injectGlobal:()=>wt,is:()=>Xt,isArray:()=>P,isBoolean:()=>Sl,isBuiltinElementMethod:()=>eh,isCSSVar:()=>xt,isContextComponent:()=>Yh,isCyclic:()=>_h,isDOMNode:()=>Yt,isDate:()=>vl,isDefined:()=>Tt,isDevelopment:()=>jr,isDomDocument:()=>fr,isEmpty:()=>Al,isEmptyObject:()=>fh,isEnumeratedTrueFalseAttr:()=>sr,isEqualDeep:()=>Tl,isFailedRevival:()=>vn,isFunction:()=>R,isGoogleFontsUrl:()=>Zo,isHostObject:()=>ur,isHtmlElement:()=>di,isLazyFunction:()=>ih,isLocal:()=>vh,isLoudDevRuntime:()=>mt,isMalformedDependency:()=>Dn,isMethod:()=>Ng,isMobile:()=>Dh,isNode:()=>dr,isNot:()=>Lp,isNotProduction:()=>An,isNull:()=>kl,isNumber:()=>Ge,isObject:()=>v,isObjectLike:()=>B,isPhoto:()=>qg,isPlainColor:()=>Gr,isPolyglotRetranslatableKey:()=>Ki,isPolyglotWritableKey:()=>On,isProduction:()=>Nr,isProtectedElementMethod:()=>xn,isRawUnitValue:()=>fi,isResolvedColor:()=>Fe,isRevived:()=>Cn,isScalingUnit:()=>yn,isStaging:()=>kh,isState:()=>ag,isStore:()=>vt,isString:()=>k,isStringFunction:()=>To,isStringTag:()=>ah,isSvgTag:()=>ms,isTest:()=>Pl,isTesting:()=>Sh,isTracking:()=>ob,isUndefined:()=>Pt,isUniversallyReservedKey:()=>Bg,isUnresolvableDependency:()=>zr,isValidDependencyMap:()=>Ln,isValidHtmlTag:()=>Nh,isValidTag:()=>ps,isWasmLoaded:()=>dE,isWrappedLibrary:()=>mr,isWritableFamilyBucket:()=>Rp,joinArrays:()=>ko,jointStacks:()=>zh,keyframes:()=>ds,keys:()=>xf,linearChannelToSrgb:()=>Mf,loadCssFile:()=>Xg,loadJavascript:()=>Zg,loadJavascriptFile:()=>Kg,loadJavascriptFileEmbedSync:()=>Yg,loadJavascriptFileSync:()=>Gg,loadRemoteCSS:()=>Jg,loadRemoteScript:()=>zo,loadTranslations:()=>Nc,loadWasm:()=>uE,log:()=>Mg,logGroupIf:()=>Ph,logIf:()=>Rh,lookdown:()=>Og,lookdownAll:()=>Rg,lookup:()=>Tg,lowercaseFirstLetter:()=>bn,makeObjectWithoutPrototype:()=>uh,map:()=>oh,mapStringsWithContextComponents:()=>ji,markPolyglotSeeded:()=>Je,markRevived:()=>Ao,matchesComponentNaming:()=>Ze,media:()=>Tm,memoize:()=>Ah,merge:()=>_t,mergeSharedLibraries:()=>wa,mergeSharedLibraryDesignSystems:()=>Sa,mixTwoColors:()=>gm,mixTwoRgb:()=>_m,mixTwoRgba:()=>If,nextElement:()=>pa,normalizeIgnoreList:()=>xa,normalizeLibraryKey:()=>$n,numToLetterMap:()=>er,objectToString:()=>Ci,objectizeStringProperty:()=>Bi,oklabToLinearSrgb:()=>Ff,oklabToOklch:()=>Ta,oklchToGamutSafeSrgb:()=>Oa,oklchToOklab:()=>Nf,opacify:()=>Yo,overwrite:()=>Ti,overwriteDeep:()=>zt,overwriteShallow:()=>En,overwriteState:()=>fg,parkHostObject:()=>Ir,parse:()=>wf,parseColorToken:()=>Vt,parseDeep:()=>na,pickupElementFromProps:()=>Wl,pickupPropsFromElement:()=>Hl,polyglotFunctions:()=>Qc,polyglotPlugin:()=>js,polyglotSeededKeys:()=>$o,popConfig:()=>ot,popStaticCssPass:()=>vu,previousElement:()=>ha,promoteActiveRootState:()=>No,propExists:()=>Jh,propertizeElement:()=>ql,propertizeUpdate:()=>Zh,pushConfig:()=>at,pushStaticCssPass:()=>ku,quietColorProbe:()=>Hn,refreshContextProto:()=>Au,registerEvent:()=>bs,registerHostPackages:()=>S1,registerSignalInstance:()=>_o,reinit:()=>h_,relativeLuminance:()=>Fn,remove:()=>Ss,removeChars:()=>um,removeCookie:()=>$h,removeDelegatedEvent:()=>pc,removeDuplicateProps:()=>Wi,removeDuplicatesInArray:()=>vo,removeFromArray:()=>Mp,removeFromObject:()=>ph,removeNestedKeyByPath:()=>gh,removeValueFromArray:()=>mi,removeValueFromArrayAll:()=>Bp,reorderArrayByValues:()=>Up,replaceLiteralsWithObjectFields:()=>Ft,replaceOctalEscapeSequences:()=>Yp,resetEmitStats:()=>Sy,resolveAsset:()=>Zt,resolveBorderValue:()=>fe,resolveColorRgb:()=>Wn,resolveColorsInGradient:()=>cc,resolveConfigDocument:()=>wo,resolveDesignSystemClass:()=>rk,resolveFileReferences:()=>In,resolveFileSource:()=>Dy,resolveFileUrl:()=>we,resolveGridTracks:()=>Z0,resolveHandler:()=>Ro,resolvePropValue:()=>rn,resolveShadowValue:()=>qn,resolveSharedLibraries:()=>cm,returnSubThemeOrDefault:()=>wm,returnValueAsText:()=>Gl,rgbArrayToHex:()=>Rf,rgbToHSL:()=>Pf,rgbToHex:()=>ym,runPluginHook:()=>Ot,runThroughMedia:()=>Qf,schemeGuardSelector:()=>Xr,schemeMediaQuery:()=>Yr,scratchDefaultConfig:()=>Qo,scratchSystem:()=>as,scratchUtils:()=>qr,self:()=>Dp,semanticIcons:()=>$m,sequence:()=>br,serializeAttrValue:()=>te,set:()=>Xn,setActiveConfig:()=>Kf,setActiveDocument:()=>wy,setActiveRootState:()=>ia,setAdaptiveSchemeVar:()=>Zr,setClass:()=>ZD,setClassname:()=>k2,setColor:()=>Kr,setCookie:()=>Lh,setCssEngineHook:()=>ed,setCustomFont:()=>Ra,setCustomFontMedia:()=>Hr,setEach:()=>hy,setFont:()=>Za,setFontFamily:()=>ss,setFontImport:()=>Jo,setGradient:()=>ns,setHashedExtend:()=>Il,setInCustomFontMedia:()=>Bf,setInObjectByPath:()=>mh,setLang:()=>jc,setLocalStorage:()=>Fh,setMediaTheme:()=>os,setNodeStyles:()=>_f,setObserver:()=>Ke,setProps:()=>Dg,setPropsPrototype:()=>Hi,setSVG:()=>is,setScalingVar:()=>Ma,setShadow:()=>Jr,setSubScalingVar:()=>Gf,setSvgIcon:()=>Kn,setTheme:()=>Xa,setValue:()=>py,setVariables:()=>Jm,setWasmEngine:()=>uc,shadow:()=>Lm,shape:()=>Km,sharedLibrary:()=>im,sizes:()=>qm,skins:()=>Gm,spacing:()=>Om,splitPackageSpecifier:()=>ba,splitSpacedValue:()=>Ka,splitTopLevelCommas:()=>yr,splitTopLevelSpaces:()=>ht,splitTransition:()=>iu,spotByPath:()=>oa,srcsetFor:()=>qo,srgbChannelToLinear:()=>$f,srgbToOklab:()=>Aa,stringIncludesAny:()=>_i,stringToObject:()=>ch,stripVersionRangePrefix:()=>_a,svg:()=>Bm,svgData:()=>Vm,swapItemsInArray:()=>Fp,syncProps:()=>qi,templates:()=>Um,theme:()=>Dm,timing:()=>Mm,toCamel:()=>Ia,toCamelCase:()=>ka,toDashCase:()=>va,toDescriptionCase:()=>pm,toLinearChannel:()=>Go,toPriorityOrder:()=>ye,toTitleCase:()=>dm,toggleFullscreen:()=>Vg,transformBackgroundImage:()=>nu,transformBorder:()=>nr,transformBorderRadius:()=>wr,transformBoxShadow:()=>ac,transformClassname:()=>ok,transformDuration:()=>lc,transformGridTemplate:()=>su,transformShadow:()=>ru,transformSize:()=>Ct,transformSizeRatio:()=>$,transformTextStroke:()=>eu,transformTransition:()=>dy,transformersByPrefix:()=>Ky,transfromGap:()=>ou,translate:()=>Fc,triggerEventOn:()=>hr,triggerEventOnUpdate:()=>dg,trimStringFromSymbols:()=>Kp,typography:()=>Da,unit:()=>km,unstackArrayOfObjects:()=>gi,update:()=>xs,updateProps:()=>eg,updateVars:()=>XD,upsertTranslation:()=>Bc,useCssInProps:()=>ne,useHostState:()=>nb,usePropsAsCSS:()=>ek,useSelectorsAsCSS:()=>nk,variables:()=>ga,vars:()=>Wm,verbose:()=>jo,warn:()=>da,warnStateKeyShadowsMethod:()=>wl,window:()=>C,wrapHoverRule:()=>Sr});module.exports=xT(zx);var Op={};M(Op,{RESERVED_STORE_METHODS:()=>Qx,SIGNAL_ENGINE_KEY:()=>xo,SIGNAL_INSTANCES_KEY:()=>bo,STORE_METHOD_NAMES:()=>Jx,VERSION:()=>ew,__resetSignalEngine:()=>Tp,__resetSignalInstances:()=>Ap,__resetStateShadowWarnings:()=>tw,batch:()=>_l,createComputed:()=>Xx,createEffect:()=>Y,createScopeStore:()=>xl,createSignal:()=>li,createStore:()=>lr,getObserver:()=>cr,getSignals:()=>Zx,isStore:()=>vt,registerSignalInstance:()=>_o,setObserver:()=>Ke,warnStateKeyShadowsMethod:()=>wl});var _p={};M(_p,{WRITE_JOURNAL:()=>si,batch:()=>ai,createComputed:()=>ST,createEffect:()=>kT,createSignal:()=>We,getObserver:()=>yp,journalWrite:()=>ii,setObserver:()=>wT});var Gt=null,dl=0,pl=[],yp=()=>Gt,wT=t=>{Gt=t},hl=0,pp=[];function We(t){let e=new Set;function r(){return Gt&&(e.add(Gt),Gt._sources.add(s)),t}function n(i){i!==t&&(t=i,OT(e))}function o(){return t}let s={get:r,set:n,peek:o,_subscribers:e,_type:"signal"};return s}function ST(t){let e,r=!0,n=new Set,o={_sources:new Set,_type:"computed",_subscribers:n,_execute(){mp(o);let s=Gt;Gt=o;try{e=t(),r=!1}finally{Gt=s}},_notify(){r=!0,n.size>0&&Gx(n)},get(){return Gt&&(n.add(Gt),Gt._sources.add(o)),r&&o._execute(),e},peek(){return r&&o._execute(),e}};return o._execute(),o}var Pe=new Set,hp=!1,si=[];function ii(t){si.push(t),si.length>32&&si.shift()}function kT(t,e){let r=e?.depth??0,n={_sources:new Set,_type:"effect",_depth:r,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(n._disposed)return;mp(n);let o=Gt;Gt=n;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Gt=o}},_notify(){n._disposed||(dl>0?pl.push(n):hl>0?pp.push(n):bp(n))},dispose(){n._disposed=!0,mp(n)}};return n._execute(),n}function ai(t){dl++;try{t()}finally{dl--,dl===0&&TT()}}var gp=!1,Wx=1e3,vT=8,CT=256,ET=4;function qx(){return typeof performance<"u"?performance.now():Date.now()}function bp(t){Pe.add(t),!gp&&(hp||(hp=!0,queueMicrotask(Kx)))}var yo=[];function AT(){if(Pe.size===1){let[e]=Pe;return Pe.clear(),e._disposed?0:(e._execute(),1)}yo.length=0;for(let e of Pe)yo.push(e);Pe.clear(),yo.sort((e,r)=>e._depth-r._depth);let t=0;for(let e=0;e<yo.length;e++){let r=yo[e];r._disposed||(r._execute(),t++)}return yo.length=0,t}function Kx(t=0,e=0){if(hp=!1,Pe.size===0)return;gp=!0;let r=qx(),n=!1;try{for(;Pe.size>0;){if(++t>Wx){let o=new Map;for(let c of Pe){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",o.set(l,(o.get(l)||0)+1),o.size>=12)break}let s=[...o.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of si)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",Wx,"passes in a single flush \u2014 breaking to avoid hanging the thread.","This usually means an effect (or an onUpdate/subscribeTo handler","it calls into) unconditionally writes back a signal it depends on.","Still queued at break (the loop participants):",s||"<queue empty>","\u2014 last notifying store writes:",a||"<none recorded>"),Pe.clear();break}if(e+=AT(),Pe.size>0&&(e>=CT||t>=ET)&&qx()-r>vT){n=!0,setTimeout(()=>Kx(t,e),0);break}}}finally{n||(gp=!1)}}function TT(){for(let t=0;t<pl.length;t++)bp(pl[t]);pl.length=0}function Gx(t){hl++;try{for(let e of t)e._notify()}finally{if(hl--,hl===0&&pp.length>0){let e=pp.splice(0);for(let r=0;r<e.length;r++)bp(e[r])}}}function OT(t){Gx(t)}function mp(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Ep={};M(Ep,{RESERVED_STORE_METHODS:()=>ci,STORE_METHOD_NAMES:()=>Cp,__resetStateShadowWarnings:()=>RT,createScopeStore:()=>IT,createStore:()=>gl,getSignals:()=>LT,isStore:()=>DT,warnStateKeyShadowsMethod:()=>vp});var qe=Symbol("store"),ml=Symbol("signals"),Cp=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],ci=new Set(Cp),kp=new Set,xp=(t,e)=>t?t+"."+e:String(e);function vp(t,e){let r=(e||"")+"::"+t;if(kp.has(r))return;kp.add(r);let n=e?`state.${e}`:"state",o=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${n}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${n}.${t}(\u2026)" no longer reaches the store method on this node. Use "${n}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${Cp.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function RT(){kp.clear()}var wp=t=>!t||typeof t!="object"||Array.isArray(t)||t[qe]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!yl(t),PT=12,yl=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function bl(t,e,r){if(t===e)return!0;if(r>PT)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!bl(t[n],e[n],r+1))return!1;return!0}if(yl(t)&&yl(e)){let n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(let s of n)if(!Object.prototype.hasOwnProperty.call(e,s)||!bl(t[s],e[s],r+1))return!1;return!0}return!1}function gl(t,e,r,n){r===void 0&&(r=0),n===void 0&&(n="");let o={},s={},i=b=>Object.prototype.hasOwnProperty.call(o,b)&&Object.prototype.hasOwnProperty.call(s,b),a=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}ci.has(b)&&vp(b,n);let _=t[b];r<a&&_&&typeof _=="object"&&!wp(_)?(s[b]=_,o[b]=We(gl(_,e,r+1,xp(n,b)))):(s[b]=_,o[b]=We(_))}let c=new Proxy(s,{get(b,_){if(_===qe)return!0;if(_===ml)return o;if(_==="__raw")return b;if(_==="$update")return l;if(_==="$parse")return u;if(_==="$clean")return d;if(_==="$keys")return g;if(_==="$values")return p;if(_==="$replace")return h;if(_==="$add")return m;if(_==="$remove")return y;if(_==="$destroy")return x;if(_==="$quietUpdate")return f;if(ci.has(_)&&!Object.prototype.hasOwnProperty.call(o,_))switch(_){case"update":return l;case"parse":return u;case"clean":return d;case"keys":return g;case"values":return p;case"replace":return h;case"add":return m;case"remove":return y;case"destroy":return x;case"quietUpdate":return f}if(_==="__element")return b.__element;if(_==="parent")return b.parent;if(_==="root")return b.root;if(Object.prototype.hasOwnProperty.call(o,_)){let S=o[_].get();if(S!==void 0||!(_!=="root"&&b.root&&b.root!==c))return S}if(b[_]!==void 0)return b[_];let w=typeof _=="string"&&!_.startsWith("__")&&_!=="then"&&_!=="constructor"&&yp()!=null;if(_!=="root"&&b.root&&b.root!==c){let S=b.root[_];return w&&!Object.prototype.hasOwnProperty.call(o,_)&&(o[_]=We(void 0),o[_].get()),S}if(w)return o[_]=We(void 0),o[_].get()},set(b,_,w){if(_==="__proto__")return!1;if(_==="__element"||_==="parent"||_==="root"||typeof _=="string"&&_.startsWith("__")&&!Object.prototype.hasOwnProperty.call(o,_))return b[_]=w,!0;ci.has(_)&&vp(_,n);let S=xp(n,_);if(Object.prototype.hasOwnProperty.call(o,_))if(w&&typeof w=="object"&&!wp(w)){if(w===b[_])return!0;let E=o[_].peek(),T=E&&E[qe]?E.$parse():E;if(bl(w,T,0))return!0;b[_]=w,ii(S),o[_].set(gl(w,e,r+1,S))}else{if(Array.isArray(w)&&w!==b[_]&&Array.isArray(o[_].peek())&&bl(w,o[_].peek(),0))return!0;o[_].peek()!==w&&ii(S),b[_]=w,o[_].set(w)}else b[_]=w,w&&typeof w=="object"&&!wp(w)?o[_]=We(gl(w,e,r+1,S)):o[_]=We(w);return!0},has(b,_){return typeof _=="string"&&_.charCodeAt(0)===36&&ci.has(_.slice(1))?!0:_ in b},ownKeys(b){return Object.keys(o).filter(i)},getOwnPropertyDescriptor(b,_){return i(_)?{enumerable:!0,configurable:!0,value:o[_].peek()}:Object.getOwnPropertyDescriptor(b,_)},deleteProperty(b,_){return o[_]&&(o[_].peek()!==void 0&&ii(xp(n,_)),o[_].set(void 0),delete o[_]),delete b[_],!0}});function l(b,_){ai(()=>{for(let S in b)S!=="__proto__"&&(c[S]=b[S])});let w=s.__element;return w&&w.onUpdate&&!_?.quiet&&w.onUpdate(w,c,w.context),c}function f(b){return l(b,{quiet:!0})}function u(b){if(b||(b=new Set),b.has(c))return"[Circular]";b.add(c);let _={};for(let w in o){if(w==="parent"||w==="root"||w.startsWith("__")||!Object.prototype.hasOwnProperty.call(s,w))continue;let S=o[w].peek();S&&S[qe]?_[w]=S.$parse(b):_[w]=S}return _}function d(){return ai(()=>{for(let b in o)delete c[b]}),c}function g(){return Object.keys(o).filter(i)}function p(){return Object.keys(o).filter(i).map(b=>o[b].peek())}function h(b){return ai(()=>{for(let _ in o)_ in b||delete c[_];for(let _ in b)_!=="__proto__"&&(c[_]=b[_])}),c}function m(b,_){let w=Object.prototype.hasOwnProperty.call(o,b)?o[b].peek():s[b];if(Array.isArray(w))return c[b]=[...w,_],c;if(w&&typeof w=="object"&&!Array.isArray(w)){if(yl(_))w[qe]?w.$update(_):c[b]={...w,..._};else{let S=String(Object.keys(w).length);w[qe]?w.$update({[S]:_}):c[b]={...w,[S]:_}}return c}return c[b]=_,c}function y(b){return delete c[b],c}function x(){d(),s.__element=null,s.parent=null}return c}function DT(t){return t&&t[qe]===!0}function LT(t){return t[ml]}function IT(t,e){let r={},n={};if(t&&typeof t=="object")for(let i in t)n[i]=t[i],r[i]=We(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let a=e;for(;a;){let c=a[ml];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[qe]?a[Sp]:null}return null};return new Proxy(n,{get(i,a){return a===qe?!0:a===ml?r:a===Sp?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=o(a);return l?(l===r&&(i[a]=c),l[a].set(c),!0):(i[a]=c,r[a]=We(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[qe]?c[Sp]: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 Sp=Symbol("scope.parent");var mn="3.14.785";var bo="__SMBLS_SIGNAL_INSTANCES__",_o=(t,e,r)=>{let n=e||(typeof globalThis<"u"?globalThis:null);if(!n)return null;let o=n[bo]||(n[bo]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(t||mn),r||o.engines++,o.engines>1&&!o.reported&&(o.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",o.engines,"copies of the reactive engine are loaded on this page:",o.versions.join(", ")+".","Each copy keeps its own observer and effect queue, so an effect created","by one copy never re-fires from another copy's store writes, and one","copy's cascade breaker cannot see the other's queue.","Copies of the SAME version adopt a single engine automatically, so","this means the versions above DIFFER: a fossil copy is resolving beside","the current one. That is a dependency-graph fault, not an application","bug \u2014 align the version wherever @symbo.ls/signal is imported, then","regenerate the lockfile so exactly one version resolves.")),o},Ap=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[bo]};var xo="__SMBLS_SIGNAL_ENGINE__",Yx=(t,e,r)=>{let n=e||mn,o=r||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[xo];return s&&s.engine&&s.version===n?(_o(n,o,!0),s.engine):(s||(o[xo]={version:n,engine:t}),_o(n,o,!1),t)},Tp=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[xo]};var Ut=Yx({..._p,...Ep,VERSION:mn},mn),li=Ut.createSignal,Xx=Ut.createComputed,Y=Ut.createEffect,_l=Ut.batch,cr=Ut.getObserver,Ke=Ut.setObserver,lr=Ut.createStore,xl=Ut.createScopeStore,vt=Ut.isStore,Zx=Ut.getSignals,Jx=Ut.STORE_METHOD_NAMES,Qx=Ut.RESERVED_STORE_METHODS,wl=Ut.warnStateKeyShadowsMethod,tw=Ut.__resetStateShadowWarnings,ew=Ut.VERSION;var Ey={};M(Ey,{assertEmitIntegrity:()=>ky,css:()=>de,getActiveDocument:()=>Jn,getCacheSize:()=>Cy,getEmitStats:()=>hu,injectGlobal:()=>wt,keyframes:()=>ds,reset:()=>D0,resetEmitStats:()=>Sy,setActiveDocument:()=>wy,setWasmEngine:()=>uc,wrapHoverRule:()=>Sr});var gy={};M(gy,{COMPOUND_CSS_KEYWORDS:()=>Nn,CONFIG:()=>Un,CONFIG_MERGE_EXL:()=>le,CSS_NAMED_COLOR_HEX:()=>Tf,CSS_NATIVE_COLOR_REGEX:()=>ae,CSS_UNITS:()=>So,FACTORY:()=>ce,STANDARD_SCHEME_QUERIES:()=>Zf,VALUE_TRANSFORMERS:()=>au,__resetSkinWarnings:()=>uy,activateConfig:()=>FS,aliasCaseVariants:()=>rs,animation:()=>jm,appendSVGSprite:()=>oc,appendSvgIconsSprite:()=>Gn,applyDocument:()=>nc,applyHeadings:()=>tu,applyMediaSequenceVars:()=>Wr,applyReset:()=>sc,applySequenceGlobalVars:()=>Ua,applySequenceVars:()=>xr,applySkins:()=>ic,applySpacingSequence:()=>qa,applyTimingSequence:()=>rc,applyTypographySequence:()=>Qa,breakpoints:()=>Fm,buildSkinVarStyles:()=>Yn,changeGlobalTheme:()=>cu,changeLightness:()=>xm,checkIfBoxSize:()=>Wa,class:()=>Hm,color:()=>Rm,colorStringToRgbaArray:()=>xe,compositeOverBackdrop:()=>jn,contrastRatio:()=>Xo,convertSvgToSymbol:()=>Ha,createConfig:()=>$a,cssMediaVars:()=>qf,cssVars:()=>Wf,defineResolvedThemeSignal:()=>es,defineThemeSignal:()=>ts,devices:()=>Nm,document:()=>LS,findHeadingLetter:()=>Yf,findHeadings:()=>Va,font:()=>vm,fontFace:()=>Am,fontFamily:()=>Cm,fontFamilyTypes:()=>Em,generateSequence:()=>Jt,generateSequencePosition:()=>Zm,generateSprite:()=>za,generateSubSequence:()=>ja,getActiveConfig:()=>A,getColor:()=>tt,getColorShade:()=>Lf,getDefaultOrFirstKey:()=>Bn,getFnPrefixAndValue:()=>_r,getFontFace:()=>Sm,getFontFaceEach:()=>Vn,getFontFaceEachString:()=>Vf,getFontFaceString:()=>Pa,getFontFamily:()=>Ja,getFontFormat:()=>jf,getFontSizeByKey:()=>tc,getMediaColor:()=>It,getMediaTheme:()=>ve,getResolvedThemeSignal:()=>MS,getRgbTone:()=>tr,getSafeInk:()=>Jf,getSafeInkInfo:()=>ey,getSequenceValue:()=>zn,getSequenceValueBySymbols:()=>Ba,getSequenceValuePropertyPair:()=>rr,getShadow:()=>Ga,getShapeByKey:()=>ec,getSpacingBasedOnRatio:()=>ke,getSpacingByKey:()=>Et,getSubratio:()=>Na,getSubratioDifference:()=>Fa,getTheme:()=>sy,getThemeSignal:()=>$S,getTimingByKey:()=>ue,getTimingFunction:()=>Ce,gradient:()=>Pm,grid:()=>zm,hexToRgb:()=>mm,hexToRgbArray:()=>Of,hexToRgba:()=>bm,hslToRgb:()=>Df,icons:()=>Im,isCSSVar:()=>xt,isDomDocument:()=>fr,isGoogleFontsUrl:()=>Zo,isHostObject:()=>ur,isPlainColor:()=>Gr,isRawUnitValue:()=>fi,isResolvedColor:()=>Fe,isScalingUnit:()=>yn,isWritableFamilyBucket:()=>Rp,linearChannelToSrgb:()=>Mf,media:()=>Tm,mixTwoColors:()=>gm,mixTwoRgb:()=>_m,mixTwoRgba:()=>If,numToLetterMap:()=>er,oklabToLinearSrgb:()=>Ff,oklabToOklch:()=>Ta,oklchToGamutSafeSrgb:()=>Oa,oklchToOklab:()=>Nf,opacify:()=>Yo,parkHostObject:()=>Ir,parseColorToken:()=>Vt,popConfig:()=>ot,pushConfig:()=>at,quietColorProbe:()=>Hn,relativeLuminance:()=>Fn,reset:()=>IS,resolveBorderValue:()=>fe,resolveColorRgb:()=>Wn,resolveColorsInGradient:()=>cc,resolveConfigDocument:()=>wo,resolveFileUrl:()=>we,resolveShadowValue:()=>qn,returnSubThemeOrDefault:()=>wm,rgbArrayToHex:()=>Rf,rgbToHSL:()=>Pf,rgbToHex:()=>ym,runThroughMedia:()=>Qf,schemeGuardSelector:()=>Xr,schemeMediaQuery:()=>Yr,scratchDefaultConfig:()=>Qo,scratchSystem:()=>as,scratchUtils:()=>qr,semanticIcons:()=>$m,sequence:()=>br,set:()=>Xn,setActiveConfig:()=>Kf,setAdaptiveSchemeVar:()=>Zr,setColor:()=>Kr,setCustomFont:()=>Ra,setCustomFontMedia:()=>Hr,setEach:()=>hy,setFont:()=>Za,setFontFamily:()=>ss,setFontImport:()=>Jo,setGradient:()=>ns,setInCustomFontMedia:()=>Bf,setMediaTheme:()=>os,setSVG:()=>is,setScalingVar:()=>Ma,setShadow:()=>Jr,setSubScalingVar:()=>Gf,setSvgIcon:()=>Kn,setTheme:()=>Xa,setValue:()=>py,setVariables:()=>Jm,shadow:()=>Lm,shape:()=>Km,sizes:()=>qm,skins:()=>Gm,spacing:()=>Om,splitSpacedValue:()=>Ka,splitTopLevelCommas:()=>yr,splitTopLevelSpaces:()=>ht,splitTransition:()=>iu,srgbChannelToLinear:()=>$f,srgbToOklab:()=>Aa,svg:()=>Bm,svgData:()=>Vm,templates:()=>Um,theme:()=>Dm,timing:()=>Mm,toCamel:()=>Ia,toLinearChannel:()=>Go,transformBackgroundImage:()=>nu,transformBorder:()=>nr,transformBorderRadius:()=>wr,transformBoxShadow:()=>ac,transformDuration:()=>lc,transformGridTemplate:()=>su,transformShadow:()=>ru,transformSize:()=>Ct,transformSizeRatio:()=>$,transformTextStroke:()=>eu,transformTransition:()=>dy,transfromGap:()=>ou,typography:()=>Da,unit:()=>km,vars:()=>Wm});var qr={};M(qr,{COMPOUND_CSS_KEYWORDS:()=>Nn,CSS_NAMED_COLOR_HEX:()=>Tf,CSS_NATIVE_COLOR_REGEX:()=>ae,CSS_UNITS:()=>So,applyMediaSequenceVars:()=>Wr,applySequenceGlobalVars:()=>Ua,applySequenceVars:()=>xr,changeLightness:()=>xm,colorStringToRgbaArray:()=>xe,compositeOverBackdrop:()=>jn,contrastRatio:()=>Xo,convertSvgToSymbol:()=>Ha,findHeadingLetter:()=>Yf,findHeadings:()=>Va,generateSequence:()=>Jt,generateSequencePosition:()=>Zm,generateSprite:()=>za,generateSubSequence:()=>ja,getColorShade:()=>Lf,getDefaultOrFirstKey:()=>Bn,getFnPrefixAndValue:()=>_r,getFontFace:()=>Sm,getFontFaceEach:()=>Vn,getFontFaceEachString:()=>Vf,getFontFaceString:()=>Pa,getFontFormat:()=>jf,getRgbTone:()=>tr,getSequenceValue:()=>zn,getSequenceValueBySymbols:()=>Ba,getSequenceValuePropertyPair:()=>rr,getSubratio:()=>Na,getSubratioDifference:()=>Fa,hexToRgb:()=>mm,hexToRgbArray:()=>Of,hexToRgba:()=>bm,hslToRgb:()=>Df,isCSSVar:()=>xt,isDomDocument:()=>fr,isGoogleFontsUrl:()=>Zo,isHostObject:()=>ur,isRawUnitValue:()=>fi,isResolvedColor:()=>Fe,isScalingUnit:()=>yn,isWritableFamilyBucket:()=>Rp,linearChannelToSrgb:()=>Mf,mixTwoColors:()=>gm,mixTwoRgb:()=>_m,mixTwoRgba:()=>If,numToLetterMap:()=>er,oklabToLinearSrgb:()=>Ff,oklabToOklch:()=>Ta,oklchToGamutSafeSrgb:()=>Oa,oklchToOklab:()=>Nf,opacify:()=>Yo,parkHostObject:()=>Ir,parseColorToken:()=>Vt,relativeLuminance:()=>Fn,resolveConfigDocument:()=>wo,resolveFileUrl:()=>we,returnSubThemeOrDefault:()=>wm,rgbArrayToHex:()=>Rf,rgbToHSL:()=>Pf,rgbToHex:()=>ym,setCustomFont:()=>Ra,setCustomFontMedia:()=>Hr,setFontImport:()=>Jo,setInCustomFontMedia:()=>Bf,setScalingVar:()=>Ma,setSubScalingVar:()=>Gf,setVariables:()=>Jm,splitTopLevelCommas:()=>yr,splitTopLevelSpaces:()=>ht,srgbChannelToLinear:()=>$f,srgbToOklab:()=>Aa,toLinearChannel:()=>Go});var fr=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),ur=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)},Rp=t=>t!==null&&typeof t=="object"&&!ur(t),Ir=(t,e,r)=>{if(!t)return;if(fr(r)){t.__domDocument||(t.__domDocument=r);return}let n=`__host_${e}`;t[n]||(t[n]=r)},wo=t=>t?fr(t.__domDocument)?t.__domDocument:fr(t.document)?t.document:null:null;var yn=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",So=["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"],$T=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),MT=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${So.filter(t=>t!=="auto").map($T).join("|")})$`),fi=t=>MT.test(String(t).trim());L();var Tf={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"},xe=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=Tf[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&&nt&&C){let r=nt.body.appendChild(nt.createElement("fictum")),n="rgb(1, 2, 3)";if(r.style.color=n,r.style.color!==n){nt.body.removeChild(r);return}if(r.style.color=t,r.style.color===n||r.style.color==="")return nt.body.removeChild(r),[0,0,0,0];t=C.getComputedStyle(r).color,nt.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]},gm=(t,e,r=.5)=>(t=xe(t),e=xe(e),If(t,e,r)),mm=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${n},${o})`},Of=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,n,o]},ym=(t,e,r)=>"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1),Rf=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1),bm=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${r},${n},${o},${e})`},_m=(t,e,r=.5)=>{let n=[];for(let o=0;o<3;o++)n[o]=~~(t[o]+(e[o]-t[o])*r);return`rgb(${n})`},xm=(t,e)=>{let[r,n,o]=e,s=Math.max(0,Math.min(100,o+parseFloat(t)));return[r,n,s]},Pf=(t,e,r)=>{let n=Math.max(t,e,r),o=n-Math.min(t,e,r),s=1-Math.abs(n+n-o-1),i=o&&(n==t?(e-r)/o:n==e?2+(r-t)/o:4+(t-e)/o);return[60*(i<0?i+6:i),s?o/s:0,(n+n-o)/2]},Df=(t,e,r,n=e*Math.min(r,1-r),o=(s,i=(s+t/30)%12)=>r-n*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],Lf=(t,e)=>{let r=parseInt(t,16),n=(r>>16)+e;n>255?n=255:n<0&&(n=0);let o=(r>>8&255)+e;o>255?o=255:o<0&&(o=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|o<<8|n<<16)+16777216).toString(16).slice(1)},If=(t,e,r=.5)=>{let n=[];for(let o=0;o<4;o++){let s=o===3?i=>i:Math.round;n[o]=s(t[o]+(e[o]-t[o])*r)}return`rgba(${n})`},Yo=(t,e)=>{let r=xe(t);if(!r){An()&&console.warn(t+" color is not rgba");return}return r[3]=e,`rgba(${r})`},xt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Nn=new Set(["currentcolor","transparent","thin","medium","thick"]),ae=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,mR=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Vt=t=>{if(!k(t))return null;if(ae.test(t))return{passthrough:t};if(xt(t))return{cssVar:t};let e=t.match(mR);if(!e)return null;let[,r,n,o]=e,s=n!==void 0?`0.${n}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:r,alpha:s,tone:i}},Fe=t=>k(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),yr=t=>{let e=[],r="",n=0;for(let o of t){if(o==="("?n+=1:o===")"&&n>0&&(n-=1),o===","&&n===0){e.push(r),r="";continue}r+=o}return(r.length||!e.length)&&e.push(r),e},ht=t=>{let e=[],r="",n=0;for(let o of t){if(o==="("?n+=1:o===")"&&n>0&&(n-=1),n===0&&/\s/.test(o)){r.length&&e.push(r),r="";continue}r+=o}return r.length&&e.push(r),e},Go=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Fn=t=>.2126*Go(t[0])+.7152*Go(t[1])+.0722*Go(t[2]),Xo=(t,e)=>{let r=Fn(t)+.05,n=Fn(e)+.05;return r>n?r/n:n/r},$f=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Mf=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,Aa=([t,e,r])=>{let[n,o,s]=[t,e,r].map($f),i=.4122214708*n+.5363325363*o+.0514459929*s,a=.2119034982*n+.6806995451*o+.1073969566*s,c=.0883024619*n+.2817188376*o+.6299787005*s,l=Math.cbrt(i),f=Math.cbrt(a),u=Math.cbrt(c);return[.2104542553*l+.793617785*f-.0040720468*u,1.9779984951*l-2.428592205*f+.4505937099*u,.0259040371*l+.7827717662*f-.808675766*u]},Ff=([t,e,r])=>{let n=t+.3963377774*e+.2158037573*r,o=t-.1055613458*e-.0638541728*r,s=t-.0894841775*e-1.291485548*r,i=n**3,a=o**3,c=s**3;return[4.0767416621*i-3.3077115913*a+.2309699292*c,-1.2684380046*i+2.6097574011*a-.3413193965*c,-.0041960863*i-.7034186147*a+1.707614701*c]},Ta=([t,e,r])=>{let n=Math.atan2(r,e)*180/Math.PI;return n<0&&(n+=360),[t,Math.sqrt(e*e+r*r),n]},Nf=([t,e,r])=>{let n=r*Math.PI/180;return[t,e*Math.cos(n),e*Math.sin(n)]},Oa=(t,e,r,n=24)=>{let o=a=>Ff(Nf([t,a,r])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=o(e);if(!s(i)){let a=0,c=e;for(let l=0;l<n;l++){let f=(a+c)/2;s(o(f))?a=f:c=f}i=o(a)}return i.map(a=>Mf(Math.max(0,Math.min(1,a))))},jn=(t,e=1,r=[255,255,255])=>e>=1?t:t.map((n,o)=>n*e+r[o]*(1-e)),tr=(t,e)=>{k(t)&&t.includes("rgb")&&(t=xe(t).join(", ")),k(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),Ge(e)&&(e+="");let r=Rf(t),n=e.slice(0,1);if(n==="-"||n==="+"){let o=Lf(r,parseFloat(e));return Of(o).join(", ")}else{let[o,s,i]=t,[a,c]=Pf(o/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return Df(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var wm=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var we=(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},Bn=(t,e)=>{if(t[e])return t[e].value;let r=()=>Object.keys(t).find(o=>o!=="default"&&t[o]&&t[o].value&&!t[o].isSystemFallback);if(t.default){let o=t[t.default];if(o&&o.isSystemFallback){let s=r();if(s)return t[s].value}if(o)return o.value}let n=r()||Object.keys(t).find(o=>o!=="default"&&t[o]&&t[o].value);return n&&t[n]&&t[n].value},jf=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},Zo=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),Jo=t=>`@import url('${t}');`,Bf=t=>`@font-face { ${t} }`,Ra=(t,e,r,n={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=jf(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
|
|
32
|
+
}`;return`${a}${l}${c}`}});var Kg,bx=U(()=>{"use strict";Kg=t=>{if(!t)return"";let e=new Date(t),r=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),n=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${n}, ${r}`}});var Gg,_x=U(()=>{"use strict";Gg=(t,e)=>{let r=setTimeout(()=>{let{props:n}=t;if(!e.clientHeight){let{node:{clientHeight:o}}=t;o&&(e.clientHeight=o)}if(e.active){if(n.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let o=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(o)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(r)})}});var Yg,wx=U(()=>{"use strict";Yg=function(e){let r=[0,1];for(let n=2;n<=e;n++)r[n]=r[n-1]+r[n-2];return r[e]}});var Xg,Sx=U(()=>{"use strict";Xg=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function qo(t,e={}){let{window:r=globalThis}=e,{document:n=r.document}=e;return new Promise((o,s)=>{let i=n.querySelector(`script[src="${t}"]`);if(i)return o(i);let a=n.createElement("script");a.src=t,a.async=e.async===!0,a.type=e.type||"text/javascript",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},n.head.appendChild(a)})}async function rm(t,e={}){let{window:r=globalThis}=e,{document:n=r.document}=e;return new Promise((o,s)=>{let i=n.querySelector(`link[href="${t}"]`);if(i)return o(i);let a=n.createElement("link");a.href=t,a.rel=e.rel||"stylesheet",a.type="text/css",a.media=e.media||"all",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},n.head.appendChild(a)})}var Zg,Jg,Qg,tm,em,xx=U(()=>{"use strict";Zg=(t,e=!1,r=document,n="text/javascript")=>new Promise((o,s)=>{try{let i=r.createElement("script");i.type=n,i.async=e,i.src=t,i.addEventListener("load",a=>{o({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),r.body.appendChild(i)}catch(i){s(i)}}),Jg=(t,e=document,r="text/javascript")=>new Promise((n,o)=>{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),n()},s.onerror=()=>{e.body.removeChild(i),o(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),Qg=(t,e=document,r,n="text/javascript")=>{let o=new window.XMLHttpRequest;if(o.open("GET",t,!1),o.send(),o.status===200){let s=e.createElement("script");s.type=n,s.text=o.responseText,e.body.appendChild(s),typeof r=="function"&&r()}else throw new Error(`Failed to load the script ${t}`)},tm=(t,e=!1,r=document,n="text/javascript")=>new Promise((o,s)=>{try{let i=r.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{o({status:!0})}),r.head.appendChild(i)}catch(i){s(i)}}),em=(t,e=!1,r=document,n="text/javascript",o="smbls-script")=>{try{let s=r.createElement("script");s.type=n,s.async=e,s.id=o,s.innerHTML=t,r.body.appendChild(s)}catch(s){console.warn(s)}}});function Mn(t,e){if(!e||typeof e!="object")return t;let r=o=>!yR(o)||!Object.prototype.hasOwnProperty.call(e,o)?o:Of(e[o])||o,n={...t};for(let[o,s]of Object.entries(n))typeof s=="string"?n[o]=r(s):Array.isArray(s)&&(n[o]=s.map(i=>typeof i=="string"?r(i):i));return n}function om(t,e){if(!t||!e)return;let r=e.split("."),n=t;for(let o of r){if(n==null||typeof n!="object")return;n=n[o]}return n}function bR(t,e){let r=om(t,e);if(typeof r=="number")return Number.isFinite(r)?r:void 0;if(typeof r=="string"&&!Po(r))return r}function _R(t,e,r){let o=(e.config||e.settings||{}).polyglot||e.polyglot,s=r?.lang||o?.defaultLang||"en",a=(o?.translations||{})[s]||{},c=[r?.state,e.state].filter(u=>u&&typeof u=="object"),l=u=>{for(let d of c){let g=bR(d,u);if(g!==void 0)return g}},f={...t};for(let[u,d]of Object.entries(f))typeof d!="string"||!d.includes("{{")||(f[u]=d.replace(/\{\{\s*([^|{}]+?)\s*(?:\|\s*(\w+)\s*)?\}\}/g,(g,h,p)=>{let m=h.trim();if(p==="polyglot")return a[m]??om(a,m)??g;if(p==="getLocalStateLang")return l(m+s)??g;let y=l(m);return y!==void 0?y:a[m]??om(a,m)??g}));return f}function kx(t){if(!v(t))return{};let e={...t};for(let[r,n]of Object.entries(e))if(typeof n=="function"){let o=n.toString(),s=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[r]=`{{ ${i[1]} | polyglot }}`;continue}let a=o.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[r]=`{{ ${a[1]} }}`;continue}delete e[r]}else if(typeof n=="string"){let o=n.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(o){e[r]=`{{ ${o[1]} | getLocalStateLang }}`;continue}let s=n.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | polyglot }}`;continue}if(n.includes("=>")&&n.includes("s.")){let i=n.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[r]=`{{ ${i[1]} }}`;continue}}Po(n)&&delete e[r]}return e}function im(t,e,r,{isProduction:n=!1,channel:o="production"}={}){let s=t.pages?.[e],i=v(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=kx(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=kx(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?n?d.title=p:o==="development"?d.title=`${p} / dev:symbo.ls`:o==="staging"?d.title=`${p} / staging:symbo.ls`:d.title=`${p} / symbo.ls`:d.title="Symbols demo"}d=_R(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 g=r?.actualPathname||e;if(d["og:url"]||d.url){let p=(d["og:url"]||d.url||"").replace(/\/$/,"");if(p&&g&&g!=="/"){let m=g.startsWith("/")?g:"/"+g;d["og:url"]=p+m}}d=Mn(d,t.files);let h=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[p,m]of Object.entries(d))if(typeof m=="string"&&m.includes("{{")){let y=m.replace(/\{\{[^}]*\}\}/g,"").trim();y?d[p]=y:p==="title"?d[p]=h:delete d[p]}return d}var Lt,gR,Ko,mR,Tf,sm,yR,nm,Of,vx=U(()=>{"use strict";Dt();Rn();Lt=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,r=>e[r])},gR=t=>Object.entries(t||{}).filter(([e,r])=>r!==void 0).map(([e,r])=>`${e}="${Lt(r)}"`).join(" "),Ko=t=>{let e=5381,r=String(t);for(let n=0;n<r.length;n++)e=(e*33^r.charCodeAt(n))>>>0;return e.toString(36)},mR=new Set(["jsonLd","styles","scripts"]),Tf=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let r of t.jsonLd){if(r==null)continue;let n=typeof r=="string"?r:JSON.stringify(r),o=String(n).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Ko(n)}">${o}<\/script>`)}if(Array.isArray(t.styles))for(let r of t.styles){if(r==null||!String(r).trim())continue;let n=String(r).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Ko(n)}">${n}</style>`)}if(Array.isArray(t.scripts))for(let r of t.scripts){if(!r)continue;let n=typeof r=="string",o=n?r:r.src;if(!o&&!r.body)continue;let s=[];o&&s.push(`src="${Lt(o)}"`),n||(r.type&&s.push(`type="${Lt(r.type)}"`),r.async&&s.push("async"),r.defer&&s.push("defer"),r.integrity&&s.push(`integrity="${Lt(r.integrity)}"`),r.crossorigin&&s.push(`crossorigin="${Lt(r.crossorigin)}"`),r.referrerpolicy&&s.push(`referrerpolicy="${Lt(r.referrerpolicy)}"`),r.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Lt(o||Ko(r.body||""))}"`;if(!n&&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},sm=(t,e)=>{e||(t={...t,robots:"noindex"});let r=Object.entries(t).reduce((n,[o,s])=>{if(!s&&s!==0&&s!==!1||mR.has(o))return n;if(o==="title")return n.push(`<title>${Lt(s)}</title>`),n;if(o==="canonical")return n.push(`<link rel="canonical" href="${Lt(s)}">`),n;if(o==="manifest")return n.push(`<link rel="manifest" href="${Lt(s)}">`),n;if(o==="favicon"||o==="favicons"||o==="icon"||o==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="string")n.push(`<link rel="icon" href="${Lt(f)}">`);else if(typeof f=="object"){let u=gR(f);/rel=/.test(u)?n.push(`<link ${u}>`):n.push(`<link rel="icon" ${u}>`)}}),n;if(o==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).filter(([d,g])=>g!==void 0).map(([d,g])=>`${d}="${Lt(g)}"`).join(" ");n.push(`<link rel="alternate" ${u}>`)}}),n;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")n.push(`<meta ${u}="${Lt(l)}" content="${Lt(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")n.push(`<meta ${u}="${Lt(l)}" content="${Lt(d)}">`);else if(typeof d=="object"){let g=Object.entries(d).filter(([h,p])=>p!==void 0).map(([h,p])=>`${h}="${Lt(p)}"`).join(" ");n.push(`<meta ${g}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([g,h])=>h!==void 0).map(([g,h])=>`${g}="${Lt(h)}"`).join(" ");n.push(`<meta ${d}>`)}};if(o.startsWith("http-equiv:")){let l=o.replace("http-equiv:","");return i(l,s,"http-equiv"),n}if(o.startsWith("itemprop:")){let l=o.replace("itemprop:","");return i(l,s,"itemprop"),n}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>o.startsWith(l));if(c){let l=o.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),n}if(o.startsWith("apple:")||o.startsWith("msapplication:")){let l=o.startsWith("apple:")?"apple-":"msapplication-",f=o.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),n}return i(o,s),n},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return r.push(...Tf(t)),r.join(`
|
|
33
|
+
`)},yR=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http"),nm=t=>typeof t=="string"&&t.length>0,Of=t=>{if(!t||typeof t!="object")return null;if(nm(t.src))return t.src;let e=t.content;return!e||typeof e!="object"?null:nm(e.src)?e.src:nm(e.storageUrl)?e.storageUrl:null}});var Rf,am,Cx=U(()=>{"use strict";Dt();Rf=(t,e)=>(P(e)?e:Object.values(e)).reduce((r,n)=>Math.abs(n-t)<Math.abs(r-t)?n:r),am=(t,e)=>(t=parseFloat(t),v(e)&&(e=Object.values(e)),Rf(t,e))});function Nn(t){let e=String(t||"").trim();if(!e)return{owner:cm,key:"",full:""};let r=null,n=e;if(e.includes("/")){let s=e.indexOf("/");r=e.slice(0,s),n=e.slice(s+1)}n=n.replace(/\.symbo\.ls$/iu,""),r||(r=cm);let o=n?`${r}/${n}`:"";return{owner:r,key:n,full:o}}async function Df(t,e={}){if((e.provider||"kv")==="api")return Lx(t,e);let n=await YR(t,e);return n||Lx(t,e)}async function YR(t,e={}){let r=e.kvBaseUrl||wR,n=e.env||"production",o=`${r}/kv/${encodeURIComponent(t)}?env=${n}`;try{let s=await fetch(o,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function Lx(t,e={}){let r=e.apiBaseUrl||SR,{key:n}=Nn(t);try{let o=`${r}/core/projects/libraries/available?search=${encodeURIComponent(n)}&limit=10`,s=await fetch(o,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(g=>{let{key:h}=Nn(g?.key);return h.toLowerCase()===n.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 Ix(t,e={}){if(v(t))return t;if(x(t)){let{full:r}=Nn(t);if(!r)return null;try{let n=await Df(r,e);return n||console.warn(`[smbls] Shared library "${r}" not found`),n}catch(n){return console.warn(`[smbls] Failed to fetch shared library "${r}":`,n.message),null}}return null}async function gm(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async n=>{if(er(n)){let o=await Ix(Nx(n),e);return o?{library:o,ignoreList:n.ignoreList}:null}return Ix(n,e)}))).filter(Boolean)}var cm,wR,SR,Go,$x,xR,kR,Ex,Mx,Ax,Fx,vR,ka,um,er,Nx,lm,dm,CR,ER,jx,pm,Bx,Tx,Fn,Vx,AR,Hr,TR,Ux,zx,Ox,OR,RR,PR,DR,Rx,Pf,LR,Hx,fm,Wx,IR,Px,$R,MR,FR,NR,hm,jR,BR,VR,UR,Dx,va,zR,HR,WR,qR,KR,GR,qx,Ca,Ea,Kx=U(()=>{"use strict";Dt();xn();Ml();Ye();cm="system",wR="https://smbls-kv.nika-980.workers.dev",SR="https://api.symbols.app";Go=(t,e,r,n)=>{for(let o in e){let s=n?`${n}/${o}`:o;r&&r.has(s)||(o in t?v(t[o])&&v(e[o])&&Go(t[o],e[o],r,s):t[o]=e[o])}},$x=(t,e,r)=>{if(!v(t)||!e.size)return t;let n=`${r}/`,o=!1;for(let i of e)if(i.startsWith(n)){o=!0;break}if(!o)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]=$x(t[i],e,a))}return s},xR=new Set,kR=new Set(["components","pages","functions","snippets","methods"]),Ex=(t,e)=>e===""&&kR.has(t),Mx=["fontFamily","fontfamily","font_family","FONT_FAMILY"],Ax=t=>{let e=new Map;if(!v(t))return e;for(let r of Mx){let n=t[r];if(v(n))for(let o in n)!v(n[o])||!n[o].isDefault||(e.has(r)||e.set(r,new Set),e.get(r).add(o))}return e},Fx=(t,e)=>{for(let r of Mx){let n=t[r];if(!v(n))continue;let o=e.get(r),s=null;for(let i in n){let a=n[i];if(!v(a)||!a.isDefault||o&&o.has(i))continue;let c={...a};delete c.isDefault,s||(s={...n}),s[i]=c}s&&(t[r]=s)}},vR=t=>t.replace(/\.js$/iu,""),ka=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let r of t){if(!x(r))continue;let n=r.split("/").map(o=>vR(o.trim())).filter(Boolean).join("/");n&&e.add(n)}return e},um=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),er=t=>v(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),Nx=t=>t.library!==void 0?t.library:t.key??t.name,lm=new Set,dm=()=>{lm.clear()},CR=(t,e)=>{let r=e.filter(n=>!lm.has(n));if(r.length){for(let n of r)lm.add(n);mt()&&console.warn(`[smbls] shared library "${t}" ships ${r.map(n=>`methods.${n}`).join(", ")} \u2014 named like a built-in element method. Refused: the built-in wins; a library cannot replace an element method on the consuming app. If the app wants this version, declare it in the app's OWN methods.`)}},ER=(t,e,r)=>{let n=null;for(let o in t)if(Sn(o)&&(e.has(`methods/${o}`)||r.push(o),!n)){n={};for(let s in t)Sn(s)||(n[s]=t[s])}return n||t},jx=(t,e)=>{let r=ka(t.sharedLibIgnore);return t.sharePages===!1&&r.add("pages"),r.size?new Set([...e,...r]):e},pm=["functions","methods","snippets"],Bx=["components","pages"],Tx=Symbol.for("smbls.libraryScope"),Fn="__libraryScopes",Vx=new Map,AR=()=>Math.random().toString(36).slice(2,10)+Date.now().toString(36).slice(-4),Hr=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),TR=/const __scope = |const __peers_* = |const _s = el\?\.scope|\?\.context\?\.globalScope\?\./,Ux=t=>{try{return le(t)}catch{return null}},zx=t=>{if(typeof t!="function")return null;let e=Ux(t);return x(e)&&TR.test(e)&&zt(e)?e:null},Ox=t=>x(t)&&zt(t)||zx(t)!==null,OR=t=>{let e=t.globalScope;return v(e)&&Object.keys(e).some(r=>Ox(e[r]))?!0:pm.some(r=>{let n=t[r];return!!n&&typeof n=="object"&&Object.keys(n).some(o=>Ox(n[o]))})},RR=(t,e,r)=>{let n=t.globalScope,o=e.globalScope;if(r.has("globalScope")||!v(n)||!v(o)||!OR(e))return 0;let s=0;for(let i of Object.keys(o))r.has(`globalScope/${i}`)||Hr(n,i)&&s++;return s},PR=[[/const __scope = (\(\(\) => \{ const r = [\s\S]*?\}\)\(\));/g,"const __scope = $RESOLVE($1);"],[/const __scope = this \?\? \{\};/g,"const __scope = $RESOLVE(this ?? {});"],[/const (__peers_*) = (this && this !== globalThis && this\.context && this\.context\.globalScope \? this\.scope \?\? this\.context\.globalScope : this);/g,"const $1 = $RESOLVE($2);"],[/const _s = (el\?\.scope \?\? el\?\.context\?\.globalScope \?\? \{\});/g,"const _s = $RESOLVE($1);"],[/(?<![\w$.])(this|[A-Za-z_$][\w$]*)\?\.context\?\.globalScope\?\./g,"$RESOLVE($1?.context?.globalScope)?."]],DR=t=>{let e=t.split(""),r=[],n=0,o=0,s=(a,c)=>{for(let l=a;l<c;l++)e[l]!==`
|
|
34
|
+
`&&(e[l]="~")},i=()=>{let a=n;for(;n<t.length;){let c=t[n];if(c==="\\"){n+=2;continue}if(c==="`"){s(a,n),n++;return}if(c==="$"&&t[n+1]==="{"){s(a,n),n+=2,r.push(o),o++;return}n++}s(a,n)};for(;n<t.length;){let a=t[n];if(a==="/"&&t[n+1]==="/"){let c=t.indexOf(`
|
|
35
|
+
`,n),l=c===-1?t.length:c;s(n,l),n=l;continue}if(a==="/"&&t[n+1]==="*"){let c=t.indexOf("*/",n+2),l=c===-1?t.length:c+2;s(n,l),n=l;continue}if(a==='"'||a==="'"){let c=a,l=++n;for(;n<t.length&&t[n]!==c&&t[n]!==`
|
|
36
|
+
`;)t[n]==="\\"&&n++,n++;s(l,n),n++;continue}if(a==="`"){n++,i();continue}if(a==="{"){o++,n++;continue}if(a==="}"){if(o--,r.length&&o===r[r.length-1]){r.pop(),n++,i();continue}n++;continue}n++}return e.join("")},Rx=(t,e)=>{if(!x(t)||!t.includes("__scope = ")&&!t.includes("__peers")&&!t.includes("const _s = ")&&!t.includes("?.context?.globalScope?.")||!zt(t))return t;let r=`(globalThis[Symbol.for('smbls.libraryScope')] || ((_, v) => v))(${JSON.stringify(e)}, `,n=t;for(let[o,s]of PR){let i=DR(n);n=n.replace(o,(...a)=>{let c=a[a.length-2];return i[c]==="~"||i[c]!==n[c]?a[0]:s.replace(/\$RESOLVE\(/g,r).replace(/\$(\d)/g,(l,f)=>a[Number(f)])})}return n},Pf=(t,e)=>{if(x(t))return Rx(t,e);let r=zx(t);return r===null?t:Rx(r,e)},LR={lazy:!0,window:globalThis},Hx=(t,e)=>{let r=Pf(t,e);if(r===t||!x(r))return r;try{let n=Jt({v:r},{},LR).v;return typeof n!="function"?r:(Object.defineProperty(n,"toJSON",{value:()=>r,configurable:!0}),n)}catch{return r}},fm=t=>{if(!t||typeof t!="object")return!1;if(Array.isArray(t))return!0;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null},Wx=(t,e,r=new WeakMap)=>{if(x(t)||typeof t=="function")return Hx(t,e);if(Oi(t)||!fm(t))return t;if(r.has(t))return r.get(t);let n=Array.isArray(t)?[]:Object.getPrototypeOf(t)===null?Object.create(null):{};r.set(t,n);for(let o of Object.keys(t))n[o]=Wx(t[o],e,r);return n},IR=(t,e)=>{let r={...t},n={};for(let o of Object.keys(t.globalScope))n[o]=Pf(t.globalScope[o],e);r.globalScope=n;for(let o of pm){let s=t[o];if(!fm(s))continue;let i={};for(let a of Object.keys(s))i[a]=Hx(s[a],e);r[o]=i}for(let o of Bx)fm(t[o])&&(r[o]=Wx(t[o],e));return r},Px=new WeakMap,$R=(t,e,r)=>{let n=Px.get(t);n||Px.set(t,n=new Map);let o=n.get(e);if(o)return o;let s=(i,a)=>Hr(r,i)&&r[i]===a;return o=new Proxy(t,{get(i,a){if(typeof a=="symbol"||Hr(i,a))return Reflect.get(i,a);let c=Reflect.get(i,a);return Hr(e,a)&&(c===void 0||s(a,c))||c===void 0?e[a]:c},set(i,a,c){return typeof a!="symbol"&&!Hr(i,a)&&Hr(e,a)?(e[a]=c,!0):Reflect.set(i,a,c)},has:(i,a)=>Reflect.has(i,a)||a in e}),n.set(e,o),o},MR=t=>!!t&&typeof t=="object"&&!!t.__raw&&typeof t.__raw=="object",FR=(t,e)=>{let r=Vx.get(t);return r?e===r.consumerGs?r.libGs:MR(e)?$R(e,r.libGs,r.consumerGs):e:e},NR=()=>{typeof globalThis[Tx]!="function"&&Object.defineProperty(globalThis,Tx,{value:FR,configurable:!0})},hm=t=>{let e=t[Fn];return Array.isArray(e)?e:null},jR=t=>er(t)?t.library:t,BR=(t,e,r)=>{let n=hm(t);return!!n&&n.some(o=>o&&o.index===e&&(!o.key||o.key===r.key)&&x(o.id)&&VR(t,o.id))},VR=(t,e)=>{let r=JSON.stringify(e),n=new Set,o=s=>{if(x(s))return s.includes(r);if(!s||typeof s!="object"||n.has(s))return!1;n.add(s);for(let i in s)if(o(s[i]))return!0;return!1};for(let s of["globalScope",...pm,...Bx])if(o(t[s]))return!0;return!1},UR=(t,e)=>{let r={};for(let n of Object.keys(t))r[n]=Pf(t[n],e);return r},Dx=new WeakMap,va=(t,e=null)=>{let r=t&&hm(t);if(!r||!r.length)return 0;let n=t.globalScope;if(!v(n))return 0;let o=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[],s=Dx.get(n);s||Dx.set(n,s=new Set),NR();let i=0;for(let a of r){if(!a||!x(a.id)||s.has(a.id))continue;let c=jR(o[a.index]);if(!c||!v(c.globalScope)||a.key&&c.key!==a.key)continue;let l=g=>typeof g=="function"?Ux(g):g,f=(g,h)=>{if(g===h)return!0;let p=l(g),m=l(h);return x(p)||x(m)?p===m:JSON.stringify(g)===JSON.stringify(h)},u=v(e)?(Array.isArray(a.landed)?a.landed:[]).filter(g=>x(g)&&Hr(c.globalScope,g)&&Hr(e,g)&&f(e[g],Pf(c.globalScope[g],a.id))):[],d=An(UR(c.globalScope,a.id));Object.setPrototypeOf(d,n),Vx.set(a.id,{libGs:d,consumerGs:n});for(let g of u)n[g]=d[g];s.add(a.id),i++}return i},zR=(t,e,r,n="library",o=-1)=>{let s=jx(e,r),i=!BR(t,o,e)&&RR(t,e,s)>0?`${n}#${AR()}`:null,a=i?IR(e,i):e,c=i?new Set(Object.keys(t.globalScope)):null,l=[];for(let f in a)if(Object.prototype.hasOwnProperty.call(a,f)&&!(f==="sharePages"||f==="sharedLibIgnore")&&f!==Fn&&!f.startsWith("__")&&f!=="app"&&!s.has(f)){if(v(a[f])&&v(t[f])){if(f==="designSystem")Go(t[f],a[f],s,f);else for(let u in a[f])if(!s.has(`${f}/${u}`)){if(f==="methods"&&Sn(u)){u in t[f]||l.push(u);continue}u in t[f]?Ex(f,t[f][u])&&!Ex(f,a[f][u])&&(t[f][u]=a[f][u]):t[f][u]=a[f][u]}}else if(!(f in t)){let u=a[f],d=f==="methods"&&u&&typeof u=="object"?ER(u,s,l):u;t[f]=$x(d,s,f)}}i&&(hm(t)||(t[Fn]=[]),t[Fn].push({id:i,index:o,key:x(e.key)?e.key:null,landed:Object.keys(a.globalScope).filter(f=>!c.has(f))})),l.length&&CR(n,l)},HR=(t,e,r)=>{if(t!==e){let n=Nx(t);if(x(n)&&n)return n;if(t.key||t.name)return t.key||t.name}return e&&(e.key||e.name)||`sharedLibraries[${r}]`},WR=`${cm}/default`,qR=t=>x(t)&&t!==""&&Nn(t).full===WR,KR=(t,e)=>{if(x(e.key)&&e.key)return e.key;if(t!==e){if(x(t.key)&&t.key)return t.key;if(x(t.name)&&t.name)return t.name}return null},GR=t=>{let e=[],r=[];for(let n=0;n<t.length;n++){let o=t[n],s=o,i=xR;if(er(s)&&(i=ka(s.ignoreList),s=s.library),!v(s))continue;let a={entry:o,lib:s,ignore:i,index:n};qR(KR(o,s))?r.push(a):e.push(a)}return{linked:e,bases:r}},qx=(t,e,r)=>{let n=Ax(e()),{linked:o,bases:s}=GR(t);for(let a of o)r(a);let i=!n.size&&s.length?Ax(e()):null;for(let a of s)r(a);return n.size?n:i&&i.size?i:null},Ca=(t,e)=>{if(!e||!e.length)return;let r=t.designSystem,n=qx(e,()=>t.designSystem,({entry:o,lib:s,ignore:i,index:a})=>zR(t,s,i,HR(o,s,a),a));n&&(t.designSystem!==r&&(t.designSystem={...t.designSystem}),Fx(t.designSystem,n))},Ea=(t,e,r=Go)=>{if(!v(t)||!Array.isArray(e)||!e.length)return t;let n=qx(e,()=>t,({lib:o,ignore:s})=>{let i=o.designSystem;if(!i||typeof i!="object")return;let a=jx(o,s);a.has("designSystem")||r(t,i,a,"designSystem")});return n&&Fx(t,n),t}});var mm,ym,bm,Aa,_m,Ta,wm,jn,Gx=U(()=>{"use strict";Dt();mm=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},ym=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)}},bm=t=>t.replace(/[^a-zA-Z0-9_]/g,""),Aa=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,"")),_m=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),Ta=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),wm=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},jn=t=>{if(P(t))return t;if(x(t))return t.split(" ");if(v(t))return Object.values(t);if(Ge(t))return[t]}});var Sm,Yx=U(()=>{"use strict";Sm=()=>{let t=document.styleSheets[0],e="";if(t)try{let r=t.cssRules||t.rules;for(let n=0;n<r.length;n++)e+=r[n].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 Qt,Yo,Oa,Ra,Xx=U(()=>{"use strict";Qt=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let r=t.context;if(!r)return null;let n=r.assets&&r.assets[e]||r.files&&r.files[e];if(!n)return null;if(typeof n=="string")return{src:n,type:null,variants:null};if(typeof n=="object"){if(typeof n.src=="string")return n;let o=n.content,s=o&&o.src;if(typeof s=="string")return{...n,src:s,type:n.type??o.type??null,variants:n.variants??o.variants??null}}return null},Yo=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let r=t.some(o=>typeof o.width=="number"),n=[];for(let o of t)r&&typeof o.width=="number"?n.push(`${o.src} ${o.width}w`):r||(o.scale===1&&e?n.push(o.src):o.scale&&o.scale!==1&&n.push(`${o.src} ${o.scale}x`));return n.join(", ")},Oa=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(r=>r.format===t.type);return Yo(e,{keepOneX:!1})},Ra=(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 n=[];for(let[a,c]of r)a!==t.type&&n.push({tag:"source",attr:{type:a,srcset:Yo(c,{keepOneX:!0})}});let o=r.get(t.type)||[],s=Yo(o,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...n,{tag:"img",attr:i}]}});var Xo={};M(Xo,{CDN_PROVIDERS:()=>Se,DOMQL_EVENTS:()=>ah,DOMQ_PROPERTIES:()=>$r,ELEMENT_METHOD_OVERRIDE_POINTS:()=>Oo,ENV:()=>Ch,HTML_TAGS:()=>Io,LIBRARY_SCOPES_KEY:()=>Fn,METHODS:()=>Fr,METHODS_EXL:()=>Ci,NODE_ENV:()=>Ie,OPTIONS:()=>Zi,PACKAGE_MANAGER_TO_CDN:()=>Ur,PARSED_DOMQ_PROPERTIES:()=>vi,PROPS_METHODS:()=>Mr,REVIVED_MARK:()=>Ri,STATE_METHODS:()=>wn,STATE_PROPERTIES:()=>sh,SVG_TAGS:()=>RS,TYPES:()=>yi,UNIVERSAL_RESERVED_KEYS:()=>Ef,__resetBuiltinMethodWarnings:()=>dm,addCaching:()=>of,addContext:()=>nf,addExtend:()=>Gh,addExtends:()=>Xe,addItemAfterEveryElement:()=>qp,addProtoToArray:()=>wi,addRef:()=>tf,applyDependentState:()=>pg,applyEvent:()=>uf,applyEventUpdate:()=>df,applyExtends:()=>LS,applyProps:()=>Hi,arrayContainsOtherArray:()=>jp,arraysEqual:()=>Gp,arrayzeValue:()=>jn,bindLibraryGlobalScopes:()=>va,buildImgSrcset:()=>Oa,buildSourcesAndImg:()=>Ra,cache:()=>bg,call:()=>Vg,captureSnapshot:()=>zg,checkForStateTypes:()=>lg,checkIfInherits:()=>ff,checkIfStringIsInArray:()=>Zp,clone:()=>fh,cloneAndMergeArrayExtend:()=>Mi,cloneFunction:()=>Dh,collectExtendsList:()=>$o,concatAddExtends:()=>Wh,copyJavaScriptToClipboard:()=>ym,copyStringToClipboard:()=>mm,createBasedOnType:()=>Ql,createElement:()=>cg,createElementExtends:()=>Vl,createExtends:()=>Ni,createExtendsFromKeys:()=>Mo,createExtendsStack:()=>Wl,createIfConditionFlag:()=>Lh,createInheritedState:()=>fg,createKey:()=>Ii,createNestedObject:()=>bh,createNestedObjectByKeyPath:()=>dg,createObjectWithoutPrototype:()=>Ll,createParent:()=>ef,createPath:()=>rf,createProps:()=>Wi,createPropsStack:()=>Zl,createRoot:()=>ag,createScope:()=>gg,createSnapshotId:()=>Li,customDecodeURIComponent:()=>oh,customEncodeURIComponent:()=>nh,cutArrayAfterValue:()=>Hp,cutArrayBeforeValue:()=>zp,debounce:()=>$i,debounceOnContext:()=>Rh,decodeNewlines:()=>rh,deepClone:()=>ft,deepContains:()=>mh,deepDefaults:()=>Go,deepDestringifyFunctions:()=>Jt,deepExtend:()=>Bl,deepMerge:()=>it,deepMergeExtends:()=>Ze,deepStringifyFunctions:()=>Ai,defineSetter:()=>jg,destringifyGlobalScope:()=>An,detectHeightOnInit:()=>Gg,detectInfiniteLoop:()=>xh,document:()=>nt,encodeNewlines:()=>eh,error:()=>Ln,excludeKeysFromObject:()=>vh,exec:()=>pt,extendCachedRegistry:()=>qh,extendStackRegistry:()=>ji,extractArrayExtend:()=>Vi,fetchLibraryData:()=>Df,fibonacciNumberByIndex:()=>Yg,fileEntryUrl:()=>Of,filterArrays:()=>Yp,filterArraysFast:()=>Xp,finalizeExtends:()=>ql,findClosestNumber:()=>Rf,findClosestNumberInFactory:()=>am,findInheritedState:()=>lf,findKeyPosition:()=>Qp,flattenExtend:()=>Fo,formatDate:()=>Kg,generateHash:()=>Fl,generateHeadArrayTags:()=>Tf,generateKey:()=>Di,generateMetaTags:()=>sm,get:()=>$g,getCDNDirUrl:()=>Af,getCDNUrl:()=>Me,getCapitalCaseKeys:()=>Zh,getCdnProviderFromConfig:()=>Wo,getChildStateInKey:()=>cf,getChildren:()=>Ng,getContext:()=>ha,getCookie:()=>Nh,getDB:()=>_a,getEmotionStylesheet:()=>Sm,getExtendsInElement:()=>Yh,getExtendsStack:()=>Fi,getExtendsStackRegistry:()=>jl,getFrequencyInArray:()=>Bp,getFunctionSource:()=>le,getHashedExtend:()=>Bi,getImportMapScript:()=>qg,getInObjectByPath:()=>Sh,getLocalStorage:()=>Bh,getNev:()=>Oh,getPageMetadata:()=>im,getParentStateInKey:()=>af,getPath:()=>ca,getQuery:()=>wa,getRef:()=>Fg,getRoot:()=>ua,getRootContext:()=>pa,getRootData:()=>da,getRootState:()=>fa,getRootStateInKey:()=>sf,getSpreadChildren:()=>Jh,global:()=>Mp,hasFunction:()=>zt,hasHandlerPlugin:()=>Do,hasOwnProperty:()=>ph,hashContent:()=>Ko,inheritChildExtends:()=>zl,inheritChildPropsExtends:()=>Ul,inheritParentProps:()=>qi,inheritRecursiveChildExtends:()=>Hl,initProps:()=>og,is:()=>Zt,isArray:()=>P,isBoolean:()=>El,isBuiltinElementMethod:()=>ih,isContextComponent:()=>Qh,isCyclic:()=>kh,isDOMNode:()=>Xt,isDate:()=>Tl,isDefined:()=>Tt,isDevelopment:()=>jr,isEmpty:()=>Pl,isEmptyObject:()=>hh,isEqualDeep:()=>Dl,isFailedRevival:()=>Cn,isFunction:()=>R,isHtmlElement:()=>gi,isLazyFunction:()=>uh,isLocal:()=>Th,isLoudDevRuntime:()=>mt,isMalformedDependency:()=>In,isMethod:()=>Ug,isMobile:()=>Mh,isNode:()=>hr,isNot:()=>Np,isNotProduction:()=>On,isNull:()=>Al,isNumber:()=>Ge,isObject:()=>v,isObjectLike:()=>B,isPhoto:()=>Xg,isPolyglotRetranslatableKey:()=>Xi,isPolyglotWritableKey:()=>Pn,isProduction:()=>Nr,isProtectedElementMethod:()=>Sn,isRevived:()=>En,isStaging:()=>Ah,isState:()=>ug,isString:()=>x,isStringFunction:()=>Po,isStringTag:()=>Oi,isTest:()=>$l,isTesting:()=>Eh,isUndefined:()=>Pt,isUniversallyReservedKey:()=>Hg,isUnresolvableDependency:()=>zr,isValidDependencyMap:()=>$n,isValidHtmlTag:()=>Uh,isWrappedLibrary:()=>er,joinArrays:()=>Eo,jointStacks:()=>Kh,keys:()=>vf,loadCssFile:()=>tm,loadJavascript:()=>em,loadJavascriptFile:()=>Zg,loadJavascriptFileEmbedSync:()=>Qg,loadJavascriptFileSync:()=>Jg,loadRemoteCSS:()=>rm,loadRemoteScript:()=>qo,log:()=>Bg,logGroupIf:()=>$h,logIf:()=>Ih,lookdown:()=>Lg,lookdownAll:()=>Ig,lookup:()=>Dg,lowercaseFirstLetter:()=>_n,makeObjectWithoutPrototype:()=>gh,map:()=>lh,mapStringsWithContextComponents:()=>Ui,markPolyglotSeeded:()=>Qe,markRevived:()=>Ro,matchesComponentNaming:()=>Je,memoize:()=>Ph,merge:()=>_t,mergeSharedLibraries:()=>Ca,mergeSharedLibraryDesignSystems:()=>Ea,nextElement:()=>ma,normalizeIgnoreList:()=>ka,normalizeLibraryKey:()=>Nn,objectToString:()=>Ti,objectizeStringProperty:()=>zi,overwrite:()=>Pi,overwriteDeep:()=>Ht,overwriteShallow:()=>Tn,overwriteState:()=>hg,parse:()=>Cf,parseDeep:()=>ia,pickupElementFromProps:()=>Yl,pickupPropsFromElement:()=>Gl,polyglotSeededKeys:()=>No,previousElement:()=>ya,promoteActiveRootState:()=>Vo,propExists:()=>rg,propertizeElement:()=>Xl,propertizeUpdate:()=>eg,remove:()=>ux,removeChars:()=>bm,removeCookie:()=>jh,removeDuplicateProps:()=>Gi,removeDuplicatesInArray:()=>Ao,removeFromArray:()=>Vp,removeFromObject:()=>yh,removeNestedKeyByPath:()=>_h,removeValueFromArray:()=>_i,removeValueFromArrayAll:()=>Wp,reorderArrayByValues:()=>Kp,replaceLiteralsWithObjectFields:()=>Ft,replaceOctalEscapeSequences:()=>th,resolveAsset:()=>Qt,resolveFileReferences:()=>Mn,resolveHandler:()=>Lo,resolveSharedLibraries:()=>gm,returnValueAsText:()=>Jl,runPluginHook:()=>Ot,self:()=>Fp,setActiveRootState:()=>la,setCookie:()=>Fh,setHashedExtend:()=>Nl,setInObjectByPath:()=>wh,setLocalStorage:()=>Vh,setNodeStyles:()=>kf,setProps:()=>Mg,setPropsPrototype:()=>Ki,sharedLibrary:()=>um,splitPackageSpecifier:()=>Sa,spotByPath:()=>aa,srcsetFor:()=>Yo,stringIncludesAny:()=>xi,stringToObject:()=>dh,stripVersionRangePrefix:()=>xa,swapItemsInArray:()=>Up,syncProps:()=>Yi,toCamelCase:()=>Aa,toDashCase:()=>Ta,toDescriptionCase:()=>wm,toPriorityOrder:()=>_e,toTitleCase:()=>_m,toggleFullscreen:()=>Wg,triggerEventOn:()=>gr,triggerEventOnUpdate:()=>mg,trimStringFromSymbols:()=>Jp,unstackArrayOfObjects:()=>bi,update:()=>ng,updateProps:()=>sg,variables:()=>ba,verbose:()=>Uo,warn:()=>ga,window:()=>C});var L=U(()=>{"use strict";Il();Ml();Dt();Ye();Rn();To();mi();AS();TS();ki();hi();OS();zh();Xh();ig();Kl();jS();HS();xn();WS();px();_g();hx();yg();gx();mx();yx();bx();_x();wx();Sx();xx();vx();Cx();Kx();Gx();Yx();Xx()});var $A=yp((DH,IA)=>{var Xs=1e3,Zs=Xs*60,Js=Zs*60,yo=Js*24,G$=yo*7,Y$=yo*365.25;IA.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return X$(t);if(r==="number"&&isFinite(t))return e.long?J$(t):Z$(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function X$(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]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Y$;case"weeks":case"week":case"w":return r*G$;case"days":case"day":case"d":return r*yo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Js;case"minutes":case"minute":case"mins":case"min":case"m":return r*Zs;case"seconds":case"second":case"secs":case"sec":case"s":return r*Xs;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Z$(t){var e=Math.abs(t);return e>=yo?Math.round(t/yo)+"d":e>=Js?Math.round(t/Js)+"h":e>=Zs?Math.round(t/Zs)+"m":e>=Xs?Math.round(t/Xs)+"s":t+"ms"}function J$(t){var e=Math.abs(t);return e>=yo?Vd(t,e,yo,"day"):e>=Js?Vd(t,e,Js,"hour"):e>=Zs?Vd(t,e,Zs,"minute"):e>=Xs?Vd(t,e,Xs,"second"):t+" ms"}function Vd(t,e,r,n){var o=e>=r*1.5;return Math.round(t/r)+" "+n+(o?"s":"")}});var FA=yp((LH,MA)=>{function Q$(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=o,r.enabled=a,r.humanize=$A(),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,g,h;function p(...m){if(!p.enabled)return;let y=p,w=Number(new Date),b=w-(u||w);y.diff=b,y.prev=u,y.curr=w,u=w,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let _=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(k,E)=>{if(k==="%%")return"%";_++;let T=r.formatters[E];if(typeof T=="function"){let I=m[_];k=T.call(y,I),m.splice(_,1),_--}return k}),r.formatArgs.call(y,m),(y.log||r.log).apply(y,m)}return p.namespace=f,p.useColors=r.useColors(),p.color=r.selectColor(f),p.extend=n,p.destroy=r.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(g!==r.namespaces&&(g=r.namespaces,h=r.enabled(f)),h),set:m=>{d=m}}),typeof r.init=="function"&&r.init(p),p}function n(f,u){let d=r(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function o(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,g=0,h=-1,p=0;for(;d<f.length;)if(g<u.length&&(u[g]===f[d]||u[g]==="*"))u[g]==="*"?(h=g,p=d,g++):(d++,g++);else if(h!==-1)g=h+1,p++,d=p;else return!1;for(;g<u.length&&u[g]==="*";)g++;return g===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}MA.exports=Q$});var NA=yp((ce,Ud)=>{ce.formatArgs=eM;ce.save=rM;ce.load=nM;ce.useColors=tM;ce.storage=oM();ce.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`."))}})();ce.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 tM(){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 eM(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Ud.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),t.splice(n,0,e)}ce.log=console.debug||console.log||(()=>{});function rM(t){try{t?ce.storage.setItem("debug",t):ce.storage.removeItem("debug")}catch{}}function nM(){let t;try{t=ce.storage.getItem("debug")||ce.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function oM(){try{return localStorage}catch{}}Ud.exports=FA()(ce);var{formatters:sM}=Ud.exports;sM.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Xw={};M(Xw,{ANIMATION_PROPS:()=>Hy,ARIA_ROLES:()=>w2,ATTR_TRANSFORMS:()=>ro,BLOCK_PROPS:()=>Wy,CDN_PROVIDERS:()=>Se,COMPOUND_CSS_KEYWORDS:()=>Vn,CONFIG:()=>Wn,CONFIG_MERGE_EXL:()=>de,CSS_NAMED_COLOR_HEX:()=>Lf,CSS_NATIVE_COLOR_REGEX:()=>fe,CSS_PROPS_REGISTRY:()=>xt,CSS_UNITS:()=>Co,DEFAULT_CONFIG:()=>Dc,DEFAULT_CSS_PROPERTIES_LIST:()=>At,DELEGATED_EVENTS:()=>ws,DESIGN_SYSTEM_OPTIONS:()=>P_,DOMQL_EVENTS:()=>ah,DOMQ_PROPERTIES:()=>$r,DOM_EVENTS:()=>ak,ELEMENT_METHOD_OVERRIDE_POINTS:()=>Oo,ENV:()=>Ch,FACTORY:()=>ue,FLEX_PROPS:()=>Xy,FONT_PROPS:()=>qy,GRID_PROPS:()=>Zy,HOST_REGISTERED_PACKAGES:()=>j1,HTML_ATTRIBUTES:()=>Cu,HTML_TAGS:()=>Io,LIBRARY_SCOPES_KEY:()=>Fn,LIFECYCLE_EVENTS:()=>rn,METHODS:()=>Fr,METHODS_EXL:()=>Ci,MISC_PROPS:()=>Ky,MIXINS:()=>Su,NODE_ENV:()=>Ie,OPTIONS:()=>Zi,PACKAGE_MANAGER_TO_CDN:()=>Ur,PARSED_DOMQ_PROPERTIES:()=>vi,POSITION_PROPS:()=>Gy,PROPS_METHODS:()=>Mr,REGISTRY:()=>Nt,RESERVED_STORE_METHODS:()=>iS,REVIVED_MARK:()=>Ri,ROUTER_OPTIONS:()=>ld,SIGNAL_ENGINE_KEY:()=>ko,SIGNAL_INSTANCES_KEY:()=>So,STANDARD_SCHEME_QUERIES:()=>ru,STATE_PROPERTIES:()=>sh,STORE_METHOD_NAMES:()=>sS,SVG_TAGS:()=>bs,THEME_PROPS:()=>Yy,TIMING_PROPS:()=>bc,TYPES:()=>yi,UNIVERSAL_RESERVED_KEYS:()=>Ef,VALUE_TRANSFORMERS:()=>du,VERSION:()=>cS,__resetBuiltinMethodWarnings:()=>dm,__resetSignalEngine:()=>Lp,__resetSignalInstances:()=>Dp,__resetSkinWarnings:()=>by,__resetStateShadowWarnings:()=>aS,activateConfig:()=>e0,addCaching:()=>of,addContext:()=>nf,addDelegatedEvent:()=>mc,addExtend:()=>Gh,addExtends:()=>Xe,addItemAfterEveryElement:()=>qp,addMethods:()=>Es,addProtoToArray:()=>wi,addRef:()=>tf,aliasCaseVariants:()=>ss,animation:()=>qm,appendSVGSprite:()=>cc,appendSvgIconsSprite:()=>Zn,applyAttrTransforms:()=>Vy,applyCSS:()=>x_,applyDependentState:()=>pg,applyDocument:()=>ac,applyEvent:()=>uf,applyEventUpdate:()=>df,applyExtends:()=>xs,applyHeadings:()=>su,applyInitialState:()=>Fu,applyMediaSequenceVars:()=>qr,applyProps:()=>Hi,applyReset:()=>lc,applySequenceGlobalVars:()=>qa,applySequenceVars:()=>wr,applySkins:()=>fc,applySpacingSequence:()=>Xa,applyStateMethods:()=>ye,applyTimingSequence:()=>ic,applyTrueProps:()=>Qy,applyTypographySequence:()=>nc,arrayContainsOtherArray:()=>jp,arraysEqual:()=>Gp,arrayzeValue:()=>jn,assertEmitIntegrity:()=>Ry,batch:()=>kl,bindLibraryGlobalScopes:()=>va,breakpoints:()=>Hm,buildImgSrcset:()=>Oa,buildSkinVarStyles:()=>Jn,buildSourcesAndImg:()=>Ra,buildThemeVarStyles:()=>ad,cache:()=>bg,cacheNode:()=>en,call:()=>Vg,callStateMethod:()=>wc,camelToAttr:()=>ir,camelToLowerAttr:()=>ck,captureSnapshot:()=>zg,changeGlobalTheme:()=>pu,changeLightness:()=>Am,checkAttributeByTagName:()=>Te,checkEventFunctions:()=>By,checkForStateTypes:()=>lg,checkIfBoxSize:()=>Ya,checkIfInherits:()=>ff,checkIfStringIsInArray:()=>Zp,class:()=>Zm,clone:()=>fh,cloneAndMergeArrayExtend:()=>Mi,cloneFunction:()=>Dh,collectExtendsList:()=>$o,color:()=>Fm,colorStringToRgbaArray:()=>xe,components:()=>Is,compositeOverBackdrop:()=>Un,concatAddExtends:()=>Wh,contrastRatio:()=>Qo,convertSvgToSymbol:()=>Ga,copyJavaScriptToClipboard:()=>ym,copyStringToClipboard:()=>mm,create:()=>Yw,createAsync:()=>JM,createBasedOnType:()=>Ql,createComputed:()=>nS,createConfig:()=>ja,createDefine:()=>WE,createEffect:()=>Y,createElement:()=>cg,createElementExtends:()=>Vl,createExtends:()=>Ni,createExtendsFromKeys:()=>Mo,createExtendsStack:()=>Wl,createHTMLNode:()=>ys,createIfConditionFlag:()=>Lh,createInheritedState:()=>fg,createKey:()=>Ii,createNestedObject:()=>bh,createNestedObjectByKeyPath:()=>dg,createObjectWithoutPrototype:()=>Ll,createParent:()=>ef,createPath:()=>rf,createProps:()=>Wi,createPropsStack:()=>Zl,createRoot:()=>ag,createScope:()=>gg,createScopeStore:()=>vl,createSignal:()=>di,createSkeleton:()=>tF,createSnapshotId:()=>Li,createState:()=>lb,createStore:()=>ur,createSync:()=>QM,css:()=>ge,cssMediaVars:()=>Zf,cssVars:()=>Xf,customDecodeURIComponent:()=>oh,customEncodeURIComponent:()=>nh,cutArrayAfterValue:()=>Hp,cutArrayBeforeValue:()=>zp,debounce:()=>$i,debounceOnContext:()=>Rh,decodeNewlines:()=>rh,deepClone:()=>ft,deepContains:()=>mh,deepDefaults:()=>Go,deepDestringifyFunctions:()=>Jt,deepExtend:()=>Bl,deepMerge:()=>it,deepMergeExtends:()=>Ze,deepStringifyFunctions:()=>Ai,defaultDefine:()=>Bs,defineResolvedThemeSignal:()=>os,defineSetter:()=>jg,defineThemeSignal:()=>ns,destringifyGlobalScope:()=>An,destroy:()=>Nc,detectHeightOnInit:()=>Gg,detectInfiniteLoop:()=>xh,detectTag:()=>tn,devices:()=>Wm,dispose:()=>vr,encodeNewlines:()=>eh,error:()=>Ln,excludeKeysFromObject:()=>vh,exec:()=>pt,executeAttr:()=>v2,exetuteClassPerComponent:()=>rD,extendCachedRegistry:()=>qh,extendStackRegistry:()=>ji,extractArrayExtend:()=>Vi,extractConditionalAttrs:()=>A2,fetchLibraryData:()=>Df,fibonacciNumberByIndex:()=>Yg,fileEntryUrl:()=>Of,filterArrays:()=>Yp,filterArraysFast:()=>Xp,filterAttributesByTagName:()=>k2,finalizeExtends:()=>ql,findClosestNumber:()=>Rf,findClosestNumberInFactory:()=>am,findHeadingLetter:()=>tu,findHeadings:()=>Wa,findInheritedState:()=>lf,findKeyPosition:()=>Qp,flattenExtend:()=>Fo,font:()=>Pm,fontFace:()=>Im,fontFamily:()=>Dm,fontFamilyTypes:()=>Lm,formatDate:()=>Kg,generateHash:()=>Fl,generateHeadArrayTags:()=>Tf,generateKey:()=>Di,generateMetaTags:()=>sm,generateSequence:()=>te,generateSequencePosition:()=>oy,generateSprite:()=>Ka,generateSubSequence:()=>za,get:()=>$g,getActiveConfig:()=>A,getActiveDocument:()=>eo,getActiveLang:()=>ln,getCDNDirUrl:()=>Af,getCDNUrl:()=>Me,getCacheSize:()=>Dy,getCapitalCaseKeys:()=>Zh,getCdnProviderFromConfig:()=>Wo,getChildStateInKey:()=>cf,getChildren:()=>Ng,getColor:()=>tt,getColorShade:()=>Nf,getContext:()=>ha,getCookie:()=>Nh,getDB:()=>_a,getDefaultOrFirstKey:()=>zn,getEmitStats:()=>_u,getEmotionStylesheet:()=>Sm,getExtendsInElement:()=>Yh,getExtendsStack:()=>Fi,getExtendsStackRegistry:()=>jl,getFnPrefixAndValue:()=>_r,getFontFace:()=>Om,getFontFaceEach:()=>Hn,getFontFaceEachString:()=>qf,getFontFaceString:()=>$a,getFontFamily:()=>rc,getFontFormat:()=>Hf,getFontSizeByKey:()=>oc,getFrequencyInArray:()=>Bp,getFunctionSource:()=>le,getHashedExtend:()=>Bi,getImportMapScript:()=>qg,getInObjectByPath:()=>Sh,getLanguages:()=>Bc,getLocalStateLang:()=>Wc,getLocalStorage:()=>Bh,getMediaColor:()=>It,getMediaTheme:()=>Ee,getNev:()=>Oh,getObserver:()=>fr,getPageMetadata:()=>im,getParentStateInKey:()=>af,getPath:()=>ca,getQuery:()=>wa,getRef:()=>Fg,getResolvedThemeSignal:()=>t0,getRgbTone:()=>rr,getRoot:()=>ua,getRootContext:()=>pa,getRootData:()=>da,getRootState:()=>fa,getRootStateInKey:()=>sf,getSafeInk:()=>nu,getSafeInkInfo:()=>cy,getSequenceValue:()=>qn,getSequenceValueBySymbols:()=>Ha,getSequenceValuePropertyPair:()=>or,getShadow:()=>Ja,getShapeByKey:()=>sc,getSignals:()=>oS,getSpacingBasedOnRatio:()=>Ce,getSpacingByKey:()=>Et,getSpreadChildren:()=>Jh,getSubratio:()=>Ua,getSubratioDifference:()=>Va,getSystemGlobalTheme:()=>me,getTheme:()=>dy,getThemeSignal:()=>Qx,getTimingByKey:()=>he,getTimingFunction:()=>Ae,global:()=>Mp,gradient:()=>Nm,grid:()=>Xm,hasFunction:()=>zt,hasHandlerPlugin:()=>Do,hasOwnProperty:()=>ph,hashContent:()=>Ko,hexToRgb:()=>km,hexToRgbArray:()=>If,hexToRgba:()=>Cm,hslToRgb:()=>Ff,icons:()=>Vm,inheritChildExtends:()=>zl,inheritChildPropsExtends:()=>Ul,inheritParentProps:()=>qi,inheritRecursiveChildExtends:()=>Hl,init:()=>Ar,initPolyglot:()=>dd,initProps:()=>og,injectGlobal:()=>St,is:()=>Zt,isArray:()=>P,isBoolean:()=>El,isBuiltinElementMethod:()=>ih,isCSSVar:()=>wt,isContextComponent:()=>Qh,isCyclic:()=>kh,isDOMNode:()=>Xt,isDate:()=>Tl,isDefined:()=>Tt,isDevelopment:()=>jr,isDomDocument:()=>dr,isEmpty:()=>Pl,isEmptyObject:()=>hh,isEnumeratedTrueFalseAttr:()=>ar,isEqualDeep:()=>Dl,isFailedRevival:()=>Cn,isFunction:()=>R,isGoogleFontsUrl:()=>ts,isHostObject:()=>pr,isHtmlElement:()=>gi,isLazyFunction:()=>uh,isLocal:()=>Th,isLoudDevRuntime:()=>mt,isMalformedDependency:()=>In,isMethod:()=>Ug,isMobile:()=>Mh,isNode:()=>hr,isNot:()=>Np,isNotProduction:()=>On,isNull:()=>Al,isNumber:()=>Ge,isObject:()=>v,isObjectLike:()=>B,isPhoto:()=>Xg,isPlainColor:()=>Yr,isPolyglotRetranslatableKey:()=>Xi,isPolyglotWritableKey:()=>Pn,isProduction:()=>Nr,isProtectedElementMethod:()=>Sn,isRawUnitValue:()=>pi,isResolvedColor:()=>Fe,isRevived:()=>En,isScalingUnit:()=>bn,isStaging:()=>Ah,isState:()=>ug,isStore:()=>vt,isString:()=>x,isStringFunction:()=>Po,isStringTag:()=>Oi,isSvgTag:()=>_s,isTest:()=>$l,isTesting:()=>Eh,isTracking:()=>ub,isUndefined:()=>Pt,isUniversallyReservedKey:()=>Hg,isUnresolvableDependency:()=>zr,isValidDependencyMap:()=>$n,isValidHtmlTag:()=>Uh,isValidTag:()=>ms,isWasmLoaded:()=>RE,isWrappedLibrary:()=>er,isWritableFamilyBucket:()=>$p,joinArrays:()=>Eo,jointStacks:()=>Kh,keyframes:()=>gs,keys:()=>vf,linearChannelToSrgb:()=>Vf,loadCssFile:()=>tm,loadJavascript:()=>em,loadJavascriptFile:()=>Zg,loadJavascriptFileEmbedSync:()=>Qg,loadJavascriptFileSync:()=>Jg,loadRemoteCSS:()=>rm,loadRemoteScript:()=>qo,loadTranslations:()=>Uc,loadWasm:()=>OE,log:()=>Bg,logGroupIf:()=>$h,logIf:()=>Ih,lookdown:()=>Lg,lookdownAll:()=>Ig,lookup:()=>Dg,lowercaseFirstLetter:()=>_n,makeObjectWithoutPrototype:()=>gh,map:()=>lh,mapStringsWithContextComponents:()=>Ui,markPolyglotSeeded:()=>Qe,markRevived:()=>Ro,matchesComponentNaming:()=>Je,media:()=>$m,memoize:()=>Ph,merge:()=>_t,mergeSharedLibraries:()=>Ca,mergeSharedLibraryDesignSystems:()=>Ea,mixTwoColors:()=>xm,mixTwoRgb:()=>Em,mixTwoRgba:()=>jf,nextElement:()=>ma,normalizeIgnoreList:()=>ka,normalizeLibraryKey:()=>Nn,numToLetterMap:()=>nr,objectToString:()=>Ti,objectizeStringProperty:()=>zi,oklabToLinearSrgb:()=>Uf,oklabToOklch:()=>Da,oklchToGamutSafeSrgb:()=>La,oklchToOklab:()=>zf,opacify:()=>Jo,overwrite:()=>Pi,overwriteDeep:()=>Ht,overwriteShallow:()=>Tn,overwriteState:()=>hg,parkHostObject:()=>Ir,parse:()=>Cf,parseColorToken:()=>Vt,parseDeep:()=>ia,pickupElementFromProps:()=>Yl,pickupPropsFromElement:()=>Gl,polyglotFunctions:()=>nl,polyglotPlugin:()=>Us,polyglotSeededKeys:()=>No,popConfig:()=>ot,popStaticCssPass:()=>Ou,previousElement:()=>ya,promoteActiveRootState:()=>Vo,propExists:()=>rg,propertizeElement:()=>Xl,propertizeUpdate:()=>eg,pushConfig:()=>at,pushStaticCssPass:()=>Tu,quietColorProbe:()=>Kn,refreshContextProto:()=>Du,registerEvent:()=>Ss,registerHostPackages:()=>B1,registerSignalInstance:()=>xo,reinit:()=>S_,relativeLuminance:()=>Bn,remove:()=>Cs,removeChars:()=>bm,removeCookie:()=>jh,removeDelegatedEvent:()=>yc,removeDuplicateProps:()=>Gi,removeDuplicatesInArray:()=>Ao,removeFromArray:()=>Vp,removeFromObject:()=>yh,removeNestedKeyByPath:()=>_h,removeValueFromArray:()=>_i,removeValueFromArrayAll:()=>Wp,reorderArrayByValues:()=>Kp,replaceLiteralsWithObjectFields:()=>Ft,replaceOctalEscapeSequences:()=>th,resetEmitStats:()=>Oy,resolveAsset:()=>Qt,resolveBorderValue:()=>pe,resolveColorRgb:()=>Gn,resolveColorsInGradient:()=>dc,resolveConfigDocument:()=>vo,resolveDesignSystemClass:()=>wk,resolveFileReferences:()=>Mn,resolveFileSource:()=>jy,resolveFileUrl:()=>ke,resolveGridTracks:()=>gk,resolveHandler:()=>Lo,resolvePropValue:()=>nn,resolveShadowValue:()=>Yn,resolveSharedLibraries:()=>gm,returnSubThemeOrDefault:()=>Tm,returnValueAsText:()=>Jl,rgbArrayToHex:()=>$f,rgbToHSL:()=>Mf,rgbToHex:()=>vm,runPluginHook:()=>Ot,runThroughMedia:()=>ou,schemeGuardSelector:()=>Zr,schemeMediaQuery:()=>Xr,scratchDefaultConfig:()=>rs,scratchSystem:()=>fs,scratchUtils:()=>Kr,self:()=>Fp,semanticIcons:()=>Um,sequence:()=>br,serializeAttrValue:()=>re,set:()=>Qn,setActiveConfig:()=>Jf,setActiveDocument:()=>Ty,setActiveRootState:()=>la,setAdaptiveSchemeVar:()=>Jr,setClass:()=>PL,setClassname:()=>nD,setColor:()=>Gr,setCookie:()=>Fh,setCssEngineHook:()=>id,setCustomFont:()=>Ia,setCustomFontMedia:()=>Wr,setEach:()=>Sy,setFont:()=>ec,setFontFamily:()=>cs,setFontImport:()=>es,setGradient:()=>is,setHashedExtend:()=>Nl,setInCustomFontMedia:()=>Wf,setInObjectByPath:()=>wh,setLang:()=>zc,setLocalStorage:()=>Vh,setMediaTheme:()=>as,setNodeStyles:()=>kf,setObserver:()=>Ke,setProps:()=>Mg,setPropsPrototype:()=>Ki,setSVG:()=>ls,setScalingVar:()=>Ba,setShadow:()=>Qr,setSubScalingVar:()=>Qf,setSvgIcon:()=>Xn,setTheme:()=>tc,setValue:()=>wy,setVariables:()=>sy,setWasmEngine:()=>gc,shadow:()=>Bm,shape:()=>ty,sharedLibrary:()=>um,sizes:()=>Qm,skins:()=>ey,spacing:()=>Mm,splitPackageSpecifier:()=>Sa,splitSpacedValue:()=>Za,splitTopLevelCommas:()=>yr,splitTopLevelSpaces:()=>ht,splitTransition:()=>uu,spotByPath:()=>aa,srcsetFor:()=>Yo,srgbChannelToLinear:()=>Bf,srgbToOklab:()=>Pa,stringIncludesAny:()=>xi,stringToObject:()=>dh,stripVersionRangePrefix:()=>xa,svg:()=>Km,svgData:()=>Gm,swapItemsInArray:()=>Up,syncProps:()=>Yi,templates:()=>Ym,theme:()=>jm,timing:()=>zm,toCamel:()=>Na,toCamelCase:()=>Aa,toDashCase:()=>Ta,toDescriptionCase:()=>wm,toLinearChannel:()=>Zo,toPriorityOrder:()=>_e,toTitleCase:()=>_m,toggleFullscreen:()=>Wg,transformBackgroundImage:()=>cu,transformBorder:()=>sr,transformBorderRadius:()=>Sr,transformBoxShadow:()=>uc,transformClassname:()=>xk,transformDuration:()=>pc,transformGridTemplate:()=>fu,transformShadow:()=>au,transformSize:()=>Ct,transformSizeRatio:()=>$,transformTextStroke:()=>iu,transformTransition:()=>_y,transformersByPrefix:()=>tb,transfromGap:()=>lu,translate:()=>Vc,triggerEventOn:()=>gr,triggerEventOnUpdate:()=>mg,trimStringFromSymbols:()=>Jp,typography:()=>Ma,unit:()=>Rm,unstackArrayOfObjects:()=>bi,update:()=>ks,updateProps:()=>sg,updateVars:()=>RL,upsertTranslation:()=>Hc,useCssInProps:()=>se,useHostState:()=>fb,usePropsAsCSS:()=>_k,useSelectorsAsCSS:()=>Sk,variables:()=>ba,vars:()=>Jm,verbose:()=>Uo,warn:()=>ga,warnStateKeyShadowsMethod:()=>Cl,window:()=>C,wrapHoverRule:()=>xr});module.exports=NT(Xw);var Ip={};M(Ip,{RESERVED_STORE_METHODS:()=>iS,SIGNAL_ENGINE_KEY:()=>ko,SIGNAL_INSTANCES_KEY:()=>So,STORE_METHOD_NAMES:()=>sS,VERSION:()=>cS,__resetSignalEngine:()=>Lp,__resetSignalInstances:()=>Dp,__resetStateShadowWarnings:()=>aS,batch:()=>kl,createComputed:()=>nS,createEffect:()=>Y,createScopeStore:()=>vl,createSignal:()=>di,createStore:()=>ur,getObserver:()=>fr,getSignals:()=>oS,isStore:()=>vt,registerSignalInstance:()=>xo,setObserver:()=>Ke,warnStateKeyShadowsMethod:()=>Cl});var vp={};M(vp,{WRITE_JOURNAL:()=>ci,batch:()=>fi,createComputed:()=>BT,createEffect:()=>VT,createSignal:()=>We,getObserver:()=>xp,journalWrite:()=>li,setObserver:()=>jT});var Yt=null,ml=0,yl=[],xp=()=>Yt,jT=t=>{Yt=t},bl=0,bp=[];function We(t){let e=new Set;function r(){return Yt&&(e.add(Yt),Yt._sources.add(s)),t}function n(i){i!==t&&(t=i,KT(e))}function o(){return t}let s={get:r,set:n,peek:o,_subscribers:e,_type:"signal"};return s}function BT(t){let e,r=!0,n=new Set,o={_sources:new Set,_type:"computed",_subscribers:n,_execute(){Sp(o);let s=Yt;Yt=o;try{e=t(),r=!1}finally{Yt=s}},_notify(){r=!0,n.size>0&&eS(n)},get(){return Yt&&(n.add(Yt),Yt._sources.add(o)),r&&o._execute(),e},peek(){return r&&o._execute(),e}};return o._execute(),o}var Le=new Set,_p=!1,ci=[];function li(t){ci.push(t),ci.length>32&&ci.shift()}function VT(t,e){let r=e?.depth??0,n={_sources:new Set,_type:"effect",_depth:r,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(n._disposed)return;Sp(n);let o=Yt;Yt=n;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Yt=o}},_notify(){n._disposed||(ml>0?yl.push(n):bl>0?bp.push(n):kp(n))},dispose(){n._disposed=!0,Sp(n)}};return n._execute(),n}function fi(t){ml++;try{t()}finally{ml--,ml===0&&qT()}}var wp=!1,Jw=1e3,UT=8,zT=256,HT=4;function Qw(){return typeof performance<"u"?performance.now():Date.now()}function kp(t){Le.add(t),!wp&&(_p||(_p=!0,queueMicrotask(tS)))}var wo=[];function WT(){if(Le.size===1){let[e]=Le;return Le.clear(),e._disposed?0:(e._execute(),1)}wo.length=0;for(let e of Le)wo.push(e);Le.clear(),wo.sort((e,r)=>e._depth-r._depth);let t=0;for(let e=0;e<wo.length;e++){let r=wo[e];r._disposed||(r._execute(),t++)}return wo.length=0,t}function tS(t=0,e=0){if(_p=!1,Le.size===0)return;wp=!0;let r=Qw(),n=!1;try{for(;Le.size>0;){if(++t>Jw){let o=new Map;for(let c of Le){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",o.set(l,(o.get(l)||0)+1),o.size>=12)break}let s=[...o.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of ci)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",Jw,"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>"),Le.clear();break}if(e+=WT(),Le.size>0&&(e>=zT||t>=HT)&&Qw()-r>UT){n=!0,setTimeout(()=>tS(t,e),0);break}}}finally{n||(wp=!1)}}function qT(){for(let t=0;t<yl.length;t++)kp(yl[t]);yl.length=0}function eS(t){bl++;try{for(let e of t)e._notify()}finally{if(bl--,bl===0&&bp.length>0){let e=bp.splice(0);for(let r=0;r<e.length;r++)kp(e[r])}}}function KT(t){eS(t)}function Sp(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Pp={};M(Pp,{RESERVED_STORE_METHODS:()=>ui,STORE_METHOD_NAMES:()=>Rp,__resetStateShadowWarnings:()=>GT,createScopeStore:()=>JT,createStore:()=>_l,getSignals:()=>ZT,isStore:()=>XT,warnStateKeyShadowsMethod:()=>Op});var qe=Symbol("store"),wl=Symbol("signals"),Rp=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],ui=new Set(Rp),Tp=new Set,Cp=(t,e)=>t?t+"."+e:String(e);function Op(t,e){let r=(e||"")+"::"+t;if(Tp.has(r))return;Tp.add(r);let n=e?`state.${e}`:"state",o=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${n}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${n}.${t}(\u2026)" no longer reaches the store method on this node. Use "${n}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${Rp.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function GT(){Tp.clear()}var Ep=t=>!t||typeof t!="object"||Array.isArray(t)||t[qe]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!Sl(t),YT=12,Sl=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function xl(t,e,r){if(t===e)return!0;if(r>YT)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!xl(t[n],e[n],r+1))return!1;return!0}if(Sl(t)&&Sl(e)){let n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(let s of n)if(!Object.prototype.hasOwnProperty.call(e,s)||!xl(t[s],e[s],r+1))return!1;return!0}return!1}function _l(t,e,r,n){r===void 0&&(r=0),n===void 0&&(n="");let o={},s={},i=b=>Object.prototype.hasOwnProperty.call(o,b)&&Object.prototype.hasOwnProperty.call(s,b),a=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}ui.has(b)&&Op(b,n);let _=t[b];r<a&&_&&typeof _=="object"&&!Ep(_)?(s[b]=_,o[b]=We(_l(_,e,r+1,Cp(n,b)))):(s[b]=_,o[b]=We(_))}let c=new Proxy(s,{get(b,_){if(_===qe)return!0;if(_===wl)return o;if(_==="__raw")return b;if(_==="$update")return l;if(_==="$parse")return u;if(_==="$clean")return d;if(_==="$keys")return g;if(_==="$values")return h;if(_==="$replace")return p;if(_==="$add")return m;if(_==="$remove")return y;if(_==="$destroy")return w;if(_==="$quietUpdate")return f;if(ui.has(_)&&!Object.prototype.hasOwnProperty.call(o,_))switch(_){case"update":return l;case"parse":return u;case"clean":return d;case"keys":return g;case"values":return h;case"replace":return p;case"add":return m;case"remove":return y;case"destroy":return w;case"quietUpdate":return f}if(_==="__element")return b.__element;if(_==="parent")return b.parent;if(_==="root")return b.root;if(Object.prototype.hasOwnProperty.call(o,_)){let k=o[_].get();if(k!==void 0||!(_!=="root"&&b.root&&b.root!==c))return k}if(b[_]!==void 0)return b[_];let S=typeof _=="string"&&!_.startsWith("__")&&_!=="then"&&_!=="constructor"&&xp()!=null;if(_!=="root"&&b.root&&b.root!==c){let k=b.root[_];return S&&!Object.prototype.hasOwnProperty.call(o,_)&&(o[_]=We(void 0),o[_].get()),k}if(S)return o[_]=We(void 0),o[_].get()},set(b,_,S){if(_==="__proto__")return!1;if(_==="__element"||_==="parent"||_==="root"||typeof _=="string"&&_.startsWith("__")&&!Object.prototype.hasOwnProperty.call(o,_))return b[_]=S,!0;ui.has(_)&&Op(_,n);let k=Cp(n,_);if(Object.prototype.hasOwnProperty.call(o,_))if(S&&typeof S=="object"&&!Ep(S)){if(S===b[_])return!0;let E=o[_].peek(),T=E&&E[qe]?E.$parse():E;if(xl(S,T,0))return!0;b[_]=S,li(k),o[_].set(_l(S,e,r+1,k))}else{if(Array.isArray(S)&&S!==b[_]&&Array.isArray(o[_].peek())&&xl(S,o[_].peek(),0))return!0;o[_].peek()!==S&&li(k),b[_]=S,o[_].set(S)}else b[_]=S,S&&typeof S=="object"&&!Ep(S)?o[_]=We(_l(S,e,r+1,k)):o[_]=We(S);return!0},has(b,_){return typeof _=="string"&&_.charCodeAt(0)===36&&ui.has(_.slice(1))?!0:_ in b},ownKeys(b){return Object.keys(o).filter(i)},getOwnPropertyDescriptor(b,_){return i(_)?{enumerable:!0,configurable:!0,value:o[_].peek()}:Object.getOwnPropertyDescriptor(b,_)},deleteProperty(b,_){return o[_]&&(o[_].peek()!==void 0&&li(Cp(n,_)),o[_].set(void 0),delete o[_]),delete b[_],!0}});function l(b,_){fi(()=>{for(let k in b)k!=="__proto__"&&(c[k]=b[k])});let S=s.__element;return S&&S.onUpdate&&!_?.quiet&&S.onUpdate(S,c,S.context),c}function f(b){return l(b,{quiet:!0})}function u(b){if(b||(b=new Set),b.has(c))return"[Circular]";b.add(c);let _={};for(let S in o){if(S==="parent"||S==="root"||S.startsWith("__")||!Object.prototype.hasOwnProperty.call(s,S))continue;let k=o[S].peek();k&&k[qe]?_[S]=k.$parse(b):_[S]=k}return _}function d(){return fi(()=>{for(let b in o)delete c[b]}),c}function g(){return Object.keys(o).filter(i)}function h(){return Object.keys(o).filter(i).map(b=>o[b].peek())}function p(b){return fi(()=>{for(let _ in o)_ in b||delete c[_];for(let _ in b)_!=="__proto__"&&(c[_]=b[_])}),c}function m(b,_){let S=Object.prototype.hasOwnProperty.call(o,b)?o[b].peek():s[b];if(Array.isArray(S))return c[b]=[...S,_],c;if(S&&typeof S=="object"&&!Array.isArray(S)){if(Sl(_))S[qe]?S.$update(_):c[b]={...S,..._};else{let k=String(Object.keys(S).length);S[qe]?S.$update({[k]:_}):c[b]={...S,[k]:_}}return c}return c[b]=_,c}function y(b){return delete c[b],c}function w(){d(),s.__element=null,s.parent=null}return c}function XT(t){return t&&t[qe]===!0}function ZT(t){return t[wl]}function JT(t,e){let r={},n={};if(t&&typeof t=="object")for(let i in t)n[i]=t[i],r[i]=We(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let a=e;for(;a;){let c=a[wl];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[qe]?a[Ap]:null}return null};return new Proxy(n,{get(i,a){return a===qe?!0:a===wl?r:a===Ap?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=o(a);return l?(l===r&&(i[a]=c),l[a].set(c),!0):(i[a]=c,r[a]=We(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[qe]?c[Ap]: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 Ap=Symbol("scope.parent");var yn="3.14.785";var So="__SMBLS_SIGNAL_INSTANCES__",xo=(t,e,r)=>{let n=e||(typeof globalThis<"u"?globalThis:null);if(!n)return null;let o=n[So]||(n[So]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(t||yn),r||o.engines++,o.engines>1&&!o.reported&&(o.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",o.engines,"copies of the reactive engine are loaded on this page:",o.versions.join(", ")+".","Each copy keeps its own observer and effect queue, so an effect created","by one copy never re-fires from another copy's store writes, and one","copy's cascade breaker cannot see the other's queue.","Copies of the SAME version adopt a single engine automatically, so","this means the versions above DIFFER: a fossil copy is resolving beside","the current one. That is a dependency-graph fault, not an application","bug \u2014 align the version wherever @symbo.ls/signal is imported, then","regenerate the lockfile so exactly one version resolves.")),o},Dp=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[So]};var ko="__SMBLS_SIGNAL_ENGINE__",rS=(t,e,r)=>{let n=e||yn,o=r||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[ko];return s&&s.engine&&s.version===n?(xo(n,o,!0),s.engine):(s||(o[ko]={version:n,engine:t}),xo(n,o,!1),t)},Lp=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[ko]};var Ut=rS({...vp,...Pp,VERSION:yn},yn),di=Ut.createSignal,nS=Ut.createComputed,Y=Ut.createEffect,kl=Ut.batch,fr=Ut.getObserver,Ke=Ut.setObserver,ur=Ut.createStore,vl=Ut.createScopeStore,vt=Ut.isStore,oS=Ut.getSignals,sS=Ut.STORE_METHOD_NAMES,iS=Ut.RESERVED_STORE_METHODS,Cl=Ut.warnStateKeyShadowsMethod,aS=Ut.__resetStateShadowWarnings,cS=Ut.VERSION;var Ly={};M(Ly,{assertEmitIntegrity:()=>Ry,css:()=>ge,getActiveDocument:()=>eo,getCacheSize:()=>Dy,getEmitStats:()=>_u,injectGlobal:()=>St,keyframes:()=>gs,reset:()=>X0,resetEmitStats:()=>Oy,setActiveDocument:()=>Ty,setWasmEngine:()=>gc,wrapHoverRule:()=>xr});var xy={};M(xy,{COMPOUND_CSS_KEYWORDS:()=>Vn,CONFIG:()=>Wn,CONFIG_MERGE_EXL:()=>de,CSS_NAMED_COLOR_HEX:()=>Lf,CSS_NATIVE_COLOR_REGEX:()=>fe,CSS_UNITS:()=>Co,FACTORY:()=>ue,STANDARD_SCHEME_QUERIES:()=>ru,VALUE_TRANSFORMERS:()=>du,__resetSkinWarnings:()=>by,activateConfig:()=>e0,aliasCaseVariants:()=>ss,animation:()=>qm,appendSVGSprite:()=>cc,appendSvgIconsSprite:()=>Zn,applyDocument:()=>ac,applyHeadings:()=>su,applyMediaSequenceVars:()=>qr,applyReset:()=>lc,applySequenceGlobalVars:()=>qa,applySequenceVars:()=>wr,applySkins:()=>fc,applySpacingSequence:()=>Xa,applyTimingSequence:()=>ic,applyTypographySequence:()=>nc,breakpoints:()=>Hm,buildSkinVarStyles:()=>Jn,changeGlobalTheme:()=>pu,changeLightness:()=>Am,checkIfBoxSize:()=>Ya,class:()=>Zm,color:()=>Fm,colorStringToRgbaArray:()=>xe,compositeOverBackdrop:()=>Un,contrastRatio:()=>Qo,convertSvgToSymbol:()=>Ga,createConfig:()=>ja,cssMediaVars:()=>Zf,cssVars:()=>Xf,defineResolvedThemeSignal:()=>os,defineThemeSignal:()=>ns,devices:()=>Wm,document:()=>Zx,findHeadingLetter:()=>tu,findHeadings:()=>Wa,font:()=>Pm,fontFace:()=>Im,fontFamily:()=>Dm,fontFamilyTypes:()=>Lm,generateSequence:()=>te,generateSequencePosition:()=>oy,generateSprite:()=>Ka,generateSubSequence:()=>za,getActiveConfig:()=>A,getColor:()=>tt,getColorShade:()=>Nf,getDefaultOrFirstKey:()=>zn,getFnPrefixAndValue:()=>_r,getFontFace:()=>Om,getFontFaceEach:()=>Hn,getFontFaceEachString:()=>qf,getFontFaceString:()=>$a,getFontFamily:()=>rc,getFontFormat:()=>Hf,getFontSizeByKey:()=>oc,getMediaColor:()=>It,getMediaTheme:()=>Ee,getResolvedThemeSignal:()=>t0,getRgbTone:()=>rr,getSafeInk:()=>nu,getSafeInkInfo:()=>cy,getSequenceValue:()=>qn,getSequenceValueBySymbols:()=>Ha,getSequenceValuePropertyPair:()=>or,getShadow:()=>Ja,getShapeByKey:()=>sc,getSpacingBasedOnRatio:()=>Ce,getSpacingByKey:()=>Et,getSubratio:()=>Ua,getSubratioDifference:()=>Va,getTheme:()=>dy,getThemeSignal:()=>Qx,getTimingByKey:()=>he,getTimingFunction:()=>Ae,gradient:()=>Nm,grid:()=>Xm,hexToRgb:()=>km,hexToRgbArray:()=>If,hexToRgba:()=>Cm,hslToRgb:()=>Ff,icons:()=>Vm,isCSSVar:()=>wt,isDomDocument:()=>dr,isGoogleFontsUrl:()=>ts,isHostObject:()=>pr,isPlainColor:()=>Yr,isRawUnitValue:()=>pi,isResolvedColor:()=>Fe,isScalingUnit:()=>bn,isWritableFamilyBucket:()=>$p,linearChannelToSrgb:()=>Vf,media:()=>$m,mixTwoColors:()=>xm,mixTwoRgb:()=>Em,mixTwoRgba:()=>jf,numToLetterMap:()=>nr,oklabToLinearSrgb:()=>Uf,oklabToOklch:()=>Da,oklchToGamutSafeSrgb:()=>La,oklchToOklab:()=>zf,opacify:()=>Jo,parkHostObject:()=>Ir,parseColorToken:()=>Vt,popConfig:()=>ot,pushConfig:()=>at,quietColorProbe:()=>Kn,relativeLuminance:()=>Bn,reset:()=>Jx,resolveBorderValue:()=>pe,resolveColorRgb:()=>Gn,resolveColorsInGradient:()=>dc,resolveConfigDocument:()=>vo,resolveFileUrl:()=>ke,resolveShadowValue:()=>Yn,returnSubThemeOrDefault:()=>Tm,rgbArrayToHex:()=>$f,rgbToHSL:()=>Mf,rgbToHex:()=>vm,runThroughMedia:()=>ou,schemeGuardSelector:()=>Zr,schemeMediaQuery:()=>Xr,scratchDefaultConfig:()=>rs,scratchSystem:()=>fs,scratchUtils:()=>Kr,semanticIcons:()=>Um,sequence:()=>br,set:()=>Qn,setActiveConfig:()=>Jf,setAdaptiveSchemeVar:()=>Jr,setColor:()=>Gr,setCustomFont:()=>Ia,setCustomFontMedia:()=>Wr,setEach:()=>Sy,setFont:()=>ec,setFontFamily:()=>cs,setFontImport:()=>es,setGradient:()=>is,setInCustomFontMedia:()=>Wf,setMediaTheme:()=>as,setSVG:()=>ls,setScalingVar:()=>Ba,setShadow:()=>Qr,setSubScalingVar:()=>Qf,setSvgIcon:()=>Xn,setTheme:()=>tc,setValue:()=>wy,setVariables:()=>sy,shadow:()=>Bm,shape:()=>ty,sizes:()=>Qm,skins:()=>ey,spacing:()=>Mm,splitSpacedValue:()=>Za,splitTopLevelCommas:()=>yr,splitTopLevelSpaces:()=>ht,splitTransition:()=>uu,srgbChannelToLinear:()=>Bf,srgbToOklab:()=>Pa,svg:()=>Km,svgData:()=>Gm,templates:()=>Ym,theme:()=>jm,timing:()=>zm,toCamel:()=>Na,toLinearChannel:()=>Zo,transformBackgroundImage:()=>cu,transformBorder:()=>sr,transformBorderRadius:()=>Sr,transformBoxShadow:()=>uc,transformDuration:()=>pc,transformGridTemplate:()=>fu,transformShadow:()=>au,transformSize:()=>Ct,transformSizeRatio:()=>$,transformTextStroke:()=>iu,transformTransition:()=>_y,transfromGap:()=>lu,typography:()=>Ma,unit:()=>Rm,vars:()=>Jm});var Kr={};M(Kr,{COMPOUND_CSS_KEYWORDS:()=>Vn,CSS_NAMED_COLOR_HEX:()=>Lf,CSS_NATIVE_COLOR_REGEX:()=>fe,CSS_UNITS:()=>Co,applyMediaSequenceVars:()=>qr,applySequenceGlobalVars:()=>qa,applySequenceVars:()=>wr,changeLightness:()=>Am,colorStringToRgbaArray:()=>xe,compositeOverBackdrop:()=>Un,contrastRatio:()=>Qo,convertSvgToSymbol:()=>Ga,findHeadingLetter:()=>tu,findHeadings:()=>Wa,generateSequence:()=>te,generateSequencePosition:()=>oy,generateSprite:()=>Ka,generateSubSequence:()=>za,getColorShade:()=>Nf,getDefaultOrFirstKey:()=>zn,getFnPrefixAndValue:()=>_r,getFontFace:()=>Om,getFontFaceEach:()=>Hn,getFontFaceEachString:()=>qf,getFontFaceString:()=>$a,getFontFormat:()=>Hf,getRgbTone:()=>rr,getSequenceValue:()=>qn,getSequenceValueBySymbols:()=>Ha,getSequenceValuePropertyPair:()=>or,getSubratio:()=>Ua,getSubratioDifference:()=>Va,hexToRgb:()=>km,hexToRgbArray:()=>If,hexToRgba:()=>Cm,hslToRgb:()=>Ff,isCSSVar:()=>wt,isDomDocument:()=>dr,isGoogleFontsUrl:()=>ts,isHostObject:()=>pr,isRawUnitValue:()=>pi,isResolvedColor:()=>Fe,isScalingUnit:()=>bn,isWritableFamilyBucket:()=>$p,linearChannelToSrgb:()=>Vf,mixTwoColors:()=>xm,mixTwoRgb:()=>Em,mixTwoRgba:()=>jf,numToLetterMap:()=>nr,oklabToLinearSrgb:()=>Uf,oklabToOklch:()=>Da,oklchToGamutSafeSrgb:()=>La,oklchToOklab:()=>zf,opacify:()=>Jo,parkHostObject:()=>Ir,parseColorToken:()=>Vt,relativeLuminance:()=>Bn,resolveConfigDocument:()=>vo,resolveFileUrl:()=>ke,returnSubThemeOrDefault:()=>Tm,rgbArrayToHex:()=>$f,rgbToHSL:()=>Mf,rgbToHex:()=>vm,setCustomFont:()=>Ia,setCustomFontMedia:()=>Wr,setFontImport:()=>es,setInCustomFontMedia:()=>Wf,setScalingVar:()=>Ba,setSubScalingVar:()=>Qf,setVariables:()=>sy,splitTopLevelCommas:()=>yr,splitTopLevelSpaces:()=>ht,srgbChannelToLinear:()=>Bf,srgbToOklab:()=>Pa,toLinearChannel:()=>Zo});var dr=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),pr=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)},$p=t=>t!==null&&typeof t=="object"&&!pr(t),Ir=(t,e,r)=>{if(!t)return;if(dr(r)){t.__domDocument||(t.__domDocument=r);return}let n=`__host_${e}`;t[n]||(t[n]=r)},vo=t=>t?dr(t.__domDocument)?t.__domDocument:dr(t.document)?t.document:null:null;var bn=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",Co=["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"],QT=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),tO=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${Co.filter(t=>t!=="auto").map(QT).join("|")})$`),pi=t=>tO.test(String(t).trim());L();var Lf={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"},xe=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=Lf[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&&nt&&C){let r=nt.body.appendChild(nt.createElement("fictum")),n="rgb(1, 2, 3)";if(r.style.color=n,r.style.color!==n){nt.body.removeChild(r);return}if(r.style.color=t,r.style.color===n||r.style.color==="")return nt.body.removeChild(r),[0,0,0,0];t=C.getComputedStyle(r).color,nt.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]},xm=(t,e,r=.5)=>(t=xe(t),e=xe(e),jf(t,e,r)),km=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${n},${o})`},If=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,n,o]},vm=(t,e,r)=>"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1),$f=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1),Cm=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${r},${n},${o},${e})`},Em=(t,e,r=.5)=>{let n=[];for(let o=0;o<3;o++)n[o]=~~(t[o]+(e[o]-t[o])*r);return`rgb(${n})`},Am=(t,e)=>{let[r,n,o]=e,s=Math.max(0,Math.min(100,o+parseFloat(t)));return[r,n,s]},Mf=(t,e,r)=>{let n=Math.max(t,e,r),o=n-Math.min(t,e,r),s=1-Math.abs(n+n-o-1),i=o&&(n==t?(e-r)/o:n==e?2+(r-t)/o:4+(t-e)/o);return[60*(i<0?i+6:i),s?o/s:0,(n+n-o)/2]},Ff=(t,e,r,n=e*Math.min(r,1-r),o=(s,i=(s+t/30)%12)=>r-n*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],Nf=(t,e)=>{let r=parseInt(t,16),n=(r>>16)+e;n>255?n=255:n<0&&(n=0);let o=(r>>8&255)+e;o>255?o=255:o<0&&(o=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|o<<8|n<<16)+16777216).toString(16).slice(1)},jf=(t,e,r=.5)=>{let n=[];for(let o=0;o<4;o++){let s=o===3?i=>i:Math.round;n[o]=s(t[o]+(e[o]-t[o])*r)}return`rgba(${n})`},Jo=(t,e)=>{let r=xe(t);if(!r){On()&&console.warn(t+" color is not rgba");return}return r[3]=e,`rgba(${r})`},wt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Vn=new Set(["currentcolor","transparent","thin","medium","thick"]),fe=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,XR=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Vt=t=>{if(!x(t))return null;if(fe.test(t))return{passthrough:t};if(wt(t))return{cssVar:t};let e=t.match(XR);if(!e)return null;let[,r,n,o]=e,s=n!==void 0?`0.${n}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:r,alpha:s,tone:i}},Fe=t=>x(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),yr=t=>{let e=[],r="",n=0;for(let o of t){if(o==="("?n+=1:o===")"&&n>0&&(n-=1),o===","&&n===0){e.push(r),r="";continue}r+=o}return(r.length||!e.length)&&e.push(r),e},ht=t=>{let e=[],r="",n=0;for(let o of t){if(o==="("?n+=1:o===")"&&n>0&&(n-=1),n===0&&/\s/.test(o)){r.length&&e.push(r),r="";continue}r+=o}return r.length&&e.push(r),e},Zo=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Bn=t=>.2126*Zo(t[0])+.7152*Zo(t[1])+.0722*Zo(t[2]),Qo=(t,e)=>{let r=Bn(t)+.05,n=Bn(e)+.05;return r>n?r/n:n/r},Bf=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Vf=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,Pa=([t,e,r])=>{let[n,o,s]=[t,e,r].map(Bf),i=.4122214708*n+.5363325363*o+.0514459929*s,a=.2119034982*n+.6806995451*o+.1073969566*s,c=.0883024619*n+.2817188376*o+.6299787005*s,l=Math.cbrt(i),f=Math.cbrt(a),u=Math.cbrt(c);return[.2104542553*l+.793617785*f-.0040720468*u,1.9779984951*l-2.428592205*f+.4505937099*u,.0259040371*l+.7827717662*f-.808675766*u]},Uf=([t,e,r])=>{let n=t+.3963377774*e+.2158037573*r,o=t-.1055613458*e-.0638541728*r,s=t-.0894841775*e-1.291485548*r,i=n**3,a=o**3,c=s**3;return[4.0767416621*i-3.3077115913*a+.2309699292*c,-1.2684380046*i+2.6097574011*a-.3413193965*c,-.0041960863*i-.7034186147*a+1.707614701*c]},Da=([t,e,r])=>{let n=Math.atan2(r,e)*180/Math.PI;return n<0&&(n+=360),[t,Math.sqrt(e*e+r*r),n]},zf=([t,e,r])=>{let n=r*Math.PI/180;return[t,e*Math.cos(n),e*Math.sin(n)]},La=(t,e,r,n=24)=>{let o=a=>Uf(zf([t,a,r])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=o(e);if(!s(i)){let a=0,c=e;for(let l=0;l<n;l++){let f=(a+c)/2;s(o(f))?a=f:c=f}i=o(a)}return i.map(a=>Vf(Math.max(0,Math.min(1,a))))},Un=(t,e=1,r=[255,255,255])=>e>=1?t:t.map((n,o)=>n*e+r[o]*(1-e)),rr=(t,e)=>{x(t)&&t.includes("rgb")&&(t=xe(t).join(", ")),x(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),Ge(e)&&(e+="");let r=$f(t),n=e.slice(0,1);if(n==="-"||n==="+"){let o=Nf(r,parseFloat(e));return If(o).join(", ")}else{let[o,s,i]=t,[a,c]=Mf(o/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return Ff(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var Tm=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var ke=(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},zn=(t,e)=>{if(t[e])return t[e].value;let r=()=>Object.keys(t).find(o=>o!=="default"&&t[o]&&t[o].value&&!t[o].isSystemFallback);if(t.default){let o=t[t.default];if(o&&o.isSystemFallback){let s=r();if(s)return t[s].value}if(o)return o.value}let n=r()||Object.keys(t).find(o=>o!=="default"&&t[o]&&t[o].value);return n&&t[n]&&t[n].value},Hf=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},ts=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),es=t=>`@import url('${t}');`,Wf=t=>`@font-face { ${t} }`,Ia=(t,e,r,n={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=Hf(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
|
|
34
37
|
`);return`
|
|
35
38
|
font-family: '${t}';
|
|
36
39
|
font-style: ${n.fontStyle||"normal"};${r?`
|
|
@@ -38,24 +41,24 @@ FROM ${a}${l}`},qO=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;
|
|
|
38
41
|
font-stretch: ${n.fontStretch};`:""}${n.fontDisplay?`
|
|
39
42
|
font-display: ${n.fontDisplay};`:""}${n.unicodeRange?`
|
|
40
43
|
unicode-range: ${n.unicodeRange};`:""}
|
|
41
|
-
src: ${i};`},
|
|
42
|
-
}`,Vn=(t,e,r)=>Object.keys(e).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f}=e[o],u=Array.isArray(s)?s.map(d=>we(d,r)||d):we(s,r)||s;return Ra(t,u,i,{fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f})}),Sm=t=>Object.keys(t).map(r=>Vn(r,t[r].value)),Vf=(t,e,r)=>{if(e&&e.isVariable){let s=we(e.url,r)||e.url;return Zo(s)?Jo(s):Hr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap",unicodeRange:e.unicodeRange})}if(e[0])return Vn(t,e,r).map(Bf);let o=Array.isArray(e.url)?e.url.map(s=>we(s,r)||s):we(e.url,r)||e.url;return Hr(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch,unicodeRange:e.unicodeRange})},Pa=(t,e)=>Object.keys(t).map(n=>Vf(n,t[n].value,e));L();L();L();L();var Qo={};M(Qo,{animation:()=>jm,breakpoints:()=>Fm,class:()=>Hm,color:()=>Rm,devices:()=>Nm,document:()=>LS,font:()=>vm,fontFace:()=>Am,fontFamily:()=>Cm,fontFamilyTypes:()=>Em,gradient:()=>Pm,grid:()=>zm,icons:()=>Im,media:()=>Tm,reset:()=>IS,semanticIcons:()=>$m,sequence:()=>br,shadow:()=>Lm,shape:()=>Km,sizes:()=>qm,skins:()=>Gm,spacing:()=>Om,svg:()=>Bm,svgData:()=>Vm,templates:()=>Um,theme:()=>Dm,timing:()=>Mm,typography:()=>Da,unit:()=>km,vars:()=>Wm});var br={"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 km={default:"em"};var yR={browserDefault:16,base:16,type:"font-size",ratio:br["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Da=yR;var vm={};var Cm={},Em={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},Am={};var Tm={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var bR={base:Da.base,type:"spacing",ratio:br.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Om=bR;var Rm={},Pm={};var Dm={};var Lm={};var Im={},$m={};var _R={default:150,base:150,type:"timing",ratio:br["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Mm=_R;var LS={};var Fm={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Nm={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 jm={};var Bm={},Vm={};var Um={};var xR={},zm=xR;var Hm={};var IS={},Wm={},qm={},Km={},Gm={};var Wf={},qf={},le=new Set,Uf=Qo,zf={},Ia=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Uf){let e=t.toLowerCase();zf[e]=Uf[t];let r=Ia(e);r!==e&&(zf[r]=Uf[t]),e!==t&&(zf[t]=Uf[t])}var Un={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Wf,cssMediaVars:qf,CSS_VARS:Wf,CSS_MEDIA_VARS:qf,cssSkinVars:{},cssSkinFallback:{},_scratchConfig:!0,...zf},ts=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return Tt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let r=Tt(e)?e:t.globalTheme,n=li(Tt(r)?r:"auto");return Object.defineProperty(t,"globalTheme",{get(){return n.get()},set(o){n.set(o)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:n,enumerable:!1,configurable:!0,writable:!0}),n},$S=t=>t?ts(t):null,es=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return Tt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let r=Tt(e)?e:t.resolvedTheme,n=li(Tt(r)?r:null);return Object.defineProperty(t,"resolvedTheme",{get(){return n.get()},set(o){n.set(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:n,enumerable:!1,configurable:!0,writable:!0}),n},MS=t=>t?es(t):null;ts(Un);es(Un);var Hf=ft(Un),ce={active:"0",0:Un},FS=t=>(Tt(t)&&(ce.active=t),ce[t||ce.active]),La=[],at=t=>{t&&t._scratchConfig&&La.push(t)},ot=()=>{La.pop()},A=t=>La.length?La[La.length-1]:ce[t||ce.active]||Un,Kf=t=>{if(v(t))return ce.active="1",ce[1]=it(t,ft(Hf),le),rs(ce[1]),ts(ce[1]),es(ce[1]),t},wR=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],SR=["useVariable","globalTheme","verbose"],kR=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],rs=t=>{for(let e of kR){let r;for(let n of e){let o=t[n];v(o)&&(r=r?it(r,o,le):o)}if(r)for(let n of e)v(t[n])&&(t[n]=r)}},$a=(t,e,{cleanBase:r=!1}={})=>{let n=r?null:A(),o=ft(!r&&n&&n._scratchConfig?n:Hf);for(let i of wR)delete o[i];for(let i of SR)Object.prototype.hasOwnProperty.call(Hf,i)?o[i]=Hf[i]:delete o[i];let s=it(e||{},o,le);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s.cssSkinVars={},s.cssSkinFallback={},s._scratchConfig=!0,rs(s),ts(s),es(s),t&&(ce[t]=s),s};var er={"-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"},Xm=(t,e)=>{let{key:r,variable:n,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:n},e.scales[r]=s;let c=NS.has(e.unit)?"rem":e.unit;e.vars[n]=s+c},_r=t=>{if(!t.includes("("))return t;let e=t.trim(),r=e.indexOf("("),n=e.slice(0,r),o=0,s=-1;for(let i=r;i<e.length;i++){let a=e[i];if(a==="(")o++;else if(a===")"&&(o--,o===0)){s=i;break}}return s===-1||/\s/.test(n)||e.slice(s+1).trim()!==""?[void 0,t]:[n,e.slice(r+1,s)]},Ym="\0",vR=(t,e)=>{let r="",n=0,o="";for(let s of t){if(n===0&&s!=="("){r+=s;continue}o+=s,s==="("?n++:s===")"&&(n--,n===0&&(r+=Ym+e.length+Ym,e.push(o),o=""))}return r+o},CR=(t,e)=>t.indexOf(Ym)===-1?t:t.replace(/\u0000(\d+)\u0000/g,(r,n)=>e[Number(n)]),ER=/^(calc|min|max|clamp)\((.*)\)$/,AR=(t,e)=>{let r=ER.exec(t);return r?`${r[1]}(${Ba(r[2],e)})`:t.indexOf("(")!==-1?t:zn(t,e)},NS=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Ma=(t,e)=>{let{base:r,type:n,unit:o}=e,s=NS.has(o)?"rem":o,i=(yn(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(n&&n.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=er[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=er[t+1],u=Math.abs(t),d=Math.pow(jS,2*u),g=er[u];return g?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${g}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Gf=(t,e,r,n)=>{let{type:o}=n,i=t===2&&e.length===2?t+1:t,l=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},Fa=(t,e)=>{let n=(t*e-t)/1.618,o=t*e-n,s=t+n,i=(o+s)/2;return[o,i,s]},Na=(t,e)=>Fa(t,e).map(r=>r/t),ja=(t,e)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[u,d,g]=Fa(o,s);l>16?f=[u,d,g]:f=[u,g],f.forEach((p,h)=>{let m=~~(p/n*1e3)/1e3,y=i+(h+1),x=a+(h+1)/10,b=Gf(h+1,f,i,e),_={key:r+(h+1),variable:y,value:p,scaling:m,scalingVariable:b,index:x};Xm(_,e)})},jS=1.618,TR=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let n=Math.abs(t),o=e*Math.pow(r,t),s=e*Math.pow(r,n)/Math.pow(jS,2*n);return Math.max(o,s)},Jt=t=>{let{type:e,base:r,ratio:n,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=o[1]-l,u=er[f],d=TR(f,r,n),g=~~(d/r*100)/100,p=c+u,h=Ma(f,t),m={key:u,variable:p,value:d,base:r,scaling:g,scalingVariable:h,ratio:n,index:f};Xm(m,t),s&&ja(m,t)}return t},Zm=(t,e=0)=>{let{type:r,base:n,ratio:o,subSequence:s}=t,i=k(e)?e:er[e],a=k(e)?Object.entries(er).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=n*Math.pow(o,a),f=~~(l/n*100)/100,g="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,p=Ma(a,t),h={key:i,variable:g,value:l,base:n,scaling:f,scalingVariable:p,ratio:o,index:a};return Xm(h,c),s&&ja(h,c),c},zn=(t="A",e)=>{let r=A(),{unit:n}=r;if(k(t)&&xt(t))return`var(${t})`;if(k(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(k(t)){let b=r.sizes;if(b){let _=b[t]||b[t.toLowerCase()];if(_!==void 0)return t.slice(0,1)==="-"?`calc(${_} * -1)`:_}}let{sequence:o,unit:s=n.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(fi(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+"-":""}${va(e.type.replace(".","-"))}-`,g=t.toUpperCase(),p=g.slice(0,1)==="-"?"-":"",h=p?g.slice(1):g,m="";h.includes("_")&&(m="_"+h.split("_")[1].toLowerCase(),h=h.split("_")[0]);let y=b=>a.test(b)?`var(${d}${b}${m})`:b;if(h.includes("+")){let[b,_]=h.split("+"),w=`${y(b)} + ${y(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}else if(h.includes("*")){let[b,_]=h.split("*"),w=`${y(b)} * ${y(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}else if(h.includes("-")){let[b,_]=h.split("-"),w=`${y(b)} - ${y(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}if(!o[h]&&h.length===2&&(r.verbose&&console.warn(h,"- value is not found because `subSequence` is set to false"),h=h.slice(0,1)),i||r.useVariable){let b=`var(${d}${h}${m})`;return p?`calc(${b} * -1)`:b}let x=o?o[h]:null;if(!x){if(console.warn("can't find",o,h),mt())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"?p+x.val+s:p+x.scaling+s},Ba=(t,e)=>{if(!["+","-","*","/",","].filter(i=>t.includes(i+" ")).length)return t;let n=/(\s+-\s+|\s*[+*/,]\s*)/,o=[];return vR(t,o).split(n).map(i=>{let a=CR(i,o),c=a.trim();return!c||["+","-","*","/",","].includes(c)?a:AR(c,e)}).join("")},rr=(t,e,r,n)=>{if(typeof t!="string")return A().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!n&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=_r(t);n=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Ba(t,r):t=zn(t,r),{[e]:n?`${n}(${t})`:t}},Yf=(t,e)=>er[t-e],Va=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((n,o)=>{let s=Yf(e,o);return r[s]})};L();var Jm=(t,e)=>{let r=A(),{cssVars:n}=r;B(t.value)||(n[t.var]=t.value)},Ua=(t,e,r)=>{let n=A(),{unit:o}=n,s=e.unit||o.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[d,g,p]=Na(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${g/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${p/a})`},BS=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),xr=(t,e={})=>{let r=A(),{unit:n,timing:o,cssVars:s}=r,i=t.unit||n.default,a=BS.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||Ua(s,t,e);for(let u in l){let d=l[u],g=(t.type===o.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=g,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=g:(s[d.variable+"_default"]=g,s[d.variable]=`var(${d.variable+"_default"})`)}},Wr=(t,e,r={})=>{let n=A(),{unit:o,media:s,cssVars:i}=n,a=e.slice(1),c=t[e],l=c.unit||t.unit||o.default,f=BS.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:g}=c,p=s[a];if(!p&&n.verbose&&console.warn("Can't find media query ",p),!u){let h=i[`@media ${p}`];h||(h=i[`@media ${p}`]={}),Ua(h,c,r);let m=t.unit||o.default;if(f!==m&&d)for(let y in d){let x=d[y],b=g[y]+f;h[x.variable+"_default"]=b,h[x.variable]=b}return}for(let h in d){let m=d[h],y=(yn(f)?g[h]:d[h].val)+f;!p&&n.verbose&&console.warn("Can't find query ",p);let x=i[`@media ${p}`];x||(x=i[`@media ${p}`]={}),x[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=y}};L();var US=An(),za=t=>{let e=A(),r="";for(let n in t)e.__svgCache[n]||(e.__svgCache[n]=!0,r+=t[n]);return r},OR=t=>{let e=t&&(t.default||t);if(!k(e))return US&&console.warn("parseRootAttributes:",e,"is not a string"),{};let r=e.match(/<svg\s+(.*?)>/);if(!r||!r[1])return{};let o=r[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return o?o.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},RR=(t,e)=>{let r=[];if(t.replace(/id="([^"]*)"/g,(o,s)=>(r.push(s),o)),!r.length)return t;let n=t;for(let o of r){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${o}`;n=n.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 n},VS=new Set,Ha=(t,e)=>{let r=e&&e.default?e.default:e;if(!k(r))return US&&!VS.has(t)&&(VS.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=r;let n=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(n){let u=n[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let o=OR(e),{width:s,height:i}=o,a=o.viewBox||`0 0 ${s||24} ${i||24}`,f=RR(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/^<symbol\b[^>]*>/,u=>u.replace(/\s(width|height)="[^"]*"/g,"")),f=f.replace("</svg","</symbol"),f=LR(f),f},PR="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",DR=new RegExp(`<(${PR})\\b([^>]*?)\\s*/>`,"g"),LR=t=>t.replace(DR,"<$1$2></$1>");var as={};M(as,{STANDARD_SCHEME_QUERIES:()=>Zf,__resetSkinWarnings:()=>uy,appendSVGSprite:()=>oc,appendSvgIconsSprite:()=>Gn,applyDocument:()=>nc,applyHeadings:()=>tu,applyReset:()=>sc,applySkins:()=>ic,applySpacingSequence:()=>qa,applyTimingSequence:()=>rc,applyTypographySequence:()=>Qa,buildSkinVarStyles:()=>Yn,checkIfBoxSize:()=>Wa,getColor:()=>tt,getFontFamily:()=>Ja,getFontSizeByKey:()=>tc,getMediaColor:()=>It,getMediaTheme:()=>ve,getSafeInk:()=>Jf,getSafeInkInfo:()=>ey,getShadow:()=>Ga,getShapeByKey:()=>ec,getSpacingBasedOnRatio:()=>ke,getSpacingByKey:()=>Et,getTheme:()=>sy,getTimingByKey:()=>ue,getTimingFunction:()=>Ce,isPlainColor:()=>Gr,quietColorProbe:()=>Hn,resolveBorderValue:()=>fe,resolveColorRgb:()=>Wn,resolveShadowValue:()=>qn,runThroughMedia:()=>Qf,schemeGuardSelector:()=>Xr,schemeMediaQuery:()=>Yr,setAdaptiveSchemeVar:()=>Zr,setColor:()=>Kr,setFont:()=>Za,setFontFamily:()=>ss,setGradient:()=>ns,setMediaTheme:()=>os,setSVG:()=>is,setShadow:()=>Jr,setSvgIcon:()=>Kn,setTheme:()=>Xa,splitSpacedValue:()=>Ka});L();var Zf={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},Yr=(t,e)=>{let r=e.media&&e.media[t]||Zf[t];return r?"@media "+(r==="print"?`${r}`:`screen and ${r}`):null},Xr=t=>{let e=t.scopeSelector||":root";return`${e===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`} &`},Se=new Set,qS=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"]),IR=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,$R=/gradient\(|url\(|image-set\(|var\(/i,MR=new Set(["transparent","currentColor","currentcolor"]),Gr=t=>{if(!k(t))return!1;let e=t.trim();return $R.test(e)?!1:IR.test(e)?!0:qS.has(e)||MR.has(e)},Xf=new Set,zS=t=>{if(!t)return!1;let{color:e,gradient:r}=t;return!!(v(e)&&Object.keys(e).length||v(r)&&Object.keys(r).length)},HS=new Set,Qm=0,Hn=t=>{Qm++;try{return t()}finally{Qm--}},FR=(t,e)=>{if(!k(t)||t.indexOf(" ")===-1)return null;let r=t.replace(/\s+/g,""),n=Vt(r);if(!n||n.passthrough||n.cssVar)return null;let{color:o,gradient:s}=e;return!o[n.name]&&!s[n.name]?null:r},ty=(t,e,r)=>{let n=FR(t,r);if(n){if(!HS.has(t)){HS.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 \`${n}\`? The space form never resolves, so the atomic class it mints carries no CSS value and paints invisibly. Dropped rather than shipped invisible.`)}return}let o=Vt(t);if(o&&o.name&&!o.passthrough&&!o.cssVar&&(o.alpha!==void 0||o.tone!==void 0)&&zS(r)&&!r.color[o.name]&&!r.gradient[o.name]){if(!Qm&&!Xf.has(t)){Xf.add(t);let i=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` does not resolve${i} \u2014 \`${o.name}\` is not in the palette. Dropped rather than emitted as a raw value, which is invalid CSS the browser discards silently. Define it in designSystem/color.js or use a palette token.`)}return}let s=k(e)?e.toLowerCase():"";if(!qS.has(s)||!zS(r))return t;if(!Xf.has(s)){Xf.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.`)}},KS=(t,e,r)=>{let n=e!==void 0?e:1;if(!r)return`rgb(from ${t} r g b / ${n})`;if(r.charCodeAt(0)===43||r.charCodeAt(0)===45){let s=parseFloat(r),i=s<0?"-":"+",a=Math.abs(s);return`rgb(from ${t} calc(r ${i} ${a}) calc(g ${i} ${a}) calc(b ${i} ${a}) / ${n})`}return`hsl(from ${t} h s ${r}% / ${n})`},tt=(t,e,r)=>{let n=r||A();if(!k(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(xt(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(P(t))[o,s,i]=t;else{let u=Vt(t);if(!u){let{color:d,gradient:g}=n,p=g[t]||d[t];return p?(e&&p[e]&&(p=p[e]),n.useVariable?`var(${p.var})`:p.value):ty(t,t,n)}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=n,l=a[o]||c[o];if(!l)return ty(t,o,n);if(e)if(l[e]!==void 0)l=l[e];else if(P(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&n.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 n.verbose&&console.warn(t," - does not have ",e);if(k(l)){if(Se.has(o))return l;Se.add(o);try{return tt(l,null,r)}finally{Se.delete(o)}}let f=l.rgb;if(!f){let u=n.useVariable?`var(${l.var})`:l.value;return(s||i)&&u?KS(u,s,i):u}return i&&!l[i]&&(f=tr(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})`:n.useVariable?`var(${l.var})`:l.value!==void 0?l.value:`rgb(${f})`},WS=t=>{let e=xe(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}},NR=(t,e)=>{if(!e)return t;let r=t.rgb;if(e.tone){let o=tr(r,e.tone);r=k(o)?o.split(",").map(s=>parseFloat(s.trim())):o}let n=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:r,alpha:n}},Wn=(t,e,r)=>{let n=e||A();if(!k(t))return null;let o=Vt(t);if(o){if(o.passthrough){let d=xe(o.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(o.cssVar)return null}let s=o?o.name:t,{color:i,gradient:a}=n,c=i[s]||a[s];if(!c)return WS(t);if(k(c)){let d;if(Se.has(s))d=WS(c);else{Se.add(s);try{d=Wn(c,n,r)}finally{Se.delete(s)}}return d?NR(d,o):null}if(c.rgb===void 0&&v(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;o&&o.tone&&(l=tr(l,o.tone));let f=k(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=o&&o.alpha!==void 0?parseFloat(o.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},GS=t=>v(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0),YS=t=>{if(!v(t)||t.value!==void 0)return null;let e=[];for(let r in t)if(r!=="var"){if(r.charCodeAt(0)!==64||!GS(t[r]))return null;e.push(r.slice(1))}return e.length?e:null},jR=t=>k(t&&t.var)&&YS(t)!==null,BR=(t,e,r,n,o)=>{let s=YS(e);if(!s)return;if(k(e.var)){let c=`var(${e.var})`;return r||n?KS(c,r,n):c}if(s.length!==2||!s.includes("light")||!s.includes("dark"))return;let i=tt(t,"@light",o),a=tt(t,"@dark",o);if(!(!Gr(i)||!Gr(a)))return i===a?i:`light-dark(${i}, ${a})`},It=(t,e,r)=>{let n=r||A();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!k(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(xt(t))return`var(${t})`;let o,s,i;if(P(t))o=t[0];else{let u=Vt(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}else o=t}let{color:a,gradient:c}=n,l=a[o]||c[o],f=v(l);if(f&&l.value)return tt(t,`@${e}`,r);if(f){if(n.useVariable&&l.var)return s||i?tt(t,null,r):`var(${l.var})`;if(e){if(!n.useVariable&&a[o]===l){let u=BR(t,l,s,i,r);if(u!==void 0)return u}return tt(t,`@${e}`,r)}else{let u={},d=Xr(n);for(let g in l){if(g.charCodeAt(0)!==64)continue;let p=g.slice(1),h=tt(t,g,r);if(h!==void 0&&(u[`[data-theme="${p}"] &`]=h,p==="light"||p==="dark")){let m=Yr(p,n);if(!m)continue;u[m]={[d]:h}}}return u}}else return ty(t,o,n)},Zr=(t,e,r,n)=>{let s=`--${n.varPrefix?n.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){n.cssVars[s]=i,n.cssMediaVars||(n.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(n.cssMediaVars[l]||(n.cssMediaVars[l]={}),n.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;n.cssMediaVars[f]||(n.cssMediaVars[f]={}),n.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},Kr=(t,e,r)=>{let n=A();if(GS(t))return n.useVariable&&t.var&&(n.cssVars[t.var]=t.value),t;if(!n.useVariable&&jR(t))return t;if(k(t)&&xt(t)){let h=t.slice(2);if(t=tt(h),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=h.split(" "),y=n.color[m[0]];if(y&&!y.value&&!y.rgb&&(k(y)||P(y)||v(y))&&!Se.has(m[0])){Se.add(m[0]);try{n.color[m[0]]=Kr(y,m[0])}finally{Se.delete(m[0])}y=n.color[m[0]]}if(y&&y.value){let x=y.rgb,b=m[1]!==void 0?m[1]:"1",_=m[2];_&&(x=tr(x,_)),t=`rgba(${x}, ${b})`}else{let x=m[2],b=m[1]!==void 0?m[1]:"1";if(x)try{let _=xe(m[0]);_&&_.length>=3?t=`rgba(${tr(_.slice(0,3).join(", "),x)}, ${b})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(P(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),v(t)){let h={};for(let m in t)m!=="var"&&(h[m]=Kr(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return n.useVariable&&Zr(h,"color",e,n),h}let s=`--${n.varPrefix?n.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(k(i)&&!i.includes("(")&&!i.startsWith("#")){let h=Vt(i);if(h&&h.name&&!h.passthrough&&!h.cssVar){let m=n.color[h.name];if(m&&!m.value&&!m.rgb&&(k(m)||P(m)||v(m))&&!Se.has(h.name)){Se.add(h.name);try{n.color[h.name]=Kr(m,h.name)}finally{Se.delete(h.name)}}let y=n.color[h.name];if(y&&y.rgb){let x=y.rgb;h.tone&&(x=tr(x,h.tone));let b=h.alpha!==void 0?parseFloat(h.alpha):y.alpha!==void 0?y.alpha:1;i=`rgba(${x}, ${b})`}}}let a=xe(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),g=`${c}, ${l}, ${f}`,p=`rgba(${g}, ${d})`;return n.useVariable&&(n.cssVars[s]=p),{var:s,rgb:g,alpha:d,value:p}},ns=(t,e,r)=>{let n=A();if(v(t)&&t.value!==void 0&&t.var!==void 0)return n.useVariable&&(n.cssVars[t.var]=t.value),t;if(k(t)&&xt(t)&&(t=tt(t.slice(2))),P(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),v(t)){let i={};for(let a in t)a!=="var"&&(i[a]=ns(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return n.useVariable&&Zr(i,"gradient",e,n),i}let s=`--${n.varPrefix?n.varPrefix+"-":""}gradient-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[s]=t.value||t),{var:s,value:t.value||t}};L();var Jf=(t,e,r={},n)=>{let o=n||A(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=r,f=i?3:s,u=a||(o.globalTheme&&o.globalTheme!=="auto"?o.globalTheme:"light"),d=k(e)?e:String(e),g=Vt(t),p=g&&!g.passthrough&&!g.cssVar?g.name:null,h=(D,X)=>c?{value:D,...X}:D;if(p){let D=o.color[`${p}Safe`];if(D){let X=`${d}@${u}`,st=D[X]!==void 0?D[X]:D[d];if(st!==void 0){let Oe=st&&st.rgb!==void 0?o.useVariable&&st.var?`var(${st.var})`:st.value:tt(st,null,o);return h(Oe,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=tt(t,u?`@${u}`:null,o),y=Wn(t,o,u),x=Wn(e,o,u);if(!y||!x)return o.verbose&&console.warn("getSafeInk: could not resolve",t,e,"\u2014 returning hue unchanged"),h(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let b=jn(x.rgb,x.alpha),_=jn(y.rgb,y.alpha,b),w=Xo(_,b);if(w>=f-.02)return h(m,{ratio:w,deviation:0,derived:!1,overridden:!1});let[S,E,T]=Aa(y.rgb),[,I,O]=Ta([S,E,T]),F=Fn(b)>.5,z=F?S:1-S,Q=D=>{let X=F?S-D:S+D,st=Math.max(0,Math.min(1,X));return{rgb:Oa(st,I,O),L:st}},Mt=D=>{let{rgb:X}=Q(D),st=jn(X.map(Oe=>Math.round(Oe)),y.alpha,b);return Xo(st,b)},yt=0,N=z,q=Mt(N)>=f;if(q)for(let D=0;D<l;D++){let X=(yt+N)/2;Mt(X)>=f?N=X:yt=X}else yt=N;let{rgb:bt,L:kt}=Q(N),Rt=bt.map(D=>Math.round(D)),G=Mt(N),j=y.alpha<1?`rgba(${Rt.join(", ")}, ${y.alpha})`:`rgb(${Rt.join(", ")})`,et=Math.abs(kt-S)*100;return h(j,{rgb:Rt,ratio:G,startRatio:w,deviation:et,derived:!0,overridden:!1,reachable:q})},ey=(t,e,r={},n)=>Jf(t,e,{...r,meta:!0},n);L();L();var VR=t=>{let r=A().spacing||{},n=parseFloat(t.spacingRatio),o={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return Jt(o),o},UR=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;_t(r,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Jt(r),Wr(t,e)}},Wa=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n},qa=()=>{let t=A(),{spacing:e}=t;Jt(e),xr(e),UR(e)},zR=t=>{let e=A(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Jt(t)},Et=(t,e="padding",r,n)=>{let o=zR(r);if(k(t)){if(!n&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!n&&t.includes("(")){let i=_r(t);n=i[0],t=i[1]}}let s=n?[t]:k(t)&&t.includes("(")?ht(t):Mn(t);if(P(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)=>rr(s[f],e+l+i,o,n);return a[s.length].map((l,f)=>c(l,f))}return rr(t,e,o,n)}},ke=(t,e,r,n)=>{let o=A(),{spacing:s}=o,i=r||t[e];if(!n&&k(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!n&&k(i)&&i.includes("(")){let a=_r(i);n=a[0],i=a[1]}if(t.spacingRatio){let a=VR(t);return Et(i,e,a,n)}return Et(i,e,s,n)},Ka=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),o=So.some(i=>t.includes(i));return n||o?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(" ")};L();var qn=(t,e,r)=>!k(t)||ae.test(t)?t:yr(t).map(n=>(n=n.trim(),n.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(o.startsWith("--"))return`var(${o})`;let s=Hn(()=>tt(o,e));if(Fe(s))return s;if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em"||o==="inset"||o==="none"||Nn.has(o.toLowerCase()))return o;r&&r(o);let i=Et(o,"shadow");return i&&i.shadow?i.shadow:o}).join(" "))).join(", "),Jr=(t,e,r,n)=>{let o=A();if(v(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(P(t)){let a={"@light":Jr(t[0],e,"light"),"@dark":Jr(t[1],e,"dark")};return o.useVariable&&Zr(a,"shadow",e,o),a}if(v(t)){let a={};for(let c in t)a[c]=Jr(t[c],e,c.startsWith("@")?c.slice(1):c);return o.useVariable&&Zr(a,"shadow",e,o),a}k(t)&&!ae.test(t)&&(t=qn(t));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},Ga=(t,e)=>{let r=A();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!k(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(xt(t))return`var(${t})`;let[n]=P(t)?t:t.split(" "),s=r.shadow[n],i=v(s);if(!s)return r.verbose&&console.warn("Can't find color ",n),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={},c=Xr(r);for(let l in s){if(l.charCodeAt(0)!==64)continue;let f=l.slice(1),u=s[l],d=u&&(u.value!==void 0?u.value:u);if(d!==void 0&&(a[`[data-theme="${f}"] &`]=d,f==="light"||f==="dark")){let g=Yr(f,r);if(!g)continue;a[g]={[c]:d}}}return a}return r.verbose&&console.warn("Can't find color",t),t};var HR=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),WR=t=>HR.has(t),fe=(t,e,r)=>{if(t==null)return;let n=t+"";if(ae.test(n))return n;let o=n.trim();return o==="none"||o==="0"||o==="initial"||o==="inherit"||o==="unset"?n:n.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(xt(s))return`var(${s})`;if(WR(s)||/^\d/.test(s)||s==="0")return s;let i=Hn(()=>tt(s,e));if(Fe(i))return i;if(Nn.has(s.toLowerCase()))return s;r&&r(s);let a=Et(s,"border");return a&&a.border?a.border:s}).join(" ")};L();var qR=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"]),XS=["color","Color","background","Background","fill","Fill","stroke","Stroke"],t0=t=>{for(let e=0;e<XS.length;e++)if(t.includes(XS[e]))return!0;return!1},KR={boxShadow:qn,textShadow:qn,border:fe,borderTop:fe,borderRight:fe,borderBottom:fe,borderLeft:fe,outline:fe,columnRule:fe},GR=t=>{if(!t)return!1;let e=Vt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},ZS=new Set,YR=(t,e,r,n,o,s)=>{if(!mt())return;let i=`${t}::${e}::${r||""}::${n}`;ZS.has(i)||(ZS.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(r?` (${r})`:"")+` did not fully resolve: "${n}" -> "${o}" still contains the unresolved token "${s}". This is not valid CSS \u2014 the browser will drop the whole declaration. Register "${s}" as a design-system color token or fix the typo.`))},oy=(t,e,r,n)=>{let o=KR[e];if(!o)return tt(r,n);let s=null,i=o(r,n,a=>{!s&&GR(a)&&(s=a)});return s&&YR(t,e,n,r,i,s),i},sy=(t,e)=>ve(t,e),XR=t=>v(t)&&B(t.value),ZR=t=>{for(let e in t){let r=t[e];if(k(r)&&r.startsWith("var(--"))return!0}return!1},Xa=(t,e)=>{let r=A();return XR(t)?!r.useVariable&&ZR(t)?t:os(t.value,e):os(t,e)},e0=(t,e)=>{let r=new Set;for(let n of e){let o=n.slice(0,1);if(!(o==="@"||o==="."||o===":")&&t0(n))for(let s in t){if(r.has(s))continue;let i=t[s]?.[n];if(i===void 0)continue;let a=tt(i,`@${s}`);a!==void 0&&k(a)&&/^[a-z][a-zA-Z]+$/.test(a)&&!qR.has(a)&&r.add(s)}}return r},JR=t=>t.startsWith("[data-theme=")||t.startsWith("@media"),Ya=(t,e)=>{for(let r in e){let n=e[r];v(n)?Ya(t[r]||(t[r]={}),n):t[r]=n}return t},JS=(t,e,r,n)=>{if(Ya(t,{[`[data-theme="${e}"] &`]:r}),e!=="light"&&e!=="dark")return;let o=Yr(e,n);o&&Ya(t,{[o]:{[Xr(n)]:r}})},r0=(t,e,r,n)=>{let o=r.globalTheme!==void 0?r.globalTheme:"auto",s=o&&o!=="auto"?String(o).replace(/^'|'$/g,""):null,i=new Set(n?Object.keys(n):[]);for(let l in t)if(t[l])for(let f of Object.keys(t[l]))i.add(f);let a=e0(t,i),c={};for(let l of i){let f=l.slice(0,1);if(f==="@")continue;if(f==="."||f===":"){let y={};for(let _ in t)B(t[_]?.[l])&&(y[_]=t[_][l]);let x=n&&B(n[l])?n[l]:void 0;if(!Object.keys(y).length&&!x)continue;let b=f==="."?l.slice(1):l.replace(/^:+/,"");c[l]=r0(y,`${e}-${b}`,r,x);continue}let u=n&&!B(n[l])?n[l]:void 0,d=new Set(Object.keys(t));u!==void 0&&(d.add("light"),d.add("dark"),s&&d.add(s));let g={},p;for(let y of d){if(a.has(y))continue;let x=t[y]?.[l];if((x===void 0||B(x))&&(x=u),x===void 0)continue;let b=oy(e,l,x,`@${y}`);b!==void 0&&(g[y]=b,(s&&y===s||!s&&(y==="light"||p===void 0))&&(p=b))}let h={},m=Object.keys(g).filter(y=>g[y]!==p);if(m.length){let y=g.light!==void 0?g.light:p,x=g.dark!==void 0?g.dark:p;if(t0(l)&&Gr(y)&&Gr(x)){h[l]=y===x?y:`light-dark(${y}, ${x})`;for(let b in g)b==="light"||b==="dark"||JS(h,b,{[l]:g[b]},r)}else{p!==void 0&&(h[l]=p);for(let b of m)JS(h,b,{[l]:g[b]},r)}}else{if(p===void 0)continue;h[l]=p}Ya(c,h),c[`.${l}`]=h}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},ry=(t,e,r,n)=>{let{cssVars:o}=r;r.cssMediaVars||(r.cssMediaVars={});let s=r.cssMediaVars,i=r.globalTheme!==void 0?r.globalTheme:"auto",a=i&&i!=="auto"?String(i).replace(/^'|'$/g,""):null,c={},l=new Set(n?Object.keys(n):[]);for(let u in t)if(t[u])for(let d of Object.keys(t[u]))l.add(d);let f=e0(t,l);for(let u of l){let d=u.slice(0,1),g=B(n?.[u])||Object.values(t).some(p=>B(p?.[u]));if(d==="."&&g){let p=u.slice(1),h={};for(let y in t)B(t[y]?.[u])&&(h[y]=t[y][u]);let m=B(n?.[u])?n[u]:void 0;c[u]=ry(h,`${e}-${p}`,r,m)}else if(d===":"&&g){let p=u.replace(/^:+/,""),h={};for(let y in t)B(t[y]?.[u])&&(h[y]=t[y][u]);let m=B(n?.[u])?n[u]:void 0;c[u]=ry(h,`${e}-${p}`,r,m)}else if(d!=="@"&&d!=="."&&d!==":"){let h=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${u}`,m=n&&!B(n[u])?n[u]:void 0,y=new Set(Object.keys(t));m!==void 0&&(y.add("light"),y.add("dark"),a&&y.add(a));let x,b=!1;for(let _ of y){if(f.has(_))continue;let w=t[_]?.[u];if((w===void 0||B(w))&&(w=m),w===void 0)continue;let S=oy(e,u,w,`@${_}`);if(S===void 0)continue;b=!0,(a&&_===a||!a&&(_==="light"||x===void 0))&&(x=S);let E=`[data-theme="${_}"]`;if(s[E]||(s[E]={}),s[E][h]=S,_==="dark"||_==="light"){let T=`@media (prefers-color-scheme: ${_})`;s[T]||(s[T]={}),s[T][h]=S}}if(x!==void 0&&(o[h]=x),!b)continue;c[u]=`var(${h})`,c[`.${u}`]={[u]:c[u]}}}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},os=(t,e,r,n)=>{let o=A(),{cssVars:s}=o,i={value:t},a=!r&&!n,c,l;if(B(t)){if(a&&o.useVariable){let f={},u={};for(let d in t)d.startsWith("@")?B(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];(Object.keys(f).length||Object.keys(u).length)&&(l=ry(f,e,o,u),Object.assign(i,l))}else if(a){let f={},u={};for(let d in t)d.startsWith("@")?B(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];c=r0(f,e,o,u),Object.assign(i,c)}for(let f in t){let u=f.slice(0,1),d=t[f];if(u==="@"||u===":"||u==="."){let g=u==="@"&&f;i[f]=os(d,e,f,n||g)}else if(!a){let g=oy(e,f,d,n),p=[...new Set([n,r].filter(x=>x).map(x=>x.slice(1)))],h=p.length?"-"+p.join("-"):"",y=`--${o.varPrefix?o.varPrefix+"-":""}theme-${e}${h}-${f}`;o.useVariable?(o.useThemeSuffixedVars&&(s[y]=g),i[f]=`var(${y})`):i[f]=g,i[`.${f}`]={[f]:i[f]}}}if(c)for(let f in c){let u=f.slice(0,1);(u==="."||u===":")&&B(t[f])&&(i[f]=c[f])}if(l)for(let f in l){let u=f.slice(0,1);(u==="."||u===":")&&B(t[f])&&(i[f]=l[f])}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(k(t)&&xt(t)){let u=o.theme[t.slice(2)];return ve(u,n)}return i},ny=(t,e)=>{let r={};for(let n in t){let o=n.slice(0,1);if(B(t[n]))if(e&&JR(n))r[n]=Ya({},t[n]);else{if(o==="@")continue;o===":"?r[`&${n}`]=ny(t[n],e):o==="."&&(r[`&${n}`]=ny(t[n],e))}else r[n]=t[n]}return r},n0=(t,e)=>{let r=e.shift();return t[r]?n0(t[r],e):t},QS=(t,e)=>P(e)?n0(t,e):k(e)&&t[e]?t[e]:t;var ve=(t,e)=>{let r=A();if(k(t)&&xt(t)&&(t=ve(t.slice(2))),!t||!k(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[n,...o]=P(t)?t:t.split(" "),s=r.theme[n];return s&&o.length?s=QS(s,o):s&&e&&(s=QS(s,e)),ny(s,!r.useVariable)};L();L();var Za=(t,e)=>{let r=A(),n=`--font-${e}`;if(!t||P(t)&&!t[0])return;let o;if(t.isVariable){let s=we(t.url,r.files)||t.url;Zo(s)?o=Jo(s):o=Hr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap",unicodeRange:t.unicodeRange})}else if(t[0])o=Vn(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>we(i,r.files)||i):we(t.url,r.files)||t.url;o=Hr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch,unicodeRange:t.unicodeRange})}return{var:n,value:t,fontFace:o}},Ja=(t,e)=>{let r=A(),{fontFamily:n}=r;return Bn(e||n,t)},ss=(t,e)=>{let r=A(),{fontFamily:n,fontFamilyTypes:o}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!n.default)&&(n.default=e),v(s)&&(s=Mn(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${o[i]}`;return{var:a,value:c,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};L();var Qf=t=>{let e=A(),{typography:r,media:n}=e;for(let o in t){let s=o.slice(0,1)==="@",i=t[o];if(!s)continue;let{mediaRegenerate:a}=t,c=o.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:g,h1Matches:p,unit:h}=t;_t(i,{type:l,base:f,ratio:u,range:d,subSequence:g,h1Matches:p,unit:h});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),y=i.unit||h,x=!i.unit&&m.has(h)?"rem":y,b=n[c],_="@media "+(b==="print"?`${b}`:`screen and ${b}`);if(r.templates[_]={fontSize:i.base/r.browserDefault+x},!a){_t(i,{sequence:{},scales:{},vars:{}}),Jt(i),Wr(t,o);continue}_t(i,{sequence:{},scales:{},templates:{},vars:{}}),Jt(i),Wr(t,o)}},tu=t=>{let e=A();if(t.h1Matches){let r=t.unit,n=Va(t),{templates:o}=t;for(let s in n){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:e.useVariable?`var(${n[s]?.variable})`:`${n[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}}}},Qa=()=>{let t=A(),{typography:e}=t;Jt(e),tu(e),xr(e),Qf(e)},tc=t=>{let e=A(),{typography:r}=e;return rr(t,"fontSize",r)};L();var ec=t=>{if(!k(t))return;let r=A().shape;if(r)return r[t]!==void 0?r[t]:r[t.toLowerCase()]};L();var rc=()=>{let t=A(),{timing:e}=t;Jt(e),xr(e)},Ce=t=>{let e=A(),{timing:r}=e;return r[t]||r[ka(t)]||t},ue=(t,e="timing")=>{let r=A(),{timing:n}=r;return rr(t,e,n)};L();var nc=()=>{let t=A(),{fontFamily:e,theme:r,typography:n}=t,o=t.document;return ur(o)?(Ir(t,"document",o),o=t.document={}):o||(o=t.document={}),_t(o,{theme:r.document,fontFamily:Bn(e),fontSize:n.base,lineHeight:n.lineHeight})};L();var cy={document:nt},o0=new WeakMap,s0=new WeakMap,QR=128,i0=1048576,iy=8192,ly=t=>t.nodeType===1&&t.localName==="symbol"&&t.getAttribute("id"),l0=t=>t.nodeType===8||t.nodeType===3&&!t.textContent.trim(),tP=(t,e)=>{let r=1,n=t.ownerDocument;if(n&&typeof n.createTreeWalker=="function"){let s=n.createTreeWalker(t,4294967295);for(;s.nextNode();)if(++r>e)return r;return r}let o=[t];for(;o.length;){let s=o.pop().childNodes||[];for(let i=0;i<s.length;i++){if(++r>e)return r;o.push(s[i])}}return r},ay=(t,e)=>{if(typeof t.importNode=="function")return t.importNode(e,!0);let r=e.cloneNode(!0);return typeof t.adoptNode=="function"?t.adoptNode(r):r},eP=(t,e)=>{if(typeof t.prepend=="function")return t.prepend(e);let r=t.firstChild!==void 0?t.firstChild:t.childNodes&&t.childNodes[0];return typeof t.insertBefore=="function"?t.insertBefore(e,r||null):t.appendChild(e)},is=(t,e)=>{let r=A();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?Ha(e,t):t},oc=(t,e=cy)=>{let r=A(),n=Object.keys(t).length?{}:r.svg;for(let o in t)n[o]=t[o];u0(n,e)},Kn=(t,e)=>{let r=A();return r.useIconSprite&&!r.semanticIcons?.[e]?is(t,e):t},Gn=(t,e=cy)=>{let r=A(),n=Object.keys(t).length?{}:r.icons;for(let o in t)n[o]=t[o];u0(n,e)},f0=(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},rP=(t,e)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let n=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new r().parseFromString(n,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},nP=(t,e,r)=>{let n=String(r),o=s0.get(e),s=o?.entries.get(n);if(s)return o.entries.delete(n),o.entries.set(n,s),s.root;let i=rP(t,n);if(i||(i=f0(t,{isRoot:!1}),i.innerHTML=n),n.length>i0)return i;let a=tP(i,iy);if(a>iy)return i;for(o||(o={entries:new Map,units:0,nodes:0},s0.set(e,o));o.entries.size>=QR||o.units+n.length>i0||o.nodes+a>iy;){let c=o.entries.keys().next().value,l=o.entries.get(c);o.units-=c.length,o.nodes-=l.nodes,o.entries.delete(c)}return o.entries.set(n,{root:i,nodes:a}),o.units+=n.length,o.nodes+=a,i},a0=t=>{let e=new Map;for(let r of t.children){let n=ly(r);if(!n)continue;let o=e.get(n)||[];o.push(r),e.set(n,o)}return e},oP=t=>t.replace(/["\\\u0000-\u001f\u007f]/g,e=>`\\${e.charCodeAt(0).toString(16)} `),c0=(t,e,r,n)=>{let o=0,s=e.childElementCount>8?a0(r):null,i=a=>{if(!s)try{return[...r.querySelectorAll(`symbol[id="${oP(a)}"]`)].filter(c=>c.parentNode===r)}catch{s=a0(r)}return s.get(a)};for(let a of e.childNodes){if(l0(a))continue;let c=ly(a);if(!c&&n){let u=o++,d=n.nodes[u];if(!d&&n.complete||d?.parentNode===r)continue;let g=ay(t,d||a);r.appendChild(g),n.nodes[u]=g;continue}let l=c&&i(c),f=l&&l[0];if(!f)f=ay(t,a),r.appendChild(f);else if(!f.isEqualNode(a)){let u=ay(t,a);r.replaceChild(u,f),f=u}if(l)for(let u=1;u<l.length;u++)l[u].remove();c&&s&&s.set(c,[f])}},u0=(t,e=cy)=>{let r=A(),n=e.document||nt;if(!n||!n.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),za(t);let o=n.querySelector("#svgSprite"),s="";for(let d in t)s+=t[d];let i=o||f0(n);if(!i||!i.nodeType)return;let a=d=>nP(n,i,d),c=a(s),l=o0.get(i);l||o0.set(i,l=new WeakMap);let f=l.get(r);if(f||l.set(r,f=new Map),[...c.childNodes].some(d=>!l0(d)&&!ly(d))){let d=[];for(let g in t)d.push(g);for(let g of d){let p=f.get(g);p||f.set(g,p={nodes:[],complete:!1}),c0(n,d.length===1?c:a(t[g]),i,p),p.complete=!0}}else{c0(n,c,i);for(let d in t)f.has(d)||f.set(d,{nodes:[],complete:!0})}o||eP(n.body,i);for(let d in t)r.__svgCache[d]=!0};L();var sc=(t={})=>{let e=A(),r=e.typography||{},n=e.document||{},o=v(e.reset)?e.reset:e.reset={};if(o[":root"]){let c=o,l=r.templates||{};c.body={...e.useDocumentTheme?ve("document"):{},...l.body},c.h1=l.h1,c.h2=l.h2,c.h3=l.h3,c.h4=l.h4,c.h5=l.h5,c.h6=l.h6}let{body:s,...i}=r.templates||{},a=e.useDocumentTheme?ve("document"):{};if(o.html&&zt(o.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)&&(o[c]||(o[c]={}),o[c].html||(o[c].html={}),o[c].html.fontSize===void 0&&(o[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,g=f.browserDefault||r.browserDefault,p=l.slice(1),h=c[p];if(!h)continue;let m="@media "+(h==="print"?h:"screen and "+h);o[m]||(o[m]={}),o[m].html||(o[m].html={}),o[m].html.fontSize=d/g+u}}return it(_t(o,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",textSizeAdjust:"100%",WebkitTextSizeAdjust:"100%",...a,fontSize:r.unit?r.base/r.browserDefault+r.unit:r.browserDefault+"px",fontFamily:n.fontFamily,lineHeight:n.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:n.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}},le)};L();var sP=new Set(["fallback"]),fy=new Set,d0=(t,e)=>{fy.has(t)||(fy.add(t),mt()&&console.warn(e))},uy=()=>{fy.clear()},p0=t=>{for(let e in t)delete t[e];return t},ic=()=>{let t=A(),e=v(t.cssSkinVars)?p0(t.cssSkinVars):t.cssSkinVars={},r=v(t.cssSkinFallback)?p0(t.cssSkinFallback):t.cssSkinFallback={},n=t.skins;if(!v(n))return e;let o=t.varPrefix?t.varPrefix+"-":"",s=t.color||{},i=t.cssVars||{},a=c=>k(c)&&Object.prototype.hasOwnProperty.call(s,c)?`var(--${o}color-${c})`:c;for(let c in n){let l=n[c];if(!v(l))continue;let f={};for(let u in l){if(sP.has(u))continue;let d=l[u];if(v(d))for(let g in d){let p=`--${o}theme-${u}-${g}`;t.useVariable!==!1&&!(p in i)&&d0(`${c}/${u}/${g}`,`[scratch] skin "${c}" rewrites theme "${u}" param "${g}", which the theme does not declare \u2014 no element reads ${p}, so the skin changes nothing there. Declare "${g}" on the "${u}" theme (its no-skin value).`),f[p]=a(d[g])}}e[c]=f,k(l.fallback)&&(r[c]=l.fallback)}for(let c in r){let l=r[c];e[l]||(d0(`${c}/fallback/${l}`,`[scratch] skin "${c}" falls back to "${l}", which is not a declared skin \u2014 the reduced-transparency fallback is skipped.`),delete r[c])}return e},h0=(t,e)=>{let r=`[data-skin="${t}"]`;return!e||e===":root"?`:root${r}, ${r}`:`${e}${r}, ${r} ${e}, ${e} ${r}`},Yn=(t,e,r)=>{let n={};if(!v(t))return n;for(let s in t)n[h0(s,r)]=t[s];let o={};for(let s in e||{}){let i=t[e[s]];i&&(o[h0(s,r)]=i)}return Object.keys(o).length&&(n["@media (prefers-reduced-transparency: reduce)"]=o),n};L();var iP=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),g0=/^-?[A-Z][0-9]?$/,nr=t=>fe(t),eu=t=>{if(k(t))return ae.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(xt(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=tt(e);return Fe(r)?r:e}).join(" ")},ru=(t,e)=>Ga(t,e),ac=(t,e)=>{if(k(t))return ae.test(t)?t:yr(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(xt(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let o=tt(n);if(Fe(o)){let i=It(n,e);return v(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em")return n;let s=Et(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", ")},cc=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let n=t.slice(0,r+1),o=t.slice(r+1,t.lastIndexOf(")")),s=")",a=yr(o).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||iP.has(f)||f==="transparent"||ae.test(f))return f;let u=tt(f);return Fe(u)?u:f}).join(" ")));return n+a.join(", ")+s},nu=(t,e)=>{if(!k(t))return;let r=A();return yr(t).map(n=>{let o=n.trim();if(xt(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(r.gradient?.[o]){let s=It(o,e);if(k(s))return s;if(v(s)){for(let i in s)if(k(s[i]))return s[i]}return o}return o.includes("gradient")?cc(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!Vt(o)?`url(${o})`:o}).join(", ")},ou=t=>k(t)&&ht(t).map(e=>Et(e,"gap").gap).join(" "),su=t=>{if(!k(t))return t;let e=A();return ht(t).map(r=>g0.test(r)?zn(r,e.spacing):r).join(" ")},dy=t=>{if(!k(t))return;let e=t.split(" ");return e.length?e.map(r=>xt(r)?`var(${r})`:r.length<3||r.includes("ms")?ue(r).timing||r:Ce(r)?Ce(r):r).join(" "):t},lc=(t,e,r)=>{if(k(t))return t.split(",").map(n=>ue(n).timing||n).join(",")},iu=t=>{if(!k(t))return;let e=t.split(",");if(e.length)return e.map(dy).join(",")};function Ct(t,e,r={},n={}){let o=pt.call(this,e||r[t]);if(o==null)return;let s;if(k(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[t]:o};if(o.includes("(")){let c=_r(o);s=c[0],o=c[1]}let i=r.scaleBoxSize,a=Wa(t);!i&&a&&!n.ratio&&(o=Ka(o))}return n.ratio?ke(r,t,o,s):Et(o,t,void 0,s)}var $=(t,e=null,r)=>Ct(t,e,r,{ratio:!0}),aP=(t,e,r)=>k(t)?ht(t).map(n=>g0.test(n)?ke(e,r,n)[r]:n).join(" "):t,wr=(t,e,r,n="borderRadius")=>{if(k(t))return{[n]:ht(t).map(o=>{let s=ec(o);return s!==void 0?aP(s,e,r):ke(e,r,o)[r]}).join(" ")}};L();var cs="__smblsThemeRootOwner",ls=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)},m0=(t,e,r)=>{if(!(!t||!e)){ls(t),t.__prefersListener=r,t.__prefersMq=e;try{e.addEventListener("change",r)}catch{e.addListener(r)}}},cP=(t,e)=>{let r=A(),{cssVars:n}=r,o=e.startsWith("--")?e:`--${e}`;return n[o]=t,t},Wt=t=>t,au={color:Kr,gradient:ns,font:Za,fontFamily:ss,fontfamily:ss,theme:Xa,icons:Kn,semanticIcons:Wt,semanticicons:Wt,svg:is,svgData:Wt,typography:Wt,shadow:Jr,spacing:Wt,media:Wt,grid:Wt,class:Wt,timing:Wt,reset:Wt,unit:Wt,animation:Wt,vars:cP,sizes:Wt,shape:Wt,skins:Wt},lP=(t,e,r,n)=>{Ir(t,r,e);let o={};for(let s of n)t[s]===e&&(t[s]=o);return t.verbose&&console.warn("[scratch] design-system family",r,"resolved to a host object; parked it and allocated a plain bucket"),o},py=(t,e,r)=>{let n=A(),o=Ia(t),s=o.toLowerCase(),i=n[o]||n[s]||n[t],a=ur(i)?lP(n,i,s,[o,s,t]):i,c=au[o]||au[s];if(c)try{let l=c(e,r);return a&&(a[r]=l),a}catch(l){n.verbose&&console.warn("Error setting",s,"value",e,r,l)}if(!c){let l=a||(n[s]={});return l[r]=e,l}n.verbose&&console.warn("Can not find",s,"method in scratch")},hy=(t,e)=>{let r=A(),n=t.toLowerCase();return ur(e)?(Ir(r,n,e),r.verbose&&console.warn("[scratch] ignoring host object passed as the",n,"design-system family"),r[n]||r[t]):e==null?(r.verbose&&console.warn("[scratch] skipping empty design-system family",n),r[n]||r[t]):(Object.keys(e).sort((s,i)=>{let a=v(e[s])||P(e[s])?1:0,c=v(e[i])||P(e[i])?1:0;return a-c}).forEach(s=>{try{return py(n,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",n,"value",e[s],s,i)}}),r[n]||r[t])},cu=(t,e)=>{let r=e||A();r.globalTheme=t;let o=wo(r)||(typeof document<"u"?document:null),s=o&&o.defaultView||(typeof window<"u"?window:null);if(o){let a=r.themeRoot||o.documentElement,c=t&&t!=="auto";if(a[cs]=r,c)ls(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",m0(r,f,l)}else ls(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(o&&r.cssVars){let a=r.scopeSelector||":root",c=o.styleSheets;for(let l=0;l<c.length;l++)try{let f=c[l].cssRules;for(let u=0;u<f.length;u++)if(f[u].selectorText===a){for(let d in r.cssVars)f[u].style.setProperty(d,r.cssVars[d]);return r}}catch{}}return r},fP={},Xn=(t,e=fP)=>{let r=e.config||A(),{version:n,verbose:o,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:g,semanticIcons:p,hoverMedia:h,files:m,assets:y,...x}=t;e.newConfig&&(r=Kf(e.newConfig)),fr(x.document)&&(r.__domDocument=x.document,delete x.document),fr(r.document)&&(r.__domDocument||(r.__domDocument=r.document),r.document={}),m!==void 0&&(r.files=m),y!==void 0&&(r.assets=y),o!==void 0&&(r.verbose=o),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),g!==void 0&&(r.useDefaultConfig=g),p!==void 0&&(r.semanticIcons=p),h!==void 0&&(r.hoverMedia=h),r.verbose&&console.log(r);let _=wo(r)||(typeof document<"u"?document:null),w=_&&_.defaultView||(typeof window<"u"?window:null),S=_&&(r.themeRoot||_.documentElement);if(S&&typeof S.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")ls(r),S.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,S[cs]=r,r.globalTheme==="dark"||r.globalTheme==="light"?S.style.colorScheme=r.globalTheme:S.style.colorScheme="light dark";else if(S[cs]&&S[cs]!==r&&S.hasAttribute("data-theme"))ls(r),r.resolvedTheme=S.getAttribute("data-theme");else if(w&&w.matchMedia){let F=Q=>{let Mt=Q.matches?"dark":"light";S.setAttribute("data-theme",Mt),r.resolvedTheme=Mt},z=w.matchMedia("(prefers-color-scheme: dark)");F(z),S.style.colorScheme="light dark",S[cs]=r,m0(r,z,F)}else ls(r),S.setAttribute("data-theme","light"),r.resolvedTheme="light",S.style.colorScheme="light",S[cs]=r;r.__svgCache||(r.__svgCache={}),rs(x);let E=Object.keys(x).filter(O=>!O.startsWith("__")),T=new Set(E);if(E.forEach(O=>{let F=O.toLowerCase();F!==O&&T.has(F)&&it(x[F],x[O],le)}),E.map(O=>{let F=O.toLowerCase();if(!(F!==O&&T.has(F)))return hy(O,x[O])}),r.varPrefix&&(r.typography&&(r.typography.varPrefix=r.varPrefix),r.spacing&&(r.spacing.varPrefix=r.varPrefix),r.timing&&(r.timing.varPrefix=r.varPrefix)),x.typography)try{Qa()}catch(O){r.verbose&&console.warn("Error applying typography sequence",O)}if(x.spacing)try{qa()}catch(O){r.verbose&&console.warn("Error applying spacing sequence",O)}if(x.timing)try{rc()}catch(O){r.verbose&&console.warn("Error applying timing sequence",O)}try{ic()}catch(O){r.verbose&&console.warn("Error applying skins",O)}nc();let I=sc();return I&&(r.reset=I),r};var us=new Map,T0=null,my=null,uP=null;function uc(t){t.batchAtomicCss&&(my=t.batchAtomicCss),t.compoundCssClass&&(uP=t.compoundCssClass)}var dP=new Set,b0=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function wy(t){try{let e=A();e&&(e.__domDocument=t)}catch{}t&&dP.add(t)}function Jn(){try{let t=A();if(t){if(b0(t.__domDocument))return t.__domDocument;if(b0(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var Qt={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function hu(){return{...Qt}}function Sy(){for(let t in Qt)Qt[t]=0;du=!1}var du=!1,uu=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function pP(t){let e=Date.parse(t);if(!isFinite(e))return"";let r=Math.floor((Date.now()-e)/864e5);return r<1?" (today)":` (${uu(r,"day")} ago)`}function hP(){try{let t=vP();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 gP(t,e){if(du)return!1;du=!0;let r="n/a \u2014 running from src/ (unbuilt), so no dist is in play",n="this IS the source",o="@symbo.ls/css";return console.error(`[@symbo.ls/css] CSS EMIT FAILURE (${t}) \u2014 the engine emitted ${uu(Qt.variable,"variable rule")} and ${uu(Qt.atomic,"atomic rule")}, while the design system held ${uu(e,"CSS variable")}.
|
|
44
|
+
src: ${i};`},Wr=(t,e,r,n)=>`@font-face {${Ia(t,e,r,n)}
|
|
45
|
+
}`,Hn=(t,e,r)=>Object.keys(e).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f}=e[o],u=Array.isArray(s)?s.map(d=>ke(d,r)||d):ke(s,r)||s;return Ia(t,u,i,{fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f})}),Om=t=>Object.keys(t).map(r=>Hn(r,t[r].value)),qf=(t,e,r)=>{if(e&&e.isVariable){let s=ke(e.url,r)||e.url;return ts(s)?es(s):Wr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap",unicodeRange:e.unicodeRange})}if(e[0])return Hn(t,e,r).map(Wf);let o=Array.isArray(e.url)?e.url.map(s=>ke(s,r)||s):ke(e.url,r)||e.url;return Wr(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch,unicodeRange:e.unicodeRange})},$a=(t,e)=>Object.keys(t).map(n=>qf(n,t[n].value,e));L();L();L();L();var rs={};M(rs,{animation:()=>qm,breakpoints:()=>Hm,class:()=>Zm,color:()=>Fm,devices:()=>Wm,document:()=>Zx,font:()=>Pm,fontFace:()=>Im,fontFamily:()=>Dm,fontFamilyTypes:()=>Lm,gradient:()=>Nm,grid:()=>Xm,icons:()=>Vm,media:()=>$m,reset:()=>Jx,semanticIcons:()=>Um,sequence:()=>br,shadow:()=>Bm,shape:()=>ty,sizes:()=>Qm,skins:()=>ey,spacing:()=>Mm,svg:()=>Km,svgData:()=>Gm,templates:()=>Ym,theme:()=>jm,timing:()=>zm,typography:()=>Ma,unit:()=>Rm,vars:()=>Jm});var br={"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 Rm={default:"em"};var ZR={browserDefault:16,base:16,type:"font-size",ratio:br["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Ma=ZR;var Pm={};var Dm={},Lm={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},Im={};var $m={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var JR={base:Ma.base,type:"spacing",ratio:br.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Mm=JR;var Fm={},Nm={};var jm={};var Bm={};var Vm={},Um={};var QR={default:150,base:150,type:"timing",ratio:br["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},zm=QR;var Zx={};var Hm={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Wm={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 qm={};var Km={},Gm={};var Ym={};var tP={},Xm=tP;var Zm={};var Jx={},Jm={},Qm={},ty={},ey={};var Xf={},Zf={},de=new Set,Kf=rs,Gf={},Na=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Kf){let e=t.toLowerCase();Gf[e]=Kf[t];let r=Na(e);r!==e&&(Gf[r]=Kf[t]),e!==t&&(Gf[t]=Kf[t])}var Wn={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Xf,cssMediaVars:Zf,CSS_VARS:Xf,CSS_MEDIA_VARS:Zf,cssSkinVars:{},cssSkinFallback:{},_scratchConfig:!0,...Gf},ns=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return Tt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let r=Tt(e)?e:t.globalTheme,n=di(Tt(r)?r:"auto");return Object.defineProperty(t,"globalTheme",{get(){return n.get()},set(o){n.set(o)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:n,enumerable:!1,configurable:!0,writable:!0}),n},Qx=t=>t?ns(t):null,os=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return Tt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let r=Tt(e)?e:t.resolvedTheme,n=di(Tt(r)?r:null);return Object.defineProperty(t,"resolvedTheme",{get(){return n.get()},set(o){n.set(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:n,enumerable:!1,configurable:!0,writable:!0}),n},t0=t=>t?os(t):null;ns(Wn);os(Wn);var Yf=ft(Wn),ue={active:"0",0:Wn},e0=t=>(Tt(t)&&(ue.active=t),ue[t||ue.active]),Fa=[],at=t=>{t&&t._scratchConfig&&Fa.push(t)},ot=()=>{Fa.pop()},A=t=>Fa.length?Fa[Fa.length-1]:ue[t||ue.active]||Wn,Jf=t=>{if(v(t))return ue.active="1",ue[1]=it(t,ft(Yf),de),ss(ue[1]),ns(ue[1]),os(ue[1]),t},eP=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],rP=["useVariable","globalTheme","verbose"],nP=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],ss=t=>{for(let e of nP){let r;for(let n of e){let o=t[n];v(o)&&(r=r?it(r,o,de):o)}if(r)for(let n of e)v(t[n])&&(t[n]=r)}},ja=(t,e,{cleanBase:r=!1}={})=>{let n=r?null:A(),o=ft(!r&&n&&n._scratchConfig?n:Yf);for(let i of eP)delete o[i];for(let i of rP)Object.prototype.hasOwnProperty.call(Yf,i)?o[i]=Yf[i]:delete o[i];let s=it(e||{},o,de);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s.cssSkinVars={},s.cssSkinFallback={},s._scratchConfig=!0,ss(s),ns(s),os(s),t&&(ue[t]=s),s};var nr={"-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"},ny=(t,e)=>{let{key:r,variable:n,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:n},e.scales[r]=s;let c=r0.has(e.unit)?"rem":e.unit;e.vars[n]=s+c},_r=t=>{if(!t.includes("("))return t;let e=t.trim(),r=e.indexOf("("),n=e.slice(0,r),o=0,s=-1;for(let i=r;i<e.length;i++){let a=e[i];if(a==="(")o++;else if(a===")"&&(o--,o===0)){s=i;break}}return s===-1||/\s/.test(n)||e.slice(s+1).trim()!==""?[void 0,t]:[n,e.slice(r+1,s)]},ry="\0",oP=(t,e)=>{let r="",n=0,o="";for(let s of t){if(n===0&&s!=="("){r+=s;continue}o+=s,s==="("?n++:s===")"&&(n--,n===0&&(r+=ry+e.length+ry,e.push(o),o=""))}return r+o},sP=(t,e)=>t.indexOf(ry)===-1?t:t.replace(/\u0000(\d+)\u0000/g,(r,n)=>e[Number(n)]),iP=/^(calc|min|max|clamp)\((.*)\)$/,aP=(t,e)=>{let r=iP.exec(t);return r?`${r[1]}(${Ha(r[2],e)})`:t.indexOf("(")!==-1?t:qn(t,e)},r0=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Ba=(t,e)=>{let{base:r,type:n,unit:o}=e,s=r0.has(o)?"rem":o,i=(bn(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(n&&n.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=nr[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=nr[t+1],u=Math.abs(t),d=Math.pow(n0,2*u),g=nr[u];return g?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${g}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Qf=(t,e,r,n)=>{let{type:o}=n,i=t===2&&e.length===2?t+1:t,l=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},Va=(t,e)=>{let n=(t*e-t)/1.618,o=t*e-n,s=t+n,i=(o+s)/2;return[o,i,s]},Ua=(t,e)=>Va(t,e).map(r=>r/t),za=(t,e)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[u,d,g]=Va(o,s);l>16?f=[u,d,g]:f=[u,g],f.forEach((h,p)=>{let m=~~(h/n*1e3)/1e3,y=i+(p+1),w=a+(p+1)/10,b=Qf(p+1,f,i,e),_={key:r+(p+1),variable:y,value:h,scaling:m,scalingVariable:b,index:w};ny(_,e)})},n0=1.618,cP=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let n=Math.abs(t),o=e*Math.pow(r,t),s=e*Math.pow(r,n)/Math.pow(n0,2*n);return Math.max(o,s)},te=t=>{let{type:e,base:r,ratio:n,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=o[1]-l,u=nr[f],d=cP(f,r,n),g=~~(d/r*100)/100,h=c+u,p=Ba(f,t),m={key:u,variable:h,value:d,base:r,scaling:g,scalingVariable:p,ratio:n,index:f};ny(m,t),s&&za(m,t)}return t},oy=(t,e=0)=>{let{type:r,base:n,ratio:o,subSequence:s}=t,i=x(e)?e:nr[e],a=x(e)?Object.entries(nr).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=n*Math.pow(o,a),f=~~(l/n*100)/100,g="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,h=Ba(a,t),p={key:i,variable:g,value:l,base:n,scaling:f,scalingVariable:h,ratio:o,index:a};return ny(p,c),s&&za(p,c),c},qn=(t="A",e)=>{let r=A(),{unit:n}=r;if(x(t)&&wt(t))return`var(${t})`;if(x(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(x(t)){let b=r.sizes;if(b){let _=b[t]||b[t.toLowerCase()];if(_!==void 0)return t.slice(0,1)==="-"?`calc(${_} * -1)`:_}}let{sequence:o,unit:s=n.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(pi(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+"-":""}${Ta(e.type.replace(".","-"))}-`,g=t.toUpperCase(),h=g.slice(0,1)==="-"?"-":"",p=h?g.slice(1):g,m="";p.includes("_")&&(m="_"+p.split("_")[1].toLowerCase(),p=p.split("_")[0]);let y=b=>a.test(b)?`var(${d}${b}${m})`:b;if(p.includes("+")){let[b,_]=p.split("+"),S=`${y(b)} + ${y(_)}`;return h?`calc((${S}) * -1)`:`calc(${S})`}else if(p.includes("*")){let[b,_]=p.split("*"),S=`${y(b)} * ${y(_)}`;return h?`calc((${S}) * -1)`:`calc(${S})`}else if(p.includes("-")){let[b,_]=p.split("-"),S=`${y(b)} - ${y(_)}`;return h?`calc((${S}) * -1)`:`calc(${S})`}if(!o[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 b=`var(${d}${p}${m})`;return h?`calc(${b} * -1)`:b}let w=o?o[p]:null;if(!w){if(console.warn("can't find",o,p),mt())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"?h+w.val+s:h+w.scaling+s},Ha=(t,e)=>{if(!["+","-","*","/",","].filter(i=>t.includes(i+" ")).length)return t;let n=/(\s+-\s+|\s*[+*/,]\s*)/,o=[];return oP(t,o).split(n).map(i=>{let a=sP(i,o),c=a.trim();return!c||["+","-","*","/",","].includes(c)?a:aP(c,e)}).join("")},or=(t,e,r,n)=>{if(typeof t!="string")return A().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!n&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=_r(t);n=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Ha(t,r):t=qn(t,r),{[e]:n?`${n}(${t})`:t}},tu=(t,e)=>nr[t-e],Wa=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((n,o)=>{let s=tu(e,o);return r[s]})};L();var sy=(t,e)=>{let r=A(),{cssVars:n}=r;B(t.value)||(n[t.var]=t.value)},qa=(t,e,r)=>{let n=A(),{unit:o}=n,s=e.unit||o.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[d,g,h]=Ua(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${g/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${h/a})`},o0=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),wr=(t,e={})=>{let r=A(),{unit:n,timing:o,cssVars:s}=r,i=t.unit||n.default,a=o0.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||qa(s,t,e);for(let u in l){let d=l[u],g=(t.type===o.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=g,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=g:(s[d.variable+"_default"]=g,s[d.variable]=`var(${d.variable+"_default"})`)}},qr=(t,e,r={})=>{let n=A(),{unit:o,media:s,cssVars:i}=n,a=e.slice(1),c=t[e],l=c.unit||t.unit||o.default,f=o0.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:g}=c,h=s[a];if(!h&&n.verbose&&console.warn("Can't find media query ",h),!u){let p=i[`@media ${h}`];p||(p=i[`@media ${h}`]={}),qa(p,c,r);let m=t.unit||o.default;if(f!==m&&d)for(let y in d){let w=d[y],b=g[y]+f;p[w.variable+"_default"]=b,p[w.variable]=b}return}for(let p in d){let m=d[p],y=(bn(f)?g[p]:d[p].val)+f;!h&&n.verbose&&console.warn("Can't find query ",h);let w=i[`@media ${h}`];w||(w=i[`@media ${h}`]={}),w[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=y}};L();var i0=On(),Ka=t=>{let e=A(),r="";for(let n in t)e.__svgCache[n]||(e.__svgCache[n]=!0,r+=t[n]);return r},lP=t=>{let e=t&&(t.default||t);if(!x(e))return i0&&console.warn("parseRootAttributes:",e,"is not a string"),{};let r=e.match(/<svg\s+(.*?)>/);if(!r||!r[1])return{};let o=r[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return o?o.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},fP=(t,e)=>{let r=[];if(t.replace(/id="([^"]*)"/g,(o,s)=>(r.push(s),o)),!r.length)return t;let n=t;for(let o of r){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${o}`;n=n.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 n},s0=new Set,Ga=(t,e)=>{let r=e&&e.default?e.default:e;if(!x(r))return i0&&!s0.has(t)&&(s0.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=r;let n=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(n){let u=n[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let o=lP(e),{width:s,height:i}=o,a=o.viewBox||`0 0 ${s||24} ${i||24}`,f=fP(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/^<symbol\b[^>]*>/,u=>u.replace(/\s(width|height)="[^"]*"/g,"")),f=f.replace("</svg","</symbol"),f=pP(f),f},uP="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",dP=new RegExp(`<(${uP})\\b([^>]*?)\\s*/>`,"g"),pP=t=>t.replace(dP,"<$1$2></$1>");var fs={};M(fs,{STANDARD_SCHEME_QUERIES:()=>ru,__resetSkinWarnings:()=>by,appendSVGSprite:()=>cc,appendSvgIconsSprite:()=>Zn,applyDocument:()=>ac,applyHeadings:()=>su,applyReset:()=>lc,applySkins:()=>fc,applySpacingSequence:()=>Xa,applyTimingSequence:()=>ic,applyTypographySequence:()=>nc,buildSkinVarStyles:()=>Jn,checkIfBoxSize:()=>Ya,getColor:()=>tt,getFontFamily:()=>rc,getFontSizeByKey:()=>oc,getMediaColor:()=>It,getMediaTheme:()=>Ee,getSafeInk:()=>nu,getSafeInkInfo:()=>cy,getShadow:()=>Ja,getShapeByKey:()=>sc,getSpacingBasedOnRatio:()=>Ce,getSpacingByKey:()=>Et,getTheme:()=>dy,getTimingByKey:()=>he,getTimingFunction:()=>Ae,isPlainColor:()=>Yr,quietColorProbe:()=>Kn,resolveBorderValue:()=>pe,resolveColorRgb:()=>Gn,resolveShadowValue:()=>Yn,runThroughMedia:()=>ou,schemeGuardSelector:()=>Zr,schemeMediaQuery:()=>Xr,setAdaptiveSchemeVar:()=>Jr,setColor:()=>Gr,setFont:()=>ec,setFontFamily:()=>cs,setGradient:()=>is,setMediaTheme:()=>as,setSVG:()=>ls,setShadow:()=>Qr,setSvgIcon:()=>Xn,setTheme:()=>tc,splitSpacedValue:()=>Za});L();var ru={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},Xr=(t,e)=>{let r=e.media&&e.media[t]||ru[t];return r?"@media "+(r==="print"?`${r}`:`screen and ${r}`):null},Zr=t=>{let e=t.scopeSelector||":root";return`${e===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`} &`},ve=new Set,f0=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"]),hP=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,gP=/gradient\(|url\(|image-set\(|var\(/i,mP=new Set(["transparent","currentColor","currentcolor"]),Yr=t=>{if(!x(t))return!1;let e=t.trim();return gP.test(e)?!1:hP.test(e)?!0:f0.has(e)||mP.has(e)},eu=new Set,a0=t=>{if(!t)return!1;let{color:e,gradient:r}=t;return!!(v(e)&&Object.keys(e).length||v(r)&&Object.keys(r).length)},c0=new Set,iy=0,Kn=t=>{iy++;try{return t()}finally{iy--}},yP=(t,e)=>{if(!x(t)||t.indexOf(" ")===-1)return null;let r=t.replace(/\s+/g,""),n=Vt(r);if(!n||n.passthrough||n.cssVar)return null;let{color:o,gradient:s}=e;return!o[n.name]&&!s[n.name]?null:r},ay=(t,e,r)=>{let n=yP(t,r);if(n){if(!c0.has(t)){c0.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 \`${n}\`? The space form never resolves, so the atomic class it mints carries no CSS value and paints invisibly. Dropped rather than shipped invisible.`)}return}let o=Vt(t);if(o&&o.name&&!o.passthrough&&!o.cssVar&&(o.alpha!==void 0||o.tone!==void 0)&&a0(r)&&!r.color[o.name]&&!r.gradient[o.name]){if(!iy&&!eu.has(t)){eu.add(t);let i=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` does not resolve${i} \u2014 \`${o.name}\` is not in the palette. Dropped rather than emitted as a raw value, which is invalid CSS the browser discards silently. Define it in designSystem/color.js or use a palette token.`)}return}let s=x(e)?e.toLowerCase():"";if(!f0.has(s)||!a0(r))return t;if(!eu.has(s)){eu.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.`)}},u0=(t,e,r)=>{let n=e!==void 0?e:1;if(!r)return`rgb(from ${t} r g b / ${n})`;if(r.charCodeAt(0)===43||r.charCodeAt(0)===45){let s=parseFloat(r),i=s<0?"-":"+",a=Math.abs(s);return`rgb(from ${t} calc(r ${i} ${a}) calc(g ${i} ${a}) calc(b ${i} ${a}) / ${n})`}return`hsl(from ${t} h s ${r}% / ${n})`},tt=(t,e,r)=>{let n=r||A();if(!x(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(wt(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(P(t))[o,s,i]=t;else{let u=Vt(t);if(!u){let{color:d,gradient:g}=n,h=g[t]||d[t];return h?(e&&h[e]&&(h=h[e]),n.useVariable?`var(${h.var})`:h.value):ay(t,t,n)}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=n,l=a[o]||c[o];if(!l)return ay(t,o,n);if(e)if(l[e]!==void 0)l=l[e];else if(P(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&n.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 n.verbose&&console.warn(t," - does not have ",e);if(x(l)){if(ve.has(o))return l;ve.add(o);try{return tt(l,null,r)}finally{ve.delete(o)}}let f=l.rgb;if(!f){let u=n.useVariable?`var(${l.var})`:l.value;return(s||i)&&u?u0(u,s,i):u}return i&&!l[i]&&(f=rr(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})`:n.useVariable?`var(${l.var})`:l.value!==void 0?l.value:`rgb(${f})`},l0=t=>{let e=xe(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}},bP=(t,e)=>{if(!e)return t;let r=t.rgb;if(e.tone){let o=rr(r,e.tone);r=x(o)?o.split(",").map(s=>parseFloat(s.trim())):o}let n=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:r,alpha:n}},Gn=(t,e,r)=>{let n=e||A();if(!x(t))return null;let o=Vt(t);if(o){if(o.passthrough){let d=xe(o.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(o.cssVar)return null}let s=o?o.name:t,{color:i,gradient:a}=n,c=i[s]||a[s];if(!c)return l0(t);if(x(c)){let d;if(ve.has(s))d=l0(c);else{ve.add(s);try{d=Gn(c,n,r)}finally{ve.delete(s)}}return d?bP(d,o):null}if(c.rgb===void 0&&v(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;o&&o.tone&&(l=rr(l,o.tone));let f=x(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=o&&o.alpha!==void 0?parseFloat(o.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},d0=t=>v(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0),p0=t=>{if(!v(t)||t.value!==void 0)return null;let e=[];for(let r in t)if(r!=="var"){if(r.charCodeAt(0)!==64||!d0(t[r]))return null;e.push(r.slice(1))}return e.length?e:null},_P=t=>x(t&&t.var)&&p0(t)!==null,wP=(t,e,r,n,o)=>{let s=p0(e);if(!s)return;if(x(e.var)){let c=`var(${e.var})`;return r||n?u0(c,r,n):c}if(s.length!==2||!s.includes("light")||!s.includes("dark"))return;let i=tt(t,"@light",o),a=tt(t,"@dark",o);if(!(!Yr(i)||!Yr(a)))return i===a?i:`light-dark(${i}, ${a})`},It=(t,e,r)=>{let n=r||A();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!x(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(wt(t))return`var(${t})`;let o,s,i;if(P(t))o=t[0];else{let u=Vt(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}else o=t}let{color:a,gradient:c}=n,l=a[o]||c[o],f=v(l);if(f&&l.value)return tt(t,`@${e}`,r);if(f){if(n.useVariable&&l.var)return s||i?tt(t,null,r):`var(${l.var})`;if(e){if(!n.useVariable&&a[o]===l){let u=wP(t,l,s,i,r);if(u!==void 0)return u}return tt(t,`@${e}`,r)}else{let u={},d=Zr(n);for(let g in l){if(g.charCodeAt(0)!==64)continue;let h=g.slice(1),p=tt(t,g,r);if(p!==void 0&&(u[`[data-theme="${h}"] &`]=p,h==="light"||h==="dark")){let m=Xr(h,n);if(!m)continue;u[m]={[d]:p}}}return u}}else return ay(t,o,n)},Jr=(t,e,r,n)=>{let s=`--${n.varPrefix?n.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){n.cssVars[s]=i,n.cssMediaVars||(n.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(n.cssMediaVars[l]||(n.cssMediaVars[l]={}),n.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;n.cssMediaVars[f]||(n.cssMediaVars[f]={}),n.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},Gr=(t,e,r)=>{let n=A();if(d0(t))return n.useVariable&&t.var&&(n.cssVars[t.var]=t.value),t;if(!n.useVariable&&_P(t))return t;if(x(t)&&wt(t)){let p=t.slice(2);if(t=tt(p),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=p.split(" "),y=n.color[m[0]];if(y&&!y.value&&!y.rgb&&(x(y)||P(y)||v(y))&&!ve.has(m[0])){ve.add(m[0]);try{n.color[m[0]]=Gr(y,m[0])}finally{ve.delete(m[0])}y=n.color[m[0]]}if(y&&y.value){let w=y.rgb,b=m[1]!==void 0?m[1]:"1",_=m[2];_&&(w=rr(w,_)),t=`rgba(${w}, ${b})`}else{let w=m[2],b=m[1]!==void 0?m[1]:"1";if(w)try{let _=xe(m[0]);_&&_.length>=3?t=`rgba(${rr(_.slice(0,3).join(", "),w)}, ${b})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(P(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),v(t)){let p={};for(let m in t)m!=="var"&&(p[m]=Gr(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return n.useVariable&&Jr(p,"color",e,n),p}let s=`--${n.varPrefix?n.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(x(i)&&!i.includes("(")&&!i.startsWith("#")){let p=Vt(i);if(p&&p.name&&!p.passthrough&&!p.cssVar){let m=n.color[p.name];if(m&&!m.value&&!m.rgb&&(x(m)||P(m)||v(m))&&!ve.has(p.name)){ve.add(p.name);try{n.color[p.name]=Gr(m,p.name)}finally{ve.delete(p.name)}}let y=n.color[p.name];if(y&&y.rgb){let w=y.rgb;p.tone&&(w=rr(w,p.tone));let b=p.alpha!==void 0?parseFloat(p.alpha):y.alpha!==void 0?y.alpha:1;i=`rgba(${w}, ${b})`}}}let a=xe(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),g=`${c}, ${l}, ${f}`,h=`rgba(${g}, ${d})`;return n.useVariable&&(n.cssVars[s]=h),{var:s,rgb:g,alpha:d,value:h}},is=(t,e,r)=>{let n=A();if(v(t)&&t.value!==void 0&&t.var!==void 0)return n.useVariable&&(n.cssVars[t.var]=t.value),t;if(x(t)&&wt(t)&&(t=tt(t.slice(2))),P(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),v(t)){let i={};for(let a in t)a!=="var"&&(i[a]=is(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return n.useVariable&&Jr(i,"gradient",e,n),i}let s=`--${n.varPrefix?n.varPrefix+"-":""}gradient-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[s]=t.value||t),{var:s,value:t.value||t}};L();var nu=(t,e,r={},n)=>{let o=n||A(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=r,f=i?3:s,u=a||(o.globalTheme&&o.globalTheme!=="auto"?o.globalTheme:"light"),d=x(e)?e:String(e),g=Vt(t),h=g&&!g.passthrough&&!g.cssVar?g.name:null,p=(D,X)=>c?{value:D,...X}:D;if(h){let D=o.color[`${h}Safe`];if(D){let X=`${d}@${u}`,st=D[X]!==void 0?D[X]:D[d];if(st!==void 0){let Pe=st&&st.rgb!==void 0?o.useVariable&&st.var?`var(${st.var})`:st.value:tt(st,null,o);return p(Pe,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=tt(t,u?`@${u}`:null,o),y=Gn(t,o,u),w=Gn(e,o,u);if(!y||!w)return o.verbose&&console.warn("getSafeInk: could not resolve",t,e,"\u2014 returning hue unchanged"),p(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let b=Un(w.rgb,w.alpha),_=Un(y.rgb,y.alpha,b),S=Qo(_,b);if(S>=f-.02)return p(m,{ratio:S,deviation:0,derived:!1,overridden:!1});let[k,E,T]=Pa(y.rgb),[,I,O]=Da([k,E,T]),F=Bn(b)>.5,z=F?k:1-k,Q=D=>{let X=F?k-D:k+D,st=Math.max(0,Math.min(1,X));return{rgb:La(st,I,O),L:st}},Mt=D=>{let{rgb:X}=Q(D),st=Un(X.map(Pe=>Math.round(Pe)),y.alpha,b);return Qo(st,b)},yt=0,N=z,q=Mt(N)>=f;if(q)for(let D=0;D<l;D++){let X=(yt+N)/2;Mt(X)>=f?N=X:yt=X}else yt=N;let{rgb:bt,L:kt}=Q(N),Rt=bt.map(D=>Math.round(D)),G=Mt(N),j=y.alpha<1?`rgba(${Rt.join(", ")}, ${y.alpha})`:`rgb(${Rt.join(", ")})`,et=Math.abs(kt-k)*100;return p(j,{rgb:Rt,ratio:G,startRatio:S,deviation:et,derived:!0,overridden:!1,reachable:q})},cy=(t,e,r={},n)=>nu(t,e,{...r,meta:!0},n);L();L();var SP=t=>{let r=A().spacing||{},n=parseFloat(t.spacingRatio),o={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return te(o),o},xP=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;_t(r,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),te(r),qr(t,e)}},Ya=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n},Xa=()=>{let t=A(),{spacing:e}=t;te(e),wr(e),xP(e)},kP=t=>{let e=A(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:te(t)},Et=(t,e="padding",r,n)=>{let o=kP(r);if(x(t)){if(!n&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!n&&t.includes("(")){let i=_r(t);n=i[0],t=i[1]}}let s=n?[t]:x(t)&&t.includes("(")?ht(t):jn(t);if(P(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)=>or(s[f],e+l+i,o,n);return a[s.length].map((l,f)=>c(l,f))}return or(t,e,o,n)}},Ce=(t,e,r,n)=>{let o=A(),{spacing:s}=o,i=r||t[e];if(!n&&x(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!n&&x(i)&&i.includes("(")){let a=_r(i);n=a[0],i=a[1]}if(t.spacingRatio){let a=SP(t);return Et(i,e,a,n)}return Et(i,e,s,n)},Za=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),o=Co.some(i=>t.includes(i));return n||o?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(" ")};L();var Yn=(t,e,r)=>!x(t)||fe.test(t)?t:yr(t).map(n=>(n=n.trim(),n.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(o.startsWith("--"))return`var(${o})`;let s=Kn(()=>tt(o,e));if(Fe(s))return s;if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em"||o==="inset"||o==="none"||Vn.has(o.toLowerCase()))return o;r&&r(o);let i=Et(o,"shadow");return i&&i.shadow?i.shadow:o}).join(" "))).join(", "),Qr=(t,e,r,n)=>{let o=A();if(v(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(P(t)){let a={"@light":Qr(t[0],e,"light"),"@dark":Qr(t[1],e,"dark")};return o.useVariable&&Jr(a,"shadow",e,o),a}if(v(t)){let a={};for(let c in t)a[c]=Qr(t[c],e,c.startsWith("@")?c.slice(1):c);return o.useVariable&&Jr(a,"shadow",e,o),a}x(t)&&!fe.test(t)&&(t=Yn(t));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},Ja=(t,e)=>{let r=A();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!x(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(wt(t))return`var(${t})`;let[n]=P(t)?t:t.split(" "),s=r.shadow[n],i=v(s);if(!s)return r.verbose&&console.warn("Can't find color ",n),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={},c=Zr(r);for(let l in s){if(l.charCodeAt(0)!==64)continue;let f=l.slice(1),u=s[l],d=u&&(u.value!==void 0?u.value:u);if(d!==void 0&&(a[`[data-theme="${f}"] &`]=d,f==="light"||f==="dark")){let g=Xr(f,r);if(!g)continue;a[g]={[c]:d}}}return a}return r.verbose&&console.warn("Can't find color",t),t};var vP=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),CP=t=>vP.has(t),pe=(t,e,r)=>{if(t==null)return;let n=t+"";if(fe.test(n))return n;let o=n.trim();return o==="none"||o==="0"||o==="initial"||o==="inherit"||o==="unset"?n:n.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(wt(s))return`var(${s})`;if(CP(s)||/^\d/.test(s)||s==="0")return s;let i=Kn(()=>tt(s,e));if(Fe(i))return i;if(Vn.has(s.toLowerCase()))return s;r&&r(s);let a=Et(s,"border");return a&&a.border?a.border:s}).join(" ")};L();var EP=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"]),h0=["color","Color","background","Background","fill","Fill","stroke","Stroke"],b0=t=>{for(let e=0;e<h0.length;e++)if(t.includes(h0[e]))return!0;return!1},AP={boxShadow:Yn,textShadow:Yn,border:pe,borderTop:pe,borderRight:pe,borderBottom:pe,borderLeft:pe,outline:pe,columnRule:pe},TP=t=>{if(!t)return!1;let e=Vt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},g0=new Set,OP=(t,e,r,n,o,s)=>{if(!mt())return;let i=`${t}::${e}::${r||""}::${n}`;g0.has(i)||(g0.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(r?` (${r})`:"")+` did not fully resolve: "${n}" -> "${o}" still contains the unresolved token "${s}". This is not valid CSS \u2014 the browser will drop the whole declaration. Register "${s}" as a design-system color token or fix the typo.`))},uy=(t,e,r,n)=>{let o=AP[e];if(!o)return tt(r,n);let s=null,i=o(r,n,a=>{!s&&TP(a)&&(s=a)});return s&&OP(t,e,n,r,i,s),i},dy=(t,e)=>Ee(t,e),RP=t=>v(t)&&B(t.value),PP=t=>{for(let e in t){let r=t[e];if(x(r)&&r.startsWith("var(--"))return!0}return!1},tc=(t,e)=>{let r=A();return RP(t)?!r.useVariable&&PP(t)?t:as(t.value,e):as(t,e)},_0=(t,e)=>{let r=new Set;for(let n of e){let o=n.slice(0,1);if(!(o==="@"||o==="."||o===":")&&b0(n))for(let s in t){if(r.has(s))continue;let i=t[s]?.[n];if(i===void 0)continue;let a=tt(i,`@${s}`);a!==void 0&&x(a)&&/^[a-z][a-zA-Z]+$/.test(a)&&!EP.has(a)&&r.add(s)}}return r},DP=t=>t.startsWith("[data-theme=")||t.startsWith("@media"),Qa=(t,e)=>{for(let r in e){let n=e[r];v(n)?Qa(t[r]||(t[r]={}),n):t[r]=n}return t},m0=(t,e,r,n)=>{if(Qa(t,{[`[data-theme="${e}"] &`]:r}),e!=="light"&&e!=="dark")return;let o=Xr(e,n);o&&Qa(t,{[o]:{[Zr(n)]:r}})},w0=(t,e,r,n)=>{let o=r.globalTheme!==void 0?r.globalTheme:"auto",s=o&&o!=="auto"?String(o).replace(/^'|'$/g,""):null,i=new Set(n?Object.keys(n):[]);for(let l in t)if(t[l])for(let f of Object.keys(t[l]))i.add(f);let a=_0(t,i),c={};for(let l of i){let f=l.slice(0,1);if(f==="@")continue;if(f==="."||f===":"){let y={};for(let _ in t)B(t[_]?.[l])&&(y[_]=t[_][l]);let w=n&&B(n[l])?n[l]:void 0;if(!Object.keys(y).length&&!w)continue;let b=f==="."?l.slice(1):l.replace(/^:+/,"");c[l]=w0(y,`${e}-${b}`,r,w);continue}let u=n&&!B(n[l])?n[l]:void 0,d=new Set(Object.keys(t));u!==void 0&&(d.add("light"),d.add("dark"),s&&d.add(s));let g={},h;for(let y of d){if(a.has(y))continue;let w=t[y]?.[l];if((w===void 0||B(w))&&(w=u),w===void 0)continue;let b=uy(e,l,w,`@${y}`);b!==void 0&&(g[y]=b,(s&&y===s||!s&&(y==="light"||h===void 0))&&(h=b))}let p={},m=Object.keys(g).filter(y=>g[y]!==h);if(m.length){let y=g.light!==void 0?g.light:h,w=g.dark!==void 0?g.dark:h;if(b0(l)&&Yr(y)&&Yr(w)){p[l]=y===w?y:`light-dark(${y}, ${w})`;for(let b in g)b==="light"||b==="dark"||m0(p,b,{[l]:g[b]},r)}else{h!==void 0&&(p[l]=h);for(let b of m)m0(p,b,{[l]:g[b]},r)}}else{if(h===void 0)continue;p[l]=h}Qa(c,p),c[`.${l}`]=p}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},ly=(t,e,r,n)=>{let{cssVars:o}=r;r.cssMediaVars||(r.cssMediaVars={});let s=r.cssMediaVars,i=r.globalTheme!==void 0?r.globalTheme:"auto",a=i&&i!=="auto"?String(i).replace(/^'|'$/g,""):null,c={},l=new Set(n?Object.keys(n):[]);for(let u in t)if(t[u])for(let d of Object.keys(t[u]))l.add(d);let f=_0(t,l);for(let u of l){let d=u.slice(0,1),g=B(n?.[u])||Object.values(t).some(h=>B(h?.[u]));if(d==="."&&g){let h=u.slice(1),p={};for(let y in t)B(t[y]?.[u])&&(p[y]=t[y][u]);let m=B(n?.[u])?n[u]:void 0;c[u]=ly(p,`${e}-${h}`,r,m)}else if(d===":"&&g){let h=u.replace(/^:+/,""),p={};for(let y in t)B(t[y]?.[u])&&(p[y]=t[y][u]);let m=B(n?.[u])?n[u]:void 0;c[u]=ly(p,`${e}-${h}`,r,m)}else if(d!=="@"&&d!=="."&&d!==":"){let p=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${u}`,m=n&&!B(n[u])?n[u]:void 0,y=new Set(Object.keys(t));m!==void 0&&(y.add("light"),y.add("dark"),a&&y.add(a));let w,b=!1;for(let _ of y){if(f.has(_))continue;let S=t[_]?.[u];if((S===void 0||B(S))&&(S=m),S===void 0)continue;let k=uy(e,u,S,`@${_}`);if(k===void 0)continue;b=!0,(a&&_===a||!a&&(_==="light"||w===void 0))&&(w=k);let E=`[data-theme="${_}"]`;if(s[E]||(s[E]={}),s[E][p]=k,_==="dark"||_==="light"){let T=`@media (prefers-color-scheme: ${_})`;s[T]||(s[T]={}),s[T][p]=k}}if(w!==void 0&&(o[p]=w),!b)continue;c[u]=`var(${p})`,c[`.${u}`]={[u]:c[u]}}}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},as=(t,e,r,n)=>{let o=A(),{cssVars:s}=o,i={value:t},a=!r&&!n,c,l;if(B(t)){if(a&&o.useVariable){let f={},u={};for(let d in t)d.startsWith("@")?B(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];(Object.keys(f).length||Object.keys(u).length)&&(l=ly(f,e,o,u),Object.assign(i,l))}else if(a){let f={},u={};for(let d in t)d.startsWith("@")?B(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];c=w0(f,e,o,u),Object.assign(i,c)}for(let f in t){let u=f.slice(0,1),d=t[f];if(u==="@"||u===":"||u==="."){let g=u==="@"&&f;i[f]=as(d,e,f,n||g)}else if(!a){let g=uy(e,f,d,n),h=[...new Set([n,r].filter(w=>w).map(w=>w.slice(1)))],p=h.length?"-"+h.join("-"):"",y=`--${o.varPrefix?o.varPrefix+"-":""}theme-${e}${p}-${f}`;o.useVariable?(o.useThemeSuffixedVars&&(s[y]=g),i[f]=`var(${y})`):i[f]=g,i[`.${f}`]={[f]:i[f]}}}if(c)for(let f in c){let u=f.slice(0,1);(u==="."||u===":")&&B(t[f])&&(i[f]=c[f])}if(l)for(let f in l){let u=f.slice(0,1);(u==="."||u===":")&&B(t[f])&&(i[f]=l[f])}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(x(t)&&wt(t)){let u=o.theme[t.slice(2)];return Ee(u,n)}return i},fy=(t,e)=>{let r={};for(let n in t){let o=n.slice(0,1);if(B(t[n]))if(e&&DP(n))r[n]=Qa({},t[n]);else{if(o==="@")continue;o===":"?r[`&${n}`]=fy(t[n],e):o==="."&&(r[`&${n}`]=fy(t[n],e))}else r[n]=t[n]}return r},S0=(t,e)=>{let r=e.shift();return t[r]?S0(t[r],e):t},y0=(t,e)=>P(e)?S0(t,e):x(e)&&t[e]?t[e]:t;var Ee=(t,e)=>{let r=A();if(x(t)&&wt(t)&&(t=Ee(t.slice(2))),!t||!x(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[n,...o]=P(t)?t:t.split(" "),s=r.theme[n];return s&&o.length?s=y0(s,o):s&&e&&(s=y0(s,e)),fy(s,!r.useVariable)};L();L();var ec=(t,e)=>{let r=A(),n=`--font-${e}`;if(!t||P(t)&&!t[0])return;let o;if(t.isVariable){let s=ke(t.url,r.files)||t.url;ts(s)?o=es(s):o=Wr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap",unicodeRange:t.unicodeRange})}else if(t[0])o=Hn(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>ke(i,r.files)||i):ke(t.url,r.files)||t.url;o=Wr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch,unicodeRange:t.unicodeRange})}return{var:n,value:t,fontFace:o}},rc=(t,e)=>{let r=A(),{fontFamily:n}=r;return zn(e||n,t)},cs=(t,e)=>{let r=A(),{fontFamily:n,fontFamilyTypes:o}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!n.default)&&(n.default=e),v(s)&&(s=jn(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${o[i]}`;return{var:a,value:c,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};L();var ou=t=>{let e=A(),{typography:r,media:n}=e;for(let o in t){let s=o.slice(0,1)==="@",i=t[o];if(!s)continue;let{mediaRegenerate:a}=t,c=o.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:g,h1Matches:h,unit:p}=t;_t(i,{type:l,base:f,ratio:u,range:d,subSequence:g,h1Matches:h,unit:p});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),y=i.unit||p,w=!i.unit&&m.has(p)?"rem":y,b=n[c],_="@media "+(b==="print"?`${b}`:`screen and ${b}`);if(r.templates[_]={fontSize:i.base/r.browserDefault+w},!a){_t(i,{sequence:{},scales:{},vars:{}}),te(i),qr(t,o);continue}_t(i,{sequence:{},scales:{},templates:{},vars:{}}),te(i),qr(t,o)}},su=t=>{let e=A();if(t.h1Matches){let r=t.unit,n=Wa(t),{templates:o}=t;for(let s in n){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:e.useVariable?`var(${n[s]?.variable})`:`${n[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}}}},nc=()=>{let t=A(),{typography:e}=t;te(e),su(e),wr(e),ou(e)},oc=t=>{let e=A(),{typography:r}=e;return or(t,"fontSize",r)};L();var sc=t=>{if(!x(t))return;let r=A().shape;if(r)return r[t]!==void 0?r[t]:r[t.toLowerCase()]};L();var ic=()=>{let t=A(),{timing:e}=t;te(e),wr(e)},Ae=t=>{let e=A(),{timing:r}=e;return r[t]||r[Aa(t)]||t},he=(t,e="timing")=>{let r=A(),{timing:n}=r;return or(t,e,n)};L();var ac=()=>{let t=A(),{fontFamily:e,theme:r,typography:n}=t,o=t.document;return pr(o)?(Ir(t,"document",o),o=t.document={}):o||(o=t.document={}),_t(o,{theme:r.document,fontFamily:zn(e),fontSize:n.base,lineHeight:n.lineHeight})};L();var gy={document:nt},x0=new WeakMap,k0=new WeakMap,LP=128,v0=1048576,py=8192,my=t=>t.nodeType===1&&t.localName==="symbol"&&t.getAttribute("id"),A0=t=>t.nodeType===8||t.nodeType===3&&!t.textContent.trim(),IP=(t,e)=>{let r=1,n=t.ownerDocument;if(n&&typeof n.createTreeWalker=="function"){let s=n.createTreeWalker(t,4294967295);for(;s.nextNode();)if(++r>e)return r;return r}let o=[t];for(;o.length;){let s=o.pop().childNodes||[];for(let i=0;i<s.length;i++){if(++r>e)return r;o.push(s[i])}}return r},hy=(t,e)=>{if(typeof t.importNode=="function")return t.importNode(e,!0);let r=e.cloneNode(!0);return typeof t.adoptNode=="function"?t.adoptNode(r):r},$P=(t,e)=>{if(typeof t.prepend=="function")return t.prepend(e);let r=t.firstChild!==void 0?t.firstChild:t.childNodes&&t.childNodes[0];return typeof t.insertBefore=="function"?t.insertBefore(e,r||null):t.appendChild(e)},ls=(t,e)=>{let r=A();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?Ga(e,t):t},cc=(t,e=gy)=>{let r=A(),n=Object.keys(t).length?{}:r.svg;for(let o in t)n[o]=t[o];O0(n,e)},Xn=(t,e)=>{let r=A();return r.useIconSprite&&!r.semanticIcons?.[e]?ls(t,e):t},Zn=(t,e=gy)=>{let r=A(),n=Object.keys(t).length?{}:r.icons;for(let o in t)n[o]=t[o];O0(n,e)},T0=(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},MP=(t,e)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let n=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new r().parseFromString(n,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},FP=(t,e,r)=>{let n=String(r),o=k0.get(e),s=o?.entries.get(n);if(s)return o.entries.delete(n),o.entries.set(n,s),s.root;let i=MP(t,n);if(i||(i=T0(t,{isRoot:!1}),i.innerHTML=n),n.length>v0)return i;let a=IP(i,py);if(a>py)return i;for(o||(o={entries:new Map,units:0,nodes:0},k0.set(e,o));o.entries.size>=LP||o.units+n.length>v0||o.nodes+a>py;){let c=o.entries.keys().next().value,l=o.entries.get(c);o.units-=c.length,o.nodes-=l.nodes,o.entries.delete(c)}return o.entries.set(n,{root:i,nodes:a}),o.units+=n.length,o.nodes+=a,i},C0=t=>{let e=new Map;for(let r of t.children){let n=my(r);if(!n)continue;let o=e.get(n)||[];o.push(r),e.set(n,o)}return e},NP=t=>t.replace(/["\\\u0000-\u001f\u007f]/g,e=>`\\${e.charCodeAt(0).toString(16)} `),E0=(t,e,r,n)=>{let o=0,s=e.childElementCount>8?C0(r):null,i=a=>{if(!s)try{return[...r.querySelectorAll(`symbol[id="${NP(a)}"]`)].filter(c=>c.parentNode===r)}catch{s=C0(r)}return s.get(a)};for(let a of e.childNodes){if(A0(a))continue;let c=my(a);if(!c&&n){let u=o++,d=n.nodes[u];if(!d&&n.complete||d?.parentNode===r)continue;let g=hy(t,d||a);r.appendChild(g),n.nodes[u]=g;continue}let l=c&&i(c),f=l&&l[0];if(!f)f=hy(t,a),r.appendChild(f);else if(!f.isEqualNode(a)){let u=hy(t,a);r.replaceChild(u,f),f=u}if(l)for(let u=1;u<l.length;u++)l[u].remove();c&&s&&s.set(c,[f])}},O0=(t,e=gy)=>{let r=A(),n=e.document||nt;if(!n||!n.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),Ka(t);let o=n.querySelector("#svgSprite"),s="";for(let d in t)s+=t[d];let i=o||T0(n);if(!i||!i.nodeType)return;let a=d=>FP(n,i,d),c=a(s),l=x0.get(i);l||x0.set(i,l=new WeakMap);let f=l.get(r);if(f||l.set(r,f=new Map),[...c.childNodes].some(d=>!A0(d)&&!my(d))){let d=[];for(let g in t)d.push(g);for(let g of d){let h=f.get(g);h||f.set(g,h={nodes:[],complete:!1}),E0(n,d.length===1?c:a(t[g]),i,h),h.complete=!0}}else{E0(n,c,i);for(let d in t)f.has(d)||f.set(d,{nodes:[],complete:!0})}o||$P(n.body,i);for(let d in t)r.__svgCache[d]=!0};L();var lc=(t={})=>{let e=A(),r=e.typography||{},n=e.document||{},o=v(e.reset)?e.reset:e.reset={};if(o[":root"]){let c=o,l=r.templates||{};c.body={...e.useDocumentTheme?Ee("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?Ee("document"):{};if(o.html&&Ht(o.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)&&(o[c]||(o[c]={}),o[c].html||(o[c].html={}),o[c].html.fontSize===void 0&&(o[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,g=f.browserDefault||r.browserDefault,h=l.slice(1),p=c[h];if(!p)continue;let m="@media "+(p==="print"?p:"screen and "+p);o[m]||(o[m]={}),o[m].html||(o[m].html={}),o[m].html.fontSize=d/g+u}}return it(_t(o,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",textSizeAdjust:"100%",WebkitTextSizeAdjust:"100%",...a,fontSize:r.unit?r.base/r.browserDefault+r.unit:r.browserDefault+"px",fontFamily:n.fontFamily,lineHeight:n.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:n.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}},de)};L();var jP=new Set(["fallback"]),yy=new Set,R0=(t,e)=>{yy.has(t)||(yy.add(t),mt()&&console.warn(e))},by=()=>{yy.clear()},P0=t=>{for(let e in t)delete t[e];return t},fc=()=>{let t=A(),e=v(t.cssSkinVars)?P0(t.cssSkinVars):t.cssSkinVars={},r=v(t.cssSkinFallback)?P0(t.cssSkinFallback):t.cssSkinFallback={},n=t.skins;if(!v(n))return e;let o=t.varPrefix?t.varPrefix+"-":"",s=t.color||{},i=t.cssVars||{},a=c=>x(c)&&Object.prototype.hasOwnProperty.call(s,c)?`var(--${o}color-${c})`:c;for(let c in n){let l=n[c];if(!v(l))continue;let f={};for(let u in l){if(jP.has(u))continue;let d=l[u];if(v(d))for(let g in d){let h=`--${o}theme-${u}-${g}`;t.useVariable!==!1&&!(h in i)&&R0(`${c}/${u}/${g}`,`[scratch] skin "${c}" rewrites theme "${u}" param "${g}", which the theme does not declare \u2014 no element reads ${h}, so the skin changes nothing there. Declare "${g}" on the "${u}" theme (its no-skin value).`),f[h]=a(d[g])}}e[c]=f,x(l.fallback)&&(r[c]=l.fallback)}for(let c in r){let l=r[c];e[l]||(R0(`${c}/fallback/${l}`,`[scratch] skin "${c}" falls back to "${l}", which is not a declared skin \u2014 the reduced-transparency fallback is skipped.`),delete r[c])}return e},D0=(t,e)=>{let r=`[data-skin="${t}"]`;return!e||e===":root"?`:root${r}, ${r}`:`${e}${r}, ${r} ${e}, ${e} ${r}`},Jn=(t,e,r)=>{let n={};if(!v(t))return n;for(let s in t)n[D0(s,r)]=t[s];let o={};for(let s in e||{}){let i=t[e[s]];i&&(o[D0(s,r)]=i)}return Object.keys(o).length&&(n["@media (prefers-reduced-transparency: reduce)"]=o),n};L();var BP=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),L0=/^-?[A-Z][0-9]?$/,sr=t=>pe(t),iu=t=>{if(x(t))return fe.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(wt(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=tt(e);return Fe(r)?r:e}).join(" ")},au=(t,e)=>Ja(t,e),uc=(t,e)=>{if(x(t))return fe.test(t)?t:yr(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(wt(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let o=tt(n);if(Fe(o)){let i=It(n,e);return v(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em")return n;let s=Et(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", ")},dc=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let n=t.slice(0,r+1),o=t.slice(r+1,t.lastIndexOf(")")),s=")",a=yr(o).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||BP.has(f)||f==="transparent"||fe.test(f))return f;let u=tt(f);return Fe(u)?u:f}).join(" ")));return n+a.join(", ")+s},cu=(t,e)=>{if(!x(t))return;let r=A();return yr(t).map(n=>{let o=n.trim();if(wt(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(r.gradient?.[o]){let s=It(o,e);if(x(s))return s;if(v(s)){for(let i in s)if(x(s[i]))return s[i]}return o}return o.includes("gradient")?dc(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!Vt(o)?`url(${o})`:o}).join(", ")},lu=t=>x(t)&&ht(t).map(e=>Et(e,"gap").gap).join(" "),fu=t=>{if(!x(t))return t;let e=A();return ht(t).map(r=>L0.test(r)?qn(r,e.spacing):r).join(" ")},_y=t=>{if(!x(t))return;let e=t.split(" ");return e.length?e.map(r=>wt(r)?`var(${r})`:r.length<3||r.includes("ms")?he(r).timing||r:Ae(r)?Ae(r):r).join(" "):t},pc=(t,e,r)=>{if(x(t))return t.split(",").map(n=>he(n).timing||n).join(",")},uu=t=>{if(!x(t))return;let e=t.split(",");if(e.length)return e.map(_y).join(",")};function Ct(t,e,r={},n={}){let o=pt.call(this,e||r[t]);if(o==null)return;let s;if(x(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[t]:o};if(o.includes("(")){let c=_r(o);s=c[0],o=c[1]}let i=r.scaleBoxSize,a=Ya(t);!i&&a&&!n.ratio&&(o=Za(o))}return n.ratio?Ce(r,t,o,s):Et(o,t,void 0,s)}var $=(t,e=null,r)=>Ct(t,e,r,{ratio:!0}),VP=(t,e,r)=>x(t)?ht(t).map(n=>L0.test(n)?Ce(e,r,n)[r]:n).join(" "):t,Sr=(t,e,r,n="borderRadius")=>{if(x(t))return{[n]:ht(t).map(o=>{let s=sc(o);return s!==void 0?VP(s,e,r):Ce(e,r,o)[r]}).join(" ")}};L();var us="__smblsThemeRootOwner",ds=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)},I0=(t,e,r)=>{if(!(!t||!e)){ds(t),t.__prefersListener=r,t.__prefersMq=e;try{e.addEventListener("change",r)}catch{e.addListener(r)}}},UP=(t,e)=>{let r=A(),{cssVars:n}=r,o=e.startsWith("--")?e:`--${e}`;return n[o]=t,t},qt=t=>t,du={color:Gr,gradient:is,font:ec,fontFamily:cs,fontfamily:cs,theme:tc,icons:Xn,semanticIcons:qt,semanticicons:qt,svg:ls,svgData:qt,typography:qt,shadow:Qr,spacing:qt,media:qt,grid:qt,class:qt,timing:qt,reset:qt,unit:qt,animation:qt,vars:UP,sizes:qt,shape:qt,skins:qt},zP=(t,e,r,n)=>{Ir(t,r,e);let o={};for(let s of n)t[s]===e&&(t[s]=o);return t.verbose&&console.warn("[scratch] design-system family",r,"resolved to a host object; parked it and allocated a plain bucket"),o},wy=(t,e,r)=>{let n=A(),o=Na(t),s=o.toLowerCase(),i=n[o]||n[s]||n[t],a=pr(i)?zP(n,i,s,[o,s,t]):i,c=du[o]||du[s];if(c)try{let l=c(e,r);return a&&(a[r]=l),a}catch(l){n.verbose&&console.warn("Error setting",s,"value",e,r,l)}if(!c){let l=a||(n[s]={});return l[r]=e,l}n.verbose&&console.warn("Can not find",s,"method in scratch")},Sy=(t,e)=>{let r=A(),n=t.toLowerCase();return pr(e)?(Ir(r,n,e),r.verbose&&console.warn("[scratch] ignoring host object passed as the",n,"design-system family"),r[n]||r[t]):e==null?(r.verbose&&console.warn("[scratch] skipping empty design-system family",n),r[n]||r[t]):(Object.keys(e).sort((s,i)=>{let a=v(e[s])||P(e[s])?1:0,c=v(e[i])||P(e[i])?1:0;return a-c}).forEach(s=>{try{return wy(n,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",n,"value",e[s],s,i)}}),r[n]||r[t])},pu=(t,e)=>{let r=e||A();r.globalTheme=t;let o=vo(r)||(typeof document<"u"?document:null),s=o&&o.defaultView||(typeof window<"u"?window:null);if(o){let a=r.themeRoot||o.documentElement,c=t&&t!=="auto";if(a[us]=r,c)ds(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",I0(r,f,l)}else ds(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(o&&r.cssVars){let a=r.scopeSelector||":root",c=o.styleSheets;for(let l=0;l<c.length;l++)try{let f=c[l].cssRules;for(let u=0;u<f.length;u++)if(f[u].selectorText===a){for(let d in r.cssVars)f[u].style.setProperty(d,r.cssVars[d]);return r}}catch{}}return r},HP={},Qn=(t,e=HP)=>{let r=e.config||A(),{version:n,verbose:o,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:g,semanticIcons:h,hoverMedia:p,files:m,assets:y,...w}=t;e.newConfig&&(r=Jf(e.newConfig)),dr(w.document)&&(r.__domDocument=w.document,delete w.document),dr(r.document)&&(r.__domDocument||(r.__domDocument=r.document),r.document={}),m!==void 0&&(r.files=m),y!==void 0&&(r.assets=y),o!==void 0&&(r.verbose=o),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),g!==void 0&&(r.useDefaultConfig=g),h!==void 0&&(r.semanticIcons=h),p!==void 0&&(r.hoverMedia=p),r.verbose&&console.log(r);let _=vo(r)||(typeof document<"u"?document:null),S=_&&_.defaultView||(typeof window<"u"?window:null),k=_&&(r.themeRoot||_.documentElement);if(k&&typeof k.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")ds(r),k.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,k[us]=r,r.globalTheme==="dark"||r.globalTheme==="light"?k.style.colorScheme=r.globalTheme:k.style.colorScheme="light dark";else if(k[us]&&k[us]!==r&&k.hasAttribute("data-theme"))ds(r),r.resolvedTheme=k.getAttribute("data-theme");else if(S&&S.matchMedia){let F=Q=>{let Mt=Q.matches?"dark":"light";k.setAttribute("data-theme",Mt),r.resolvedTheme=Mt},z=S.matchMedia("(prefers-color-scheme: dark)");F(z),k.style.colorScheme="light dark",k[us]=r,I0(r,z,F)}else ds(r),k.setAttribute("data-theme","light"),r.resolvedTheme="light",k.style.colorScheme="light",k[us]=r;r.__svgCache||(r.__svgCache={}),ss(w);let E=Object.keys(w).filter(O=>!O.startsWith("__")),T=new Set(E);if(E.forEach(O=>{let F=O.toLowerCase();F!==O&&T.has(F)&&it(w[F],w[O],de)}),E.map(O=>{let F=O.toLowerCase();if(!(F!==O&&T.has(F)))return Sy(O,w[O])}),r.varPrefix&&(r.typography&&(r.typography.varPrefix=r.varPrefix),r.spacing&&(r.spacing.varPrefix=r.varPrefix),r.timing&&(r.timing.varPrefix=r.varPrefix)),w.typography)try{nc()}catch(O){r.verbose&&console.warn("Error applying typography sequence",O)}if(w.spacing)try{Xa()}catch(O){r.verbose&&console.warn("Error applying spacing sequence",O)}if(w.timing)try{ic()}catch(O){r.verbose&&console.warn("Error applying timing sequence",O)}try{fc()}catch(O){r.verbose&&console.warn("Error applying skins",O)}ac();let I=lc();return I&&(r.reset=I),r};var hs=new Map,q0=null,ky=null,WP=null;function gc(t){t.batchAtomicCss&&(ky=t.batchAtomicCss),t.compoundCssClass&&(WP=t.compoundCssClass)}var qP=new Set,M0=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function Ty(t){try{let e=A();e&&(e.__domDocument=t)}catch{}t&&qP.add(t)}function eo(){try{let t=A();if(t){if(M0(t.__domDocument))return t.__domDocument;if(M0(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var ee={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function _u(){return{...ee}}function Oy(){for(let t in ee)ee[t]=0;yu=!1}var yu=!1,mu=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function KP(t){let e=Date.parse(t);if(!isFinite(e))return"";let r=Math.floor((Date.now()-e)/864e5);return r<1?" (today)":` (${mu(r,"day")} ago)`}function GP(){try{let t=o2();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 YP(t,e){if(yu)return!1;yu=!0;let r="n/a \u2014 running from src/ (unbuilt), so no dist is in play",n="this IS the source",o="@symbo.ls/css";return console.error(`[@symbo.ls/css] CSS EMIT FAILURE (${t}) \u2014 the engine emitted ${mu(ee.variable,"variable rule")} and ${mu(ee.atomic,"atomic rule")}, while the design system held ${mu(e,"CSS variable")}.
|
|
43
46
|
The document will render UNSTYLED and nothing else will report an error.
|
|
44
47
|
This is what a STALE dist/ looks like: an obsolete emitter against a current design system.
|
|
45
48
|
package : ${o}
|
|
46
49
|
built : ${r}
|
|
47
50
|
source : ${n}
|
|
48
|
-
emitted : ${JSON.stringify(
|
|
49
|
-
sheets : the style[data-smbls] tiers currently hold ${
|
|
51
|
+
emitted : ${JSON.stringify(ee)}
|
|
52
|
+
sheets : the style[data-smbls] tiers currently hold ${GP()} rule(s)
|
|
50
53
|
FIX : cd smbls && npm run check:stale # every package whose src is newer than its dist
|
|
51
54
|
then rebuild the listed packages and clear the app's .parcel-cache
|
|
52
|
-
Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function
|
|
53
|
-
`);for(let y=0;y<m.length;y++)m[y]&&Ne(m[y],void 0,"atomic")}a.push(p)}else if(s)for(let u=0;u<s.length;u+=2)a.push(x0(s[u],s[u+1],r));let f=[];for(let u=0;u<c.length;u++)f.push(OP(c[u][0],c[u][1],r,o));return a.concat(f).join(" ").trim()}var A0=new Map,EP=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function fc(t){return/^@(media|supports|container)\b/.test(t)}function AP(t){return typeof t!="string"||!t||fc(t)?!1:t.split(",").every(e=>EP.test(e.trim()))}var P0=t=>{let e=Object.prototype.toString.call(t);return e==="[object Object]"||e==="[object Array]"},by=32,_y=1024,xy=!1;function fu(t,e,r){if(xy)return;xy=!0;let n=[e,...r],o=n.length>12?[...n.slice(0,6),`\u2026${n.length-9} more\u2026`,...n.slice(-3)]:n;console.warn(`[@symbo.ls/css] ${t} at ${o.join(" > ")} \u2014 skipped. A style block may hold only CSS values and nested plain blocks; the rest of this rule is still emitted. (One warning per page.)`)}function TP(t){try{return JSON.stringify(t)}catch{let r=[],n=0;return JSON.stringify(t,function(o,s){if(!s||typeof s!="object")return s;for(;r.length&&r[r.length-1]!==this;)r.pop();if(!(r.length&&(r.includes(s)||!P0(s)||r.length>by||++n>_y)))return r.push(s),s})}}function OP(t,e,r,n){let o=TP(e),s=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,i=s&&vy(),a=(r?r+"":"")+t+o+(s&&!i?"rawhover":"")+(n?"state":""),c=us.get(a);if(c){let w=A0.get(c);if(w)for(let S=0;S<w.length;S++)Ne(w[S],void 0,"atomic");return c}c=r?`_${r}_c${pu(a)}`:`_c${pu(a)}`;let l=n?`.${c}.${c}`:`.${c}`,f=AP(t)?`${l}.${c}`:l,u="",d=[],g=w=>typeof w=="string"&&(w.indexOf("{")!==-1||w.indexOf("}")!==-1),p=new Set,h=0,m=(w,S)=>{p.add(S);let E="",T=Object.keys(S);for(let I=0;I<T.length;I++){let O=T[I],F=S[O];if(F!=null)if(typeof F=="object"){let z=[...w,O];p.has(F)?fu("a style value that loops back to one of its own ancestors",t,z):P0(F)?z.length>by?fu(`a style block nested more than ${by} levels deep`,t,z):++h>_y?fu(`a style object with more than ${_y} nested blocks`,t,z):m(z,F):fu(`a ${Object.prototype.toString.call(F).slice(8,-1)} (not a style block)`,t,z)}else{if(g(F))continue;E+=fs(Zn(O),F)}}p.delete(S),E&&(w.length===0?u+=E:d.push({chain:w,body:E}))};m([],e);let y=w=>w.startsWith(":")||w.startsWith("["),x=(w,S=!0)=>{let E=S&&w.length===1?f:l;if(!w.length)return E;let T=w[0].split(",").map(I=>I.trim()).map(I=>I.includes("&")?I.replace(/&/g,E):y(I)?`${E}${I}`:`${E} ${I}`);for(let I=1;I<w.length;I++){let O=w[I].split(",").map(z=>z.trim()),F=[];for(let z of T)for(let Q of O)Q.includes("&")?F.push(Q.replace(/&/g,z)):y(Q)?F.push(z+Q):F.push(z+" "+Q);T=F}return T.join(", ")},b=[],_=(w,S)=>{let E=w.filter(fc),T=x(w.filter(O=>!fc(O)),E.length===0),I=`${T}{${S}}`;for(let O=E.length-1;O>=0;O--)I=`${E[O]}{${I}}`;I=Sr(I,T,i),b.push(I),Ne(I,void 0,"atomic")};u&&_([t],u);for(let w of d)_([t,...w.chain],w.body);return A0.set(c,b),us.set(a,c),c}function wt(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(gu(),typeof t=="string"){let s=t.indexOf("--")!==-1;Ne(t,void 0,s?"variable":"global"),s&&_0(1);return}let e=vy(),r=0,n=Object.keys(t),o=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};n.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?o(i)-o(s):1:-1});for(let s of n){let i=t[s];if(s.startsWith("@keyframes")){let a=yy(i);a&&Ne(`${s}{${a}}`,void 0,"keyframes");continue}if(fc(s))for(let a in i){let c=i[a];if(a.startsWith("@keyframes")){let l=yy(c);l&&Ne(`${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 g=d?u:Zn(u);l+=fs(g,c[u])}r+=f,Ne(Sr(`${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:Zn(a);Ne(`${s}{${fs(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 g=d?f:Zn(f);a+=fs(g,u)}}if(r+=l,a&&Ne(Sr(`${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&&(fc(d)?f.push(d):u.push(d));f.sort((d,g)=>{let p=h=>{let m=h.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return p(g)-p(d)});for(let d of u)wt({[`${s} ${d}`]:i[d]});for(let d of f)wt({[d]:{[s]:i[d]}})}}}r>0&&_0(r)}function ds(t,e){return Ne(`@keyframes ${t}{${yy(e)}}`,void 0,"keyframes"),t}function D0(){us.clear(),T0=null,xy=!1}function Cy(){return us.size}L();var vb={};M(vb,{DELEGATED_EVENTS:()=>ys,LIFECYCLE_EVENTS:()=>en,MIXINS:()=>mu,NON_BUBBLING_EVENTS:()=>yu,REGISTRY:()=>Nt,SVG_TAGS:()=>gs,addDelegatedEvent:()=>dc,addMethods:()=>ks,applyExtends:()=>_s,cacheNode:()=>tn,create:()=>ee,createHTMLNode:()=>hs,detectTag:()=>Qr,dispose:()=>vr,flushMounts:()=>wc,globalEventKeyInfo:()=>bu,isSvgTag:()=>ms,isValidTag:()=>ps,refreshContextProto:()=>Au,registerEvent:()=>bs,registerGlobalEvent:()=>_u,remove:()=>Ss,removeDelegatedEvent:()=>pc,update:()=>xs});var Ay="http://www.w3.org/2000/svg",gs=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"]),RP=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 ps(t){return RP.has(t)||gs.has(t)}function ms(t){return gs.has(t)}function Qr(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"&&ps(e))return e;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),ps(o)&&!n.has(o)?o:"div"}var L0={};function hs(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(ms(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===Ay)return r.createElementNS(Ay,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function tn(t){let e=t.tag=Qr(t),n=ms(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Ay)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=L0[n];if(s||(s=L0[n]=hs(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?hs(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var Nt=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","srcObject","allowRuntimeTemplates","__name","__ref","__hash","__text","parent","node"]),mu={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},en=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"]),yu=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"]),Ty=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),ys=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 Ry=new WeakMap,PP={passive:!0},DP={passive:!0,capture:!0},Py=(t,e)=>Ty.has(t)?e?DP:PP:e||!1;function M0(t){let e=Ry.get(t);return e||(e={handlers:new Map,installed:new Set},Ry.set(t,e)),e}function LP(t,e){let r=M0(e);if(r.installed.has(t))return;r.installed.add(t);let n=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave",o=t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave";e.addEventListener(t,s=>{if(o){let a=s.target,c=r.handlers.get(t),l=c&&a?c.get(a):null;if(!l||s.relatedTarget&&typeof a.contains=="function"&&a.contains(s.relatedTarget))return;l(s);return}let i=s.target;for(;i&&i!==e;){let a=r.handlers.get(t);if(a){let c=a.get(i);if(c&&(c(s),s.cancelBubble))return}i=i.parentNode}},Py(t,n))}function dc(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=M0(n);LP(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function pc(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=Ry.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function I0(t){return ys.has(t)&&!en.has(t)}function F0(t,e){let{context:r}=t,n=r?.designSystem;return o=>{n&&at(n);try{let s=e.call(t,o,t,t.state,r);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{n&&ot()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),r?.strictMode)throw s}n&&ot()}}function bs(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=F0(e,r),i=yu.has(t);if(!i&&I0(t)){let a=o?.rootNode||n.ownerDocument?.documentElement;dc(t,n,s,a)}else n.addEventListener(t,s,Py(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&I0(t)){let a=o?.rootNode||n.ownerDocument?.documentElement;pc(t,n,a)}else n.removeEventListener(t,s,Py(t,!1))})}var Oy=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function bu(t){if(typeof t!="string")return null;for(let e=0;e<Oy.length;e++){let r=Oy[e][0];if(t.length<=r.length||!t.startsWith(r))continue;let n=t.charCodeAt(r.length);if(!(n<65||n>90))return{target:Oy[e][1],eventName:t.slice(r.length).toLowerCase()}}return null}var IP=/^[A-Za-z_$][\w$]*$/;function $P(t,e,r){let n=e,o=!1,s,i=!1,a=null;if(e&&typeof e=="object"&&typeof e!="function"&&(n=e.handler,o=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive),typeof e.query=="string"&&(a=e.query)),typeof n=="string"&&IP.test(n)){let c=n;n=function(f){return t.call(c,f)}}return typeof n!="function"?null:(s===void 0&&(s=Ty.has(r)),{handler:n,capture:o,passive:s,once:i,query:a})}function MP(t,e,r){let n=t.node?.ownerDocument||t.context?.document||(typeof document<"u"?document:null);if(!n||typeof n.addEventListener!="function")return null;if(e==="document")return n;let o=n.defaultView||(typeof window<"u"?window:null);if(!o)return null;if(e==="window")return typeof o.addEventListener=="function"?o:null;if(e==="visualViewport"){let s=o.visualViewport;return s&&typeof s.addEventListener=="function"?s:null}if(e==="mediaQuery"){let s=r&&r.query;if(typeof s!="string"||!s.trim()||typeof o.matchMedia!="function")return null;try{return o.matchMedia(s)||null}catch{return null}}return null}function FP(t,e,r,n){try{return t.addEventListener(e,r,n),!0}catch{return typeof t.addListener=="function"?(t.addListener(r),!0):!1}}function NP(t,e,r,n){try{t.removeEventListener(e,r,n)}catch{typeof t.removeListener=="function"&&t.removeListener(r)}}function jP(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 _u(t,e,r){if(e.__ref){if(Array.isArray(r)){if(t.target!=="mediaQuery")return;for(let o=0;o<r.length;o++)$0(t,e,r[o]);return}$0(t,e,r)}}function $0(t,e,r){let n=e.__ref,o=$P(e,r,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change")return;let s=MP(e,t.target,o);if(!s)return;let i=t.target+":"+(o.query?o.query+":":"")+t.eventName+":"+(o.capture?1:0);if(n.__globalEvents&&n.__globalEvents.has(i))return;let a=F0(e,o.handler),c=f=>{jP(e)&&a(f)},l={capture:o.capture,passive:o.passive,once:o.once};FP(s,t.eventName,c,l)&&(n.__globalEvents||(n.__globalEvents=new Map),n.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:c,options:l}),n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>{NP(s,t.eventName,c,l),n.__globalEvents&&n.__globalEvents.delete(i)}))}function N0(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 _s(t,e,r){let n=N0(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let a=j0(n[i],s);a&&a!==e&&B0(t,a,r,new Set([e]))}}function j0(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(o=>o.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function B0(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=N0(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=j0(o[a],i);c&&B0(t,c,r,n)}}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]=V0(t[s],i):t[s]=i}}function V0(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=V0(o,s):r[n]=s}return r}Tn();L();var BP=["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"],xu={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"]},z0=["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"],or=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()):H0(t),VP=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),H0=t=>VP.has(t)?t.toLowerCase():null,UP=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),sr=t=>typeof t=="string"&&(UP.has(t)||t.startsWith("aria-")),te=(t,e)=>e!==!0&&e!==!1?e:sr(t)?e?"true":"false":e===!0?"":e,Ee=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||or(e)||xu.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(xu,t)?xu[t].includes(e):!1,Ly=t=>{if(!k(t))return!1;let e=t.toLowerCase();return z0.includes(e)},zP=(t,e,r)=>{let n={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(r&&o in r)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])Tt(e[o][a])&&(n["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(Tt(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());n["data-"+c]=e[o][a]}continue}let s=Ee(t,o),i=Ly(o);if(Tt(e[o])&&(s||i)){let a=or(o)||o;n[a]=e[o]}}return n},HP=(t,e)=>{let r={};if(t.attr)for(let n in t.attr)r[n]=t.attr[n](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let o=t.aria[n];typeof o=="function"&&(r["aria-"+n]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let n in t.data){let o=t.data[n];if(typeof o=="function"){let s=n.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=o(e,e.state,e.context)}}return r},rn=(t,e)=>{let r=t.call("exec",e,t);if(r)return k(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},Dy=(t,e)=>{let r=(t.preSrc||"")+(rn(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=t;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},Qn={src:t=>Dy(t,t.src),href:t=>rn(t,t.href),action:t=>rn(t,t.action),poster:t=>Dy(t,t.poster),data:t=>rn(t,t.data)},Iy=t=>{let e=t.tag||"div",r={};for(let n in Qn)if(t[n]!==void 0&&Ee(e,n)){let o=Qn[n](t);o!==void 0&&(r[n]=o)}return r},U0=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return R(r)?r.call(e,e):!!r},WP=(t,e,r)=>{if(t==="$"){let o=U0(e,r);return o===void 0&&(o=!!r[e]),o}let n=r[e]===!0||r.state[e];if(!n){let o=U0(e,r);o!==void 0&&(n=o)}return t==="."?!!n:!n},qP=new Set(["$",".","!"]),KP=(t,e,r)=>{let n={},o=(s,i,a,c)=>{let l=i;n[s]=f=>{if(WP(a,c,f))return R(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!qP.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 g in a[l])o("aria-"+g,a[l][g],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let g in a[l]){let p=g.replace(/([A-Z])/g,h=>"-"+h.toLowerCase());o("data-"+p,a[l][g],i,c)}continue}let f=Ee(e,l),u=Ly(l);if(!f&&!u)continue;let d=or(l)||l;o(d,a[l],i,c)}}return n};function xs(t={},e={}){let r=this,n=r.__ref;if(!n)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&$y(n))try{let i=r.onBeforeUpdate(r,r.state,r.context,e);if(i&&typeof i.then=="function")i.then(()=>kr(n,!1),a=>{kr(n,!0),r.context?.plugins?.length&&Ot("error",r,{hook:"onBeforeUpdate",error:a})||console.error("[DOMQL] onBeforeUpdate error:",a)});else if(kr(n,!1),i===!1)return r}catch(i){throw kr(n,!0),i}let o=!t||Object.keys(t).length===0,s=[];_l(()=>{if(t.state&&vt(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!n.__exec.text&&r.node&&ws(r,t.text??"")),t.html!==void 0&&(r.html=t.html,!n.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!n.__exec.style)for(let i in t.style){let a=t.style[i];if(a==null)continue;let c=i.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=String(a).replace(/\s*!important\s*$/,"");r.node.style.setProperty(c,l,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let i in t.attr){let a=t.attr[i];a==null||a===!1&&!sr(i)?r.node.removeAttribute(i):typeof a!="function"&&typeof a!="object"&&r.node.setAttribute(i,te(i,a))}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let i in t.data)r.node.dataset[i]=t.data[i];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let i in t){if(Nt.has(i)||i==="state")continue;let a=t[i],c=r[i];if(c&&c.__ref&&typeof c.update=="function")c.update(a,e);else if(typeof a=="object"&&a!==null){let l=i.charCodeAt(0);l>=65&&l<=90&&ee(a,r,i,e)}else i!=="text"&&i!=="html"&&i!=="style"&&i!=="attr"&&i!=="data"&&(r[i]=a,typeof a!="function"&&s.push(i))}});for(let i=0;i<s.length;i++)K0(r,s[i]);if(r.node){for(let i=0;i<s.length;i++)if(W0(s[i])){q0(r);break}}if(r.node&&o&&n.__effects&&n.__effects.length)for(let i=0;i<n.__effects.length;i++){let a=n.__effects[i];a&&!a._disposed&&!a._isSubscribeToEffect&&typeof a._execute=="function"&&a._execute()}else if(r.node&&n.__conditionalRunners)for(let i of n.__conditionalRunners)i();return Ot("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;let r=cr();if(r){Ke(null);try{return vr(t)}finally{Ke(r)}}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(typeof e.__releaseMedia=="function"&&(e.__releaseMedia(),e.__releaseMedia=null),e.__eventCleanup){for(let o=0;o<e.__eventCleanup.length;o++)e.__eventCleanup[o]();e.__eventCleanup.length=0}if(e.__children){let o=e.__children.slice();e.__children.length=0;for(let s=0;s<o.length;s++){let i=t[o[s]];i&&i.__ref&&vr(i)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let n=t.state?.$destroy||t.state?.destroy;if(typeof n=="function"&&t.state.__element===t&&n.call(t.state),t.parent?.__ref?.__children){let 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 Ss(){vr(this)}L();L();L();var GP=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],YP=["none","forwards","backwards","both"],XP=["normal","reverse","alternate","alternate-reverse"],ZP=["running","paused"],JP=t=>/^[\d.]+m?s$/.test(t),QP=/^(?: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*\))$/,t2=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(n=>QP.test(n.replace(/\s+/g,"")))},G0=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),e2={transform:t2,translate:G0,rotate:t=>G0(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},r2=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},n2=t=>{if(!v(t))return null;let e=null,r=-1;for(let n in t){let o=r2(n);o==null||!v(t[n])||o>=r&&(r=o,e=t[n])}return e},o2=t=>{let e=n2(t);if(!e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let n of r){let o=e2[n];if(!o)return!1;let s=e[n];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},s2=(t,e)=>{if(v(t))return t;let{animation:r}=e.context&&e.context.designSystem||{},n=r&&r[t];return v(n)?n:null},i2=["reverse","alternate","alternate-reverse"],Y0=(t,e,r)=>{let n=r||e.animationDirection;return n&&i2.includes(String(n))?"both":o2(s2(t,e))?"backwards":"both"},a2=0,X0=new Map,My=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(v(t)){let o=JSON.stringify(t),s=X0.get(o);if(s)return s;let i=`smbls-anim-${a2++}`,a=ds(i,t);return X0.set(o,a),a}let n=r&&r[t];return v(n)?ds(t,n):t},c2=t=>{let e=[],r=0,n="";for(let o of String(t).trim())o==="("?r++:o===")"&&r>0&&r--,r===0&&/\s/.test(o)?(n&&e.push(n),n=""):n+=o;return n&&e.push(n),e},l2=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=c2(t),o=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of n)r&&r[u]?o=u:JP(u)?s.push(u):GP.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")||u.startsWith("linear(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):XP.includes(u)?c=u:YP.includes(u)?l=u:ZP.includes(u)?f=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},Fy={animation:(t,e)=>{if(t!=null){if(k(t)&&t.includes(" ")){let r=l2(t,e);return{animationName:My(r.name||t,e),animationDuration:r.durations[0]||ue(e.animationDuration||"A").timing,animationDelay:r.durations[1]||ue(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||Ce(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||Y0(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:My(t,e),animationDuration:ue(e.animationDuration||"A").timing,animationDelay:ue(e.animationDelay||"0s").timing,animationTimingFunction:Ce(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||Y0(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:My(t,e)}),animationDuration:t=>({animationDuration:ue(t).timing}),animationDelay:t=>({animationDelay:ue(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Ce(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};L();var wu=(t,e,r)=>{if(typeof e=="number"&&(e=String(e)),!k(e))return;let[n,o]=ht(e);return{...$(t+"Start",n,r),...$(t+"End",o||n,r)}},Ny={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>$("height",t,e),width:(t,e)=>$("width",t,e),boxSizing:t=>Pt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!k(t))return;let[e,r]=ht(t);return{...Ct("height",e),...Ct("width",r||e)}},inlineSize:(t,e)=>$("inlineSize",t,e),blockSize:(t,e)=>$("blockSize",t,e),minWidth:(t,e)=>$("minWidth",t,e),maxWidth:(t,e)=>$("maxWidth",t,e),widthRange:t=>{if(!k(t))return;let[e,r]=ht(t);return{...Ct("minWidth",e),...Ct("maxWidth",r||e)}},minHeight:(t,e)=>$("minHeight",t,e),maxHeight:(t,e)=>$("maxHeight",t,e),heightRange:t=>{if(!k(t))return;let[e,r]=ht(t);return{...Ct("minHeight",e),...Ct("maxHeight",r||e)}},size:t=>{if(!k(t))return;let[e,r]=ht(t);return{...$("inlineSize",e),...$("blockSize",r||e)}},minBlockSize:(t,e)=>$("minBlockSize",t,e),minInlineSize:(t,e)=>$("minInlineSize",t,e),maxBlockSize:(t,e)=>$("maxBlockSize",t,e),maxInlineSize:(t,e)=>$("maxInlineSize",t,e),minSize:t=>{if(!k(t))return;let[e,r]=ht(t);return{...Ct("minInlineSize",e),...Ct("minBlockSize",r||e)}},maxSize:t=>{if(!k(t))return;let[e,r]=ht(t);return{...Ct("maxInlineSize",e),...Ct("maxBlockSize",r||e)}},borderWidth:(t,e)=>$("borderWidth",t,e),borderTopWidth:(t,e)=>$("borderTopWidth",t,e),borderRightWidth:(t,e)=>$("borderRightWidth",t,e),borderBottomWidth:(t,e)=>$("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>$("borderLeftWidth",t,e),textDecorationThickness:(t,e)=>$("textDecorationThickness",t,e),textUnderlineOffset:(t,e)=>$("textUnderlineOffset",t,e),padding:(t,e)=>$("padding",t,e),paddingInline:t=>{if(!k(t))return;let[e,r]=ht(t);return{...Ct("paddingInlineStart",e),...Ct("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!k(t))return;let[e,r]=ht(t);return{...Ct("paddingBlockStart",e),...Ct("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>$("paddingBlockStart",t,e),paddingBottom:(t,e)=>$("paddingBlockEnd",t,e),paddingLeft:(t,e)=>$("paddingInlineStart",t,e),paddingRight:(t,e)=>$("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>$("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>$("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>$("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>$("paddingInlineEnd",t,e),margin:(t,e)=>$("margin",t,e),marginInline:t=>{if(!k(t))return;let[e,r]=ht(t);return{...Ct("marginInlineStart",e),...Ct("marginInlineEnd",r||e)}},marginBlock:t=>{if(!k(t))return;let[e,r]=ht(t);return{...Ct("marginBlockStart",e),...Ct("marginBlockEnd",r||e)}},marginTop:(t,e)=>$("marginBlockStart",t,e),marginBottom:(t,e)=>$("marginBlockEnd",t,e),marginLeft:(t,e)=>$("marginInlineStart",t,e),marginRight:(t,e)=>$("marginInlineEnd",t,e),marginInlineStart:(t,e)=>$("marginInlineStart",t,e),marginInlineEnd:(t,e)=>$("marginInlineEnd",t,e),marginBlockStart:(t,e)=>$("marginBlockStart",t,e),marginBlockEnd:(t,e)=>$("marginBlockEnd",t,e),scrollMargin:(t,e)=>$("scrollMargin",t,e),scrollMarginTop:(t,e)=>$("scrollMarginTop",t,e),scrollMarginRight:(t,e)=>$("scrollMarginRight",t,e),scrollMarginBottom:(t,e)=>$("scrollMarginBottom",t,e),scrollMarginLeft:(t,e)=>$("scrollMarginLeft",t,e),scrollMarginBlock:(t,e)=>wu("scrollMarginBlock",t,e),scrollMarginInline:(t,e)=>wu("scrollMarginInline",t,e),scrollMarginBlockStart:(t,e)=>$("scrollMarginBlockStart",t,e),scrollMarginBlockEnd:(t,e)=>$("scrollMarginBlockEnd",t,e),scrollMarginInlineStart:(t,e)=>$("scrollMarginInlineStart",t,e),scrollMarginInlineEnd:(t,e)=>$("scrollMarginInlineEnd",t,e),scrollPadding:(t,e)=>$("scrollPadding",t,e),scrollPaddingTop:(t,e)=>$("scrollPaddingTop",t,e),scrollPaddingRight:(t,e)=>$("scrollPaddingRight",t,e),scrollPaddingBottom:(t,e)=>$("scrollPaddingBottom",t,e),scrollPaddingLeft:(t,e)=>$("scrollPaddingLeft",t,e),scrollPaddingBlock:(t,e)=>wu("scrollPaddingBlock",t,e),scrollPaddingInline:(t,e)=>wu("scrollPaddingInline",t,e),scrollPaddingBlockStart:(t,e)=>$("scrollPaddingBlockStart",t,e),scrollPaddingBlockEnd:(t,e)=>$("scrollPaddingBlockEnd",t,e),scrollPaddingInlineStart:(t,e)=>$("scrollPaddingInlineStart",t,e),scrollPaddingInlineEnd:(t,e)=>$("scrollPaddingInlineEnd",t,e),gap:t=>({gap:ou(t)}),columnGap:(t,e)=>ke(e,"columnGap",t),rowGap:(t,e)=>ke(e,"rowGap",t),flexWrap:t=>{if(t!=null)return{display:"flex",flexWrap:t}},flexFlow:(t,e)=>{let r=e.reverse;if(!k(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!k(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>wr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>wr(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>wr(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>wr(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>wr(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>wr(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var jy={fontSize:t=>tc(t)||t,fontFamily:t=>({fontFamily:Ja(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 By={overflow:t=>({overflow:t}),cursor:(t,e,r,n)=>{if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=n.files&&n.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 Vy={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:ht(t).map(r=>Et(r,"k").k).join(" ")}},left:t=>Et(t,"left"),top:t=>Et(t,"top"),right:t=>Et(t,"right"),bottom:t=>Et(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=ht(t).map(r=>Et(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=ht(t).map(r=>Et(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};L();var Su=0,ku=()=>{Su++},vu=()=>{Su>0&&Su--},pe=({context:t,state:e})=>{let r=t?.designSystem,n=e?.root?.globalTheme||r?.globalTheme;return n&&n!=="auto"?n:Su>0?null:r&&r.resolvedTheme||null},re=(t,e)=>{if(e==null||e==="")return;if(!v(e))return{[t]:e};let r={},n=!1;for(let o in e){let s=e[o];if(!(s==null||s==="")){if(v(s)){let i=re(t,s);i&&(r[o]=i,n=!0);continue}r[o]={[t]:s},n=!0}}return n?r:void 0},Uy={theme:(t,e)=>{if(t)return e.themeModifier?ve(t,`@${e.themeModifier}`):ve(t)},color:(t,e)=>{let r=pe(e);if(t)return re("color",It(t,r))},background:(t,e)=>{let r=pe(e);if(t)return k(t)&&t.includes("gradient")&&t.includes("(")?{background:cc(t,r)}:re("background",It(t,r))},backgroundColor:(t,e)=>{let r=pe(e);if(t)return re("backgroundColor",It(t,r))},backgroundImage:(t,e,r,n)=>{let o=pe(e);if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=s.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return re("backgroundImage",nu(t,o))},textStroke:t=>{let e=eu(t);if(e!=null)return{WebkitTextStroke:e}},outline:t=>({outline:nr(t)}),outlineWidth:(t,e)=>$("outlineWidth",t,e),outlineColor:(t,e)=>{let r=pe(e);if(t)return re("outlineColor",It(t,r))},outlineOffset:(t,e)=>$("outlineOffset",t,e),border:t=>({border:nr(t)}),borderColor:(t,e)=>{let r=pe(e);if(t)return re("borderColor",It(t,r))},borderTopColor:(t,e)=>{let r=pe(e);if(t)return re("borderTopColor",It(t,r))},borderBottomColor:(t,e)=>{let r=pe(e);if(t)return re("borderBottomColor",It(t,r))},borderLeftColor:(t,e)=>{let r=pe(e);if(t)return re("borderLeftColor",It(t,r))},borderRightColor:(t,e)=>{let r=pe(e);if(t)return re("borderRightColor",It(t,r))},borderLeft:t=>({borderLeft:nr(t)}),borderTop:t=>({borderTop:nr(t)}),borderRight:t=>({borderRight:nr(t)}),borderBottom:t=>({borderBottom:nr(t)}),shadow:(t,e)=>{let r=pe(e);if(t)return re("boxShadow",ru(t,r))},boxShadow:(t,e)=>{if(!k(t))return;let[r,n]=t.split("!importan"),o=pe(e),s=n?" !important":"",i=ac(r.trim(),o);return k(i)?{boxShadow:i+s}:re("boxShadow",i)},textShadow:(t,{context:e})=>re("textShadow",ac(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:nr(t)})};var hc={transition:t=>{let e=iu(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:lc(t)}),transitionDelay:t=>({transitionDelay:lc(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Ce(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};L();var zy={flow:(t,e)=>{let r=e.reverse;if(!k(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>{if(t!=null)return{display:"flex",flexWrap:t}},align:(t,e)=>{if(!k(t))return;let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};L();var f2=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,Z0=t=>{if(!k(t))return t;let e=A().sizes;return e?t.replace(f2,(r,n,o)=>{let s=e[o];return s==null?r:n+String(s)}):t},ir=t=>Z0(su(t)),Hy={gridTemplateColumns:t=>({gridTemplateColumns:ir(t)}),gridTemplateRows:t=>({gridTemplateRows:ir(t)}),gridAutoColumns:t=>({gridAutoColumns:ir(t)}),gridAutoRows:t=>({gridAutoRows:ir(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:ir(t)}),templateColumns:t=>({gridTemplateColumns:ir(t)}),autoColumns:t=>({gridAutoColumns:ir(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:ir(t)}),templateRows:t=>({gridTemplateRows:ir(t)}),autoRows:t=>({gridAutoRows:ir(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var St={...Fy,...Ny,...jy,...By,...Vy,...Uy,...hc,...zy,...Hy};var At=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","interpolateSize","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollMargin","scrollMarginBlock","scrollMarginBlockEnd","scrollMarginBlockStart","scrollMarginBottom","scrollMarginInline","scrollMarginInlineEnd","scrollMarginInlineStart","scrollMarginLeft","scrollMarginRight","scrollMarginTop","scrollPadding","scrollPaddingBlock","scrollPaddingBlockEnd","scrollPaddingBlockStart","scrollPaddingBottom","scrollPaddingInline","scrollPaddingInlineEnd","scrollPaddingInlineStart","scrollPaddingLeft","scrollPaddingRight","scrollPaddingTop","scrollSnapAlign","scrollSnapStop","scrollSnapType","scrollTimeline","scrollTimelineAxis","scrollTimelineName","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","textWrap","textWrapMode","textWrapStyle","timelineScope","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","viewTimeline","viewTimelineAxis","viewTimelineInset","viewTimelineName","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);L();var u2=/^-?[A-Z][0-9]?$/,d2=/^[a-z][0-9]?$/,J0=/var\(\s*(--[A-Za-z0-9-]+)/g,p2=t=>{let e=new Set,r=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:r};for(let n in t){let o=t[n];if(!(!o||typeof o!="object")){if(o.sequence&&typeof o.sequence=="object")for(let s in o.sequence)e.add(s);if(o.vars&&typeof o.vars=="object")for(let s in o.vars)r.add(s)}}return{knownLetters:e,knownVars:r}},h2=(t,e)=>{if(!e.size)return[];let r=t.split(/[(),\s]+/).filter(Boolean),n=new Set;for(let o of r){if(!u2.test(o))continue;let s=o.charCodeAt(0)===45?o.slice(1):o;e.has(s)&&n.add(o)}return[...n]},g2=(t,e)=>{if(!e.size)return[];let r=[];J0.lastIndex=0;let n;for(;n=J0.exec(t);){let o=n[1];if(e.has(o))continue;let s=o.lastIndexOf("-");if(s===-1)continue;let i=o.slice(s+1);if(!d2.test(i))continue;let a=o.slice(0,s+1)+i.toUpperCase();a!==o&&e.has(a)&&r.push({varName:o,corrected:a})}return r},Cu=new Set,Q0=(t,e,r)=>{if(!mt()||!k(e)||!e)return;let n;try{n=A()}catch{return}let{knownLetters:o,knownVars:s}=p2(n);if(!o.size&&!s.size)return;let i=h2(e,o),a=g2(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}`;Cu.has(f)||(Cu.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}`;Cu.has(u)||(Cu.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}"`))}};L();var m2=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,y2=(t,e,r)=>{let{context:n}=r;if(!n.designSystem?.media)return;let o=t.slice(1),s=n.designSystem.media[o],i=ne(e,r);if(!s)return{[t]:i};if(/^@(media|supports|container)\b/.test(s))return{[s]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(m2),c=a?a[1]||a[2]:o,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=n.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},tk=(t,e,r)=>({[t]:ne(e,r)}),gc=(t,e,r)=>{let n=`&${t}`,o=ne(e,r);if(t.includes(",")&&o){let s={},i={};for(let a in o)typeof o[a]=="object"&&o[a]!==null?i[a]=o[a]:s[a]=o[a];if(Object.keys(i).length){let a=n.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[n]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[n]:o}},Wy=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return R(r)?r.call(e,e):!!r},b2=(t,e,r)=>{let n=t.slice(1),o=Wy(n,r);if(o===void 0&&(o=!!r[n]),!!o)return ne(e,r)},_2=(t,e,r)=>({[t]:e}),x2=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=Wy(n,r);s!==void 0&&(o=s)}if(o)return ne(e,r)},w2=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=Wy(n,r);s!==void 0&&(o=s)}if(!o)return ne(e,r)},qy=(t,e)=>ne(t,e),Ky={"@":y2,":":gc,"[":gc,"*":gc,"+":gc,"~":gc,"&":tk,">":tk,$:b2,"-":_2,".":x2,"!":w2};var Eu=Nr(),ek=(t,e,r)=>{let n=e?.context?.designSystem;n&&at(n);try{let o={},s={},i=(a,c)=>{if(r.unpack){o={...o,...c};return}o[a]=c};for(let a in t){let c=t[a];if(c!==null)if(a==="class"&&k(c)){let l=rk(c,e);l&&(r.unpack?_t(o,l):o.designSystemClass=l)}else if(a==="true"){let l=pt(c,e);_t(o,qy(l,e))}else if(e.classlist?.[a]){let l=e.classlist[a],f=R(l)?l(e,e.state,e.context):l;f&&i(a,f),!Eu&&v(o[a])&&(o[a].label=a)}else if(St[a]){let l=pt(c,e);if(l===null)continue;P(l)&&(l=l.reduce((u,d)=>_t(u,d),{}));let f=St[a](l,e,e.state,e.context);P(f)&&(f=f.reduce((u,d)=>_t(u,d),{})),f&&i(a,f),!Eu&&v(o[a])&&(o[a].label=a)}else if(At.has(a)){let l=pt(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),Eu||Q0(a,l,e),i(a,{[a]:l}),!Eu&&v(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{n&&ot()}},rk=(t,e)=>{if(!k(t))return;let r=e?.context?.designSystem?.class;if(!r)return;let n;for(let o of t.split(" ")){if(!o)continue;let s=r[o];if(!v(s))continue;let i=ft(s);n=n?zt(n,i):i}if(n)return ne(n,e)},nk=(t,e)=>{let r={};for(let n in t){let o=Ky[n.slice(0,1)];if(o){let s=o(n,t[n],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?zt(r[i],s[i]):r[i]=s[i])}}return r},ne=(t,e,r={unpack:!0})=>{let[n,o]=ek(t,e,r),s=nk(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return Ti(n,s);n._selectors=s}return n},S2=(t,e)=>{let r={};if(t.class)for(let n in t.class)r[n]=t.class[n](e);return r};L();var ok=t=>{if(v(t))return ne(t,t)},k2=(t,e)=>{let r=ok(t);return typeof e=="function"?e(r):de(r)};L();L();function Xy(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:o||null,args:r})}var sk=new Set;function ik(t,e,r){let n=String(e);if(sk.has(n))return;sk.add(n);let o=t?.__ref?.path,s=Array.isArray(o)&&o.length?o.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('${n}') at <${s}>: "${n}" ${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.`;Xy(t,"error",[a]),console.error(a)}var ck=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),v2=new Set,lk=t=>ck(Gy,t)&&!(Eo||v2).has(t),ak=new Set;function fk(t,e){ak.has(t)||(ak.add(t),mt()&&console.warn(`[smbls] ${e}: context.methods.${t} is named like a built-in element method and is not the app's own override (it was not on the element prototype when it was built) \u2014 ignored; the built-in keeps winning. Declare an intentional override in the app's OWN methods.`))}function C2(...t){return Xy(this,"warn",t),da.apply(this,t)}function E2(...t){return Xy(this,"error",t),Pn.apply(this,t)}var Gy={update:xs,remove:Ss,getDB:ma,getQuery:ya,getRootData:la,getPath:sa,nextElement:pa,previousElement:ha,verbose:jo,warn:C2,error:E2,variables:ga,spotByPath:oa,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 n=this.context?.__create;n&&n(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let n=r.__setQueued;n&&(r.__setQueued=null,this.set(n.content,n.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),e(o,r,n,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 n=this[r];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;let o=n.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let o=this[n];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(t){return t?this.__ref&&this.__ref[t]:this.__ref},getChildren(){let t=this.__ref&&this.__ref.__children;return Array.isArray(t)?t.map(e=>this[e]):[]},getRoot:ca,getRootState:aa,getRootContext:fa,getContext:ua,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){e[o]=n[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(e[n]=this[n].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 n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(t,...e){let r=this.context,n=lk(t);n&&r?.methods?.[t]&&r.methods[t]!==this[t]&&fk(t,"el.call");let o=n?this[t]:r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof o=="function"){let s=vn;if(!s||!s(o))return o.call(this,...e);mt()&&ik(this,t,Le(o));return}mt()&&ik(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)}},Yy=new WeakMap;function A2(t){if(!t)return Gy;let e=Yy.get(t);if(e)return e;e=Object.create(Gy);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return Yy.set(t,e),e}function ks(t){let e=A2(t.context);Object.setPrototypeOf(t,e)}function Au(t){if(!t)return!1;let e=Yy.get(t);if(!e)return!1;let r=t.methods;if(!r)return!1;for(let n in r){if(lk(n)&&!ck(e,n)){fk(n,"refreshContextProto");continue}e[n]=r[n]}return!0}var Tu=[],Ou=!1,nn=0;function Ru(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function uk(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 Zy(){return nn?Ru()-nn>=50:!1}var vs=0;function Jy(){vs===0&&!nn&&(nn=Ru()),vs++}function Qy(){vs>0&&vs--,vs===0&&!Ou&&(nn=0)}function tb(t){Tu.push(t),Ou||(Ou=!0,uk(dk))}function dk(){for(nn=Ru();Tu.length;){let t=Tu.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(Ru()-nn>=50)break}if(Tu.length){uk(dk);return}Ou=!1,nn=0,vs=0}L();L();Tn();var sb={};M(sb,{STATE_METHODS:()=>pk,applyInitialState:()=>Du,applyStateMethods:()=>he,callStateMethod:()=>mc,createState:()=>rb,isTracking:()=>ob,useHostState:()=>nb});var pk=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"]),Pu=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Be=(t,e,r,{onlyIfAbsent:n}={})=>{Pu(t,"$"+e,r),!(n&&Object.prototype.hasOwnProperty.call(t,e))&&Pu(t,e,r)},mc=(t,e,...r)=>{if(!t)return;let n=t["$"+e];if(typeof n=="function")return n.apply(t,r);let o=t[e];if(typeof o=="function")return o.apply(t,r)},he=(t,e)=>{if(vt(e)){let o=e.__raw||e;Be(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Be(o,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Be(o,"setByPath",function(s,i,a={}){let c=s.split("."),l=e;for(let f=0;f<c.length-1;f++)l[c[f]]===void 0&&(l[c[f]]={}),l=l[c[f]];return l[c[c.length-1]]=i,e}),Be(o,"getByPath",function(s){let i=s.split("."),a=e;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a}),Be(o,"removeByPath",function(s,i={}){let a=s.split("."),c=e;for(let l=0;l<a.length-1;l++){if(c==null)return e;c=c[a[l]]}return c&&delete c[a[a.length-1]],e}),Be(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Be(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Be(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Be(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&vt(a.parent);)a=a.parent;return mc(a,"update",s,i)}),Be(o,"parentUpdate",function(s,i={}){if(e.parent)return mc(e.parent,"update",s,i)}),Be(o,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=vt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,vt(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},n={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.$update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;r();for(let s in o)e[s]=o[s];return e},replace(o){return e.$set(o)},clean(){return r(),e}};for(let o in n)if(Pu(e,"$"+o,n[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){wl(o,"");continue}Pu(e,o,n[o])}};var rb=function(t,e,r){return t.state=Du(t,e,r),t.state},Du=function(t,e,r){let{__ref:n}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return he(t,s),s}if(typeof o=="string")return n&&(n.__state=o),n.__stateType="string",T2(o,t,e);if(typeof o=="number"||typeof o=="boolean"){n&&(n.__state=o,n.__stateType=typeof o,n.__hasRootState=!0);let s=lr({value:o});return s.__element=t,e?.state&&(s.parent=e.state),he(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!vt(o)){n&&(n.__hasRootState=!0),o.isRootState&&n&&(n.__hasRootState=!0);let s=lr({...o});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),he(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return vt(o)?(o.__element=t,o):e?.state||{}};function eb(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function T2(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let o=t.slice(3),s=r.state?.parent;return o&&s?eb(s,o):s??r.state??{}}if(t.startsWith("~/")){let o=r.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?eb(o,s):o??{}}let n=eb(r.state,t);if(n&&typeof n=="object"&&!vt(n)&&!Object.getOwnPropertyDescriptor(n,"root")){let o=r.state?.root||r.state;Object.defineProperty(n,"root",{get:()=>o,enumerable:!1,configurable:!0})}return n}var nb=(t,e)=>{if(!t)return gk;let r=R2(t,e);return!r||!r.state?gk:D2(r.state)},ob=()=>cr()!=null,O2=128;function R2(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,n=t,o=null;for(let s=0;s<O2&&n;s++){if(r(n)&&n.state)return n;if(n.state&&!o&&(o=n),!n.parent||n.parent===n)break;n=n.parent}return o}var P2={get(t,e){return t[e]}},hk=new WeakMap,D2=t=>{let e=hk.get(t);return e||(e=new Proxy(t,P2),hk.set(t,e)),e},gk=new Proxy(Object.create(null),{get(){},has(){return!1}});var Lu="3.14.798";var mk="__SMBLS_ELEMENT_ID_ENGINE__",yk=(t,e,r)=>{let n=e||Lu,o=r||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[mk];return s&&s.engine&&s.version===n?s.engine:(s||(o[mk]={version:n,engine:t}),t)};var K=(t,e)=>e.split(" ").map(r=>t+"-"+r),ib="top right bottom left",ab=ib+" block block-start block-end inline inline-start inline-end",on="start end",to="width style color",Iu=t=>K(t,ab),L2=(()=>{let t=K("border","width style color image");for(let e of ab.split(" "))t.push("border-"+e,...K("border-"+e,to));return t})(),bk=t=>[...K("border-"+t,to+" start end"),...K("border-"+t+"-start",to),...K("border-"+t+"-end",to)],Cr={animation:K("animation","name duration timing-function delay iteration-count direction fill-mode play-state timeline range range-start range-end"),background:K("background","image position position-x position-y size repeat origin clip attachment color"),border:L2};for(let t of["width","style","color"])Cr["border-"+t]=ab.split(" ").map(e=>"border-"+e+"-"+t);for(let t of ib.split(" "))Cr["border-"+t]=K("border-"+t,to);Cr["border-block"]=bk("block");Cr["border-inline"]=bk("inline");Object.assign(Cr,{"border-image":K("border-image","source slice width outset repeat"),"border-radius":"top-left top-right bottom-right bottom-left start-start start-end end-start end-end".split(" ").map(t=>"border-"+t+"-radius"),columns:K("column","width count"),"column-rule":K("column-rule",to),container:K("container","name type"),"contain-intrinsic-size":K("contain-intrinsic","width height"),flex:K("flex","grow shrink basis"),"flex-flow":K("flex","direction wrap"),font:[...K("font","style variant weight stretch size"),"line-height",...K("font","family size-adjust kerning feature-settings variation-settings optical-sizing")],gap:["row-gap","column-gap"],grid:K("grid","template template-rows template-columns template-areas auto-rows auto-columns auto-flow"),"grid-template":K("grid-template","rows columns areas"),"grid-area":K("grid","row column row-start row-end column-start column-end"),"grid-row":K("grid-row",on),"grid-column":K("grid-column",on),inset:[...ib.split(" "),...K("inset","block block-start block-end inline inline-start inline-end")],"inset-block":K("inset-block",on),"inset-inline":K("inset-inline",on),"list-style":K("list-style","type position image"),margin:Iu("margin"),"margin-block":K("margin-block",on),"margin-inline":K("margin-inline",on),mask:K("mask","image mode repeat position clip origin size composite"),offset:K("offset","position path distance rotate anchor"),outline:K("outline",to),overflow:K("overflow","x y"),"overscroll-behavior":K("overscroll-behavior","x y"),padding:Iu("padding"),"padding-block":K("padding-block",on),"padding-inline":K("padding-inline",on)});for(let t of["content","items","self"])Cr["place-"+t]=["align-"+t,"justify-"+t];Object.assign(Cr,{"scroll-margin":Iu("scroll-margin"),"scroll-padding":Iu("scroll-padding"),"text-decoration":K("text-decoration","line style color thickness"),"text-emphasis":K("text-emphasis","style color"),transition:K("transition","property duration timing-function delay behavior")});var yc={};for(let t in Cr)for(let e of Cr[t])(yc[e]||(yc[e]=[])).push(t);var I2=new Set(["rows","cols","wrap"]),$u=(t,e)=>I2.has(e)&&Ee(t,e),Cs=(t,e)=>!!(St[e]||At&&At.has(e))&&!$u(t,e);var Mk=yk({uniqId:1,scopedStyleId:0},Lu),_c=[],eo=new Set,_b=!1,Fk=0,As=null,Cc=null;function Ts(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function Nk(){return typeof document<"u"&&document.visibilityState==="hidden"}var $2=250,M2=1e3;function F2(){return Cc&&(Cc!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||Nk())?!0:Ts()-Fk>=M2}function N2(){if(_b=!0,Fk=Ts(),Cc=null,typeof requestAnimationFrame!="function"){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(wc,0);As=t?()=>t(e):null;return}if(Nk()){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(wc,$2);As=t?()=>t(e):null}else{let t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;Cc=requestAnimationFrame;let e=requestAnimationFrame(wc);As=t?()=>t(e):null}}function zu(){if(_b){if(!F2())return;let t=As;if(As=null,t)try{t()}catch{}}N2()}var jk=300,Bk=15e4;function wc(){if(_b=!1,As=null,Cc=null,eo.size&&yD(),!_c.length)return;let t=_c.splice(0,_c.length);for(let e=0;e<t.length;e++){let r=t[e];if(r.node){if(!r.node.isConnected){let n=r.__ref||(r.__ref={});n.__mountAttempts=(n.__mountAttempts||0)+1,n.__mountFirstAttemptAt==null&&(n.__mountFirstAttemptAt=Ts());let o=Ts()-n.__mountFirstAttemptAt;n.__mountAttempts<=jk&&o<Bk?(_c.push(r),zu()):console.warn("[DOMQL] onMounted dropped after",n.__mountAttempts,"attempts /",o,"ms \u2014 node never connected:",r.key||r.tag||r);continue}oe("Mounted",r,r.__ref?.__mountOptions||{})}}}function ub(t,e){let r=t.__ref?.__autoGrow;r&&r.active&&Ac(t,!0),typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,_c.push(t),zu())}function _k(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&Ot("contentUpdate",t,e);let r=t.context?.designSystem;r&&at(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(n){if(t.context?.plugins?.length&&Ot("error",t,{hook:"onContentUpdate",error:n})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',n),t.context?.strictMode)throw n}finally{r&&ot()}}function Er(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function j2(t){return t.charAt(2).toLowerCase()+t.slice(3)}function B2(t){return t.toLowerCase()}function db(t){let e=t.charCodeAt(0);return e===58||e===64||e===38||e===91}function xc(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=xc(o,s):r[n]=s}return r}function ju(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function Vk(t,e,r){return ju(t)||(e&&typeof e=="object"?ju(e.key):void 0)||String(r)}function ee(t,e,r,n={},o){let s=cr();if(s){Ke(null);try{return ee(t,e,r,n,o)}finally{Ke(s)}}if(t==null||t===!1)return null;let i=J2(t);(typeof t=="string"||typeof t=="number")&&(t={text:t}),r=ju(r);let a=ju(t.key),c=Object.create(null);c.key=r||a||`_${Mk.uniqId++}`,c.parent=e||null,c.context=t.context||e?.context||n.context||{},c.context.__create||(c.context.__create=ee);let l=c.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||c,path:e?.__ref?.path?[...e.__ref.path,c.key]:[c.key],origin:t};i&&(l.__runtimeSource=i);let f=t;if(t=Uk(c,t,r,a,e,n),c.if!=null){let d;if(typeof c.if=="function")try{d=c.if(c,c.state,c.context)}catch(g){if(d=!1,l.__ifError=g,typeof console<"u"&&console.warn){let p=c.key||c.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${p} \u2014 treating as false:`,g?.message||g)}}else d=c.if;l.__if=!!d}if(l.__if)typeof c.if=="function"&&(l.__ifInitialized=!0);else{e&&(e[c.key]=c);let d=z2(t,r,c.context?.components);return d.length&&(l.__ifLateMerge={definition:f,key:r,ownKey:a,names:d,options:n}),typeof c.if=="function"&&qk(c,l,c.if),c}c.tag||(c.tag=Qr(c)),oe("Init",c,n);let u=c.node=tn(c);if(!u)return c;if(c.tag==="fragment"){let g=(c.context?.document||globalThis.document).createComment("");u.appendChild(g),l.__fragmentAnchor=g}oe("AttachNode",c,n),u.setAttribute&&c.key&&u.setAttribute("data-key",c.key),e&&(e[c.key]=c,e.__ref?.__children&&(e.__ref.__children.includes(c.key)||e.__ref.__children.push(c.key))),u.setAttribute&&c.context?.scopeSelector&&c.context.scopeSelector!==":root"&&c.context.key&&c.key===c.context.key&&u.setAttribute("data-smbls-app",c.context.key),c.id&&u.setAttribute&&(u.id=c.id),rv(c,n),Wk(c),gb(c),Qk(c),tv(c),wD(c);try{nv(c,n)}catch(d){if(typeof console<"u"&&console.error){let g=c.__ref?.path?.join(".")||c.key||"<root>";console.error(`[smbls] createChildren failed at ${g}:`,d?.message||d,d?.stack?`
|
|
55
|
+
Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function K0(){try{let t=A(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function F0(t){yu||ee.variable>0||ee.atomic>0||G0(Math.max(t,K0()))}function Ry(t){let e=t&&(t.CSS_VARS||t.cssVars);return G0(e?Object.keys(e).length:K0())}function G0(t){let e=_u();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!wu())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 YP(r,t),{ok:!1,reason:r,stats:e,varCount:t}}var XP={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 to(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function bu(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 ZP(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():bu(e)}var JP={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select","mask-image":"-webkit-mask-image","mask-size":"-webkit-mask-size","mask-repeat":"-webkit-mask-repeat","mask-position":"-webkit-mask-position","mask-clip":"-webkit-mask-clip","mask-origin":"-webkit-mask-origin","background-clip":"-webkit-background-clip"};function ps(t,e){let r=JP[t];return r?`${t}:${e};${r}:${e};`:`${t}:${e};`}function vy(t){let e="";for(let r in t){let n=t[r];if(typeof n!="object"||n===null)continue;let o="";for(let s in n){let i=s.charCodeAt(0)===45&&s.charCodeAt(1)===45;o+=ps(i?s:to(s),n[s])}e+=`${r}{${o}}`}return e}var QP="@media (hover: hover)",t2=/(?:^|[^\\]):hover(?![\w-])/;function Py(){try{let t=A();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function xr(t,e,r){return r===!1||!t2.test(e)||r===void 0&&!Py()?t:`${QP}{${t}}`}function N0(t,e,r){let n=(r?r+"":"")+t+":"+e,o=hs.get(n),s=o?null:to(t);if(!o){let c=XP[t]||bu(t),l=ZP(e);o=r?`_${r}_${c}-${l}`:`_${c}-${l}`,hs.set(n,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=s||to(t),a=`.${o}{${ps(i,e)}}`;return Ne(a,void 0,"atomic"),o}var j0=new WeakMap,B0=new WeakMap;function Ne(t,e,r){let n=wu(e,e2(t));if(!n)return ee.dropped++,"dropped";let o=j0.get(n);if(o||(o=new Set,j0.set(n,o)),o.has(t))return ee.duplicate++,ee[r||"global"]++,"duplicate";let s=B0.get(n);if(s&&s.has(t))return ee.invalid++,"invalid";try{n.insertRule(t,n.cssRules.length)}catch{return s||(s=new Set,B0.set(n,s)),s.add(t),ee.invalid++,"invalid"}return o.add(t),ee[r||"global"]++,"inserted"}var je="0:0",V0="1:0",U0=/\((max|min)-width:\s*([\d.]+)(px|em|rem)?\)/g;function e2(t){if(typeof t!="string"||!t)return je;if(t.charCodeAt(0)===64){if(!t.startsWith("@media")&&!t.startsWith("@supports")&&!t.startsWith("@container"))return je;let e=1/0,r=-1/0;U0.lastIndex=0;let n;for(;n=U0.exec(t);){let o=parseFloat(n[2])*(n[3]==="em"||n[3]==="rem"?16:1);n[1]==="max"?e=Math.min(e,o):r=Math.max(r,o)}return e!==1/0?"2:"+-e:r!==-1/0?"3:"+r:V0}return t.charCodeAt(0)!==46||/^\.[\w-]+\{/.test(t)?je:V0}var z0=t=>{let e=t.indexOf(":");return[Number(t.slice(0,e)),Number(t.slice(e+1))]},r2=(t,e)=>{let[r,n]=z0(t),[o,s]=z0(e);return r!==o?r<o:n<s},n2=t=>t.getAttribute("data-tier")||je,H0=new WeakMap;function wu(t,e){let r=t||eo();if(!r||!r.head)return null;let n=e||je,o=H0.get(r);o||(o=new Map,H0.set(r,o));let s=o.get(n);if(s&&s.ownerNode&&s.ownerNode.parentNode===r.head)return s;n!==je&&wu(r,je);let i=n===je?r.head.querySelector("style[data-smbls]:not([data-tier])"):r.head.querySelector(`style[data-smbls][data-tier="${n}"]`);if(!i){i=r.createElement("style"),i.setAttribute("data-smbls",""),n!==je&&i.setAttribute("data-tier",n);let c=r.head.querySelectorAll("style[data-smbls]"),l=null;for(let u=0;u<c.length;u++)if(r2(n,n2(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 o.set(n,a),n===je&&(q0=a),a}function o2(t){let e=t||eo();if(!e||!e.head)return[];let r=[],n=e.head.querySelectorAll("style[data-smbls]");for(let o=0;o<n.length;o++)n[o].sheet&&r.push(n[o].sheet);return r}var s2=8;function ge(t,e,r,n){if(!t||typeof t!="object")return"";let o=!!(n&&n.state),s=null,i=0,a=[],c=[],l=Object.keys(t);for(let u=0;u<l.length;u++){let d=l[u],g=t[d];g==null||g===!1||g===""||(typeof g=="object"?c.push([d,g]):ky?(s||(s=[]),s.push(d,String(g)),i++):a.push(N0(d,String(g),r)))}if(s&&i>=s2){let u=s.join("\0"),d=ky(u),g=d.indexOf("\0"),h=d.substring(0,g),p=d.substring(g+1);if(p){let m=p.split(`
|
|
56
|
+
`);for(let y=0;y<m.length;y++)m[y]&&Ne(m[y],void 0,"atomic")}a.push(h)}else if(s)for(let u=0;u<s.length;u+=2)a.push(N0(s[u],s[u+1],r));let f=[];for(let u=0;u<c.length;u++)f.push(l2(c[u][0],c[u][1],r,o));return a.concat(f).join(" ").trim()}var W0=new Map,i2=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function hc(t){return/^@(media|supports|container)\b/.test(t)}function a2(t){return typeof t!="string"||!t||hc(t)?!1:t.split(",").every(e=>i2.test(e.trim()))}var Y0=t=>{let e=Object.prototype.toString.call(t);return e==="[object Object]"||e==="[object Array]"},Cy=32,Ey=1024,Ay=!1;function gu(t,e,r){if(Ay)return;Ay=!0;let n=[e,...r],o=n.length>12?[...n.slice(0,6),`\u2026${n.length-9} more\u2026`,...n.slice(-3)]:n;console.warn(`[@symbo.ls/css] ${t} at ${o.join(" > ")} \u2014 skipped. A style block may hold only CSS values and nested plain blocks; the rest of this rule is still emitted. (One warning per page.)`)}function c2(t){try{return JSON.stringify(t)}catch{let r=[],n=0;return JSON.stringify(t,function(o,s){if(!s||typeof s!="object")return s;for(;r.length&&r[r.length-1]!==this;)r.pop();if(!(r.length&&(r.includes(s)||!Y0(s)||r.length>Cy||++n>Ey)))return r.push(s),s})}}function l2(t,e,r,n){let o=c2(e),s=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,i=s&&Py(),a=(r?r+"":"")+t+o+(s&&!i?"rawhover":"")+(n?"state":""),c=hs.get(a);if(c){let S=W0.get(c);if(S)for(let k=0;k<S.length;k++)Ne(S[k],void 0,"atomic");return c}c=r?`_${r}_c${bu(a)}`:`_c${bu(a)}`;let l=n?`.${c}.${c}`:`.${c}`,f=a2(t)?`${l}.${c}`:l,u="",d=[],g=S=>typeof S=="string"&&(S.indexOf("{")!==-1||S.indexOf("}")!==-1),h=new Set,p=0,m=(S,k)=>{h.add(k);let E="",T=Object.keys(k);for(let I=0;I<T.length;I++){let O=T[I],F=k[O];if(F!=null)if(typeof F=="object"){let z=[...S,O];h.has(F)?gu("a style value that loops back to one of its own ancestors",t,z):Y0(F)?z.length>Cy?gu(`a style block nested more than ${Cy} levels deep`,t,z):++p>Ey?gu(`a style object with more than ${Ey} nested blocks`,t,z):m(z,F):gu(`a ${Object.prototype.toString.call(F).slice(8,-1)} (not a style block)`,t,z)}else{if(g(F))continue;E+=ps(to(O),F)}}h.delete(k),E&&(S.length===0?u+=E:d.push({chain:S,body:E}))};m([],e);let y=S=>S.startsWith(":")||S.startsWith("["),w=(S,k=!0)=>{let E=k&&S.length===1?f:l;if(!S.length)return E;let T=S[0].split(",").map(I=>I.trim()).map(I=>I.includes("&")?I.replace(/&/g,E):y(I)?`${E}${I}`:`${E} ${I}`);for(let I=1;I<S.length;I++){let O=S[I].split(",").map(z=>z.trim()),F=[];for(let z of T)for(let Q of O)Q.includes("&")?F.push(Q.replace(/&/g,z)):y(Q)?F.push(z+Q):F.push(z+" "+Q);T=F}return T.join(", ")},b=[],_=(S,k)=>{let E=S.filter(hc),T=w(S.filter(O=>!hc(O)),E.length===0),I=`${T}{${k}}`;for(let O=E.length-1;O>=0;O--)I=`${E[O]}{${I}}`;I=xr(I,T,i),b.push(I),Ne(I,void 0,"atomic")};u&&_([t],u);for(let S of d)_([t,...S.chain],S.body);return W0.set(c,b),hs.set(a,c),c}function St(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(wu(),typeof t=="string"){let s=t.indexOf("--")!==-1;Ne(t,void 0,s?"variable":"global"),s&&F0(1);return}let e=Py(),r=0,n=Object.keys(t),o=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};n.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?o(i)-o(s):1:-1});for(let s of n){let i=t[s];if(s.startsWith("@keyframes")){let a=vy(i);a&&Ne(`${s}{${a}}`,void 0,"keyframes");continue}if(hc(s))for(let a in i){let c=i[a];if(a.startsWith("@keyframes")){let l=vy(c);l&&Ne(`${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 g=d?u:to(u);l+=ps(g,c[u])}r+=f,Ne(xr(`${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:to(a);Ne(`${s}{${ps(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 g=d?f:to(f);a+=ps(g,u)}}if(r+=l,a&&Ne(xr(`${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&&(hc(d)?f.push(d):u.push(d));f.sort((d,g)=>{let h=p=>{let m=p.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return h(g)-h(d)});for(let d of u)St({[`${s} ${d}`]:i[d]});for(let d of f)St({[d]:{[s]:i[d]}})}}}r>0&&F0(r)}function gs(t,e){return Ne(`@keyframes ${t}{${vy(e)}}`,void 0,"keyframes"),t}function X0(){hs.clear(),q0=null,Ay=!1}function Dy(){return hs.size}L();var Pb={};M(Pb,{DELEGATED_EVENTS:()=>ws,LIFECYCLE_EVENTS:()=>rn,MIXINS:()=>Su,NON_BUBBLING_EVENTS:()=>xu,REGISTRY:()=>Nt,SVG_TAGS:()=>bs,addDelegatedEvent:()=>mc,addMethods:()=>Es,applyExtends:()=>xs,cacheNode:()=>en,create:()=>ne,createHTMLNode:()=>ys,detectTag:()=>tn,dispose:()=>vr,flushMounts:()=>Cc,globalEventKeyInfo:()=>ku,isSvgTag:()=>_s,isValidTag:()=>ms,refreshContextProto:()=>Du,registerEvent:()=>Ss,registerGlobalEvent:()=>vu,remove:()=>Cs,removeDelegatedEvent:()=>yc,update:()=>ks});var Iy="http://www.w3.org/2000/svg",bs=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"]),f2=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 ms(t){return f2.has(t)||bs.has(t)}function _s(t){return bs.has(t)}function tn(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"&&ms(e))return e;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),ms(o)&&!n.has(o)?o:"div"}var Z0={};function ys(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(_s(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===Iy)return r.createElementNS(Iy,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function en(t){let e=t.tag=tn(t),n=_s(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Iy)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=Z0[n];if(s||(s=Z0[n]=ys(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?ys(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var Nt=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","srcObject","allowRuntimeTemplates","__name","__ref","__hash","__text","parent","node"]),Su={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},rn=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"]),xu=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"]),$y=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),ws=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 Fy=new WeakMap,u2={passive:!0},d2={passive:!0,capture:!0},Ny=(t,e)=>$y.has(t)?e?d2:u2:e||!1;function tk(t){let e=Fy.get(t);return e||(e={handlers:new Map,installed:new Set},Fy.set(t,e)),e}function p2(t,e){let r=tk(e);if(r.installed.has(t))return;r.installed.add(t);let n=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave",o=t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave";e.addEventListener(t,s=>{if(o){let a=s.target,c=r.handlers.get(t),l=c&&a?c.get(a):null;if(!l||s.relatedTarget&&typeof a.contains=="function"&&a.contains(s.relatedTarget))return;l(s);return}let i=s.target;for(;i&&i!==e;){let a=r.handlers.get(t);if(a){let c=a.get(i);if(c&&(c(s),s.cancelBubble))return}i=i.parentNode}},Ny(t,n))}function mc(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=tk(n);p2(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function yc(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=Fy.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function J0(t){return ws.has(t)&&!rn.has(t)}function ek(t,e){let{context:r}=t,n=r?.designSystem;return o=>{n&&at(n);try{let s=e.call(t,o,t,t.state,r);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{n&&ot()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),r?.strictMode)throw s}n&&ot()}}function Ss(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=ek(e,r),i=xu.has(t);if(!i&&J0(t)){let a=o?.rootNode||n.ownerDocument?.documentElement;mc(t,n,s,a)}else n.addEventListener(t,s,Ny(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&J0(t)){let a=o?.rootNode||n.ownerDocument?.documentElement;yc(t,n,a)}else n.removeEventListener(t,s,Ny(t,!1))})}var My=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function ku(t){if(typeof t!="string")return null;for(let e=0;e<My.length;e++){let r=My[e][0];if(t.length<=r.length||!t.startsWith(r))continue;let n=t.charCodeAt(r.length);if(!(n<65||n>90))return{target:My[e][1],eventName:t.slice(r.length).toLowerCase()}}return null}var h2=/^[A-Za-z_$][\w$]*$/;function g2(t,e,r){let n=e,o=!1,s,i=!1,a=null;if(e&&typeof e=="object"&&typeof e!="function"&&(n=e.handler,o=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive),typeof e.query=="string"&&(a=e.query)),typeof n=="string"&&h2.test(n)){let c=n;n=function(f){return t.call(c,f)}}return typeof n!="function"?null:(s===void 0&&(s=$y.has(r)),{handler:n,capture:o,passive:s,once:i,query:a})}function m2(t,e,r){let n=t.node?.ownerDocument||t.context?.document||(typeof document<"u"?document:null);if(!n||typeof n.addEventListener!="function")return null;if(e==="document")return n;let o=n.defaultView||(typeof window<"u"?window:null);if(!o)return null;if(e==="window")return typeof o.addEventListener=="function"?o:null;if(e==="visualViewport"){let s=o.visualViewport;return s&&typeof s.addEventListener=="function"?s:null}if(e==="mediaQuery"){let s=r&&r.query;if(typeof s!="string"||!s.trim()||typeof o.matchMedia!="function")return null;try{return o.matchMedia(s)||null}catch{return null}}return null}function y2(t,e,r,n){try{return t.addEventListener(e,r,n),!0}catch{return typeof t.addListener=="function"?(t.addListener(r),!0):!1}}function b2(t,e,r,n){try{t.removeEventListener(e,r,n)}catch{typeof t.removeListener=="function"&&t.removeListener(r)}}function _2(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 vu(t,e,r){if(e.__ref){if(Array.isArray(r)){if(t.target!=="mediaQuery")return;for(let o=0;o<r.length;o++)Q0(t,e,r[o]);return}Q0(t,e,r)}}function Q0(t,e,r){let n=e.__ref,o=g2(e,r,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change")return;let s=m2(e,t.target,o);if(!s)return;let i=t.target+":"+(o.query?o.query+":":"")+t.eventName+":"+(o.capture?1:0);if(n.__globalEvents&&n.__globalEvents.has(i))return;let a=ek(e,o.handler),c=f=>{_2(e)&&a(f)},l={capture:o.capture,passive:o.passive,once:o.once};y2(s,t.eventName,c,l)&&(n.__globalEvents||(n.__globalEvents=new Map),n.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:c,options:l}),n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>{b2(s,t.eventName,c,l),n.__globalEvents&&n.__globalEvents.delete(i)}))}function rk(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 xs(t,e,r){let n=rk(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let a=nk(n[i],s);a&&a!==e&&ok(t,a,r,new Set([e]))}}function nk(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(o=>o.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function ok(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=rk(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=nk(o[a],i);c&&ok(t,c,r,n)}}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]=sk(t[s],i):t[s]=i}}function sk(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=sk(o,s):r[n]=s}return r}Rn();L();var w2=["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"],Cu={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"]},ak=["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"],ir=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()):ck(t),S2=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),ck=t=>S2.has(t)?t.toLowerCase():null,x2=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),ar=t=>typeof t=="string"&&(x2.has(t)||t.startsWith("aria-")),re=(t,e)=>e!==!0&&e!==!1?e:ar(t)?e?"true":"false":e===!0?"":e,Te=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||ir(e)||Cu.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Cu,t)?Cu[t].includes(e):!1,By=t=>{if(!x(t))return!1;let e=t.toLowerCase();return ak.includes(e)},k2=(t,e,r)=>{let n={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(r&&o in r)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])Tt(e[o][a])&&(n["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(Tt(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());n["data-"+c]=e[o][a]}continue}let s=Te(t,o),i=By(o);if(Tt(e[o])&&(s||i)){let a=ir(o)||o;n[a]=e[o]}}return n},v2=(t,e)=>{let r={};if(t.attr)for(let n in t.attr)r[n]=t.attr[n](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let o=t.aria[n];typeof o=="function"&&(r["aria-"+n]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let n in t.data){let o=t.data[n];if(typeof o=="function"){let s=n.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=o(e,e.state,e.context)}}return r},nn=(t,e)=>{let r=t.call("exec",e,t);if(r)return x(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},jy=(t,e)=>{let r=(t.preSrc||"")+(nn(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=t;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},ro={src:t=>jy(t,t.src),href:t=>nn(t,t.href),action:t=>nn(t,t.action),poster:t=>jy(t,t.poster),data:t=>nn(t,t.data)},Vy=t=>{let e=t.tag||"div",r={};for(let n in ro)if(t[n]!==void 0&&Te(e,n)){let o=ro[n](t);o!==void 0&&(r[n]=o)}return r},ik=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return R(r)?r.call(e,e):!!r},C2=(t,e,r)=>{if(t==="$"){let o=ik(e,r);return o===void 0&&(o=!!r[e]),o}let n=r[e]===!0||r.state[e];if(!n){let o=ik(e,r);o!==void 0&&(n=o)}return t==="."?!!n:!n},E2=new Set(["$",".","!"]),A2=(t,e,r)=>{let n={},o=(s,i,a,c)=>{let l=i;n[s]=f=>{if(C2(a,c,f))return R(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!E2.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 g in a[l])o("aria-"+g,a[l][g],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let g in a[l]){let h=g.replace(/([A-Z])/g,p=>"-"+p.toLowerCase());o("data-"+h,a[l][g],i,c)}continue}let f=Te(e,l),u=By(l);if(!f&&!u)continue;let d=ir(l)||l;o(d,a[l],i,c)}}return n};function ks(t={},e={}){let r=this,n=r.__ref;if(!n)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&Uy(n))try{let i=r.onBeforeUpdate(r,r.state,r.context,e);if(i&&typeof i.then=="function")i.then(()=>kr(n,!1),a=>{kr(n,!0),r.context?.plugins?.length&&Ot("error",r,{hook:"onBeforeUpdate",error:a})||console.error("[DOMQL] onBeforeUpdate error:",a)});else if(kr(n,!1),i===!1)return r}catch(i){throw kr(n,!0),i}let o=!t||Object.keys(t).length===0,s=[];kl(()=>{if(t.state&&vt(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!n.__exec.text&&r.node&&vs(r,t.text??"")),t.html!==void 0&&(r.html=t.html,!n.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!n.__exec.style)for(let i in t.style){let a=t.style[i];if(a==null)continue;let c=i.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=String(a).replace(/\s*!important\s*$/,"");r.node.style.setProperty(c,l,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let i in t.attr){let a=t.attr[i];a==null||a===!1&&!ar(i)?r.node.removeAttribute(i):typeof a!="function"&&typeof a!="object"&&r.node.setAttribute(i,re(i,a))}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let i in t.data)r.node.dataset[i]=t.data[i];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let i in t){if(Nt.has(i)||i==="state")continue;let a=t[i],c=r[i];if(c&&c.__ref&&typeof c.update=="function")c.update(a,e);else if(typeof a=="object"&&a!==null){let l=i.charCodeAt(0);l>=65&&l<=90&&ne(a,r,i,e)}else i!=="text"&&i!=="html"&&i!=="style"&&i!=="attr"&&i!=="data"&&(r[i]=a,typeof a!="function"&&s.push(i))}});for(let i=0;i<s.length;i++)uk(r,s[i]);if(r.node){for(let i=0;i<s.length;i++)if(lk(s[i])){fk(r);break}}if(r.node&&o&&n.__effects&&n.__effects.length)for(let i=0;i<n.__effects.length;i++){let a=n.__effects[i];a&&!a._disposed&&!a._isSubscribeToEffect&&typeof a._execute=="function"&&a._execute()}else if(r.node&&n.__conditionalRunners)for(let i of n.__conditionalRunners)i();return Ot("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;let r=fr();if(r){Ke(null);try{return vr(t)}finally{Ke(r)}}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(typeof e.__releaseMedia=="function"&&(e.__releaseMedia(),e.__releaseMedia=null),e.__eventCleanup){for(let o=0;o<e.__eventCleanup.length;o++)e.__eventCleanup[o]();e.__eventCleanup.length=0}if(e.__children){let o=e.__children.slice();e.__children.length=0;for(let s=0;s<o.length;s++){let i=t[o[s]];i&&i.__ref&&vr(i)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let n=t.state?.$destroy||t.state?.destroy;if(typeof n=="function"&&t.state.__element===t&&n.call(t.state),t.parent?.__ref?.__children){let 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 Cs(){vr(this)}L();L();L();var T2=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],O2=["none","forwards","backwards","both"],R2=["normal","reverse","alternate","alternate-reverse"],P2=["running","paused"],D2=t=>/^[\d.]+m?s$/.test(t),L2=/^(?: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*\))$/,I2=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(n=>L2.test(n.replace(/\s+/g,"")))},dk=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),$2={transform:I2,translate:dk,rotate:t=>dk(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},M2=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},F2=t=>{if(!v(t))return null;let e=null,r=-1;for(let n in t){let o=M2(n);o==null||!v(t[n])||o>=r&&(r=o,e=t[n])}return e},N2=t=>{let e=F2(t);if(!e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let n of r){let o=$2[n];if(!o)return!1;let s=e[n];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},j2=(t,e)=>{if(v(t))return t;let{animation:r}=e.context&&e.context.designSystem||{},n=r&&r[t];return v(n)?n:null},B2=["reverse","alternate","alternate-reverse"],pk=(t,e,r)=>{let n=r||e.animationDirection;return n&&B2.includes(String(n))?"both":N2(j2(t,e))?"backwards":"both"},V2=0,hk=new Map,zy=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(v(t)){let o=JSON.stringify(t),s=hk.get(o);if(s)return s;let i=`smbls-anim-${V2++}`,a=gs(i,t);return hk.set(o,a),a}let n=r&&r[t];return v(n)?gs(t,n):t},U2=t=>{let e=[],r=0,n="";for(let o of String(t).trim())o==="("?r++:o===")"&&r>0&&r--,r===0&&/\s/.test(o)?(n&&e.push(n),n=""):n+=o;return n&&e.push(n),e},z2=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=U2(t),o=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of n)r&&r[u]?o=u:D2(u)?s.push(u):T2.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")||u.startsWith("linear(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):R2.includes(u)?c=u:O2.includes(u)?l=u:P2.includes(u)?f=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},Hy={animation:(t,e)=>{if(t!=null){if(x(t)&&t.includes(" ")){let r=z2(t,e);return{animationName:zy(r.name||t,e),animationDuration:r.durations[0]||he(e.animationDuration||"A").timing,animationDelay:r.durations[1]||he(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||Ae(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||pk(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:zy(t,e),animationDuration:he(e.animationDuration||"A").timing,animationDelay:he(e.animationDelay||"0s").timing,animationTimingFunction:Ae(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||pk(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:zy(t,e)}),animationDuration:t=>({animationDuration:he(t).timing}),animationDelay:t=>({animationDelay:he(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Ae(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};L();var Eu=(t,e,r)=>{if(typeof e=="number"&&(e=String(e)),!x(e))return;let[n,o]=ht(e);return{...$(t+"Start",n,r),...$(t+"End",o||n,r)}},Wy={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>$("height",t,e),width:(t,e)=>$("width",t,e),boxSizing:t=>Pt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!x(t))return;let[e,r]=ht(t);return{...Ct("height",e),...Ct("width",r||e)}},inlineSize:(t,e)=>$("inlineSize",t,e),blockSize:(t,e)=>$("blockSize",t,e),minWidth:(t,e)=>$("minWidth",t,e),maxWidth:(t,e)=>$("maxWidth",t,e),widthRange:t=>{if(!x(t))return;let[e,r]=ht(t);return{...Ct("minWidth",e),...Ct("maxWidth",r||e)}},minHeight:(t,e)=>$("minHeight",t,e),maxHeight:(t,e)=>$("maxHeight",t,e),heightRange:t=>{if(!x(t))return;let[e,r]=ht(t);return{...Ct("minHeight",e),...Ct("maxHeight",r||e)}},size:t=>{if(!x(t))return;let[e,r]=ht(t);return{...$("inlineSize",e),...$("blockSize",r||e)}},minBlockSize:(t,e)=>$("minBlockSize",t,e),minInlineSize:(t,e)=>$("minInlineSize",t,e),maxBlockSize:(t,e)=>$("maxBlockSize",t,e),maxInlineSize:(t,e)=>$("maxInlineSize",t,e),minSize:t=>{if(!x(t))return;let[e,r]=ht(t);return{...Ct("minInlineSize",e),...Ct("minBlockSize",r||e)}},maxSize:t=>{if(!x(t))return;let[e,r]=ht(t);return{...Ct("maxInlineSize",e),...Ct("maxBlockSize",r||e)}},borderWidth:(t,e)=>$("borderWidth",t,e),borderTopWidth:(t,e)=>$("borderTopWidth",t,e),borderRightWidth:(t,e)=>$("borderRightWidth",t,e),borderBottomWidth:(t,e)=>$("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>$("borderLeftWidth",t,e),textDecorationThickness:(t,e)=>$("textDecorationThickness",t,e),textUnderlineOffset:(t,e)=>$("textUnderlineOffset",t,e),padding:(t,e)=>$("padding",t,e),paddingInline:t=>{if(!x(t))return;let[e,r]=ht(t);return{...Ct("paddingInlineStart",e),...Ct("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!x(t))return;let[e,r]=ht(t);return{...Ct("paddingBlockStart",e),...Ct("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>$("paddingBlockStart",t,e),paddingBottom:(t,e)=>$("paddingBlockEnd",t,e),paddingLeft:(t,e)=>$("paddingInlineStart",t,e),paddingRight:(t,e)=>$("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>$("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>$("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>$("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>$("paddingInlineEnd",t,e),margin:(t,e)=>$("margin",t,e),marginInline:t=>{if(!x(t))return;let[e,r]=ht(t);return{...Ct("marginInlineStart",e),...Ct("marginInlineEnd",r||e)}},marginBlock:t=>{if(!x(t))return;let[e,r]=ht(t);return{...Ct("marginBlockStart",e),...Ct("marginBlockEnd",r||e)}},marginTop:(t,e)=>$("marginBlockStart",t,e),marginBottom:(t,e)=>$("marginBlockEnd",t,e),marginLeft:(t,e)=>$("marginInlineStart",t,e),marginRight:(t,e)=>$("marginInlineEnd",t,e),marginInlineStart:(t,e)=>$("marginInlineStart",t,e),marginInlineEnd:(t,e)=>$("marginInlineEnd",t,e),marginBlockStart:(t,e)=>$("marginBlockStart",t,e),marginBlockEnd:(t,e)=>$("marginBlockEnd",t,e),scrollMargin:(t,e)=>$("scrollMargin",t,e),scrollMarginTop:(t,e)=>$("scrollMarginTop",t,e),scrollMarginRight:(t,e)=>$("scrollMarginRight",t,e),scrollMarginBottom:(t,e)=>$("scrollMarginBottom",t,e),scrollMarginLeft:(t,e)=>$("scrollMarginLeft",t,e),scrollMarginBlock:(t,e)=>Eu("scrollMarginBlock",t,e),scrollMarginInline:(t,e)=>Eu("scrollMarginInline",t,e),scrollMarginBlockStart:(t,e)=>$("scrollMarginBlockStart",t,e),scrollMarginBlockEnd:(t,e)=>$("scrollMarginBlockEnd",t,e),scrollMarginInlineStart:(t,e)=>$("scrollMarginInlineStart",t,e),scrollMarginInlineEnd:(t,e)=>$("scrollMarginInlineEnd",t,e),scrollPadding:(t,e)=>$("scrollPadding",t,e),scrollPaddingTop:(t,e)=>$("scrollPaddingTop",t,e),scrollPaddingRight:(t,e)=>$("scrollPaddingRight",t,e),scrollPaddingBottom:(t,e)=>$("scrollPaddingBottom",t,e),scrollPaddingLeft:(t,e)=>$("scrollPaddingLeft",t,e),scrollPaddingBlock:(t,e)=>Eu("scrollPaddingBlock",t,e),scrollPaddingInline:(t,e)=>Eu("scrollPaddingInline",t,e),scrollPaddingBlockStart:(t,e)=>$("scrollPaddingBlockStart",t,e),scrollPaddingBlockEnd:(t,e)=>$("scrollPaddingBlockEnd",t,e),scrollPaddingInlineStart:(t,e)=>$("scrollPaddingInlineStart",t,e),scrollPaddingInlineEnd:(t,e)=>$("scrollPaddingInlineEnd",t,e),gap:t=>({gap:lu(t)}),columnGap:(t,e)=>Ce(e,"columnGap",t),rowGap:(t,e)=>Ce(e,"rowGap",t),flexWrap:t=>{if(t!=null)return{display:"flex",flexWrap:t}},flexFlow:(t,e)=>{let r=e.reverse;if(!x(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!x(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>Sr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Sr(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>Sr(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>Sr(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>Sr(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>Sr(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var qy={fontSize:t=>oc(t)||t,fontFamily:t=>({fontFamily:rc(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 Ky={overflow:t=>({overflow:t}),cursor:(t,e,r,n)=>{if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=n.files&&n.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 Gy={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:ht(t).map(r=>Et(r,"k").k).join(" ")}},left:t=>Et(t,"left"),top:t=>Et(t,"top"),right:t=>Et(t,"right"),bottom:t=>Et(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=ht(t).map(r=>Et(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=ht(t).map(r=>Et(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};L();var Au=0,Tu=()=>{Au++},Ou=()=>{Au>0&&Au--},me=({context:t,state:e})=>{let r=t?.designSystem,n=e?.root?.globalTheme||r?.globalTheme;return n&&n!=="auto"?n:Au>0?null:r&&r.resolvedTheme||null},oe=(t,e)=>{if(e==null||e==="")return;if(!v(e))return{[t]:e};let r={},n=!1;for(let o in e){let s=e[o];if(!(s==null||s==="")){if(v(s)){let i=oe(t,s);i&&(r[o]=i,n=!0);continue}r[o]={[t]:s},n=!0}}return n?r:void 0},Yy={theme:(t,e)=>{if(t)return e.themeModifier?Ee(t,`@${e.themeModifier}`):Ee(t)},color:(t,e)=>{let r=me(e);if(t)return oe("color",It(t,r))},background:(t,e)=>{let r=me(e);if(t)return x(t)&&t.includes("gradient")&&t.includes("(")?{background:dc(t,r)}:oe("background",It(t,r))},backgroundColor:(t,e)=>{let r=me(e);if(t)return oe("backgroundColor",It(t,r))},backgroundImage:(t,e,r,n)=>{let o=me(e);if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=s.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return oe("backgroundImage",cu(t,o))},textStroke:t=>{let e=iu(t);if(e!=null)return{WebkitTextStroke:e}},outline:t=>({outline:sr(t)}),outlineWidth:(t,e)=>$("outlineWidth",t,e),outlineColor:(t,e)=>{let r=me(e);if(t)return oe("outlineColor",It(t,r))},outlineOffset:(t,e)=>$("outlineOffset",t,e),border:t=>({border:sr(t)}),borderColor:(t,e)=>{let r=me(e);if(t)return oe("borderColor",It(t,r))},borderTopColor:(t,e)=>{let r=me(e);if(t)return oe("borderTopColor",It(t,r))},borderBottomColor:(t,e)=>{let r=me(e);if(t)return oe("borderBottomColor",It(t,r))},borderLeftColor:(t,e)=>{let r=me(e);if(t)return oe("borderLeftColor",It(t,r))},borderRightColor:(t,e)=>{let r=me(e);if(t)return oe("borderRightColor",It(t,r))},borderLeft:t=>({borderLeft:sr(t)}),borderTop:t=>({borderTop:sr(t)}),borderRight:t=>({borderRight:sr(t)}),borderBottom:t=>({borderBottom:sr(t)}),shadow:(t,e)=>{let r=me(e);if(t)return oe("boxShadow",au(t,r))},boxShadow:(t,e)=>{if(!x(t))return;let[r,n]=t.split("!importan"),o=me(e),s=n?" !important":"",i=uc(r.trim(),o);return x(i)?{boxShadow:i+s}:oe("boxShadow",i)},textShadow:(t,{context:e})=>oe("textShadow",uc(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:sr(t)})};var bc={transition:t=>{let e=uu(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:pc(t)}),transitionDelay:t=>({transitionDelay:pc(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Ae(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};L();var Xy={flow:(t,e)=>{let r=e.reverse;if(!x(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>{if(t!=null)return{display:"flex",flexWrap:t}},align:(t,e)=>{if(!x(t))return;let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};L();var H2=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,gk=t=>{if(!x(t))return t;let e=A().sizes;return e?t.replace(H2,(r,n,o)=>{let s=e[o];return s==null?r:n+String(s)}):t},cr=t=>gk(fu(t)),Zy={gridTemplateColumns:t=>({gridTemplateColumns:cr(t)}),gridTemplateRows:t=>({gridTemplateRows:cr(t)}),gridAutoColumns:t=>({gridAutoColumns:cr(t)}),gridAutoRows:t=>({gridAutoRows:cr(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:cr(t)}),templateColumns:t=>({gridTemplateColumns:cr(t)}),autoColumns:t=>({gridAutoColumns:cr(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:cr(t)}),templateRows:t=>({gridTemplateRows:cr(t)}),autoRows:t=>({gridAutoRows:cr(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var xt={...Hy,...Wy,...qy,...Ky,...Gy,...Yy,...bc,...Xy,...Zy};var At=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","interpolateSize","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollMargin","scrollMarginBlock","scrollMarginBlockEnd","scrollMarginBlockStart","scrollMarginBottom","scrollMarginInline","scrollMarginInlineEnd","scrollMarginInlineStart","scrollMarginLeft","scrollMarginRight","scrollMarginTop","scrollPadding","scrollPaddingBlock","scrollPaddingBlockEnd","scrollPaddingBlockStart","scrollPaddingBottom","scrollPaddingInline","scrollPaddingInlineEnd","scrollPaddingInlineStart","scrollPaddingLeft","scrollPaddingRight","scrollPaddingTop","scrollSnapAlign","scrollSnapStop","scrollSnapType","scrollTimeline","scrollTimelineAxis","scrollTimelineName","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","textWrap","textWrapMode","textWrapStyle","timelineScope","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","viewTimeline","viewTimelineAxis","viewTimelineInset","viewTimelineName","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);L();var W2=/^-?[A-Z][0-9]?$/,q2=/^[a-z][0-9]?$/,mk=/var\(\s*(--[A-Za-z0-9-]+)/g,K2=t=>{let e=new Set,r=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:r};for(let n in t){let o=t[n];if(!(!o||typeof o!="object")){if(o.sequence&&typeof o.sequence=="object")for(let s in o.sequence)e.add(s);if(o.vars&&typeof o.vars=="object")for(let s in o.vars)r.add(s)}}return{knownLetters:e,knownVars:r}},G2=(t,e)=>{if(!e.size)return[];let r=t.split(/[(),\s]+/).filter(Boolean),n=new Set;for(let o of r){if(!W2.test(o))continue;let s=o.charCodeAt(0)===45?o.slice(1):o;e.has(s)&&n.add(o)}return[...n]},Y2=(t,e)=>{if(!e.size)return[];let r=[];mk.lastIndex=0;let n;for(;n=mk.exec(t);){let o=n[1];if(e.has(o))continue;let s=o.lastIndexOf("-");if(s===-1)continue;let i=o.slice(s+1);if(!q2.test(i))continue;let a=o.slice(0,s+1)+i.toUpperCase();a!==o&&e.has(a)&&r.push({varName:o,corrected:a})}return r},Ru=new Set,yk=(t,e,r)=>{if(!mt()||!x(e)||!e)return;let n;try{n=A()}catch{return}let{knownLetters:o,knownVars:s}=K2(n);if(!o.size&&!s.size)return;let i=G2(e,o),a=Y2(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}`;Ru.has(f)||(Ru.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}`;Ru.has(u)||(Ru.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}"`))}};L();var X2=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,Z2=(t,e,r)=>{let{context:n}=r;if(!n.designSystem?.media)return;let o=t.slice(1),s=n.designSystem.media[o],i=se(e,r);if(!s)return{[t]:i};if(/^@(media|supports|container)\b/.test(s))return{[s]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(X2),c=a?a[1]||a[2]:o,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=n.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},bk=(t,e,r)=>({[t]:se(e,r)}),_c=(t,e,r)=>{let n=`&${t}`,o=se(e,r);if(t.includes(",")&&o){let s={},i={};for(let a in o)typeof o[a]=="object"&&o[a]!==null?i[a]=o[a]:s[a]=o[a];if(Object.keys(i).length){let a=n.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[n]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[n]:o}},Jy=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return R(r)?r.call(e,e):!!r},J2=(t,e,r)=>{let n=t.slice(1),o=Jy(n,r);if(o===void 0&&(o=!!r[n]),!!o)return se(e,r)},Q2=(t,e,r)=>({[t]:e}),tD=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=Jy(n,r);s!==void 0&&(o=s)}if(o)return se(e,r)},eD=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=Jy(n,r);s!==void 0&&(o=s)}if(!o)return se(e,r)},Qy=(t,e)=>se(t,e),tb={"@":Z2,":":_c,"[":_c,"*":_c,"+":_c,"~":_c,"&":bk,">":bk,$:J2,"-":Q2,".":tD,"!":eD};var Pu=Nr(),_k=(t,e,r)=>{let n=e?.context?.designSystem;n&&at(n);try{let o={},s={},i=(a,c)=>{if(r.unpack){o={...o,...c};return}o[a]=c};for(let a in t){let c=t[a];if(c!==null)if(a==="class"&&x(c)){let l=wk(c,e);l&&(r.unpack?_t(o,l):o.designSystemClass=l)}else if(a==="true"){let l=pt(c,e);_t(o,Qy(l,e))}else if(e.classlist?.[a]){let l=e.classlist[a],f=R(l)?l(e,e.state,e.context):l;f&&i(a,f),!Pu&&v(o[a])&&(o[a].label=a)}else if(xt[a]){let l=pt(c,e);if(l===null)continue;P(l)&&(l=l.reduce((u,d)=>_t(u,d),{}));let f=xt[a](l,e,e.state,e.context);P(f)&&(f=f.reduce((u,d)=>_t(u,d),{})),f&&i(a,f),!Pu&&v(o[a])&&(o[a].label=a)}else if(At.has(a)){let l=pt(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),Pu||yk(a,l,e),i(a,{[a]:l}),!Pu&&v(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{n&&ot()}},wk=(t,e)=>{if(!x(t))return;let r=e?.context?.designSystem?.class;if(!r)return;let n;for(let o of t.split(" ")){if(!o)continue;let s=r[o];if(!v(s))continue;let i=ft(s);n=n?Ht(n,i):i}if(n)return se(n,e)},Sk=(t,e)=>{let r={};for(let n in t){let o=tb[n.slice(0,1)];if(o){let s=o(n,t[n],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?Ht(r[i],s[i]):r[i]=s[i])}}return r},se=(t,e,r={unpack:!0})=>{let[n,o]=_k(t,e,r),s=Sk(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return Pi(n,s);n._selectors=s}return n},rD=(t,e)=>{let r={};if(t.class)for(let n in t.class)r[n]=t.class[n](e);return r};L();var xk=t=>{if(v(t))return se(t,t)},nD=(t,e)=>{let r=xk(t);return typeof e=="function"?e(r):ge(r)};L();L();function nb(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:o||null,args:r})}var kk=new Set;function vk(t,e,r){let n=String(e);if(kk.has(n))return;kk.add(n);let o=t?.__ref?.path,s=Array.isArray(o)&&o.length?o.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('${n}') at <${s}>: "${n}" ${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.`;nb(t,"error",[a]),console.error(a)}var Ek=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),oD=new Set,Ak=t=>Ek(eb,t)&&!(Oo||oD).has(t),Ck=new Set;function Tk(t,e){Ck.has(t)||(Ck.add(t),mt()&&console.warn(`[smbls] ${e}: context.methods.${t} is named like a built-in element method and is not the app's own override (it was not on the element prototype when it was built) \u2014 ignored; the built-in keeps winning. Declare an intentional override in the app's OWN methods.`))}function sD(...t){return nb(this,"warn",t),ga.apply(this,t)}function iD(...t){return nb(this,"error",t),Ln.apply(this,t)}var eb={update:ks,remove:Cs,getDB:_a,getQuery:wa,getRootData:da,getPath:ca,nextElement:ma,previousElement:ya,verbose:Uo,warn:sD,error:iD,variables:ba,spotByPath:aa,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 n=this.context?.__create;n&&n(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let n=r.__setQueued;n&&(r.__setQueued=null,this.set(n.content,n.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),e(o,r,n,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 n=this[r];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;let o=n.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let o=this[n];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(t){return t?this.__ref&&this.__ref[t]:this.__ref},getChildren(){let t=this.__ref&&this.__ref.__children;return Array.isArray(t)?t.map(e=>this[e]):[]},getRoot:ua,getRootState:fa,getRootContext:pa,getContext:ha,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){e[o]=n[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(e[n]=this[n].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 n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(t,...e){let r=this.context,n=Ak(t);n&&r?.methods?.[t]&&r.methods[t]!==this[t]&&Tk(t,"el.call");let o=n?this[t]:r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof o=="function"){let s=Cn;if(!s||!s(o))return o.call(this,...e);mt()&&vk(this,t,le(o));return}mt()&&vk(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)}},rb=new WeakMap;function aD(t){if(!t)return eb;let e=rb.get(t);if(e)return e;e=Object.create(eb);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return rb.set(t,e),e}function Es(t){let e=aD(t.context);Object.setPrototypeOf(t,e)}function Du(t){if(!t)return!1;let e=rb.get(t);if(!e)return!1;let r=t.methods;if(!r)return!1;for(let n in r){if(Ak(n)&&!Ek(e,n)){Tk(n,"refreshContextProto");continue}e[n]=r[n]}return!0}var Lu=[],Iu=!1,on=0;function $u(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function Ok(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 ob(){return on?$u()-on>=50:!1}var As=0;function sb(){As===0&&!on&&(on=$u()),As++}function ib(){As>0&&As--,As===0&&!Iu&&(on=0)}function ab(t){Lu.push(t),Iu||(Iu=!0,Ok(Rk))}function Rk(){for(on=$u();Lu.length;){let t=Lu.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if($u()-on>=50)break}if(Lu.length){Ok(Rk);return}Iu=!1,on=0,As=0}L();L();Rn();var db={};M(db,{STATE_METHODS:()=>Pk,applyInitialState:()=>Fu,applyStateMethods:()=>ye,callStateMethod:()=>wc,createState:()=>lb,isTracking:()=>ub,useHostState:()=>fb});var Pk=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"]),Mu=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Be=(t,e,r,{onlyIfAbsent:n}={})=>{Mu(t,"$"+e,r),!(n&&Object.prototype.hasOwnProperty.call(t,e))&&Mu(t,e,r)},wc=(t,e,...r)=>{if(!t)return;let n=t["$"+e];if(typeof n=="function")return n.apply(t,r);let o=t[e];if(typeof o=="function")return o.apply(t,r)},ye=(t,e)=>{if(vt(e)){let o=e.__raw||e;Be(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Be(o,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Be(o,"setByPath",function(s,i,a={}){let c=s.split("."),l=e;for(let f=0;f<c.length-1;f++)l[c[f]]===void 0&&(l[c[f]]={}),l=l[c[f]];return l[c[c.length-1]]=i,e}),Be(o,"getByPath",function(s){let i=s.split("."),a=e;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a}),Be(o,"removeByPath",function(s,i={}){let a=s.split("."),c=e;for(let l=0;l<a.length-1;l++){if(c==null)return e;c=c[a[l]]}return c&&delete c[a[a.length-1]],e}),Be(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Be(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Be(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Be(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&vt(a.parent);)a=a.parent;return wc(a,"update",s,i)}),Be(o,"parentUpdate",function(s,i={}){if(e.parent)return wc(e.parent,"update",s,i)}),Be(o,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=vt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,vt(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},n={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.$update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;r();for(let s in o)e[s]=o[s];return e},replace(o){return e.$set(o)},clean(){return r(),e}};for(let o in n)if(Mu(e,"$"+o,n[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){Cl(o,"");continue}Mu(e,o,n[o])}};var lb=function(t,e,r){return t.state=Fu(t,e,r),t.state},Fu=function(t,e,r){let{__ref:n}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return ye(t,s),s}if(typeof o=="string")return n&&(n.__state=o),n.__stateType="string",cD(o,t,e);if(typeof o=="number"||typeof o=="boolean"){n&&(n.__state=o,n.__stateType=typeof o,n.__hasRootState=!0);let s=ur({value:o});return s.__element=t,e?.state&&(s.parent=e.state),ye(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!vt(o)){n&&(n.__hasRootState=!0),o.isRootState&&n&&(n.__hasRootState=!0);let s=ur({...o});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),ye(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return vt(o)?(o.__element=t,o):e?.state||{}};function cb(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function cD(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let o=t.slice(3),s=r.state?.parent;return o&&s?cb(s,o):s??r.state??{}}if(t.startsWith("~/")){let o=r.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?cb(o,s):o??{}}let n=cb(r.state,t);if(n&&typeof n=="object"&&!vt(n)&&!Object.getOwnPropertyDescriptor(n,"root")){let o=r.state?.root||r.state;Object.defineProperty(n,"root",{get:()=>o,enumerable:!1,configurable:!0})}return n}var fb=(t,e)=>{if(!t)return Lk;let r=fD(t,e);return!r||!r.state?Lk:dD(r.state)},ub=()=>fr()!=null,lD=128;function fD(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,n=t,o=null;for(let s=0;s<lD&&n;s++){if(r(n)&&n.state)return n;if(n.state&&!o&&(o=n),!n.parent||n.parent===n)break;n=n.parent}return o}var uD={get(t,e){return t[e]}},Dk=new WeakMap,dD=t=>{let e=Dk.get(t);return e||(e=new Proxy(t,uD),Dk.set(t,e)),e},Lk=new Proxy(Object.create(null),{get(){},has(){return!1}});var Nu="3.14.798";var Ik="__SMBLS_ELEMENT_ID_ENGINE__",$k=(t,e,r)=>{let n=e||Nu,o=r||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[Ik];return s&&s.engine&&s.version===n?s.engine:(s||(o[Ik]={version:n,engine:t}),t)};var K=(t,e)=>e.split(" ").map(r=>t+"-"+r),pb="top right bottom left",hb=pb+" block block-start block-end inline inline-start inline-end",sn="start end",no="width style color",ju=t=>K(t,hb),pD=(()=>{let t=K("border","width style color image");for(let e of hb.split(" "))t.push("border-"+e,...K("border-"+e,no));return t})(),Mk=t=>[...K("border-"+t,no+" start end"),...K("border-"+t+"-start",no),...K("border-"+t+"-end",no)],Cr={animation:K("animation","name duration timing-function delay iteration-count direction fill-mode play-state timeline range range-start range-end"),background:K("background","image position position-x position-y size repeat origin clip attachment color"),border:pD};for(let t of["width","style","color"])Cr["border-"+t]=hb.split(" ").map(e=>"border-"+e+"-"+t);for(let t of pb.split(" "))Cr["border-"+t]=K("border-"+t,no);Cr["border-block"]=Mk("block");Cr["border-inline"]=Mk("inline");Object.assign(Cr,{"border-image":K("border-image","source slice width outset repeat"),"border-radius":"top-left top-right bottom-right bottom-left start-start start-end end-start end-end".split(" ").map(t=>"border-"+t+"-radius"),columns:K("column","width count"),"column-rule":K("column-rule",no),container:K("container","name type"),"contain-intrinsic-size":K("contain-intrinsic","width height"),flex:K("flex","grow shrink basis"),"flex-flow":K("flex","direction wrap"),font:[...K("font","style variant weight stretch size"),"line-height",...K("font","family size-adjust kerning feature-settings variation-settings optical-sizing")],gap:["row-gap","column-gap"],grid:K("grid","template template-rows template-columns template-areas auto-rows auto-columns auto-flow"),"grid-template":K("grid-template","rows columns areas"),"grid-area":K("grid","row column row-start row-end column-start column-end"),"grid-row":K("grid-row",sn),"grid-column":K("grid-column",sn),inset:[...pb.split(" "),...K("inset","block block-start block-end inline inline-start inline-end")],"inset-block":K("inset-block",sn),"inset-inline":K("inset-inline",sn),"list-style":K("list-style","type position image"),margin:ju("margin"),"margin-block":K("margin-block",sn),"margin-inline":K("margin-inline",sn),mask:K("mask","image mode repeat position clip origin size composite"),offset:K("offset","position path distance rotate anchor"),outline:K("outline",no),overflow:K("overflow","x y"),"overscroll-behavior":K("overscroll-behavior","x y"),padding:ju("padding"),"padding-block":K("padding-block",sn),"padding-inline":K("padding-inline",sn)});for(let t of["content","items","self"])Cr["place-"+t]=["align-"+t,"justify-"+t];Object.assign(Cr,{"scroll-margin":ju("scroll-margin"),"scroll-padding":ju("scroll-padding"),"text-decoration":K("text-decoration","line style color thickness"),"text-emphasis":K("text-emphasis","style color"),transition:K("transition","property duration timing-function delay behavior")});var Sc={};for(let t in Cr)for(let e of Cr[t])(Sc[e]||(Sc[e]=[])).push(t);var hD=new Set(["rows","cols","wrap"]),Bu=(t,e)=>hD.has(e)&&Te(t,e),Ts=(t,e)=>!!(xt[e]||At&&At.has(e))&&!Bu(t,e);var tv=$k({uniqId:1,scopedStyleId:0},Nu),kc=[],oo=new Set,Eb=!1,ev=0,Rs=null,Oc=null;function Ps(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function rv(){return typeof document<"u"&&document.visibilityState==="hidden"}var gD=250,mD=1e3;function yD(){return Oc&&(Oc!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||rv())?!0:Ps()-ev>=mD}function bD(){if(Eb=!0,ev=Ps(),Oc=null,typeof requestAnimationFrame!="function"){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(Cc,0);Rs=t?()=>t(e):null;return}if(rv()){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(Cc,gD);Rs=t?()=>t(e):null}else{let t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;Oc=requestAnimationFrame;let e=requestAnimationFrame(Cc);Rs=t?()=>t(e):null}}function Gu(){if(Eb){if(!yD())return;let t=Rs;if(Rs=null,t)try{t()}catch{}}bD()}var nv=300,ov=15e4;function Cc(){if(Eb=!1,Rs=null,Oc=null,oo.size&&ZD(),!kc.length)return;let t=kc.splice(0,kc.length);for(let e=0;e<t.length;e++){let r=t[e];if(r.node){if(!r.node.isConnected){let n=r.__ref||(r.__ref={});n.__mountAttempts=(n.__mountAttempts||0)+1,n.__mountFirstAttemptAt==null&&(n.__mountFirstAttemptAt=Ps());let o=Ps()-n.__mountFirstAttemptAt;n.__mountAttempts<=nv&&o<ov?(kc.push(r),Gu()):console.warn("[DOMQL] onMounted dropped after",n.__mountAttempts,"attempts /",o,"ms \u2014 node never connected:",r.key||r.tag||r);continue}ie("Mounted",r,r.__ref?.__mountOptions||{})}}}function bb(t,e){let r=t.__ref?.__autoGrow;r&&r.active&&Pc(t,!0),typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,kc.push(t),Gu())}function Fk(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&Ot("contentUpdate",t,e);let r=t.context?.designSystem;r&&at(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(n){if(t.context?.plugins?.length&&Ot("error",t,{hook:"onContentUpdate",error:n})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',n),t.context?.strictMode)throw n}finally{r&&ot()}}function Er(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function _D(t){return t.charAt(2).toLowerCase()+t.slice(3)}function wD(t){return t.toLowerCase()}function _b(t){let e=t.charCodeAt(0);return e===58||e===64||e===38||e===91}function vc(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=vc(o,s):r[n]=s}return r}function Hu(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function sv(t,e,r){return Hu(t)||(e&&typeof e=="object"?Hu(e.key):void 0)||String(r)}function ne(t,e,r,n={},o){let s=fr();if(s){Ke(null);try{return ne(t,e,r,n,o)}finally{Ke(s)}}if(t==null||t===!1)return null;let i=DD(t);(typeof t=="string"||typeof t=="number")&&(t={text:t}),r=Hu(r);let a=Hu(t.key),c=Object.create(null);c.key=r||a||`_${tv.uniqId++}`,c.parent=e||null,c.context=t.context||e?.context||n.context||{},c.context.__create||(c.context.__create=ne);let l=c.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||c,path:e?.__ref?.path?[...e.__ref.path,c.key]:[c.key],origin:t};i&&(l.__runtimeSource=i);let f=t;if(t=iv(c,t,r,a,e,n),c.if!=null){let d;if(typeof c.if=="function")try{d=c.if(c,c.state,c.context)}catch(g){if(d=!1,l.__ifError=g,typeof console<"u"&&console.warn){let h=c.key||c.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${h} \u2014 treating as false:`,g?.message||g)}}else d=c.if;l.__if=!!d}if(l.__if)typeof c.if=="function"&&(l.__ifInitialized=!0);else{e&&(e[c.key]=c);let d=kD(t,r,c.context?.components);return d.length&&(l.__ifLateMerge={definition:f,key:r,ownKey:a,names:d,options:n}),typeof c.if=="function"&&fv(c,l,c.if),c}c.tag||(c.tag=tn(c)),ie("Init",c,n);let u=c.node=en(c);if(!u)return c;if(c.tag==="fragment"){let g=(c.context?.document||globalThis.document).createComment("");u.appendChild(g),l.__fragmentAnchor=g}ie("AttachNode",c,n),u.setAttribute&&c.key&&u.setAttribute("data-key",c.key),e&&(e[c.key]=c,e.__ref?.__children&&(e.__ref.__children.includes(c.key)||e.__ref.__children.push(c.key))),u.setAttribute&&c.context?.scopeSelector&&c.context.scopeSelector!==":root"&&c.context.key&&c.key===c.context.key&&u.setAttribute("data-smbls-app",c.context.key),c.id&&u.setAttribute&&(u.id=c.id),wv(c,n),lv(c),xb(c),yv(c),bv(c),eL(c);try{Sv(c,n)}catch(d){if(typeof console<"u"&&console.error){let g=c.__ref?.path?.join(".")||c.key||"<root>";console.error(`[smbls] createChildren failed at ${g}:`,d?.message||d,d?.stack?`
|
|
54
57
|
`+d.stack.split(`
|
|
55
58
|
`).slice(0,6).join(`
|
|
56
|
-
`):"")}}if(Uu(c,!0),ov(c,e,o),typeof c.html=="function"&&c.node&&!c.node.innerHTML){let d=c.context?.designSystem;d&&at(d);try{let g=c.html(c,c.state,c.context);g!=null&&typeof g!="function"&&(c.node.innerHTML=g)}catch{}finally{d&&ot()}}if(oe("Create",c,n),oe("Complete",c,n),oe("Render",c,n),oe("RenderRouter",c,n),ub(c,n),typeof c.onFrame=="function"){let d=c.onFrame,g=c.context?.designSystem,p=()=>{if(c.node){if(c.node.isConnected){g&&at(g);try{d(c,c.state,c.context)}catch(h){console.error("[DOMQL] onFrame error:",h)}finally{g&&ot()}}requestAnimationFrame(p)}};requestAnimationFrame(p)}return c}function Uk(t,e,r,n,o,s){if(r&&!e.extends&&!e.extend){let h=r.indexOf("_"),m=r.indexOf("."),y=h>0?h:-1;if(m>0&&(y<0||m<y)&&(y=m),y>0){let x=r.substring(0,y),b=t.context?.components;b&&(b[x]||b["smbls."+x])?e={...e,extends:x}:b&&mt()&&(/^[A-Z]\w*_\d+$/.test(r)||/^[A-Z]\w*\.\w+$/.test(r))&&console.warn(`[smbls] auto-extend: key "${r}" looks like an instance of "${x}" but neither "${x}" nor "smbls.${x}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}_s(t,e,s);let i=new Set(["childProps","attr","style","scope","data"]),a=t.props&&typeof t.props=="object"?t.props:null;for(let h in e){if(h==="parent"||h==="node"||h==="__ref"||h==="extends"||h==="context"||h==="props")continue;if(h==="key"){n&&(t.key=n);continue}let m=e[h],y=t[h],x=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";x&&h.charCodeAt(0)>=65&&h.charCodeAt(0)<=90?t[h]=xc(y,m):x&&i.has(h)?t[h]={...y,...m}:x&&db(h)?t[h]=xc(y,m):t[h]=m}function c(h){for(let m in h){let y=h[m],x=t[m],b=x&&y&&typeof x=="object"&&typeof y=="object"&&!Array.isArray(x)&&!Array.isArray(y)&&typeof x!="function"&&typeof y!="function";b&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?t[m]=xc(x,y):b&&i.has(m)?t[m]={...x,...y}:b&&db(m)?t[m]=xc(x,y):t[m]=y}}a&&c(a),e.props&&typeof e.props=="object"&&c(e.props),e.classlist!==void 0&&(t.classlist=e.classlist),e.text!==void 0&&(t.text=e.text),e.html!==void 0&&(t.html=e.html);let l=t.scope&&typeof t.scope=="object"?t.scope:null,f=o?.scope,u=t.context&&typeof t.context.globalScope=="object"&&t.context.globalScope||null,d=f||u||null;if(e.scope!==void 0||l){let h={};l&&Object.assign(h,l),e.scope!==void 0&&Object.assign(h,e.scope),t.scope=xl(h,d)}else d&&(t.scope=d);e.if!==void 0&&(t.if=e.if);let g=t.__ref,p=Q2(t,g&&g.__runtimeSource);return g&&(g.__declaredArrays=p||void 0),ks(t),H2(t,o,e),e}var V2=new Set(["key","parent","context","__ref"]);function U2(t,e){for(let o of Object.keys(t))V2.has(o)||delete t[o];let r=cr();r&&Ke(null);let n=e.definition;if(!n.extends&&!n.extend&&typeof e.key=="string"){let o=t.context?.components||{},s=o[e.key]||o["smbls."+e.key];s&&(n={...n,extends:s})}try{Uk(t,n,e.key,e.ownKey,t.parent,e.options)}finally{r&&Ke(r)}}function z2(t,e,r){let n=r||{},o=a=>!!(n[a]||n["smbls."+a]),s=[],i=[];if(t.extends&&i.push(...Array.isArray(t.extends)?t.extends:[t.extends]),t.extend&&i.push(...Array.isArray(t.extend)?t.extend:[t.extend]),i.length){for(let a of i){if(typeof a!="string")continue;let c=a.includes(">")?a.split(">")[0].trim():a;o(c)||s.push(c)}return s}if(typeof e=="string"&&/^[A-Z]/.test(e)){let a=-1,c=e.indexOf("_"),l=e.indexOf(".");c>0&&(a=c),l>0&&(a<0||l<a)&&(a=l);let f=a>0?e.substring(0,a):e;o(f)||s.push(f)}return s}function H2(t,e,r){let n=!e,o=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=n&&o&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!vt(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,he(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,g=(m,y)=>{d.has(m)||On(f,m,c)&&(c[m]=y,d.add(m),Je(f,m,y))},p=l.translations[u];if(p&&typeof p=="object")for(let m in p)g(m,p[m]);let h=new Set(l.languages||[]);for(let m in l.translations)h.has(m)||g(m,l.translations[m])}t.state=vt(c)?c:lr(c),t.state.__element=t,t.state.root=t.state,he(t,t.state),No?.(a,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),he(t,t.state);return}if(typeof i=="string"){if(t.state=zk(i,e),t.state&&typeof t.state=="object"&&!vt(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}he(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=vt(a)?a:lr(a||{})}else vt(i)?t.state=i:t.state=lr({...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,he(t,t.state),No?.(i,t.state)}function cb(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function zk(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?cb(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?cb(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=cb(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let n=e.context?.polyglot;if(n?.translations){let o=e.state?.root?.lang||n.defaultLang||"en",s=n.translations[o];if(s?.[t]!==void 0)return s[t];if(n.translations[t]!==void 0)return n.translations[t]}return{}}var W2=new Set(["s","state","ctx","context"]);function q2(t){try{let r=(typeof Le=="function"?Le(t):Function.prototype.toString.call(t)).match(/^[^(]*\(([^)]*)\)/);return r?r[1].split(",").map(n=>n.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function K2(t){if(typeof t!="function"||t.length!==2)return!1;let e=q2(t);if(e.length<2)return!1;let r=e[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!W2.has(r)}function G2(t){let e=t.__ref,r=t.tag||"div",n=t.context?.designSystem,o=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||Nt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Er(a)||St[a]||At&&At.has(a)||Ee(r,a)||(mt()&&K2(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).`),o.push({prop:a,fn:t[a]}))}for(let i=0;i<o.length;i++){let{prop:a,fn:c}=o[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){n&&at(n);try{return c(t,t.state,t.context)}catch{return}finally{n&&ot()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function Y2(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let n=e[r];try{typeof n=="function"?n(t,t.state,t.context):typeof n=="string"&&t.state?.[n]}catch{}}}function $t(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...n){return Y2(t,e),r.apply(this,n)}}function bc(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function ut(t,e){return()=>t.path.join(".")+"::"+e}var xk=new Set;function qt(t,e,r){if(!mt())return;let n=ut(t,e)();xk.has(n)||(xk.add(n),console.warn(`[smbls] "${e}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,r?.message||r))}var wk=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,X2=(t,e)=>{let r;try{r=String(t)}catch{return}if(!r.includes("{{"))return;wk.lastIndex=0;let n;for(;(n=wk.exec(r))!==null;)n[2].includes("{{")&&e.add(n[2])},Z2=(t,e)=>!Er(t)&&!Cs(e,t),Sk=(t,e,r,n,o)=>{if(typeof e=="string"){!o&&e.includes("{{")&&r.add(e);return}typeof e=="function"&&Z2(t,n)&&X2(e,r)},pb=new WeakMap,Ec=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Sc=t=>{if(typeof t=="string"||typeof t=="number")return{text:t};if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t.props;return e&&typeof e=="object"&&!Array.isArray(e)?no(t,e):t},kc=(t,e)=>t&&e?no(t,e):t||e||null,Hk=(t,e)=>{let r=t.__ref&&t.__ref.__runtimeSource;return!!r&&Ec(r,e)},Es=(t,e)=>Hk(t,e)?Sc(t.__ref.__runtimeSource[e]):null,vc=(t,e)=>(e&&t&&typeof t=="object"&&pb.set(t,e),t),J2=t=>{if(!t||typeof t!="object")return;let e=pb.get(t);return e&&pb.delete(t),e},hb=(t,e,r)=>{if(typeof t=="string"){t.includes("{{")&&e.add(t);return}if(!(!t||typeof t!="object"||r.has(t))){if(r.add(t),Array.isArray(t)){for(let n=0;n<t.length;n++)hb(t[n],e,r);return}if(!t.__ref)for(let n of Object.keys(t)){if(n==="state")continue;let o=Object.getOwnPropertyDescriptor(t,n);o&&"value"in o&&hb(o.value,e,r)}}},Q2=(t,e)=>{let r=null;for(let n of Object.keys(t)){if(Nt.has(n)||e&&Ec(e,n))continue;let o=Object.getOwnPropertyDescriptor(t,n),s=o&&o.value;if(!Array.isArray(s))continue;let i=new Set;hb(s,i,new Set),i.size&&(r||(r=new Map),r.set(s,i))}return r},kk=(t,e)=>{if(Array.isArray(e))for(let r=t;r;r=r.parent){let n=r.__ref&&r.__ref.__declaredArrays,o=n&&n.get(e);if(!o)continue;let s=t.__ref;s.__authoredTemplates||(s.__authoredTemplates=new Set);for(let i of o)s.__authoredTemplates.add(i);return}},tD=["attr","aria","data","metadata"],eD=t=>{if(tD.includes(t))return!0;let e=t.charCodeAt(0);return e===46||e===33||e===64},rD=(t,e)=>{let r=new Set,n=t.tag||"div";for(let o of Object.keys(t)){let s=Object.getOwnPropertyDescriptor(t,o),i=s&&s.value,a=!!e&&Ec(e,o);if(i&&typeof i=="object"&&!Array.isArray(i)){if(!eD(o))continue;let c=a?e[o]:null,l=c&&typeof c=="object"?c:null;for(let f in i){let u=a&&(!l||Ec(l,f));Sk(f,i[f],r,n,u)}continue}Sk(o,i,r,n,a)}return r};function Wk(t,e){let r=t.__ref,n=!!(e&&e.skipIfEffect),o=rD(t,r.__runtimeSource);if(r.__authoredTemplates)for(let c of o)r.__authoredTemplates.add(c);else r.__authoredTemplates=o;if(G2(t),typeof t.text=="function"){let c=t.text,l=$t(t,t.textDeps,c),f=Y(()=>{if(!r.contentManaged)try{let u=l(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&typeof u!="object"&&(typeof u=="string"&&u.includes("{{")&&(u=Ft.call(t,u,t.state)),ws(t,u))}catch(u){qt(r,"text",u)}},{depth:r.path.length,label:ut(r,"text")});r.__effects.push(f),r.__exec.text=c}else if(typeof t.text=="string"&&t.text.includes("{{")){let c=t.text,l=Y(()=>{if(r.contentManaged)return;let f=Ft.call(t,c,t.state);f!=null&&(t.text=f),t.node&&ws(t,f??"")},{depth:r.path.length,label:ut(r,"text")});r.__effects.push(l),r.__exec.text=c}let s=t.tag||"div";for(let c of Object.keys(t))if(typeof t[c]=="function"&&!Nt.has(c)&&!Er(c)&&!r.__exec[c]&&!$u(s,c)){if(St[c]){let l=t[c],f=$t(t,t[c+"Deps"],l),u=c,d,g=null,p=null,h,m=Y(()=>{let y=t.context?.designSystem;y&&at(y);try{let x=f(t,t.state,t.context);ku();let b;try{b=St[u](x,t,t.state,t.context)}finally{vu()}if(Array.isArray(b)){let w={};for(let S of b)if(S)for(let E in S)w[E]=S[E];b=w}let _=u==="show"||u==="hide";if(b&&t.node&&nD(b)){let w=Nu(b);if(w===null||w!==h){h=w;let S=de(b,null,t.context?.cssPrefix),E=S?S.split(" ").filter(Boolean):null;if(t.node.classList){if(p)for(let T of p)t.node.classList.remove(T);if(E&&E.length)for(let T of E)t.node.classList.add(T);p=E}}d=void 0,g=null}else if(b&&t.node){if(p){for(let S of p)t.node.classList.remove(S);p=null,h=void 0}let w=Nu(b);if(w===null||w!==d||!Fu(t.node,g)){d=w;let S=Ek(t,b);g=Mu(t.node,S)}}else t.node&&_&&(d=void 0,g=null,t.node.style.display="")}finally{y&&ot()}},{depth:r.path.length,label:ut(r,u)});r.__effects.push(m),r.__exec[c]=l}else if(At&&At.has(c)){let l=t[c],f=$t(t,t[c+"Deps"],l),u=c,d,g=null,p=Y(()=>{let h=t.context?.designSystem;h&&at(h);try{let m=f(t,t.state,t.context);if(t.node)if(m!=null){let y=u+":"+String(m);if(y!==d||!Fu(t.node,g)){d=y;let x={[u]:m},b=Ek(t,x);g=Mu(t.node,b)}}else d=void 0,g=null,t.node.style[u]=""}finally{h&&ot()}},{depth:r.path.length,label:ut(r,u)});r.__effects.push(p),r.__exec[c]=l}}if(typeof t.html=="function"){let c=t.html,l=$t(t,t.htmlDeps,c),f=Y(()=>{let u=t.context?.designSystem;u&&at(u);try{let d=l(t,t.state,t.context);t.node&&d!=null&&typeof d!="function"&&(t.node.innerHTML=d)}finally{u&&ot()}},{depth:r.path.length,label:ut(r,"html")});r.__effects.push(f),r.__exec.html=c}if(typeof t.value=="function"){let c=t.value,l=$t(t,t.valueDeps,c),f=Y(()=>{try{let u=l(t,t.state,t.context);typeof u=="string"&&u.includes("{{")&&(u=Ft.call(t,u,t.state)),Ck(t,u)}catch(u){qt(r,"value",u)}},{depth:r.path.length,label:ut(r,"value")});r.__effects.push(f),r.__exec.value=c}else if(typeof t.value=="string"&&t.value.includes("{{")){let c=t.value,l=Y(()=>{try{Ck(t,Ft.call(t,c,t.state))}catch(f){qt(r,"value",f)}},{depth:r.path.length,label:ut(r,"value")});r.__effects.push(l),r.__exec.value=c}if(typeof t.style=="function"){let c=t.style,l=$t(t,t.styleDeps,c),f,u=null,d=Y(()=>{let g=l(t,t.state,t.context),p=Nu(g);(p===null||p!==f||!Fu(t.node,u))&&(f=p,oD(t.node,u,g),ro(t.node,g),u=Mu(t.node,g))},{depth:r.path.length,label:ut(r,"style")});r.__effects.push(d),r.__exec.style=c}else if(t.style&&typeof t.style=="object")for(let c in t.style){let l=t.style[c];if(typeof l!="function")continue;let f=$t(t,bc(t.styleDeps,c),l),u,d=null,g=Y(()=>{try{let p=f(t,t.state,t.context);if(t.node){let h=c+":"+String(p);if(h!==u||!Fu(t.node,d)){u=h;let m={[c]:p};ro(t.node,m),d=Mu(t.node,m)}}}catch(p){qt(r,"style."+c,p)}},{depth:r.path.length,label:ut(r,"style."+c)});r.__effects.push(g)}if(t.attr&&typeof t.attr=="object"){for(let c in t.attr)if(typeof t.attr[c]=="function"){let l=$t(t,bc(t.attrDeps,c),t.attr[c]),f=c,u=Y(()=>{try{let d=l(t,t.state,t.context);typeof d=="string"&&d.includes("{{")&&(d=Ft.call(t,d,t.state)),t.node?.setAttribute&&(d==null||d===!1&&!sr(f)?t.node.removeAttribute(f):typeof d!="function"&&typeof d!="object"&&t.node.setAttribute(f,te(f,d)))}catch(d){qt(r,"attr."+f,d)}},{depth:r.path.length,label:ut(r,"attr."+f)});u._attrName=f.toLowerCase(),r.__effects.push(u)}else if(typeof t.attr[c]=="string"&&t.attr[c].includes("{{")){let l=t.attr[c],f=c,u=Y(()=>{try{let d=Ft.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(f,te(f,d??""))}catch(d){qt(r,"attr."+f,d)}},{depth:r.path.length,label:ut(r,"attr."+f)});u._attrName=f.toLowerCase(),r.__effects.push(u)}}if(t.aria&&typeof t.aria=="object")for(let c in t.aria){let l=t.aria[c];if(typeof l=="string"&&l.includes("{{")){let g=l,p="aria-"+c.replace(/[A-Z]/g,m=>"-"+m.toLowerCase()),h=Y(()=>{try{let m=Ft.call(t,g,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(p,te(p,m??""))}catch(m){qt(r,"aria."+c,m)}},{depth:r.path.length,label:ut(r,"aria."+c)});h._attrName=p,r.__effects.push(h);continue}if(typeof l!="function")continue;let f=$t(t,bc(t.ariaDeps,c),t.aria[c]),u="aria-"+c.replace(/[A-Z]/g,g=>"-"+g.toLowerCase()),d=Y(()=>{try{let g=f(t,t.state,t.context);if(!t.node?.setAttribute)return;g==null?t.node.removeAttribute(u):typeof g!="function"&&typeof g!="object"&&t.node.setAttribute(u,te(u,g))}catch(g){qt(r,"aria."+c,g)}},{depth:r.path.length,label:ut(r,"aria."+c)});d._attrName=u,r.__effects.push(d)}if(t.data&&typeof t.data=="object")for(let c in t.data){let l=t.data[c];if(typeof l=="string"&&l.includes("{{")){let p=l,h="data-"+c.replace(/[A-Z]/g,y=>"-"+y.toLowerCase()),m=Y(()=>{try{let y=Ft.call(t,p,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(h,y??"")}catch(y){qt(r,"data."+c,y)}},{depth:r.path.length,label:ut(r,"data."+c)});m._attrName=h,r.__effects.push(m);continue}if(typeof l!="function")continue;let f=$t(t,bc(t.dataDeps,c),t.data[c]),d="data-"+c.replace(/[A-Z]/g,p=>"-"+p.toLowerCase()),g=Y(()=>{try{let p=f(t,t.state,t.context);if(!t.node?.setAttribute)return;p==null||p===!1?t.node.removeAttribute(d):typeof p!="function"&&typeof p!="object"&&t.node.setAttribute(d,p===!0?"":p)}catch(p){qt(r,"data."+c,p)}},{depth:r.path.length,label:ut(r,"data."+c)});g._attrName=d,r.__effects.push(g)}let i=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(i)for(let c in i){if(typeof i[c]!="function")continue;let l=$t(t,bc(t.classDeps,c),i[c]),f=Y(()=>{try{let u=l(t,t.state,t.context);if(!t.node?.classList)return;typeof u=="string"?t.node.classList.add(u):u?t.node.classList.add(c):t.node.classList.remove(c)}catch(u){qt(r,"class."+c,u)}},{depth:r.path.length,label:ut(r,"class."+c)});r.__effects.push(f)}!n&&typeof t.if=="function"&&qk(t,r,t.if);for(let c of Object.keys(t)){if(Nt.has(c)||typeof t[c]!="function")continue;let l=c.charCodeAt(0);if(l>=65&&l<=90||Er(c))continue;let f=t[c];r.__exec[c]=f;let u=t.tag||"div";if(Ee(u,c)&&!Cs(u,c)){let d=or(c)||c,g=$t(t,t[c+"Deps"],f),p=Y(()=>{try{let h=g(t,t.state,t.context);typeof h=="string"&&h.includes("{{")&&(h=Ft.call(t,h,t.state)),t.node?.setAttribute&&(h==null||h===!1&&!sr(d)?t.node.removeAttribute(d):typeof h!="function"&&typeof h!="object"&&(d==="src"&&"src"in t.node?t.node.src=h:t.node.setAttribute(d,te(d,h))))}catch(h){qt(r,c,h)}},{depth:r.path.length,label:ut(r,c)});p._attrName=d.toLowerCase(),r.__effects.push(p)}}let a=t.tag||"div";for(let c of Object.keys(t)){if(Nt.has(c))continue;let l=t[c];if(typeof l!="string"||!l.includes("{{"))continue;let f=c.charCodeAt(0);if(f>=65&&f<=90||Er(c)||Cs(a,c)||Qn[c]||!Ee(a,c))continue;let u=or(c)||c,d=Y(()=>{try{let g=Ft.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,te(u,g??""))}catch(g){qt(r,c,g)}},{depth:r.path.length,label:ut(r,c)});d._attrName=u.toLowerCase(),r.__effects.push(d)}if(fD(t),hD(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let c=t.onStateUpdate,l=t.stateDeps,f=!1,u=[],d=Y(()=>{let g=[];for(let y=0;y<l.length;y++){let x=l[y];try{g[y]=typeof x=="function"?x(t,t.state,t.context):t.state?.[x]}catch{g[y]=void 0}}if(!f){f=!0,u=g;return}let p=g.length!==u.length;for(let y=0;!p&&y<g.length;y++)g[y]!==u[y]&&(p=!0);let h=u;if(u=g,!p)return;let m=t.context?.designSystem;m&&at(m);try{c(t,t.state,t.context,{prev:h,next:g})}catch(y){if(t.context?.plugins?.length&&Ot("error",t,{hook:"onStateUpdate",error:y})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',y),t.context?.strictMode)throw y}finally{m&&ot()}},{depth:r.path.length,label:ut(r,"onStateUpdate")});r.__effects.push(d)}pD(t)}function vk(t){let e=t.parent,r=e?.node;if(!r||!t.node){ov(t,t.parent);return}let n=null,o=Object.keys(e),s=o.indexOf(t.key);for(let i=s+1;i<o.length;i++){let a=e[o[i]];if(a?.node?.parentNode===r){n=a.node;break}}n?r.insertBefore(t.node,n):r.appendChild(t.node)}function qk(t,e,r){let n=$t(t,t.ifDeps,r),o=Y(()=>{let s=!e.__ifInitialized&&e.__ifLateMerge;if(s){let c=t.context?.components||{};s.names.some(l=>c[l]||c["smbls."+l])&&(e.__ifLateMerge=null,U2(t,s),n=$t(t,t.ifDeps,typeof t.if=="function"?t.if:r))}let i;try{i=n(t,t.state,t.context)}catch(c){if(i=!1,e.__ifError=c,typeof console<"u"&&console.warn){let l=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${l} \u2014 treating as false:`,c?.message||c)}return}let a=e.__if;if(e.__if=!!i,a&&!e.__if&&t.node){t.node.remove();try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(c){console.error("[smbls] onRemove error:",c)}}else if(!a&&e.__if)if(e.__ifInitialized)t.node||(t.node=tn(t)),t.node&&(t.node.ref=t),vk(t),gb(t),oe("Render",t,{}),ub(t,{});else{if(e.__ifInitialized=!0,e.__ifLateMerge=null,t.tag||(t.tag=Qr(t)),oe("Init",t,{}),t.node||(t.node=tn(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.tag==="fragment"&&!e.__fragmentAnchor){let l=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(l),e.__fragmentAnchor=l}oe("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),rv(t,{}),Wk(t,{skipIfEffect:!0}),gb(t),Qk(t),tv(t),nv(t,{}),vk(t),oe("Create",t,{}),oe("Complete",t,{}),oe("Render",t,{}),oe("RenderRouter",t,{}),ub(t,{})}},{depth:e.path.length,label:ut(e,"if")});e.__effects.push(o)}function ws(t,e){let r=t.node;if(!r)return;let n=e==null||typeof e=="object"?"":String(e);if(t.tag==="string"){r.nodeValue!==n&&(r.nodeValue=n);return}let o=t.__ref,s=o?o.__textNode:null;if(s&&s.parentNode!==r&&(s=null),!s){let i=r.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==n&&(s.nodeValue=n):r.firstChild?(s=(r.ownerDocument||t.context?.document||globalThis.document).createTextNode(n),r.insertBefore(s,r.firstChild)):(r.textContent=n,s=r.firstChild&&r.firstChild.nodeType===3?r.firstChild:null),o&&(o.__textNode=s||null)}function Ck(t,e){let r=t.node;if(!r||!("value"in r))return;let n=e==null?"":String(e);if(r.value===n)return;let o=typeof document<"u"&&document.activeElement===r,s=o&&typeof r.selectionStart=="number"?r.selectionStart:null,i=o&&typeof r.selectionEnd=="number"?r.selectionEnd:null;if(r.value=n,o&&s!=null&&i!=null)try{r.setSelectionRange(s,i)}catch{}let a=t.__ref&&t.__ref.__autoGrow;a&&a.active&&a.resize()}function gb(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&ws(t,t.text),Jk(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&!(typeof t.value=="string"&&t.value.includes("{{"))&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"){let r=t.style;for(let n in t.style)if(typeof t.style[n]=="function"){r={};for(let o in t.style)typeof t.style[o]!="function"&&(r[o]=t.style[o]);break}ro(e,r)}if(t.attr&&typeof t.attr=="object")for(let r in t.attr){let n=t.attr[r];typeof n=="function"||typeof n=="object"||n!=null&&(typeof n=="string"&&n.includes("{{")||n===!1&&!sr(r)||e.setAttribute&&e.setAttribute(r,te(r,n)))}if(typeof t.themeModifier=="string"&&t.themeModifier&&e.setAttribute&&e.setAttribute("data-theme",t.themeModifier),t.data&&typeof t.data=="object")for(let r in t.data){let n=t.data[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||typeof n=="string"&&n.includes("{{")||e.dataset&&(e.dataset[r]=n===!0?"":n)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(n=>n&&e.classList.add(n));else if(typeof r=="object")for(let n in r){let o=typeof r[n]=="function"?r[n](t,t.state,t.context):r[n];o&&e.classList.add(typeof o=="string"?o:n)}}}}function Nu(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function nD(t){if(!t||typeof t!="object")return!1;for(let e in t){let r=t[e];if(r&&typeof r=="object"&&!Array.isArray(r))return!0}return!1}function Mu(t,e){if(!t||!t.style||!e)return null;let r=t.style,n=[];for(let o in e){if(e[o]==null||o.charAt(0)==="&")continue;let i=Hu(o);n.push(i,xb(r,i),Kk(r,i))}return n}function xb(t,e){return typeof t.getPropertyValue=="function"?t.getPropertyValue(e):""}function Kk(t,e){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(e):""}function Hu(t){return Bu(t)?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function oD(t,e,r){if(!t||!t.style||!e||!e.length)return;let n=t.style,o=new Set;if(r&&typeof r=="object")for(let s in r)r[s]==null||s.charAt(0)==="&"||o.add(Hu(s));for(let s=0;s<e.length;s+=3){let i=e[s];o.has(i)||xb(n,i)===e[s+1]&&typeof n.removeProperty=="function"&&n.removeProperty(i)}}function Fu(t,e){if(!e||!t||!t.style)return!1;let r=t.style;for(let n=0;n<e.length;n+=3)if(xb(r,e[n])!==e[n+1]||Kk(r,e[n])!==e[n+2])return!1;return!0}var Bu=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45;function sD(t){let e=null;for(let r in t)t[r]!=null&&r.charAt(0)!=="&"&&(e||(e=new Set),e.add(Hu(r)));return e}function iD(t,e,r,n){let o=t.__ref;if(!o)return;let s=null;if(r)for(let i of r){if(n&&n.has(i))continue;let a=e[i];if(a==null||typeof a=="object")continue;let c=Hu(i);yc[c]&&(s||(s={}),s[c]=a)}o.__declaredLonghands=s}function Gk(t,e){let r=t.__ref,n=r&&r.__declaredLonghands;if(!n||!e)return null;let o=null;for(let s in n){if(e.has(s))continue;let i=yc[s],a=!1;for(let c=0;c<i.length;c++)if(e.has(i[c])){a=!0;break}a&&(o||(o={}),o[s]=n[s])}return o}function Ek(t,e){let r=t.node;ro(r,e);let n=sD(e);if(!n)return e;let o=t.__ref;if(o)if(o.__inlineCssKeys)for(let i of n)o.__inlineCssKeys.add(i);else o.__inlineCssKeys=new Set(n);let s=Gk(t,n);return s?(ro(r,s),Object.assign({},e,s)):e}function aD(t){let e=t.__ref;if(!e||!e.__inlineCssKeys||!e.__declaredLonghands)return;let r=Gk(t,e.__inlineCssKeys);r&&ro(t.node,r)}function ro(t,e){if(!t||!e||!t.style)return;let r=null;for(let n in e){let o=e[n];if(o!=null){if(n.charAt(0)==="&"&&typeof o=="object"){r||(r={}),r[n]=o;continue}try{let s=String(o),i=Bu(n)?n:n.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&&cD(t,r)}function cD(t,e){let r=`_ds${Mk.scopedStyleId++}`;t.classList.add(r);let n=t.ownerDocument,o=n.querySelector("style[data-smbls-scoped]");o||(o=n.createElement("style"),o.setAttribute("data-smbls-scoped",""),n.head.appendChild(o));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 g=l[d];if(typeof g=="object"){let p=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),h="";for(let m in g)h+=`${m.replace(/[A-Z]/g,y=>"-"+y.toLowerCase())}: ${g[m]};`;u+=Sr(`${p} { ${h} }`,p)+`
|
|
57
|
-
`}else f+=`${d.replace(/[A-Z]/g,
|
|
58
|
-
`),u&&(s+=u)}}s&&(o.textContent+=s)}var Ak=new Set;function Tk(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 lD(t,e,r){let n=Tk(r);queueMicrotask(()=>{if(!t.__ref)return;let o;try{o=e(t,t.state,t.context)}catch{return}if(Tk(o)===n)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";Ak.has(s)||(Ak.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(o)?o.join(", "):String(o)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function fD(t){let e=t.subscribeTo,r=typeof e=="function",n=e;if(r)try{n=e(t,t.state,t.context)}catch{n=null}if(r&&mt()&&lD(t,e,Array.isArray(n)?n:[]),!Array.isArray(n)||n.length===0)return;let o=t.__ref;for(let s=0;s<n.length;s++){let i=n[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],l=a.slice(1),f={value:!1},u=Y(()=>{let d=t.state&&(vt(t.state)?t.state.root:null);if(!d||!vt(d))return;let g=d;g=g[c];for(let h=0;h<l.length&&!(g==null||typeof g!="object");h++)if(vt(g))g=g[l[h]];else break;if(!f.value)return;let p=!1;if(typeof t.onBeforeUpdate=="function"){let h=t.context?.designSystem;h&&at(h);try{if($y(o)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>kr(o,!1),y=>{kr(o,!0),t.context?.plugins?.length&&Ot("error",t,{hook:"onBeforeUpdate",error:y})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",y)}):(kr(o,!1),m===!1&&(p=!0))}}catch(m){kr(o,!0),t.context?.plugins?.length&&Ot("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{h&&ot()}}if(!p&&t.node&&o.__effects)for(let h=0;h<o.__effects.length;h++){let m=o.__effects[h];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!p&&typeof t.onUpdate=="function"){let h=t.context?.designSystem;h&&at(h);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&Ot("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{h&&ot()}}},{depth:o.path.length,label:ut(o,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,o.__effects.push(u)}}function wb(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&!t.startsWith("@container")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}function Sb(t,e){if(t.charCodeAt(0)!==64||/^@(media|supports|container|keyframes)\b/.test(t))return t;let r=e.context?.designSystem?.media?.[t.slice(1)];return r?/^@(media|supports|container)\b/.test(r)?r:`@media ${r}`:t}var Ok=new Set;function uD(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",n=r+"::"+t;Ok.has(n)||(Ok.add(n),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 Os(t,e,r,n){let o={},s=new Set,i=(a,c,l)=>{let f=l?new Set(Object.keys(o)):null;if(St[a]){let u=St[a](c,e,e.state,e.context);if(u){let d=Array.isArray(u)?u:[u];for(let g of d)g&&Object.assign(o,g)}}else o[a]=c;if(l)for(let u in o)f.has(u)||s.add(u)};for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let c=t[a];if(typeof c=="function"&&(c=c(e,e.state,e.context)),c==null||typeof c=="function")continue;if(typeof c=="object"&&!Array.isArray(c)){if(a==="style"){for(let g in c){let p=c[g];if(typeof p=="function"&&(p=p(e,e.state,e.context)),p==null||typeof p=="function")continue;let h=typeof e[g]=="function"&&(St[g]||At&&At.has(g))||!!(n&&n.has(g));i(g,p,h)}continue}if(wb(a,e)){let g=Os(c,e,!1,n);Object.keys(g).length&&(o[`[data-theme="${a.slice(1)}"] &`]=g);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(a)){mt()&&uD(a,e);continue}let u=Sb(a,e),d=Os(c,e,!1,n);Object.keys(d).length&&(o[u]=d);continue}let l=typeof e[a]=="function"&&(St[a]||At&&At.has(a)),f=!!(n&&n.has(a));i(a,c,l||f)}if(r)for(let a in o)s.add(a);for(let a of s){let c=o[a];typeof c=="string"&&!c.includes("!important")&&(o[a]=c+" !important")}return o}var Vu=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function Yk(t,e){for(let r in e){let n=e[r];t[r]=Vu(n)?Yk(Vu(t[r])?t[r]:{},n):n}return t}function dD(t,e){if(!Vu(e))return;let r;for(let n of t.split(" ")){let o=n?e[n]:null;Vu(o)&&(r=Yk(r||{},o))}return r}function kb(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)&&kb(t[r],e+1))return!0}return!1}function Xk(t,e,r){if(!e||typeof e!="object"||Array.isArray(e))return null;if(wb(t,r)){let s=Os(e,r,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let n=Sb(t,r),o=Os(e,r,!1);return Object.keys(o).length?{cssProp:n,block:o}:null}function pD(t){let e=t.__ref;for(let r of Object.keys(t)){if(!db(r))continue;let n=t[r];if(!n||typeof n!="object"||Array.isArray(n)||!kb(n))continue;let o=null,s,i=Y(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&at(a);let c,l=!1;try{let f=Xk(r,n,t),u=f?Nu(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=de({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&ot()}if(!(l||!t.node.classList)){if(o)for(let f of o)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);o=c}},{depth:e.path.length,label:ut(e,"cssBlock("+r+")")});e.__effects.push(i)}}function hD(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let n of Object.keys(t)){let o=n.charAt(0);if(o!=="."&&o!=="!")continue;let s=n.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let p=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${n}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${o}\` is read as one prop name. Nest the selector inside instead: \`${o}${p}: { '${s.slice(p.length)}': {...} }\`.`)}continue}let i=t[n];if(!i||typeof i!="object")continue;let a=o==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=new Set;for(let p in i){if(!Object.prototype.hasOwnProperty.call(i,p))continue;let h=p.charAt(0),m=i[p];(h===":"||h==="@"||h==="&"||h==="[")&&m&&typeof m=="object"&&!Array.isArray(m)||l.add(p)}let f=()=>{let p,h=t[s];if(h===void 0){let x=!!t.state&&s in t.state,b=t.state?t.state[s]:void 0;if(x||b!==void 0)p=b;else{let _=t.context?.cases?.[s];if(_===void 0)return;try{p=typeof _=="function"?_.call(t,t):_}catch(w){p=!1,e.__conditionalError=w,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,w?.message||w)}}}else if(typeof h=="function")try{p=h(t,t.state,t.context)}catch(x){p=!1,e.__conditionalError=x,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,x?.message||x)}else p=h;let m=a?!p:!!p;if(!t.node||m===c.lastMatch)return;c.lastMatch=m;let y=t.context?.designSystem;y&&at(y);try{if(m){let x={},b={},_=!1;for(let S in i){if(!Object.prototype.hasOwnProperty.call(i,S))continue;let E=i[S],T=S.charAt(0);if((T===":"||T==="@"||T==="&"||T==="[")&&E&&typeof E=="object"&&!Array.isArray(E)){if(wb(S,t)){let O=Os(E,t,!1,l);Object.keys(O).length&&(b[`[data-theme="${S.slice(1)}"] &`]=O,_=!0)}else{let O=Sb(S,t),F=Os(E,t,!1,l);Object.keys(F).length&&(b[O]=F,_=!0)}continue}let I=typeof E=="function"?E(t,t.state,t.context):E;if(I!=null)if(St[S]){let O=St[S](I,t,t.state,t.context);if(O){let F=Array.isArray(O)?O:[O];for(let z of F)z&&Object.assign(x,z)}}else(At&&At.has(S)||Bu(S))&&(x[S]=I)}let w=Object.keys(x);if(w.length){ro(t.node,x);for(let S of w)r.set(S,n);c.appliedKeys=w}else c.appliedKeys=null;if(_){let S=de(b,null,t.context?.cssPrefix,{state:!0}),E=S?S.split(" ").filter(Boolean):[];if(E.length&&t.node.classList){for(let T of E)t.node.classList.add(T);c.appliedClasses=E}else c.appliedClasses=null}else if(c.appliedClasses){for(let S of c.appliedClasses)t.node.classList.remove(S);c.appliedClasses=null}}else{if(c.appliedKeys){for(let x of c.appliedKeys)r.get(x)===n&&(Bu(x)?t.node.style.removeProperty(x):t.node.style[x]="",r.delete(x));c.appliedKeys=null}if(c.appliedClasses){for(let x of c.appliedClasses)t.node.classList.remove(x);c.appliedClasses=null}}}finally{y&&ot()}};e.__conditionalRunners.push(f);let u=$t(t,t[s+"Deps"],f),d=Y(u,{depth:e.path.length,label:ut(e,"conditional("+n+")")}),g=e.__exec&&e.__exec[s]||t[s];d._sources.size===0&&typeof g=="function"&&mt()&&console.warn(`[smbls] conditional \`${n}\` on ${t.key||"?"} subscribed to nothing \u2014 its predicate tracked no reactive read on its first run, so no state write will ever re-evaluate it (only a direct element.update() on this element re-runs it). If the predicate guards its state reads (\`in\`, short-circuits, \`?.\`), declare \`${s}Deps: [...]\` (state-key strings or \`(el, s) => \u2026\` selectors) so the subscription is armed unconditionally.`),e.__effects.push(d)}}var lb=new WeakSet;function gD(t){let e=t.ownerDocument;!e||lb.has(e)||(lb.add(e),queueMicrotask(()=>{lb.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var fb=new WeakSet,Rk=!1;function Pk(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function mb(t,e){let r={...t};for(let n in e){let o=e[n],s=r[n];r[n]=o&&typeof o=="object"&&s&&typeof s=="object"?mb(s,o):o}return r}function Zk(t,e){let r={};for(let n in t){let o=t[n];if(o&&typeof o=="object"){let s=Zk(o,e);Object.keys(s).length&&(r[n]=s)}else e.has(n)||(r[n]=o)}return r}function Jk(t){let{node:e}=t;if(!e)return;if(Rk||(Rk=!0,de({display:"none"})),fb.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}fb.add(t);let r=t.context?.designSystem;r&&at(r),ku();try{let n={},o=!1,s=[],i=null,a=null,c=null,l=(p,h)=>{if(h&&typeof h=="object"&&Pk(p)){a||(a={});let m=a[p];m&&(h=mb(m,h)),a[p]=h}else(h===null||typeof h!="object")&&(c||(c=new Set),c.add(p));n[p]=h};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&St.theme){let p=St.theme(t.theme,t,t.state,t.context);if(p){let h=m=>{for(let y in m){let x=m[y];x&&typeof x=="object"&&Pk(y)&&(i||(i={}),i[y]=x),n[y]=x}};if(Array.isArray(p))for(let m of p)m&&h(m);else h(p);o=!0}}let f=(p,h)=>{if(St[p]){let m=St[p](h,t,t.state,t.context);if(m){if(Array.isArray(m)){for(let y of m)if(y)for(let x in y)l(x,y[x])}else for(let y in m)l(y,m[y]);o=!0}}else if(At&&At.has(p))h!=null&&typeof h!="object"&&(l(p,h),o=!0);else if(p.charCodeAt(0)===45)h!=null&&typeof h!="object"&&(l(p,h),o=!0);else if((p.charAt(0)==="&"||p.charAt(0)==="@"||p.charAt(0)===":"||p.charAt(0)==="[")&&h&&typeof h=="object"&&!Array.isArray(h)){if(kb(h))return;let m=Xk(p,h,t);m&&(l(m.cssProp,m.block),o=!0)}};if(typeof t.class=="string"){let p=dD(t.class,t.context?.designSystem?.class);if(p)for(let h in p)f(h,p[h])}let u=c?new Set(c):null,d=t.tag||"div";for(let p of Object.keys(t)){if(typeof t[p]=="function"||Nt.has(p)||p==="theme")continue;let h=p.charCodeAt(0);h>=65&&h<=90||Er(p)||$u(d,p)||f(p,t[p])}if(i)for(let p in i){let h=c?Zk(i[p],c):i[p];a&&a[p]&&(h=mb(h,a[p])),Object.keys(h).length?n[p]=h:delete n[p]}if(iD(t,n,c,u),o){n.display&&String(n.display).includes("!important")&&(e.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);let p=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;typeof p=="string"&&p!==""&&n.display&&n.display!==p&&(n.display=p);let h=de(n,null,t.context?.cssPrefix);if(s=h?h.split(" ").filter(Boolean):[],h&&e.classList){let m=s,y=!1;for(let x of m)e.classList.add(x),y||(x.charCodeAt(0)===95&&x.charCodeAt(1)===99||x.charCodeAt(0)===95&&x.indexOf("_c",1)!==-1)&&(y=!0);y&&gD(e)}}let g=t.__ref;if(g){let p=g.__staticCssClasses;if(p&&e.classList){let h=new Set(s);for(let m of p)h.has(m)||e.classList.remove(m)}g.__staticCssClasses=s}aD(t)}finally{vu(),r&&ot(),fb.delete(t)}}var W0=t=>!!St[t]||!!(At&&At.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function q0(t){t&&t.node&&Jk(t)}function Qk(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s=="function"||typeof s=="object"||s==null||typeof s=="string"&&s.includes("{{"))continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,te(i,s))}let r=Iy(t);for(let o in r){let s=r[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(o,s===!0?"":s)}let n=t.tag||"div";for(let o of Object.keys(t)){if(typeof t[o]=="function"||Nt.has(o)||o==="on"||r[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!Er(o)&&!Cs(n,o)&&Ee(n,o)){let i=t[o];if(i==null)continue;if(typeof i=="string"&&i.includes("{{")){if(!Qn[o])continue;i=Ft.call(t,i,t.state)}if(i==null||typeof i=="function"||typeof i=="object"||i===!1&&!sr(or(o)||o))continue;let a=or(o)||o;e.setAttribute(a,te(a,i))}}}function K0(t,e){let{node:r}=t;if(!r||!r.setAttribute)return;let n=e.charCodeAt(0);if(n>=65&&n<=90||Er(e))return;let o=t.tag||"div";if(Cs(o,e)||!Ee(o,e))return;let s=or(e)||e,i=s.toLowerCase(),a=t.__ref&&t.__ref.__effects,c=!1;if(a)for(let u=0;u<a.length;u++){let d=a[u];d&&d._attrName===i&&!d._disposed&&typeof d._execute=="function"&&(c=!0,d._execute())}if(c)return;let l=t[e],f=Qn[e];if(f&&l!=null){let u=f(t);u!==void 0&&(l=u)}typeof l=="string"&&l.includes("{{")&&(l=Ft.call(t,l,t.state)),l==null||l===!1&&!sr(s)?r.removeAttribute(s):typeof l!="function"&&typeof l!="object"&&r.setAttribute(s,te(s,l))}function mD(t,e){let r=t.node,n=t.__ref,o=n.__autoGrow;if(!e){if(o&&o.active){try{r.removeEventListener("input",o.resize)}catch{}Lk(o),eo.delete(t),r.style.height="",o.appliedMax!=null&&r.style.maxHeight===o.appliedMax&&(r.style.maxHeight=""),Ik(r,o,!1),o.active=!1,o.appliedMax=null,o.lastMeasure=0}return}o||(o=n.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,lastWidth:null,watch:null,awaitingLayout:!1,appliedScroll:!1,fontsHooked:!1,attachAttempts:0,firstAttemptAt:null,resize:()=>{if(!r.isConnected){Ac(t,!0);return}if(!(r.scrollHeight>0)){o.awaitingLayout=!0,Dk(t,o);return}o.awaitingLayout=!1;let i=r.style.height;r.style.height="0px";let a=r.scrollHeight;if(!(a>0)){r.style.height=i;return}let c=_D(r),l=c!=null&&a>c;r.style.height=(l?c:a)+"px",Ik(r,o,l),o.lastMeasure=a,o.lastWidth=r.clientWidth,Dk(t,o)}},n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>{try{r.removeEventListener("input",o.resize)}catch{}Lk(o),eo.delete(t)})),o.active||(r.addEventListener("input",o.resize),o.active=!0,bD(t,o));let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==o.appliedMax&&(s==null?o.appliedMax!=null&&r.style.maxHeight===o.appliedMax&&(r.style.maxHeight=""):r.style.maxHeight=s,o.appliedMax=s),o.resize()}function Ac(t,e){let r=t.__ref?.__autoGrow;r&&(e&&(r.attachAttempts=0,r.firstAttemptAt=null),eo.add(t),zu())}function yD(){let t=Array.from(eo);eo.clear();for(let e=0;e<t.length;e++){let r=t[e],n=r.node,o=r.__ref?.__autoGrow;if(!(!n||!o||!o.active)){if(!n.isConnected){o.firstAttemptAt==null&&(o.firstAttemptAt=Ts()),o.attachAttempts+=1,o.attachAttempts<=jk&&Ts()-o.firstAttemptAt<Bk&&(eo.add(r),zu());continue}o.attachAttempts=0,o.firstAttemptAt=null,o.resize()}}}function Dk(t,e){if(e.watch)return;let r=t.node;if(!r)return;let n=r.ownerDocument&&r.ownerDocument.defaultView,o=n&&n.ResizeObserver||(typeof ResizeObserver=="function"?ResizeObserver:null);if(typeof o!="function")return;let s=()=>{if(!e.active||!r.isConnected||!(r.scrollHeight>0))return;if(e.awaitingLayout){e.awaitingLayout=!1,Ac(t,!0);return}let a=r.clientWidth;e.lastWidth!=null&&Math.abs(a-e.lastWidth)<.5||(e.lastWidth=a,Ac(t,!0))},i;try{i=new o(s),i.observe(r)}catch{return}e.watch=i}function Lk(t){let e=t.watch;if(e){t.watch=null;try{e.disconnect()}catch{}}}function bD(t,e){if(e.fontsHooked)return;e.fontsHooked=!0;let r=t.node&&t.node.ownerDocument,n=r&&r.fonts&&r.fonts.ready;!n||typeof n.then!="function"||n.then(()=>{e.active&&t.node&&Ac(t,!0)},()=>{})}function _D(t){let e=t.ownerDocument&&t.ownerDocument.defaultView,r;try{r=e&&e.getComputedStyle?e.getComputedStyle(t):null}catch{r=null}if(!r)return null;let n=f=>typeof f=="string"&&/^\s*-?\d*\.?\d+px\s*$/.test(f)?parseFloat(f):null,o=n(r.maxHeight);if(o==null||!(o>0))return null;let s=(n(r.paddingTop)||0)+(n(r.paddingBottom)||0),i=(n(r.borderTopWidth)||0)+(n(r.borderBottomWidth)||0),a=r.boxSizing==="border-box"?o-i:o+s,c=n(r.lineHeight);if(!(c>0))return a;let l=Math.floor((a-s)/c+1e-6);return l>=1?l*c+s:a}function Ik(t,e,r){r?e.appliedScroll||(t.style.overflowY="auto",e.appliedScroll=!0):e.appliedScroll&&(t.style.overflowY==="auto"&&(t.style.overflowY=""),e.appliedScroll=!1)}var $k=["srcObject","muted"],xD=(t,e)=>t==="muted"?e===!0||e===""||e==="true"||e==="muted":e??null;function wD(t){let e=t.node,r=t.__ref;if(!(!e||!r))for(let n=0;n<$k.length;n++){let o=$k[n],s=t[o];if(s===void 0||!(o in e))continue;let i=a=>{let c=xD(o,a);if(e[o]!==c)try{e[o]=c}catch(l){qt(r,o,l)}};if(typeof s=="function"){let a=$t(t,t[o+"Deps"],s),c=Y(()=>{try{i(a(t,t.state,t.context))}catch(l){qt(r,o,l)}},{depth:r.path.length,label:ut(r,o)});r.__effects.push(c),r.__exec[o]=s}else i(s);o==="srcObject"&&(r.__releaseMedia=()=>{try{e.srcObject!=null&&(e.srcObject=null)}catch{}})}}function tv(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.__ref,n=t.autoGrow,o=typeof n=="function"?$t(t,t.autoGrowDeps,n):null,s=Y(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===n&&o?o:i)(t,t.state,t.context)}catch{a=null}mD(t,a)},{depth:r.path.length,label:ut(r,"autoGrow")});r.__effects||(r.__effects=[]),r.__effects.push(s),o&&(r.__exec.autoGrow=n)}var ev=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function rv(t,e){for(let r of Object.keys(t)){if(!Er(r)||ev.has(r))continue;let n=bu(r);if(n){_u(n,t,t[r]);continue}let o=t[r];if(typeof o=="string"&&/^[A-Za-z_$][\w$]*$/.test(o)){let i=o;o=function(c){return t.call(i,c)}}if(typeof o!="function")continue;let s=j2(r);en.has(s)||bs(B2(s),t,o)}SD(t)}function SD(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},n=!1;for(let d of ev){let g=t[d];typeof g=="function"&&(r[d]=g,n=!0)}if(!n)return;let o=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,s=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,a=0,c=0,l=!1,f=d=>{let g=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];g&&(i=g.clientX,a=g.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let g=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!g)return;let p=g.clientX-i,h=g.clientY-a,m=Date.now()-c;if(m>s)return;let y=Math.abs(p),x=Math.abs(h);if(Math.max(y,x)<o)return;let b;if(y>x*1.2)b=p<0?"left":"right";else if(x>y*1.2)b=h<0?"up":"down";else return;let _="onSwipe"+b.charAt(0).toUpperCase()+b.slice(1),w=r[_],S=r.onSwipe;w&&w.call(t,d,t,t.state,t.context),S&&S.call(t,{direction:b,dx:p,dy:h,dt:m,event:d},t,t.state,t.context)};e.addEventListener("touchstart",f,{passive:!0}),e.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",f)}catch{}try{e.removeEventListener("touchend",u)}catch{}})}function no(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=no(o,s):r[n]=s}return r}function yb(t,e,r,n,o){if(!e||!t.node)return;let s=t.childExtends,i=Es(t,"childProps");if(Array.isArray(e)){let a=t.tag==="fragment",c=t.context?.document||globalThis.document,l=a?null:c?.createDocumentFragment();if(!a&&!l)return;let f=t.childProps,u=t.childrenAs,d=x=>{let b=e[x],_=b;(typeof b=="string"||typeof b=="number")&&(b={text:b});let w=f;if(typeof f=="function")try{w=f(t,b)}catch{w=null}let S=typeof f=="function"?Sc(w):i;if(o&&u!=="state"&&(S=kc(S,Sc(_))),u==="state"){let T=_;(typeof _=="string"||typeof _=="number")&&(T={value:_,text:_}),b=w?{...w,state:T}:{state:T}}else w&&(b=no(w,b));if(s&&!b.ignoreChildExtends)if(b.extends){let T=Array.isArray(b.extends)?b.extends:[b.extends],I=Array.isArray(s)?s:[s];b={...b,extends:[...I,...T]}}else b={...b,extends:s};let E=Vk(b?.key,_,x);try{return ee(vc(b,S),t,E,r)}catch(T){if(typeof console<"u"&&console.error){let I=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${E}" failed to construct at ${I} (initial render, skipping this row):`,T?.message||T)}return null}},g=t.__ref;if(!(n===!0&&!a&&!!g&&(r?.mountYield===!0||t.yieldChildren===!0))){for(let x=0;x<e.length;x++){let b=d(x);!a&&b?.node&&l.appendChild(b.node)}return a||t.node.appendChild(l),!0}let h=g.__childrenChunkGen=(g.__childrenChunkGen||0)+1;Jy();let m=null,y=x=>{if(g.__disposed||g.__childrenChunkGen!==h){m&&m.parentNode&&m.remove();return}for(let b=x;b<e.length;b++){let _=d(b);if(_?.node&&(m?t.node.insertBefore(_.node,m):l.appendChild(_.node)),b+1<e.length&&Zy()){m||(m=c.createComment("smbls-mount"),l.appendChild(m),t.node.appendChild(l));let w=b+1;tb(()=>y(w));return}}m?(m.remove(),t.node.tagName==="SELECT"&&Uu(t,!0)):t.node.appendChild(l)};return y(0),Qy(),!0}if(typeof e=="string"){let a=zk(e,t);if(Array.isArray(a))return yb(t,a,r,n,!0)}if(typeof e=="object")for(let a in e){if(Nt.has(a))continue;let c=e[a];if(c==null||c===!1)continue;let l=o?kc(i,Sc(c)):i;if((typeof c=="string"||typeof c=="number")&&(c={text:c}),t.childProps&&(c=no(t.childProps,c)),s&&!c.ignoreChildExtends)if(c.extends){let f=Array.isArray(c.extends)?c.extends:[c.extends],u=Array.isArray(s)?s:[s];c={...c,extends:[...u,...f]}}else c={...c,extends:s};ee(vc(c,l),t,a,r)}}function Uu(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let n=r.options;if(!n||!n.length)return;let o=t.__ref,s=o&&o.__exec&&o.__exec.value,i=typeof s=="function",a=t.value!=null&&typeof t.value!="function";if(i||a){let f;if(i)try{f=s(t,t.state,t.context)}catch{return}else f=t.value,typeof f=="string"&&f.includes("{{")&&(f=Ft.call(t,f,t.state));let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let c=e||!(o&&o.__selectSynced);if(o&&(o.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<n.length;f++)n[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function nv(t,e){let{children:r,content:n}=t,o=t.childExtends,s=typeof r=="function"||Hk(t,"children");if(typeof r=="function"){let p=r;try{r=p(t,t.state,t.context)}catch(b){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):`,b?.message||b)}}kk(t,r),t.children=r;let h=t.__ref,m=!1,y=$t(t,t.childrenDeps,p),x=Y(()=>{let b=m;m=!0;let _;try{_=y(t,t.state,t.context)}catch(z){if(typeof console<"u"&&console.error){let Q=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${Q}${b?"":" (initial tracking run)"}:`,z?.message||z)}return}if(!b||_===t.children)return;kk(t,_),t.children=_,h.__childrenChunkGen!=null&&h.__childrenChunkGen++;let w=typeof t.onContentUpdate=="function",S=w?[]:null,E=w?[]:null,T=w?[]:null;if(Array.isArray(_)&&t.childrenAs==="state"){let z=t.childProps,Q=[],Mt=new Map;for(let j=0;j<_.length;j++){let et=_[j],D=z;if(typeof z=="function")try{D=z(t,et)}catch{D=null}let X=Vk(D&&D.key,et,j);Q.push(X),Mt.set(X,{rawChild:et,childProps:D})}let yt=new Set(Q),N=h.__children.slice();for(let j of N)if(!yt.has(j)){let et=t[j];et?.remove&&et.remove(),delete t[j],E&&E.push(j)}let q=t.childExtends,bt=t.tag==="fragment",kt=t.context?.document||globalThis.document,Rt=bt?null:kt?.createDocumentFragment(),G=new Set;for(let j of Q){let et=Mt.get(j),D=et.rawChild,X=t[j];if(X&&X.state){if(D&&typeof D=="object"){let V=X.state,ct=V.$replace||V.replace,H=V.$update||V.update;try{if(typeof ct=="function")ct.call(V,D);else if(typeof H=="function"){for(let lt in V)if(!(lt==="__element"||lt==="root"||lt==="parent"||lt==="update")&&!Object.prototype.hasOwnProperty.call(D,lt))try{V[lt]=void 0}catch{}H.call(V,D)}else for(let lt in D)V[lt]=D[lt]}catch(lt){if(typeof console<"u"&&console.error){let oi=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${j}" failed to patch at ${oi} (reconcile, keeping its previous data for this pass):`,lt?.message||lt)}}}T&&T.push(j);continue}let st=D;(typeof D=="string"||typeof D=="number")&&(st={value:D,text:D});let Oe=et.childProps,Re=Oe?{...Oe,state:st}:{state:st},ni=typeof z=="function"?Sc(Oe):Es(t,"childProps");if(q&&!Re.ignoreChildExtends)if(Re.extends){let V=Array.isArray(Re.extends)?Re.extends:[Re.extends],ct=Array.isArray(q)?q:[q];Re={...Re,extends:[...ct,...V]}}else Re={...Re,extends:q};let rt;try{rt=ee(vc(Re,ni),t,j,e)}catch(V){if(typeof console<"u"&&console.error){let ct=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${j}" failed to construct at ${ct} (reconcile, skipping this row):`,V?.message||V)}G.add(j);continue}!bt&&rt?.node&&Rt&&Rt.appendChild(rt.node),S&&S.push(j)}if(!bt&&Rt&&Rt.childNodes.length&&t.node&&t.node.appendChild(Rt),!bt&&t.node){let j=null;for(let et of Q){let D=t[et]?.node;if(!D)continue;let X=j?j.nextSibling:t.node.firstChild;D!==X&&t.node.insertBefore(D,X),j=D}}h.__children=G.size?Q.filter(j=>!G.has(j)):Q,w&&(S.length||E.length)&&_k(t,{added:S,removed:E,kept:T}),Uu(t,!1);return}let F=w?[...h.__children]:null;for(let z of[...h.__children]){let Q=t[z];Q?.remove&&Q.remove(),delete t[z]}h.__children=[],yb(t,_,e,!1,!0),Uu(t,!1),w&&_k(t,{added:[...h.__children],removed:F,kept:[]})},{depth:h.path.length,label:ut(h,"children")});h.__effects.push(x)}let i=yb(t,r,e,!0,s);if(n!=null&&!(n&&n.__ref)){let p=n;if(typeof p=="string"||typeof p=="number"?p={text:p}:typeof p!="object"&&(p={}),t.childProps&&(p=no(t.childProps,p)),o&&!p.ignoreChildExtends)if(p.extends){let m=Array.isArray(p.extends)?p.extends:[p.extends],y=Array.isArray(o)?o:[o];p={...p,extends:[...y,...m]}}else p={...p,extends:o};let h=kc(Es(t,"childProps"),Es(t,"content"));ee(vc(p,h),t,"content",e)}if(r&&!i)return;let a=t.context?.components||{},c=t.__ref&&t.__ref.__runtimeSource,l=c?{}:null;{let p=Object.keys(t);for(let h=0;h<p.length;h++){let m=p[h];if(!m.endsWith("Extends")||typeof t[m]!="string")continue;let y=m.slice(0,-7);if(!y||y.charCodeAt(0)<65||y.charCodeAt(0)>90)continue;let x={extends:t[m]};delete t[m];for(let b=h+1;b<p.length;b++){let _=p[b],w=_.charCodeAt(0);if(w>=65&&w<=90||Nt.has(_)||typeof t[_]=="function"&&(_.startsWith("on")||_.startsWith(".")))break;let S=t[_];S!==void 0&&(x[_]=S,delete t[_],l&&Ec(c,_)&&(l[y]||(l[y]={}),l[y][_]=c[_]))}t[y]&&typeof t[y]=="object"?t[y]={...x,...t[y]}:t[y]=x}}let f=e?.mountYield===!0||t.yieldChildren===!0,u=Object.keys(t),d=p=>{if(Nt.has(p)||typeof t[p]!="object"||t[p]===null)return;let h=p.charCodeAt(0);if(h<65||h>90)return;let m=t[p];if(m.__ref)return;if(!m.extends&&!m.extend){let x=a[p]||a[`smbls.${p}`];x&&(m={...m,extends:x})}if(t.childProps&&(m=no(t.childProps,m)),o&&!m.ignoreChildExtends)if(m.extends){let x=Array.isArray(m.extends)?m.extends:[m.extends],b=Array.isArray(o)?o:[o];m={...m,extends:[...b,...x]}}else m={...m,extends:o};let y=c?kc(Es(t,"childProps"),kc(l[p]||null,Es(t,p))):null;ee(vc(m,y),t,p,e)};if(!f){for(let p of u)d(p);return}Jy();let g=p=>{for(let h=p;h<u.length;h++)if(d(u[h]),h+1<u.length&&Zy()){let m=h+1;tb(()=>g(m));return}};g(0),Qy()}function ov(t,e,r){let{node:n}=t;if(!n)return;n.ref=t;let o=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(o){let i=o.parentNode;if(i){if(r?.position==="before"&&r.node)i.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let a=r.node.nextSibling;i.insertBefore(n,a||o)}else i.insertBefore(n,o);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(r?.position==="before"&&r.node)s.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let i=r.node.nextSibling;i?s.insertBefore(n,i):s.appendChild(n)}else s.appendChild(n)}var bb=3;function $y(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=bb?!1:(t.__inBeforeUpdate=!0,!0)}function kr(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===bb&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${bb}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function oe(t,e,r){let n=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&Ot(n,e,r);let o="on"+t,s=e[o];if(typeof s=="function"){let c=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(c){if(e.__ref[c])return!0;e.__ref[c]=!0}let l=e.context?.designSystem;l&&at(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(g=>{e.context?.plugins?.length&&Ot("error",e,{hook:o,error:g})||console.error(`[DOMQL] Lifecycle "${o}" error:`,g)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(e.context?.plugins?.length&&Ot("error",e,{hook:o,error:u})||console.error(`[DOMQL] Lifecycle "${o}" error:`,u),e.context?.strictMode)throw u}finally{l&&ot(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var sv={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"],scrim:["black.45","black.55"],scrimSoft:["black.2","black.3"],blueDeep:"#0A5CB8",blueBright:"#47A8FF",accentInk:["blueDeep","blueBright"],greenDeep:"#2A6E28",greenBright:"#7FD07B",successInk:["greenDeep","greenBright"],redDeep:"#A83520",redBright:"#FF8C78",dangerInk:["redDeep","redBright"],orangeDeep:"#94500F",orangeBright:"#F4A45E",warningInk:["orangeDeep","orangeBright"],magentaDeep:"#A100A1",magentaBright:"#FF7AFF",magentaInk:["magentaDeep","magentaBright"]},iv={"gradient-blue-light":`linear-gradient(to right,
|
|
59
|
+
`):"")}}if(Ku(c,!0),xv(c,e,o),typeof c.html=="function"&&c.node&&!c.node.innerHTML){let d=c.context?.designSystem;d&&at(d);try{let g=c.html(c,c.state,c.context);g!=null&&typeof g!="function"&&(c.node.innerHTML=g)}catch{}finally{d&&ot()}}if(ie("Create",c,n),ie("Complete",c,n),ie("Render",c,n),ie("RenderRouter",c,n),bb(c,n),typeof c.onFrame=="function"){let d=c.onFrame,g=c.context?.designSystem,h=()=>{if(c.node){if(c.node.isConnected){g&&at(g);try{d(c,c.state,c.context)}catch(p){console.error("[DOMQL] onFrame error:",p)}finally{g&&ot()}}requestAnimationFrame(h)}};requestAnimationFrame(h)}return c}function iv(t,e,r,n,o,s){if(r&&!e.extends&&!e.extend){let p=r.indexOf("_"),m=r.indexOf("."),y=p>0?p:-1;if(m>0&&(y<0||m<y)&&(y=m),y>0){let w=r.substring(0,y),b=t.context?.components;b&&(b[w]||b["smbls."+w])?e={...e,extends:w}:b&&mt()&&(/^[A-Z]\w*_\d+$/.test(r)||/^[A-Z]\w*\.\w+$/.test(r))&&console.warn(`[smbls] auto-extend: key "${r}" looks like an instance of "${w}" but neither "${w}" nor "smbls.${w}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}xs(t,e,s);let i=new Set(["childProps","attr","style","scope","data"]),a=t.props&&typeof t.props=="object"?t.props:null;for(let p in e){if(p==="parent"||p==="node"||p==="__ref"||p==="extends"||p==="context"||p==="props")continue;if(p==="key"){n&&(t.key=n);continue}let m=e[p],y=t[p],w=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";w&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?t[p]=vc(y,m):w&&i.has(p)?t[p]={...y,...m}:w&&_b(p)?t[p]=vc(y,m):t[p]=m}function c(p){for(let m in p){let y=p[m],w=t[m],b=w&&y&&typeof w=="object"&&typeof y=="object"&&!Array.isArray(w)&&!Array.isArray(y)&&typeof w!="function"&&typeof y!="function";b&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?t[m]=vc(w,y):b&&i.has(m)?t[m]={...w,...y}:b&&_b(m)?t[m]=vc(w,y):t[m]=y}}a&&c(a),e.props&&typeof e.props=="object"&&c(e.props),e.classlist!==void 0&&(t.classlist=e.classlist),e.text!==void 0&&(t.text=e.text),e.html!==void 0&&(t.html=e.html);let l=t.scope&&typeof t.scope=="object"?t.scope:null,f=o?.scope,u=t.context&&typeof t.context.globalScope=="object"&&t.context.globalScope||null,d=f||u||null;if(e.scope!==void 0||l){let p={};l&&Object.assign(p,l),e.scope!==void 0&&Object.assign(p,e.scope),t.scope=vl(p,d)}else d&&(t.scope=d);e.if!==void 0&&(t.if=e.if);let g=t.__ref,h=LD(t,g&&g.__runtimeSource);return g&&(g.__declaredArrays=h||void 0),Es(t),vD(t,o,e),e}var SD=new Set(["key","parent","context","__ref"]);function xD(t,e){for(let o of Object.keys(t))SD.has(o)||delete t[o];let r=fr();r&&Ke(null);let n=e.definition;if(!n.extends&&!n.extend&&typeof e.key=="string"){let o=t.context?.components||{},s=o[e.key]||o["smbls."+e.key];s&&(n={...n,extends:s})}try{iv(t,n,e.key,e.ownKey,t.parent,e.options)}finally{r&&Ke(r)}}function kD(t,e,r){let n=r||{},o=a=>!!(n[a]||n["smbls."+a]),s=[],i=[];if(t.extends&&i.push(...Array.isArray(t.extends)?t.extends:[t.extends]),t.extend&&i.push(...Array.isArray(t.extend)?t.extend:[t.extend]),i.length){for(let a of i){if(typeof a!="string")continue;let c=a.includes(">")?a.split(">")[0].trim():a;o(c)||s.push(c)}return s}if(typeof e=="string"&&/^[A-Z]/.test(e)){let a=-1,c=e.indexOf("_"),l=e.indexOf(".");c>0&&(a=c),l>0&&(a<0||l<a)&&(a=l);let f=a>0?e.substring(0,a):e;o(f)||s.push(f)}return s}function vD(t,e,r){let n=!e,o=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=n&&o&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!vt(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,ye(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,g=(m,y)=>{d.has(m)||Pn(f,m,c)&&(c[m]=y,d.add(m),Qe(f,m,y))},h=l.translations[u];if(h&&typeof h=="object")for(let m in h)g(m,h[m]);let p=new Set(l.languages||[]);for(let m in l.translations)p.has(m)||g(m,l.translations[m])}t.state=vt(c)?c:ur(c),t.state.__element=t,t.state.root=t.state,ye(t,t.state),Vo?.(a,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),ye(t,t.state);return}if(typeof i=="string"){if(t.state=av(i,e),t.state&&typeof t.state=="object"&&!vt(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}ye(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=vt(a)?a:ur(a||{})}else vt(i)?t.state=i:t.state=ur({...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,ye(t,t.state),Vo?.(i,t.state)}function gb(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function av(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?gb(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?gb(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=gb(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let n=e.context?.polyglot;if(n?.translations){let o=e.state?.root?.lang||n.defaultLang||"en",s=n.translations[o];if(s?.[t]!==void 0)return s[t];if(n.translations[t]!==void 0)return n.translations[t]}return{}}var CD=new Set(["s","state","ctx","context"]);function ED(t){try{let r=(typeof le=="function"?le(t):Function.prototype.toString.call(t)).match(/^[^(]*\(([^)]*)\)/);return r?r[1].split(",").map(n=>n.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function AD(t){if(typeof t!="function"||t.length!==2)return!1;let e=ED(t);if(e.length<2)return!1;let r=e[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!CD.has(r)}function TD(t){let e=t.__ref,r=t.tag||"div",n=t.context?.designSystem,o=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||Nt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Er(a)||xt[a]||At&&At.has(a)||Te(r,a)||(mt()&&AD(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).`),o.push({prop:a,fn:t[a]}))}for(let i=0;i<o.length;i++){let{prop:a,fn:c}=o[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){n&&at(n);try{return c(t,t.state,t.context)}catch{return}finally{n&&ot()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function OD(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let n=e[r];try{typeof n=="function"?n(t,t.state,t.context):typeof n=="string"&&t.state?.[n]}catch{}}}function $t(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...n){return OD(t,e),r.apply(this,n)}}function xc(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function ut(t,e){return()=>t.path.join(".")+"::"+e}var Nk=new Set;function Kt(t,e,r){if(!mt())return;let n=ut(t,e)();Nk.has(n)||(Nk.add(n),console.warn(`[smbls] "${e}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,r?.message||r))}var jk=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,RD=(t,e)=>{let r;try{r=String(t)}catch{return}if(!r.includes("{{"))return;jk.lastIndex=0;let n;for(;(n=jk.exec(r))!==null;)n[2].includes("{{")&&e.add(n[2])},PD=(t,e)=>!Er(t)&&!Ts(e,t),Bk=(t,e,r,n,o)=>{if(typeof e=="string"){!o&&e.includes("{{")&&r.add(e);return}typeof e=="function"&&PD(t,n)&&RD(e,r)},wb=new WeakMap,Rc=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Ec=t=>{if(typeof t=="string"||typeof t=="number")return{text:t};if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t.props;return e&&typeof e=="object"&&!Array.isArray(e)?io(t,e):t},Ac=(t,e)=>t&&e?io(t,e):t||e||null,cv=(t,e)=>{let r=t.__ref&&t.__ref.__runtimeSource;return!!r&&Rc(r,e)},Os=(t,e)=>cv(t,e)?Ec(t.__ref.__runtimeSource[e]):null,Tc=(t,e)=>(e&&t&&typeof t=="object"&&wb.set(t,e),t),DD=t=>{if(!t||typeof t!="object")return;let e=wb.get(t);return e&&wb.delete(t),e},Sb=(t,e,r)=>{if(typeof t=="string"){t.includes("{{")&&e.add(t);return}if(!(!t||typeof t!="object"||r.has(t))){if(r.add(t),Array.isArray(t)){for(let n=0;n<t.length;n++)Sb(t[n],e,r);return}if(!t.__ref)for(let n of Object.keys(t)){if(n==="state")continue;let o=Object.getOwnPropertyDescriptor(t,n);o&&"value"in o&&Sb(o.value,e,r)}}},LD=(t,e)=>{let r=null;for(let n of Object.keys(t)){if(Nt.has(n)||e&&Rc(e,n))continue;let o=Object.getOwnPropertyDescriptor(t,n),s=o&&o.value;if(!Array.isArray(s))continue;let i=new Set;Sb(s,i,new Set),i.size&&(r||(r=new Map),r.set(s,i))}return r},Vk=(t,e)=>{if(Array.isArray(e))for(let r=t;r;r=r.parent){let n=r.__ref&&r.__ref.__declaredArrays,o=n&&n.get(e);if(!o)continue;let s=t.__ref;s.__authoredTemplates||(s.__authoredTemplates=new Set);for(let i of o)s.__authoredTemplates.add(i);return}},ID=["attr","aria","data","metadata"],$D=t=>{if(ID.includes(t))return!0;let e=t.charCodeAt(0);return e===46||e===33||e===64},MD=(t,e)=>{let r=new Set,n=t.tag||"div";for(let o of Object.keys(t)){let s=Object.getOwnPropertyDescriptor(t,o),i=s&&s.value,a=!!e&&Rc(e,o);if(i&&typeof i=="object"&&!Array.isArray(i)){if(!$D(o))continue;let c=a?e[o]:null,l=c&&typeof c=="object"?c:null;for(let f in i){let u=a&&(!l||Rc(l,f));Bk(f,i[f],r,n,u)}continue}Bk(o,i,r,n,a)}return r};function lv(t,e){let r=t.__ref,n=!!(e&&e.skipIfEffect),o=MD(t,r.__runtimeSource);if(r.__authoredTemplates)for(let c of o)r.__authoredTemplates.add(c);else r.__authoredTemplates=o;if(TD(t),typeof t.text=="function"){let c=t.text,l=$t(t,t.textDeps,c),f=Y(()=>{if(!r.contentManaged)try{let u=l(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&typeof u!="object"&&(typeof u=="string"&&u.includes("{{")&&(u=Ft.call(t,u,t.state)),vs(t,u))}catch(u){Kt(r,"text",u)}},{depth:r.path.length,label:ut(r,"text")});r.__effects.push(f),r.__exec.text=c}else if(typeof t.text=="string"&&t.text.includes("{{")){let c=t.text,l=Y(()=>{if(r.contentManaged)return;let f=Ft.call(t,c,t.state);f!=null&&(t.text=f),t.node&&vs(t,f??"")},{depth:r.path.length,label:ut(r,"text")});r.__effects.push(l),r.__exec.text=c}let s=t.tag||"div";for(let c of Object.keys(t))if(typeof t[c]=="function"&&!Nt.has(c)&&!Er(c)&&!r.__exec[c]&&!Bu(s,c)){if(xt[c]){let l=t[c],f=$t(t,t[c+"Deps"],l),u=c,d,g=null,h=null,p,m=Y(()=>{let y=t.context?.designSystem;y&&at(y);try{let w=f(t,t.state,t.context);Tu();let b;try{b=xt[u](w,t,t.state,t.context)}finally{Ou()}if(Array.isArray(b)){let S={};for(let k of b)if(k)for(let E in k)S[E]=k[E];b=S}let _=u==="show"||u==="hide";if(b&&t.node&&FD(b)){let S=zu(b);if(S===null||S!==p){p=S;let k=ge(b,null,t.context?.cssPrefix),E=k?k.split(" ").filter(Boolean):null;if(t.node.classList){if(h)for(let T of h)t.node.classList.remove(T);if(E&&E.length)for(let T of E)t.node.classList.add(T);h=E}}d=void 0,g=null}else if(b&&t.node){if(h){for(let k of h)t.node.classList.remove(k);h=null,p=void 0}let S=zu(b);if(S===null||S!==d||!Uu(t.node,g)){d=S;let k=Hk(t,b);g=Vu(t.node,k)}}else t.node&&_&&(d=void 0,g=null,t.node.style.display="")}finally{y&&ot()}},{depth:r.path.length,label:ut(r,u)});r.__effects.push(m),r.__exec[c]=l}else if(At&&At.has(c)){let l=t[c],f=$t(t,t[c+"Deps"],l),u=c,d,g=null,h=Y(()=>{let p=t.context?.designSystem;p&&at(p);try{let m=f(t,t.state,t.context);if(t.node)if(m!=null){let y=u+":"+String(m);if(y!==d||!Uu(t.node,g)){d=y;let w={[u]:m},b=Hk(t,w);g=Vu(t.node,b)}}else d=void 0,g=null,t.node.style[u]=""}finally{p&&ot()}},{depth:r.path.length,label:ut(r,u)});r.__effects.push(h),r.__exec[c]=l}}if(typeof t.html=="function"){let c=t.html,l=$t(t,t.htmlDeps,c),f=Y(()=>{let u=t.context?.designSystem;u&&at(u);try{let d=l(t,t.state,t.context);t.node&&d!=null&&typeof d!="function"&&(t.node.innerHTML=d)}finally{u&&ot()}},{depth:r.path.length,label:ut(r,"html")});r.__effects.push(f),r.__exec.html=c}if(typeof t.value=="function"){let c=t.value,l=$t(t,t.valueDeps,c),f=Y(()=>{try{let u=l(t,t.state,t.context);typeof u=="string"&&u.includes("{{")&&(u=Ft.call(t,u,t.state)),zk(t,u)}catch(u){Kt(r,"value",u)}},{depth:r.path.length,label:ut(r,"value")});r.__effects.push(f),r.__exec.value=c}else if(typeof t.value=="string"&&t.value.includes("{{")){let c=t.value,l=Y(()=>{try{zk(t,Ft.call(t,c,t.state))}catch(f){Kt(r,"value",f)}},{depth:r.path.length,label:ut(r,"value")});r.__effects.push(l),r.__exec.value=c}if(typeof t.style=="function"){let c=t.style,l=$t(t,t.styleDeps,c),f,u=null,d=Y(()=>{let g=l(t,t.state,t.context),h=zu(g);(h===null||h!==f||!Uu(t.node,u))&&(f=h,ND(t.node,u,g),so(t.node,g),u=Vu(t.node,g))},{depth:r.path.length,label:ut(r,"style")});r.__effects.push(d),r.__exec.style=c}else if(t.style&&typeof t.style=="object")for(let c in t.style){let l=t.style[c];if(typeof l!="function")continue;let f=$t(t,xc(t.styleDeps,c),l),u,d=null,g=Y(()=>{try{let h=f(t,t.state,t.context);if(t.node){let p=c+":"+String(h);if(p!==u||!Uu(t.node,d)){u=p;let m={[c]:h};so(t.node,m),d=Vu(t.node,m)}}}catch(h){Kt(r,"style."+c,h)}},{depth:r.path.length,label:ut(r,"style."+c)});r.__effects.push(g)}if(t.attr&&typeof t.attr=="object"){for(let c in t.attr)if(typeof t.attr[c]=="function"){let l=$t(t,xc(t.attrDeps,c),t.attr[c]),f=c,u=Y(()=>{try{let d=l(t,t.state,t.context);typeof d=="string"&&d.includes("{{")&&(d=Ft.call(t,d,t.state)),t.node?.setAttribute&&(d==null||d===!1&&!ar(f)?t.node.removeAttribute(f):typeof d!="function"&&typeof d!="object"&&t.node.setAttribute(f,re(f,d)))}catch(d){Kt(r,"attr."+f,d)}},{depth:r.path.length,label:ut(r,"attr."+f)});u._attrName=f.toLowerCase(),r.__effects.push(u)}else if(typeof t.attr[c]=="string"&&t.attr[c].includes("{{")){let l=t.attr[c],f=c,u=Y(()=>{try{let d=Ft.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(f,re(f,d??""))}catch(d){Kt(r,"attr."+f,d)}},{depth:r.path.length,label:ut(r,"attr."+f)});u._attrName=f.toLowerCase(),r.__effects.push(u)}}if(t.aria&&typeof t.aria=="object")for(let c in t.aria){let l=t.aria[c];if(typeof l=="string"&&l.includes("{{")){let g=l,h="aria-"+c.replace(/[A-Z]/g,m=>"-"+m.toLowerCase()),p=Y(()=>{try{let m=Ft.call(t,g,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(h,re(h,m??""))}catch(m){Kt(r,"aria."+c,m)}},{depth:r.path.length,label:ut(r,"aria."+c)});p._attrName=h,r.__effects.push(p);continue}if(typeof l!="function")continue;let f=$t(t,xc(t.ariaDeps,c),t.aria[c]),u="aria-"+c.replace(/[A-Z]/g,g=>"-"+g.toLowerCase()),d=Y(()=>{try{let g=f(t,t.state,t.context);if(!t.node?.setAttribute)return;g==null?t.node.removeAttribute(u):typeof g!="function"&&typeof g!="object"&&t.node.setAttribute(u,re(u,g))}catch(g){Kt(r,"aria."+c,g)}},{depth:r.path.length,label:ut(r,"aria."+c)});d._attrName=u,r.__effects.push(d)}if(t.data&&typeof t.data=="object")for(let c in t.data){let l=t.data[c];if(typeof l=="string"&&l.includes("{{")){let h=l,p="data-"+c.replace(/[A-Z]/g,y=>"-"+y.toLowerCase()),m=Y(()=>{try{let y=Ft.call(t,h,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(p,y??"")}catch(y){Kt(r,"data."+c,y)}},{depth:r.path.length,label:ut(r,"data."+c)});m._attrName=p,r.__effects.push(m);continue}if(typeof l!="function")continue;let f=$t(t,xc(t.dataDeps,c),t.data[c]),d="data-"+c.replace(/[A-Z]/g,h=>"-"+h.toLowerCase()),g=Y(()=>{try{let h=f(t,t.state,t.context);if(!t.node?.setAttribute)return;h==null||h===!1?t.node.removeAttribute(d):typeof h!="function"&&typeof h!="object"&&t.node.setAttribute(d,h===!0?"":h)}catch(h){Kt(r,"data."+c,h)}},{depth:r.path.length,label:ut(r,"data."+c)});g._attrName=d,r.__effects.push(g)}let i=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(i)for(let c in i){if(typeof i[c]!="function")continue;let l=$t(t,xc(t.classDeps,c),i[c]),f=Y(()=>{try{let u=l(t,t.state,t.context);if(!t.node?.classList)return;typeof u=="string"?t.node.classList.add(u):u?t.node.classList.add(c):t.node.classList.remove(c)}catch(u){Kt(r,"class."+c,u)}},{depth:r.path.length,label:ut(r,"class."+c)});r.__effects.push(f)}!n&&typeof t.if=="function"&&fv(t,r,t.if);for(let c of Object.keys(t)){if(Nt.has(c)||typeof t[c]!="function")continue;let l=c.charCodeAt(0);if(l>=65&&l<=90||Er(c))continue;let f=t[c];r.__exec[c]=f;let u=t.tag||"div";if(Te(u,c)&&!Ts(u,c)){let d=ir(c)||c,g=$t(t,t[c+"Deps"],f),h=Y(()=>{try{let p=g(t,t.state,t.context);typeof p=="string"&&p.includes("{{")&&(p=Ft.call(t,p,t.state)),t.node?.setAttribute&&(p==null||p===!1&&!ar(d)?t.node.removeAttribute(d):typeof p!="function"&&typeof p!="object"&&(d==="src"&&"src"in t.node?t.node.src=p:t.node.setAttribute(d,re(d,p))))}catch(p){Kt(r,c,p)}},{depth:r.path.length,label:ut(r,c)});h._attrName=d.toLowerCase(),r.__effects.push(h)}}let a=t.tag||"div";for(let c of Object.keys(t)){if(Nt.has(c))continue;let l=t[c];if(typeof l!="string"||!l.includes("{{"))continue;let f=c.charCodeAt(0);if(f>=65&&f<=90||Er(c)||Ts(a,c)||ro[c]||!Te(a,c))continue;let u=ir(c)||c,d=Y(()=>{try{let g=Ft.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,re(u,g??""))}catch(g){Kt(r,c,g)}},{depth:r.path.length,label:ut(r,c)});d._attrName=u.toLowerCase(),r.__effects.push(d)}if(HD(t),GD(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let c=t.onStateUpdate,l=t.stateDeps,f=!1,u=[],d=Y(()=>{let g=[];for(let y=0;y<l.length;y++){let w=l[y];try{g[y]=typeof w=="function"?w(t,t.state,t.context):t.state?.[w]}catch{g[y]=void 0}}if(!f){f=!0,u=g;return}let h=g.length!==u.length;for(let y=0;!h&&y<g.length;y++)g[y]!==u[y]&&(h=!0);let p=u;if(u=g,!h)return;let m=t.context?.designSystem;m&&at(m);try{c(t,t.state,t.context,{prev:p,next:g})}catch(y){if(t.context?.plugins?.length&&Ot("error",t,{hook:"onStateUpdate",error:y})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',y),t.context?.strictMode)throw y}finally{m&&ot()}},{depth:r.path.length,label:ut(r,"onStateUpdate")});r.__effects.push(d)}KD(t)}function Uk(t){let e=t.parent,r=e?.node;if(!r||!t.node){xv(t,t.parent);return}let n=null,o=Object.keys(e),s=o.indexOf(t.key);for(let i=s+1;i<o.length;i++){let a=e[o[i]];if(a?.node?.parentNode===r){n=a.node;break}}n?r.insertBefore(t.node,n):r.appendChild(t.node)}function fv(t,e,r){let n=$t(t,t.ifDeps,r),o=Y(()=>{let s=!e.__ifInitialized&&e.__ifLateMerge;if(s){let c=t.context?.components||{};s.names.some(l=>c[l]||c["smbls."+l])&&(e.__ifLateMerge=null,xD(t,s),n=$t(t,t.ifDeps,typeof t.if=="function"?t.if:r))}let i;try{i=n(t,t.state,t.context)}catch(c){if(i=!1,e.__ifError=c,typeof console<"u"&&console.warn){let l=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${l} \u2014 treating as false:`,c?.message||c)}return}let a=e.__if;if(e.__if=!!i,a&&!e.__if&&t.node){t.node.remove();try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(c){console.error("[smbls] onRemove error:",c)}}else if(!a&&e.__if)if(e.__ifInitialized)t.node||(t.node=en(t)),t.node&&(t.node.ref=t),Uk(t),xb(t),ie("Render",t,{}),bb(t,{});else{if(e.__ifInitialized=!0,e.__ifLateMerge=null,t.tag||(t.tag=tn(t)),ie("Init",t,{}),t.node||(t.node=en(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.tag==="fragment"&&!e.__fragmentAnchor){let l=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(l),e.__fragmentAnchor=l}ie("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),wv(t,{}),lv(t,{skipIfEffect:!0}),xb(t),yv(t),bv(t),Sv(t,{}),Uk(t),ie("Create",t,{}),ie("Complete",t,{}),ie("Render",t,{}),ie("RenderRouter",t,{}),bb(t,{})}},{depth:e.path.length,label:ut(e,"if")});e.__effects.push(o)}function vs(t,e){let r=t.node;if(!r)return;let n=e==null||typeof e=="object"?"":String(e);if(t.tag==="string"){r.nodeValue!==n&&(r.nodeValue=n);return}let o=t.__ref,s=o?o.__textNode:null;if(s&&s.parentNode!==r&&(s=null),!s){let i=r.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==n&&(s.nodeValue=n):r.firstChild?(s=(r.ownerDocument||t.context?.document||globalThis.document).createTextNode(n),r.insertBefore(s,r.firstChild)):(r.textContent=n,s=r.firstChild&&r.firstChild.nodeType===3?r.firstChild:null),o&&(o.__textNode=s||null)}function zk(t,e){let r=t.node;if(!r||!("value"in r))return;let n=e==null?"":String(e);if(r.value===n)return;let o=typeof document<"u"&&document.activeElement===r,s=o&&typeof r.selectionStart=="number"?r.selectionStart:null,i=o&&typeof r.selectionEnd=="number"?r.selectionEnd:null;if(r.value=n,o&&s!=null&&i!=null)try{r.setSelectionRange(s,i)}catch{}let a=t.__ref&&t.__ref.__autoGrow;a&&a.active&&a.resize()}function xb(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&vs(t,t.text),mv(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&!(typeof t.value=="string"&&t.value.includes("{{"))&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"){let r=t.style;for(let n in t.style)if(typeof t.style[n]=="function"){r={};for(let o in t.style)typeof t.style[o]!="function"&&(r[o]=t.style[o]);break}so(e,r)}if(t.attr&&typeof t.attr=="object")for(let r in t.attr){let n=t.attr[r];typeof n=="function"||typeof n=="object"||n!=null&&(typeof n=="string"&&n.includes("{{")||n===!1&&!ar(r)||e.setAttribute&&e.setAttribute(r,re(r,n)))}if(typeof t.themeModifier=="string"&&t.themeModifier&&e.setAttribute&&e.setAttribute("data-theme",t.themeModifier),t.data&&typeof t.data=="object")for(let r in t.data){let n=t.data[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||typeof n=="string"&&n.includes("{{")||e.dataset&&(e.dataset[r]=n===!0?"":n)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(n=>n&&e.classList.add(n));else if(typeof r=="object")for(let n in r){let o=typeof r[n]=="function"?r[n](t,t.state,t.context):r[n];o&&e.classList.add(typeof o=="string"?o:n)}}}}function zu(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function FD(t){if(!t||typeof t!="object")return!1;for(let e in t){let r=t[e];if(r&&typeof r=="object"&&!Array.isArray(r))return!0}return!1}function Vu(t,e){if(!t||!t.style||!e)return null;let r=t.style,n=[];for(let o in e){if(e[o]==null||o.charAt(0)==="&")continue;let i=Yu(o);n.push(i,Ab(r,i),uv(r,i))}return n}function Ab(t,e){return typeof t.getPropertyValue=="function"?t.getPropertyValue(e):""}function uv(t,e){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(e):""}function Yu(t){return Wu(t)?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function ND(t,e,r){if(!t||!t.style||!e||!e.length)return;let n=t.style,o=new Set;if(r&&typeof r=="object")for(let s in r)r[s]==null||s.charAt(0)==="&"||o.add(Yu(s));for(let s=0;s<e.length;s+=3){let i=e[s];o.has(i)||Ab(n,i)===e[s+1]&&typeof n.removeProperty=="function"&&n.removeProperty(i)}}function Uu(t,e){if(!e||!t||!t.style)return!1;let r=t.style;for(let n=0;n<e.length;n+=3)if(Ab(r,e[n])!==e[n+1]||uv(r,e[n])!==e[n+2])return!1;return!0}var Wu=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45;function jD(t){let e=null;for(let r in t)t[r]!=null&&r.charAt(0)!=="&"&&(e||(e=new Set),e.add(Yu(r)));return e}function BD(t,e,r,n){let o=t.__ref;if(!o)return;let s=null;if(r)for(let i of r){if(n&&n.has(i))continue;let a=e[i];if(a==null||typeof a=="object")continue;let c=Yu(i);Sc[c]&&(s||(s={}),s[c]=a)}o.__declaredLonghands=s}function dv(t,e){let r=t.__ref,n=r&&r.__declaredLonghands;if(!n||!e)return null;let o=null;for(let s in n){if(e.has(s))continue;let i=Sc[s],a=!1;for(let c=0;c<i.length;c++)if(e.has(i[c])){a=!0;break}a&&(o||(o={}),o[s]=n[s])}return o}function Hk(t,e){let r=t.node;so(r,e);let n=jD(e);if(!n)return e;let o=t.__ref;if(o)if(o.__inlineCssKeys)for(let i of n)o.__inlineCssKeys.add(i);else o.__inlineCssKeys=new Set(n);let s=dv(t,n);return s?(so(r,s),Object.assign({},e,s)):e}function VD(t){let e=t.__ref;if(!e||!e.__inlineCssKeys||!e.__declaredLonghands)return;let r=dv(t,e.__inlineCssKeys);r&&so(t.node,r)}function so(t,e){if(!t||!e||!t.style)return;let r=null;for(let n in e){let o=e[n];if(o!=null){if(n.charAt(0)==="&"&&typeof o=="object"){r||(r={}),r[n]=o;continue}try{let s=String(o),i=Wu(n)?n:n.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&&UD(t,r)}function UD(t,e){let r=`_ds${tv.scopedStyleId++}`;t.classList.add(r);let n=t.ownerDocument,o=n.querySelector("style[data-smbls-scoped]");o||(o=n.createElement("style"),o.setAttribute("data-smbls-scoped",""),n.head.appendChild(o));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 g=l[d];if(typeof g=="object"){let h=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),p="";for(let m in g)p+=`${m.replace(/[A-Z]/g,y=>"-"+y.toLowerCase())}: ${g[m]};`;u+=xr(`${h} { ${p} }`,h)+`
|
|
60
|
+
`}else f+=`${d.replace(/[A-Z]/g,h=>"-"+h.toLowerCase())}: ${g};`}f&&(s+=xr(`${c} { ${f} }`,c)+`
|
|
61
|
+
`),u&&(s+=u)}}s&&(o.textContent+=s)}var Wk=new Set;function qk(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 zD(t,e,r){let n=qk(r);queueMicrotask(()=>{if(!t.__ref)return;let o;try{o=e(t,t.state,t.context)}catch{return}if(qk(o)===n)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";Wk.has(s)||(Wk.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(o)?o.join(", "):String(o)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function HD(t){let e=t.subscribeTo,r=typeof e=="function",n=e;if(r)try{n=e(t,t.state,t.context)}catch{n=null}if(r&&mt()&&zD(t,e,Array.isArray(n)?n:[]),!Array.isArray(n)||n.length===0)return;let o=t.__ref;for(let s=0;s<n.length;s++){let i=n[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],l=a.slice(1),f={value:!1},u=Y(()=>{let d=t.state&&(vt(t.state)?t.state.root:null);if(!d||!vt(d))return;let g=d;g=g[c];for(let p=0;p<l.length&&!(g==null||typeof g!="object");p++)if(vt(g))g=g[l[p]];else break;if(!f.value)return;let h=!1;if(typeof t.onBeforeUpdate=="function"){let p=t.context?.designSystem;p&&at(p);try{if(Uy(o)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>kr(o,!1),y=>{kr(o,!0),t.context?.plugins?.length&&Ot("error",t,{hook:"onBeforeUpdate",error:y})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",y)}):(kr(o,!1),m===!1&&(h=!0))}}catch(m){kr(o,!0),t.context?.plugins?.length&&Ot("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{p&&ot()}}if(!h&&t.node&&o.__effects)for(let p=0;p<o.__effects.length;p++){let m=o.__effects[p];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!h&&typeof t.onUpdate=="function"){let p=t.context?.designSystem;p&&at(p);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&Ot("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{p&&ot()}}},{depth:o.path.length,label:ut(o,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,o.__effects.push(u)}}function Tb(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&!t.startsWith("@container")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}function Ob(t,e){if(t.charCodeAt(0)!==64||/^@(media|supports|container|keyframes)\b/.test(t))return t;let r=e.context?.designSystem?.media?.[t.slice(1)];return r?/^@(media|supports|container)\b/.test(r)?r:`@media ${r}`:t}var Kk=new Set;function WD(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",n=r+"::"+t;Kk.has(n)||(Kk.add(n),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 Ds(t,e,r,n){let o={},s=new Set,i=(a,c,l)=>{let f=l?new Set(Object.keys(o)):null;if(xt[a]){let u=xt[a](c,e,e.state,e.context);if(u){let d=Array.isArray(u)?u:[u];for(let g of d)g&&Object.assign(o,g)}}else o[a]=c;if(l)for(let u in o)f.has(u)||s.add(u)};for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let c=t[a];if(typeof c=="function"&&(c=c(e,e.state,e.context)),c==null||typeof c=="function")continue;if(typeof c=="object"&&!Array.isArray(c)){if(a==="style"){for(let g in c){let h=c[g];if(typeof h=="function"&&(h=h(e,e.state,e.context)),h==null||typeof h=="function")continue;let p=typeof e[g]=="function"&&(xt[g]||At&&At.has(g))||!!(n&&n.has(g));i(g,h,p)}continue}if(Tb(a,e)){let g=Ds(c,e,!1,n);Object.keys(g).length&&(o[`[data-theme="${a.slice(1)}"] &`]=g);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(a)){mt()&&WD(a,e);continue}let u=Ob(a,e),d=Ds(c,e,!1,n);Object.keys(d).length&&(o[u]=d);continue}let l=typeof e[a]=="function"&&(xt[a]||At&&At.has(a)),f=!!(n&&n.has(a));i(a,c,l||f)}if(r)for(let a in o)s.add(a);for(let a of s){let c=o[a];typeof c=="string"&&!c.includes("!important")&&(o[a]=c+" !important")}return o}var qu=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function pv(t,e){for(let r in e){let n=e[r];t[r]=qu(n)?pv(qu(t[r])?t[r]:{},n):n}return t}function qD(t,e){if(!qu(e))return;let r;for(let n of t.split(" ")){let o=n?e[n]:null;qu(o)&&(r=pv(r||{},o))}return r}function Rb(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)&&Rb(t[r],e+1))return!0}return!1}function hv(t,e,r){if(!e||typeof e!="object"||Array.isArray(e))return null;if(Tb(t,r)){let s=Ds(e,r,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let n=Ob(t,r),o=Ds(e,r,!1);return Object.keys(o).length?{cssProp:n,block:o}:null}function KD(t){let e=t.__ref;for(let r of Object.keys(t)){if(!_b(r))continue;let n=t[r];if(!n||typeof n!="object"||Array.isArray(n)||!Rb(n))continue;let o=null,s,i=Y(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&at(a);let c,l=!1;try{let f=hv(r,n,t),u=f?zu(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=ge({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&ot()}if(!(l||!t.node.classList)){if(o)for(let f of o)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);o=c}},{depth:e.path.length,label:ut(e,"cssBlock("+r+")")});e.__effects.push(i)}}function GD(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let n of Object.keys(t)){let o=n.charAt(0);if(o!=="."&&o!=="!")continue;let s=n.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let h=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${n}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${o}\` is read as one prop name. Nest the selector inside instead: \`${o}${h}: { '${s.slice(h.length)}': {...} }\`.`)}continue}let i=t[n];if(!i||typeof i!="object")continue;let a=o==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=new Set;for(let h in i){if(!Object.prototype.hasOwnProperty.call(i,h))continue;let p=h.charAt(0),m=i[h];(p===":"||p==="@"||p==="&"||p==="[")&&m&&typeof m=="object"&&!Array.isArray(m)||l.add(h)}let f=()=>{let h,p=t[s];if(p===void 0){let w=!!t.state&&s in t.state,b=t.state?t.state[s]:void 0;if(w||b!==void 0)h=b;else{let _=t.context?.cases?.[s];if(_===void 0)return;try{h=typeof _=="function"?_.call(t,t):_}catch(S){h=!1,e.__conditionalError=S,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,S?.message||S)}}}else if(typeof p=="function")try{h=p(t,t.state,t.context)}catch(w){h=!1,e.__conditionalError=w,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,w?.message||w)}else h=p;let m=a?!h:!!h;if(!t.node||m===c.lastMatch)return;c.lastMatch=m;let y=t.context?.designSystem;y&&at(y);try{if(m){let w={},b={},_=!1;for(let k in i){if(!Object.prototype.hasOwnProperty.call(i,k))continue;let E=i[k],T=k.charAt(0);if((T===":"||T==="@"||T==="&"||T==="[")&&E&&typeof E=="object"&&!Array.isArray(E)){if(Tb(k,t)){let O=Ds(E,t,!1,l);Object.keys(O).length&&(b[`[data-theme="${k.slice(1)}"] &`]=O,_=!0)}else{let O=Ob(k,t),F=Ds(E,t,!1,l);Object.keys(F).length&&(b[O]=F,_=!0)}continue}let I=typeof E=="function"?E(t,t.state,t.context):E;if(I!=null)if(xt[k]){let O=xt[k](I,t,t.state,t.context);if(O){let F=Array.isArray(O)?O:[O];for(let z of F)z&&Object.assign(w,z)}}else(At&&At.has(k)||Wu(k))&&(w[k]=I)}let S=Object.keys(w);if(S.length){so(t.node,w);for(let k of S)r.set(k,n);c.appliedKeys=S}else c.appliedKeys=null;if(_){let k=ge(b,null,t.context?.cssPrefix,{state:!0}),E=k?k.split(" ").filter(Boolean):[];if(E.length&&t.node.classList){for(let T of E)t.node.classList.add(T);c.appliedClasses=E}else c.appliedClasses=null}else if(c.appliedClasses){for(let k of c.appliedClasses)t.node.classList.remove(k);c.appliedClasses=null}}else{if(c.appliedKeys){for(let w of c.appliedKeys)r.get(w)===n&&(Wu(w)?t.node.style.removeProperty(w):t.node.style[w]="",r.delete(w));c.appliedKeys=null}if(c.appliedClasses){for(let w of c.appliedClasses)t.node.classList.remove(w);c.appliedClasses=null}}}finally{y&&ot()}};e.__conditionalRunners.push(f);let u=$t(t,t[s+"Deps"],f),d=Y(u,{depth:e.path.length,label:ut(e,"conditional("+n+")")}),g=e.__exec&&e.__exec[s]||t[s];d._sources.size===0&&typeof g=="function"&&mt()&&console.warn(`[smbls] conditional \`${n}\` on ${t.key||"?"} subscribed to nothing \u2014 its predicate tracked no reactive read on its first run, so no state write will ever re-evaluate it (only a direct element.update() on this element re-runs it). If the predicate guards its state reads (\`in\`, short-circuits, \`?.\`), declare \`${s}Deps: [...]\` (state-key strings or \`(el, s) => \u2026\` selectors) so the subscription is armed unconditionally.`),e.__effects.push(d)}}var mb=new WeakSet;function YD(t){let e=t.ownerDocument;!e||mb.has(e)||(mb.add(e),queueMicrotask(()=>{mb.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var yb=new WeakSet,Gk=!1;function Yk(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function kb(t,e){let r={...t};for(let n in e){let o=e[n],s=r[n];r[n]=o&&typeof o=="object"&&s&&typeof s=="object"?kb(s,o):o}return r}function gv(t,e){let r={};for(let n in t){let o=t[n];if(o&&typeof o=="object"){let s=gv(o,e);Object.keys(s).length&&(r[n]=s)}else e.has(n)||(r[n]=o)}return r}function mv(t){let{node:e}=t;if(!e)return;if(Gk||(Gk=!0,ge({display:"none"})),yb.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}yb.add(t);let r=t.context?.designSystem;r&&at(r),Tu();try{let n={},o=!1,s=[],i=null,a=null,c=null,l=(h,p)=>{if(p&&typeof p=="object"&&Yk(h)){a||(a={});let m=a[h];m&&(p=kb(m,p)),a[h]=p}else(p===null||typeof p!="object")&&(c||(c=new Set),c.add(h));n[h]=p};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&xt.theme){let h=xt.theme(t.theme,t,t.state,t.context);if(h){let p=m=>{for(let y in m){let w=m[y];w&&typeof w=="object"&&Yk(y)&&(i||(i={}),i[y]=w),n[y]=w}};if(Array.isArray(h))for(let m of h)m&&p(m);else p(h);o=!0}}let f=(h,p)=>{if(xt[h]){let m=xt[h](p,t,t.state,t.context);if(m){if(Array.isArray(m)){for(let y of m)if(y)for(let w in y)l(w,y[w])}else for(let y in m)l(y,m[y]);o=!0}}else if(At&&At.has(h))p!=null&&typeof p!="object"&&(l(h,p),o=!0);else if(h.charCodeAt(0)===45)p!=null&&typeof p!="object"&&(l(h,p),o=!0);else if((h.charAt(0)==="&"||h.charAt(0)==="@"||h.charAt(0)===":"||h.charAt(0)==="[")&&p&&typeof p=="object"&&!Array.isArray(p)){if(Rb(p))return;let m=hv(h,p,t);m&&(l(m.cssProp,m.block),o=!0)}};if(typeof t.class=="string"){let h=qD(t.class,t.context?.designSystem?.class);if(h)for(let p in h)f(p,h[p])}let u=c?new Set(c):null,d=t.tag||"div";for(let h of Object.keys(t)){if(typeof t[h]=="function"||Nt.has(h)||h==="theme")continue;let p=h.charCodeAt(0);p>=65&&p<=90||Er(h)||Bu(d,h)||f(h,t[h])}if(i)for(let h in i){let p=c?gv(i[h],c):i[h];a&&a[h]&&(p=kb(p,a[h])),Object.keys(p).length?n[h]=p:delete n[h]}if(BD(t,n,c,u),o){n.display&&String(n.display).includes("!important")&&(e.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);let h=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;typeof h=="string"&&h!==""&&n.display&&n.display!==h&&(n.display=h);let p=ge(n,null,t.context?.cssPrefix);if(s=p?p.split(" ").filter(Boolean):[],p&&e.classList){let m=s,y=!1;for(let w of m)e.classList.add(w),y||(w.charCodeAt(0)===95&&w.charCodeAt(1)===99||w.charCodeAt(0)===95&&w.indexOf("_c",1)!==-1)&&(y=!0);y&&YD(e)}}let g=t.__ref;if(g){let h=g.__staticCssClasses;if(h&&e.classList){let p=new Set(s);for(let m of h)p.has(m)||e.classList.remove(m)}g.__staticCssClasses=s}VD(t)}finally{Ou(),r&&ot(),yb.delete(t)}}var lk=t=>!!xt[t]||!!(At&&At.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function fk(t){t&&t.node&&mv(t)}function yv(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s=="function"||typeof s=="object"||s==null||typeof s=="string"&&s.includes("{{"))continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,re(i,s))}let r=Vy(t);for(let o in r){let s=r[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(o,s===!0?"":s)}let n=t.tag||"div";for(let o of Object.keys(t)){if(typeof t[o]=="function"||Nt.has(o)||o==="on"||r[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!Er(o)&&!Ts(n,o)&&Te(n,o)){let i=t[o];if(i==null)continue;if(typeof i=="string"&&i.includes("{{")){if(!ro[o])continue;i=Ft.call(t,i,t.state)}if(i==null||typeof i=="function"||typeof i=="object"||i===!1&&!ar(ir(o)||o))continue;let a=ir(o)||o;e.setAttribute(a,re(a,i))}}}function uk(t,e){let{node:r}=t;if(!r||!r.setAttribute)return;let n=e.charCodeAt(0);if(n>=65&&n<=90||Er(e))return;let o=t.tag||"div";if(Ts(o,e)||!Te(o,e))return;let s=ir(e)||e,i=s.toLowerCase(),a=t.__ref&&t.__ref.__effects,c=!1;if(a)for(let u=0;u<a.length;u++){let d=a[u];d&&d._attrName===i&&!d._disposed&&typeof d._execute=="function"&&(c=!0,d._execute())}if(c)return;let l=t[e],f=ro[e];if(f&&l!=null){let u=f(t);u!==void 0&&(l=u)}typeof l=="string"&&l.includes("{{")&&(l=Ft.call(t,l,t.state)),l==null||l===!1&&!ar(s)?r.removeAttribute(s):typeof l!="function"&&typeof l!="object"&&r.setAttribute(s,re(s,l))}function XD(t,e){let r=t.node,n=t.__ref,o=n.__autoGrow;if(!e){if(o&&o.active){try{r.removeEventListener("input",o.resize)}catch{}Zk(o),oo.delete(t),r.style.height="",o.appliedMax!=null&&r.style.maxHeight===o.appliedMax&&(r.style.maxHeight=""),Jk(r,o,!1),o.active=!1,o.appliedMax=null,o.lastMeasure=0}return}o||(o=n.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,lastWidth:null,watch:null,awaitingLayout:!1,appliedScroll:!1,fontsHooked:!1,attachAttempts:0,firstAttemptAt:null,resize:()=>{if(!r.isConnected){Pc(t,!0);return}if(!(r.scrollHeight>0)){o.awaitingLayout=!0,Xk(t,o);return}o.awaitingLayout=!1;let i=r.style.height;r.style.height="0px";let a=r.scrollHeight;if(!(a>0)){r.style.height=i;return}let c=QD(r),l=c!=null&&a>c;r.style.height=(l?c:a)+"px",Jk(r,o,l),o.lastMeasure=a,o.lastWidth=r.clientWidth,Xk(t,o)}},n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>{try{r.removeEventListener("input",o.resize)}catch{}Zk(o),oo.delete(t)})),o.active||(r.addEventListener("input",o.resize),o.active=!0,JD(t,o));let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==o.appliedMax&&(s==null?o.appliedMax!=null&&r.style.maxHeight===o.appliedMax&&(r.style.maxHeight=""):r.style.maxHeight=s,o.appliedMax=s),o.resize()}function Pc(t,e){let r=t.__ref?.__autoGrow;r&&(e&&(r.attachAttempts=0,r.firstAttemptAt=null),oo.add(t),Gu())}function ZD(){let t=Array.from(oo);oo.clear();for(let e=0;e<t.length;e++){let r=t[e],n=r.node,o=r.__ref?.__autoGrow;if(!(!n||!o||!o.active)){if(!n.isConnected){o.firstAttemptAt==null&&(o.firstAttemptAt=Ps()),o.attachAttempts+=1,o.attachAttempts<=nv&&Ps()-o.firstAttemptAt<ov&&(oo.add(r),Gu());continue}o.attachAttempts=0,o.firstAttemptAt=null,o.resize()}}}function Xk(t,e){if(e.watch)return;let r=t.node;if(!r)return;let n=r.ownerDocument&&r.ownerDocument.defaultView,o=n&&n.ResizeObserver||(typeof ResizeObserver=="function"?ResizeObserver:null);if(typeof o!="function")return;let s=()=>{if(!e.active||!r.isConnected||!(r.scrollHeight>0))return;if(e.awaitingLayout){e.awaitingLayout=!1,Pc(t,!0);return}let a=r.clientWidth;e.lastWidth!=null&&Math.abs(a-e.lastWidth)<.5||(e.lastWidth=a,Pc(t,!0))},i;try{i=new o(s),i.observe(r)}catch{return}e.watch=i}function Zk(t){let e=t.watch;if(e){t.watch=null;try{e.disconnect()}catch{}}}function JD(t,e){if(e.fontsHooked)return;e.fontsHooked=!0;let r=t.node&&t.node.ownerDocument,n=r&&r.fonts&&r.fonts.ready;!n||typeof n.then!="function"||n.then(()=>{e.active&&t.node&&Pc(t,!0)},()=>{})}function QD(t){let e=t.ownerDocument&&t.ownerDocument.defaultView,r;try{r=e&&e.getComputedStyle?e.getComputedStyle(t):null}catch{r=null}if(!r)return null;let n=f=>typeof f=="string"&&/^\s*-?\d*\.?\d+px\s*$/.test(f)?parseFloat(f):null,o=n(r.maxHeight);if(o==null||!(o>0))return null;let s=(n(r.paddingTop)||0)+(n(r.paddingBottom)||0),i=(n(r.borderTopWidth)||0)+(n(r.borderBottomWidth)||0),a=r.boxSizing==="border-box"?o-i:o+s,c=n(r.lineHeight);if(!(c>0))return a;let l=Math.floor((a-s)/c+1e-6);return l>=1?l*c+s:a}function Jk(t,e,r){r?e.appliedScroll||(t.style.overflowY="auto",e.appliedScroll=!0):e.appliedScroll&&(t.style.overflowY==="auto"&&(t.style.overflowY=""),e.appliedScroll=!1)}var Qk=["srcObject","muted"],tL=(t,e)=>t==="muted"?e===!0||e===""||e==="true"||e==="muted":e??null;function eL(t){let e=t.node,r=t.__ref;if(!(!e||!r))for(let n=0;n<Qk.length;n++){let o=Qk[n],s=t[o];if(s===void 0||!(o in e))continue;let i=a=>{let c=tL(o,a);if(e[o]!==c)try{e[o]=c}catch(l){Kt(r,o,l)}};if(typeof s=="function"){let a=$t(t,t[o+"Deps"],s),c=Y(()=>{try{i(a(t,t.state,t.context))}catch(l){Kt(r,o,l)}},{depth:r.path.length,label:ut(r,o)});r.__effects.push(c),r.__exec[o]=s}else i(s);o==="srcObject"&&(r.__releaseMedia=()=>{try{e.srcObject!=null&&(e.srcObject=null)}catch{}})}}function bv(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.__ref,n=t.autoGrow,o=typeof n=="function"?$t(t,t.autoGrowDeps,n):null,s=Y(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===n&&o?o:i)(t,t.state,t.context)}catch{a=null}XD(t,a)},{depth:r.path.length,label:ut(r,"autoGrow")});r.__effects||(r.__effects=[]),r.__effects.push(s),o&&(r.__exec.autoGrow=n)}var _v=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function wv(t,e){for(let r of Object.keys(t)){if(!Er(r)||_v.has(r))continue;let n=ku(r);if(n){vu(n,t,t[r]);continue}let o=t[r];if(typeof o=="string"&&/^[A-Za-z_$][\w$]*$/.test(o)){let i=o;o=function(c){return t.call(i,c)}}if(typeof o!="function")continue;let s=_D(r);rn.has(s)||Ss(wD(s),t,o)}rL(t)}function rL(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},n=!1;for(let d of _v){let g=t[d];typeof g=="function"&&(r[d]=g,n=!0)}if(!n)return;let o=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,s=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,a=0,c=0,l=!1,f=d=>{let g=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];g&&(i=g.clientX,a=g.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let g=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!g)return;let h=g.clientX-i,p=g.clientY-a,m=Date.now()-c;if(m>s)return;let y=Math.abs(h),w=Math.abs(p);if(Math.max(y,w)<o)return;let b;if(y>w*1.2)b=h<0?"left":"right";else if(w>y*1.2)b=p<0?"up":"down";else return;let _="onSwipe"+b.charAt(0).toUpperCase()+b.slice(1),S=r[_],k=r.onSwipe;S&&S.call(t,d,t,t.state,t.context),k&&k.call(t,{direction:b,dx:h,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 io(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=io(o,s):r[n]=s}return r}function vb(t,e,r,n,o){if(!e||!t.node)return;let s=t.childExtends,i=Os(t,"childProps");if(Array.isArray(e)){let a=t.tag==="fragment",c=t.context?.document||globalThis.document,l=a?null:c?.createDocumentFragment();if(!a&&!l)return;let f=t.childProps,u=t.childrenAs,d=w=>{let b=e[w],_=b;(typeof b=="string"||typeof b=="number")&&(b={text:b});let S=f;if(typeof f=="function")try{S=f(t,b)}catch{S=null}let k=typeof f=="function"?Ec(S):i;if(o&&u!=="state"&&(k=Ac(k,Ec(_))),u==="state"){let T=_;(typeof _=="string"||typeof _=="number")&&(T={value:_,text:_}),b=S?{...S,state:T}:{state:T}}else S&&(b=io(S,b));if(s&&!b.ignoreChildExtends)if(b.extends){let T=Array.isArray(b.extends)?b.extends:[b.extends],I=Array.isArray(s)?s:[s];b={...b,extends:[...I,...T]}}else b={...b,extends:s};let E=sv(b?.key,_,w);try{return ne(Tc(b,k),t,E,r)}catch(T){if(typeof console<"u"&&console.error){let I=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${E}" failed to construct at ${I} (initial render, skipping this row):`,T?.message||T)}return null}},g=t.__ref;if(!(n===!0&&!a&&!!g&&(r?.mountYield===!0||t.yieldChildren===!0))){for(let w=0;w<e.length;w++){let b=d(w);!a&&b?.node&&l.appendChild(b.node)}return a||t.node.appendChild(l),!0}let p=g.__childrenChunkGen=(g.__childrenChunkGen||0)+1;sb();let m=null,y=w=>{if(g.__disposed||g.__childrenChunkGen!==p){m&&m.parentNode&&m.remove();return}for(let b=w;b<e.length;b++){let _=d(b);if(_?.node&&(m?t.node.insertBefore(_.node,m):l.appendChild(_.node)),b+1<e.length&&ob()){m||(m=c.createComment("smbls-mount"),l.appendChild(m),t.node.appendChild(l));let S=b+1;ab(()=>y(S));return}}m?(m.remove(),t.node.tagName==="SELECT"&&Ku(t,!0)):t.node.appendChild(l)};return y(0),ib(),!0}if(typeof e=="string"){let a=av(e,t);if(Array.isArray(a))return vb(t,a,r,n,!0)}if(typeof e=="object")for(let a in e){if(Nt.has(a))continue;let c=e[a];if(c==null||c===!1)continue;let l=o?Ac(i,Ec(c)):i;if((typeof c=="string"||typeof c=="number")&&(c={text:c}),t.childProps&&(c=io(t.childProps,c)),s&&!c.ignoreChildExtends)if(c.extends){let f=Array.isArray(c.extends)?c.extends:[c.extends],u=Array.isArray(s)?s:[s];c={...c,extends:[...u,...f]}}else c={...c,extends:s};ne(Tc(c,l),t,a,r)}}function Ku(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let n=r.options;if(!n||!n.length)return;let o=t.__ref,s=o&&o.__exec&&o.__exec.value,i=typeof s=="function",a=t.value!=null&&typeof t.value!="function";if(i||a){let f;if(i)try{f=s(t,t.state,t.context)}catch{return}else f=t.value,typeof f=="string"&&f.includes("{{")&&(f=Ft.call(t,f,t.state));let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let c=e||!(o&&o.__selectSynced);if(o&&(o.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<n.length;f++)n[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function Sv(t,e){let{children:r,content:n}=t,o=t.childExtends,s=typeof r=="function"||cv(t,"children");if(typeof r=="function"){let h=r;try{r=h(t,t.state,t.context)}catch(b){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):`,b?.message||b)}}Vk(t,r),t.children=r;let p=t.__ref,m=!1,y=$t(t,t.childrenDeps,h),w=Y(()=>{let b=m;m=!0;let _;try{_=y(t,t.state,t.context)}catch(z){if(typeof console<"u"&&console.error){let Q=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${Q}${b?"":" (initial tracking run)"}:`,z?.message||z)}return}if(!b||_===t.children)return;Vk(t,_),t.children=_,p.__childrenChunkGen!=null&&p.__childrenChunkGen++;let S=typeof t.onContentUpdate=="function",k=S?[]:null,E=S?[]:null,T=S?[]:null;if(Array.isArray(_)&&t.childrenAs==="state"){let z=t.childProps,Q=[],Mt=new Map;for(let j=0;j<_.length;j++){let et=_[j],D=z;if(typeof z=="function")try{D=z(t,et)}catch{D=null}let X=sv(D&&D.key,et,j);Q.push(X),Mt.set(X,{rawChild:et,childProps:D})}let yt=new Set(Q),N=p.__children.slice();for(let j of N)if(!yt.has(j)){let et=t[j];et?.remove&&et.remove(),delete t[j],E&&E.push(j)}let q=t.childExtends,bt=t.tag==="fragment",kt=t.context?.document||globalThis.document,Rt=bt?null:kt?.createDocumentFragment(),G=new Set;for(let j of Q){let et=Mt.get(j),D=et.rawChild,X=t[j];if(X&&X.state){if(D&&typeof D=="object"){let V=X.state,ct=V.$replace||V.replace,H=V.$update||V.update;try{if(typeof ct=="function")ct.call(V,D);else if(typeof H=="function"){for(let lt in V)if(!(lt==="__element"||lt==="root"||lt==="parent"||lt==="update")&&!Object.prototype.hasOwnProperty.call(D,lt))try{V[lt]=void 0}catch{}H.call(V,D)}else for(let lt in D)V[lt]=D[lt]}catch(lt){if(typeof console<"u"&&console.error){let ai=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${j}" failed to patch at ${ai} (reconcile, keeping its previous data for this pass):`,lt?.message||lt)}}}T&&T.push(j);continue}let st=D;(typeof D=="string"||typeof D=="number")&&(st={value:D,text:D});let Pe=et.childProps,De=Pe?{...Pe,state:st}:{state:st},ii=typeof z=="function"?Ec(Pe):Os(t,"childProps");if(q&&!De.ignoreChildExtends)if(De.extends){let V=Array.isArray(De.extends)?De.extends:[De.extends],ct=Array.isArray(q)?q:[q];De={...De,extends:[...ct,...V]}}else De={...De,extends:q};let rt;try{rt=ne(Tc(De,ii),t,j,e)}catch(V){if(typeof console<"u"&&console.error){let ct=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${j}" failed to construct at ${ct} (reconcile, skipping this row):`,V?.message||V)}G.add(j);continue}!bt&&rt?.node&&Rt&&Rt.appendChild(rt.node),k&&k.push(j)}if(!bt&&Rt&&Rt.childNodes.length&&t.node&&t.node.appendChild(Rt),!bt&&t.node){let j=null;for(let et of Q){let D=t[et]?.node;if(!D)continue;let X=j?j.nextSibling:t.node.firstChild;D!==X&&t.node.insertBefore(D,X),j=D}}p.__children=G.size?Q.filter(j=>!G.has(j)):Q,S&&(k.length||E.length)&&Fk(t,{added:k,removed:E,kept:T}),Ku(t,!1);return}let F=S?[...p.__children]:null;for(let z of[...p.__children]){let Q=t[z];Q?.remove&&Q.remove(),delete t[z]}p.__children=[],vb(t,_,e,!1,!0),Ku(t,!1),S&&Fk(t,{added:[...p.__children],removed:F,kept:[]})},{depth:p.path.length,label:ut(p,"children")});p.__effects.push(w)}let i=vb(t,r,e,!0,s);if(n!=null&&!(n&&n.__ref)){let h=n;if(typeof h=="string"||typeof h=="number"?h={text:h}:typeof h!="object"&&(h={}),t.childProps&&(h=io(t.childProps,h)),o&&!h.ignoreChildExtends)if(h.extends){let m=Array.isArray(h.extends)?h.extends:[h.extends],y=Array.isArray(o)?o:[o];h={...h,extends:[...y,...m]}}else h={...h,extends:o};let p=Ac(Os(t,"childProps"),Os(t,"content"));ne(Tc(h,p),t,"content",e)}if(r&&!i)return;let a=t.context?.components||{},c=t.__ref&&t.__ref.__runtimeSource,l=c?{}:null;{let h=Object.keys(t);for(let p=0;p<h.length;p++){let m=h[p];if(!m.endsWith("Extends")||typeof t[m]!="string")continue;let y=m.slice(0,-7);if(!y||y.charCodeAt(0)<65||y.charCodeAt(0)>90)continue;let w={extends:t[m]};delete t[m];for(let b=p+1;b<h.length;b++){let _=h[b],S=_.charCodeAt(0);if(S>=65&&S<=90||Nt.has(_)||typeof t[_]=="function"&&(_.startsWith("on")||_.startsWith(".")))break;let k=t[_];k!==void 0&&(w[_]=k,delete t[_],l&&Rc(c,_)&&(l[y]||(l[y]={}),l[y][_]=c[_]))}t[y]&&typeof t[y]=="object"?t[y]={...w,...t[y]}:t[y]=w}}let f=e?.mountYield===!0||t.yieldChildren===!0,u=Object.keys(t),d=h=>{if(Nt.has(h)||typeof t[h]!="object"||t[h]===null)return;let p=h.charCodeAt(0);if(p<65||p>90)return;let m=t[h];if(m.__ref)return;if(!m.extends&&!m.extend){let w=a[h]||a[`smbls.${h}`];w&&(m={...m,extends:w})}if(t.childProps&&(m=io(t.childProps,m)),o&&!m.ignoreChildExtends)if(m.extends){let w=Array.isArray(m.extends)?m.extends:[m.extends],b=Array.isArray(o)?o:[o];m={...m,extends:[...b,...w]}}else m={...m,extends:o};let y=c?Ac(Os(t,"childProps"),Ac(l[h]||null,Os(t,h))):null;ne(Tc(m,y),t,h,e)};if(!f){for(let h of u)d(h);return}sb();let g=h=>{for(let p=h;p<u.length;p++)if(d(u[p]),p+1<u.length&&ob()){let m=p+1;ab(()=>g(m));return}};g(0),ib()}function xv(t,e,r){let{node:n}=t;if(!n)return;n.ref=t;let o=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(o){let i=o.parentNode;if(i){if(r?.position==="before"&&r.node)i.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let a=r.node.nextSibling;i.insertBefore(n,a||o)}else i.insertBefore(n,o);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(r?.position==="before"&&r.node)s.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let i=r.node.nextSibling;i?s.insertBefore(n,i):s.appendChild(n)}else s.appendChild(n)}var Cb=3;function Uy(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=Cb?!1:(t.__inBeforeUpdate=!0,!0)}function kr(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===Cb&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${Cb}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function ie(t,e,r){let n=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&Ot(n,e,r);let o="on"+t,s=e[o];if(typeof s=="function"){let c=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(c){if(e.__ref[c])return!0;e.__ref[c]=!0}let l=e.context?.designSystem;l&&at(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(g=>{e.context?.plugins?.length&&Ot("error",e,{hook:o,error:g})||console.error(`[DOMQL] Lifecycle "${o}" error:`,g)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(e.context?.plugins?.length&&Ot("error",e,{hook:o,error:u})||console.error(`[DOMQL] Lifecycle "${o}" error:`,u),e.context?.strictMode)throw u}finally{l&&ot(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var kv={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"],scrim:["black.45","black.55"],scrimSoft:["black.2","black.3"],blueDeep:"#0A5CB8",blueBright:"#47A8FF",accentInk:["blueDeep","blueBright"],greenDeep:"#2A6E28",greenBright:"#7FD07B",successInk:["greenDeep","greenBright"],redDeep:"#A83520",redBright:"#FF8C78",dangerInk:["redDeep","redBright"],orangeDeep:"#94500F",orangeBright:"#F4A45E",warningInk:["orangeDeep","orangeBright"],magentaDeep:"#A100A1",magentaBright:"#FF7AFF",magentaInk:["magentaDeep","magentaBright"]},vv={"gradient-blue-light":`linear-gradient(to right,
|
|
59
62
|
rgba(4, 116, 242, 1),
|
|
60
63
|
rgba(0, 48, 103, 1)
|
|
61
64
|
)`,"gradient-blue-dark":`linear-gradient(to right,
|
|
@@ -81,28 +84,28 @@ FROM ${a}${l}`},qO=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;
|
|
|
81
84
|
#1E54F0 36%,
|
|
82
85
|
#8B4CCA 69%,
|
|
83
86
|
#C66894 100%
|
|
84
|
-
)`};var kD={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"}}}},vD={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},CD={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"}}},av={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...kD,...vD,...CD,backdrop:{"@light":{background:"scrim",backdropFilter:"blur(8px)"},"@dark":{background:"scrim",backdropFilter:"blur(8px)"}},backdropSoft:{"@light":{background:"scrimSoft",backdropFilter:"blur(4px)"},"@dark":{background:"scrimSoft",backdropFilter:"blur(4px)"}},none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var cv={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var lv={ratio:1.618,subSequence:!0};var fv={SourceSans:[{url:""}]},uv={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 dv={symbols:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',logo:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',arrowDownCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-circle"><circle cx="12" cy="12" r="10"/><path d="M8 12l4 4 4-4M12 8v8"/></svg>',arrowDownLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-left"><path d="M17 7L7 17M17 17H7V7"/></svg>',arrowDownRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-right"><path d="M7 7l10 10M17 7v10H7"/></svg>',arrowDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down"><path d="M12 5v14M19 12l-7 7-7-7"/></svg>',arrowLeftCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left-circle"><circle cx="12" cy="12" r="10"/><path d="M12 8l-4 4 4 4M16 12H8"/></svg>',arrowLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>',arrowRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><path d="M5 12h14M12 5l7 7-7 7"/></svg>',arrowRightCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right-circle"><circle cx="12" cy="12" r="10"/><path d="M12 16l4-4-4-4M8 12h8"/></svg>',arrowUpCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-circle"><circle cx="12" cy="12" r="10"/><path d="M16 12l-4-4-4 4M12 16V8"/></svg>',arrowUpLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-left"><path d="M17 17L7 7M7 17V7h10"/></svg>',arrowUpRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-right"><path d="M7 17L17 7M7 7h10v10"/></svg>',arrowUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up"><path d="M12 19V5M5 12l7-7 7 7"/></svg>',checkCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><path d="M22 4L12 14.01l-3-3"/></svg>',check:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17l-5-5"/></svg>',chevronDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path d="M6 9l6 6 6-6"/></svg>',chevronLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><path d="M15 18l-6-6 6-6"/></svg>',chevronRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><path d="M9 18l6-6-6-6"/></svg>',chevronUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-up"><path d="M18 15l-6-6-6 6"/></svg>',copy:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>',eyeOff:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye-off"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24M1 1l22 22"/></svg>',eye:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',info:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-info"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>',lock:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg>',minus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minus"><path d="M5 12h14"/></svg>',sun:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>',moon:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg>',moreHorizontal:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-horizontal"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',moreVertical:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>',send:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-send"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg>',smile:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-smile"><circle cx="12" cy="12" r="10"/><path d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"/></svg>',search:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>',upload:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-upload"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"/></svg>',video:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video"><path d="M23 7l-7 5 7 5V7z"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>',x:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><path d="M18 6L6 18M6 6l12 12"/></svg>',star:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',plus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><path d="M12 5v14M5 12h14"/></svg>'};var pv={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 hv={base:150,ratio:1.333,unit:"ms",subSequence:!0,defaultBezier:"cubic-bezier(.29, .67, .51, .97)",springBezier:"cubic-bezier(.32, .72, 0, 1)"};var gv={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Tc={version:"0.0.1",color:sv,gradient:iv,theme:av,typography:cv,spacing:lv,font:fv,fontFamily:uv,timing:hv,icons:dv,media:pv,sizes:gv,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}},modalIn:{from:{transform:"scale(0.95)",opacity:0},to:{transform:"",opacity:1}},modalOut:{to:{transform:"scale(0.95)",opacity:0}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Ps={};M(Ps,{A:()=>IC,AssetPicture:()=>Lv,Audio:()=>Mv,Avatar:()=>YC,B:()=>eC,Block:()=>mv,Box:()=>Yu,Br:()=>sC,Button:()=>FC,ButtonSet:()=>VC,COMPONENTS:()=>oo,Caption:()=>qv,Checkbox:()=>gC,CheckboxHgroup:()=>mC,Circle:()=>Rv,CircleButton:()=>jC,Clickable:()=>Av,Data:()=>nC,Dialog:()=>zC,DialogFooter:()=>WC,DialogHeader:()=>HC,Dropdown:()=>ZC,DropdownList:()=>JC,DropdownParent:()=>QC,DropdownParentFocus:()=>tE,DropdownSiblingFocus:()=>eE,FileIcon:()=>TC,Flex:()=>bv,Focusable:()=>Tv,FocusableComponent:()=>Ov,Footnote:()=>tC,Form:()=>vv,Grid:()=>xv,Gutter:()=>Sv,H1:()=>jv,H2:()=>Bv,H3:()=>Vv,H4:()=>Uv,H5:()=>zv,H6:()=>Hv,Headline:()=>Jv,Hgroup:()=>fC,HgroupButton:()=>dC,HgroupRows:()=>uC,Hoverable:()=>Ev,Hr:()=>oC,I:()=>rC,Icon:()=>EC,IconButton:()=>UC,IconText:()=>AC,Iframe:()=>Cv,Img:()=>kv,Inline:()=>yv,InlineFlex:()=>_v,InlineGrid:()=>wv,Input:()=>pC,Italic:()=>Xv,KangorooButton:()=>BC,Li:()=>iC,Link:()=>Qb,Notification:()=>rE,NumberInput:()=>hC,Ol:()=>cC,P:()=>Wv,Picture:()=>Dv,Radio:()=>yC,RadioHgroup:()=>bC,Range:()=>XC,RouteLink:()=>$C,RouterLink:()=>t_,SHAPES:()=>Ku,Select:()=>MC,Shape:()=>Rb,Span:()=>Nv,SquareButton:()=>NC,Strong:()=>Kv,Subhead:()=>Qv,Svg:()=>Iv,Text:()=>Fv,Textarea:()=>wC,TextareaWithButton:()=>SC,Theme:()=>Pv,Title:()=>Zv,Toggle:()=>_C,ToggleHgroup:()=>xC,Tooltip:()=>qC,TooltipHidden:()=>KC,TooltipParent:()=>GC,U:()=>Gv,Ul:()=>aC,Underline:()=>Yv,Video:()=>$v,depth:()=>Gu,focusableRingEnabled:()=>Wu,getSystemGlobalTheme:()=>Oc});var Cb={};M(Cb,{Block:()=>mv,Flex:()=>bv,Grid:()=>xv,Gutter:()=>Sv,Inline:()=>yv,InlineFlex:()=>_v,InlineGrid:()=>wv});var mv={display:"block"},yv={display:"inline"},bv={display:"flex"},_v={display:"inline-flex"},xv={display:"grid"},wv={display:"inline-grid"},Sv={boxSize:"C1"};var Eb={};M(Eb,{Img:()=>kv});L();var kv={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=Zt(t);return e&&e.src||t.src},srcset:t=>{let e=Zt(t);return(e?Ca(e):"")||t.srcset}}};var Ab={};M(Ab,{Form:()=>vv});var vv={tag:"form"};var Tb={};M(Tb,{Iframe:()=>Cv});var Cv={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var Ob={};M(Ob,{Clickable:()=>Av,Focusable:()=>Tv,FocusableComponent:()=>Ov,Hoverable:()=>Ev,focusableRingEnabled:()=>Wu});var ED={appearance:"none",fontFamily:"inherit"},Ev={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}}},Av={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function Wu(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}var Tv={border:"none",outline:t=>Wu(t)?"solid 0 currentColor":"none",":focus-visible":{opacity:1,outline:t=>Wu(t)?"solid X currentColor":"none"},attr:{tabIndex:t=>t.tabIndex}},Ov={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",cursor:"pointer",":disabled":{cursor:"not-allowed"},style:ED};var Lb={};M(Lb,{Picture:()=>Dv});var Db={};M(Db,{Theme:()=>Pv,getSystemGlobalTheme:()=>Oc});var Pb={};M(Pb,{Circle:()=>Rv,SHAPES:()=>Ku,Shape:()=>Rb,default:()=>AD,depth:()=>Gu});L();var Ae=A(),Gu={4:{boxShadow:`rgba(0,0,0,.10) 0 2${Ae.unit.default} 4${Ae.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${Ae.unit.default} 6${Ae.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${Ae.unit.default} 10${Ae.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${Ae.unit.default} 16${Ae.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${Ae.unit.default} 26${Ae.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${Ae.unit.default} 42${Ae.unit.default}`}},Rs=t=>tt(t.shapeDirectionColor)||tt(t.borderColor)||tt(t.backgroundColor)||tt(t.background),qu=t=>{let e=hc.transition(t.transition,t);return e&&e.transition},Ku={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:Rs(t),transition:qu(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:Rs(t),transition:qu(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:Rs(t),transition:qu(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:qu(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${Rs(t)} 25%, transparent 25%), linear-gradient(315deg, ${Rs(t)} 25%, transparent 25%)`},"&:after":{background:Rs(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)"}}}},Rb={deps:{exec:pt,getSpacingBasedOnRatio:ke,getMediaColor:It},classlist:{shape:t=>t.deps.exec(Ku[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=Ku[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}}},Rv={round:"100%"},AD=Rb;L();var Oc=({context:t,state:e})=>{let r=e&&e.root,n=r&&r.globalTheme||t.designSystem&&t.designSystem.globalTheme;return n==="auto"?null:n},Pv={deps:{depth:Gu},classlist:{depth:t=>!Pt(t.depth)&&t.deps.depth[t.depth]}};var Dv={deps:{getSystemGlobalTheme:Oc},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:Oc},tag:"source",attr:{media:t=>{let{key:e,context:r,deps:n}=t,{media:o}=r.designSystem,s=n.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":o[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var Ib={};M(Ib,{AssetPicture:()=>Lv});L();var Lv={tag:"picture",children:t=>{let e=Zt(t);if(e)return Ea(e,t.alt)}};var $b={};M($b,{Svg:()=>Iv});var Iv={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:n}=e,o=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 g=d[1],p=e.document||(typeof document<"u"?document:null);if(!(p&&typeof p.getElementById=="function"&&p.getElementById(g))){let m=n&&n.scratchSystem&&n.scratchSystem.appendSVGSprite;r&&!r.__svgCache&&(r.__svgCache={}),typeof m=="function"?m({[g]:i},{document:p}):n&&typeof n.init=="function"&&n.init({svg:{[g]:i}},{document:p,emotion:e.emotion})}return a(g)}}if(!s&&i)return i;let c=t.spriteId;if(c)return a(c);if(o&&o[i])return a(i);let l=Symbol.for(i),f=o[l];if(f&&o[f])return a(f);if(!i)return a("");if(typeof i=="string"&&!i.includes("<"))return typeof console<"u"&&console.warn&&console.warn(`[Svg] Unknown sprite symbol "${i}" \u2014 not registered in design-system sprite. Set the icon name to one that exists in designSystem.icons / context.svg, or register the SVG body via utils.init({ svg: { '${i}': '<svg>...</svg>' } }).`),a("");let u=0;for(let d=0;d<i.length;d++)u=(u<<5)-u+i.charCodeAt(d)|0;return f=o[l]=`svg-${(u>>>0).toString(36)}`,n.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var Mb={};M(Mb,{Video:()=>$v});L();var $v={tag:"video",controls:!0,attr:{src:t=>{let e=Zt(t);return e&&e.src||t.src}},children:t=>{let e=Zt(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 Fb={};M(Fb,{Audio:()=>Mv});L();var Mv={tag:"audio",controls:!0,attr:{src:t=>{let e=Zt(t);return e&&e.src||t.src}},children:t=>{let e=Zt(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 Nb={};M(Nb,{B:()=>eC,Caption:()=>qv,Data:()=>nC,Footnote:()=>tC,H1:()=>jv,H2:()=>Bv,H3:()=>Vv,H4:()=>Uv,H5:()=>zv,H6:()=>Hv,Headline:()=>Jv,I:()=>rC,Italic:()=>Xv,P:()=>Wv,Span:()=>Nv,Strong:()=>Kv,Subhead:()=>Qv,Text:()=>Fv,Title:()=>Zv,U:()=>Gv,Underline:()=>Yv});var Fv={},Nv={tag:"span"},jv={tag:"h1"},Bv={tag:"h2"},Vv={tag:"h3"},Uv={tag:"h4"},zv={tag:"h5"},Hv={tag:"h6"},Wv={tag:"p"},qv={tag:"caption"},Kv={tag:"strong",fontWeight:"700"},Gv={tag:"u"},Yv={tag:"u"},Xv={tag:"i"},Zv={},Jv={tag:"h6",fontSize:"B",fontWeight:500},Qv={tag:"span",fontSize:"Z1"},tC={tag:"span",fontSize:"Z"},eC={tag:"b"},rC={tag:"i"},nC={tag:"data"};var jb={};M(jb,{Box:()=>Yu,Br:()=>sC,Hr:()=>oC,Li:()=>iC,Ol:()=>cC,Ul:()=>aC});var TD=t=>{if(!t.context)return;let{props:e,__ref:r}=t,n=ne(e,t,{unpack:!1});r.__class=n},Yu={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:TD},oC={tag:"hr",margin:"C1 0"},sC={tag:"br"},iC={tag:"li"},aC={tag:"ul",childExtends:{extends:"Li"}},cC={tag:"ol",childExtends:{extends:"Li"}};var Bb={};M(Bb,{Hgroup:()=>fC,HgroupButton:()=>dC,HgroupRows:()=>uC});var lC=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},fC={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:lC,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:lC,margin:"0",color:"paragraph"}},uC={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},dC={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var Vb={};M(Vb,{Input:()=>pC});var pC={extends:["Focusable"],tag:"input",border:"none",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 Ub={};M(Ub,{NumberInput:()=>hC});var hC={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 zb={};M(zb,{Checkbox:()=>gC,CheckboxHgroup:()=>mC});var gC={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"}}},mC={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var Hb={};M(Hb,{Radio:()=>yC,RadioHgroup:()=>bC});var yC={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}},bC={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var Wb={};M(Wb,{Toggle:()=>_C,ToggleHgroup:()=>xC});var _C={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}},xC={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var qb={};M(qb,{Textarea:()=>wC,TextareaWithButton:()=>SC});var wC={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"}},SC={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 Kb={};M(Kb,{FileIcon:()=>TC,Icon:()=>EC,IconText:()=>AC});var kC=new Set,vC=(t,e)=>{if(!kC.has(t)&&(kC.add(t),typeof console<"u"&&console.warn)){let r=e&&e.__ref&&e.__ref.path,n=r&&r.length?` at <${r.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${n} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},CC=new WeakMap,OD=t=>{let e=CC.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},CC.set(t,e)),e},RD=(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},PD=(t,e,r)=>{let n=r&&r.context&&r.context.document||(typeof document<"u"?document:null);at(t);try{let o=A();o&&!o.__svgCache&&(o.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=Kn(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&n&&Object.keys(s).length&&Gn(s,{document:n}),Object.keys(s).length>0}finally{ot()}},DD=(t,e,r,n,o)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=OD(s);if(a.failed.has(e))return!1;let c=a.waiting.get(e);if(c||(c=new Set,a.waiting.set(e,c)),c.add(o),a.pending.has(e))return!0;let l=Promise.resolve().then(()=>i(e,t)).then(f=>{let u=RD(f,r);return u?PD(s,u,n):!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(g){console.error("[Icon] repaint error:",g)}})});return a.pending.set(e,l),!0},EC={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,r)=>{let{parent:n}=t,{icons:o,useIconSprite:s,verbose:i}=r&&r.designSystem,{toCamelCase:a}=r&&r.utils,c=p=>{let h=p[".isActive"];if(h)return p.call("exec",h.name||h.icon)},l=(p,h,m)=>{let{semanticIcons:y}=m&&m.designSystem,{toCamelCase:x}=m&&m.utils,b=f(p,h),w=x(b).split(/([a-z])([A-Z])/g),S=w[1]?w[0]:b.split(".")[0].split(" ")[0],E=y&&y[S];if(E){let T=b.includes(".")?"sfsymbols."+b.split(".").slice(1).join("."):"sfsymbols";return b=E[T]||E[b.split(".")[0].split(" ")[0]],{tag:"span",semanticIcons:!0,width:"A",height:"A",lineHeight:"1em",":after":{fontSize:"Z",fontWeight:"300",content:`"${b}"`,textAlign:"center",display:"inline-block",style:{color:"currentColor",fontFamily:"'SF Pro Icons', 'SF Pro', 'SF Symbols', 'Segoe UI'"}}}}},f=(p,h)=>{let{key:m}=p,y=p.call("exec",p.name||p.icon||m,p);return p.call("isString",y)&&y.includes("{{")&&(y=p.call("replaceLiteralsWithObjectFields",y)),p.call("isString",y)?y:m},u=t.src,d,g=()=>{let p=f(t,e),h=p;if(p.includes(" ")){let O=p.split(" ");p=O[0]+O.slice(1).map(F=>F.charAt(0).toUpperCase()+F.slice(1)).join("")}let m=a(p),y=m.split(/([a-z])([A-Z])/g),x=l(t,e,r);if(x){Object.assign(t,x);return}let b;t.isActive&&(b=c(t));let _=n[".isActive"];n&&n.isActive&&_&&_.icon&&(b=t.call("exec",_.icon||_.Icon.name||_.Icon.icon,t)),t.call("isString",b)&&b.includes("{{")&&(b=t.call("replaceLiteralsWithObjectFields",b));let w;o[b]&&(w=b),o[m]?w=m:o[y[0]+y[1]]?w=y[0]+y[1]:o[y[0]]?w=y[0]:i&&t.warn("Can't find icon:",p,w);let S=o[w],E=n&&n.src||u;!S&&!E&&(DD(r,h,m,t,F=>{if(!(d&&d._disposed)){if(!F)return vC(h,t);g()}})||vC(h,t));let T=s&&w,I=S||E||o.noIcon;if(!(t.spriteId===T&&t.src===I&&t.node&&t.node.innerHTML)&&(t.spriteId=T,t.src=I,typeof t.html=="function"&&t.node)){let O=t.context&&t.context.designSystem;O&&at(O);try{let F=t.html(t,t.state,t.context);F!=null&&typeof F!="function"&&(t.node.innerHTML=F)}finally{O&&ot()}}};d=Y(g,{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"}},AC={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,r=t.call("exec",t.icon,t);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},TC={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var e_={};M(e_,{A:()=>IC,Link:()=>Qb,RouteLink:()=>$C,RouterLink:()=>t_});var Rc={};M(Rc,{default:()=>ND,getActiveRoute:()=>Jb,lastLevel:()=>Zu,lastPathname:()=>Xu,matchRoute:()=>Yb,parseQuery:()=>Xb,parseRoutePattern:()=>Gb,router:()=>ar,runGuards:()=>Zb});L();var RC=/^:(.+)/,PC=/^\*$/,OC=new Map,Gb=t=>{let e=OC.get(t);if(e)return e;let r=t.replace(/^\//,"").split("/"),n=[],o=!1;for(let i=0;i<r.length;i++){let a=r[i].match(RC);a?n.push({index:i,name:a[1]}):PC.test(r[i])&&(o=!0)}let s={segments:r,params:n,hasWildcard:o,pattern:t};return OC.set(t,s),s},Yb=(t,e,r=0)=>{let o=t.replace(/^\//,"").split("/").filter(Boolean).slice(r),s="/"+(o[0]||"");if(!e)return{key:null,content:null,params:{},routePath:s};let i=null,a=-1,c={};for(let l in e){if(l==="/*")continue;let f=Gb(l),u=LD(o,f);u>a&&(a=u,i=l,c=ID(o,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},LD=(t,e)=>{let{segments:r,hasWildcard:n}=e;if(!n&&r.length!==t.length&&r.length!==1&&r.length>t.length)return-1;let o=0,s=Math.min(r.length,t.length);for(let i=0;i<s;i++)if(r[i]===t[i])o+=3;else if(RC.test(r[i]))o+=1;else if(PC.test(r[i]))o+=.5;else return-1;return o},ID=(t,e)=>{let r={};for(let{index:n,name:o}of e.params)t[n]&&(r[o]=decodeURIComponent(t[n]));return r},Xb=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((n,o)=>{e[o]!==void 0?(Array.isArray(e[o])||(e[o]=[e[o]]),e[o].push(n)):e[o]=n}),e},Zb=async(t,e)=>{if(!t||!t.length)return!0;for(let r of t){let n=await r(e);if(n===!1)return!1;if(typeof n=="string")return n}return!0},Jb=(t=0,e)=>{e||(e=typeof C<"u"?C.location.pathname:"/");let n=e.split("/")[t+1];if(n)return`/${n}`},Xu,Zu=0,$D=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,DC={level:Zu,pushState:!0,replace:!1,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof nt<"u"&&(nt.scrollingElement||nt.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0,exitTimeout:300},MD=(t,e)=>{if(!t||t.visibilityState!=="visible")return!1;try{let r=e&&typeof e.matchMedia=="function"&&e.matchMedia("(prefers-reduced-motion: reduce)");if(r&&r.matches)return!1}catch{}return!0},LC=t=>{let e=t.__routeExit;e&&(t.__routeExit=null,e.abort())},FD=(t,e,r,n,o,s,i)=>{let a=e.__routeExit;if(a&&a.page===r)return a.wait;if(LC(e),!r||!r.node||typeof t.onRouteExit>"u"||!MD(s,i))return null;let c=typeof o=="number"&&o>=0?o:DC.exitTimeout,l=typeof AbortController=="function"?new AbortController:null,f={...n,page:r,timeout:c,signal:l?l.signal:void 0},u;try{u=hr("routeExit",t,f)}catch{return null}if(!u||typeof u.then!="function")return null;let d={page:r,abort:()=>{l&&!l.signal.aborted&&l.abort()}};return d.wait=new Promise(g=>{let p=setTimeout(()=>{d.abort(),g()},c),h=()=>{clearTimeout(p),g()};u.then(h,h)}),e.__routeExit=d,d.wait},ar=async(t,e,r={},n={})=>{let o=e||void 0,s=o?.context?.window||C,i=o?.context?.document||nt,a={...DC,...o.context.routerOptions,...n};Zu=a.lastLevel;let c=o.__ref;(a.contentElementKey!=="content"&&a.contentElementKey!==c.contentElementKey||!c.contentElementKey)&&(c.contentElementKey=a.contentElementKey||"content");let l=c.contentElementKey||a.contentElementKey||"content",f=s.location.origin!=="null"?s.location.origin:"http://localhost";t=$D(t);let u=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,d=new u(f+t),{pathname:g,search:p,hash:h}=d,m=Xb(p),y=o.node,x=h&&h!==s.location.hash.slice(1),b=g!==Xu;Xu=g;let _=c.__routerRendered,w,S,E,T;if(a.useParamsMatching){let N=Yb(g,o.routes,a.level);w=N.key,S=N.routePath,E=N.content,T=N.params}else{w=Jb(a.level,g),S=w;let N=o.routes;E=N?N[w||"/"]||N["/*"]:null,T={}}let I=a.scrollToNode?y:a.scrollNode;if(o.state?.root?.debugging){o.state.root.debugging=!1;return}if(!E){a.onNotFound?a.onNotFound({pathname:g,route:w,element:o}):a.silent||console.warn("[smbls/router] no content matched for path",g,"\u2014 available routes:",Object.keys(o.routes||{}));return}if(a.guards&&a.guards.length){let N={pathname:g,route:w,params:T,query:m,hash:h,element:o,state:r},q=await Zb(a.guards,N);if(q===!1)return;if(typeof q=="string")return ar(q,e,r,{...n,guards:[]})}let O=c.__routerNavSeq=(c.__routerNavSeq||0)+1,F=!_||_.content!==E||_.route!==w,z=b||F||a.force===!0;if(z&&_){let N=FD(o,c,o[l],{from:_.route,to:w,pathname:g,params:T,query:m,hash:h},a.exitTimeout,i,s);if(N&&(await N,c.__routerNavSeq!==O||(c.__routeExit&&c.__routeExit.wait===N&&(c.__routeExit=null),typeof o?.set!="function")))return}else LC(c);if(a.pushState){let N=g+(p||"")+(h||"");try{a.replace?s.history.replaceState(r,null,N):s.history.pushState(r,null,N)}catch{}}let Mt=b||!x?{route:w,routePath:S,hash:h,params:T,query:m,debugging:!1}:{params:T,query:m};if(a.updateState&&o.state.update(Mt,{preventContentUpdate:!0}),z){l&&a.removeOldElement&&o[l].remove();let N=o.__ref?.origin?.content,q={};if(N)for(let G in N){let j=N[G];G==="__ref"||G==="props"||G==="node"||G==="parent"||G==="key"||(typeof j=="string"||typeof j=="number"||typeof j=="boolean"||typeof j=="object"&&j!==null&&!j.node&&!j.__ref)&&(q[G]=j)}let bt={...q,...typeof E=="object"?E:{extends:E}};a.useFragment&&(bt.tag="fragment");let kt={content:E,route:w},Rt=c.__routerRendered;try{if(typeof o?.set!="function")return;c.__routerRendered=kt,o.set(bt,{contentElementKey:l})}catch(G){c.__routerRendered===kt&&(c.__routerRendered=Rt),console.error("[smbls/router] failed to render route content",g,G)}}let yt=!b&&x;if(a.scrollToTop&&!yt&&I?.scrollTo&&I.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&E[l]?.node?.scrollTo&&E[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),h){let N=i.getElementById(h.slice(1));if(N&&I?.scrollTo){let q=s.getComputedStyle?s.getComputedStyle(N):null,bt=q&&parseFloat(q.scrollMarginTop)||0,kt=N.getBoundingClientRect().top+I.scrollTop-bt-(a.scrollToOffset||0);I.scrollTo({...a.scrollToOptions||{},top:kt,left:0})}}hr("routeChanged",o,a)},ND=ar;var jD=(t,e,r)=>{let{context:n}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=n,d=e.__ref.root,g=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&&!g){t.preventDefault();try{let p=d;if(u&&u.customRouterElement){let h=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let y of h){if(!m||!m[y]){m=null;break}m=m[y]}m&&(p=m,d.routes&&(p.routes=d.routes))}(f.router||l.router||c.router||ar)(a,p,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(p){console.warn(p)}}},Qb={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>rn(t,t.href)||rn(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:jD},IC={extends:"Link"},t_={onClick:(t,e,r)=>{let{context:n}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=n,d=e.__ref.root,g=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&&!g){t.preventDefault();try{let p=d;if(u&&u.customRouterElement){let h=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let y of h){if(!m||!m[y]){m=null;break}m=m[y]}m&&(p=m,d.routes&&(p.routes=d.routes))}(f.router||l.router||c.router||ar)(a,p,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(p){console.warn(p)}}}},$C={extends:[Qb,t_]};var r_={};M(r_,{Select:()=>MC});var MC={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 n_={};M(n_,{Button:()=>FC,ButtonSet:()=>VC,CircleButton:()=>jC,IconButton:()=>UC,KangorooButton:()=>BC,SquareButton:()=>NC});var FC={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)},NC={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"},jC={extends:"SquareButton",round:"C"},BC={extends:"Button",childExtends:"IconText"},VC={tag:"nav",display:"flex",childExtends:"SquareButton"},UC={extends:["SquareButton","ClickableItem"],round:"Z"};var o_={};M(o_,{Dialog:()=>zC,DialogFooter:()=>WC,DialogHeader:()=>HC});var zC={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},HC={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},WC={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 s_={};M(s_,{Tooltip:()=>qC,TooltipHidden:()=>KC,TooltipParent:()=>GC});L();var qC={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=>Tt(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)}},KC={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)}},GC={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,n=e||r;if(!n)return;let o=n&&n[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var i_={};M(i_,{Avatar:()=>YC});var BD=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)},YC={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=BD(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 a_={};M(a_,{Range:()=>XC});var XC={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:Yo("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:Yo("#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 n=t.call("exec",t[e],t);return(t.call("isFunction",n)?n(t,t.state):n!==void 0?n: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 c_={};M(c_,{Dropdown:()=>ZC,DropdownList:()=>JC,DropdownParent:()=>QC,DropdownParentFocus:()=>tE,DropdownSiblingFocus:()=>eE});var ZC={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"},JC={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"}}},QC={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},tE={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()}}},eE={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 l_={};M(l_,{Notification:()=>rE});var rE={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 oo=Object.assign({},Cb,Eb,Ab,Tb,Ob,Lb,Ib,$b,Pb,Mb,Fb,Db,Nb,jb,Bb,Vb,Ub,zb,Hb,Wb,qb,Kb,e_,r_,n_,o_,s_,i_,a_,c_,l_);function Ju(t){if(t==null)return 0;if(typeof t!="object")return nE(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let n=0;n<t.length;n++)e=(e^Ju(t[n]))*16777619;return e>>>0}let r=Object.keys(t).sort();for(let n=0;n<r.length;n++)e=(e^nE(r[n]))*16777619,e=(e^Ju(t[r[n]]))*16777619;return e>>>0}function nE(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e}function Qu(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!=typeof e||typeof t!="object")return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!Qu(t[o],e[o]))return!1;return!0}let r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++){let s=r[o];if(!Object.prototype.hasOwnProperty.call(e,s)||!Qu(t[s],e[s]))return!1}return!0}function f_(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,n={};for(let o in t)if(o in e){let s=f_(t[o],e[o]);n[o]=s,s!==t[o]&&(r=!0)}else n[o]=t[o];for(let o in e)o in t||(n[o]=e[o],r=!0);return r?n:t}function u_(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 n in e){let o=e[n];o&&typeof o=="object"&&!Array.isArray(o)&&t[n]&&typeof t[n]=="object"&&!Array.isArray(t[n])?u_(t[n],o,r):t[n]=o}return t}function sn(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 Ds(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Pc(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():sn(e)}function oE(t){return t.split(`
|
|
85
|
-
`).map(
|
|
86
|
-
`)}var
|
|
87
|
-
${c}`}var
|
|
88
|
-
`)}function
|
|
89
|
-
${a}`}var d_=null;function ed(t){d_=t}var Ve={structuralHash:Ju,deepEqual:Qu,mergeStructural:f_,overwriteDeep:u_,shortHash:sn,toKebab:Ds,sanitizeValue:Pc,batchShortHash:oE,atomicCssClass:iE,batchAtomicCss:cE,compoundCssClass:lE},fE=!1,td=null;function uE(t){return td||(td=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(Ve.structuralHash=e.structuralHash),e.deepEqual&&(Ve.deepEqual=e.deepEqual),e.mergeStructural&&(Ve.mergeStructural=e.mergeStructural),e.overwriteDeep&&(Ve.overwriteDeep=e.overwriteDeep),e.shortHash&&(Ve.shortHash=e.shortHash),e.toKebab&&(Ve.toKebab=e.toKebab),e.sanitizeValue&&(Ve.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(Ve.batchShortHash=e.batchShortHash),e.atomicCssClass&&(Ve.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(Ve.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(Ve.compoundCssClass=e.compoundCssClass),fE=!0,d_&&e.batchAtomicCss&&d_({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),td)}function dE(){return fE}L();var Dc={};M(Dc,{CDN_PROVIDERS:()=>_e,DOMQL_EVENTS:()=>rh,DOMQ_PROPERTIES:()=>$r,ELEMENT_METHOD_OVERRIDE_POINTS:()=>Eo,ENV:()=>wh,HTML_TAGS:()=>Po,METHODS:()=>Fr,METHODS_EXL:()=>Si,NODE_ENV:()=>Ie,OPTIONS:()=>Gi,PACKAGE_MANAGER_TO_CDN:()=>Ur,PARSED_DOMQ_PROPERTIES:()=>wi,PROPS_METHODS:()=>Mr,REVIVED_MARK:()=>Ei,STATE_METHODS:()=>_n,STATE_PROPERTIES:()=>th,SVG_TAGS:()=>kw,TYPES:()=>hi,UNIVERSAL_RESERVED_KEYS:()=>Sf,__resetBuiltinMethodWarnings:()=>am,addCaching:()=>tf,addContext:()=>Ql,addExtend:()=>Hh,addExtends:()=>Ye,addItemAfterEveryElement:()=>Vp,addProtoToArray:()=>yi,addRef:()=>Xl,applyCSS:()=>g_,applyDependentState:()=>lg,applyEvent:()=>af,applyEventUpdate:()=>cf,applyExtends:()=>Ew,applyProps:()=>Vi,arrayContainsOtherArray:()=>Ip,arraysEqual:()=>zp,arrayzeValue:()=>Mn,buildImgSrcset:()=>Ca,buildSourcesAndImg:()=>Ea,cache:()=>hg,call:()=>Fg,captureSnapshot:()=>jg,checkForStateTypes:()=>sg,checkIfInherits:()=>sf,checkIfStringIsInArray:()=>qp,clone:()=>sh,cloneAndMergeArrayExtend:()=>Li,cloneFunction:()=>Th,collectExtendsList:()=>Do,concatAddExtends:()=>Vh,copyJavaScriptToClipboard:()=>fm,copyStringToClipboard:()=>lm,createBasedOnType:()=>Yl,createElement:()=>og,createElementExtends:()=>Fl,createExtends:()=>$i,createExtendsFromKeys:()=>Lo,createExtendsStack:()=>Vl,createIfConditionFlag:()=>Oh,createInheritedState:()=>ig,createKey:()=>Pi,createNestedObject:()=>hh,createNestedObjectByKeyPath:()=>cg,createObjectWithoutPrototype:()=>Ol,createParent:()=>Zl,createPath:()=>Jl,createProps:()=>Ui,createPropsStack:()=>Kl,createRoot:()=>ng,createScope:()=>ug,createSnapshotId:()=>Ri,customDecodeURIComponent:()=>Qp,customEncodeURIComponent:()=>Jp,cutArrayAfterValue:()=>jp,cutArrayBeforeValue:()=>Np,debounce:()=>Di,debounceOnContext:()=>Eh,decodeNewlines:()=>Zp,deepClone:()=>ft,deepContains:()=>dh,deepDefaults:()=>Wo,deepDestringifyFunctions:()=>me,deepExtend:()=>Ml,deepMerge:()=>it,deepMergeExtends:()=>Xe,deepStringifyFunctions:()=>vi,defineSetter:()=>$g,destringifyGlobalScope:()=>Ai,detectHeightOnInit:()=>Hg,detectInfiniteLoop:()=>bh,document:()=>nt,encodeNewlines:()=>Xp,error:()=>Pn,excludeKeysFromObject:()=>xh,exec:()=>pt,extendCachedRegistry:()=>Uh,extendStackRegistry:()=>Mi,extractArrayExtend:()=>Ni,fetchLibraryData:()=>Af,fibonacciNumberByIndex:()=>Wg,fileEntryUrl:()=>Cf,filterArrays:()=>Hp,filterArraysFast:()=>Wp,finalizeExtends:()=>Ul,findClosestNumber:()=>Ef,findClosestNumberInFactory:()=>nm,findInheritedState:()=>of,findKeyPosition:()=>Gp,flattenExtend:()=>Io,formatDate:()=>zg,generateHash:()=>Ll,generateHeadArrayTags:()=>vf,generateKey:()=>Oi,generateMetaTags:()=>em,get:()=>Pg,getActiveRoute:()=>Jb,getCDNDirUrl:()=>kf,getCDNUrl:()=>Me,getCapitalCaseKeys:()=>Kh,getCdnProviderFromConfig:()=>Uo,getChildStateInKey:()=>nf,getChildren:()=>Ig,getContext:()=>ua,getCookie:()=>Ih,getDB:()=>ma,getEmotionStylesheet:()=>hm,getExtendsInElement:()=>Wh,getExtendsStack:()=>Ii,getExtendsStackRegistry:()=>$l,getFrequencyInArray:()=>$p,getFunctionSource:()=>Le,getHashedExtend:()=>Fi,getImportMapScript:()=>Ug,getInObjectByPath:()=>yh,getLocalStorage:()=>Mh,getNev:()=>Ch,getPageMetadata:()=>rm,getParentStateInKey:()=>rf,getPath:()=>sa,getQuery:()=>ya,getRef:()=>Lg,getRoot:()=>ca,getRootContext:()=>fa,getRootData:()=>la,getRootState:()=>aa,getRootStateInKey:()=>ef,getSpreadChildren:()=>Gh,global:()=>Pp,hasFunction:()=>De,hasHandlerPlugin:()=>Oo,hasOwnProperty:()=>lh,hashContent:()=>Ho,inheritChildExtends:()=>jl,inheritChildPropsExtends:()=>Nl,inheritParentProps:()=>zi,inheritRecursiveChildExtends:()=>Bl,init:()=>Ar,initProps:()=>tg,is:()=>Xt,isArray:()=>P,isBoolean:()=>Sl,isBuiltinElementMethod:()=>eh,isContextComponent:()=>Yh,isCyclic:()=>_h,isDOMNode:()=>Yt,isDate:()=>vl,isDefined:()=>Tt,isDevelopment:()=>jr,isEmpty:()=>Al,isEmptyObject:()=>fh,isEqualDeep:()=>Tl,isFailedRevival:()=>vn,isFunction:()=>R,isHtmlElement:()=>di,isLazyFunction:()=>ih,isLocal:()=>vh,isLoudDevRuntime:()=>mt,isMalformedDependency:()=>Dn,isMethod:()=>Ng,isMobile:()=>Dh,isNode:()=>dr,isNot:()=>Lp,isNotProduction:()=>An,isNull:()=>kl,isNumber:()=>Ge,isObject:()=>v,isObjectLike:()=>B,isPhoto:()=>qg,isPolyglotRetranslatableKey:()=>Ki,isPolyglotWritableKey:()=>On,isProduction:()=>Nr,isProtectedElementMethod:()=>xn,isRevived:()=>Cn,isStaging:()=>kh,isState:()=>ag,isString:()=>k,isStringFunction:()=>To,isStringTag:()=>ah,isTest:()=>Pl,isTesting:()=>Sh,isUndefined:()=>Pt,isUniversallyReservedKey:()=>Bg,isUnresolvableDependency:()=>zr,isValidDependencyMap:()=>Ln,isValidHtmlTag:()=>Nh,isWrappedLibrary:()=>mr,joinArrays:()=>ko,jointStacks:()=>zh,keys:()=>xf,lastLevel:()=>Zu,lastPathname:()=>Xu,loadCssFile:()=>Xg,loadJavascript:()=>Zg,loadJavascriptFile:()=>Kg,loadJavascriptFileEmbedSync:()=>Yg,loadJavascriptFileSync:()=>Gg,loadRemoteCSS:()=>Jg,loadRemoteScript:()=>zo,log:()=>Mg,logGroupIf:()=>Ph,logIf:()=>Rh,lookdown:()=>Og,lookdownAll:()=>Rg,lookup:()=>Tg,lowercaseFirstLetter:()=>bn,makeObjectWithoutPrototype:()=>uh,map:()=>oh,mapStringsWithContextComponents:()=>ji,markPolyglotSeeded:()=>Je,markRevived:()=>Ao,matchRoute:()=>Yb,matchesComponentNaming:()=>Ze,memoize:()=>Ah,merge:()=>_t,mergeSharedLibraries:()=>wa,mergeSharedLibraryDesignSystems:()=>Sa,nextElement:()=>pa,normalizeIgnoreList:()=>xa,normalizeLibraryKey:()=>$n,objectToString:()=>Ci,objectizeStringProperty:()=>Bi,overwrite:()=>Ti,overwriteDeep:()=>zt,overwriteShallow:()=>En,overwriteState:()=>fg,parse:()=>wf,parseDeep:()=>na,parseQuery:()=>Xb,parseRoutePattern:()=>Gb,pickupElementFromProps:()=>Wl,pickupPropsFromElement:()=>Hl,polyglotSeededKeys:()=>$o,previousElement:()=>ha,promoteActiveRootState:()=>No,propExists:()=>Jh,propertizeElement:()=>ql,propertizeUpdate:()=>Zh,reinit:()=>h_,remove:()=>oS,removeChars:()=>um,removeCookie:()=>$h,removeDuplicateProps:()=>Wi,removeDuplicatesInArray:()=>vo,removeFromArray:()=>Mp,removeFromObject:()=>ph,removeNestedKeyByPath:()=>gh,removeValueFromArray:()=>mi,removeValueFromArrayAll:()=>Bp,reorderArrayByValues:()=>Up,replaceLiteralsWithObjectFields:()=>Ft,replaceOctalEscapeSequences:()=>Yp,resolveAsset:()=>Zt,resolveFileReferences:()=>In,resolveHandler:()=>Ro,resolveSharedLibraries:()=>cm,returnValueAsText:()=>Gl,router:()=>ar,runGuards:()=>Zb,runPluginHook:()=>Ot,scratchSystem:()=>as,scratchUtils:()=>qr,self:()=>Dp,set:()=>Xn,setActiveRootState:()=>ia,setCookie:()=>Lh,setHashedExtend:()=>Il,setInObjectByPath:()=>mh,setLocalStorage:()=>Fh,setNodeStyles:()=>_f,setProps:()=>Dg,setPropsPrototype:()=>Hi,sharedLibrary:()=>im,splitPackageSpecifier:()=>ba,spotByPath:()=>oa,srcsetFor:()=>qo,stringIncludesAny:()=>_i,stringToObject:()=>ch,stripVersionRangePrefix:()=>_a,swapItemsInArray:()=>Fp,syncProps:()=>qi,toCamelCase:()=>ka,toDashCase:()=>va,toDescriptionCase:()=>pm,toPriorityOrder:()=>ye,toTitleCase:()=>dm,toggleFullscreen:()=>Vg,triggerEventOn:()=>hr,triggerEventOnUpdate:()=>dg,trimStringFromSymbols:()=>Kp,unstackArrayOfObjects:()=>gi,update:()=>Qh,updateProps:()=>eg,variables:()=>ga,verbose:()=>jo,warn:()=>da,window:()=>C});L();L();var GD=A(),pE=(t=GD,e)=>{let r=v(e.localFile)?e.localFile:{},n=ft(r.designSystem||{});return it(t,n,le)},YD={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},rd=(t,e)=>{let r=!e||e===":root",n={};for(let o in t)if(o.startsWith("@media")){let s=r?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;n[o]={[s]:t[o]}}else r?n[o]=t[o]:n[`${e}${o}, ${o} ${e}`]=t[o];return n},p_=(t,e)=>{t.CSS_MEDIA_VARS&&wt(rd(t.CSS_MEDIA_VARS,e));let r=Yn(t.cssSkinVars,t.cssSkinFallback,e);Object.keys(r).length&&wt(r)},Ar=(t,e=YD)=>{let r=pE(t||{},e),n=e.scopeSelector||":root",o=e.globalTheme;if(typeof window<"u"&&window.location){let h=new URLSearchParams(window.location.search).get("globalTheme");h&&(o=h)}let s=Xn({verbose:e.verbose,useReset:e.useReset,useFontImport:e.useFontImport,useVariable:e.useVariable,useSvgSprite:e.useSvgSprite,useDocumentTheme:e.useDocumentTheme,useIconSprite:e.useIconSprite,useDefaultConfig:e.useDefaultConfig,globalTheme:o,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...r},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=n);let i=Pa(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=t.svg,d=s.useIconSprite,g=t.icons;l&&wt(i),c&&(wt({[n]:s.CSS_VARS}),p_(s,n)),a&&wt(s.reset);let p=s.animation;if(p){let h={};for(let m in p)h[`@keyframes ${m}`]=p[m];wt(h)}return(u||f)&&oc(s.svg,{document:e.document}),(g||d)&&Gn(s.icons,{document:e.document}),s},nd={},h_=(t,e=nd)=>{let r=pE(t||{},e),n=e.scopeSelector||":root",o=Xn({verbose:!1,...r});return e.preventInject||(wt({[n]:o.CSS_VARS}),p_(o,n),wt(o.reset)),o},g_=(t,e=nd)=>{wt(t)},XD=(t,e=nd)=>{let r=e.scopeSelector||":root";wt({[r]:t.CSS_VARS}),p_(t,r)};var ZD=(t,e=nd)=>{};L();var gE=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,JD=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},y_={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},Lc=(t,e)=>{if(!e)return t;let r=Array.isArray(e)?e:e.split("."),n=t;for(let o of r){if(!n||!n[o])return null;n=n[o]}return n},QD=["manual","auto"],m_=new WeakMap,hE=(t,e)=>{let r=e.claims[e.claims.length-1],n=r?r.value:e.found;t.scrollRestoration!==n&&(t.scrollRestoration=n)},tL=(t,e)=>{let r=e&&e.scrollRestoration;if(r!=null){if(!QD.includes(r)){if(t.verbose!==!1){let n=typeof r=="string"?JSON.stringify(r):`a ${typeof r}`;console.warn(`[smbls/router] router.scrollRestoration must be 'manual' or 'auto', got ${n} \u2014 the browser default stays`)}return}try{let n=t.window||C,o=n&&n.history;if(!o||!("scrollRestoration"in o))return;let s=m_.get(o);s||(s={found:o.scrollRestoration,claims:[]},m_.set(o,s));let i={value:r};s.claims.push(i),hE(o,s),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{let a=s.claims.indexOf(i);if(a!==-1){s.claims.splice(a,1),s.claims.length||m_.delete(o);try{hE(o,s)}catch{}}})}catch{}}},mE=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=y_:e.router=_t(e.router||{},y_);let r=e.router;tL(e,r);let n=async(s,i)=>{let a=s.context?.window||C,c=JD(r);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=gE(f),c=f+u+d}let l=s;if(r.customRouterElement){let f=Lc(s,r.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await ar(c,l,{},{initialRender:!0,pushState:!1})},o=!Pt(t.onRenderRouter);return r&&r.initRouter&&!o&&(t.onRenderRouter=n),eL(e,r),r},b_=(t,e)=>{if(e.router===!1)return;let r=e.router||y_;if(!r.popState)return;let n=e.utils&&e.utils.router?e.utils.router:ar,o=e.window||C,s=async i=>{let{pathname:a,search:c,hash:l}=o.location;a=gE(a);let f=a+c+l,u=t;if(r.customRouterElement){let d=Lc(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})};o.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>o.removeEventListener("popstate",s))},eL=(t,e)=>{let{components:r}=t;if(e&&e.injectRouterInLinkComponent)return it(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};L();var __=C&&C.location?C.location.host.includes("dev."):jr(),yE=__?"http://localhost:8080/get":"https://api.symbols.app/get",rL={endpoint:yE},bE=async(t,e=rL)=>{let r=e.endpoint||yE,n=e.serviceRoute?P(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",o;try{return o=await globalThis.fetch(r+"/?"+n,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await o.json()}catch(s){if(R(e.onError))return e.onError(s);console.error(s)}},nL=async(t,e)=>{let{editor:r}=e;if(r&&r.remote){let n=await bE(t,r),o=__||e.isDevelopment?me(n):me(n.releases[0]);r.serviceRoute?P(r.serviceRoute)?r.serviceRoute.forEach(s=>{zt(e[s],o[s.toLowerCase()])}):zt(e[r.serviceRoute],o):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{zt(e[s],o[s.toLowerCase()])})}return e},oL=async(t,e,r)=>{let{editor:n}=e;if(n&&n.remote){let o=await bE(t,n),s=__||e.isDevelopment?me(o):me(o.releases[0]);r(s)}},_E=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await nL(t,e)}catch(r){console.error(r)}},xE=(t,e,r,n)=>{if(e&&r.editor)try{r.editor.async&&oL(e,r,n||(o=>{let s=o.designSystem;v(s)&&r.utils.init(s),v(o.state)&&t.state.set(o.state)}))}catch(o){console.error(o)}};var Ic=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(n){console.error("[smbls] destroy teardown error:",n)}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 k_={};M(k_,{Helmet:()=>kE,applyMetadata:()=>Ms,default:()=>dL,extractMetadata:()=>lL,generateHeadHtml:()=>uL,helmetPlugin:()=>S_,resolveMetadata:()=>$s});L();var sL={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"}},iL=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}"]`},wE=t=>me({v:t}).v,SE=(t,e,r,n)=>{try{return pt(t,e,r)}catch(o){console.warn(`[helmet] metadata factory for "${n}" threw; treating as unset:`,o&&o.message||o);return}},x_=Object.freeze({authored:!0}),$s=(t,e,r,n)=>{if(!t)return{};let o=t;k(o)&&De(o)&&(o=wE(o));let s=R(o),i=!s&&n?.authored===!0,a=s?SE(o,e,r,"metadata"):v(o)?{...o}:{};if(!v(a))return{};for(let c in a){let l=a[c],f=i&&k(l)&&!De(l);k(l)&&De(l)&&(l=wE(l)),R(l)?l=SE(l,e,r,c):k(l)&&De(l)&&(l=void 0),k(l)&&l.includes("{{")&&e?.call&&(l=f?e.call("replaceLiteralsWithObjectFields",l,r,x_):e.call("replaceLiteralsWithObjectFields",l,r)),a[c]=l}return a},aL=t=>!!t&&typeof t=="object"&&(t.notFound===!0||t.metadata?.notFound===!0),cL=(t,e)=>{if(Object.prototype.hasOwnProperty.call(t,e))return t[e];if(t["/*"])return t["/*"];if(t["*"])return t["*"];for(let r in t)if(aL(t[r]))return t[r]},lL=(t,e="/",r,n)=>{let o=t.pages||{},s=cL(o,e),i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=$s(t.app.metadata,r,n,x_);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=$s(c,r,n,x_);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}}return In(i,t.files)},w_=(t,e)=>In($s(t,e,e.state),e.context?.files),fL=(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},Is=t=>{let e=5381,r=String(t);for(let n=0;n<r.length;n++)e=(e*33^r.charCodeAt(n))>>>0;return e.toString(36)},Ls=(t,e,r,n)=>{let o=t.head||t.querySelector("head");if(!o)return;let s=new Map;for(let a of o.querySelectorAll(`[${e}]`))s.set(a.getAttribute(e),a);let i=new Set;for(let a of 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=n(a);c&&(c.setAttribute(e,a),o.appendChild(c))}},Ms=(t,e)=>{if(!(!v(t)||!e)){for(let r in t){let n=t[r];if(n==null||r==="jsonLd"||r==="styles"||r==="scripts"||r==="alternate"||r==="favicons"||r==="icon"||r==="favicon")continue;let o=sL[r];if(!o)continue;let s=iL(o),i=e.querySelector(s)||fL(o,e);i&&(r==="title"?i.textContent=n:o.valueAttr?i.setAttribute(o.valueAttr,n):i.setAttribute("content",n))}if(Array.isArray(t.jsonLd)){let n=t.jsonLd.filter(s=>s!=null).map(s=>k(s)?s:JSON.stringify(s)),o=n.map(Is);Ls(e,"data-smbls-jsonld",o,s=>{let i=o.indexOf(s),a=e.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=n[i],a})}if(Array.isArray(t.styles)){let r=t.styles.filter(o=>o!=null&&String(o).trim()),n=r.map(Is);Ls(e,"data-smbls-style",n,o=>{let s=n.indexOf(o),i=e.createElement("style");return i.textContent=String(r[s]),i})}if(Array.isArray(t.scripts)){let r=t.scripts.filter(o=>o&&(k(o)?o.trim():o.src)),n=r.map(o=>k(o)?o:String(o.src));Ls(e,"data-smbls-script",n,o=>{let s=n.indexOf(o),i=r[s],a=e.createElement("script");return k(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(o=>v(o)),n=r.map(o=>`${o.hreflang||""}|${o.href||""}`);Ls(e,"data-smbls-alternate",n,o=>{let s=n.indexOf(o),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(o=>o!=null),n=r.map(o=>v(o)?Is(JSON.stringify(o)):String(o));Ls(e,"data-smbls-favicon",n,o=>{let s=n.indexOf(o),i=r[s],a=e.createElement("link");if(a.setAttribute("rel","icon"),v(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),n=r.endsWith(".svg")?"image/svg+xml":r.endsWith(".png")?"image/png":"";Ls(e,"data-smbls-single-icon",[r],o=>{let s=e.createElement("link");return s.setAttribute("rel","icon"),s.setAttribute("href",o),n&&s.setAttribute("type",n),s})}}},dt=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,r=>e[r])},uL=t=>{let e=['<meta charset="UTF-8">'],r=new Set(["charset","jsonLd","styles","scripts"]),n=!1;for(let[o,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||r.has(o)||typeof s=="function")continue;if(o==="title"){e.push(`<title>${dt(s)}</title>`);continue}if(o==="viewport"){n||(e.push(`<meta name="viewport" content="${dt(s)}">`),n=!0);continue}if(o==="canonical"){e.push(`<link rel="canonical" href="${dt(s)}">`);continue}if(o==="icon"||o==="favicon"){let f=dt(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(o==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,g])=>`${d}="${dt(g)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${dt(f)}">`)});continue}if(o==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,g])=>`${d}="${dt(g)}"`).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=>o.startsWith(f)),l=a.some(f=>o.startsWith(f));if(o.startsWith("http-equiv:")){let f=o.replace("http-equiv:","");e.push(`<meta http-equiv="${dt(f)}" content="${dt(s)}">`)}else if(o.startsWith("itemprop:")){let f=o.replace("itemprop:","");e.push(`<meta itemprop="${dt(f)}" content="${dt(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${dt(o)}" content="${dt(f)}">`)):e.push(`<meta property="${dt(o)}" content="${dt(s)}">`):l?e.push(`<meta name="${dt(o)}" content="${dt(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${dt(o)}" content="${dt(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${dt(o)}" content="${dt(s)}">`)}if(n||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let o of t.jsonLd){if(o==null)continue;let s=typeof o=="string"?o:JSON.stringify(o),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Is(s)}">${i}<\/script>`)}if(Array.isArray(t.styles))for(let o of t.styles){if(o==null||!String(o).trim())continue;let s=String(o).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Is(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let o of t.scripts){if(!o)continue;let s=typeof o=="string",i=s?o:o.src;if(!i&&!(o&&o.body))continue;let a=[];i&&a.push(`src="${dt(i)}"`),s||(o.type&&a.push(`type="${dt(o.type)}"`),o.async&&a.push("async"),o.defer&&a.push("defer"),o.integrity&&a.push(`integrity="${dt(o.integrity)}"`),o.crossorigin&&a.push(`crossorigin="${dt(o.crossorigin)}"`),o.referrerpolicy&&a.push(`referrerpolicy="${dt(o.referrerpolicy)}"`),o.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${dt(i||Is(o.body||""))}"`;if(!s&&o.body){let l=String(o.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
|
|
90
|
-
`)},kE={define:{metadata:(t,e,r)=>{let n=e.context?.document||typeof document<"u"&&document;if(!n)return;let o=Y(()=>{let s=w_(t,e);Ms(s,n);let i=e.state?.root;v(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(o)}}},S_={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;if(!e)return;let r=Y(()=>{let n=t.metadata;if(!n)return;let o=w_(n,t);Ms(o,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 n=w_(e,t);Ms(n,r)}},dL=kE;ra();var vE=(t,e,r,n)=>{t&&ea(t,e,r,n)},CE=(t,e,r)=>{if(!t)return;let n=e.context?.document||typeof document<"u"&&document;if(!n)return;let o=$s(t,e,r);Ms(o,n)},EE=async(t,e)=>{if(!t)return;let r={tag:"fragment",...t},n=async()=>{await e.set(r,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(n):await n(),r},Fs={routes:t=>t,metadata:CE,fetch:vE,$router:EE},AE=(t={})=>{let e={routes:r=>r};return t.metadata!==!1&&(e.metadata=CE),t.fetch!==!1&&(e.fetch=vE),t.router!==!1&&(e.$router=EE),e};var v_={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},od={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},sd={...v_,router:od},pL={state:{},pages:{},components:{},router:od,define:Fs},an=pL;L();L();var TE=(t,e)=>B(t.extends)?t.extends:[];L();var C_={};M(C_,{default:()=>yL,getActiveLang:()=>cn,getLanguages:()=>Mc,getLocalStateLang:()=>Vc,initPolyglot:()=>ad,loadTranslations:()=>Nc,polyglotPlugin:()=>js,setLang:()=>jc,translate:()=>Fc,upsertTranslation:()=>Bc});L();var RE="smbls_lang",hL="smbls_t_",gL="smbls_tv_",Ns={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)}}},$c={};function cn(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||t?.state?.lang||e?.defaultLang||"en"}function Mc(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var id=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let r=e.split("."),n=t;for(let o=0;o<r.length;o++){if(n==null)return;n=n[r[o]]}return n},OE=(t,e,r)=>{let n=e.lastIndexOf(".");if(n===-1)return t[e+"_"+r];let o=id(t,e.substring(0,n));if(o!=null)return o[e.substring(n+1)+"_"+r]};function Fc(t,e){if(!t)return"";let r=this?.context,n=r?.polyglot,o=e||this.call("getActiveLang"),s=this?.state;if(s){let l=OE(s,t,o);if(l!==void 0)return l}if(n?.translations){let l=n.translations[o];if(l){let f=id(l,t);if(f!==void 0)return f}}let a=(s?.root||r?.state?.root)?.translations;if(a){let l=a[o];if(l){let f=id(l,t);if(f!==void 0)return f}}let c=n?.defaultLang||"en";if(s){let l=OE(s,t,c);if(l!==void 0)return l}if(n?.translations){let l=n.translations[c];if(l){let f=id(l,t);if(f!==void 0)return f}}return t}async function Nc(t){let e=this?.context,r=e?.polyglot,n=this?.state?.root||e?.state?.root;if(!r||!n)return;let o=r.storagePrefix||hL,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):gL);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!n.translations?.[t]){let c=Ns.get(o+t);if(c)try{let l=JSON.parse(c),f={translations:{...n.translations||{}}};f.translations[t]=l,n.update&&n.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(r.storagePrefix||"smbls")+":"+t;if($c[i])return $c[i];let a=this;return $c[i]=(async()=>{try{let c=r.fetch,l=parseInt(Ns.get(s+t),10)||0,f,u,d;if(R(c)){let p=await c(t,l,a);if(!p||p.changed===!1)return;f=p.translations||p.data||p,u=p.version||0,d=!0}else if(v(c)){let p=a.getDB||(()=>e.fetch),h=R(p)?await p.call(a):e.fetch;if(!h)return;let m=c.rpc||c.from||"get_translations_if_changed",y={p_lang:t,p_cached_version:l,...c.params||{}},x=await h.rpc({from:m,params:y});if(x.error)throw r._fetchFailed||(r._fetchFailed={}),r._fetchFailed[t]=!0,x.error;let b=x.data;if(!b||!b.changed)return;f=b.translations||{},u=b.version||0,d=!0}else return;if(!d||!f)return;Ns.set(o+t,JSON.stringify(f)),u&&Ns.set(s+t,String(u));let g={translations:{...n.translations||{}}};g.translations[t]=f,n.update&&n.update(g)}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 $c[i]}})(),$c[i]}var mL=(t,e,r)=>{let n=t.__ref;if(!n||n.contentManaged||r==null||typeof r=="object")return;let o=n.__textNode;if(!o||o.parentNode!==e)return;let s=String(r);o.nodeValue!==s&&(o.nodeValue=s)};async function jc(t,e){let r=this?.context,n=r?.polyglot,o=this?.state?.root||r?.state?.root,s=r?.document||globalThis.document;if(!o)return;if(e?.persist!==!1){let l=n?.storageLangKey||RE;Ns.set(l,t)}if(s?.documentElement&&(s.documentElement.lang=t),this.call("getActiveLang")===t)return;n?.fetch&&await this.call("loadTranslations",t),r?.state&&(r.state.lang=t);let i=n?.translations?.[t],a={lang:t},c=l=>Ki(r,l,o);if(i&&typeof i=="object")for(let l in i){if(!c(l))continue;let f=i[l];(Array.isArray(f)||typeof f=="string"||typeof f=="number")&&(a[l]=f)}o.update&&o.update(a);for(let l in a)l!=="lang"&&Je(r,l,a[l]);if(i&&typeof i=="object")for(let l in i){if(!c(l))continue;let f=i[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];Je(r,l,o[l])}}if(s&&i){let l=s.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{mL(u,f,u.call("replaceLiteralsWithObjectFields",d,u.state))}catch{}}}}async function Bc(t,e,r){let n=this?.context,o=n?.polyglot,s=this?.state?.root||n?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=r),o?.translations?.[e]&&(o.translations[e][t]=r),o?.fetch&&v(o.fetch)){let i=this.getDB||(()=>n.fetch),a=R(i)?await i.call(this):n.fetch;if(!a)return;let c=o.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 ad(){let t=this?.context,e=t?.polyglot;if(!e)return;let r=this?.state?.root||t?.state?.root;if(!r)return;let n=e.storageLangKey||RE,s=Ns.get(n)||cn.call(this),i=t?.document||globalThis.document;i?.documentElement&&(i.documentElement.lang=s),r.update&&r.lang!==s&&r.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function Vc(t){try{let e=cn.call(this),r=this?.state;if(!r)return"";let n=t.lastIndexOf(".");if(n===-1)return r[t+e]??"";let o=t.substring(0,n).split("."),s=r;for(let i=0;i<o.length;i++){if(s==null)return"";s=s[o[i]]}return s==null?"":s[t.substring(n+1)+e]??""}catch{return""}}var js={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,ad.call(t))}},yL=js;ra();var A_={};M(A_,{SYSTEM_METRICS:()=>Uc,capsizeHandler:()=>E_,capsizePlugin:()=>ld,computeCapsize:()=>PE,default:()=>bL,resolveFontSizePx:()=>DE,resolveMetrics:()=>LE});var Uc={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}},cd=t=>parseFloat(t.toFixed(4)),PE=(t,e,r)=>{let{ascent:n,descent:o,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(o),l=n+c+s,f=r!==void 0?r:l/i*t,u=f/t,d=l/i,g=(n-a+s/2)/i-(u-d)/2,p=(c+s/2)/i-(u-d)/2;return{fontSize:`${cd(t/16)}rem`,lineHeight:`${cd(f)}px`,capHeightTrim:`${cd(-g)}em`,baselineTrim:`${cd(-p)}em`}},DE=(t,e)=>{if(typeof t=="number")return t;let r=e?.designSystem;if(!r)return null;let{typography:n}=r;if(n?.sequence){let s=String(t).toUpperCase(),i=n.sequence[s];if(i)return i.decimal||i.val}let o=parseFloat(t);return isNaN(o)?null:typeof t=="string"&&t.endsWith("rem")?o*(r.typography?.browserDefault||16):o},LE=(t,e)=>{let n=e?.designSystem?.font_family||{};if(t){let s=n[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(Uc[i])return Uc[i]}let o=n.default||Object.keys(n)[0];if(o){let s=n[o];if(s?.metrics)return s.metrics;if(s?.value&&Array.isArray(s.value))for(let i of s.value){let a=i.toLowerCase().replace(/['"]/g,"").trim();if(Uc[a])return Uc[a]}}return null},E_=(t,e,r,n)=>{if(!t)return;let o=DE(e.fontSize,n);if(!o)return;let s=LE(e.fontFamily,n);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=PE(o,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},ld={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},bL=ld;var I_={};M(I_,{PRESERVE_VALUE_KEYS:()=>Bt,SKIP_INLINE_KEYS:()=>ln,abbrToProp:()=>jt,decode:()=>NE,encode:()=>$E,expand:()=>io,isComponentKey:()=>Ue,isSelectorKey:()=>ze,parse:()=>ao,parseFurther:()=>lo,propToAbbr:()=>Te,shorten:()=>zc,shorthandPlugin:()=>Hc,stringify:()=>so,stringifyFurther:()=>co});var Te={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"},jt=Object.create(null);for(let t in Te)jt[Te[t]]=t;var T_=Object.create(null);for(let t in Te){let e=Te[t];if(T_[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${T_[e]}"`);T_[e]=t}var Bt=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),ln=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function Ue(t){return/^[A-Z]/.test(t)}function ze(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function $E(t){if(!t||typeof t!="object")return"";let e=[];for(let r in t){let n=t[r];if(typeof n=="function"||n!==null&&typeof n=="object"&&!Array.isArray(n)||n===void 0)continue;let o=Te[r]||r;if(n===!0)e.push(o);else if(n===!1)e.push("!"+o);else if(Array.isArray(n)){let s=n.map(i=>fd(i));e.push(o+":"+s.join(","))}else e.push(o+":"+fd(n))}return e.join(" ")}function fd(t){return String(t).replace(/ /g,"_")}function zc(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?zc(r):r});let e={};for(let r in t){let n=t[r];if(Ue(r)){e[r]=O_(n);continue}if(ze(r)){e[r]=O_(n);continue}let o=Te[r]||r;if(Bt.has(r)||Bt.has(o)){e[o]=n;continue}e[o]=O_(n)}return e}function O_(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?zc(e):e}):typeof t=="object"?zc(t):t}function so(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?so(n):n});let e={},r=[];for(let n in t){let o=t[n];if(Ue(n)){e[n]=IE(o);continue}if(ze(n)){e[n]=IE(o);continue}let s=Te[n]||n;if(Bt.has(n)||Bt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(ln.has(n)||ln.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?so(a):a});continue}if(o.length<=1){e[s]=o;continue}r.push(s+":"+o.map(fd).join(","));continue}if(typeof o=="object"){e[s]=so(o);continue}o===!0?r.push(s):o===!1?r.push("!"+s):typeof o=="number"||typeof o=="string"&&(o.includes(",")||o.includes("_"))?e[s]=o:r.push(s+":"+fd(o))}return r.length&&(e.in=r.join(" ")),e}function IE(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?so(e):e}):typeof t=="object"?so(t):t}function NE(t){if(!t||typeof t!="string")return{};let e={},r=jE(t);for(let n of r){if(n.startsWith("!")){let c=n.slice(1),l=jt[c]||c;e[l]=!1;continue}let o=n.indexOf(":");if(o===-1){let c=jt[n]||n;e[c]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=jt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(ME);continue}e[a]=ME(i)}return e}function jE(t){return t.trim().split(/\s+/).filter(Boolean)}function ME(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function FE(t){return t.replace(/_/g," ")}function _L(t){if(!t||typeof t!="string")return{};let e={},r=jE(t);for(let n of r){if(n.startsWith("!")){let c=n.slice(1),l=jt[c]||c;e[l]=!1;continue}let o=n.indexOf(":");if(o===-1){let c=jt[n]||n;e[c]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=jt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(FE);continue}e[a]=FE(i)}return e}function io(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?io(r):r});let e={};for(let r in t){let n=t[r];if(Ue(r)){e[r]=R_(n);continue}let o=jt[r]||r;if(ze(r)&&o===r){e[r]=R_(n);continue}if(Bt.has(o)||Bt.has(r)){e[o]=n;continue}e[o]=R_(n)}return e}function R_(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 ao(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?ao(r):r});let e={};if(typeof t.in=="string"){let r=_L(t.in);for(let n in r)e[n]=r[n]}for(let r in t){if(r==="in")continue;let n=t[r];if(Ue(r)){e[r]=P_(n);continue}let o=jt[r]||r;if(ze(r)&&o===r){e[r]=P_(n);continue}if(Bt.has(o)||Bt.has(r)){e[o]=n;continue}e[o]=P_(n)}return e}function P_(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 BE(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function xL(t){let e="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){let n=t[r+1];if(n===","||n==="_"||n==="\\"){e+=n,r+=2;continue}}t[r]==="_"?e+=" ":e+=t[r],r++}return e}function wL(t){let e=[],r="",n=0;for(;n<t.length;){if(t[n]==="\\"&&n+1<t.length){r+=t[n]+t[n+1],n+=2;continue}if(t[n]===","){e.push(r),r="",n++;continue}r+=t[n],n++}return e.push(r),e}function VE(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 co(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?co(n):n});let e={},r=[];for(let n in t){let o=t[n];if(Ue(n)){let i=UE(o);e[n]=VE(i)?i.in:i;continue}if(ze(n)){let i=UE(o);e[n]=VE(i)?i.in:i;continue}let s=Te[n]||n;if(Bt.has(n)||Bt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(ln.has(n)||ln.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?co(a):a});continue}if(o.length<=1){e[s]=o;continue}r.push(s+":"+o.map(BE).join(","));continue}if(typeof o=="object"){e[s]=co(o);continue}if(o===!0){r.push(s);continue}if(o===!1){r.push("!"+s);continue}if(typeof o=="number"){r.push(s+":#"+o);continue}r.push(s+":"+BE(o))}return r.length&&(e.in=r.join(" ")),e}function UE(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?co(e):e}):typeof t=="object"?co(t):t}function zE(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):xL(t)}function D_(t){if(!t||typeof t!="string")return{};let e={},r=t.trim().split(/\s+/).filter(Boolean);for(let n of r){if(n.startsWith("!")){let l=n.slice(1),f=jt[l]||l;e[f]=!1;continue}let o=n.indexOf(":");if(o===-1){let l=jt[n]||n;e[l]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=jt[s]||s,c=wL(i);if(c.length>1){e[a]=c.map(zE);continue}e[a]=zE(i)}return e}function lo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?lo(r):r});let e={};if(typeof t.in=="string"){let r=D_(t.in);for(let n in r)e[n]=r[n]}for(let r in t){if(r==="in")continue;let n=t[r];if(Ue(r)){typeof n=="string"?e[r]=D_(n):e[r]=L_(n);continue}let o=jt[r]||r;if(ze(r)&&o===r){typeof n=="string"?e[r]=D_(n):e[r]=L_(n);continue}if(Bt.has(o)||Bt.has(r)){e[o]=n;continue}e[o]=L_(n)}return e}function L_(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}var SL={shorten:io,stringify:ao,stringifyFurther:lo};function kL(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(n=>e(n));let r={};for(let n in t){let o=t[n];r[n]=o&&typeof o=="object"?e(o):o}return r}var vL=["components","pages","snippets"],Hc={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let n=SL[e===!0?"shorten":e];if(n){for(let o of vL)t[o]&&(t[o]=kL(t[o],n));t.app&&typeof t.app=="object"&&(t.app=n(t.app))}}};var q_={};M(q_,{LEVELS:()=>Wc,analyzePlugin:()=>Vs,attachBrowserListeners:()=>_d,attachNetworkListeners:()=>Kc,classifyEvent:()=>V_,createAnalyzeState:()=>xd,createBeaconSink:()=>H_,createConsoleSink:()=>U_,createDedupe:()=>N_,createEnrich:()=>M_,createMemorySink:()=>z_,createPipeline:()=>hd,createRedact:()=>pd,createRemoteSink:()=>md,createSample:()=>j_,createSummarize:()=>F_,default:()=>Vs,emitFetchEvent:()=>ZE,makeEvent:()=>Z,meetsLevel:()=>ud,normalizeLevel:()=>qc,resolveSinks:()=>bd,summarizeElement:()=>fo});var CL=0,EL=()=>`${Date.now().toString(36)}-${(CL++).toString(36)}`,Z=(t,e,r={})=>({id:EL(),ts:Date.now(),type:t,level:e,...r}),AL=t=>{let e=[],r=t,n=0;for(;r&&n<32;)r.key!=null&&e.unshift(String(r.key)),r=r.parent,n++;return e.join(" > ")},fo=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:AL(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var Bs=t=>t?.context?.analyze,TL={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"}},OL=(t,{category:e,type:r,level:n})=>o=>{let s=Bs(o);!s||!s.shouldCapture(e)||s.emit(Z(r,n,{hook:t,element:fo(o)}))},HE=t=>(e,r)=>{let n=Bs(e);!n||!n.shouldCapture("state")||n.emit(Z("state","debug",{hook:t,element:fo(e),changedKeys:r?.changedKeys||null}))},Vs={name:"analyze",error(t,e){let r=Bs(t);if(!r||r.config.enabled===!1||!r.shouldCapture("errors"))return;let n=e?.error||e?.err||(e instanceof Error?e:null);r.emit(Z("error","error",{hook:e?.hook||"error",element:fo(t),error:n,message:n?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=Bs(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=Bs(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=Bs(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:HE("beforeStateUpdate"),stateUpdate:HE("stateUpdate")};for(let[t,e]of Object.entries(TL))Vs[t]=OL(t,e);L();var Wc={error:0,warn:1,info:2,debug:3,trace:4};var ud=(t,e)=>{let r=Wc[t],n=Wc[e];return r==null||n==null?!0:r<=n},qc=t=>Wc[t]!=null?t:"warn";L();var dd=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var RL=(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},PL=(t,e)=>{if(e!=="redact"){if(e==="hash"){let r=0,n=String(t);for(let o=0;o<n.length;o++)r=(r<<5)-r+n.charCodeAt(o)|0;return`#${(r>>>0).toString(36)}`}return"***"}},$_=(t,e,r,n)=>{if(n>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>$_(s,e,r,n+1));let o={};for(let s of Object.keys(t))if(RL(s,e)||dd.test(s)){let a=PL(t[s],r);a!==void 0&&(o[s]=a)}else o[s]=$_(t[s],e,r,n+1);return o},pd=(t=[],e="mask")=>{let r=Array.isArray(t)?t:[t];return n=>{if(!n)return n;let{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:g,...p}=n,h=$_(p,r,e,0);return{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:g,...h}}};var M_=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,r=typeof navigator<"u"?navigator.userAgent:null,n=t.config.buildHash||null,o=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=C,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:o,build:n,route:i},meta:{ua:r,viewport:c}}}},F_=()=>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},N_=(t=1e3,e=500)=>{let r=new Map;return n=>{if(!n)return n;let o=`${n.type}:${n.level}:${n.message||""}:${n.error?.message||""}`,s=r.get(o),i=n.ts||Date.now();if(s&&i-s<t)return null;if(r.set(o,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 n}},j_=t=>e=>{if(!e)return e;let r=t[e.type];return r==null||r>=1?e:Math.random()>r?null:e},WE={redact:t=>pd(t.config.redact||[],t.config.maskStrategy),enrich:t=>M_(t),summarize:()=>F_(),dedupe:t=>N_(t.config.cache?.dedupeWindowMs||1e3),sample:t=>j_(t.config.sample||{})},DL=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let r=WE[t];return r?r(e):null}return null},hd=t=>{let e=t.config,r=Array.isArray(e.transformers)?e.transformers.slice():[],n=r.findIndex(s=>s==="redact");n>=0&&r.splice(n,1);let o=[];e.redact!==!1&&o.push(WE.redact(t));for(let s of r){let i=DL(s,t);i&&o.push(i)}return s=>{let i=s;for(let a of o){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=o.slice(o.indexOf(a)+1),f=[];for(let u of c){let d=u,g=!1;for(let p of l)if(d=p(d),d==null){g=!0;break}!g&&d!=null&&f.push(d)}return f}i=c}return i}};L();L();var gd=typeof C<"u"&&typeof C.document<"u",LL=5e3,IL=50,$L=3,ML=1500,FL=1e3,V_=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",NL=t=>{try{return JSON.stringify(t)}catch{return null}},jL=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},BL=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}},VL=()=>{if(!gd)return null;try{let t=C.document?.documentElement?.getAttribute("data-theme")||null,e=typeof C.matchMedia=="function"?C.matchMedia("(prefers-color-scheme: dark)").matches:null;return{active:t||(e?"dark":e===!1?"light":null),forced:t||null,prefers:e==null?null:e?"dark":"light"}}catch{return null}},UL=()=>{if(!gd)return null;let t=C.location,e=typeof navigator<"u"?navigator:null,r=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:C.document?.referrer||null,title:C.document?.title||null,ua:e?.userAgent||null,browser:BL(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:jL(),viewport:C.innerWidth?{w:C.innerWidth,h:C.innerHeight,dpr:C.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:VL()}},md=(t={})=>{let e=t.url,r=typeof t.transport=="function"?t.transport:null,n=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!r)return()=>{};let o=t.apiKey||null,s=t.appKey||t.appId||null,i=t.tenantKey||t.tenant||null,a=t.release||null,c=t.env||null,l=t.sdk||null,f=typeof t.getAuth=="function"?t.getAuth:null,u=typeof t.getContext=="function"?t.getContext:null,d=typeof t.classify=="function"?t.classify:V_,g=typeof t.beforeSend=="function"?t.beforeSend:null,p=t.debug===!0,h=typeof t.getDebug=="function"?t.getDebug:null,m=t.batchMs!=null?t.batchMs:LL,y=t.maxBatch||IL,x=t.maxRetries!=null?t.maxRetries:$L,b=t.backoffMs||ML,_=t.queueLimit||FL,w=t.sampleRate!=null?t.sampleRate:1,S=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,E=t.sessionId||S(),T=[],I=[],O=null,F=null,z=()=>{O||!T.length||(O=setTimeout(N,m))},Q=G=>{if(F)return;let j=b*Math.pow(2,Math.max(0,G-1));F=setTimeout(()=>{if(F=null,!I.length)return;let et=I.shift();yt(et.envelope,et.attempt)},j)},Mt=(G,j=!1)=>{let et=u?B_(u):null,D={id:E,sentAt:Date.now()};j&&(D.endedAt=Date.now());let X={v:1,session:D,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:UL(),user:et?.user||null,traits:et?.traits||null,tags:et?.tags||null,events:G};if((h?B_(h)===!0:p)&&(X.app.debug=!0),g)try{return g(X)||null}catch{return X}return X},yt=async(G,j=1)=>{if(G)try{let et=!0;if(r){let D=await r(G);et=D!==!1&&D?.ok!==!1}else et=await zL(e,G,{apiKey:o,getAuth:f});!et&&j<x&&(I.push({envelope:G,attempt:j+1}),Q(j+1))}catch{j<x&&(I.push({envelope:G,attempt:j+1}),Q(j+1))}},N=(G=!1,j=!1)=>{if(O&&(clearTimeout(O),O=null),!T.length&&!j)return;let et=T;T=[];let D=Mt(et,j);if(D){if(G&&gd){if(typeof n=="function"&&B_(()=>n(D)))return;if(navigator.sendBeacon&&e){let X=NL(D);if(X)try{navigator.sendBeacon(e,new C.Blob([X],{type:"application/json"}));return}catch{}}}yt(D)}},q=!1,bt=()=>{q||(q=!0,N(!0,!0))};gd&&(C.addEventListener("pagehide",bt,{passive:!0}),C.addEventListener("beforeunload",bt,{passive:!0}),C.addEventListener("visibilitychange",()=>{C.document.visibilityState==="hidden"&&N(!0)},{passive:!0}));let kt=G=>{if(!G||w<1&&Math.random()>w)return;q&&(q=!1);let j={...G,log_type:d(G)};T.push(j),T.length>_&&(T=T.slice(-_)),T.length>=y?N():z()},Rt=G=>(N(!1,!0),E=G||S(),q=!1,kt.sessionId=E,E);return kt.flush=()=>N(!1),kt.endSession=bt,kt.startNewSession=Rt,kt.sessionId=E,kt},B_=t=>{try{return t()}catch{return null}},zL=async(t,e,{apiKey:r,getAuth:n})=>{let o={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(r&&(o["X-Analyze-Key"]=r),n)try{let s=await n();s&&(o.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:o,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var HL={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},WL="\x1B[0m",yd=typeof C<"u"&&typeof C.document<"u",U_=(t={})=>{let e=t.minLevel||null,r=console.error.bind(console),n=console.warn.bind(console),o=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?r:s.level==="warn"?n:o,a=`[analyze:${s.type}]`;if(yd)i(a,s);else{let c=HL[s.level]||"";i(`${c}${a}${WL}`,s)}}},z_=(t,e={})=>{let r=e.max||t.config.cache?.max||500,n=new Array(r),o=0,s=0,i=a=>{n[o]=a,o=(o+1)%r,s<r&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(o-s+r)%r;for(let l=0;l<s;l++)a[l]=n[(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:()=>{o=0,s=0}},i},H_=(t={})=>{let e=t.url,r=t.batchMs!=null?t.batchMs:5e3,n=t.maxBatch||50;if(!e)return()=>{};let o=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!o.length)return;let c=JSON.stringify({events:o});o=[];let l=yd?new C.Blob([c],{type:"application/json"}):c;if(yd&&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(()=>{})};yd&&(C.addEventListener("pagehide",i,{passive:!0}),C.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(o.push(c),o.length>=n?i():s||(s=setTimeout(i,r)))};return a.flush=i,a},qE={console:U_,memory:z_,beacon:H_,remote:md},KE=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},bd=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],r=[];for(let n of e)if(typeof n=="function")r.push(n);else if(typeof n=="string"){let o=qE[n];if(!o)continue;r.push(n==="memory"?o(t,{}):o(n==="remote"?KE(t,{}):{}))}else if(n&&typeof n=="object"&&n.type){let o=qE[n.type];if(!o)continue;r.push(n.type==="memory"?o(t,n):o(n.type==="remote"?KE(t,n):n))}return r};L();var qL=typeof C<"u"&&typeof C.document<"u",KL=new Set(["password","hidden"]),GE=(t,e)=>{let r=0,n=null,o=null;return(...s)=>{let i=Date.now();i-r>=e?(r=i,t(...s)):(o=s,n||(n=setTimeout(()=>{r=Date.now(),n=null,o&&(t(...o),o=null)},e-(i-r))))}},W_="__analyzeKeyPath",Us=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[W_])return e[W_];let r=[],n=e,o=0,s=null;for(;n&&o<64;){if(n.getAttribute){let a=n.getAttribute("data-key");a&&(s==null&&(s=a),r.unshift(a))}n=n.parentNode,o++}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[W_]=i}catch{}return i},GL=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let r=0,n=String(t||"");for(let o=0;o<n.length;o++)r=(r<<5)-r+n.charCodeAt(o)|0;return`#${(r>>>0).toString(36)}`}return"***"}},YL=t=>!!(!t||t.tagName==="INPUT"&&KL.has(t.type)||dd.test(t.name||"")||dd.test(t.id||"")||t.dataset?.analyze==="skip"),_d=t=>{if(!qL)return;let e=t.config.capture,r=t.config.throttle,n=t.__teardown,o=(s,i,a,c)=>{s.addEventListener(i,a,c),n.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(o(C,"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}))}),o(C,"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){o(C,"click",i=>{t.emit(Z("pointer","info",{hook:"click",target:Us(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:YE(i)}))},{passive:!0,capture:!0}),o(C,"dblclick",i=>{t.emit(Z("pointer","info",{hook:"dblclick",target:Us(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),o(C,"contextmenu",i=>{t.emit(Z("pointer","info",{hook:"contextmenu",target:Us(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=GE(i=>{t.emit(Z("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},r.pointermove);o(C,"pointermove",s,{passive:!0})}if(e.keyboard&&o(C,"keydown",s=>{t.emit(Z("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:YE(s),target:Us(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=YL(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=GL(a.value,t.config.maskStrategy)),t.emit(Z("forms","info",{hook:i.type,target:Us(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};o(C,"input",s,{passive:!0,capture:!0}),o(C,"change",s,{passive:!0,capture:!0}),o(C,"submit",i=>{t.emit(Z("forms","info",{hook:"submit",target:Us(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=GE(()=>{t.emit(Z("scroll","trace",{hook:"scroll",x:C.scrollX,y:C.scrollY}))},r.scroll);o(C,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=Di(()=>{t.emit(Z("viewport","info",{hook:"resize",w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}))},r.resize);o(C,"resize",s,{passive:!0}),o(C,"orientationchange",()=>{t.emit(Z("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),o(C.document,"visibilitychange",()=>{t.emit(Z("viewport","info",{hook:"visibilitychange",hidden:C.document.hidden}))},{passive:!0}),t.emit(Z("viewport","info",{hook:"initial",w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(Z("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(XE)}))}catch{}return i.apply(console,a)},n.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{}n.push(()=>s.disconnect())}catch{}},YE=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),XL=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=XE(t.cause)),e},XE=t=>{if(t==null)return t;if(t instanceof Error)return XL(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};L();var ZL=typeof C<"u"&&typeof C.document<"u",ZE=(t,e)=>{let r=t?.analyze;if(!r||!r.shouldCapture("network"))return;let n=e.phase==="error"?"error":"info";r.emit(Z("network",n,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},Kc=t=>{if(ZL&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof C.fetch=="function"){let e=C.fetch.bind(C),r=function(n,o){if(o?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(n,o);let s=typeof n=="string"?n:n&&n.url||"",i=(o?.method||typeof n=="object"&&n?.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(n,o).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})};C.fetch=r,t.__teardown.push(()=>{C.fetch=e})}if(typeof C.XMLHttpRequest=="function"){let e=C.XMLHttpRequest,r=e.prototype.open,n=e.prototype.send;e.prototype.open=function(o,s){return this.__analyze={method:String(o).toUpperCase(),url:String(s)},r.apply(this,arguments)},e.prototype.send=function(o){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return n.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),n.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=r,e.prototype.send=n})}}};var JL={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},QL={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},tI={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},eI={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},rI=t=>{let e={...JL,...t};return e.replay&&Object.assign(e,QL),e.telemetry&&Object.assign(e,tI),e.remote&&Object.assign(e,eI),Object.assign(e,t),e},nI=64,oI=()=>{if(typeof C>"u"||!C.location)return null;try{let e=new URLSearchParams(C.location.search).get("analyze");return e||null}catch{return null}},xd=(t={})=>{let e=t===!0?{}:{...t};e.capture=rI(e.capture||{});let r=oI();(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=qc(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 n={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},o=()=>{n.__pipeline||(n.__pipeline=hd(n),n.__sinks=bd(n))};return n.shouldCapture=s=>n.config.enabled===!1?!1:!!n.config.capture[s],n.emit=s=>{if(s&&n.config.enabled!==!1&&!n.__paused&&ud(s.level,n.config.level)){if(!n.__ready){if(s.level!=="error"&&!n.config.captureDuringHydration)return;n.__preBuffer.length<nI&&n.__preBuffer.push(s);return}o(),JE(n,s)}},n.activate=s=>{if(n.context==null&&(n.context=s||null),n.__ready)return;n.__ready=!0;let i=n.__preBuffer;if(n.__preBuffer=[],i.length){o();for(let a of i)JE(n,a)}try{_d(n)}catch(a){console.error("[analyze] browser attach error:",a)}try{Kc(n)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of n.__onActivate||[])try{a(n)}catch(c){console.error("[analyze] onActivate error:",c)}},n.pause=()=>{n.__paused=!0},n.resume=()=>{n.__paused=!1},n.setLevel=s=>{n.config.level=qc(s)},n.setCapture=(s,i)=>{if(n.config.capture[s]=!!i,s==="network"&&i&&n.__ready)try{Kc(n)}catch(a){console.error("[analyze] network attach error:",a)}},n.query=s=>n.__memory?n.__memory.query(s):[],n.snapshot=()=>n.__memory?n.__memory.snapshot():[],n.emitNetwork=s=>{if(!n.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";n.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})},n.flush=()=>{if(n.__sinks)for(let s of n.__sinks)typeof s.flush=="function"&&s.flush()},n.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(n.config.sinks)?n.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(n.__sinks)for(let c of n.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},n.replay=()=>({initialSnapshot:n.__initialSnapshot,events:n.snapshot()}),n.destroy=()=>{for(let s of n.__teardown)try{s()}catch{}n.__teardown=[],n.__ready=!1,n.__paused=!0},n.__onActivate=[],n.onActivate=s=>{n.__onActivate.push(s)},n},JE=(t,e)=>{let r=t.__pipeline(e);if(r==null)return;let n=Array.isArray(r)?r:[r];for(let o of n){if(typeof t.config.onEvent=="function")try{t.config.onEvent(o)}catch{}for(let s of t.__sinks)try{s(o)}catch(i){console.error("[analyze] sink error:",i)}}};var Y_={};M(Y_,{Inspect:()=>wd,inspectPlugin:()=>G_});L();function QE(t){return k(t)?t:P(t)?t.find(e=>k(e)):""}function K_(t){if(!t)return;let e=t.__ref.__componentKey,r=t.extends&&QE(t.extends),n=t.parent&&t.parent.childExtends&&QE(t.parent.childExtends);return(e||r||n||"").split("_")[0].split(".")[0].split("+")[0]}function Sd(t){if(!t||!t.__ref)return;let{components:e,pages:r,editor:n}=t.context,o=K_(t);return n&&n.onInitInspect&&!n.onInitInspect(o,t,t.state)?Sd(t.parent):o&&(e[o]||r[o])?t:Sd(t.parent)}var sI=(t,e,r)=>{let n=r.window||window;n.onkeydown=o=>{o.altKey&&o.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},n.onkeyup=o=>{t.state.preventSelect&&(!o.altKey||!o.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},wd={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:sI,onMousemove:(t,e,r)=>{let n=t.target.ref,o=Sd(n),s=e.Inspector.state;if(!o||!r.debugging||!o.__ref)return s.update({area:!1});let i=K_(o),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=o.node.getBoundingClientRect(),g={x:l,y:f,width:u,height:d};if(!s.area)return a(g);s.area.x!==g.x&&a(g)}else s.area&&s.update({area:!1})};window.requestAnimationFrame(()=>{c(),window.requestAnimationFrame(c)})},onMousedown:(t,e,r)=>{if(!r.debugging)return;let n=t.target.ref,o=Sd(n);if(!o)return;let s=K_(o);if(!s)return;let i=n.context.editor;if(i&&i.onInspect)return i.onInspect(s,n,n.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return n.context.socket?.emit&&n.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(v(e)){let{Content:r,...n}=e;for(let o in n)Ps[o]||(n[o].__ref||(n[o].__ref={}),n[o].__ref.__componentKey||(n[o].__ref.__componentKey=o))}},onBeforeUpdate:(t,e,r)=>{let{area:n}=r,o=r.area&&r.parent.debugging,s;if(!o)s="display: none !important";else if(n){let{x:i,y:a,width:c,height:l}=n;s=`
|
|
87
|
+
)`};var nL={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"}}}},oL={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},sL={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"}}},Cv={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...nL,...oL,...sL,backdrop:{"@light":{background:"scrim",backdropFilter:"blur(8px)"},"@dark":{background:"scrim",backdropFilter:"blur(8px)"}},backdropSoft:{"@light":{background:"scrimSoft",backdropFilter:"blur(4px)"},"@dark":{background:"scrimSoft",backdropFilter:"blur(4px)"}},none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var Ev={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var Av={ratio:1.618,subSequence:!0};var Tv={SourceSans:[{url:""}]},Ov={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 Rv={symbols:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',logo:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',arrowDownCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-circle"><circle cx="12" cy="12" r="10"/><path d="M8 12l4 4 4-4M12 8v8"/></svg>',arrowDownLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-left"><path d="M17 7L7 17M17 17H7V7"/></svg>',arrowDownRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-right"><path d="M7 7l10 10M17 7v10H7"/></svg>',arrowDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down"><path d="M12 5v14M19 12l-7 7-7-7"/></svg>',arrowLeftCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left-circle"><circle cx="12" cy="12" r="10"/><path d="M12 8l-4 4 4 4M16 12H8"/></svg>',arrowLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>',arrowRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><path d="M5 12h14M12 5l7 7-7 7"/></svg>',arrowRightCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right-circle"><circle cx="12" cy="12" r="10"/><path d="M12 16l4-4-4-4M8 12h8"/></svg>',arrowUpCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-circle"><circle cx="12" cy="12" r="10"/><path d="M16 12l-4-4-4 4M12 16V8"/></svg>',arrowUpLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-left"><path d="M17 17L7 7M7 17V7h10"/></svg>',arrowUpRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-right"><path d="M7 17L17 7M7 7h10v10"/></svg>',arrowUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up"><path d="M12 19V5M5 12l7-7 7 7"/></svg>',checkCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><path d="M22 4L12 14.01l-3-3"/></svg>',check:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17l-5-5"/></svg>',chevronDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path d="M6 9l6 6 6-6"/></svg>',chevronLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><path d="M15 18l-6-6 6-6"/></svg>',chevronRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><path d="M9 18l6-6-6-6"/></svg>',chevronUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-up"><path d="M18 15l-6-6-6 6"/></svg>',copy:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>',eyeOff:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye-off"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24M1 1l22 22"/></svg>',eye:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',info:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-info"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>',lock:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg>',minus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minus"><path d="M5 12h14"/></svg>',sun:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>',moon:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg>',moreHorizontal:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-horizontal"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',moreVertical:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>',send:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-send"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg>',smile:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-smile"><circle cx="12" cy="12" r="10"/><path d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"/></svg>',search:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>',upload:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-upload"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"/></svg>',video:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video"><path d="M23 7l-7 5 7 5V7z"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>',x:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><path d="M18 6L6 18M6 6l12 12"/></svg>',star:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',plus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><path d="M12 5v14M5 12h14"/></svg>'};var Pv={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 Dv={base:150,ratio:1.333,unit:"ms",subSequence:!0,defaultBezier:"cubic-bezier(.29, .67, .51, .97)",springBezier:"cubic-bezier(.32, .72, 0, 1)"};var Lv={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Dc={version:"0.0.1",color:kv,gradient:vv,theme:Cv,typography:Ev,spacing:Av,font:Tv,fontFamily:Ov,timing:Dv,icons:Rv,media:Pv,sizes:Lv,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}},modalIn:{from:{transform:"scale(0.95)",opacity:0},to:{transform:"",opacity:1}},modalOut:{to:{transform:"scale(0.95)",opacity:0}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Is={};M(Is,{A:()=>JC,AssetPicture:()=>Zv,Audio:()=>tC,Avatar:()=>pE,B:()=>_C,Block:()=>Iv,Box:()=>td,Br:()=>kC,Button:()=>eE,ButtonSet:()=>sE,COMPONENTS:()=>ao,Caption:()=>fC,Checkbox:()=>LC,CheckboxHgroup:()=>IC,Circle:()=>Gv,CircleButton:()=>nE,Clickable:()=>Wv,Data:()=>SC,Dialog:()=>aE,DialogFooter:()=>lE,DialogHeader:()=>cE,Dropdown:()=>gE,DropdownList:()=>mE,DropdownParent:()=>yE,DropdownParentFocus:()=>bE,DropdownSiblingFocus:()=>_E,FileIcon:()=>qC,Flex:()=>Mv,Focusable:()=>qv,FocusableComponent:()=>Kv,Footnote:()=>bC,Form:()=>Uv,Grid:()=>Nv,Gutter:()=>Bv,H1:()=>nC,H2:()=>oC,H3:()=>sC,H4:()=>iC,H5:()=>aC,H6:()=>cC,Headline:()=>mC,Hgroup:()=>TC,HgroupButton:()=>RC,HgroupRows:()=>OC,Hoverable:()=>Hv,Hr:()=>xC,I:()=>wC,Icon:()=>HC,IconButton:()=>iE,IconText:()=>WC,Iframe:()=>zv,Img:()=>Vv,Inline:()=>$v,InlineFlex:()=>Fv,InlineGrid:()=>jv,Input:()=>PC,Italic:()=>hC,KangorooButton:()=>oE,Li:()=>vC,Link:()=>i_,Notification:()=>wE,NumberInput:()=>DC,Ol:()=>EC,P:()=>lC,Picture:()=>Xv,Radio:()=>$C,RadioHgroup:()=>MC,Range:()=>hE,RouteLink:()=>QC,RouterLink:()=>a_,SHAPES:()=>Ju,Select:()=>tE,Shape:()=>Fb,Span:()=>rC,SquareButton:()=>rE,Strong:()=>uC,Subhead:()=>yC,Svg:()=>Jv,Text:()=>eC,Textarea:()=>jC,TextareaWithButton:()=>BC,Theme:()=>Yv,Title:()=>gC,Toggle:()=>FC,ToggleHgroup:()=>NC,Tooltip:()=>fE,TooltipHidden:()=>uE,TooltipParent:()=>dE,U:()=>dC,Ul:()=>CC,Underline:()=>pC,Video:()=>Qv,depth:()=>Qu,focusableRingEnabled:()=>Xu,getSystemGlobalTheme:()=>Lc});var Db={};M(Db,{Block:()=>Iv,Flex:()=>Mv,Grid:()=>Nv,Gutter:()=>Bv,Inline:()=>$v,InlineFlex:()=>Fv,InlineGrid:()=>jv});var Iv={display:"block"},$v={display:"inline"},Mv={display:"flex"},Fv={display:"inline-flex"},Nv={display:"grid"},jv={display:"inline-grid"},Bv={boxSize:"C1"};var Lb={};M(Lb,{Img:()=>Vv});L();var Vv={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=Qt(t);return e&&e.src||t.src},srcset:t=>{let e=Qt(t);return(e?Oa(e):"")||t.srcset}}};var Ib={};M(Ib,{Form:()=>Uv});var Uv={tag:"form"};var $b={};M($b,{Iframe:()=>zv});var zv={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var Mb={};M(Mb,{Clickable:()=>Wv,Focusable:()=>qv,FocusableComponent:()=>Kv,Hoverable:()=>Hv,focusableRingEnabled:()=>Xu});var iL={appearance:"none",fontFamily:"inherit"},Hv={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}}},Wv={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function Xu(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}var qv={border:"none",outline:t=>Xu(t)?"solid 0 currentColor":"none",":focus-visible":{opacity:1,outline:t=>Xu(t)?"solid X currentColor":"none"},attr:{tabIndex:t=>t.tabIndex}},Kv={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",cursor:"pointer",":disabled":{cursor:"not-allowed"},style:iL};var Bb={};M(Bb,{Picture:()=>Xv});var jb={};M(jb,{Theme:()=>Yv,getSystemGlobalTheme:()=>Lc});var Nb={};M(Nb,{Circle:()=>Gv,SHAPES:()=>Ju,Shape:()=>Fb,default:()=>aL,depth:()=>Qu});L();var Oe=A(),Qu={4:{boxShadow:`rgba(0,0,0,.10) 0 2${Oe.unit.default} 4${Oe.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${Oe.unit.default} 6${Oe.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${Oe.unit.default} 10${Oe.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${Oe.unit.default} 16${Oe.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${Oe.unit.default} 26${Oe.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${Oe.unit.default} 42${Oe.unit.default}`}},Ls=t=>tt(t.shapeDirectionColor)||tt(t.borderColor)||tt(t.backgroundColor)||tt(t.background),Zu=t=>{let e=bc.transition(t.transition,t);return e&&e.transition},Ju={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:Ls(t),transition:Zu(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:Ls(t),transition:Zu(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:Ls(t),transition:Zu(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:Zu(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${Ls(t)} 25%, transparent 25%), linear-gradient(315deg, ${Ls(t)} 25%, transparent 25%)`},"&:after":{background:Ls(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)"}}}},Fb={deps:{exec:pt,getSpacingBasedOnRatio:Ce,getMediaColor:It},classlist:{shape:t=>t.deps.exec(Ju[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=Ju[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}}},Gv={round:"100%"},aL=Fb;L();var Lc=({context:t,state:e})=>{let r=e&&e.root,n=r&&r.globalTheme||t.designSystem&&t.designSystem.globalTheme;return n==="auto"?null:n},Yv={deps:{depth:Qu},classlist:{depth:t=>!Pt(t.depth)&&t.deps.depth[t.depth]}};var Xv={deps:{getSystemGlobalTheme:Lc},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:Lc},tag:"source",attr:{media:t=>{let{key:e,context:r,deps:n}=t,{media:o}=r.designSystem,s=n.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":o[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var Vb={};M(Vb,{AssetPicture:()=>Zv});L();var Zv={tag:"picture",children:t=>{let e=Qt(t);if(e)return Ra(e,t.alt)}};var Ub={};M(Ub,{Svg:()=>Jv});var Jv={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:n}=e,o=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 g=d[1],h=e.document||(typeof document<"u"?document:null);if(!(h&&typeof h.getElementById=="function"&&h.getElementById(g))){let m=n&&n.scratchSystem&&n.scratchSystem.appendSVGSprite;r&&!r.__svgCache&&(r.__svgCache={}),typeof m=="function"?m({[g]:i},{document:h}):n&&typeof n.init=="function"&&n.init({svg:{[g]:i}},{document:h,emotion:e.emotion})}return a(g)}}if(!s&&i)return i;let c=t.spriteId;if(c)return a(c);if(o&&o[i])return a(i);let l=Symbol.for(i),f=o[l];if(f&&o[f])return a(f);if(!i)return a("");if(typeof i=="string"&&!i.includes("<"))return typeof console<"u"&&console.warn&&console.warn(`[Svg] Unknown sprite symbol "${i}" \u2014 not registered in design-system sprite. Set the icon name to one that exists in designSystem.icons / context.svg, or register the SVG body via utils.init({ svg: { '${i}': '<svg>...</svg>' } }).`),a("");let u=0;for(let d=0;d<i.length;d++)u=(u<<5)-u+i.charCodeAt(d)|0;return f=o[l]=`svg-${(u>>>0).toString(36)}`,n.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var zb={};M(zb,{Video:()=>Qv});L();var Qv={tag:"video",controls:!0,attr:{src:t=>{let e=Qt(t);return e&&e.src||t.src}},children:t=>{let e=Qt(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 Hb={};M(Hb,{Audio:()=>tC});L();var tC={tag:"audio",controls:!0,attr:{src:t=>{let e=Qt(t);return e&&e.src||t.src}},children:t=>{let e=Qt(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 Wb={};M(Wb,{B:()=>_C,Caption:()=>fC,Data:()=>SC,Footnote:()=>bC,H1:()=>nC,H2:()=>oC,H3:()=>sC,H4:()=>iC,H5:()=>aC,H6:()=>cC,Headline:()=>mC,I:()=>wC,Italic:()=>hC,P:()=>lC,Span:()=>rC,Strong:()=>uC,Subhead:()=>yC,Text:()=>eC,Title:()=>gC,U:()=>dC,Underline:()=>pC});var eC={},rC={tag:"span"},nC={tag:"h1"},oC={tag:"h2"},sC={tag:"h3"},iC={tag:"h4"},aC={tag:"h5"},cC={tag:"h6"},lC={tag:"p"},fC={tag:"caption"},uC={tag:"strong",fontWeight:"700"},dC={tag:"u"},pC={tag:"u"},hC={tag:"i"},gC={},mC={tag:"h6",fontSize:"B",fontWeight:500},yC={tag:"span",fontSize:"Z1"},bC={tag:"span",fontSize:"Z"},_C={tag:"b"},wC={tag:"i"},SC={tag:"data"};var qb={};M(qb,{Box:()=>td,Br:()=>kC,Hr:()=>xC,Li:()=>vC,Ol:()=>EC,Ul:()=>CC});var cL=t=>{if(!t.context)return;let{props:e,__ref:r}=t,n=se(e,t,{unpack:!1});r.__class=n},td={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:cL},xC={tag:"hr",margin:"C1 0"},kC={tag:"br"},vC={tag:"li"},CC={tag:"ul",childExtends:{extends:"Li"}},EC={tag:"ol",childExtends:{extends:"Li"}};var Kb={};M(Kb,{Hgroup:()=>TC,HgroupButton:()=>RC,HgroupRows:()=>OC});var AC=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},TC={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:AC,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:AC,margin:"0",color:"paragraph"}},OC={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},RC={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var Gb={};M(Gb,{Input:()=>PC});var PC={extends:["Focusable"],tag:"input",border:"none",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 Yb={};M(Yb,{NumberInput:()=>DC});var DC={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 Xb={};M(Xb,{Checkbox:()=>LC,CheckboxHgroup:()=>IC});var LC={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"}}},IC={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var Zb={};M(Zb,{Radio:()=>$C,RadioHgroup:()=>MC});var $C={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}},MC={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var Jb={};M(Jb,{Toggle:()=>FC,ToggleHgroup:()=>NC});var FC={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}},NC={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var Qb={};M(Qb,{Textarea:()=>jC,TextareaWithButton:()=>BC});var jC={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"}},BC={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 t_={};M(t_,{FileIcon:()=>qC,Icon:()=>HC,IconText:()=>WC});var VC=new Set,UC=(t,e)=>{if(!VC.has(t)&&(VC.add(t),typeof console<"u"&&console.warn)){let r=e&&e.__ref&&e.__ref.path,n=r&&r.length?` at <${r.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${n} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},zC=new WeakMap,lL=t=>{let e=zC.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},zC.set(t,e)),e},fL=(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},uL=(t,e,r)=>{let n=r&&r.context&&r.context.document||(typeof document<"u"?document:null);at(t);try{let o=A();o&&!o.__svgCache&&(o.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=Xn(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&n&&Object.keys(s).length&&Zn(s,{document:n}),Object.keys(s).length>0}finally{ot()}},dL=(t,e,r,n,o)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=lL(s);if(a.failed.has(e))return!1;let c=a.waiting.get(e);if(c||(c=new Set,a.waiting.set(e,c)),c.add(o),a.pending.has(e))return!0;let l=Promise.resolve().then(()=>i(e,t)).then(f=>{let u=fL(f,r);return u?uL(s,u,n):!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(g){console.error("[Icon] repaint error:",g)}})});return a.pending.set(e,l),!0},HC={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,r)=>{let{parent:n}=t,{icons:o,useIconSprite:s,verbose:i}=r&&r.designSystem,{toCamelCase:a}=r&&r.utils,c=h=>{let p=h[".isActive"];if(p)return h.call("exec",p.name||p.icon)},l=(h,p,m)=>{let{semanticIcons:y}=m&&m.designSystem,{toCamelCase:w}=m&&m.utils,b=f(h,p),S=w(b).split(/([a-z])([A-Z])/g),k=S[1]?S[0]:b.split(".")[0].split(" ")[0],E=y&&y[k];if(E){let T=b.includes(".")?"sfsymbols."+b.split(".").slice(1).join("."):"sfsymbols";return b=E[T]||E[b.split(".")[0].split(" ")[0]],{tag:"span",semanticIcons:!0,width:"A",height:"A",lineHeight:"1em",":after":{fontSize:"Z",fontWeight:"300",content:`"${b}"`,textAlign:"center",display:"inline-block",style:{color:"currentColor",fontFamily:"'SF Pro Icons', 'SF Pro', 'SF Symbols', 'Segoe UI'"}}}}},f=(h,p)=>{let{key:m}=h,y=h.call("exec",h.name||h.icon||m,h);return h.call("isString",y)&&y.includes("{{")&&(y=h.call("replaceLiteralsWithObjectFields",y)),h.call("isString",y)?y:m},u=t.src,d,g=()=>{let h=f(t,e),p=h;if(h.includes(" ")){let O=h.split(" ");h=O[0]+O.slice(1).map(F=>F.charAt(0).toUpperCase()+F.slice(1)).join("")}let m=a(h),y=m.split(/([a-z])([A-Z])/g),w=l(t,e,r);if(w){Object.assign(t,w);return}let b;t.isActive&&(b=c(t));let _=n[".isActive"];n&&n.isActive&&_&&_.icon&&(b=t.call("exec",_.icon||_.Icon.name||_.Icon.icon,t)),t.call("isString",b)&&b.includes("{{")&&(b=t.call("replaceLiteralsWithObjectFields",b));let S;o[b]&&(S=b),o[m]?S=m:o[y[0]+y[1]]?S=y[0]+y[1]:o[y[0]]?S=y[0]:i&&t.warn("Can't find icon:",h,S);let k=o[S],E=n&&n.src||u;!k&&!E&&(dL(r,p,m,t,F=>{if(!(d&&d._disposed)){if(!F)return UC(p,t);g()}})||UC(p,t));let T=s&&S,I=k||E||o.noIcon;if(!(t.spriteId===T&&t.src===I&&t.node&&t.node.innerHTML)&&(t.spriteId=T,t.src=I,typeof t.html=="function"&&t.node)){let O=t.context&&t.context.designSystem;O&&at(O);try{let F=t.html(t,t.state,t.context);F!=null&&typeof F!="function"&&(t.node.innerHTML=F)}finally{O&&ot()}}};d=Y(g,{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"}},WC={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,r=t.call("exec",t.icon,t);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},qC={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var c_={};M(c_,{A:()=>JC,Link:()=>i_,RouteLink:()=>QC,RouterLink:()=>a_});var Ic={};M(Ic,{default:()=>bL,getActiveRoute:()=>s_,lastLevel:()=>rd,lastPathname:()=>ed,matchRoute:()=>r_,parseQuery:()=>n_,parseRoutePattern:()=>e_,router:()=>lr,runGuards:()=>o_});L();var GC=/^:(.+)/,YC=/^\*$/,KC=new Map,e_=t=>{let e=KC.get(t);if(e)return e;let r=t.replace(/^\//,"").split("/"),n=[],o=!1;for(let i=0;i<r.length;i++){let a=r[i].match(GC);a?n.push({index:i,name:a[1]}):YC.test(r[i])&&(o=!0)}let s={segments:r,params:n,hasWildcard:o,pattern:t};return KC.set(t,s),s},r_=(t,e,r=0)=>{let o=t.replace(/^\//,"").split("/").filter(Boolean).slice(r),s="/"+(o[0]||"");if(!e)return{key:null,content:null,params:{},routePath:s};let i=null,a=-1,c={};for(let l in e){if(l==="/*")continue;let f=e_(l),u=pL(o,f);u>a&&(a=u,i=l,c=hL(o,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},pL=(t,e)=>{let{segments:r,hasWildcard:n}=e;if(!n&&r.length!==t.length&&r.length!==1&&r.length>t.length)return-1;let o=0,s=Math.min(r.length,t.length);for(let i=0;i<s;i++)if(r[i]===t[i])o+=3;else if(GC.test(r[i]))o+=1;else if(YC.test(r[i]))o+=.5;else return-1;return o},hL=(t,e)=>{let r={};for(let{index:n,name:o}of e.params)t[n]&&(r[o]=decodeURIComponent(t[n]));return r},n_=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((n,o)=>{e[o]!==void 0?(Array.isArray(e[o])||(e[o]=[e[o]]),e[o].push(n)):e[o]=n}),e},o_=async(t,e)=>{if(!t||!t.length)return!0;for(let r of t){let n=await r(e);if(n===!1)return!1;if(typeof n=="string")return n}return!0},s_=(t=0,e)=>{e||(e=typeof C<"u"?C.location.pathname:"/");let n=e.split("/")[t+1];if(n)return`/${n}`},ed,rd=0,gL=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,XC={level:rd,pushState:!0,replace:!1,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof nt<"u"&&(nt.scrollingElement||nt.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0,exitTimeout:300},mL=(t,e)=>{if(!t||t.visibilityState!=="visible")return!1;try{let r=e&&typeof e.matchMedia=="function"&&e.matchMedia("(prefers-reduced-motion: reduce)");if(r&&r.matches)return!1}catch{}return!0},ZC=t=>{let e=t.__routeExit;e&&(t.__routeExit=null,e.abort())},yL=(t,e,r,n,o,s,i)=>{let a=e.__routeExit;if(a&&a.page===r)return a.wait;if(ZC(e),!r||!r.node||typeof t.onRouteExit>"u"||!mL(s,i))return null;let c=typeof o=="number"&&o>=0?o:XC.exitTimeout,l=typeof AbortController=="function"?new AbortController:null,f={...n,page:r,timeout:c,signal:l?l.signal:void 0},u;try{u=gr("routeExit",t,f)}catch{return null}if(!u||typeof u.then!="function")return null;let d={page:r,abort:()=>{l&&!l.signal.aborted&&l.abort()}};return d.wait=new Promise(g=>{let h=setTimeout(()=>{d.abort(),g()},c),p=()=>{clearTimeout(h),g()};u.then(p,p)}),e.__routeExit=d,d.wait},lr=async(t,e,r={},n={})=>{let o=e||void 0,s=o?.context?.window||C,i=o?.context?.document||nt,a={...XC,...o.context.routerOptions,...n};rd=a.lastLevel;let c=o.__ref;(a.contentElementKey!=="content"&&a.contentElementKey!==c.contentElementKey||!c.contentElementKey)&&(c.contentElementKey=a.contentElementKey||"content");let l=c.contentElementKey||a.contentElementKey||"content",f=s.location.origin!=="null"?s.location.origin:"http://localhost";t=gL(t);let u=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,d=new u(f+t),{pathname:g,search:h,hash:p}=d,m=n_(h),y=o.node,w=p&&p!==s.location.hash.slice(1),b=g!==ed;ed=g;let _=c.__routerRendered,S,k,E,T;if(a.useParamsMatching){let N=r_(g,o.routes,a.level);S=N.key,k=N.routePath,E=N.content,T=N.params}else{S=s_(a.level,g),k=S;let N=o.routes;E=N?N[S||"/"]||N["/*"]:null,T={}}let I=a.scrollToNode?y:a.scrollNode;if(o.state?.root?.debugging){o.state.root.debugging=!1;return}if(!E){a.onNotFound?a.onNotFound({pathname:g,route:S,element:o}):a.silent||console.warn("[smbls/router] no content matched for path",g,"\u2014 available routes:",Object.keys(o.routes||{}));return}if(a.guards&&a.guards.length){let N={pathname:g,route:S,params:T,query:m,hash:p,element:o,state:r},q=await o_(a.guards,N);if(q===!1)return;if(typeof q=="string")return lr(q,e,r,{...n,guards:[]})}let O=c.__routerNavSeq=(c.__routerNavSeq||0)+1,F=!_||_.content!==E||_.route!==S,z=b||F||a.force===!0;if(z&&_){let N=yL(o,c,o[l],{from:_.route,to:S,pathname:g,params:T,query:m,hash:p},a.exitTimeout,i,s);if(N&&(await N,c.__routerNavSeq!==O||(c.__routeExit&&c.__routeExit.wait===N&&(c.__routeExit=null),typeof o?.set!="function")))return}else ZC(c);if(a.pushState){let N=g+(h||"")+(p||"");try{a.replace?s.history.replaceState(r,null,N):s.history.pushState(r,null,N)}catch{}}let Mt=b||!w?{route:S,routePath:k,hash:p,params:T,query:m,debugging:!1}:{params:T,query:m};if(a.updateState&&o.state.update(Mt,{preventContentUpdate:!0}),z){l&&a.removeOldElement&&o[l].remove();let N=o.__ref?.origin?.content,q={};if(N)for(let G in N){let j=N[G];G==="__ref"||G==="props"||G==="node"||G==="parent"||G==="key"||(typeof j=="string"||typeof j=="number"||typeof j=="boolean"||typeof j=="object"&&j!==null&&!j.node&&!j.__ref)&&(q[G]=j)}let bt={...q,...typeof E=="object"?E:{extends:E}};a.useFragment&&(bt.tag="fragment");let kt={content:E,route:S},Rt=c.__routerRendered;try{if(typeof o?.set!="function")return;c.__routerRendered=kt,o.set(bt,{contentElementKey:l})}catch(G){c.__routerRendered===kt&&(c.__routerRendered=Rt),console.error("[smbls/router] failed to render route content",g,G)}}let yt=!b&&w;if(a.scrollToTop&&!yt&&I?.scrollTo&&I.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&E[l]?.node?.scrollTo&&E[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),p){let N=i.getElementById(p.slice(1));if(N&&I?.scrollTo){let q=s.getComputedStyle?s.getComputedStyle(N):null,bt=q&&parseFloat(q.scrollMarginTop)||0,kt=N.getBoundingClientRect().top+I.scrollTop-bt-(a.scrollToOffset||0);I.scrollTo({...a.scrollToOptions||{},top:kt,left:0})}}gr("routeChanged",o,a)},bL=lr;var _L=(t,e,r)=>{let{context:n}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=n,d=e.__ref.root,g=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&&!g){t.preventDefault();try{let h=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let y of p){if(!m||!m[y]){m=null;break}m=m[y]}m&&(h=m,d.routes&&(h.routes=d.routes))}(f.router||l.router||c.router||lr)(a,h,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(h){console.warn(h)}}},i_={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>nn(t,t.href)||nn(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:_L},JC={extends:"Link"},a_={onClick:(t,e,r)=>{let{context:n}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=n,d=e.__ref.root,g=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&&!g){t.preventDefault();try{let h=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let y of p){if(!m||!m[y]){m=null;break}m=m[y]}m&&(h=m,d.routes&&(h.routes=d.routes))}(f.router||l.router||c.router||lr)(a,h,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(h){console.warn(h)}}}},QC={extends:[i_,a_]};var l_={};M(l_,{Select:()=>tE});var tE={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 f_={};M(f_,{Button:()=>eE,ButtonSet:()=>sE,CircleButton:()=>nE,IconButton:()=>iE,KangorooButton:()=>oE,SquareButton:()=>rE});var eE={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)},rE={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"},nE={extends:"SquareButton",round:"C"},oE={extends:"Button",childExtends:"IconText"},sE={tag:"nav",display:"flex",childExtends:"SquareButton"},iE={extends:["SquareButton","ClickableItem"],round:"Z"};var u_={};M(u_,{Dialog:()=>aE,DialogFooter:()=>lE,DialogHeader:()=>cE});var aE={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},cE={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},lE={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 d_={};M(d_,{Tooltip:()=>fE,TooltipHidden:()=>uE,TooltipParent:()=>dE});L();var fE={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=>Tt(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)}},uE={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)}},dE={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,n=e||r;if(!n)return;let o=n&&n[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var p_={};M(p_,{Avatar:()=>pE});var wL=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)},pE={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=wL(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 h_={};M(h_,{Range:()=>hE});var hE={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:Jo("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:Jo("#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 n=t.call("exec",t[e],t);return(t.call("isFunction",n)?n(t,t.state):n!==void 0?n: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 g_={};M(g_,{Dropdown:()=>gE,DropdownList:()=>mE,DropdownParent:()=>yE,DropdownParentFocus:()=>bE,DropdownSiblingFocus:()=>_E});var gE={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"},mE={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"}}},yE={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},bE={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()}}},_E={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 m_={};M(m_,{Notification:()=>wE});var wE={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 ao=Object.assign({},Db,Lb,Ib,$b,Mb,Bb,Vb,Ub,Nb,zb,Hb,jb,Wb,qb,Kb,Gb,Yb,Xb,Zb,Jb,Qb,t_,c_,l_,f_,u_,d_,p_,h_,g_,m_);function nd(t){if(t==null)return 0;if(typeof t!="object")return SE(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let n=0;n<t.length;n++)e=(e^nd(t[n]))*16777619;return e>>>0}let r=Object.keys(t).sort();for(let n=0;n<r.length;n++)e=(e^SE(r[n]))*16777619,e=(e^nd(t[r[n]]))*16777619;return e>>>0}function SE(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e}function od(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!=typeof e||typeof t!="object")return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!od(t[o],e[o]))return!1;return!0}let r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++){let s=r[o];if(!Object.prototype.hasOwnProperty.call(e,s)||!od(t[s],e[s]))return!1}return!0}function y_(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,n={};for(let o in t)if(o in e){let s=y_(t[o],e[o]);n[o]=s,s!==t[o]&&(r=!0)}else n[o]=t[o];for(let o in e)o in t||(n[o]=e[o],r=!0);return r?n:t}function b_(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 n in e){let o=e[n];o&&typeof o=="object"&&!Array.isArray(o)&&t[n]&&typeof t[n]=="object"&&!Array.isArray(t[n])?b_(t[n],o,r):t[n]=o}return t}function an(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 $s(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function $c(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():an(e)}function xE(t){return t.split(`
|
|
88
|
+
`).map(an).join(`
|
|
89
|
+
`)}var kE={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 vE(t,e){let r=kE[t]||an(t),n=$c(e),o=`_${r}-${n}`,s=$s(t),i=vL[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${o}{${a}}`;return`${o}
|
|
90
|
+
${c}`}var vL={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select","mask-image":"-webkit-mask-image","mask-size":"-webkit-mask-size","mask-repeat":"-webkit-mask-repeat","mask-position":"-webkit-mask-position","mask-clip":"-webkit-mask-clip","mask-origin":"-webkit-mask-origin","background-clip":"-webkit-background-clip"},CL="@media (hover: hover)",EL=/(?:^|[^\\]):hover(?![\w-])/,CE=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function EE(t){let e=t.split("\0"),r=[],n=[];for(let o=0;o+1<e.length;o+=2){let s=e[o],i=e[o+1];if(!i||CE(i))continue;let a=kE[s]||an(s),c=$c(i),l=`_${a}-${c}`,f=$s(s);r.push(l),n.push(`.${l}{${f}:${i}}`)}return r.join(" ")+"\0"+n.join(`
|
|
91
|
+
`)}function AE(t,e,r){let n=t+e,o=`_c${an(n)}`,s=e.split("\0"),i="";for(let l=0;l+1<s.length;l+=2){let f=s[l],u=s[l+1];u&&(CE(u)||(i+=`${$s(f)}:${u};`))}let a,c;if(t.startsWith("@media"))c=`.${o}`,a=`${t}{${c}{${i}}}`;else if(t.startsWith(":")||t.startsWith("&")||t.startsWith("[")&&!t.includes("&")){let l=t.startsWith("&")?t.slice(1):t;c=`.${o}${l}`,a=`${c}{${i}}`}else t.includes("&")?(c=t.replace("&",`.${o}`),a=`${c}{${i}}`):(c=`.${o} ${t}`,a=`${c}{${i}}`);return r!==!1&&EL.test(c)&&(a=`${CL}{${a}}`),`${o}
|
|
92
|
+
${a}`}var __=null;function id(t){__=t}var Ve={structuralHash:nd,deepEqual:od,mergeStructural:y_,overwriteDeep:b_,shortHash:an,toKebab:$s,sanitizeValue:$c,batchShortHash:xE,atomicCssClass:vE,batchAtomicCss:EE,compoundCssClass:AE},TE=!1,sd=null;function OE(t){return sd||(sd=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(Ve.structuralHash=e.structuralHash),e.deepEqual&&(Ve.deepEqual=e.deepEqual),e.mergeStructural&&(Ve.mergeStructural=e.mergeStructural),e.overwriteDeep&&(Ve.overwriteDeep=e.overwriteDeep),e.shortHash&&(Ve.shortHash=e.shortHash),e.toKebab&&(Ve.toKebab=e.toKebab),e.sanitizeValue&&(Ve.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(Ve.batchShortHash=e.batchShortHash),e.atomicCssClass&&(Ve.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(Ve.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(Ve.compoundCssClass=e.compoundCssClass),TE=!0,__&&e.batchAtomicCss&&__({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),sd)}function RE(){return TE}L();var Mc={};M(Mc,{CDN_PROVIDERS:()=>Se,DOMQL_EVENTS:()=>ah,DOMQ_PROPERTIES:()=>$r,ELEMENT_METHOD_OVERRIDE_POINTS:()=>Oo,ENV:()=>Ch,HTML_TAGS:()=>Io,LIBRARY_SCOPES_KEY:()=>Fn,METHODS:()=>Fr,METHODS_EXL:()=>Ci,NODE_ENV:()=>Ie,OPTIONS:()=>Zi,PACKAGE_MANAGER_TO_CDN:()=>Ur,PARSED_DOMQ_PROPERTIES:()=>vi,PROPS_METHODS:()=>Mr,REVIVED_MARK:()=>Ri,STATE_METHODS:()=>wn,STATE_PROPERTIES:()=>sh,SVG_TAGS:()=>RS,TYPES:()=>yi,UNIVERSAL_RESERVED_KEYS:()=>Ef,__resetBuiltinMethodWarnings:()=>dm,addCaching:()=>of,addContext:()=>nf,addExtend:()=>Gh,addExtends:()=>Xe,addItemAfterEveryElement:()=>qp,addProtoToArray:()=>wi,addRef:()=>tf,applyCSS:()=>x_,applyDependentState:()=>pg,applyEvent:()=>uf,applyEventUpdate:()=>df,applyExtends:()=>LS,applyProps:()=>Hi,arrayContainsOtherArray:()=>jp,arraysEqual:()=>Gp,arrayzeValue:()=>jn,bindLibraryGlobalScopes:()=>va,buildImgSrcset:()=>Oa,buildSourcesAndImg:()=>Ra,cache:()=>bg,call:()=>Vg,captureSnapshot:()=>zg,checkForStateTypes:()=>lg,checkIfInherits:()=>ff,checkIfStringIsInArray:()=>Zp,clone:()=>fh,cloneAndMergeArrayExtend:()=>Mi,cloneFunction:()=>Dh,collectExtendsList:()=>$o,concatAddExtends:()=>Wh,copyJavaScriptToClipboard:()=>ym,copyStringToClipboard:()=>mm,createBasedOnType:()=>Ql,createElement:()=>cg,createElementExtends:()=>Vl,createExtends:()=>Ni,createExtendsFromKeys:()=>Mo,createExtendsStack:()=>Wl,createIfConditionFlag:()=>Lh,createInheritedState:()=>fg,createKey:()=>Ii,createNestedObject:()=>bh,createNestedObjectByKeyPath:()=>dg,createObjectWithoutPrototype:()=>Ll,createParent:()=>ef,createPath:()=>rf,createProps:()=>Wi,createPropsStack:()=>Zl,createRoot:()=>ag,createScope:()=>gg,createSnapshotId:()=>Li,customDecodeURIComponent:()=>oh,customEncodeURIComponent:()=>nh,cutArrayAfterValue:()=>Hp,cutArrayBeforeValue:()=>zp,debounce:()=>$i,debounceOnContext:()=>Rh,decodeNewlines:()=>rh,deepClone:()=>ft,deepContains:()=>mh,deepDefaults:()=>Go,deepDestringifyFunctions:()=>Jt,deepExtend:()=>Bl,deepMerge:()=>it,deepMergeExtends:()=>Ze,deepStringifyFunctions:()=>Ai,defineSetter:()=>jg,destringifyGlobalScope:()=>An,detectHeightOnInit:()=>Gg,detectInfiniteLoop:()=>xh,document:()=>nt,encodeNewlines:()=>eh,error:()=>Ln,excludeKeysFromObject:()=>vh,exec:()=>pt,extendCachedRegistry:()=>qh,extendStackRegistry:()=>ji,extractArrayExtend:()=>Vi,fetchLibraryData:()=>Df,fibonacciNumberByIndex:()=>Yg,fileEntryUrl:()=>Of,filterArrays:()=>Yp,filterArraysFast:()=>Xp,finalizeExtends:()=>ql,findClosestNumber:()=>Rf,findClosestNumberInFactory:()=>am,findInheritedState:()=>lf,findKeyPosition:()=>Qp,flattenExtend:()=>Fo,formatDate:()=>Kg,generateHash:()=>Fl,generateHeadArrayTags:()=>Tf,generateKey:()=>Di,generateMetaTags:()=>sm,get:()=>$g,getActiveRoute:()=>s_,getCDNDirUrl:()=>Af,getCDNUrl:()=>Me,getCapitalCaseKeys:()=>Zh,getCdnProviderFromConfig:()=>Wo,getChildStateInKey:()=>cf,getChildren:()=>Ng,getContext:()=>ha,getCookie:()=>Nh,getDB:()=>_a,getEmotionStylesheet:()=>Sm,getExtendsInElement:()=>Yh,getExtendsStack:()=>Fi,getExtendsStackRegistry:()=>jl,getFrequencyInArray:()=>Bp,getFunctionSource:()=>le,getHashedExtend:()=>Bi,getImportMapScript:()=>qg,getInObjectByPath:()=>Sh,getLocalStorage:()=>Bh,getNev:()=>Oh,getPageMetadata:()=>im,getParentStateInKey:()=>af,getPath:()=>ca,getQuery:()=>wa,getRef:()=>Fg,getRoot:()=>ua,getRootContext:()=>pa,getRootData:()=>da,getRootState:()=>fa,getRootStateInKey:()=>sf,getSpreadChildren:()=>Jh,global:()=>Mp,hasFunction:()=>zt,hasHandlerPlugin:()=>Do,hasOwnProperty:()=>ph,hashContent:()=>Ko,inheritChildExtends:()=>zl,inheritChildPropsExtends:()=>Ul,inheritParentProps:()=>qi,inheritRecursiveChildExtends:()=>Hl,init:()=>Ar,initProps:()=>og,is:()=>Zt,isArray:()=>P,isBoolean:()=>El,isBuiltinElementMethod:()=>ih,isContextComponent:()=>Qh,isCyclic:()=>kh,isDOMNode:()=>Xt,isDate:()=>Tl,isDefined:()=>Tt,isDevelopment:()=>jr,isEmpty:()=>Pl,isEmptyObject:()=>hh,isEqualDeep:()=>Dl,isFailedRevival:()=>Cn,isFunction:()=>R,isHtmlElement:()=>gi,isLazyFunction:()=>uh,isLocal:()=>Th,isLoudDevRuntime:()=>mt,isMalformedDependency:()=>In,isMethod:()=>Ug,isMobile:()=>Mh,isNode:()=>hr,isNot:()=>Np,isNotProduction:()=>On,isNull:()=>Al,isNumber:()=>Ge,isObject:()=>v,isObjectLike:()=>B,isPhoto:()=>Xg,isPolyglotRetranslatableKey:()=>Xi,isPolyglotWritableKey:()=>Pn,isProduction:()=>Nr,isProtectedElementMethod:()=>Sn,isRevived:()=>En,isStaging:()=>Ah,isState:()=>ug,isString:()=>x,isStringFunction:()=>Po,isStringTag:()=>Oi,isTest:()=>$l,isTesting:()=>Eh,isUndefined:()=>Pt,isUniversallyReservedKey:()=>Hg,isUnresolvableDependency:()=>zr,isValidDependencyMap:()=>$n,isValidHtmlTag:()=>Uh,isWrappedLibrary:()=>er,joinArrays:()=>Eo,jointStacks:()=>Kh,keys:()=>vf,lastLevel:()=>rd,lastPathname:()=>ed,loadCssFile:()=>tm,loadJavascript:()=>em,loadJavascriptFile:()=>Zg,loadJavascriptFileEmbedSync:()=>Qg,loadJavascriptFileSync:()=>Jg,loadRemoteCSS:()=>rm,loadRemoteScript:()=>qo,log:()=>Bg,logGroupIf:()=>$h,logIf:()=>Ih,lookdown:()=>Lg,lookdownAll:()=>Ig,lookup:()=>Dg,lowercaseFirstLetter:()=>_n,makeObjectWithoutPrototype:()=>gh,map:()=>lh,mapStringsWithContextComponents:()=>Ui,markPolyglotSeeded:()=>Qe,markRevived:()=>Ro,matchRoute:()=>r_,matchesComponentNaming:()=>Je,memoize:()=>Ph,merge:()=>_t,mergeSharedLibraries:()=>Ca,mergeSharedLibraryDesignSystems:()=>Ea,nextElement:()=>ma,normalizeIgnoreList:()=>ka,normalizeLibraryKey:()=>Nn,objectToString:()=>Ti,objectizeStringProperty:()=>zi,overwrite:()=>Pi,overwriteDeep:()=>Ht,overwriteShallow:()=>Tn,overwriteState:()=>hg,parse:()=>Cf,parseDeep:()=>ia,parseQuery:()=>n_,parseRoutePattern:()=>e_,pickupElementFromProps:()=>Yl,pickupPropsFromElement:()=>Gl,polyglotSeededKeys:()=>No,previousElement:()=>ya,promoteActiveRootState:()=>Vo,propExists:()=>rg,propertizeElement:()=>Xl,propertizeUpdate:()=>eg,reinit:()=>S_,remove:()=>ux,removeChars:()=>bm,removeCookie:()=>jh,removeDuplicateProps:()=>Gi,removeDuplicatesInArray:()=>Ao,removeFromArray:()=>Vp,removeFromObject:()=>yh,removeNestedKeyByPath:()=>_h,removeValueFromArray:()=>_i,removeValueFromArrayAll:()=>Wp,reorderArrayByValues:()=>Kp,replaceLiteralsWithObjectFields:()=>Ft,replaceOctalEscapeSequences:()=>th,resolveAsset:()=>Qt,resolveFileReferences:()=>Mn,resolveHandler:()=>Lo,resolveSharedLibraries:()=>gm,returnValueAsText:()=>Jl,router:()=>lr,runGuards:()=>o_,runPluginHook:()=>Ot,scratchSystem:()=>fs,scratchUtils:()=>Kr,self:()=>Fp,set:()=>Qn,setActiveRootState:()=>la,setCookie:()=>Fh,setHashedExtend:()=>Nl,setInObjectByPath:()=>wh,setLocalStorage:()=>Vh,setNodeStyles:()=>kf,setProps:()=>Mg,setPropsPrototype:()=>Ki,sharedLibrary:()=>um,splitPackageSpecifier:()=>Sa,spotByPath:()=>aa,srcsetFor:()=>Yo,stringIncludesAny:()=>xi,stringToObject:()=>dh,stripVersionRangePrefix:()=>xa,swapItemsInArray:()=>Up,syncProps:()=>Yi,toCamelCase:()=>Aa,toDashCase:()=>Ta,toDescriptionCase:()=>wm,toPriorityOrder:()=>_e,toTitleCase:()=>_m,toggleFullscreen:()=>Wg,triggerEventOn:()=>gr,triggerEventOnUpdate:()=>mg,trimStringFromSymbols:()=>Jp,unstackArrayOfObjects:()=>bi,update:()=>ng,updateProps:()=>sg,variables:()=>ba,verbose:()=>Uo,warn:()=>ga,window:()=>C});L();L();var TL=A(),PE=(t=TL,e)=>{let r=v(e.localFile)?e.localFile:{},n=ft(r.designSystem||{});return it(t,n,de)},OL={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},ad=(t,e)=>{let r=!e||e===":root",n={};for(let o in t)if(o.startsWith("@media")){let s=r?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;n[o]={[s]:t[o]}}else r?n[o]=t[o]:n[`${e}${o}, ${o} ${e}`]=t[o];return n},w_=(t,e)=>{t.CSS_MEDIA_VARS&&St(ad(t.CSS_MEDIA_VARS,e));let r=Jn(t.cssSkinVars,t.cssSkinFallback,e);Object.keys(r).length&&St(r)},Ar=(t,e=OL)=>{let r=PE(t||{},e),n=e.scopeSelector||":root",o=e.globalTheme;if(typeof window<"u"&&window.location){let p=new URLSearchParams(window.location.search).get("globalTheme");p&&(o=p)}let s=Qn({verbose:e.verbose,useReset:e.useReset,useFontImport:e.useFontImport,useVariable:e.useVariable,useSvgSprite:e.useSvgSprite,useDocumentTheme:e.useDocumentTheme,useIconSprite:e.useIconSprite,useDefaultConfig:e.useDefaultConfig,globalTheme:o,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...r},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=n);let i=$a(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=t.svg,d=s.useIconSprite,g=t.icons;l&&St(i),c&&(St({[n]:s.CSS_VARS}),w_(s,n)),a&&St(s.reset);let h=s.animation;if(h){let p={};for(let m in h)p[`@keyframes ${m}`]=h[m];St(p)}return(u||f)&&cc(s.svg,{document:e.document}),(g||d)&&Zn(s.icons,{document:e.document}),s},cd={},S_=(t,e=cd)=>{let r=PE(t||{},e),n=e.scopeSelector||":root",o=Qn({verbose:!1,...r});return e.preventInject||(St({[n]:o.CSS_VARS}),w_(o,n),St(o.reset)),o},x_=(t,e=cd)=>{St(t)},RL=(t,e=cd)=>{let r=e.scopeSelector||":root";St({[r]:t.CSS_VARS}),w_(t,r)};var PL=(t,e=cd)=>{};L();var LE=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,DL=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},v_={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},Fc=(t,e)=>{if(!e)return t;let r=Array.isArray(e)?e:e.split("."),n=t;for(let o of r){if(!n||!n[o])return null;n=n[o]}return n},LL=["manual","auto"],k_=new WeakMap,DE=(t,e)=>{let r=e.claims[e.claims.length-1],n=r?r.value:e.found;t.scrollRestoration!==n&&(t.scrollRestoration=n)},IL=(t,e)=>{let r=e&&e.scrollRestoration;if(r!=null){if(!LL.includes(r)){if(t.verbose!==!1){let n=typeof r=="string"?JSON.stringify(r):`a ${typeof r}`;console.warn(`[smbls/router] router.scrollRestoration must be 'manual' or 'auto', got ${n} \u2014 the browser default stays`)}return}try{let n=t.window||C,o=n&&n.history;if(!o||!("scrollRestoration"in o))return;let s=k_.get(o);s||(s={found:o.scrollRestoration,claims:[]},k_.set(o,s));let i={value:r};s.claims.push(i),DE(o,s),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{let a=s.claims.indexOf(i);if(a!==-1){s.claims.splice(a,1),s.claims.length||k_.delete(o);try{DE(o,s)}catch{}}})}catch{}}},IE=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=v_:e.router=_t(e.router||{},v_);let r=e.router;IL(e,r);let n=async(s,i)=>{let a=s.context?.window||C,c=DL(r);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=LE(f),c=f+u+d}let l=s;if(r.customRouterElement){let f=Fc(s,r.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await lr(c,l,{},{initialRender:!0,pushState:!1})},o=!Pt(t.onRenderRouter);return r&&r.initRouter&&!o&&(t.onRenderRouter=n),$L(e,r),r},C_=(t,e)=>{if(e.router===!1)return;let r=e.router||v_;if(!r.popState)return;let n=e.utils&&e.utils.router?e.utils.router:lr,o=e.window||C,s=async i=>{let{pathname:a,search:c,hash:l}=o.location;a=LE(a);let f=a+c+l,u=t;if(r.customRouterElement){let d=Fc(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})};o.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>o.removeEventListener("popstate",s))},$L=(t,e)=>{let{components:r}=t;if(e&&e.injectRouterInLinkComponent)return it(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};L();var E_=C&&C.location?C.location.host.includes("dev."):jr(),$E=E_?"http://localhost:8080/get":"https://api.symbols.app/get",ML={endpoint:$E},ME=async(t,e=ML)=>{let r=e.endpoint||$E,n=e.serviceRoute?P(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",o;try{return o=await globalThis.fetch(r+"/?"+n,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await o.json()}catch(s){if(R(e.onError))return e.onError(s);console.error(s)}},FL=async(t,e)=>{let{editor:r}=e;if(r&&r.remote){let n=await ME(t,r),o=E_||e.isDevelopment?Jt(n):Jt(n.releases[0]);r.serviceRoute?P(r.serviceRoute)?r.serviceRoute.forEach(s=>{Ht(e[s],o[s.toLowerCase()])}):Ht(e[r.serviceRoute],o):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{Ht(e[s],o[s.toLowerCase()])})}return e},NL=async(t,e,r)=>{let{editor:n}=e;if(n&&n.remote){let o=await ME(t,n),s=E_||e.isDevelopment?Jt(o):Jt(o.releases[0]);r(s)}},FE=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await FL(t,e)}catch(r){console.error(r)}},NE=(t,e,r,n)=>{if(e&&r.editor)try{r.editor.async&&NL(e,r,n||(o=>{let s=o.designSystem;v(s)&&r.utils.init(s),v(o.state)&&t.state.set(o.state)}))}catch(o){console.error(o)}};var Nc=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(n){console.error("[smbls] destroy teardown error:",n)}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 R_={};M(R_,{Helmet:()=>VE,applyMetadata:()=>js,default:()=>qL,extractMetadata:()=>zL,generateHeadHtml:()=>WL,helmetPlugin:()=>O_,resolveMetadata:()=>Ns});L();var jL={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"}},BL=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}"]`},jE=t=>Jt({v:t}).v,BE=(t,e,r,n)=>{try{return pt(t,e,r)}catch(o){console.warn(`[helmet] metadata factory for "${n}" threw; treating as unset:`,o&&o.message||o);return}},A_=Object.freeze({authored:!0}),Ns=(t,e,r,n)=>{if(!t)return{};let o=t;x(o)&&zt(o)&&(o=jE(o));let s=R(o),i=!s&&n?.authored===!0,a=s?BE(o,e,r,"metadata"):v(o)?{...o}:{};if(!v(a))return{};for(let c in a){let l=a[c],f=i&&x(l)&&!zt(l);x(l)&&zt(l)&&(l=jE(l)),R(l)?l=BE(l,e,r,c):x(l)&&zt(l)&&(l=void 0),x(l)&&l.includes("{{")&&e?.call&&(l=f?e.call("replaceLiteralsWithObjectFields",l,r,A_):e.call("replaceLiteralsWithObjectFields",l,r)),a[c]=l}return a},VL=t=>!!t&&typeof t=="object"&&(t.notFound===!0||t.metadata?.notFound===!0),UL=(t,e)=>{if(Object.prototype.hasOwnProperty.call(t,e))return t[e];if(t["/*"])return t["/*"];if(t["*"])return t["*"];for(let r in t)if(VL(t[r]))return t[r]},zL=(t,e="/",r,n)=>{let o=t.pages||{},s=UL(o,e),i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=Ns(t.app.metadata,r,n,A_);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=Ns(c,r,n,A_);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}}return Mn(i,t.files)},T_=(t,e)=>Mn(Ns(t,e,e.state),e.context?.files),HL=(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},Fs=t=>{let e=5381,r=String(t);for(let n=0;n<r.length;n++)e=(e*33^r.charCodeAt(n))>>>0;return e.toString(36)},Ms=(t,e,r,n)=>{let o=t.head||t.querySelector("head");if(!o)return;let s=new Map;for(let a of o.querySelectorAll(`[${e}]`))s.set(a.getAttribute(e),a);let i=new Set;for(let a of 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=n(a);c&&(c.setAttribute(e,a),o.appendChild(c))}},js=(t,e)=>{if(!(!v(t)||!e)){for(let r in t){let n=t[r];if(n==null||r==="jsonLd"||r==="styles"||r==="scripts"||r==="alternate"||r==="favicons"||r==="icon"||r==="favicon")continue;let o=jL[r];if(!o)continue;let s=BL(o),i=e.querySelector(s)||HL(o,e);i&&(r==="title"?i.textContent=n:o.valueAttr?i.setAttribute(o.valueAttr,n):i.setAttribute("content",n))}if(Array.isArray(t.jsonLd)){let n=t.jsonLd.filter(s=>s!=null).map(s=>x(s)?s:JSON.stringify(s)),o=n.map(Fs);Ms(e,"data-smbls-jsonld",o,s=>{let i=o.indexOf(s),a=e.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=n[i],a})}if(Array.isArray(t.styles)){let r=t.styles.filter(o=>o!=null&&String(o).trim()),n=r.map(Fs);Ms(e,"data-smbls-style",n,o=>{let s=n.indexOf(o),i=e.createElement("style");return i.textContent=String(r[s]),i})}if(Array.isArray(t.scripts)){let r=t.scripts.filter(o=>o&&(x(o)?o.trim():o.src)),n=r.map(o=>x(o)?o:String(o.src));Ms(e,"data-smbls-script",n,o=>{let s=n.indexOf(o),i=r[s],a=e.createElement("script");return x(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(o=>v(o)),n=r.map(o=>`${o.hreflang||""}|${o.href||""}`);Ms(e,"data-smbls-alternate",n,o=>{let s=n.indexOf(o),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(o=>o!=null),n=r.map(o=>v(o)?Fs(JSON.stringify(o)):String(o));Ms(e,"data-smbls-favicon",n,o=>{let s=n.indexOf(o),i=r[s],a=e.createElement("link");if(a.setAttribute("rel","icon"),v(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),n=r.endsWith(".svg")?"image/svg+xml":r.endsWith(".png")?"image/png":"";Ms(e,"data-smbls-single-icon",[r],o=>{let s=e.createElement("link");return s.setAttribute("rel","icon"),s.setAttribute("href",o),n&&s.setAttribute("type",n),s})}}},dt=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,r=>e[r])},WL=t=>{let e=['<meta charset="UTF-8">'],r=new Set(["charset","jsonLd","styles","scripts"]),n=!1;for(let[o,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||r.has(o)||typeof s=="function")continue;if(o==="title"){e.push(`<title>${dt(s)}</title>`);continue}if(o==="viewport"){n||(e.push(`<meta name="viewport" content="${dt(s)}">`),n=!0);continue}if(o==="canonical"){e.push(`<link rel="canonical" href="${dt(s)}">`);continue}if(o==="icon"||o==="favicon"){let f=dt(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(o==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,g])=>`${d}="${dt(g)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${dt(f)}">`)});continue}if(o==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,g])=>`${d}="${dt(g)}"`).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=>o.startsWith(f)),l=a.some(f=>o.startsWith(f));if(o.startsWith("http-equiv:")){let f=o.replace("http-equiv:","");e.push(`<meta http-equiv="${dt(f)}" content="${dt(s)}">`)}else if(o.startsWith("itemprop:")){let f=o.replace("itemprop:","");e.push(`<meta itemprop="${dt(f)}" content="${dt(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${dt(o)}" content="${dt(f)}">`)):e.push(`<meta property="${dt(o)}" content="${dt(s)}">`):l?e.push(`<meta name="${dt(o)}" content="${dt(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${dt(o)}" content="${dt(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${dt(o)}" content="${dt(s)}">`)}if(n||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let o of t.jsonLd){if(o==null)continue;let s=typeof o=="string"?o:JSON.stringify(o),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Fs(s)}">${i}<\/script>`)}if(Array.isArray(t.styles))for(let o of t.styles){if(o==null||!String(o).trim())continue;let s=String(o).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Fs(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let o of t.scripts){if(!o)continue;let s=typeof o=="string",i=s?o:o.src;if(!i&&!(o&&o.body))continue;let a=[];i&&a.push(`src="${dt(i)}"`),s||(o.type&&a.push(`type="${dt(o.type)}"`),o.async&&a.push("async"),o.defer&&a.push("defer"),o.integrity&&a.push(`integrity="${dt(o.integrity)}"`),o.crossorigin&&a.push(`crossorigin="${dt(o.crossorigin)}"`),o.referrerpolicy&&a.push(`referrerpolicy="${dt(o.referrerpolicy)}"`),o.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${dt(i||Fs(o.body||""))}"`;if(!s&&o.body){let l=String(o.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
|
|
93
|
+
`)},VE={define:{metadata:(t,e,r)=>{let n=e.context?.document||typeof document<"u"&&document;if(!n)return;let o=Y(()=>{let s=T_(t,e);js(s,n);let i=e.state?.root;v(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(o)}}},O_={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;if(!e)return;let r=Y(()=>{let n=t.metadata;if(!n)return;let o=T_(n,t);js(o,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 n=T_(e,t);js(n,r)}},qL=VE;sa();var UE=(t,e,r,n)=>{t&&oa(t,e,r,n)},zE=(t,e,r)=>{if(!t)return;let n=e.context?.document||typeof document<"u"&&document;if(!n)return;let o=Ns(t,e,r);js(o,n)},HE=async(t,e)=>{if(!t)return;let r={tag:"fragment",...t},n=async()=>{await e.set(r,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(n):await n(),r},Bs={routes:t=>t,metadata:zE,fetch:UE,$router:HE},WE=(t={})=>{let e={routes:r=>r};return t.metadata!==!1&&(e.metadata=zE),t.fetch!==!1&&(e.fetch=UE),t.router!==!1&&(e.$router=HE),e};var P_={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},ld={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},fd={...P_,router:ld},KL={state:{},pages:{},components:{},router:ld,define:Bs},cn=KL;L();L();var qE=(t,e)=>B(t.extends)?t.extends:[];L();var D_={};M(D_,{default:()=>ZL,getActiveLang:()=>ln,getLanguages:()=>Bc,getLocalStateLang:()=>Wc,initPolyglot:()=>dd,loadTranslations:()=>Uc,polyglotPlugin:()=>Us,setLang:()=>zc,translate:()=>Vc,upsertTranslation:()=>Hc});L();var GE="smbls_lang",GL="smbls_t_",YL="smbls_tv_",Vs={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)}}},jc={};function ln(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||t?.state?.lang||e?.defaultLang||"en"}function Bc(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var ud=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let r=e.split("."),n=t;for(let o=0;o<r.length;o++){if(n==null)return;n=n[r[o]]}return n},KE=(t,e,r)=>{let n=e.lastIndexOf(".");if(n===-1)return t[e+"_"+r];let o=ud(t,e.substring(0,n));if(o!=null)return o[e.substring(n+1)+"_"+r]};function Vc(t,e){if(!t)return"";let r=this?.context,n=r?.polyglot,o=e||this.call("getActiveLang"),s=this?.state;if(s){let l=KE(s,t,o);if(l!==void 0)return l}if(n?.translations){let l=n.translations[o];if(l){let f=ud(l,t);if(f!==void 0)return f}}let a=(s?.root||r?.state?.root)?.translations;if(a){let l=a[o];if(l){let f=ud(l,t);if(f!==void 0)return f}}let c=n?.defaultLang||"en";if(s){let l=KE(s,t,c);if(l!==void 0)return l}if(n?.translations){let l=n.translations[c];if(l){let f=ud(l,t);if(f!==void 0)return f}}return t}async function Uc(t){let e=this?.context,r=e?.polyglot,n=this?.state?.root||e?.state?.root;if(!r||!n)return;let o=r.storagePrefix||GL,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):YL);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!n.translations?.[t]){let c=Vs.get(o+t);if(c)try{let l=JSON.parse(c),f={translations:{...n.translations||{}}};f.translations[t]=l,n.update&&n.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(r.storagePrefix||"smbls")+":"+t;if(jc[i])return jc[i];let a=this;return jc[i]=(async()=>{try{let c=r.fetch,l=parseInt(Vs.get(s+t),10)||0,f,u,d;if(R(c)){let h=await c(t,l,a);if(!h||h.changed===!1)return;f=h.translations||h.data||h,u=h.version||0,d=!0}else if(v(c)){let h=a.getDB||(()=>e.fetch),p=R(h)?await h.call(a):e.fetch;if(!p)return;let m=c.rpc||c.from||"get_translations_if_changed",y={p_lang:t,p_cached_version:l,...c.params||{}},w=await p.rpc({from:m,params:y});if(w.error)throw r._fetchFailed||(r._fetchFailed={}),r._fetchFailed[t]=!0,w.error;let b=w.data;if(!b||!b.changed)return;f=b.translations||{},u=b.version||0,d=!0}else return;if(!d||!f)return;Vs.set(o+t,JSON.stringify(f)),u&&Vs.set(s+t,String(u));let g={translations:{...n.translations||{}}};g.translations[t]=f,n.update&&n.update(g)}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 jc[i]}})(),jc[i]}var XL=(t,e,r)=>{let n=t.__ref;if(!n||n.contentManaged||r==null||typeof r=="object")return;let o=n.__textNode;if(!o||o.parentNode!==e)return;let s=String(r);o.nodeValue!==s&&(o.nodeValue=s)};async function zc(t,e){let r=this?.context,n=r?.polyglot,o=this?.state?.root||r?.state?.root,s=r?.document||globalThis.document;if(!o)return;if(e?.persist!==!1){let l=n?.storageLangKey||GE;Vs.set(l,t)}if(s?.documentElement&&(s.documentElement.lang=t),this.call("getActiveLang")===t)return;n?.fetch&&await this.call("loadTranslations",t),r?.state&&(r.state.lang=t);let i=n?.translations?.[t],a={lang:t},c=l=>Xi(r,l,o);if(i&&typeof i=="object")for(let l in i){if(!c(l))continue;let f=i[l];(Array.isArray(f)||typeof f=="string"||typeof f=="number")&&(a[l]=f)}o.update&&o.update(a);for(let l in a)l!=="lang"&&Qe(r,l,a[l]);if(i&&typeof i=="object")for(let l in i){if(!c(l))continue;let f=i[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];Qe(r,l,o[l])}}if(s&&i){let l=s.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{XL(u,f,u.call("replaceLiteralsWithObjectFields",d,u.state))}catch{}}}}async function Hc(t,e,r){let n=this?.context,o=n?.polyglot,s=this?.state?.root||n?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=r),o?.translations?.[e]&&(o.translations[e][t]=r),o?.fetch&&v(o.fetch)){let i=this.getDB||(()=>n.fetch),a=R(i)?await i.call(this):n.fetch;if(!a)return;let c=o.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 dd(){let t=this?.context,e=t?.polyglot;if(!e)return;let r=this?.state?.root||t?.state?.root;if(!r)return;let n=e.storageLangKey||GE,s=Vs.get(n)||ln.call(this),i=t?.document||globalThis.document;i?.documentElement&&(i.documentElement.lang=s),r.update&&r.lang!==s&&r.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function Wc(t){try{let e=ln.call(this),r=this?.state;if(!r)return"";let n=t.lastIndexOf(".");if(n===-1)return r[t+e]??"";let o=t.substring(0,n).split("."),s=r;for(let i=0;i<o.length;i++){if(s==null)return"";s=s[o[i]]}return s==null?"":s[t.substring(n+1)+e]??""}catch{return""}}var Us={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,dd.call(t))}},ZL=Us;sa();var I_={};M(I_,{SYSTEM_METRICS:()=>qc,capsizeHandler:()=>L_,capsizePlugin:()=>hd,computeCapsize:()=>YE,default:()=>JL,resolveFontSizePx:()=>XE,resolveMetrics:()=>ZE});var qc={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}},pd=t=>parseFloat(t.toFixed(4)),YE=(t,e,r)=>{let{ascent:n,descent:o,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(o),l=n+c+s,f=r!==void 0?r:l/i*t,u=f/t,d=l/i,g=(n-a+s/2)/i-(u-d)/2,h=(c+s/2)/i-(u-d)/2;return{fontSize:`${pd(t/16)}rem`,lineHeight:`${pd(f)}px`,capHeightTrim:`${pd(-g)}em`,baselineTrim:`${pd(-h)}em`}},XE=(t,e)=>{if(typeof t=="number")return t;let r=e?.designSystem;if(!r)return null;let{typography:n}=r;if(n?.sequence){let s=String(t).toUpperCase(),i=n.sequence[s];if(i)return i.decimal||i.val}let o=parseFloat(t);return isNaN(o)?null:typeof t=="string"&&t.endsWith("rem")?o*(r.typography?.browserDefault||16):o},ZE=(t,e)=>{let n=e?.designSystem?.font_family||{};if(t){let s=n[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(qc[i])return qc[i]}let o=n.default||Object.keys(n)[0];if(o){let s=n[o];if(s?.metrics)return s.metrics;if(s?.value&&Array.isArray(s.value))for(let i of s.value){let a=i.toLowerCase().replace(/['"]/g,"").trim();if(qc[a])return qc[a]}}return null},L_=(t,e,r,n)=>{if(!t)return;let o=XE(e.fontSize,n);if(!o)return;let s=ZE(e.fontFamily,n);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=YE(o,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},hd={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},JL=hd;var V_={};M(V_,{PRESERVE_VALUE_KEYS:()=>Bt,SKIP_INLINE_KEYS:()=>fn,abbrToProp:()=>jt,decode:()=>r1,encode:()=>QE,expand:()=>lo,isComponentKey:()=>Ue,isSelectorKey:()=>ze,parse:()=>fo,parseFurther:()=>po,propToAbbr:()=>Re,shorten:()=>Kc,shorthandPlugin:()=>Gc,stringify:()=>co,stringifyFurther:()=>uo});var Re={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"},jt=Object.create(null);for(let t in Re)jt[Re[t]]=t;var $_=Object.create(null);for(let t in Re){let e=Re[t];if($_[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${$_[e]}"`);$_[e]=t}var Bt=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),fn=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function Ue(t){return/^[A-Z]/.test(t)}function ze(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function QE(t){if(!t||typeof t!="object")return"";let e=[];for(let r in t){let n=t[r];if(typeof n=="function"||n!==null&&typeof n=="object"&&!Array.isArray(n)||n===void 0)continue;let o=Re[r]||r;if(n===!0)e.push(o);else if(n===!1)e.push("!"+o);else if(Array.isArray(n)){let s=n.map(i=>gd(i));e.push(o+":"+s.join(","))}else e.push(o+":"+gd(n))}return e.join(" ")}function gd(t){return String(t).replace(/ /g,"_")}function Kc(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Kc(r):r});let e={};for(let r in t){let n=t[r];if(Ue(r)){e[r]=M_(n);continue}if(ze(r)){e[r]=M_(n);continue}let o=Re[r]||r;if(Bt.has(r)||Bt.has(o)){e[o]=n;continue}e[o]=M_(n)}return e}function M_(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Kc(e):e}):typeof t=="object"?Kc(t):t}function co(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?co(n):n});let e={},r=[];for(let n in t){let o=t[n];if(Ue(n)){e[n]=JE(o);continue}if(ze(n)){e[n]=JE(o);continue}let s=Re[n]||n;if(Bt.has(n)||Bt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(fn.has(n)||fn.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?co(a):a});continue}if(o.length<=1){e[s]=o;continue}r.push(s+":"+o.map(gd).join(","));continue}if(typeof o=="object"){e[s]=co(o);continue}o===!0?r.push(s):o===!1?r.push("!"+s):typeof o=="number"||typeof o=="string"&&(o.includes(",")||o.includes("_"))?e[s]=o:r.push(s+":"+gd(o))}return r.length&&(e.in=r.join(" ")),e}function JE(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?co(e):e}):typeof t=="object"?co(t):t}function r1(t){if(!t||typeof t!="string")return{};let e={},r=n1(t);for(let n of r){if(n.startsWith("!")){let c=n.slice(1),l=jt[c]||c;e[l]=!1;continue}let o=n.indexOf(":");if(o===-1){let c=jt[n]||n;e[c]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=jt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(t1);continue}e[a]=t1(i)}return e}function n1(t){return t.trim().split(/\s+/).filter(Boolean)}function t1(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function e1(t){return t.replace(/_/g," ")}function QL(t){if(!t||typeof t!="string")return{};let e={},r=n1(t);for(let n of r){if(n.startsWith("!")){let c=n.slice(1),l=jt[c]||c;e[l]=!1;continue}let o=n.indexOf(":");if(o===-1){let c=jt[n]||n;e[c]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=jt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(e1);continue}e[a]=e1(i)}return e}function lo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?lo(r):r});let e={};for(let r in t){let n=t[r];if(Ue(r)){e[r]=F_(n);continue}let o=jt[r]||r;if(ze(r)&&o===r){e[r]=F_(n);continue}if(Bt.has(o)||Bt.has(r)){e[o]=n;continue}e[o]=F_(n)}return e}function F_(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 fo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?fo(r):r});let e={};if(typeof t.in=="string"){let r=QL(t.in);for(let n in r)e[n]=r[n]}for(let r in t){if(r==="in")continue;let n=t[r];if(Ue(r)){e[r]=N_(n);continue}let o=jt[r]||r;if(ze(r)&&o===r){e[r]=N_(n);continue}if(Bt.has(o)||Bt.has(r)){e[o]=n;continue}e[o]=N_(n)}return e}function N_(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?fo(e):e}):typeof t=="object"?fo(t):t}function o1(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function tI(t){let e="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){let n=t[r+1];if(n===","||n==="_"||n==="\\"){e+=n,r+=2;continue}}t[r]==="_"?e+=" ":e+=t[r],r++}return e}function eI(t){let e=[],r="",n=0;for(;n<t.length;){if(t[n]==="\\"&&n+1<t.length){r+=t[n]+t[n+1],n+=2;continue}if(t[n]===","){e.push(r),r="",n++;continue}r+=t[n],n++}return e.push(r),e}function s1(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 uo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?uo(n):n});let e={},r=[];for(let n in t){let o=t[n];if(Ue(n)){let i=i1(o);e[n]=s1(i)?i.in:i;continue}if(ze(n)){let i=i1(o);e[n]=s1(i)?i.in:i;continue}let s=Re[n]||n;if(Bt.has(n)||Bt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(fn.has(n)||fn.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?uo(a):a});continue}if(o.length<=1){e[s]=o;continue}r.push(s+":"+o.map(o1).join(","));continue}if(typeof o=="object"){e[s]=uo(o);continue}if(o===!0){r.push(s);continue}if(o===!1){r.push("!"+s);continue}if(typeof o=="number"){r.push(s+":#"+o);continue}r.push(s+":"+o1(o))}return r.length&&(e.in=r.join(" ")),e}function i1(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?uo(e):e}):typeof t=="object"?uo(t):t}function a1(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):tI(t)}function j_(t){if(!t||typeof t!="string")return{};let e={},r=t.trim().split(/\s+/).filter(Boolean);for(let n of r){if(n.startsWith("!")){let l=n.slice(1),f=jt[l]||l;e[f]=!1;continue}let o=n.indexOf(":");if(o===-1){let l=jt[n]||n;e[l]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=jt[s]||s,c=eI(i);if(c.length>1){e[a]=c.map(a1);continue}e[a]=a1(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=j_(t.in);for(let n in r)e[n]=r[n]}for(let r in t){if(r==="in")continue;let n=t[r];if(Ue(r)){typeof n=="string"?e[r]=j_(n):e[r]=B_(n);continue}let o=jt[r]||r;if(ze(r)&&o===r){typeof n=="string"?e[r]=j_(n):e[r]=B_(n);continue}if(Bt.has(o)||Bt.has(r)){e[o]=n;continue}e[o]=B_(n)}return e}function B_(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 rI={shorten:lo,stringify:fo,stringifyFurther:po};function nI(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(n=>e(n));let r={};for(let n in t){let o=t[n];r[n]=o&&typeof o=="object"?e(o):o}return r}var oI=["components","pages","snippets"],Gc={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let n=rI[e===!0?"shorten":e];if(n){for(let o of oI)t[o]&&(t[o]=nI(t[o],n));t.app&&typeof t.app=="object"&&(t.app=n(t.app))}}};var Q_={};M(Q_,{LEVELS:()=>Yc,analyzePlugin:()=>Hs,attachBrowserListeners:()=>vd,attachNetworkListeners:()=>Zc,classifyEvent:()=>G_,createAnalyzeState:()=>Cd,createBeaconSink:()=>Z_,createConsoleSink:()=>Y_,createDedupe:()=>W_,createEnrich:()=>z_,createMemorySink:()=>X_,createPipeline:()=>_d,createRedact:()=>bd,createRemoteSink:()=>Sd,createSample:()=>q_,createSummarize:()=>H_,default:()=>Hs,emitFetchEvent:()=>g1,makeEvent:()=>Z,meetsLevel:()=>md,normalizeLevel:()=>Xc,resolveSinks:()=>kd,summarizeElement:()=>ho});var sI=0,iI=()=>`${Date.now().toString(36)}-${(sI++).toString(36)}`,Z=(t,e,r={})=>({id:iI(),ts:Date.now(),type:t,level:e,...r}),aI=t=>{let e=[],r=t,n=0;for(;r&&n<32;)r.key!=null&&e.unshift(String(r.key)),r=r.parent,n++;return e.join(" > ")},ho=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:aI(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var zs=t=>t?.context?.analyze,cI={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"}},lI=(t,{category:e,type:r,level:n})=>o=>{let s=zs(o);!s||!s.shouldCapture(e)||s.emit(Z(r,n,{hook:t,element:ho(o)}))},c1=t=>(e,r)=>{let n=zs(e);!n||!n.shouldCapture("state")||n.emit(Z("state","debug",{hook:t,element:ho(e),changedKeys:r?.changedKeys||null}))},Hs={name:"analyze",error(t,e){let r=zs(t);if(!r||r.config.enabled===!1||!r.shouldCapture("errors"))return;let n=e?.error||e?.err||(e instanceof Error?e:null);r.emit(Z("error","error",{hook:e?.hook||"error",element:ho(t),error:n,message:n?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=zs(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=zs(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=zs(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:ho(t),durationMs:r}))},beforeStateUpdate:c1("beforeStateUpdate"),stateUpdate:c1("stateUpdate")};for(let[t,e]of Object.entries(cI))Hs[t]=lI(t,e);L();var Yc={error:0,warn:1,info:2,debug:3,trace:4};var md=(t,e)=>{let r=Yc[t],n=Yc[e];return r==null||n==null?!0:r<=n},Xc=t=>Yc[t]!=null?t:"warn";L();var yd=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var fI=(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},uI=(t,e)=>{if(e!=="redact"){if(e==="hash"){let r=0,n=String(t);for(let o=0;o<n.length;o++)r=(r<<5)-r+n.charCodeAt(o)|0;return`#${(r>>>0).toString(36)}`}return"***"}},U_=(t,e,r,n)=>{if(n>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>U_(s,e,r,n+1));let o={};for(let s of Object.keys(t))if(fI(s,e)||yd.test(s)){let a=uI(t[s],r);a!==void 0&&(o[s]=a)}else o[s]=U_(t[s],e,r,n+1);return o},bd=(t=[],e="mask")=>{let r=Array.isArray(t)?t:[t];return n=>{if(!n)return n;let{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:g,...h}=n,p=U_(h,r,e,0);return{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:g,...p}}};var z_=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,r=typeof navigator<"u"?navigator.userAgent:null,n=t.config.buildHash||null,o=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=C,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:o,build:n,route:i},meta:{ua:r,viewport:c}}}},H_=()=>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},W_=(t=1e3,e=500)=>{let r=new Map;return n=>{if(!n)return n;let o=`${n.type}:${n.level}:${n.message||""}:${n.error?.message||""}`,s=r.get(o),i=n.ts||Date.now();if(s&&i-s<t)return null;if(r.set(o,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 n}},q_=t=>e=>{if(!e)return e;let r=t[e.type];return r==null||r>=1?e:Math.random()>r?null:e},l1={redact:t=>bd(t.config.redact||[],t.config.maskStrategy),enrich:t=>z_(t),summarize:()=>H_(),dedupe:t=>W_(t.config.cache?.dedupeWindowMs||1e3),sample:t=>q_(t.config.sample||{})},dI=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let r=l1[t];return r?r(e):null}return null},_d=t=>{let e=t.config,r=Array.isArray(e.transformers)?e.transformers.slice():[],n=r.findIndex(s=>s==="redact");n>=0&&r.splice(n,1);let o=[];e.redact!==!1&&o.push(l1.redact(t));for(let s of r){let i=dI(s,t);i&&o.push(i)}return s=>{let i=s;for(let a of o){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=o.slice(o.indexOf(a)+1),f=[];for(let u of c){let d=u,g=!1;for(let h of l)if(d=h(d),d==null){g=!0;break}!g&&d!=null&&f.push(d)}return f}i=c}return i}};L();L();var wd=typeof C<"u"&&typeof C.document<"u",pI=5e3,hI=50,gI=3,mI=1500,yI=1e3,G_=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",bI=t=>{try{return JSON.stringify(t)}catch{return null}},_I=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},wI=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}},SI=()=>{if(!wd)return null;try{let t=C.document?.documentElement?.getAttribute("data-theme")||null,e=typeof C.matchMedia=="function"?C.matchMedia("(prefers-color-scheme: dark)").matches:null;return{active:t||(e?"dark":e===!1?"light":null),forced:t||null,prefers:e==null?null:e?"dark":"light"}}catch{return null}},xI=()=>{if(!wd)return null;let t=C.location,e=typeof navigator<"u"?navigator:null,r=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:C.document?.referrer||null,title:C.document?.title||null,ua:e?.userAgent||null,browser:wI(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:_I(),viewport:C.innerWidth?{w:C.innerWidth,h:C.innerHeight,dpr:C.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:SI()}},Sd=(t={})=>{let e=t.url,r=typeof t.transport=="function"?t.transport:null,n=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!r)return()=>{};let o=t.apiKey||null,s=t.appKey||t.appId||null,i=t.tenantKey||t.tenant||null,a=t.release||null,c=t.env||null,l=t.sdk||null,f=typeof t.getAuth=="function"?t.getAuth:null,u=typeof t.getContext=="function"?t.getContext:null,d=typeof t.classify=="function"?t.classify:G_,g=typeof t.beforeSend=="function"?t.beforeSend:null,h=t.debug===!0,p=typeof t.getDebug=="function"?t.getDebug:null,m=t.batchMs!=null?t.batchMs:pI,y=t.maxBatch||hI,w=t.maxRetries!=null?t.maxRetries:gI,b=t.backoffMs||mI,_=t.queueLimit||yI,S=t.sampleRate!=null?t.sampleRate:1,k=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,E=t.sessionId||k(),T=[],I=[],O=null,F=null,z=()=>{O||!T.length||(O=setTimeout(N,m))},Q=G=>{if(F)return;let j=b*Math.pow(2,Math.max(0,G-1));F=setTimeout(()=>{if(F=null,!I.length)return;let et=I.shift();yt(et.envelope,et.attempt)},j)},Mt=(G,j=!1)=>{let et=u?K_(u):null,D={id:E,sentAt:Date.now()};j&&(D.endedAt=Date.now());let X={v:1,session:D,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:xI(),user:et?.user||null,traits:et?.traits||null,tags:et?.tags||null,events:G};if((p?K_(p)===!0:h)&&(X.app.debug=!0),g)try{return g(X)||null}catch{return X}return X},yt=async(G,j=1)=>{if(G)try{let et=!0;if(r){let D=await r(G);et=D!==!1&&D?.ok!==!1}else et=await kI(e,G,{apiKey:o,getAuth:f});!et&&j<w&&(I.push({envelope:G,attempt:j+1}),Q(j+1))}catch{j<w&&(I.push({envelope:G,attempt:j+1}),Q(j+1))}},N=(G=!1,j=!1)=>{if(O&&(clearTimeout(O),O=null),!T.length&&!j)return;let et=T;T=[];let D=Mt(et,j);if(D){if(G&&wd){if(typeof n=="function"&&K_(()=>n(D)))return;if(navigator.sendBeacon&&e){let X=bI(D);if(X)try{navigator.sendBeacon(e,new C.Blob([X],{type:"application/json"}));return}catch{}}}yt(D)}},q=!1,bt=()=>{q||(q=!0,N(!0,!0))};wd&&(C.addEventListener("pagehide",bt,{passive:!0}),C.addEventListener("beforeunload",bt,{passive:!0}),C.addEventListener("visibilitychange",()=>{C.document.visibilityState==="hidden"&&N(!0)},{passive:!0}));let kt=G=>{if(!G||S<1&&Math.random()>S)return;q&&(q=!1);let j={...G,log_type:d(G)};T.push(j),T.length>_&&(T=T.slice(-_)),T.length>=y?N():z()},Rt=G=>(N(!1,!0),E=G||k(),q=!1,kt.sessionId=E,E);return kt.flush=()=>N(!1),kt.endSession=bt,kt.startNewSession=Rt,kt.sessionId=E,kt},K_=t=>{try{return t()}catch{return null}},kI=async(t,e,{apiKey:r,getAuth:n})=>{let o={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(r&&(o["X-Analyze-Key"]=r),n)try{let s=await n();s&&(o.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:o,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var vI={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},CI="\x1B[0m",xd=typeof C<"u"&&typeof C.document<"u",Y_=(t={})=>{let e=t.minLevel||null,r=console.error.bind(console),n=console.warn.bind(console),o=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?r:s.level==="warn"?n:o,a=`[analyze:${s.type}]`;if(xd)i(a,s);else{let c=vI[s.level]||"";i(`${c}${a}${CI}`,s)}}},X_=(t,e={})=>{let r=e.max||t.config.cache?.max||500,n=new Array(r),o=0,s=0,i=a=>{n[o]=a,o=(o+1)%r,s<r&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(o-s+r)%r;for(let l=0;l<s;l++)a[l]=n[(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:()=>{o=0,s=0}},i},Z_=(t={})=>{let e=t.url,r=t.batchMs!=null?t.batchMs:5e3,n=t.maxBatch||50;if(!e)return()=>{};let o=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!o.length)return;let c=JSON.stringify({events:o});o=[];let l=xd?new C.Blob([c],{type:"application/json"}):c;if(xd&&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(()=>{})};xd&&(C.addEventListener("pagehide",i,{passive:!0}),C.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(o.push(c),o.length>=n?i():s||(s=setTimeout(i,r)))};return a.flush=i,a},f1={console:Y_,memory:X_,beacon:Z_,remote:Sd},u1=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},kd=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],r=[];for(let n of e)if(typeof n=="function")r.push(n);else if(typeof n=="string"){let o=f1[n];if(!o)continue;r.push(n==="memory"?o(t,{}):o(n==="remote"?u1(t,{}):{}))}else if(n&&typeof n=="object"&&n.type){let o=f1[n.type];if(!o)continue;r.push(n.type==="memory"?o(t,n):o(n.type==="remote"?u1(t,n):n))}return r};L();var EI=typeof C<"u"&&typeof C.document<"u",AI=new Set(["password","hidden"]),d1=(t,e)=>{let r=0,n=null,o=null;return(...s)=>{let i=Date.now();i-r>=e?(r=i,t(...s)):(o=s,n||(n=setTimeout(()=>{r=Date.now(),n=null,o&&(t(...o),o=null)},e-(i-r))))}},J_="__analyzeKeyPath",Ws=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[J_])return e[J_];let r=[],n=e,o=0,s=null;for(;n&&o<64;){if(n.getAttribute){let a=n.getAttribute("data-key");a&&(s==null&&(s=a),r.unshift(a))}n=n.parentNode,o++}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[J_]=i}catch{}return i},TI=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let r=0,n=String(t||"");for(let o=0;o<n.length;o++)r=(r<<5)-r+n.charCodeAt(o)|0;return`#${(r>>>0).toString(36)}`}return"***"}},OI=t=>!!(!t||t.tagName==="INPUT"&&AI.has(t.type)||yd.test(t.name||"")||yd.test(t.id||"")||t.dataset?.analyze==="skip"),vd=t=>{if(!EI)return;let e=t.config.capture,r=t.config.throttle,n=t.__teardown,o=(s,i,a,c)=>{s.addEventListener(i,a,c),n.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(o(C,"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}))}),o(C,"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){o(C,"click",i=>{t.emit(Z("pointer","info",{hook:"click",target:Ws(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:p1(i)}))},{passive:!0,capture:!0}),o(C,"dblclick",i=>{t.emit(Z("pointer","info",{hook:"dblclick",target:Ws(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),o(C,"contextmenu",i=>{t.emit(Z("pointer","info",{hook:"contextmenu",target:Ws(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=d1(i=>{t.emit(Z("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},r.pointermove);o(C,"pointermove",s,{passive:!0})}if(e.keyboard&&o(C,"keydown",s=>{t.emit(Z("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:p1(s),target:Ws(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=OI(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=TI(a.value,t.config.maskStrategy)),t.emit(Z("forms","info",{hook:i.type,target:Ws(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};o(C,"input",s,{passive:!0,capture:!0}),o(C,"change",s,{passive:!0,capture:!0}),o(C,"submit",i=>{t.emit(Z("forms","info",{hook:"submit",target:Ws(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=d1(()=>{t.emit(Z("scroll","trace",{hook:"scroll",x:C.scrollX,y:C.scrollY}))},r.scroll);o(C,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=$i(()=>{t.emit(Z("viewport","info",{hook:"resize",w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}))},r.resize);o(C,"resize",s,{passive:!0}),o(C,"orientationchange",()=>{t.emit(Z("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),o(C.document,"visibilitychange",()=>{t.emit(Z("viewport","info",{hook:"visibilitychange",hidden:C.document.hidden}))},{passive:!0}),t.emit(Z("viewport","info",{hook:"initial",w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(Z("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(h1)}))}catch{}return i.apply(console,a)},n.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{}n.push(()=>s.disconnect())}catch{}},p1=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),RI=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=h1(t.cause)),e},h1=t=>{if(t==null)return t;if(t instanceof Error)return RI(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};L();var PI=typeof C<"u"&&typeof C.document<"u",g1=(t,e)=>{let r=t?.analyze;if(!r||!r.shouldCapture("network"))return;let n=e.phase==="error"?"error":"info";r.emit(Z("network",n,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},Zc=t=>{if(PI&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof C.fetch=="function"){let e=C.fetch.bind(C),r=function(n,o){if(o?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(n,o);let s=typeof n=="string"?n:n&&n.url||"",i=(o?.method||typeof n=="object"&&n?.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(n,o).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})};C.fetch=r,t.__teardown.push(()=>{C.fetch=e})}if(typeof C.XMLHttpRequest=="function"){let e=C.XMLHttpRequest,r=e.prototype.open,n=e.prototype.send;e.prototype.open=function(o,s){return this.__analyze={method:String(o).toUpperCase(),url:String(s)},r.apply(this,arguments)},e.prototype.send=function(o){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return n.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),n.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=r,e.prototype.send=n})}}};var DI={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},LI={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},II={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},$I={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},MI=t=>{let e={...DI,...t};return e.replay&&Object.assign(e,LI),e.telemetry&&Object.assign(e,II),e.remote&&Object.assign(e,$I),Object.assign(e,t),e},FI=64,NI=()=>{if(typeof C>"u"||!C.location)return null;try{let e=new URLSearchParams(C.location.search).get("analyze");return e||null}catch{return null}},Cd=(t={})=>{let e=t===!0?{}:{...t};e.capture=MI(e.capture||{});let r=NI();(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=Xc(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 n={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},o=()=>{n.__pipeline||(n.__pipeline=_d(n),n.__sinks=kd(n))};return n.shouldCapture=s=>n.config.enabled===!1?!1:!!n.config.capture[s],n.emit=s=>{if(s&&n.config.enabled!==!1&&!n.__paused&&md(s.level,n.config.level)){if(!n.__ready){if(s.level!=="error"&&!n.config.captureDuringHydration)return;n.__preBuffer.length<FI&&n.__preBuffer.push(s);return}o(),m1(n,s)}},n.activate=s=>{if(n.context==null&&(n.context=s||null),n.__ready)return;n.__ready=!0;let i=n.__preBuffer;if(n.__preBuffer=[],i.length){o();for(let a of i)m1(n,a)}try{vd(n)}catch(a){console.error("[analyze] browser attach error:",a)}try{Zc(n)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of n.__onActivate||[])try{a(n)}catch(c){console.error("[analyze] onActivate error:",c)}},n.pause=()=>{n.__paused=!0},n.resume=()=>{n.__paused=!1},n.setLevel=s=>{n.config.level=Xc(s)},n.setCapture=(s,i)=>{if(n.config.capture[s]=!!i,s==="network"&&i&&n.__ready)try{Zc(n)}catch(a){console.error("[analyze] network attach error:",a)}},n.query=s=>n.__memory?n.__memory.query(s):[],n.snapshot=()=>n.__memory?n.__memory.snapshot():[],n.emitNetwork=s=>{if(!n.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";n.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})},n.flush=()=>{if(n.__sinks)for(let s of n.__sinks)typeof s.flush=="function"&&s.flush()},n.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(n.config.sinks)?n.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(n.__sinks)for(let c of n.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},n.replay=()=>({initialSnapshot:n.__initialSnapshot,events:n.snapshot()}),n.destroy=()=>{for(let s of n.__teardown)try{s()}catch{}n.__teardown=[],n.__ready=!1,n.__paused=!0},n.__onActivate=[],n.onActivate=s=>{n.__onActivate.push(s)},n},m1=(t,e)=>{let r=t.__pipeline(e);if(r==null)return;let n=Array.isArray(r)?r:[r];for(let o of n){if(typeof t.config.onEvent=="function")try{t.config.onEvent(o)}catch{}for(let s of t.__sinks)try{s(o)}catch(i){console.error("[analyze] sink error:",i)}}};var rw={};M(rw,{Inspect:()=>Ed,inspectPlugin:()=>ew});L();function y1(t){return x(t)?t:P(t)?t.find(e=>x(e)):""}function tw(t){if(!t)return;let e=t.__ref.__componentKey,r=t.extends&&y1(t.extends),n=t.parent&&t.parent.childExtends&&y1(t.parent.childExtends);return(e||r||n||"").split("_")[0].split(".")[0].split("+")[0]}function Ad(t){if(!t||!t.__ref)return;let{components:e,pages:r,editor:n}=t.context,o=tw(t);return n&&n.onInitInspect&&!n.onInitInspect(o,t,t.state)?Ad(t.parent):o&&(e[o]||r[o])?t:Ad(t.parent)}var jI=(t,e,r)=>{let n=r.window||window;n.onkeydown=o=>{o.altKey&&o.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},n.onkeyup=o=>{t.state.preventSelect&&(!o.altKey||!o.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},Ed={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:jI,onMousemove:(t,e,r)=>{let n=t.target.ref,o=Ad(n),s=e.Inspector.state;if(!o||!r.debugging||!o.__ref)return s.update({area:!1});let i=tw(o),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=o.node.getBoundingClientRect(),g={x:l,y:f,width:u,height:d};if(!s.area)return a(g);s.area.x!==g.x&&a(g)}else s.area&&s.update({area:!1})};window.requestAnimationFrame(()=>{c(),window.requestAnimationFrame(c)})},onMousedown:(t,e,r)=>{if(!r.debugging)return;let n=t.target.ref,o=Ad(n);if(!o)return;let s=tw(o);if(!s)return;let i=n.context.editor;if(i&&i.onInspect)return i.onInspect(s,n,n.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return n.context.socket?.emit&&n.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(v(e)){let{Content:r,...n}=e;for(let o in n)Is[o]||(n[o].__ref||(n[o].__ref={}),n[o].__ref.__componentKey||(n[o].__ref.__componentKey=o))}},onBeforeUpdate:(t,e,r)=>{let{area:n}=r,o=r.area&&r.parent.debugging,s;if(!o)s="display: none !important";else if(n){let{x:i,y:a,width:c,height:l}=n;s=`
|
|
91
94
|
display: block !important;
|
|
92
95
|
top: ${a-6}px;
|
|
93
96
|
left: ${i-6}px;
|
|
94
97
|
width: ${c+12}px;
|
|
95
98
|
height: ${l+12}px;
|
|
96
|
-
`}return e.node.style=s,e.Span.node.innerText=r.focusKey,!1}}},
|
|
97
|
-
`);for(;
|
|
98
|
-
`)}}return{text:y.join(""),errors:
|
|
99
|
+
`}return e.node.style=s,e.Span.node.innerText=r.focusKey,!1}}},ew={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(Ed):t.extends?t.extends=[t.extends,Ed]:t.extends=[Ed]}};var ow={};M(ow,{apiUrl:()=>nw,channelByApiUrl:()=>zI,channelNames:()=>VI,channels:()=>ae,currentChannel:()=>un,defaultChannel:()=>ZI,deployTarget:()=>GI,isKnownChannel:()=>XI,mermaidUrl:()=>KI,normalizeOwnerSegment:()=>JI,normalizeProjectKey:()=>t$,normalizeProjectSlug:()=>QI,parseSymboLsHost:()=>e$,previewProjectUrl:()=>qI,previewUrl:()=>S1,resolveChannel:()=>go,screenshotCdnHost:()=>x1,screenshotCdnUrl:()=>YI,setChannel:()=>UI,shellUrl:()=>WI,socketUrl:()=>HI});var ae={channels:{local:{api:"http://localhost:8080",socket:"http://localhost:8080",shell:"http://my.localhost:1355",preview:"http://preview.localhost:1355",mermaidApex:"localhost:1355",deploy:{}},development:{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.my.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},"demo-dev":{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.demo.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-demo-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},next:{api:"https://next.api.symbols.app",socket:"https://next.api.symbols.app",shell:"https://next.my.symbols.app",preview:"https://next.preview.symbols.app",mermaidApex:"next.symbo.ls",deploy:{shellBucket:"smbls-my-next",previewWorker:"smbls-preview-next",mermaidWorker:"mermaid-next"}},test:{api:"https://test.api.symbols.app",socket:"https://test.api.symbols.app",shell:"https://test.my.symbols.app",preview:"https://test.preview.symbols.app",mermaidApex:"test.symbo.ls",deploy:{shellBucket:"smbls-my-test",previewWorker:"smbls-preview-test",mermaidWorker:"mermaid-test"}},upcoming:{api:"https://upcoming.api.symbols.app",socket:"https://upcoming.api.symbols.app",shell:"https://upcoming.my.symbols.app",preview:"https://upcoming.preview.symbols.app",mermaidApex:"upcoming.symbo.ls",deploy:{shellBucket:"smbls-my-upcoming",previewWorker:"smbls-preview-upcoming",mermaidWorker:"mermaid-upcoming"}},staging:{api:"https://staging.api.symbols.app",socket:"https://staging.api.symbols.app",shell:"https://staging.my.symbols.app",preview:"https://staging.preview.symbols.app",mermaidApex:"staging.symbo.ls",deploy:{shellBucket:"smbls-my-staging",previewWorker:"smbls-preview-staging",mermaidWorker:"mermaid-staging"}},demo:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://demo.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-demo",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}},production:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://my.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-prod",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}}},defaultChannel:"production",screenshotCdn:"screenshots.api.symbols.app"};var VI=Object.keys(ae.channels),Tr=t=>!!(t&&ae.channels[t]),go=t=>Tr(t)?ae.channels[t]:ae.channels[ae.defaultChannel],UI=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=Tr(t)?t:null,qs=void 0)},qs,Jc=t=>typeof process<"u"&&process.env&&process.env[t]||null,un=()=>{if(qs!==void 0)return qs;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=Jc("SYMBOLS_CHANNEL"),r=Jc("NODE_ENV");return qs=Tr(t)&&t||Tr(e)&&e||Tr(r)&&r||ae.defaultChannel,qs===ae.defaultChannel&&!Tr(t)&&!Tr(e)&&!Tr(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 "${ae.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),qs},b1=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],_1=t=>{let e=b1.indexOf(t);return e===-1?b1.length:e},zI=t=>{if(!t)return null;let e=Object.keys(ae.channels).filter(r=>ae.channels[r].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((r,n)=>_1(r)-_1(n))[0]},nw=(t=un())=>Jc("SYMBOLS_API_URL")||go(t).api,HI=(t=un())=>Jc("SYMBOLS_SOCKET_URL")||go(t).socket,WI=(t=un())=>go(t).shell||null,S1=(t=un())=>go(t).preview||null,qI=({owner:t,key:e,env:r="production"}={},n=un())=>{let o=S1(n);if(!o||!t||!e)return null;let s=o.match(/^(https?:\/\/)(.+)$/);if(!s)return null;let[,i,a]=s,c=`${encodeURIComponent(t)}--${encodeURIComponent(e)}`,l=`${i}${c}.${a}/`;return!r||r==="production"||r==="prod"?l:`${l}?env=${encodeURIComponent(r)}`},KI=({owner:t,key:e,env:r="production"}={},n=un())=>{let o=go(n).mermaidApex;if(!o||!t||!e)return null;let i=!r||r==="production"||r==="prod"?"":`--${encodeURIComponent(r)}`,a=`${encodeURIComponent(t)}--${encodeURIComponent(e)}${i}`;return`${o.startsWith("localhost")?"http":"https"}://${a}.${o}`},GI=(t=un())=>go(t).deploy||{},x1=()=>Jc("SYMBOLS_SCREENSHOT_CDN")||ae.screenshotCdn,YI=({owner:t,key:e,page:r="root",componentKey:n,env:o="production",width:s}={})=>{if(!t||!e)return null;let i=n?`component/${encodeURIComponent(n)}`:encodeURIComponent(String(r||"root").replace(/^\/+/,"").replace(/\//g,"-")||"root"),a=[];o&&o!=="production"&&a.push(`env=${encodeURIComponent(o)}`),s&&a.push(`w=${Number(s)}`);let c=a.length?`?${a.join("&")}`:"";return`https://${x1()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},XI=Tr,ZI=ae.defaultChannel,JI=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",QI=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",t$=(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 n=typeof e.owner=="string"?e.owner.trim():"";return n&&r.startsWith(`${n}--`)?r=r.slice(n.length+2):!n&&r.includes("--")&&(r=r.slice(r.indexOf("--")+2)),r},w1={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},e$=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=w1[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?w1[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 n=r[1],o=r[0];if(o.includes("--")){let[s,i]=o.split("--",2);return!s||!i?null:{projectKey:s,owner:n,env:i}}return{projectKey:o,owner:n,env:"production"}};var aw={};M(aw,{BUILD_DOMQL_SYSTEM_PROMPT:()=>I1,DEFAULT_MAX_TOKENS:()=>Ld,DEFAULT_MODEL:()=>dn,DEFAULT_PROVIDER:()=>el,DEFAULT_TEMPERATURE:()=>Dd,MODEL_TIER_ALIASES:()=>iw,PROVIDER_MODELS:()=>tl,SIMONE_BASE_URL:()=>Qc,SIMONE_CHAT_PATH:()=>Td,SIMONE_CODE_PATH:()=>Od,SIMONE_CODE_SYMBOLS_PATH:()=>Rd,SIMONE_HEALTH_PATH:()=>Pd,SIMONE_TOOLS_PATH:()=>k1,WORKSPACE_SYSTEM_PROMPT:()=>L1,buildMessages:()=>T1,chat:()=>rl,health:()=>A1,parseSimoneResponse:()=>P1,resolveModel:()=>$1,streamChat:()=>rl,streamCode:()=>C1,streamCodeSymbols:()=>E1,toLegacyEnvelope:()=>D1});var Qc="https://symbols-service-production.up.railway.app",Td="/api/chat",Od="/api/code",Rd="/api/code-symbols",Pd="/api/health",k1="/api/tools",tl={"openai-compatible":["claude-sonnet-4-6","claude-opus-4-6","gpt-4o","gpt-4o-mini","deepseek-chat"],anthropic:["claude-sonnet-4-6","claude-sonnet-4-5-20250929","claude-opus-4-1-20250805","claude-haiku-4-5-20251001"],openrouter:["google/gemini-3-pro-preview"],gemini:["gemini-2.5-pro","gemini-3.1-pro-preview"]},el="gemini",dn=tl[el][0],Dd=.7,Ld=4096;function r$(t){if(!t)return null;for(let[e,r]of Object.entries(tl))if(r.includes(t))return e;return null}function v1(t,e){return t?t.replace(/\/$/,"")+e:e}function n$(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 rl(t,e={},r){let{baseUrl:n=Qc,path:o=Td,model:s=dn,provider:i=r$(s)||el,temperature:a=Dd,maxTokens:c=Ld,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 g={messages:t,provider:i,model:s,temperature:a,maxTokens:c};l&&(g.effort=l),f&&(g.apiKeys=f);let h=await fetch(v1(n,o),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(g),signal:u});if(!h.ok){let _=h.statusText;try{let k=await h.text();try{let E=JSON.parse(k);_=E.error||E.detail||_}catch{_=k||_}}catch{}let S=new Error(`simone: HTTP ${h.status} \u2014 ${_}`);throw S.status=h.status,S}if(!h.body||typeof h.body.getReader!="function"){let _=await h.text();return r&&r(_),{text:_,errors:[]}}let p=h.body.getReader(),m=new TextDecoder,y=[],w=[],b="";try{for(;;){let{done:_,value:S}=await p.read();if(_)break;b+=m.decode(S,{stream:!0});let k=b.indexOf(`
|
|
100
|
+
`);for(;k!==-1;){let E=b.slice(0,k).trim();if(b=b.slice(k+1),E){let T=n$(E);if(T?.done)return{text:y.join(""),errors:w};let I=T?.chunk;I?.delta&&(y.push(I.delta),r&&r(I.delta)),I?.error&&w.push(I.error)}k=b.indexOf(`
|
|
101
|
+
`)}}return{text:y.join(""),errors:w}}finally{p.cancel().catch(()=>{})}}function C1(t,e={},r){return rl(t,{...e,path:Od},r)}function E1(t,e={},r){return rl(t,{...e,path:Rd},r)}async function A1(t={}){let{baseUrl:e=Qc,signal:r,headers:n}=t,o=await fetch(v1(e,Pd),{method:"GET",headers:n,signal:r});if(!o.ok)throw new Error(`simone health: HTTP ${o.status}`);return o.json()}function T1({system:t,history:e=[],user:r,context:n}){let o=[];t&&o.push({role:"system",content:t});for(let s of e)!s||!s.role||typeof s.content!="string"||!s.content||o.push({role:s.role,content:s.content});if(r){let s=r;if(n!=null){let i=typeof n=="string"?n:JSON.stringify(n,null,2);s=`${s}
|
|
99
102
|
|
|
100
103
|
---
|
|
101
104
|
Context:
|
|
102
105
|
\`\`\`json
|
|
103
106
|
${i}
|
|
104
|
-
\`\`\``}o.push({role:"user",content:s})}return o}var
|
|
105
|
-
`),Q_={Starter:un,Free:un,Pro:"claude-opus-4-6"};function y1(t){return t?Q_[t]||t:un}var b1={"@symbo.ls/signal":Op,"@symbo.ls/scratch":gy,"@symbo.ls/element":vb,"@symbo.ls/css":Ey,"@symbo.ls/utils":Ko,"@symbo.ls/state":sb,"@symbo.ls/router":Rc,"@symbo.ls/polyglot":C_,"@symbo.ls/helmet":k_,"@symbo.ls/fetch":mf,"@symbo.ls/capsize":A_,"@symbo.ls/shorthand":I_,"@symbo.ls/analyze":q_,"@symbo.ls/inspect":Y_,"@symbo.ls/channels":Z_,"@symbo-ls/simone-server":tx},_1=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:{}),n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o in b1)n[o]||(n[o]=b1[o]);if(e)for(let o in e)n[o]||(n[o]=e[o]);return n},x1=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:null);if(!r||!e||typeof e!="object")return null;let n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o in e){let s=e[o];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(n,o))continue;let i=a=>(Object.defineProperty(n,o,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return n},w1=["@symbo.ls/sdk"],S1=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!t||typeof t!="object")return null;let n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o in t){let s=t[o];!s||typeof s!="object"&&typeof s!="function"||n[o]||(n[o]=s)}return n},AI=/^@symbo[-.]ls\//,TI=t=>t.includes("/")?t.slice(t.indexOf("/")+1):t,k1=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!Array.isArray(t))return null;let n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o of t){let s=o&&o.library?o.library:o;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&&!AI.test(c))continue;let l=TI(c);l&&!a.includes(l)&&a.push(l)}for(let c of a)for(let l of[`@symbo-ls/${c}`,`@symbo.ls/${c}`])n[l]||(n[l]=s)}return n};L();var v1=t=>{let e={faces:0,links:0};if(!t)return e;for(let r in t){let n=t[r];if(!n||!n.fontFace)continue;let o=Array.isArray(n.fontFace)?n.fontFace:[n.fontFace];for(let s of o){if(C1(s)){let i=RI(s);i&&PI(i)&&e.links++;continue}if(OI(s)){wt(s.trim()),e.faces++;continue}typeof s=="string"&&s.includes("font-family")&&(wt(`@font-face { ${s} }`),e.faces++)}}return e},C1=t=>typeof t=="string"&&t.trim().startsWith("@import"),OI=t=>typeof t=="string"&&t.trim().startsWith("@font-face"),RI=t=>{if(!C1(t))return null;let e=String(t).match(/url\(\s*['"]?([^'")]+)['"]?\s*\)/);return e?e[1].trim():null},PI=(t,e)=>{if(typeof t!="string"||!t)return null;let r=e||Jn();if(!r||!r.head)return null;let n="data-smbls-font",o=r.head.querySelectorAll(`link[rel="stylesheet"][${n}]`);for(let i=0;i<o.length;i++)if(o[i].getAttribute(n)===t)return o[i];let s=r.createElement("link");return s.setAttribute("rel","stylesheet"),s.setAttribute("href",t),s.setAttribute(n,t),r.head.appendChild(s),s};var O1=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 n=t.window;return n&&n!==e&&typeof n.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=n||e,t.window},E1=(t="smbls")=>{let e={};for(let r in oo)Object.prototype.hasOwnProperty.call(oo,r)&&(Ze(r)?e[`smbls.${r}`]=oo[r]:e[r]=oo[r]);return e},R1=t=>t.components?{...E1(),...t.components}:E1(),P1=t=>({...Dc,...Rc,...qr,...t.utils,...t.snippets,...t.functions}),D1=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var L1=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,DI=3e3,LI=(t,e,r=n=>import(n))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let n=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(n[t])return Promise.resolve(n[t]);let o=Promise.resolve().then(()=>r(e)).then(i=>(i&&!n[t]&&(n[t]=i),n[t]||null)).catch(()=>null);return new Promise(i=>{let a=setTimeout(()=>i(null),DI);o.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},A1={},ox=async({dependencies:t,dependenciesOnDemand:e,document:r,preventCaching:n=!1,cdnProvider:o,packageManager:s,symbolsConfig:i,registerDependency:a=LI})=>{if(o||(o=Ur[s]||Uo(i)||"esmsh"),!t)return null;if(!Ln(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=jr()&&n?`?${Math.random()}`:"",f=async(d,g)=>{let p=Me(d,g,o)+l;try{await Promise.race([zo(p,{document:r,type:"module"}),new Promise((h,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,p)}catch(h){if(console.error(`Failed to load ${d} from ${o}:`,h),o!=="symbols")try{let m=Me(d,g,"symbols")+l;await Promise.race([zo(m,{document:r,type:"module"}),new Promise((y,x)=>setTimeout(()=>x(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 g=t[d];if(!(e&&e[d])&&!A1[d]&&(A1[d]=!0,!zr(d))){if(Dn(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}L1(d)||u.push(f(d,g))}}return u.length&&await Promise.allSettled(u),t},T1=/\[smbls\] runtime dependency "([^"]+)" is not registered on globalThis\.__SMBLS_PKGS__/g,II=t=>{if(typeof t=="string")return t;if(typeof t=="function")try{return typeof Le=="function"?Le(t):Function.prototype.toString.call(t)}catch{return""}return""},$I=t=>{let e=new Set;if(!t)return e;let r=[t.globalScope,t.functions,t.methods,t.snippets];for(let n=0;n<r.length;n++){let o=r[n];if(!o||typeof o!="object")continue;let s=Object.keys(o);for(let i=0;i<s.length;i++){let a;try{a=o[s[i]]}catch{continue}let c=II(a);if(!c||c.indexOf("__SMBLS_PKGS__")===-1)continue;T1.lastIndex=0;let l;for(;(l=T1.exec(c))!==null;)e.add(l[1])}}return e},MI=t=>{let e=new Set;if(!t||typeof t.querySelectorAll!="function")return e;let r;try{r=t.querySelectorAll('script[type="importmap"]')}catch{return e}for(let n=0;n<r.length;n++){let o;try{o=JSON.parse(r[n].textContent||"")}catch{continue}let s=o&&typeof o=="object"?o.imports:null;if(s&&typeof s=="object"){let i=Object.keys(s);for(let a=0;a<i.length;a++)e.add(i[a])}}return e},FI=(t,e)=>{if(!e||!e.size)return!1;if(e.has(t))return!0;for(let r of e)if(r.length>1&&r.endsWith("/")&&t.length>r.length&&t.startsWith(r))return!0;return!1},I1=(t,{syncRead:e=$I(t),runtimeDocument:r=typeof document<"u"?document:null,importMap:n=MI(r)}={})=>{let o=t&&t.dependencies;if(!Ln(o))return null;let s=!t.document||t.document===r,i=t.dependenciesOnDemand,a=null,c=null;for(let l in o)s&&!(i&&i[l])&&!e.has(l)&&FI(l,n)?(c||(c={}))[l]=o[l]:(a||(a={}))[l]=o[l];return{blocking:a,deferred:c}},NI=t=>import(t),ex={},jI=(t,e)=>{if(!e||typeof globalThis>"u")return;let r=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});r[t]||(r[t]=e)},BI=(t,{importModule:e=NI}={})=>{let r=[];if(!t)return Promise.resolve([]);for(let n in t)zr(n)||Dn(n)||L1(n)||(ex[n]||(ex[n]=Promise.resolve().then(()=>e(n)).then(o=>(jI(n,o),o||null),()=>null)),r.push(ex[n]));return Promise.all(r)},VI=2e3,UI=3e3,$1=(t,{win:e=typeof window<"u"?window:null,importModule:r,loadTimeoutMs:n=UI}={})=>t?new Promise(o=>{let s=()=>{BI(t,{importModule:r}).then(o,o)},i=()=>{e&&typeof e.requestIdleCallback=="function"?e.requestIdleCallback(s,{timeout:VI}):setTimeout(s,0)},a=e&&e.document;if(a&&a.readyState&&a.readyState!=="complete"&&typeof e.addEventListener=="function"){let c=!0,l=null,f=()=>{c&&(c=!1,clearTimeout(l),typeof e.removeEventListener=="function"&&e.removeEventListener("load",f),i())};e.addEventListener("load",f,{once:!0}),l=setTimeout(f,n)}else i()}):null,M1=async(t,e)=>{let r=e.window||window,n=e.cdnProvider||Uo(e.symbolsConfig)||"esmsh",o=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=n)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&zr(a))return await u.require(a,c);if(!u.packages[a]){let d=jr()?`?${Math.random()}`:"";if(l&&l[a]){let g=l[a],p=Me(a,g,c)+d;try{await i.utils.loadRemoteScript(p,{window:u,document:f})}catch(h){if(console.error(`Failed to load ${a} from ${c}:`,h),c!=="symbols"){let m=Me(a,g,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let g=Me(a,"latest",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 h=Me(a,"latest","symbols")+d;await i.utils.loadRemoteScript(h,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};r.packages?r.packages=_t(r.packages,t):r.packages=t,r.require||(e.utils.require=await o(e),r.require=e.utils.require),r.requireOnDemand||(e.utils.requireOnDemand=await s(e),r.requireOnDemand=e.utils.requireOnDemand)},zI=/\s+/g,F1=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,HI=(t,e)=>{let r="";for(let n in t){let o=t[n];typeof o=="boolean"&&o?r+=` ${n}`:typeof o=="string"?r+=` ${o}`:typeof o=="function"&&(r+=` ${F1(o,e)}`)}return r},WI=(t,e,r)=>{if(!t)return;let{key:n}=e;t===!0&&(t=e.classlist={key:n}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=HI(t,e));let o=t.replace(zI," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",o);else if(r)try{r.className=o}catch{}return o},qI=()=>(t,e,r)=>{let n=F1(t,e);if(t){let{__ref:o}=e;o.__class.style=n}N1()(e.classlist,e,e.state,!0)},N1=()=>(t,e,r,n)=>{if(e.style&&!n)return;let{__ref:o}=e,{__class:s,__classNames:i}=o;if(!(t===null||typeof t!="object"||Array.isArray(t))){e.class&&(i.classProps=e.class),e.attr?.class&&(i.class=e.attr.class);for(let a in s){let c=s[a];if(!c){delete i[a];continue}let l;typeof c=="string"||typeof c=="number"?l=c:typeof c=="boolean"?l=e.key:l=de(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&WI(i,e,e.node)}},KI=()=>({style:qI(),classlist:N1()}),GI=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],rx=new WeakSet,nx=!1,YI=t=>!!t&&typeof t=="object",j1=(t,e)=>{let r=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,n=e.initOptions||{},o=e.registry||KI(),s=e.designSystem?it(ft(e.designSystem),ft(Tc),le):ft(Tc),i={};for(let h of GI)e[h]!==void 0&&(i[h]=e[h]);let a,c=YI(r),f=c&&rx.has(r)&&!e.skipDesignSystemInit,u=!f&&!nx,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=A(t)||A(),a&&(a.__domDocument=r),a?.CSS_VARS){at(a);try{wt({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&wt(rd(a.CSS_MEDIA_VARS,d));let h=Yn(a.cssSkinVars,a.cssSkinFallback,d);Object.keys(h).length&&wt(h)}finally{ot()}}}else if(u){let h=A();h&&(h.__domDocument=r),a=Ar(s,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...sd,...i,...n}),a&&a!==h&&(a.__domDocument=r),c&&rx.add(r),nx=!0}else{let h=$a(t,s,{cleanBase:!0});for(let m in i)h[m]=i[m];if(h.__domDocument=r,f){let m=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=m,h.varPrefix=m}at(h);try{a=Ar(h,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...sd,...i,...n})}finally{ot()}c&&rx.add(r),nx=!0}let g=a?.CONFIG||a,p=g?.font;if(p){at(g);try{v1(p)}finally{ot()}}return[a,o]},B1=(t,e)=>{let r={};e.state&&it(r,e.state),t&&t.state&&it(r,t.state);let n=e.polyglot;if(n?.translations){let o=null;try{typeof localStorage<"u"&&(o=localStorage.getItem(n.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=o||r.lang||n.defaultLang||"en";o&&o!==r.lang&&(r.lang=o);let i=new Set,a=new Set,c=(u,d)=>{if(!a.has(u)){if(!On(e,u,r)){i.add(u);return}r[u]=d,a.add(u),Je(e,u,d)}},l=n.translations[s];if(l&&typeof l=="object")for(let u in l)c(u,l[u]);let f=new Set(n.languages||[]);for(let u in n.translations)f.has(u)||c(u,n.translations[u]);i.size&&n.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)},V1=(t,e)=>{v(t.routes)&&v(e.pages)&&_t(t.routes,e.pages);let r=t.routes||e.pages||{},n=[];for(let o in r){if(o.charCodeAt(0)===47)continue;let i="/"+(o==="index"?"":o);Object.prototype.hasOwnProperty.call(r,i)?n.push(`${o} -> ${i}`):r[i]=r[o],delete r[o]}return n.length&&e&&e.verbose!==!1&&console.warn(`[smbls] preparePages kept ${n.length} explicitly declared route${n.length===1?"":"s"} over a same-named page key (${n.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},U1=t=>{wa(t,t.sharedLibraries)};var Qc={polyglot:Fc,getLocalStateLang:Vc,getActiveLang:cn,getLang:cn,setLang:jc,getLanguages:Mc,loadTranslations:Nc,upsertTranslation:Bc};ra();var He=Object.create(null);He.open="0";He.close="1";He.ping="2";He.pong="3";He.message="4";He.upgrade="5";He.noop="6";var tl=Object.create(null);Object.keys(He).forEach(t=>{tl[He[t]]=t});var el={type:"error",data:"parser error"};var W1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",q1=typeof ArrayBuffer=="function",K1=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,rl=({type:t,data:e},r,n)=>W1&&e instanceof Blob?r?n(e):z1(e,n):q1&&(e instanceof ArrayBuffer||K1(e))?r?n(e):z1(new Blob([e]),n):n(He[t]+(e||"")),z1=(t,e)=>{let r=new FileReader;return r.onload=function(){let n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function H1(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var sx;function G1(t,e){if(W1&&t.data instanceof Blob)return t.data.arrayBuffer().then(H1).then(e);if(q1&&(t.data instanceof ArrayBuffer||K1(t.data)))return e(H1(t.data));rl(t,!1,r=>{sx||(sx=new TextEncoder),e(sx.encode(r))})}var Y1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",nl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Y1.length;t++)nl[Y1.charCodeAt(t)]=t;var X1=t=>{let e=t.length*.75,r=t.length,n,o=0,s,i,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let l=new ArrayBuffer(e),f=new Uint8Array(l);for(n=0;n<r;n+=4)s=nl[t.charCodeAt(n)],i=nl[t.charCodeAt(n+1)],a=nl[t.charCodeAt(n+2)],c=nl[t.charCodeAt(n+3)],f[o++]=s<<2|i>>4,f[o++]=(i&15)<<4|a>>2,f[o++]=(a&3)<<6|c&63;return l};var XI=typeof ArrayBuffer=="function",ol=(t,e)=>{if(typeof t!="string")return{type:"message",data:Z1(t,e)};let r=t.charAt(0);return r==="b"?{type:"message",data:ZI(t.substring(1),e)}:tl[r]?t.length>1?{type:tl[r],data:t.substring(1)}:{type:tl[r]}:el},ZI=(t,e)=>{if(XI){let r=X1(t);return Z1(r,e)}else return{base64:!0,data:t}},Z1=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var J1="",Q1=(t,e)=>{let r=t.length,n=new Array(r),o=0;t.forEach((s,i)=>{rl(s,!1,a=>{n[i]=a,++o===r&&e(n.join(J1))})})},tA=(t,e)=>{let r=t.split(J1),n=[];for(let o=0;o<r.length;o++){let s=ol(r[o],e);if(n.push(s),s.type==="error")break}return n};function eA(){return new TransformStream({transform(t,e){G1(t,r=>{let n=r.length,o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);let s=new DataView(o.buffer);s.setUint8(0,126),s.setUint16(1,n)}else{o=new Uint8Array(9);let s=new DataView(o.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(r)})}})}var ix;function Od(t){return t.reduce((e,r)=>e+r.length,0)}function Rd(t,e){if(t[0].length===e)return t.shift();let r=new Uint8Array(e),n=0;for(let o=0;o<e;o++)r[o]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function rA(t,e){ix||(ix=new TextDecoder);let r=[],n=0,o=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(n===0){if(Od(r)<1)break;let c=Rd(r,1);s=(c[0]&128)===128,o=c[0]&127,o<126?n=3:o===126?n=1:n=2}else if(n===1){if(Od(r)<2)break;let c=Rd(r,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(Od(r)<8)break;let c=Rd(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(el);break}o=f*Math.pow(2,32)+l.getUint32(4),n=3}else{if(Od(r)<o)break;let c=Rd(r,o);a.enqueue(ol(s?c:ix.decode(c),e)),n=0}if(o===0||o>t){a.enqueue(el);break}}}})}var ax=4;function gt(t){if(t)return JI(t)}function JI(t){for(var e in gt.prototype)t[e]=gt.prototype[e];return t}gt.prototype.on=gt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};gt.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};gt.prototype.off=gt.prototype.removeListener=gt.prototype.removeAllListeners=gt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,o=0;o<r.length;o++)if(n=r[o],n===e||n.fn===e){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+t],this};gt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].apply(this,e)}return this};gt.prototype.emitReserved=gt.prototype.emit;gt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};gt.prototype.hasListeners=function(t){return!!this.listeners(t).length};var Or=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),Kt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),nA="arraybuffer";function Pd(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}var QI=Kt.setTimeout,t$=Kt.clearTimeout;function Rr(t,e){e.useNativeTimers?(t.setTimeoutFn=QI.bind(Kt),t.clearTimeoutFn=t$.bind(Kt)):(t.setTimeoutFn=Kt.setTimeout.bind(Kt),t.clearTimeoutFn=Kt.clearTimeout.bind(Kt))}var e$=1.33;function oA(t){return typeof t=="string"?r$(t):Math.ceil((t.byteLength||t.size)*e$)}function r$(t){let e=0,r=0;for(let n=0,o=t.length;n<o;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function Dd(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function sA(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function iA(t){let e={},r=t.split("&");for(let n=0,o=r.length;n<o;n++){let s=r[n].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var Ld=class extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}},Pr=class extends gt{constructor(e){super(),this.writable=!1,Rr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,n){return super.emitReserved("error",new Ld(e,r,n)),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=ol(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=sA(e);return r.length?"?"+r:""}};var sl=class extends Pr{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 n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};tA(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,Q1(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]=Dd()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}};var aA=!1;try{aA=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var cA=aA;function n$(){}var cx=class extends sl{constructor(e){if(super(e),typeof location<"u"){let r=location.protocol==="https:",n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,r){let n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(o,s)=>{this.onError("xhr post error",o,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}},dn=class t extends gt{constructor(e,r,n){super(),this.createRequest=e,Rr(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;let r=Pd(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;let n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var o;n.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=n$,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()}};dn.requestsCount=0;dn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",lA);else if(typeof addEventListener=="function"){let t="onpagehide"in Kt?"pagehide":"unload";addEventListener(t,lA,!1)}}function lA(){for(let t in dn.requests)dn.requests.hasOwnProperty(t)&&dn.requests[t].abort()}var o$=(function(){let t=fA({xdomain:!1});return t&&t.responseType!==null})(),pn=class extends cx{constructor(e){super(e);let r=e&&e.forceBase64;this.supportsBinary=o$&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new dn(fA,this.uri(),e)}};function fA(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||cA))return new XMLHttpRequest}catch{}if(!e)try{return new Kt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var uA=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",fx=class extends Pr{get name(){return"websocket"}doOpen(){let e=this.uri(),r=this.opts.protocols,n=uA?{}:Pd(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,n)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){let n=e[r],o=r===e.length-1;rl(n,this.supportsBinary,s=>{try{this.doWrite(n,s)}catch{}o&&Or(()=>{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]=Dd()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}},lx=Kt.WebSocket||Kt.MozWebSocket,hn=class extends fx{createSocket(e,r,n){return uA?new lx(e,r,n):r?new lx(e,r):new lx(e)}doWrite(e,r){this.ws.send(r)}};var Hs=class extends Pr{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=rA(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),o=eA();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();let s=()=>{n.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 n=e[r],o=r===e.length-1;this._writer.write(n).then(()=>{o&&Or(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var ux={websocket:hn,webtransport:Hs,polling:pn};var s$=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,i$=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ws(t){if(t.length>8e3)throw"URI too long";let e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let o=s$.exec(t||""),s={},i=14;for(;i--;)s[i$[i]]=o[i]||"";return r!=-1&&n!=-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=a$(s,s.path),s.queryKey=c$(s,s.query),s}function a$(t,e){let r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function c$(t,e){let r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,s){o&&(r[o]=s)}),r}var dx=typeof addEventListener=="function"&&typeof removeEventListener=="function",Id=[];dx&&addEventListener("offline",()=>{Id.forEach(t=>t())},!1);var po=class t extends gt{constructor(e,r){if(super(),this.binaryType=nA,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 n=Ws(e);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=Ws(r.host).host);Rr(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(n=>{let o=n.prototype.name;this.transports.push(o),this._transportsByName[o]=n}),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=iA(this.opts.query)),dx&&(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"})},Id.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let r=Object.assign({},this.opts.query);r.EIO=ax,r.transport=e,this.id&&(r.sid=this.id);let n=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](n)}_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 n=0;n<this.writeBuffer.length;n++){let o=this.writeBuffer[n].data;if(o&&(r+=oA(o)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Or(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,n){return this._sendPacket("message",e,r,n),this}send(e,r,n){return this._sendPacket("message",e,r,n),this}_sendPacket(e,r,n,o){if(typeof r=="function"&&(o=r,r=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;let s={type:e,data:r,options:n};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),o&&this.once("flush",o),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{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?n():e()}):this.upgrading?n():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(),dx&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let n=Id.indexOf(this._offlineEventListener);n!==-1&&Id.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}};po.protocol=ax;var $d=class extends po{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),n=!1;po.priorWebsocketSuccess=!1;let o=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",u=>{if(!n)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;po.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||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(){n||(n=!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",o),r.removeListener("error",i),r.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};r.once("open",o),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(()=>{n||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let r=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}},qs=class extends $d{constructor(e,r={}){let n=typeof e=="object"?e:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(o=>ux[o]).filter(o=>!!o)),super(e,n)}};var Dz=qs.protocol;function dA(t,e="",r){let n=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),n=Ws(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";let s=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+s+":"+n.port+e,n.href=n.protocol+"://"+s+(r&&r.port===n.port?"":":"+n.port),n}var _x={};M(_x,{Decoder:()=>yx,Encoder:()=>mx,PacketType:()=>W,isPacketValid:()=>O$,protocol:()=>kA});var f$=typeof ArrayBuffer=="function",u$=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,pA=Object.prototype.toString,d$=typeof Blob=="function"||typeof Blob<"u"&&pA.call(Blob)==="[object BlobConstructor]",p$=typeof File=="function"||typeof File<"u"&&pA.call(File)==="[object FileConstructor]";function al(t){return f$&&(t instanceof ArrayBuffer||u$(t))||d$&&t instanceof Blob||p$&&t instanceof File}function il(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(il(t[r]))return!0;return!1}if(al(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return il(t.toJSON(),!0);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&il(t[r]))return!0;return!1}function hA(t){let e=[],r=t.data,n=t;return n.data=px(r,e),n.attachments=e.length,{packet:n,buffers:e}}function px(t,e){if(!t)return t;if(al(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 n=0;n<t.length;n++)r[n]=px(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){let r={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=px(t[n],e));return r}return t}function gA(t,e){return t.data=hx(t.data,e),delete t.attachments,t}function hx(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]=hx(t[r],e);else if(typeof t=="object")for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=hx(t[r],e));return t}var wA=_T(xA(),1),gx=(0,wA.default)("socket.io-parser"),SA=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],kA=5,W;(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"})(W||(W={}));var mx=class{constructor(e){this.replacer=e}encode(e){return gx("encoding packet %j",e),(e.type===W.EVENT||e.type===W.ACK)&&il(e)?this.encodeAsBinary({type:e.type===W.EVENT?W.BINARY_EVENT:W.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===W.BINARY_EVENT||e.type===W.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)),gx("encoded %j as %s",e,r),r}encodeAsBinary(e){let r=hA(e),n=this.encodeAsString(r.packet),o=r.buffers;return o.unshift(n),o}},yx=class t extends gt{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);let n=r.type===W.BINARY_EVENT;n||r.type===W.BINARY_ACK?(r.type=n?W.EVENT:W.ACK,this.reconstructor=new bx(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(al(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,n={type:Number(e.charAt(0))};if(W[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===W.BINARY_EVENT||n.type===W.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(!vA(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");n.attachments=a}if(e.charAt(r+1)==="/"){let s=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(s,r)}else n.nsp="/";let o=e.charAt(r+1);if(o!==""&&Number(o)==o){let s=r+1;for(;++r;){let i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}n.id=Number(e.substring(s,r+1))}if(e.charAt(++r)){let s=this.tryParse(e.substr(r));if(t.isPayloadValid(n.type,s))n.data=s;else throw new Error("invalid payload")}return gx("decoded %s as %j",e,n),n}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case W.CONNECT:return Nd(r);case W.DISCONNECT:return r===void 0;case W.CONNECT_ERROR:return typeof r=="string"||Nd(r);case W.EVENT:case W.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&SA.indexOf(r[0])===-1);case W.ACK:case W.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},bx=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=gA(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function E$(t){return typeof t=="string"}var vA=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function A$(t){return t===void 0||vA(t)}function Nd(t){return Object.prototype.toString.call(t)==="[object Object]"}function T$(t,e){switch(t){case W.CONNECT:return e===void 0||Nd(e);case W.DISCONNECT:return e===void 0;case W.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&SA.indexOf(e[0])===-1);case W.ACK:return Array.isArray(e);case W.CONNECT_ERROR:return typeof e=="string"||Nd(e);default:return!1}}function O$(t){return E$(t.nsp)&&A$(t.id)&&T$(t.type,t.data)}function ge(t,e,r){return t.on(e,r),function(){t.off(e,r)}}var R$=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Xs=class extends gt{constructor(e,r,n){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,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[ge(e,"open",this.onopen.bind(this)),ge(e,"packet",this.onpacket.bind(this)),ge(e,"error",this.onerror.bind(this)),ge(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 n,o,s;if(R$.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:W.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=(o=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||o===void 0?void 0:o.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,r){var n;let o=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(o===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"))},o),i=(...a)=>{this.io.clearTimeoutFn(s),r.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((n,o)=>{let s=(i,a)=>i?o(i):n(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 n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...s)=>(this._queue[0],o!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(o)):(this._queue.shift(),r&&r(null,...s)),n.pending=!1,this._drainQueue())),this._queue.push(n),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:W.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(n=>String(n.id)===e)){let n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case W.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 W.EVENT:case W.BINARY_EVENT:this.onevent(e);break;case W.ACK:case W.BINARY_ACK:this.onack(e);break;case W.DISCONNECT:this.ondisconnect();break;case W.CONNECT_ERROR:this.destroy();let n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);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 n of r)n.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,n=!1;return function(...o){n||(n=!0,r.packet({type:W.ACK,id:e,data:o}))}}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:W.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 n=0;n<r.length;n++)if(e===r[n])return r.splice(n,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 n=0;n<r.length;n++)if(e===r[n])return r.splice(n,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 n of r)n.apply(this,e.data)}}};function go(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}go.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};go.prototype.reset=function(){this.attempts=0};go.prototype.setMin=function(t){this.ms=t};go.prototype.setMax=function(t){this.max=t};go.prototype.setJitter=function(t){this.jitter=t};var Zs=class extends gt{constructor(e,r){var n;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,Rr(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((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new go({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;let o=r.parser||_x;this.encoder=new o.Encoder,this.decoder=new o.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 qs(this.uri,this.opts);let r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;let o=ge(r,"open",function(){n.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=ge(r,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{o(),s(new Error("timeout")),r.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(ge(e,"ping",this.onping.bind(this)),ge(e,"data",this.ondata.bind(this)),ge(e,"error",this.onerror.bind(this)),ge(e,"close",this.onclose.bind(this)),ge(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){Or(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Xs(this,e,r),this.nsps[e]=n),n}_destroy(e){let r=Object.keys(this.nsps);for(let n of r)if(this.nsps[n].active)return;this._close()}_packet(e){let r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],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 n;this.cleanup(),(n=this.engine)===null||n===void 0||n.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 n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var cl={};function Js(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let r=dA(t,e.path||"/socket.io"),n=r.source,o=r.id,s=r.path,i=cl[o]&&s in cl[o].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new Zs(n,e):(cl[o]||(cl[o]=new Zs(n,e)),c=cl[o]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(Js,{Manager:Zs,Socket:Xs,io:Js,connect:Js});L();L();var jd=new Set(["__proto__","constructor","prototype"]),xx=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(jd.has(t[e]))return!1;return!0},CA=(t,e)=>{!t||!xx(e)||e.reduce((r,n,o,s)=>{if(r&&n in r){if(o!==s.length-1)return r[n];delete r[n]}},t)},EA=(t,e,r,n=!1)=>{!t||!xx(e)||e.reduce((o,s,i,a)=>{if(o){if(i!==a.length-1)return!o[s]&&n&&(o[s]={}),o[s];o[s]=r}},t)},Bd=(t,e)=>{let r=new Set;if(!Array.isArray(e))return r;for(let[n,o,s]of e)if(!(!Array.isArray(o)||!o.length))switch(r.add(o[0]),n){case"delete":CA(t,o);break;case"update":case"set":EA(t,o,s,!0);break;default:break}return r},AA=(t,e)=>{if(!e||typeof e!="object"||Array.isArray(e))return null;let r=t&&(t.__raw||t)||{},n=null;for(let o of Object.keys(e))jd.has(o)||Object.prototype.hasOwnProperty.call(r,o)||(n||(n={}),n[o]=e[o]);return n},ll=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},TA=(t,e,r,n="designSystem")=>{for(let o in e){if(jd.has(o))continue;let s=`${n}/${o}`;if(r.has(s))continue;let i=e[o],a=t[o];if(i&&typeof i=="object"&&!Array.isArray(i)){if(!a||typeof a!="object"||Array.isArray(a)){if(o in t)continue;t[o]={}}TA(t[o],i,r,s)}else o in t||(t[o]=Array.isArray(i)?JSON.parse(JSON.stringify(i)):i)}},wx=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let o={designSystem:t.__rawDesignSystem};Bd(o,e)}let r=JSON.parse(JSON.stringify(t.__rawDesignSystem)),n=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];return Sa(r,n,TA)};L();var OA=(t,e,r)=>{let n=!1;return(o={})=>{let{data:s}=o,{schema:i}=o;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(r[a]&&typeof r[a]=="object")if(a==="designSystem"){if(ll(r,c),n){let l=wx(r);l&&Ar(l)}}else En(r[a],c);else r[a]=c}),n=!0,i&&(r.schema=i))}},RA=(t,e,r)=>(n={})=>{let{changes:o}=n;if(!o||!Array.isArray(o)||!o.length)return;o=t.call("deepDestringifyFunctions",o,Array.isArray(o)?[]:{});let s=o.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?o.filter(c=>!s.includes(c)):o,a=Bd(r,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=wx(r,s);c?Ar(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")){let c=AA(e,r.state);if(c){let l=typeof e.$update=="function"?e.$update:e.update;typeof l=="function"&&l.call(e,c)}}if(["pages","components","snippets","functions","assets"].some(c=>a.has(c))){let{pathname:c,search:l,hash:f}=r.window.location;t.call("router",c+l+f,t.__ref.root,{},{scrollToTop:!1,force:!0})}};var P$={success:"green",error:"red",warning:"yellow"},PA=(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 n=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(n)},3e3)}}else if(r.connected){r.notifications.connected={title:"Disconnected",type:"error"},r.update({connected:!1});let n=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(n)},3e3)}},DA={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:P$[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,r,n)=>{r.update({animation:"fadeInUp"})},onClick:(e,r,n)=>{delete n.notifications[r.key],r.update({animation:"fadeOutDown"}),n.onClose&&n.onClose(e,r,n)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var D$=!1,L$=()=>D$?"http://localhost:8080":"https://api.symbols.app",I$=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}},$$=async t=>{try{let e=t||L$(),r=await C.fetch(`${e}/service-token`,{method:"GET"}),n;try{let o=await r.clone().json();if(o&&typeof o.token=="string")return o.token.trim();n=await r.text()}catch{n=await r.text()}return(n||"").replace(/\s+/gu,"")||void 0}catch(e){console.error("[sync] Failed to fetch service-token",e)}},$A=(t,e,r,n)=>{t.on("snapshot",OA(e,r,n)),t.on("ops",RA(e,r,n)),t.on("clients",o=>{n.editor?.verbose&&PA(o,e,r)}),t.on("disconnect",o=>{n.editor?.verbose&&console.info("[sync] disconnected",o)})},M$=async(t,e,r,n)=>{let o=await $$(n);if(!o)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=Js(n,{path:"/collab-socket",transports:["websocket"],auth:{token:o,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)")}),$A(a,t,e,r),a},F$=(t,e,r)=>{let n=Js({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return n.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),$A(n,t,e,r),n.on("reload",()=>{typeof C<"u"&&C.location&&C.location.reload()}),n},N$=async(t,e,r)=>{let{mode:n,baseUrl:o}=I$(r);return n?n==="collab"?M$(t,e,r,o):n==="runner"?F$(t,e,r):null:null},j$={onInit:N$};var MA=t=>typeof t>"u",LA=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),IA=t=>t?.editor?.runtime==="runner",FA=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},NA={name:"sync",beforeCreate(t,e){let r=e&&e.editor;(r&&!MA(r.liveSync)?r.liveSync:LA(e)||IA(e))&&(LA(e)&&!IA(e)&&!e?.key||FA(t,j$))}},jA={name:"notifications",beforeCreate(t,e){if(!e)return;let r=MA(e.notifications)?null:e.notifications,n=e.editor&&e.editor.verbose===!0;(r===!0||r!==!1&&n)&&FA(t,DA)}};var vx={};M(vx,{AlertTemplate:()=>Zd,ConfirmTemplate:()=>Xd,CustomTemplate:()=>Qd,ModalLayer:()=>Yd,ModalRoot:()=>Gd,PromptTemplate:()=>Jd,windowsComponents:()=>kx});var Sx={};M(Sx,{alertDialog:()=>qd,closeAllModals:()=>Hd,closeModal:()=>Ud,confirmDialog:()=>Wd,getLayer:()=>Vd,openModal:()=>zd,promptDialog:()=>Kd,windowsFunctions:()=>Dr});function J(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function Qs(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 Vd(){return J(this)}var B$=(t,e)=>{let r=t&&t["ModalLayer_"+e],n=r?.node||r?.__ref?.node;!n||typeof n.style?.setProperty!="function"||(n.style.setProperty("display","none","important"),n.style.setProperty("opacity","0","important"),n.style.setProperty("visibility","hidden","important"),n.style.setProperty("pointer-events","none","important"))},BA=(t,e)=>{let r=t&&t["ModalLayer_"+e],n=r?.node||r?.__ref?.node;!n||typeof n.style?.removeProperty!="function"||(n.style.removeProperty("display"),n.style.removeProperty("opacity"),n.style.removeProperty("visibility"),n.style.removeProperty("pointer-events"))};function Ud(t){let e=Qs(this);if(!e)return;let r=e.state?.stack||[];if(!r.length)return;let n,o,s;if(t){if(s=[],n=r.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),n.length===r.length)return;o=r.filter(i=>i.id===t)}else n=r.slice(0,-1),o=r.slice(-1),s=[r.length-1];e.state.update({stack:n});for(let i of s)B$(e,i);for(let i of o)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function zd(t={}){let e=Qs(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)}`,n={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},o=e.state?.stack||[];if(o.length>=5)return console.warn("[windows] openModal: stack already at the 5-layer maximum, dropping the new layer. Close some modals first."),null;let s=o.length;return BA(e,s),e.state.update({stack:[...o,n]}),r}function Hd(){let t=Qs(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function Wd(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function qd(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function Kd(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var Dr={openModal:zd,closeModal:Ud,closeAllModals:Hd,confirmDialog:Wd,alertDialog:qd,promptDialog:Kd,getLayer:Vd};var V$=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),VA=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(V$),r=[];for(let n=0;n<e.length;n++){let o=e[n];(o.offsetParent!==null||o===document.activeElement)&&r.push(o)}return r},UA=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},Gd={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 Dr)a in r.functions||(r.functions[a]=Dr[a])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let n=()=>{let a=t.state?.stack||[];if(!a.length)return;let c=a.length-1,l=a[c];t.state.update({stack:a.slice(0,-1)});let f=t["ModalLayer_"+c],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},o=a=>{let c=t.state?.stack;if(c?.length){if(a.key==="Tab"){let l=UA(t);if(!l)return;let f=VA(l);if(!f.length){a.preventDefault();let p=l.querySelector?.('[role="dialog"]')||l;try{p.focus?.()}catch{}return}let u=f[0],d=f[f.length-1],g=document.activeElement;if(!l.contains(g)){a.preventDefault();try{u.focus()}catch{}return}if(a.shiftKey&&g===u){a.preventDefault();try{d.focus()}catch{}}else if(!a.shiftKey&&g===d){a.preventDefault();try{u.focus()}catch{}}return}a.key!=="Escape"||a.defaultPrevented||c[c.length-1]?.dismissOnBackdrop!==!1&&(a.preventDefault(),n())}};window.addEventListener("keydown",o),t.__escHandler=o;let s=a=>{let c=t.state?.stack||[];if(a<0||a>=c.length)return;let l=c[a];t.state.update({stack:c.filter((d,g)=>g!==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 n=UA(t);if(!n)return;let o=VA(n)[0]||n.querySelector&&n.querySelector('[role="dialog"]')||n;try{o.focus&&o.focus()}catch{}});else{let n=null;for(let o=r;o>e;o--)t.__modalOpeners[o]&&(n=n||t.__modalOpeners[o]),t.__modalOpeners[o]=null;if(n&&typeof n.focus=="function"&&n.isConnected!==!1)try{n.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 Yd={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",theme:"backdrop",transition:"opacity C defaultBezier",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}},width:t=>J(t)?.width||"H",maxWidth:t=>J(t)?.maxWidth||"90vw",flow:"y",maxHeight:t=>J(t)?.maxHeight||"100%",animation:"modalIn",animationDuration:"D",animationTimingFunction:"springBezier",onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>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 ti=(t,e,r)=>J(t)?.[e]||r,U$=t=>{let e=J(t)?.icon;return e===null||e===!1},Xd={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>ti(t,"title","Are you sure?"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{hide:t=>U$(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>ti(t,"icon","warning")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",P:{tag:"p",margin:"0",text:t=>ti(t,"message","This action cannot be undone."),color:"dim"}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>ti(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let n=J(e);if(n?.onCancel)try{n.onCancel()}catch(o){console.warn("[windows] confirm.onCancel threw:",o)}e.call("closeModal",n?.id)}},ConfirmBtn:{extends:"Button",theme:t=>ti(t,"confirmTheme","primary"),text:t=>ti(t,"confirmText","Confirm"),onClick:(t,e,r)=>{let n=J(e);if(n?.onConfirm)try{n.onConfirm()}catch(o){console.warn("[windows] confirm.onConfirm threw:",o)}e.call("closeModal",n?.id)}}}};var fl=(t,e,r)=>J(t)?.[e]||r,Zd={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>fl(t,"title","Notice"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>fl(t,"icon","info")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!fl(t,"message",""),P:{tag:"p",margin:"0",text:t=>fl(t,"message",""),color:"dim"}},ModalFooter:{flow:"x",align:"center end",flexShrink:"0",OkBtn:{extends:"Button",theme:"primary",text:t=>fl(t,"okText","OK"),onClick:(t,e,r)=>{let n=J(e);if(n?.onOk)try{n.onOk()}catch(o){console.warn("[windows] alert.onOk threw:",o)}e.call("closeModal",n?.id)}}}};var ei=(t,e,r)=>J(t)?.[e]||r,Jd={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",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 n=t.InputRow&&t.InputRow.node;n&&(n.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 n=t.InputRow&&t.InputRow.node;n&&(n.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>ei(t,"title","Enter a value"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!ei(t,"message",""),P:{tag:"p",margin:"0",text:t=>ei(t,"message",""),color:"dim"}},InputRow:{extends:"Input",flexShrink:"0",autofocus:!0,placeholder:t=>ei(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 n=J(e),o=e.parent.scope?.value||"";if(n?.onConfirm)try{n.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",n?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>ei(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let n=J(e);if(n?.onCancel)try{n.onCancel()}catch(o){console.warn("[windows] prompt.onCancel threw:",o)}e.call("closeModal",n?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>ei(t,"confirmText","OK"),onClick:(t,e,r)=>{let n=J(e),o=e.parent.parent.scope?.value||"";if(n?.onConfirm)try{n.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",n?.id)}}}};var Qd={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",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",flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",onInit:t=>{let e=Y(()=>{let r=J(t),n=r?.content||null,o=r?.id||null;if(!n){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(n);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in Dr)i in s.functions||(s.functions[i]=Dr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var zA={extends:"Button",theme:"tertiary"};var kx={ModalRoot:Gd,ModalLayer:Yd,ConfirmTemplate:Xd,AlertTemplate:Zd,PromptTemplate:Jd,CustomTemplate:Qd,"smbls.CancelButton":zA};var Rx={};M(Rx,{Dropdown:()=>sp,DropdownList:()=>ip,DropdownParent:()=>ap,DropdownParentFocus:()=>cp,DropdownRoot:()=>np,DropdownSiblingFocus:()=>lp,DropdownTrigger:()=>op,dropdownComponents:()=>Ox});var HA=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),z$=(t,e,r,n)=>{let o=HA(t,r,n),s=i=>o[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":o.bottom>=o.top?"bottom":"top"},H$=(t,e,r,n,o)=>{let s=HA(e,n,o),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&&s[a]>s[t]?a:t};var Cx=(t,e,r)=>{let n;return t==="bottom"?n=r-e.bottom-16:t==="top"?n=e.top-16:n=r-16,Math.max(40,Math.floor(n))},tp=(t,e,r)=>Math.max(e,Math.min(r,t)),Lr=(t,e,r="auto")=>{if(!t){let p=typeof window<"u"?window.innerHeight:768;return{left:0,top:0,side:"bottom",align:"start",maxHeight:Cx("center",null,p)}}let n=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s={width:Math.max(120,e?.width||0),height:Math.max(40,e?.height||0)};if(r==="center"){let p=Cx("center",t,o),h=Math.min(s.height,p),m=tp((n-s.width)/2,8,Math.max(8,n-s.width-8)),y=tp((o-h)/2,8,Math.max(8,o-h-8));return{left:m,top:y,side:"center",align:"center",maxHeight:p}}let i,a;if(r==="auto")i=z$(t,s,n,o),a="start";else{let p=r.split("-");i=p[0],a=p[1]||"start",i=H$(i,t,s,n,o)}let c=Cx(i,t,o),l=Math.min(s.height,c),f,u;i==="bottom"||i==="top"?(a==="start"?f=t.left:a==="end"?f=t.right-s.width:f=t.left+(t.width-s.width)/2,u=i==="bottom"?t.bottom+8:t.top-l-8):(a==="start"?u=t.top:a==="end"?u=t.bottom-l:u=t.top+(t.height-l)/2,f=i==="right"?t.right+8:t.left-s.width-8);let d=Math.max(8,n-s.width-8),g=Math.max(8,o-l-8);return f=tp(f,8,d),u=tp(u,8,g),{left:f,top:u,side:i,align:a,maxHeight:c}},ri=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 gn={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:null},W$=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}},Ex=t=>t?.getRoot?.()?.DropdownRoot||null,q$=0,K$=()=>`dropdown_${++q$}_${Date.now().toString(36)}`;function ep(t={}){let e=Ex(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,n=t.anchorRect||W$(r);if(!n)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let o=t.id||K$(),s=t.restoreEl?.node||t.restoreEl||r||(typeof document<"u"?document.activeElement:null),i={id:o,content:t.content||null,anchor:n,placement:t.placement||gn.placement,trigger:t.trigger||gn.trigger,offset:t.offset??gn.offset,minWidth:t.minWidth||gn.minWidth,maxWidth:t.maxWidth||gn.maxWidth,maxHeight:t.maxHeight||gn.maxHeight,theme:t.theme||null,shadow:t.shadow||null,background:t.background||null,round:t.round||null,role:t.role||null,ariaLabel:t.ariaLabel||null,ariaLabelledby:t.ariaLabelledby||null,focusIn:!!t.focusIn,onOpen:t.onOpen,onClose:t.onClose,restoreEl:s},a=e.state?.layer;if(a?.onClose)try{a.onClose(a)}catch(c){console.warn("[dropdown] prev onClose threw:",c)}if(e.state.update({layer:i}),typeof i.onOpen=="function")try{i.onOpen(i)}catch(c){console.warn("[dropdown] onOpen threw:",c)}return o}function rp(t){let e=Ex(this);if(!e)return;let r=e.state?.layer;r&&e.state.update({layer:{...r,inert:!!t}})}function mo(t){let e=Ex(this);if(!e)return;let r=e.state?.layer;if(!r)return;let n=typeof t=="string"?t:t?.id;if(n&&r.id&&n!==r.id)return;let o=r.onClose,s=r.restoreEl,i=typeof document<"u"?document:null,a=i?i.activeElement:null,c=e.node?.querySelector?.('[data-smbls-dropdown="panel"]'),l=!a||a===i?.body,f=!!(c&&a&&c.contains(a)),u=l||f;if(e.state.update({layer:null}),u&&s&&typeof s.focus=="function")try{s.focus()}catch(d){console.warn("[dropdown] focus restore threw:",d)}if(typeof o=="function")try{o(r)}catch(d){console.warn("[dropdown] onClose threw:",d)}}var Ax=(t,e)=>{let r=`${e.maxHeight}px`;return t?.maxHeight?`min(${t.maxHeight}, ${r})`:r},WA=t=>{let e=t.getBoundingClientRect();return{width:e.width,height:Math.max(e.height,t.scrollHeight||0)}},G$=`
|
|
107
|
+
\`\`\``}o.push({role:"user",content:s})}return o}var R1=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,o$=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function s$(t){let e=[];for(let r of t.matchAll(R1))e.push({lang:(r.groups?.lang||"").toLowerCase(),code:r.groups?.code??""});return e}function i$(t){return t.replace(R1,"").trim()}function sw(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 O1(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&o$.has(t.type)}function P1(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let r=s$(e),n=r.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),o=r.filter(i=>i.lang==="json"),s=i$(e);for(let i of o){let a=sw(i.code);if(O1(a))return{kind:"asset",text:s||a.description||"",asset:a,message:a.description||s||`Generated ${a.type}: ${a.title||a.key||""}`.trim()}}if(n.length>0){let i=n[0].code,a=sw("["+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=sw(e);if(O1(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 D1(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 L1=["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(" "),I1=["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(`
|
|
108
|
+
`),iw={Starter:dn,Free:dn,Pro:"claude-opus-4-6"};function $1(t){return t?iw[t]||t:dn}var M1={"@symbo.ls/signal":Ip,"@symbo.ls/scratch":xy,"@symbo.ls/element":Pb,"@symbo.ls/css":Ly,"@symbo.ls/utils":Xo,"@symbo.ls/state":db,"@symbo.ls/router":Ic,"@symbo.ls/polyglot":D_,"@symbo.ls/helmet":R_,"@symbo.ls/fetch":wf,"@symbo.ls/capsize":I_,"@symbo.ls/shorthand":V_,"@symbo.ls/analyze":Q_,"@symbo.ls/inspect":rw,"@symbo.ls/channels":ow,"@symbo-ls/simone-server":aw},F1=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:{}),n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o in M1)n[o]||(n[o]=M1[o]);if(e)for(let o in e)n[o]||(n[o]=e[o]);return n},N1=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:null);if(!r||!e||typeof e!="object")return null;let n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o in e){let s=e[o];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(n,o))continue;let i=a=>(Object.defineProperty(n,o,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return n},j1=["@symbo.ls/sdk"],B1=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!t||typeof t!="object")return null;let n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o in t){let s=t[o];!s||typeof s!="object"&&typeof s!="function"||n[o]||(n[o]=s)}return n},a$=/^@symbo[-.]ls\//,c$=t=>t.includes("/")?t.slice(t.indexOf("/")+1):t,V1=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!Array.isArray(t))return null;let n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o of t){let s=o&&o.library?o.library:o;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&&!a$.test(c))continue;let l=c$(c);l&&!a.includes(l)&&a.push(l)}for(let c of a)for(let l of[`@symbo-ls/${c}`,`@symbo.ls/${c}`])n[l]||(n[l]=s)}return n};L();var U1=t=>{let e={faces:0,links:0};if(!t)return e;for(let r in t){let n=t[r];if(!n||!n.fontFace)continue;let o=Array.isArray(n.fontFace)?n.fontFace:[n.fontFace];for(let s of o){if(z1(s)){let i=f$(s);i&&u$(i)&&e.links++;continue}if(l$(s)){St(s.trim()),e.faces++;continue}typeof s=="string"&&s.includes("font-family")&&(St(`@font-face { ${s} }`),e.faces++)}}return e},z1=t=>typeof t=="string"&&t.trim().startsWith("@import"),l$=t=>typeof t=="string"&&t.trim().startsWith("@font-face"),f$=t=>{if(!z1(t))return null;let e=String(t).match(/url\(\s*['"]?([^'")]+)['"]?\s*\)/);return e?e[1].trim():null},u$=(t,e)=>{if(typeof t!="string"||!t)return null;let r=e||eo();if(!r||!r.head)return null;let n="data-smbls-font",o=r.head.querySelectorAll(`link[rel="stylesheet"][${n}]`);for(let i=0;i<o.length;i++)if(o[i].getAttribute(n)===t)return o[i];let s=r.createElement("link");return s.setAttribute("rel","stylesheet"),s.setAttribute("href",t),s.setAttribute(n,t),r.head.appendChild(s),s};var K1=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 n=t.window;return n&&n!==e&&typeof n.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=n||e,t.window},H1=(t="smbls")=>{let e={};for(let r in ao)Object.prototype.hasOwnProperty.call(ao,r)&&(Je(r)?e[`smbls.${r}`]=ao[r]:e[r]=ao[r]);return e},G1=t=>t.components?{...H1(),...t.components}:H1(),Y1=t=>({...Mc,...Ic,...Kr,...t.utils,...t.snippets,...t.functions}),X1=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var Z1=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,d$=3e3,p$=(t,e,r=n=>import(n))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let n=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(n[t])return Promise.resolve(n[t]);let o=Promise.resolve().then(()=>r(e)).then(i=>(i&&!n[t]&&(n[t]=i),n[t]||null)).catch(()=>null);return new Promise(i=>{let a=setTimeout(()=>i(null),d$);o.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},W1={},uw=async({dependencies:t,dependenciesOnDemand:e,document:r,preventCaching:n=!1,cdnProvider:o,packageManager:s,symbolsConfig:i,registerDependency:a=p$})=>{if(o||(o=Ur[s]||Wo(i)||"esmsh"),!t)return null;if(!$n(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=jr()&&n?`?${Math.random()}`:"",f=async(d,g)=>{let h=Me(d,g,o)+l;try{await Promise.race([qo(h,{document:r,type:"module"}),new Promise((p,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,h)}catch(p){if(console.error(`Failed to load ${d} from ${o}:`,p),o!=="symbols")try{let m=Me(d,g,"symbols")+l;await Promise.race([qo(m,{document:r,type:"module"}),new Promise((y,w)=>setTimeout(()=>w(new Error(`Timeout fallback ${d}`)),2e4))]),console.log(`Successfully loaded ${d} from fallback (symbols.ls)`),await a(d,m)}catch(m){console.error(`Failed to load ${d} from fallback:`,m)}}},u=[];for(let d in t){let g=t[d];if(!(e&&e[d])&&!W1[d]&&(W1[d]=!0,!zr(d))){if(In(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}Z1(d)||u.push(f(d,g))}}return u.length&&await Promise.allSettled(u),t},q1=/\[smbls\] runtime dependency "([^"]+)" is not registered on globalThis\.__SMBLS_PKGS__/g,h$=t=>{if(typeof t=="string")return t;if(typeof t=="function")try{return typeof le=="function"?le(t):Function.prototype.toString.call(t)}catch{return""}return""},g$=t=>{let e=new Set;if(!t)return e;let r=[t.globalScope,t.functions,t.methods,t.snippets];for(let n=0;n<r.length;n++){let o=r[n];if(!o||typeof o!="object")continue;let s=Object.keys(o);for(let i=0;i<s.length;i++){let a;try{a=o[s[i]]}catch{continue}let c=h$(a);if(!c||c.indexOf("__SMBLS_PKGS__")===-1)continue;q1.lastIndex=0;let l;for(;(l=q1.exec(c))!==null;)e.add(l[1])}}return e},m$=t=>{let e=new Set;if(!t||typeof t.querySelectorAll!="function")return e;let r;try{r=t.querySelectorAll('script[type="importmap"]')}catch{return e}for(let n=0;n<r.length;n++){let o;try{o=JSON.parse(r[n].textContent||"")}catch{continue}let s=o&&typeof o=="object"?o.imports:null;if(s&&typeof s=="object"){let i=Object.keys(s);for(let a=0;a<i.length;a++)e.add(i[a])}}return e},y$=(t,e)=>{if(!e||!e.size)return!1;if(e.has(t))return!0;for(let r of e)if(r.length>1&&r.endsWith("/")&&t.length>r.length&&t.startsWith(r))return!0;return!1},J1=(t,{syncRead:e=g$(t),runtimeDocument:r=typeof document<"u"?document:null,importMap:n=m$(r)}={})=>{let o=t&&t.dependencies;if(!$n(o))return null;let s=!t.document||t.document===r,i=t.dependenciesOnDemand,a=null,c=null;for(let l in o)s&&!(i&&i[l])&&!e.has(l)&&y$(l,n)?(c||(c={}))[l]=o[l]:(a||(a={}))[l]=o[l];return{blocking:a,deferred:c}},b$=t=>import(t),cw={},_$=(t,e)=>{if(!e||typeof globalThis>"u")return;let r=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});r[t]||(r[t]=e)},w$=(t,{importModule:e=b$}={})=>{let r=[];if(!t)return Promise.resolve([]);for(let n in t)zr(n)||In(n)||Z1(n)||(cw[n]||(cw[n]=Promise.resolve().then(()=>e(n)).then(o=>(_$(n,o),o||null),()=>null)),r.push(cw[n]));return Promise.all(r)},S$=2e3,x$=3e3,Q1=(t,{win:e=typeof window<"u"?window:null,importModule:r,loadTimeoutMs:n=x$}={})=>t?new Promise(o=>{let s=()=>{w$(t,{importModule:r}).then(o,o)},i=()=>{e&&typeof e.requestIdleCallback=="function"?e.requestIdleCallback(s,{timeout:S$}):setTimeout(s,0)},a=e&&e.document;if(a&&a.readyState&&a.readyState!=="complete"&&typeof e.addEventListener=="function"){let c=!0,l=null,f=()=>{c&&(c=!1,clearTimeout(l),typeof e.removeEventListener=="function"&&e.removeEventListener("load",f),i())};e.addEventListener("load",f,{once:!0}),l=setTimeout(f,n)}else i()}):null,tA=async(t,e)=>{let r=e.window||window,n=e.cdnProvider||Wo(e.symbolsConfig)||"esmsh",o=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=n)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&zr(a))return await u.require(a,c);if(!u.packages[a]){let d=jr()?`?${Math.random()}`:"";if(l&&l[a]){let g=l[a],h=Me(a,g,c)+d;try{await i.utils.loadRemoteScript(h,{window:u,document:f})}catch(p){if(console.error(`Failed to load ${a} from ${c}:`,p),c!=="symbols"){let m=Me(a,g,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let g=Me(a,"latest",c)+d;try{await i.utils.loadRemoteScript(g,{window:u,document:f})}catch(h){if(console.error(`Failed to load ${a} from ${c}:`,h),c!=="symbols"){let p=Me(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=_t(r.packages,t):r.packages=t,r.require||(e.utils.require=await o(e),r.require=e.utils.require),r.requireOnDemand||(e.utils.requireOnDemand=await s(e),r.requireOnDemand=e.utils.requireOnDemand)},k$=/\s+/g,eA=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,v$=(t,e)=>{let r="";for(let n in t){let o=t[n];typeof o=="boolean"&&o?r+=` ${n}`:typeof o=="string"?r+=` ${o}`:typeof o=="function"&&(r+=` ${eA(o,e)}`)}return r},C$=(t,e,r)=>{if(!t)return;let{key:n}=e;t===!0&&(t=e.classlist={key:n}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=v$(t,e));let o=t.replace(k$," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",o);else if(r)try{r.className=o}catch{}return o},E$=()=>(t,e,r)=>{let n=eA(t,e);if(t){let{__ref:o}=e;o.__class.style=n}rA()(e.classlist,e,e.state,!0)},rA=()=>(t,e,r,n)=>{if(e.style&&!n)return;let{__ref:o}=e,{__class:s,__classNames:i}=o;if(!(t===null||typeof t!="object"||Array.isArray(t))){e.class&&(i.classProps=e.class),e.attr?.class&&(i.class=e.attr.class);for(let a in s){let c=s[a];if(!c){delete i[a];continue}let l;typeof c=="string"||typeof c=="number"?l=c:typeof c=="boolean"?l=e.key:l=ge(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&C$(i,e,e.node)}},A$=()=>({style:E$(),classlist:rA()}),T$=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],lw=new WeakSet,fw=!1,O$=t=>!!t&&typeof t=="object",nA=(t,e)=>{let r=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,n=e.initOptions||{},o=e.registry||A$(),s=e.designSystem?it(ft(e.designSystem),ft(Dc),de):ft(Dc),i={};for(let p of T$)e[p]!==void 0&&(i[p]=e[p]);let a,c=O$(r),f=c&&lw.has(r)&&!e.skipDesignSystemInit,u=!f&&!fw,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=A(t)||A(),a&&(a.__domDocument=r),a?.CSS_VARS){at(a);try{St({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&St(ad(a.CSS_MEDIA_VARS,d));let p=Jn(a.cssSkinVars,a.cssSkinFallback,d);Object.keys(p).length&&St(p)}finally{ot()}}}else if(u){let p=A();p&&(p.__domDocument=r),a=Ar(s,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...fd,...i,...n}),a&&a!==p&&(a.__domDocument=r),c&&lw.add(r),fw=!0}else{let p=ja(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}at(p);try{a=Ar(p,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...fd,...i,...n})}finally{ot()}c&&lw.add(r),fw=!0}let g=a?.CONFIG||a,h=g?.font;if(h){at(g);try{U1(h)}finally{ot()}}return[a,o]},oA=(t,e)=>{let r={};e.state&&it(r,e.state),t&&t.state&&it(r,t.state);let n=e.polyglot;if(n?.translations){let o=null;try{typeof localStorage<"u"&&(o=localStorage.getItem(n.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=o||r.lang||n.defaultLang||"en";o&&o!==r.lang&&(r.lang=o);let i=new Set,a=new Set,c=(u,d)=>{if(!a.has(u)){if(!Pn(e,u,r)){i.add(u);return}r[u]=d,a.add(u),Qe(e,u,d)}},l=n.translations[s];if(l&&typeof l=="object")for(let u in l)c(u,l[u]);let f=new Set(n.languages||[]);for(let u in n.translations)f.has(u)||c(u,n.translations[u]);i.size&&n.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)},sA=(t,e)=>{v(t.routes)&&v(e.pages)&&_t(t.routes,e.pages);let r=t.routes||e.pages||{},n=[];for(let o in r){if(o.charCodeAt(0)===47)continue;let i="/"+(o==="index"?"":o);Object.prototype.hasOwnProperty.call(r,i)?n.push(`${o} -> ${i}`):r[i]=r[o],delete r[o]}return n.length&&e&&e.verbose!==!1&&console.warn(`[smbls] preparePages kept ${n.length} explicitly declared route${n.length===1?"":"s"} over a same-named page key (${n.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},iA=t=>{Ca(t,t.sharedLibraries)};var nl={polyglot:Vc,getLocalStateLang:Wc,getActiveLang:ln,getLang:ln,setLang:zc,getLanguages:Bc,loadTranslations:Uc,upsertTranslation:Hc};sa();var He=Object.create(null);He.open="0";He.close="1";He.ping="2";He.pong="3";He.message="4";He.upgrade="5";He.noop="6";var ol=Object.create(null);Object.keys(He).forEach(t=>{ol[He[t]]=t});var sl={type:"error",data:"parser error"};var lA=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",fA=typeof ArrayBuffer=="function",uA=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,il=({type:t,data:e},r,n)=>lA&&e instanceof Blob?r?n(e):aA(e,n):fA&&(e instanceof ArrayBuffer||uA(e))?r?n(e):aA(new Blob([e]),n):n(He[t]+(e||"")),aA=(t,e)=>{let r=new FileReader;return r.onload=function(){let n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function cA(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var dw;function dA(t,e){if(lA&&t.data instanceof Blob)return t.data.arrayBuffer().then(cA).then(e);if(fA&&(t.data instanceof ArrayBuffer||uA(t.data)))return e(cA(t.data));il(t,!1,r=>{dw||(dw=new TextEncoder),e(dw.encode(r))})}var pA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",al=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<pA.length;t++)al[pA.charCodeAt(t)]=t;var hA=t=>{let e=t.length*.75,r=t.length,n,o=0,s,i,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let l=new ArrayBuffer(e),f=new Uint8Array(l);for(n=0;n<r;n+=4)s=al[t.charCodeAt(n)],i=al[t.charCodeAt(n+1)],a=al[t.charCodeAt(n+2)],c=al[t.charCodeAt(n+3)],f[o++]=s<<2|i>>4,f[o++]=(i&15)<<4|a>>2,f[o++]=(a&3)<<6|c&63;return l};var R$=typeof ArrayBuffer=="function",cl=(t,e)=>{if(typeof t!="string")return{type:"message",data:gA(t,e)};let r=t.charAt(0);return r==="b"?{type:"message",data:P$(t.substring(1),e)}:ol[r]?t.length>1?{type:ol[r],data:t.substring(1)}:{type:ol[r]}:sl},P$=(t,e)=>{if(R$){let r=hA(t);return gA(r,e)}else return{base64:!0,data:t}},gA=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var mA="",yA=(t,e)=>{let r=t.length,n=new Array(r),o=0;t.forEach((s,i)=>{il(s,!1,a=>{n[i]=a,++o===r&&e(n.join(mA))})})},bA=(t,e)=>{let r=t.split(mA),n=[];for(let o=0;o<r.length;o++){let s=cl(r[o],e);if(n.push(s),s.type==="error")break}return n};function _A(){return new TransformStream({transform(t,e){dA(t,r=>{let n=r.length,o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);let s=new DataView(o.buffer);s.setUint8(0,126),s.setUint16(1,n)}else{o=new Uint8Array(9);let s=new DataView(o.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(r)})}})}var pw;function Id(t){return t.reduce((e,r)=>e+r.length,0)}function $d(t,e){if(t[0].length===e)return t.shift();let r=new Uint8Array(e),n=0;for(let o=0;o<e;o++)r[o]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function wA(t,e){pw||(pw=new TextDecoder);let r=[],n=0,o=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(n===0){if(Id(r)<1)break;let c=$d(r,1);s=(c[0]&128)===128,o=c[0]&127,o<126?n=3:o===126?n=1:n=2}else if(n===1){if(Id(r)<2)break;let c=$d(r,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(Id(r)<8)break;let c=$d(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(sl);break}o=f*Math.pow(2,32)+l.getUint32(4),n=3}else{if(Id(r)<o)break;let c=$d(r,o);a.enqueue(cl(s?c:pw.decode(c),e)),n=0}if(o===0||o>t){a.enqueue(sl);break}}}})}var hw=4;function gt(t){if(t)return D$(t)}function D$(t){for(var e in gt.prototype)t[e]=gt.prototype[e];return t}gt.prototype.on=gt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};gt.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};gt.prototype.off=gt.prototype.removeListener=gt.prototype.removeAllListeners=gt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,o=0;o<r.length;o++)if(n=r[o],n===e||n.fn===e){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+t],this};gt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].apply(this,e)}return this};gt.prototype.emitReserved=gt.prototype.emit;gt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};gt.prototype.hasListeners=function(t){return!!this.listeners(t).length};var Or=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),Gt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),SA="arraybuffer";function Md(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}var L$=Gt.setTimeout,I$=Gt.clearTimeout;function Rr(t,e){e.useNativeTimers?(t.setTimeoutFn=L$.bind(Gt),t.clearTimeoutFn=I$.bind(Gt)):(t.setTimeoutFn=Gt.setTimeout.bind(Gt),t.clearTimeoutFn=Gt.clearTimeout.bind(Gt))}var $$=1.33;function xA(t){return typeof t=="string"?M$(t):Math.ceil((t.byteLength||t.size)*$$)}function M$(t){let e=0,r=0;for(let n=0,o=t.length;n<o;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function Fd(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function kA(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function vA(t){let e={},r=t.split("&");for(let n=0,o=r.length;n<o;n++){let s=r[n].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var Nd=class extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}},Pr=class extends gt{constructor(e){super(),this.writable=!1,Rr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,n){return super.emitReserved("error",new Nd(e,r,n)),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=cl(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=kA(e);return r.length?"?"+r:""}};var ll=class extends Pr{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 n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};bA(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,yA(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]=Fd()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}};var CA=!1;try{CA=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var EA=CA;function F$(){}var gw=class extends ll{constructor(e){if(super(e),typeof location<"u"){let r=location.protocol==="https:",n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,r){let n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(o,s)=>{this.onError("xhr post error",o,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}},pn=class t extends gt{constructor(e,r,n){super(),this.createRequest=e,Rr(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;let r=Md(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;let n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var o;n.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=F$,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()}};pn.requestsCount=0;pn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",AA);else if(typeof addEventListener=="function"){let t="onpagehide"in Gt?"pagehide":"unload";addEventListener(t,AA,!1)}}function AA(){for(let t in pn.requests)pn.requests.hasOwnProperty(t)&&pn.requests[t].abort()}var N$=(function(){let t=TA({xdomain:!1});return t&&t.responseType!==null})(),hn=class extends gw{constructor(e){super(e);let r=e&&e.forceBase64;this.supportsBinary=N$&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new pn(TA,this.uri(),e)}};function TA(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||EA))return new XMLHttpRequest}catch{}if(!e)try{return new Gt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var OA=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",yw=class extends Pr{get name(){return"websocket"}doOpen(){let e=this.uri(),r=this.opts.protocols,n=OA?{}:Md(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,n)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){let n=e[r],o=r===e.length-1;il(n,this.supportsBinary,s=>{try{this.doWrite(n,s)}catch{}o&&Or(()=>{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]=Fd()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}},mw=Gt.WebSocket||Gt.MozWebSocket,gn=class extends yw{createSocket(e,r,n){return OA?new mw(e,r,n):r?new mw(e,r):new mw(e)}doWrite(e,r){this.ws.send(r)}};var Ks=class extends Pr{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=wA(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),o=_A();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();let s=()=>{n.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 n=e[r],o=r===e.length-1;this._writer.write(n).then(()=>{o&&Or(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var bw={websocket:gn,webtransport:Ks,polling:hn};var j$=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,B$=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Gs(t){if(t.length>8e3)throw"URI too long";let e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let o=j$.exec(t||""),s={},i=14;for(;i--;)s[B$[i]]=o[i]||"";return r!=-1&&n!=-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=V$(s,s.path),s.queryKey=U$(s,s.query),s}function V$(t,e){let r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function U$(t,e){let r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,s){o&&(r[o]=s)}),r}var _w=typeof addEventListener=="function"&&typeof removeEventListener=="function",jd=[];_w&&addEventListener("offline",()=>{jd.forEach(t=>t())},!1);var mo=class t extends gt{constructor(e,r){if(super(),this.binaryType=SA,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 n=Gs(e);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=Gs(r.host).host);Rr(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(n=>{let o=n.prototype.name;this.transports.push(o),this._transportsByName[o]=n}),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=vA(this.opts.query)),_w&&(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"})},jd.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let r=Object.assign({},this.opts.query);r.EIO=hw,r.transport=e,this.id&&(r.sid=this.id);let n=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](n)}_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 n=0;n<this.writeBuffer.length;n++){let o=this.writeBuffer[n].data;if(o&&(r+=xA(o)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Or(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,n){return this._sendPacket("message",e,r,n),this}send(e,r,n){return this._sendPacket("message",e,r,n),this}_sendPacket(e,r,n,o){if(typeof r=="function"&&(o=r,r=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;let s={type:e,data:r,options:n};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),o&&this.once("flush",o),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{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?n():e()}):this.upgrading?n():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(),_w&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let n=jd.indexOf(this._offlineEventListener);n!==-1&&jd.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}};mo.protocol=hw;var Bd=class extends mo{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),n=!1;mo.priorWebsocketSuccess=!1;let o=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",u=>{if(!n)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;mo.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||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(){n||(n=!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",o),r.removeListener("error",i),r.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};r.once("open",o),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(()=>{n||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let r=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}},Ys=class extends Bd{constructor(e,r={}){let n=typeof e=="object"?e:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(o=>bw[o]).filter(o=>!!o)),super(e,n)}};var pH=Ys.protocol;function RA(t,e="",r){let n=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),n=Gs(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";let s=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+s+":"+n.port+e,n.href=n.protocol+"://"+s+(r&&r.port===n.port?"":":"+n.port),n}var Ew={};M(Ew,{Decoder:()=>vw,Encoder:()=>kw,PacketType:()=>W,isPacketValid:()=>lM,protocol:()=>VA});var H$=typeof ArrayBuffer=="function",W$=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,PA=Object.prototype.toString,q$=typeof Blob=="function"||typeof Blob<"u"&&PA.call(Blob)==="[object BlobConstructor]",K$=typeof File=="function"||typeof File<"u"&&PA.call(File)==="[object FileConstructor]";function ul(t){return H$&&(t instanceof ArrayBuffer||W$(t))||q$&&t instanceof Blob||K$&&t instanceof File}function fl(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(fl(t[r]))return!0;return!1}if(ul(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return fl(t.toJSON(),!0);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&fl(t[r]))return!0;return!1}function DA(t){let e=[],r=t.data,n=t;return n.data=ww(r,e),n.attachments=e.length,{packet:n,buffers:e}}function ww(t,e){if(!t)return t;if(ul(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 n=0;n<t.length;n++)r[n]=ww(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){let r={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=ww(t[n],e));return r}return t}function LA(t,e){return t.data=Sw(t.data,e),delete t.attachments,t}function Sw(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]=Sw(t[r],e);else if(typeof t=="object")for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Sw(t[r],e));return t}var jA=FT(NA(),1),xw=(0,jA.default)("socket.io-parser"),BA=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],VA=5,W;(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"})(W||(W={}));var kw=class{constructor(e){this.replacer=e}encode(e){return xw("encoding packet %j",e),(e.type===W.EVENT||e.type===W.ACK)&&fl(e)?this.encodeAsBinary({type:e.type===W.EVENT?W.BINARY_EVENT:W.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===W.BINARY_EVENT||e.type===W.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)),xw("encoded %j as %s",e,r),r}encodeAsBinary(e){let r=DA(e),n=this.encodeAsString(r.packet),o=r.buffers;return o.unshift(n),o}},vw=class t extends gt{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);let n=r.type===W.BINARY_EVENT;n||r.type===W.BINARY_ACK?(r.type=n?W.EVENT:W.ACK,this.reconstructor=new Cw(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(ul(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,n={type:Number(e.charAt(0))};if(W[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===W.BINARY_EVENT||n.type===W.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(!UA(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");n.attachments=a}if(e.charAt(r+1)==="/"){let s=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(s,r)}else n.nsp="/";let o=e.charAt(r+1);if(o!==""&&Number(o)==o){let s=r+1;for(;++r;){let i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}n.id=Number(e.substring(s,r+1))}if(e.charAt(++r)){let s=this.tryParse(e.substr(r));if(t.isPayloadValid(n.type,s))n.data=s;else throw new Error("invalid payload")}return xw("decoded %s as %j",e,n),n}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case W.CONNECT:return zd(r);case W.DISCONNECT:return r===void 0;case W.CONNECT_ERROR:return typeof r=="string"||zd(r);case W.EVENT:case W.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&BA.indexOf(r[0])===-1);case W.ACK:case W.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Cw=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=LA(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function iM(t){return typeof t=="string"}var UA=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function aM(t){return t===void 0||UA(t)}function zd(t){return Object.prototype.toString.call(t)==="[object Object]"}function cM(t,e){switch(t){case W.CONNECT:return e===void 0||zd(e);case W.DISCONNECT:return e===void 0;case W.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&BA.indexOf(e[0])===-1);case W.ACK:return Array.isArray(e);case W.CONNECT_ERROR:return typeof e=="string"||zd(e);default:return!1}}function lM(t){return iM(t.nsp)&&aM(t.id)&&cM(t.type,t.data)}function be(t,e,r){return t.on(e,r),function(){t.off(e,r)}}var fM=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Qs=class extends gt{constructor(e,r,n){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,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[be(e,"open",this.onopen.bind(this)),be(e,"packet",this.onpacket.bind(this)),be(e,"error",this.onerror.bind(this)),be(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 n,o,s;if(fM.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:W.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=(o=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||o===void 0?void 0:o.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,r){var n;let o=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(o===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"))},o),i=(...a)=>{this.io.clearTimeoutFn(s),r.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((n,o)=>{let s=(i,a)=>i?o(i):n(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 n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...s)=>(this._queue[0],o!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(o)):(this._queue.shift(),r&&r(null,...s)),n.pending=!1,this._drainQueue())),this._queue.push(n),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:W.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(n=>String(n.id)===e)){let n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case W.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 W.EVENT:case W.BINARY_EVENT:this.onevent(e);break;case W.ACK:case W.BINARY_ACK:this.onack(e);break;case W.DISCONNECT:this.ondisconnect();break;case W.CONNECT_ERROR:this.destroy();let n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);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 n of r)n.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,n=!1;return function(...o){n||(n=!0,r.packet({type:W.ACK,id:e,data:o}))}}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:W.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 n=0;n<r.length;n++)if(e===r[n])return r.splice(n,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 n=0;n<r.length;n++)if(e===r[n])return r.splice(n,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 n of r)n.apply(this,e.data)}}};function bo(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}bo.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};bo.prototype.reset=function(){this.attempts=0};bo.prototype.setMin=function(t){this.ms=t};bo.prototype.setMax=function(t){this.max=t};bo.prototype.setJitter=function(t){this.jitter=t};var ti=class extends gt{constructor(e,r){var n;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,Rr(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((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new bo({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;let o=r.parser||Ew;this.encoder=new o.Encoder,this.decoder=new o.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 Ys(this.uri,this.opts);let r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;let o=be(r,"open",function(){n.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=be(r,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{o(),s(new Error("timeout")),r.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(be(e,"ping",this.onping.bind(this)),be(e,"data",this.ondata.bind(this)),be(e,"error",this.onerror.bind(this)),be(e,"close",this.onclose.bind(this)),be(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){Or(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Qs(this,e,r),this.nsps[e]=n),n}_destroy(e){let r=Object.keys(this.nsps);for(let n of r)if(this.nsps[n].active)return;this._close()}_packet(e){let r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],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 n;this.cleanup(),(n=this.engine)===null||n===void 0||n.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 n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var dl={};function ei(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let r=RA(t,e.path||"/socket.io"),n=r.source,o=r.id,s=r.path,i=dl[o]&&s in dl[o].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new ti(n,e):(dl[o]||(dl[o]=new ti(n,e)),c=dl[o]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(ei,{Manager:ti,Socket:Qs,io:ei,connect:ei});L();L();var Hd=new Set(["__proto__","constructor","prototype"]),Aw=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Hd.has(t[e]))return!1;return!0},zA=(t,e)=>{!t||!Aw(e)||e.reduce((r,n,o,s)=>{if(r&&n in r){if(o!==s.length-1)return r[n];delete r[n]}},t)},HA=(t,e,r,n=!1)=>{!t||!Aw(e)||e.reduce((o,s,i,a)=>{if(o){if(i!==a.length-1)return!o[s]&&n&&(o[s]={}),o[s];o[s]=r}},t)},Wd=(t,e)=>{let r=new Set;if(!Array.isArray(e))return r;for(let[n,o,s]of e)if(!(!Array.isArray(o)||!o.length))switch(r.add(o[0]),n){case"delete":zA(t,o);break;case"update":case"set":HA(t,o,s,!0);break;default:break}return r},WA=(t,e)=>{if(!e||typeof e!="object"||Array.isArray(e))return null;let r=t&&(t.__raw||t)||{},n=null;for(let o of Object.keys(e))Hd.has(o)||Object.prototype.hasOwnProperty.call(r,o)||(n||(n={}),n[o]=e[o]);return n},pl=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},qA=(t,e,r,n="designSystem")=>{for(let o in e){if(Hd.has(o))continue;let s=`${n}/${o}`;if(r.has(s))continue;let i=e[o],a=t[o];if(i&&typeof i=="object"&&!Array.isArray(i)){if(!a||typeof a!="object"||Array.isArray(a)){if(o in t)continue;t[o]={}}qA(t[o],i,r,s)}else o in t||(t[o]=Array.isArray(i)?JSON.parse(JSON.stringify(i)):i)}},Tw=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let o={designSystem:t.__rawDesignSystem};Wd(o,e)}let r=JSON.parse(JSON.stringify(t.__rawDesignSystem)),n=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];return Ea(r,n,qA)};L();var KA=(t,e,r)=>{let n=!1;return(o={})=>{let{data:s}=o,{schema:i}=o;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(r[a]&&typeof r[a]=="object")if(a==="designSystem"){if(pl(r,c),n){let l=Tw(r);l&&Ar(l)}}else Tn(r[a],c);else r[a]=c}),n=!0,i&&(r.schema=i))}},GA=(t,e,r)=>(n={})=>{let{changes:o}=n;if(!o||!Array.isArray(o)||!o.length)return;o=t.call("deepDestringifyFunctions",o,Array.isArray(o)?[]:{});let s=o.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?o.filter(c=>!s.includes(c)):o,a=Wd(r,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=Tw(r,s);c?Ar(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")){let c=WA(e,r.state);if(c){let l=typeof e.$update=="function"?e.$update:e.update;typeof l=="function"&&l.call(e,c)}}if(["pages","components","snippets","functions","assets"].some(c=>a.has(c))){let{pathname:c,search:l,hash:f}=r.window.location;t.call("router",c+l+f,t.__ref.root,{},{scrollToTop:!1,force:!0})}};var uM={success:"green",error:"red",warning:"yellow"},YA=(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 n=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(n)},3e3)}}else if(r.connected){r.notifications.connected={title:"Disconnected",type:"error"},r.update({connected:!1});let n=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(n)},3e3)}},XA={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:uM[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,r,n)=>{r.update({animation:"fadeInUp"})},onClick:(e,r,n)=>{delete n.notifications[r.key],r.update({animation:"fadeOutDown"}),n.onClose&&n.onClose(e,r,n)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var dM=!1,pM=()=>dM?"http://localhost:8080":"https://api.symbols.app",hM=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}},gM=async t=>{try{let e=t||pM(),r=await C.fetch(`${e}/service-token`,{method:"GET"}),n;try{let o=await r.clone().json();if(o&&typeof o.token=="string")return o.token.trim();n=await r.text()}catch{n=await r.text()}return(n||"").replace(/\s+/gu,"")||void 0}catch(e){console.error("[sync] Failed to fetch service-token",e)}},QA=(t,e,r,n)=>{t.on("snapshot",KA(e,r,n)),t.on("ops",GA(e,r,n)),t.on("clients",o=>{n.editor?.verbose&&YA(o,e,r)}),t.on("disconnect",o=>{n.editor?.verbose&&console.info("[sync] disconnected",o)})},mM=async(t,e,r,n)=>{let o=await gM(n);if(!o)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=ei(n,{path:"/collab-socket",transports:["websocket"],auth:{token:o,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)")}),QA(a,t,e,r),a},yM=(t,e,r)=>{let n=ei({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return n.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),QA(n,t,e,r),n.on("reload",()=>{typeof C<"u"&&C.location&&C.location.reload()}),n},bM=async(t,e,r)=>{let{mode:n,baseUrl:o}=hM(r);return n?n==="collab"?mM(t,e,r,o):n==="runner"?yM(t,e,r):null:null},_M={onInit:bM};var tT=t=>typeof t>"u",ZA=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),JA=t=>t?.editor?.runtime==="runner",eT=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},rT={name:"sync",beforeCreate(t,e){let r=e&&e.editor;(r&&!tT(r.liveSync)?r.liveSync:ZA(e)||JA(e))&&(ZA(e)&&!JA(e)&&!e?.key||eT(t,_M))}},nT={name:"notifications",beforeCreate(t,e){if(!e)return;let r=tT(e.notifications)?null:e.notifications,n=e.editor&&e.editor.verbose===!0;(r===!0||r!==!1&&n)&&eT(t,XA)}};var Pw={};M(Pw,{AlertTemplate:()=>rp,ConfirmTemplate:()=>ep,CustomTemplate:()=>op,ModalLayer:()=>tp,ModalRoot:()=>Qd,PromptTemplate:()=>np,windowsComponents:()=>Rw});var Ow={};M(Ow,{alertDialog:()=>Zd,closeAllModals:()=>Yd,closeModal:()=>Kd,confirmDialog:()=>Xd,getLayer:()=>qd,openModal:()=>Gd,promptDialog:()=>Jd,windowsFunctions:()=>Dr});function J(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function ri(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 qd(){return J(this)}var wM=(t,e)=>{let r=t&&t["ModalLayer_"+e],n=r?.node||r?.__ref?.node;!n||typeof n.style?.setProperty!="function"||(n.style.setProperty("display","none","important"),n.style.setProperty("opacity","0","important"),n.style.setProperty("visibility","hidden","important"),n.style.setProperty("pointer-events","none","important"))},oT=(t,e)=>{let r=t&&t["ModalLayer_"+e],n=r?.node||r?.__ref?.node;!n||typeof n.style?.removeProperty!="function"||(n.style.removeProperty("display"),n.style.removeProperty("opacity"),n.style.removeProperty("visibility"),n.style.removeProperty("pointer-events"))};function Kd(t){let e=ri(this);if(!e)return;let r=e.state?.stack||[];if(!r.length)return;let n,o,s;if(t){if(s=[],n=r.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),n.length===r.length)return;o=r.filter(i=>i.id===t)}else n=r.slice(0,-1),o=r.slice(-1),s=[r.length-1];e.state.update({stack:n});for(let i of s)wM(e,i);for(let i of o)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function Gd(t={}){let e=ri(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)}`,n={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},o=e.state?.stack||[];if(o.length>=5)return console.warn("[windows] openModal: stack already at the 5-layer maximum, dropping the new layer. Close some modals first."),null;let s=o.length;return oT(e,s),e.state.update({stack:[...o,n]}),r}function Yd(){let t=ri(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function Xd(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function Zd(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function Jd(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var Dr={openModal:Gd,closeModal:Kd,closeAllModals:Yd,confirmDialog:Xd,alertDialog:Zd,promptDialog:Jd,getLayer:qd};var SM=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),sT=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(SM),r=[];for(let n=0;n<e.length;n++){let o=e[n];(o.offsetParent!==null||o===document.activeElement)&&r.push(o)}return r},iT=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},Qd={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 Dr)a in r.functions||(r.functions[a]=Dr[a])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let n=()=>{let a=t.state?.stack||[];if(!a.length)return;let c=a.length-1,l=a[c];t.state.update({stack:a.slice(0,-1)});let f=t["ModalLayer_"+c],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},o=a=>{let c=t.state?.stack;if(c?.length){if(a.key==="Tab"){let l=iT(t);if(!l)return;let f=sT(l);if(!f.length){a.preventDefault();let h=l.querySelector?.('[role="dialog"]')||l;try{h.focus?.()}catch{}return}let u=f[0],d=f[f.length-1],g=document.activeElement;if(!l.contains(g)){a.preventDefault();try{u.focus()}catch{}return}if(a.shiftKey&&g===u){a.preventDefault();try{d.focus()}catch{}}else if(!a.shiftKey&&g===d){a.preventDefault();try{u.focus()}catch{}}return}a.key!=="Escape"||a.defaultPrevented||c[c.length-1]?.dismissOnBackdrop!==!1&&(a.preventDefault(),n())}};window.addEventListener("keydown",o),t.__escHandler=o;let s=a=>{let c=t.state?.stack||[];if(a<0||a>=c.length)return;let l=c[a];t.state.update({stack:c.filter((d,g)=>g!==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 n=iT(t);if(!n)return;let o=sT(n)[0]||n.querySelector&&n.querySelector('[role="dialog"]')||n;try{o.focus&&o.focus()}catch{}});else{let n=null;for(let o=r;o>e;o--)t.__modalOpeners[o]&&(n=n||t.__modalOpeners[o]),t.__modalOpeners[o]=null;if(n&&typeof n.focus=="function"&&n.isConnected!==!1)try{n.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 tp={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",theme:"backdrop",transition:"opacity C defaultBezier",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}},width:t=>J(t)?.width||"H",maxWidth:t=>J(t)?.maxWidth||"90vw",flow:"y",maxHeight:t=>J(t)?.maxHeight||"100%",animation:"modalIn",animationDuration:"D",animationTimingFunction:"springBezier",onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>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 ni=(t,e,r)=>J(t)?.[e]||r,xM=t=>{let e=J(t)?.icon;return e===null||e===!1},ep={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>ni(t,"title","Are you sure?"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{hide:t=>xM(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>ni(t,"icon","warning")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",P:{tag:"p",margin:"0",text:t=>ni(t,"message","This action cannot be undone."),color:"dim"}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>ni(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let n=J(e);if(n?.onCancel)try{n.onCancel()}catch(o){console.warn("[windows] confirm.onCancel threw:",o)}e.call("closeModal",n?.id)}},ConfirmBtn:{extends:"Button",theme:t=>ni(t,"confirmTheme","primary"),text:t=>ni(t,"confirmText","Confirm"),onClick:(t,e,r)=>{let n=J(e);if(n?.onConfirm)try{n.onConfirm()}catch(o){console.warn("[windows] confirm.onConfirm threw:",o)}e.call("closeModal",n?.id)}}}};var hl=(t,e,r)=>J(t)?.[e]||r,rp={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>hl(t,"title","Notice"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>hl(t,"icon","info")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!hl(t,"message",""),P:{tag:"p",margin:"0",text:t=>hl(t,"message",""),color:"dim"}},ModalFooter:{flow:"x",align:"center end",flexShrink:"0",OkBtn:{extends:"Button",theme:"primary",text:t=>hl(t,"okText","OK"),onClick:(t,e,r)=>{let n=J(e);if(n?.onOk)try{n.onOk()}catch(o){console.warn("[windows] alert.onOk threw:",o)}e.call("closeModal",n?.id)}}}};var oi=(t,e,r)=>J(t)?.[e]||r,np={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",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 n=t.InputRow&&t.InputRow.node;n&&(n.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 n=t.InputRow&&t.InputRow.node;n&&(n.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>oi(t,"title","Enter a value"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!oi(t,"message",""),P:{tag:"p",margin:"0",text:t=>oi(t,"message",""),color:"dim"}},InputRow:{extends:"Input",flexShrink:"0",autofocus:!0,placeholder:t=>oi(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 n=J(e),o=e.parent.scope?.value||"";if(n?.onConfirm)try{n.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",n?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>oi(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let n=J(e);if(n?.onCancel)try{n.onCancel()}catch(o){console.warn("[windows] prompt.onCancel threw:",o)}e.call("closeModal",n?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>oi(t,"confirmText","OK"),onClick:(t,e,r)=>{let n=J(e),o=e.parent.parent.scope?.value||"";if(n?.onConfirm)try{n.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",n?.id)}}}};var op={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",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",flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",onInit:t=>{let e=Y(()=>{let r=J(t),n=r?.content||null,o=r?.id||null;if(!n){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(n);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in Dr)i in s.functions||(s.functions[i]=Dr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var aT={extends:"Button",theme:"tertiary"};var Rw={ModalRoot:Qd,ModalLayer:tp,ConfirmTemplate:ep,AlertTemplate:rp,PromptTemplate:np,CustomTemplate:op,"smbls.CancelButton":aT};var Fw={};M(Fw,{Dropdown:()=>fp,DropdownList:()=>up,DropdownParent:()=>dp,DropdownParentFocus:()=>pp,DropdownRoot:()=>cp,DropdownSiblingFocus:()=>hp,DropdownTrigger:()=>lp,dropdownComponents:()=>Mw});var cT=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),kM=(t,e,r,n)=>{let o=cT(t,r,n),s=i=>o[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":o.bottom>=o.top?"bottom":"top"},vM=(t,e,r,n,o)=>{let s=cT(e,n,o),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&&s[a]>s[t]?a:t};var Dw=(t,e,r)=>{let n;return t==="bottom"?n=r-e.bottom-16:t==="top"?n=e.top-16:n=r-16,Math.max(40,Math.floor(n))},sp=(t,e,r)=>Math.max(e,Math.min(r,t)),Lr=(t,e,r="auto")=>{if(!t){let h=typeof window<"u"?window.innerHeight:768;return{left:0,top:0,side:"bottom",align:"start",maxHeight:Dw("center",null,h)}}let n=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s={width:Math.max(120,e?.width||0),height:Math.max(40,e?.height||0)};if(r==="center"){let h=Dw("center",t,o),p=Math.min(s.height,h),m=sp((n-s.width)/2,8,Math.max(8,n-s.width-8)),y=sp((o-p)/2,8,Math.max(8,o-p-8));return{left:m,top:y,side:"center",align:"center",maxHeight:h}}let i,a;if(r==="auto")i=kM(t,s,n,o),a="start";else{let h=r.split("-");i=h[0],a=h[1]||"start",i=vM(i,t,s,n,o)}let c=Dw(i,t,o),l=Math.min(s.height,c),f,u;i==="bottom"||i==="top"?(a==="start"?f=t.left:a==="end"?f=t.right-s.width:f=t.left+(t.width-s.width)/2,u=i==="bottom"?t.bottom+8:t.top-l-8):(a==="start"?u=t.top:a==="end"?u=t.bottom-l:u=t.top+(t.height-l)/2,f=i==="right"?t.right+8:t.left-s.width-8);let d=Math.max(8,n-s.width-8),g=Math.max(8,o-l-8);return f=sp(f,8,d),u=sp(u,8,g),{left:f,top:u,side:i,align:a,maxHeight:c}},si=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 mn={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:null},CM=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}},Lw=t=>t?.getRoot?.()?.DropdownRoot||null,EM=0,AM=()=>`dropdown_${++EM}_${Date.now().toString(36)}`;function ip(t={}){let e=Lw(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,n=t.anchorRect||CM(r);if(!n)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let o=t.id||AM(),s=t.restoreEl?.node||t.restoreEl||r||(typeof document<"u"?document.activeElement:null),i={id:o,content:t.content||null,anchor:n,placement:t.placement||mn.placement,trigger:t.trigger||mn.trigger,offset:t.offset??mn.offset,minWidth:t.minWidth||mn.minWidth,maxWidth:t.maxWidth||mn.maxWidth,maxHeight:t.maxHeight||mn.maxHeight,theme:t.theme||null,shadow:t.shadow||null,background:t.background||null,round:t.round||null,role:t.role||null,ariaLabel:t.ariaLabel||null,ariaLabelledby:t.ariaLabelledby||null,focusIn:!!t.focusIn,onOpen:t.onOpen,onClose:t.onClose,restoreEl:s},a=e.state?.layer;if(a?.onClose)try{a.onClose(a)}catch(c){console.warn("[dropdown] prev onClose threw:",c)}if(e.state.update({layer:i}),typeof i.onOpen=="function")try{i.onOpen(i)}catch(c){console.warn("[dropdown] onOpen threw:",c)}return o}function ap(t){let e=Lw(this);if(!e)return;let r=e.state?.layer;r&&e.state.update({layer:{...r,inert:!!t}})}function _o(t){let e=Lw(this);if(!e)return;let r=e.state?.layer;if(!r)return;let n=typeof t=="string"?t:t?.id;if(n&&r.id&&n!==r.id)return;let o=r.onClose,s=r.restoreEl,i=typeof document<"u"?document:null,a=i?i.activeElement:null,c=e.node?.querySelector?.('[data-smbls-dropdown="panel"]'),l=!a||a===i?.body,f=!!(c&&a&&c.contains(a)),u=l||f;if(e.state.update({layer:null}),u&&s&&typeof s.focus=="function")try{s.focus()}catch(d){console.warn("[dropdown] focus restore threw:",d)}if(typeof o=="function")try{o(r)}catch(d){console.warn("[dropdown] onClose threw:",d)}}var Iw=(t,e)=>{let r=`${e.maxHeight}px`;return t?.maxHeight?`min(${t.maxHeight}, ${r})`:r},lT=t=>{let e=t.getBoundingClientRect();return{width:e.width,height:Math.max(e.height,t.scrollHeight||0)}},TM=`
|
|
106
109
|
@keyframes smbls-dropdown-fade-in {
|
|
107
110
|
from { opacity: 0; transform: var(--smbls-dropdown-from, translateY(-6px)) scale(0.98); }
|
|
108
111
|
to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
|
|
@@ -169,4 +172,4 @@ ${i}
|
|
|
169
172
|
[data-smbls-dropdown="panel"]:not([data-smbls-shadowed]) {
|
|
170
173
|
box-shadow: none !important;
|
|
171
174
|
}
|
|
172
|
-
`,Y$=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=G$,document.head.appendChild(t)},qA=(t,e)=>{if(!t.node)return;let r=e?.background;if(!r)t.node.removeAttribute("data-smbls-surface");else{let n=/^[a-z][\w.+-]*$/i.test(r)?`var(--color-${r})`:r;t.node.style.setProperty("--smbls-dropdown-surface",n),t.node.setAttribute("data-smbls-surface","")}e?.theme?t.node.setAttribute("data-smbls-themed",""):t.node.removeAttribute("data-smbls-themed"),e?.shadow||t.scope?.bodyShadow?t.node.setAttribute("data-smbls-shadowed",""):t.node.removeAttribute("data-smbls-shadowed")},X$=t=>{if(!t)return null;let e=typeof t.shadow=="function"?t.shadow(t,t.state):t.shadow;return typeof e=="string"&&e?e:null},Z$=t=>{t.node&&(t.node.removeAttribute("data-smbls-open"),t.node.offsetWidth,t.node.setAttribute("data-smbls-open","true"))},J$=[["role","role"],["aria-label","ariaLabel"],["aria-labelledby","ariaLabelledby"]],KA=(t,e)=>{if(!t.node)return;let r=new Set;for(let[n,o]of J$){let s=e?.[o];s&&(t.node.setAttribute(n,s),r.add(n))}if(t.__a11yAttrs)for(let n of t.__a11yAttrs)r.has(n)||t.node.removeAttribute(n);t.__a11yAttrs=r,t.__panelTabindex&&(t.node.removeAttribute("tabindex"),t.__panelTabindex=!1)},Q$='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',tM=t=>{let e=t.node;if(e){for(let r of e.querySelectorAll(Q$)){if(r.matches(":disabled"))continue;let n=r.getAttribute("tabindex");if(!(n!==null&&parseInt(n,10)<0)&&(r.focus({preventScroll:!0}),e.ownerDocument.activeElement===r))return}e.setAttribute("tabindex","-1"),t.__panelTabindex=!0,e.focus({preventScroll:!0})}},np={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(Y$(),typeof window>"u")return;let e=n=>{n.key!=="Escape"||n.defaultPrevented||t.state?.layer&&(n.preventDefault(),mo.call(t))};window.addEventListener("keydown",e),t.__dropdownEscHandler=e;let r=n=>{let o=t.state?.layer;if(!o)return;let s=t.node?.querySelector('[data-smbls-dropdown="panel"]');if(s&&s.contains(n.target))return;let i=o.anchor;if(i){let a=n.clientX,c=n.clientY;if(a>=i.left&&a<=i.right&&c>=i.top&&c<=i.bottom)return}mo.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 Lr(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 Lr(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":ri(Lr(e.anchor,r,e.placement).side)}},minWidth:t=>t.parent?.layer?.minWidth||"180px",maxWidth:t=>t.parent?.layer?.maxWidth||"90vw",maxHeight:t=>{let e=t.parent?.layer;if(!e?.anchor)return"none";let r=t._lastSize||{width:280,height:200};return Ax(e,Lr(e.anchor,r,e.placement))},overflow:"auto",overscrollBehavior:"contain",padding:"0",round:t=>t.parent?.layer?.round||"radiusCard",theme:t=>t.parent?.layer?.theme||null,border:"none",borderWidth:"0",shadow:t=>t.parent?.layer?.shadow||t.scope?.bodyShadow||null,scope:{bodyShadow:null},animationDuration:"B",animationTimingFunction:"defaultBezier",pointerEvents:t=>{let e=t.parent?.layer;return e?e.inert?"none":"auto":"none"},opacity:t=>t.parent?.layer?"1":"0",onClick:t=>t.stopPropagation(),onInit:t=>{let e=Y(()=>{let r=t.parent?.layer,n=r?.content||null,o=r?.id||null;if(!n){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null,KA(t,null),t.node?.removeAttribute("data-smbls-open"),t.scope&&(t.scope.bodyShadow=null)}return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(n)}catch(s){console.warn("[dropdown] content set failed:",s)}t.scope&&(t.scope.bodyShadow=X$(t.content)),qA(t,r),KA(t,r),Z$(t),r.focusIn&&tM(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;qA(t,r);let s=t.parent?.layer;if(!s?.anchor)return;let i=WA(t.node);t._lastSize=i;let a=Lr(s.anchor,i,s.placement);t.node.style.maxHeight=Ax(s,a),t.node.style.left=a.left+"px",t.node.style.top=a.top+"px",t.node.style.setProperty("--smbls-dropdown-from",ri(a.side))})}});t.__ref&&t.__ref.__effects?.push(e)},onRender:t=>{if(!t?.node)return;let e=t.parent?.layer;if(!e?.anchor)return;let r=WA(t.node),n=t._lastSize;(!n||Math.abs(n.width-r.width)>1||Math.abs(n.height-r.height)>1)&&(t._lastSize=r);let o=Lr(e.anchor,r,e.placement);t.node.style.maxHeight=Ax(e,o),t.node.style.left=o.left+"px",t.node.style.top=o.top+"px",t.node.style.setProperty("--smbls-dropdown-from",ri(o.side))}}}};var Tx=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 n in r)r[n]===void 0&&delete r[n];t.call("openDropdown",r)},op={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),Tx(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&Tx(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>Tx(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var sp={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"},ip={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"}}},ap={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},cp={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()}}},lp={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 Ox={DropdownRoot:np,DropdownTrigger:op,Dropdown:sp,DropdownList:ip,DropdownParent:ap,DropdownParentFocus:cp,DropdownSiblingFocus:lp};var Dx={};M(Dx,{DROPDOWN_DEFAULTS:()=>gn,closeDropdown:()=>mo,computePosition:()=>Lr,dropdownFunctions:()=>Px,fadeInTransform:()=>ri,openDropdown:()=>ep,setDropdownInert:()=>rp});var Px={openDropdown:ep,closeDropdown:mo,setDropdownInert:rp};var eM=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),rM=(t,e,r,n,o)=>{let s=eM(e,n,o),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},GA=(t,e,r)=>Math.max(e,Math.min(r,t)),YA=(t,e,r="bottom")=>{if(!t)return{left:0,top:0,side:"bottom"};let n=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s=rM(r,t,e,n,o),i,a;return s==="bottom"||s==="top"?(i=t.left+(t.width-e.width)/2,a=s==="bottom"?t.bottom+6:t.top-e.height-6):(a=t.top+(t.height-e.height)/2,i=s==="right"?t.right+6:t.left-e.width-6),i=GA(i,6,n-e.width-6),a=GA(a,6,o-e.height-6),{left:i,top:a,side:s}},XA=t=>{switch(t){case"bottom":return"translate3d(0, -10%, 0)";case"top":return"translate3d(0, 10%, 0)";case"left":return"translate3d(10%, 0, 0)";case"right":return"translate3d(-10%, 0, 0)";default:return"translate3d(0, -10%, 0)"}};var fp={placement:"bottom",theme:"dialog",delay:250,hideDelay:100},nM=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}},ZA=t=>t?.getRoot?.()?.TooltipRoot||null,JA=t=>{let e=t?.state?.tip;return e?typeof e.$parse=="function"?e.$parse():{...e}:null},QA=(t,e,r=0)=>{let n=JA(t);if(!n||n.id!==e||n.open===!1)return;let o=t.Panel?.node;if(!o||typeof o.getBoundingClientRect!="function")return;if(o.textContent!==(n.text||"")){r<3&&setTimeout(()=>QA(t,e,r+1),0);return}let s=o.getBoundingClientRect();t.state.update({tip:{...n,size:{width:s.width,height:s.height}}})},oM=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},sM=0,iM=()=>`tooltip_${++sM}_${Date.now().toString(36)}`;function tT(t={}){let e=ZA(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,n=t.anchorRect||nM(r);if(!n)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let o=t.id||iM(),s={id:o,text:t.text||"",anchor:n,placement:t.placement||fp.placement,theme:t.theme||fp.theme,open:!0,size:null};return e.state.update({tip:s}),oM(()=>QA(e,o)),o}function eT(t){let e=ZA(this);if(!e)return;let r=JA(e);if(!r||r.open===!1)return;let n=typeof t=="string"?t:t?.id;n&&r.id&&n!==r.id||e.state.update({tip:{...r,open:!1}})}var Lx=t=>{let e=t.tip;return e?.anchor?YA(e.anchor,e.size||{width:0,height:0},e.placement):null},up=t=>{let e=t.tip;return!!(e&&e.open!==!1&&e.size)},rT={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},role:"tooltip",position:"fixed",tip:(t,e)=>e?.tip||null,left:t=>{let e=Lx(t);return e?e.left+"px":"-9999px"},top:t=>{let e=Lx(t);return e?e.top+"px":"-9999px"},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||fp.theme,width:"max-content",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>up(t)?"1":"0",visibility:t=>up(t)?"visible":"hidden",transform:t=>{if(up(t))return"none";let e=Lx(t);return XA(e?e.side:"bottom")},transition:t=>{let e=up(t)?"A":"Z";return`${e} opacity defaultBezier, ${e} transform defaultBezier, ${e} visibility defaultBezier`}}};var Ix=t=>{if(!t.tooltipText)return;let e=t.node;e&&e.hasAttribute&&e.hasAttribute("title")&&e.removeAttribute("title")},aM=t=>{t.tooltipText&&(Ix(t),t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key}))},nT=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,aM(t)},t.tooltipDelay??250))},oT=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))},sT={onMouseenter:(t,e)=>nT(e),onMouseleave:(t,e)=>oT(e),onFocus:(t,e)=>nT(e),onBlur:(t,e)=>oT(e),onMouseover:(t,e)=>Ix(e),onFocusin:(t,e)=>Ix(e)};var iT={display:"flex",theme:"dialog",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>t.call("isDefined",t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"currentColor",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"currentColor",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},aT={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)},style:t=>{if(!t.scope||!t.scope.tooltipOpen)return{opacity:"",visibility:"",transform:""};let e=t.shapeDirection;return{opacity:"1",visibility:"visible",transform:e==="left"||e==="right"?"translate3d(0%,-50%,0)":"translate3d(-50%,0,0)"}},styleDeps:[t=>t.scope&&t.scope.tooltipOpen]},cT={position:"relative",zIndex:999,scope:{tooltipOpen:!1},onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,n=e||r;if(!n)return;let o=n&&n[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})},onPointerdown:(t,e)=>{t.pointerType!=="touch"||!e.scope||(e.scope.tooltipOpen=!e.scope.tooltipOpen)},onDocumentKeydown:(t,e)=>{t.key!=="Escape"||!e.scope||!e.scope.tooltipOpen||(e.scope.tooltipOpen=!1)},onDocumentPointerdown:(t,e)=>{!e.scope||!e.scope.tooltipOpen||e.node&&e.node.contains(t.target)||(e.scope.tooltipOpen=!1)}};var lT={TooltipRoot:rT,TooltipTrigger:sT,Tooltip:iT,TooltipHidden:aT,TooltipParent:cT};var fT={openTooltip:tT,closeTooltip:eT};var Fx=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),Nx=t=>mr(t)?t.library!==void 0?t.library:t.key??t.name:t,cM=(t,e)=>{let r=e?.sharedLibraries,n=Array.isArray(r)?r.map(i=>typeof i=="string"?i:i?.key||i?.name):r&&typeof r=="object"?Object.keys(r):null,o=0,s=i=>{let a=o++;if(typeof i.__libraryKey=="string"&&i.__libraryKey)return i.__libraryKey;if(n&&n[a])return n[a];if(typeof i.__stubId=="string"){let c=i.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(c)return c[1]}return null};return t.map(i=>{let a=Nx(i);if(!Fx(a))return i;let c=s(a);return c?mr(i)?{...i,library:c}:c:null}).filter(Boolean)},jx=new WeakMap,lM={lazy:!0,window:globalThis},uT=["components","pages","functions","methods","snippets"],$x=t=>{if(!t||typeof t!="object")return!1;let e=new WeakSet,r=[t];for(;r.length;){let n=r.pop();if(!n||typeof n!="object"||e.has(n))continue;e.add(n);let o;try{o=Object.keys(n)}catch{continue}for(let s of o){let i;try{i=n[s]}catch{continue}if(typeof i=="function")return!0;i&&typeof i=="object"&&r.push(i)}}return!1},fM=(t,e)=>{if(Cn(e)||Cn(t))return"boot-revived";if($x(t))return"local";if(e&&typeof e=="object"){if($x(e.app))return"local";for(let r of uT)if($x(e[r]))return"local"}return"raw-json"},dT=(t,e)=>{let r=e?t[e]:t;if(!v(r))return;let n=me(r,{},lM);try{Object.assign(r,n)}catch(o){if(e)t[e]=n;else throw o}},uM=t=>{if(!v(t)||Cn(t))return t;for(let e of[...uT,"app"])dT(t,e);return Ao(t)},dM=(t,e)=>{if(!Array.isArray(t))return t;for(let r of t){let n=mr(r)?r.library:r;v(n)&&!e.has(n)&&uM(n)}return t},Mx=t=>{let e=jx.get(t);e&&(jx.delete(t),$1(e))},pM=async(t,e={})=>{let r=e.symbolsConfig,n=r?.owner&&r?.key?`${r.owner}--${r.key}`:r?.key,o=e.key=e.key||n||(k(t)?t:"smblsapp");e.define=e.define||Fs,e.cssPropsRegistry=St,e.window=O1(e);let s=fM(t,e);if(e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(h=>{let m=Nx(h);return typeof m=="string"||Fx(m)})){e.sharedLibraries=cM(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:h}=await Promise.resolve().then(()=>(L(),Ko)),m=new Set(e.sharedLibraries.map(x=>Nx(x)).filter(x=>v(x)&&!Fx(x))),y=await h(e.sharedLibraries,{apiBaseUrl:X_()});e.sharedLibraries=s==="raw-json"?y:dM(y,m)}k1(e.sharedLibraries),U1(e)}ll(e,e.designSystem);let[i,a]=j1(o,e);e.designSystem=i,e.registry=a,e.cases||(e.cases={}),e.shorthand&&Hc.prepareContext(e);let c=B1(t,e);if(e.state=c,ia(c),e.pages=V1(t,e),e.components=R1(e),e.utils=P1(e),Ur[e.packageManager]){let p=I1(e);p&&p.deferred?(p.blocking&&await ox({...e,dependencies:p.blocking}),jx.set(e,p.deferred)):e.dependencies=await ox(e)}if(e.methods=D1(e),e.routerOptions=mE(t,e),e.defaultExtends=[Yu],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(p=>!p||typeof p!="object")){let p=e.plugins.filter(h=>!h||typeof h!="object");e.plugins=e.plugins.filter(h=>h&&typeof h=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${p.length} non-plugin entr${p.length===1?"y":"ies"} (${p.map(h=>JSON.stringify(h)).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&&v(e.globalScope)&&(e.globalScope=Ai(e.globalScope));let l=(p,h)=>{s==="raw-json"&&dT(p,h)};l(t),l(e,"components"),l(e,"pages"),l(e,"functions"),l(e,"methods"),l(e,"snippets"),l(e,"app");let f=p=>p&&typeof p.select=="function";e.fetch?.__resolved&&!f(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!f(e.db.__resolved)&&delete e.db.__resolved;let u=p=>e.plugins.some(h=>h&&h.name===p);if(e.polyglot&&!u("polyglot")){e.plugins.push(js);for(let p in Qc)typeof e.functions[p]!="function"&&(e.functions[p]=Qc[p])}if(u("helmet")||e.plugins.push(S_),e.fetch&&!u("fetch")&&e.plugins.push(Eg),e.designSystem?.typography?.useCapsize!==!1&&!u("capsize")&&(e.plugins.push(ld),e.cssPropsRegistry.useCapsize=E_),e.shorthand&&!u("shorthand")&&e.plugins.push(Hc),e.analyze&&!u("analyze")){let p=e.analyze===!0?{}:e.analyze;e.analyze=xd(p),e.plugins.push(Vs)}e.sync!==!1&&!u("sync")&&e.plugins.push(NA),e.inspect&&!u("inspect")&&e.plugins.push(G_),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!u("notifications")&&e.plugins.push(jA);let g=(p,h,m)=>{if(e[p]!==!1){for(let y in h)v(e.components[y])||(e.components[y]=h[y]);for(let y in m)typeof e.functions[y]!="function"&&(e.functions[y]=m[y])}};return g("windows",kx,Dr),g("dropdown",Ox,Px),g("tooltip",lT,fT),e},Bx=async(t,e)=>{v(e)||(e={}),dr(t)?(t={},e.parent=t):k(t)?(t={},e.key=t):v(t)||(t={});let r=e.window||(typeof window<"u"?window:null),n=r?.__BRENDER__,o=null;if(n){let c=e.document||(typeof document<"u"?document:null);c&&(o=Array.from(c.head.querySelectorAll("style")))}if(await pM(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&&v(e.app))for(let c in e.app)t[c]===void 0&&(t[c]=e.app[c]);t.extends=TE(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await M1({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 Mx(e),t;let i=e.parent||s.body;if(n){let c=hM(ee,t,i,e,r,o);return Mx(e),c}let a=ee(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return Mx(e),typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},hM=async(t,e,r,n,o,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,n.key,{verbose:n.verbose,context:n,...n.domqlOptions});return gM(o),c},gM=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var Vx=(t,e)=>it(t,v(e)?e:{}),mM=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 n=t.themeStorageKey;if(r==="auto"&&n&&typeof localStorage<"u")try{let s=localStorage.getItem(n);s&&(r=s)}catch{}let o=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",o),t.globalTheme=r,t.themeRoot=e},yM=()=>{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}},pT=t=>{let e=yM();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},Ux=(t,e=an,r)=>{let n={...an,...Vx(e,r)};return pT(n),mM(n),Bx(t,n).then(s=>{if(b_(s,n),s.destroy=()=>Ic(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Lc(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},s.onCreate&&!s.__ref&&s.onCreate(s,s.state,s.context,n),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})},bM=(t,e=an,r)=>{let n=Ux(t,e,r),o={...an,...Vx(e,r)},s=o.key;return xE(n,s,{utils:Dc,...o}),n},_M=async(t,e=an,r)=>{let n={...an,...Vx(e,r)};pT(n);let o=e.key;await _E(o,n);let s=await Bx(t,n);return b_(s,n),s.destroy=()=>Ic(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Lc(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},n.onCreate&&await n.onCreate(s,s.state,s.context,n),s},xM=(t={},e=an,r)=>Ux({deps:{isUndefined:Pt},...t},it({domqlOptions:{onlyResolveExtends:!0}},e),r);ed(uc);_1(void 0,{smbls:zx});x1(void 0,{"@symbo.ls/windows":()=>({...vx,...Sx}),"@symbo.ls/dropdown":()=>({...Rx,...Dx})});
|
|
175
|
+
`,OM=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=TM,document.head.appendChild(t)},fT=(t,e)=>{if(!t.node)return;let r=e?.background;if(!r)t.node.removeAttribute("data-smbls-surface");else{let n=/^[a-z][\w.+-]*$/i.test(r)?`var(--color-${r})`:r;t.node.style.setProperty("--smbls-dropdown-surface",n),t.node.setAttribute("data-smbls-surface","")}e?.theme?t.node.setAttribute("data-smbls-themed",""):t.node.removeAttribute("data-smbls-themed"),e?.shadow||t.scope?.bodyShadow?t.node.setAttribute("data-smbls-shadowed",""):t.node.removeAttribute("data-smbls-shadowed")},RM=t=>{if(!t)return null;let e=typeof t.shadow=="function"?t.shadow(t,t.state):t.shadow;return typeof e=="string"&&e?e:null},PM=t=>{t.node&&(t.node.removeAttribute("data-smbls-open"),t.node.offsetWidth,t.node.setAttribute("data-smbls-open","true"))},DM=[["role","role"],["aria-label","ariaLabel"],["aria-labelledby","ariaLabelledby"]],uT=(t,e)=>{if(!t.node)return;let r=new Set;for(let[n,o]of DM){let s=e?.[o];s&&(t.node.setAttribute(n,s),r.add(n))}if(t.__a11yAttrs)for(let n of t.__a11yAttrs)r.has(n)||t.node.removeAttribute(n);t.__a11yAttrs=r,t.__panelTabindex&&(t.node.removeAttribute("tabindex"),t.__panelTabindex=!1)},LM='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',IM=t=>{let e=t.node;if(e){for(let r of e.querySelectorAll(LM)){if(r.matches(":disabled"))continue;let n=r.getAttribute("tabindex");if(!(n!==null&&parseInt(n,10)<0)&&(r.focus({preventScroll:!0}),e.ownerDocument.activeElement===r))return}e.setAttribute("tabindex","-1"),t.__panelTabindex=!0,e.focus({preventScroll:!0})}},cp={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(OM(),typeof window>"u")return;let e=n=>{n.key!=="Escape"||n.defaultPrevented||t.state?.layer&&(n.preventDefault(),_o.call(t))};window.addEventListener("keydown",e),t.__dropdownEscHandler=e;let r=n=>{let o=t.state?.layer;if(!o)return;let s=t.node?.querySelector('[data-smbls-dropdown="panel"]');if(s&&s.contains(n.target))return;let i=o.anchor;if(i){let a=n.clientX,c=n.clientY;if(a>=i.left&&a<=i.right&&c>=i.top&&c<=i.bottom)return}_o.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 Lr(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 Lr(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":si(Lr(e.anchor,r,e.placement).side)}},minWidth:t=>t.parent?.layer?.minWidth||"180px",maxWidth:t=>t.parent?.layer?.maxWidth||"90vw",maxHeight:t=>{let e=t.parent?.layer;if(!e?.anchor)return"none";let r=t._lastSize||{width:280,height:200};return Iw(e,Lr(e.anchor,r,e.placement))},overflow:"auto",overscrollBehavior:"contain",padding:"0",round:t=>t.parent?.layer?.round||"radiusCard",theme:t=>t.parent?.layer?.theme||null,border:"none",borderWidth:"0",shadow:t=>t.parent?.layer?.shadow||t.scope?.bodyShadow||null,scope:{bodyShadow:null},animationDuration:"B",animationTimingFunction:"defaultBezier",pointerEvents:t=>{let e=t.parent?.layer;return e?e.inert?"none":"auto":"none"},opacity:t=>t.parent?.layer?"1":"0",onClick:t=>t.stopPropagation(),onInit:t=>{let e=Y(()=>{let r=t.parent?.layer,n=r?.content||null,o=r?.id||null;if(!n){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null,uT(t,null),t.node?.removeAttribute("data-smbls-open"),t.scope&&(t.scope.bodyShadow=null)}return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(n)}catch(s){console.warn("[dropdown] content set failed:",s)}t.scope&&(t.scope.bodyShadow=RM(t.content)),fT(t,r),uT(t,r),PM(t),r.focusIn&&IM(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;fT(t,r);let s=t.parent?.layer;if(!s?.anchor)return;let i=lT(t.node);t._lastSize=i;let a=Lr(s.anchor,i,s.placement);t.node.style.maxHeight=Iw(s,a),t.node.style.left=a.left+"px",t.node.style.top=a.top+"px",t.node.style.setProperty("--smbls-dropdown-from",si(a.side))})}});t.__ref&&t.__ref.__effects?.push(e)},onRender:t=>{if(!t?.node)return;let e=t.parent?.layer;if(!e?.anchor)return;let r=lT(t.node),n=t._lastSize;(!n||Math.abs(n.width-r.width)>1||Math.abs(n.height-r.height)>1)&&(t._lastSize=r);let o=Lr(e.anchor,r,e.placement);t.node.style.maxHeight=Iw(e,o),t.node.style.left=o.left+"px",t.node.style.top=o.top+"px",t.node.style.setProperty("--smbls-dropdown-from",si(o.side))}}}};var $w=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 n in r)r[n]===void 0&&delete r[n];t.call("openDropdown",r)},lp={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),$w(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&$w(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>$w(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var fp={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"},up={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"}}},dp={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},pp={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()}}},hp={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 Mw={DropdownRoot:cp,DropdownTrigger:lp,Dropdown:fp,DropdownList:up,DropdownParent:dp,DropdownParentFocus:pp,DropdownSiblingFocus:hp};var jw={};M(jw,{DROPDOWN_DEFAULTS:()=>mn,closeDropdown:()=>_o,computePosition:()=>Lr,dropdownFunctions:()=>Nw,fadeInTransform:()=>si,openDropdown:()=>ip,setDropdownInert:()=>ap});var Nw={openDropdown:ip,closeDropdown:_o,setDropdownInert:ap};var $M=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),MM=(t,e,r,n,o)=>{let s=$M(e,n,o),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},dT=(t,e,r)=>Math.max(e,Math.min(r,t)),pT=(t,e,r="bottom")=>{if(!t)return{left:0,top:0,side:"bottom"};let n=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s=MM(r,t,e,n,o),i,a;return s==="bottom"||s==="top"?(i=t.left+(t.width-e.width)/2,a=s==="bottom"?t.bottom+6:t.top-e.height-6):(a=t.top+(t.height-e.height)/2,i=s==="right"?t.right+6:t.left-e.width-6),i=dT(i,6,n-e.width-6),a=dT(a,6,o-e.height-6),{left:i,top:a,side:s}},hT=t=>{switch(t){case"bottom":return"translate3d(0, -10%, 0)";case"top":return"translate3d(0, 10%, 0)";case"left":return"translate3d(10%, 0, 0)";case"right":return"translate3d(-10%, 0, 0)";default:return"translate3d(0, -10%, 0)"}};var gp={placement:"bottom",theme:"dialog",delay:250,hideDelay:100},FM=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}},gT=t=>t?.getRoot?.()?.TooltipRoot||null,mT=t=>{let e=t?.state?.tip;return e?typeof e.$parse=="function"?e.$parse():{...e}:null},yT=(t,e,r=0)=>{let n=mT(t);if(!n||n.id!==e||n.open===!1)return;let o=t.Panel?.node;if(!o||typeof o.getBoundingClientRect!="function")return;if(o.textContent!==(n.text||"")){r<3&&setTimeout(()=>yT(t,e,r+1),0);return}let s=o.getBoundingClientRect();t.state.update({tip:{...n,size:{width:s.width,height:s.height}}})},NM=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},jM=0,BM=()=>`tooltip_${++jM}_${Date.now().toString(36)}`;function bT(t={}){let e=gT(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,n=t.anchorRect||FM(r);if(!n)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let o=t.id||BM(),s={id:o,text:t.text||"",anchor:n,placement:t.placement||gp.placement,theme:t.theme||gp.theme,open:!0,size:null};return e.state.update({tip:s}),NM(()=>yT(e,o)),o}function _T(t){let e=gT(this);if(!e)return;let r=mT(e);if(!r||r.open===!1)return;let n=typeof t=="string"?t:t?.id;n&&r.id&&n!==r.id||e.state.update({tip:{...r,open:!1}})}var Bw=t=>{let e=t.tip;return e?.anchor?pT(e.anchor,e.size||{width:0,height:0},e.placement):null},mp=t=>{let e=t.tip;return!!(e&&e.open!==!1&&e.size)},wT={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},role:"tooltip",position:"fixed",tip:(t,e)=>e?.tip||null,left:t=>{let e=Bw(t);return e?e.left+"px":"-9999px"},top:t=>{let e=Bw(t);return e?e.top+"px":"-9999px"},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||gp.theme,width:"max-content",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>mp(t)?"1":"0",visibility:t=>mp(t)?"visible":"hidden",transform:t=>{if(mp(t))return"none";let e=Bw(t);return hT(e?e.side:"bottom")},transition:t=>{let e=mp(t)?"A":"Z";return`${e} opacity defaultBezier, ${e} transform defaultBezier, ${e} visibility defaultBezier`}}};var Vw=t=>{if(!t.tooltipText)return;let e=t.node;e&&e.hasAttribute&&e.hasAttribute("title")&&e.removeAttribute("title")},VM=t=>{t.tooltipText&&(Vw(t),t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key}))},ST=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,VM(t)},t.tooltipDelay??250))},xT=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))},kT={onMouseenter:(t,e)=>ST(e),onMouseleave:(t,e)=>xT(e),onFocus:(t,e)=>ST(e),onBlur:(t,e)=>xT(e),onMouseover:(t,e)=>Vw(e),onFocusin:(t,e)=>Vw(e)};var vT={display:"flex",theme:"dialog",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>t.call("isDefined",t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"currentColor",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"currentColor",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},CT={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)},style:t=>{if(!t.scope||!t.scope.tooltipOpen)return{opacity:"",visibility:"",transform:""};let e=t.shapeDirection;return{opacity:"1",visibility:"visible",transform:e==="left"||e==="right"?"translate3d(0%,-50%,0)":"translate3d(-50%,0,0)"}},styleDeps:[t=>t.scope&&t.scope.tooltipOpen]},ET={position:"relative",zIndex:999,scope:{tooltipOpen:!1},onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,n=e||r;if(!n)return;let o=n&&n[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})},onPointerdown:(t,e)=>{t.pointerType!=="touch"||!e.scope||(e.scope.tooltipOpen=!e.scope.tooltipOpen)},onDocumentKeydown:(t,e)=>{t.key!=="Escape"||!e.scope||!e.scope.tooltipOpen||(e.scope.tooltipOpen=!1)},onDocumentPointerdown:(t,e)=>{!e.scope||!e.scope.tooltipOpen||e.node&&e.node.contains(t.target)||(e.scope.tooltipOpen=!1)}};var AT={TooltipRoot:wT,TooltipTrigger:kT,Tooltip:vT,TooltipHidden:CT,TooltipParent:ET};var TT={openTooltip:bT,closeTooltip:_T};var Hw=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),Ww=t=>er(t)?t.library!==void 0?t.library:t.key??t.name:t,UM=(t,e)=>{let r=e?.sharedLibraries,n=Array.isArray(r)?r.map(i=>typeof i=="string"?i:i?.key||i?.name):r&&typeof r=="object"?Object.keys(r):null,o=0,s=i=>{let a=o++;if(typeof i.__libraryKey=="string"&&i.__libraryKey)return i.__libraryKey;if(n&&n[a])return n[a];if(typeof i.__stubId=="string"){let c=i.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(c)return c[1]}return null};return t.map(i=>{let a=Ww(i);if(!Hw(a))return i;let c=s(a);return c?er(i)?{...i,library:c}:c:null}).filter(Boolean)},qw=new WeakMap,zM={lazy:!0,window:globalThis},OT=["components","pages","functions","methods","snippets"],Uw=t=>{if(!t||typeof t!="object")return!1;let e=new WeakSet,r=[t];for(;r.length;){let n=r.pop();if(!n||typeof n!="object"||e.has(n))continue;e.add(n);let o;try{o=Object.keys(n)}catch{continue}for(let s of o){let i;try{i=n[s]}catch{continue}if(typeof i=="function")return!0;i&&typeof i=="object"&&r.push(i)}}return!1},HM=(t,e)=>{if(En(e)||En(t))return"boot-revived";if(Uw(t))return"local";if(e&&typeof e=="object"){if(Uw(e.app))return"local";for(let r of OT)if(Uw(e[r]))return"local"}return"raw-json"},RT=(t,e)=>{let r=e?t[e]:t;if(!v(r))return;let n=Jt(r,{},zM);try{Object.assign(r,n)}catch(o){if(e)t[e]=n;else throw o}},WM=t=>{if(!v(t)||En(t))return t;for(let e of[...OT,"app"])RT(t,e);return Ro(t)},qM=(t,e)=>{if(!Array.isArray(t))return t;for(let r of t){let n=er(r)?r.library:r;v(n)&&!e.has(n)&&WM(n)}return t},zw=t=>{let e=qw.get(t);e&&(qw.delete(t),Q1(e))},KM=async(t,e={})=>{let r=e.symbolsConfig,n=r?.owner&&r?.key?`${r.owner}--${r.key}`:r?.key,o=e.key=e.key||n||(x(t)?t:"smblsapp");e.define=e.define||Bs,e.cssPropsRegistry=xt,e.window=K1(e);let s=HM(t,e);if(e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(m=>{let y=Ww(m);return typeof y=="string"||Hw(y)})){e.sharedLibraries=UM(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:m}=await Promise.resolve().then(()=>(L(),Xo)),y=new Set(e.sharedLibraries.map(b=>Ww(b)).filter(b=>v(b)&&!Hw(b))),w=await m(e.sharedLibraries,{apiBaseUrl:nw()});e.sharedLibraries=s==="raw-json"?w:qM(w,y)}V1(e.sharedLibraries),iA(e)}pl(e,e.designSystem);let[i,a]=nA(o,e);e.designSystem=i,e.registry=a,e.cases||(e.cases={}),e.shorthand&&Gc.prepareContext(e);let c=oA(t,e);if(e.state=c,la(c),e.pages=sA(t,e),e.components=G1(e),e.utils=Y1(e),Ur[e.packageManager]){let p=J1(e);p&&p.deferred?(p.blocking&&await uw({...e,dependencies:p.blocking}),qw.set(e,p.deferred)):e.dependencies=await uw(e)}if(e.methods=X1(e),e.routerOptions=IE(t,e),e.defaultExtends=[td],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(p=>!p||typeof p!="object")){let p=e.plugins.filter(m=>!m||typeof m!="object");e.plugins=e.plugins.filter(m=>m&&typeof m=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${p.length} non-plugin entr${p.length===1?"y":"ies"} (${p.map(m=>JSON.stringify(m)).join(", ")}) \u2014 dropped. A published project that imports a framework plugin it does not declare ships a stub phantom here; the runtime registers polyglot/helmet/fetch/... itself from the context config, so remove the import instead.`)}let l=e.globalScope;e.globalScope&&v(e.globalScope)&&(e.globalScope=An(e.globalScope));let f=(p,m)=>{s==="raw-json"&&RT(p,m)};f(t),f(e,"components"),f(e,"pages"),f(e,"functions"),f(e,"methods"),f(e,"snippets"),f(e,"app"),va(e,l);let u=p=>p&&typeof p.select=="function";e.fetch?.__resolved&&!u(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!u(e.db.__resolved)&&delete e.db.__resolved;let d=p=>e.plugins.some(m=>m&&m.name===p);if(e.polyglot&&!d("polyglot")){e.plugins.push(Us);for(let p in nl)typeof e.functions[p]!="function"&&(e.functions[p]=nl[p])}if(d("helmet")||e.plugins.push(O_),e.fetch&&!d("fetch")&&e.plugins.push(Rg),e.designSystem?.typography?.useCapsize!==!1&&!d("capsize")&&(e.plugins.push(hd),e.cssPropsRegistry.useCapsize=L_),e.shorthand&&!d("shorthand")&&e.plugins.push(Gc),e.analyze&&!d("analyze")){let p=e.analyze===!0?{}:e.analyze;e.analyze=Cd(p),e.plugins.push(Hs)}e.sync!==!1&&!d("sync")&&e.plugins.push(rT),e.inspect&&!d("inspect")&&e.plugins.push(ew),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!d("notifications")&&e.plugins.push(nT);let h=(p,m,y)=>{if(e[p]!==!1){for(let w in m)v(e.components[w])||(e.components[w]=m[w]);for(let w in y)typeof e.functions[w]!="function"&&(e.functions[w]=y[w])}};return h("windows",Rw,Dr),h("dropdown",Mw,Nw),h("tooltip",AT,TT),e},Kw=async(t,e)=>{v(e)||(e={}),hr(t)?(t={},e.parent=t):x(t)?(t={},e.key=t):v(t)||(t={});let r=e.window||(typeof window<"u"?window:null),n=r?.__BRENDER__,o=null;if(n){let c=e.document||(typeof document<"u"?document:null);c&&(o=Array.from(c.head.querySelectorAll("style")))}if(await KM(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&&v(e.app))for(let c in e.app)t[c]===void 0&&(t[c]=e.app[c]);t.extends=qE(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await tA({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 zw(e),t;let i=e.parent||s.body;if(n){let c=GM(ne,t,i,e,r,o);return zw(e),c}let a=ne(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return zw(e),typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},GM=async(t,e,r,n,o,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,n.key,{verbose:n.verbose,context:n,...n.domqlOptions});return YM(o),c},YM=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var Gw=(t,e)=>it(t,v(e)?e:{}),XM=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 n=t.themeStorageKey;if(r==="auto"&&n&&typeof localStorage<"u")try{let s=localStorage.getItem(n);s&&(r=s)}catch{}let o=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",o),t.globalTheme=r,t.themeRoot=e},ZM=()=>{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}},PT=t=>{let e=ZM();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},Yw=(t,e=cn,r)=>{let n={...cn,...Gw(e,r)};return PT(n),XM(n),Kw(t,n).then(s=>{if(C_(s,n),s.destroy=()=>Nc(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Fc(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},s.onCreate&&!s.__ref&&s.onCreate(s,s.state,s.context,n),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})},JM=(t,e=cn,r)=>{let n=Yw(t,e,r),o={...cn,...Gw(e,r)},s=o.key;return NE(n,s,{utils:Mc,...o}),n},QM=async(t,e=cn,r)=>{let n={...cn,...Gw(e,r)};PT(n);let o=e.key;await FE(o,n);let s=await Kw(t,n);return C_(s,n),s.destroy=()=>Nc(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Fc(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},n.onCreate&&await n.onCreate(s,s.state,s.context,n),s},tF=(t={},e=cn,r)=>Yw({deps:{isUndefined:Pt},...t},it({domqlOptions:{onlyResolveExtends:!0}},e),r);id(gc);F1(void 0,{smbls:Xw});N1(void 0,{"@symbo.ls/windows":()=>({...Pw,...Ow}),"@symbo.ls/dropdown":()=>({...Fw,...jw})});
|