smbls 3.14.786 → 3.14.788
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 +41 -41
- package/dist/smbls.embed.iife.js +11 -11
- package/dist/smbls.esm.js +41 -41
- package/dist/smbls.iife-string.js +2 -2
- package/dist/smbls.iife.js +41 -41
- package/index.js +38 -1
- package/package.json +1 -1
package/dist/smbls.cjs
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
`),o=-1,n=-1,s=-1,i=-1,a=new RegExp(`\\b${e}\\b\\s*:\\s*`),c=0,l=!1;for(let f=0;f<r.length;f++)if(a.test(r[f])&&!l){if(l=!0,o=f+1,s=r[f].indexOf(e)+1,r[f].includes("{}")){n=o,i=r[f].indexOf("{}")+3;break}let u=r[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{n=f+1,i=r[f].length+1;break}}else if(l&&(c+=(r[f].match(/{/g)||[]).length,c+=(r[f].match(/\[/g)||[]).length,c-=(r[f].match(/}/g)||[]).length,c-=(r[f].match(/]/g)||[]).length,c===0)){n=f+1,i=r[f].lastIndexOf("}")!==-1?r[f].lastIndexOf("}")+2:r[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:o,endLineNumber:n}},
|
|
3
|
-
`).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),
|
|
4
|
-
`;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=!1;for(let l=0;l<s.length;l++)if(
|
|
1
|
+
"use strict";var mC=Object.create;var ic=Object.defineProperty;var yC=Object.getOwnPropertyDescriptor;var bC=Object.getOwnPropertyNames;var _C=Object.getPrototypeOf,xC=Object.prototype.hasOwnProperty;var F=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(o){throw r=[o],o}};var Vu=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},P=(t,e)=>{for(var r in e)ic(t,r,{get:e[r],enumerable:!0})},Cb=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of bC(e))!xC.call(t,n)&&n!==r&&ic(t,n,{get:()=>e[n],enumerable:!(o=yC(e,n))||o.enumerable});return t};var wC=(t,e,r)=>(r=t!=null?mC(_C(t)):{},Cb(e||!t||!t.__esModule?ic(r,"default",{value:t,enumerable:!0}):r,t)),SC=t=>Cb(ic({},"__esModule",{value:!0}),t);var ad,cd,v,Q,ms=F(()=>{"use strict";ad=globalThis,cd=globalThis,v=globalThis,Q=v.document});var Je,ys,Ht,bs=F(()=>{"use strict";ms();Je=t=>(typeof Node=="object"?t instanceof v.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,ys=t=>(typeof HTMLElement=="object"?t instanceof v.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,Ht=t=>typeof v<"u"&&(v.Node&&t instanceof v.Node||v.Window&&t instanceof v.Window||t===v||Q!==void 0&&t===Q)});var S,w,Me,A,bc,_c,O,xc,H,bt,Tt,_s,zt,ld,Ot=F(()=>{"use strict";bs();S=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,w=t=>typeof t=="string",Me=t=>typeof t=="number",A=t=>typeof t=="function",bc=t=>t===!0||t===!1,_c=t=>t===null,O=t=>Array.isArray(t),xc=t=>t instanceof Date,H=t=>t===null?!1:typeof t=="object",bt=t=>t!==void 0,Tt=t=>t===void 0,_s={boolean:bc,array:O,object:S,string:w,date:xc,number:Me,null:_c,function:A,objectLike:H,node:Je,htmlElement:ys,defined:bt},zt=t=>(...e)=>e.some(r=>_s[r](t)),ld=t=>(...e)=>!e.some(r=>_s[r](t))});var fd,ud,dd,pd,jo,xs,hd,gd,ws,md,yd,bd,_d,xd,wd,Sd,Bo,Ss,Uo=F(()=>{"use strict";Ze();Ot();fd=(t,e)=>e.every(r=>t.includes(r)),ud=(t,e)=>{let r=0;for(let o=0;o<t.length;o++)t[o]===e&&r++;return r},dd=(t,e)=>{if(w(e)&&(e=parseInt(e)),Me(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},pd=(t,e,r)=>{e<0||r<0||e>=t.length||r>=t.length||([t[e],t[r]]=[t[r],t[e]])},jo=(...t)=>[].concat(...t),xs=(t,e=[])=>t.reduce((r,o)=>st(r,dt(o,{exclude:e}),e),{}),hd=(t,e)=>{let r=t.indexOf(e);return r!==-1?t.slice(0,r):t},gd=(t,e)=>{if(!O(t))return;let r=t.indexOf(e);return r!==-1?t.slice(r+1):t},ws=(t,e)=>{let r=t.indexOf(e);if(r>-1){let o=[...t];return o.splice(r,1),o}return t},md=(t,e)=>t.filter(r=>r!==e),yd=(t,e)=>{let r=[];for(let o=0;o<t.length;o++)r.push(t[o]),o<t.length-1&&r.push(e);return r},bd=(t,e,r)=>{let o=[...t],n=o.indexOf(e),s=o.indexOf(r);if(n!==-1&&s!==-1){let i=o.splice(n,1)[0],a=s<n?s:s+1;o.splice(a,0,i)}return o},_d=(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},xd=(t,e)=>t.filter(r=>!e.includes(r)),wd=(t,e)=>{let r=new Set(e);return t.filter(o=>!r.has(o))},Sd=(t,e)=>{if(!t)return 0;let r=0;for(let o=0;o<e.length;o++)t.includes(e[o])&&r++;return r},Bo=t=>O(t)?[...new Set(t)]:t,Ss=(t,e)=>{for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!1,configurable:!0,writable:!0})}});function Jr(t,e,r={}){let{bracketsLength:o=2}=r,n=o===3?"{{{":"{{";if(!t.includes(n))return t;let s=jC[o],i=e||this.state||{},a=this;return t.replace(s,(c,l,f,u)=>{let d=f.trim();if(u){let h=a?.context,g=h?.functions?.[u]||h?.utils?.[u]||h?.methods?.[u]||h?.snippets?.[u]||a?.[u];if(g&&typeof g=="function")try{return String(g.call(a,d)??"")}catch{return""}return""}if(l){let h=(l.match(/\.\.\//g)||[]).length,g=i;for(let m=0;m<h;m++){if(!g||!g.parent)return"";g=g.parent}if(d==="parent")return String(g.value??"");let p=ks(g,d);return String(p??"")}else{let h=ks(i,d);if(h!=null)return String(h);let g=a?.context?.polyglot;if(g?.translations){let p=i?.root?.lang||i?.lang||a?.context?.state?.lang||g.defaultLang||"en",m=g.translations[p];if(m){let _=ks(m,d);if(_!=null&&typeof _!="object")return String(_);for(let y in m){let x=m[y];if(x&&typeof x=="object"&&!Array.isArray(x)){let k=ks(x,d);if(k!=null&&typeof k!="object")return String(k)}}}let b=ks(g.translations,d);if(b!=null&&typeof b!="object")return String(b)}return""}})}var vs,kd,jC,ks,Zr,vd,BC,Cd,Ed,Ad,UC,Td,Od,Cs=F(()=>{"use strict";vs=(t,e)=>{for(let r of e)if(t.includes(r))return!0;return!1},kd=(t,e)=>{let r=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(r,"")},jC={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},ks=(t,e)=>e.split(".").reduce((r,o)=>r?.[o],t);Zr=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,vd=(t,e)=>{let r=t.split(`
|
|
2
|
+
`),o=-1,n=-1,s=-1,i=-1,a=new RegExp(`\\b${e}\\b\\s*:\\s*`),c=0,l=!1;for(let f=0;f<r.length;f++)if(a.test(r[f])&&!l){if(l=!0,o=f+1,s=r[f].indexOf(e)+1,r[f].includes("{}")){n=o,i=r[f].indexOf("{}")+3;break}let u=r[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{n=f+1,i=r[f].length+1;break}}else if(l&&(c+=(r[f].match(/{/g)||[]).length,c+=(r[f].match(/\[/g)||[]).length,c-=(r[f].match(/}/g)||[]).length,c-=(r[f].match(/]/g)||[]).length,c===0)){n=f+1,i=r[f].lastIndexOf("}")!==-1?r[f].lastIndexOf("}")+2:r[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:o,endLineNumber:n}},BC=/\\([0-7]{1,3})/g,Cd=t=>t.replace(BC,(e,r)=>String.fromCharCode(parseInt(r,8))),Ed=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),Ad=t=>t.replace(/\/\/\/\/\/n/g,`
|
|
3
|
+
`).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),UC=/[^a-zA-Z0-9\s]/g,Td=t=>t.replace(UC,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),Od=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var mr,Es,Rd,Qr,yr,Vo,As,Pd,Ho=F(()=>{"use strict";mr=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"]),Es=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),Rd=["ref","parent","__element","__depends","__ref","__children","root"],Qr=new Set(["update","parse","clean","create","destroy","add","toggle","remove","apply","set","reset","replace","quietReplace","quietUpdate","applyReplace","applyFunction","keys","values","ref","rootUpdate","parentUpdate","parent","__element","__depends","__ref","__children","root","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath"]),yr=new Set(["update","__element"]),Vo=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"]),As=new Set(["node","context","extends","__element","__ref",...Vo,...Qr,...yr]),Pd=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var Nb,to,ft,Id,gt,st,Ub,Dd,dt,Ts,VC,Os,HC,zC,WC,Fe,qC,KC,jb,ce,GC,YC,Vb,Hb,Bb,Rs,$d,Ld,wc,Md,Fd,Ps,eo,Wt,Sc,XC,Nd,jd,kc,Bd,Ud,Vd,Hd,zd,Wd,qd,Ze=F(()=>{"use strict";ms();Ot();Uo();Cs();bs();Ho();Nb="production",to=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,ft=(t,e,r,o)=>{if(A(t))return e?typeof t.call!="function"?t:t.call(e,e,r||e.state,o||e.context):void 0;if(t!=null&&e?.context?.plugins&&(O(t)||S(t)&&!Ht(t))){let n=e.context.plugins;for(let s of n)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return ft(i,e,r,o)}}return t},Id=(t,e,r)=>{for(let o in e)t[o]=ft(e[o],r)},gt=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(to(n)||(o?r.has(n):r.includes(n))||t[n]===void 0&&(t[n]=e[n]));return t},st=(t,e,r=As)=>Ub(t,e,r,null),Ub=(t,e,r,o)=>{if(t===e)return t;if(o){for(let s=0;s<o.length;s+=2)if(o[s]===t&&o[s+1]===e)return t}let n=r instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||to(s)||s==="constructor"||s==="prototype"||(n?r.has(s):r.includes(s)))continue;let i=t[s],a=e[s];if(H(i)&&H(a)){let c=o||[];c.push(t,e),Ub(i,a,r,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},Dd=(t,e=[])=>{let r=e instanceof Set,o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(to(n)||(r?e.has(n):e.includes(n))||(o[n]=t[n]));return o},dt=(t,e={})=>{let{exclude:r=[],cleanUndefined:o=!1,cleanNull:n=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!H(t)||Ht(t))return t;if(s.has(t))return s.get(t);let a=r instanceof Set?r:r.length>3?new Set(r):null,c=u=>a?a.has(u):r.includes(u),l=O(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let h in u){if(!Object.prototype.hasOwnProperty.call(u,h)||to(h)||h==="__proto__"||c(h))continue;let g=u[h];if(!(o&&g===void 0)&&!(n&&g===null)){if(Ht(g)){d[h]=g;continue}if(i&&h==="extends"&&O(g)){d[h]=xs(g,r);continue}if(A(g)){d[h]=g;continue}if(H(g))if(s.has(g))d[h]=s.get(g);else{let p=O(g)?[]:{};s.set(g,p),d[h]=p,f.push([g,p])}else d[h]=g}}}return l},Ts=(t,e={})=>{(t.node||t.__ref||t.parent||t.__element||t.parse)&&((t.__element||t.parent?.__element).warn("Trying to clone element or state at",t),t=t.parse?.());for(let r in t){let o=t[r];if(A(o))e[r]=o.toString();else if(S(o))e[r]={},Ts(o,e[r]);else if(O(o)){let n=e[r]=[];for(let s=0;s<o.length;s++){let i=o[s];S(i)?(n[s]={},Ts(i,n[s])):A(i)?n[s]=i.toString():n[s]=i}}else e[r]=o}return e},VC=new Set(["&","*","-",":","%","{","}",">","<","@",".","/","!"," "]),Os=(t={},e=0)=>{if(t===null||typeof t!="object"||t instanceof RegExp)return String(t);let r=!1;for(let s in t){r=!0;break}if(!r)return"{}";let o=" ".repeat(e),n=`{
|
|
4
|
+
`;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=!1;for(let l=0;l<s.length;l++)if(VC.has(s[l])){a=!0;break}let c=a?`'${s}'`:s;if(n+=`${o} ${c}: `,i instanceof RegExp)n+=String(i);else if(O(i)){n+=`[
|
|
5
5
|
`;for(let l of i)l instanceof RegExp?n+=`${o} ${String(l)},
|
|
6
|
-
`:
|
|
6
|
+
`:H(l)&&l!==null?n+=`${o} ${Os(l,e+2)},
|
|
7
7
|
`:w(l)?n+=`${o} '${l}',
|
|
8
8
|
`:n+=`${o} ${l},
|
|
9
|
-
`;n+=`${o} ]`}else
|
|
9
|
+
`;n+=`${o} ]`}else H(i)?n+=Os(i,e+1):w(i)?n+=vs(i,[`
|
|
10
10
|
`,"'"])?`\`${i}\``:`'${i}'`:n+=i;n+=`,
|
|
11
|
-
`}return n+=`${o}}`,n},
|
|
11
|
+
`}return n+=`${o}}`,n},HC=[/^\(\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]*\}$/],zC=/^["[{]/,WC=/^(export|import)\s/,Fe=t=>{if(!t)return!1;let e=t.trim().replace(/\n\s*/g," ").trim();if(e===""||e==="{}"||e==="[]"||WC.test(e)||!HC.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0),n=e.includes("=>");return!(o===123&&!n||o===91||zC.test(e)&&!n)},qC=t=>(0,eval)(t),KC=(t,e)=>{let r=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(t);if(!r)return null;let o=r[0].length,n=[],s=o,i=1,a=null,c=t.length,l=new RegExp("^(?:const|let|var)\\s+"+e+"\\b");for(;s<c&&i>0;){let u=t[s];if(u==="/"&&t[s+1]==="/"){let d=t.indexOf(`
|
|
12
12
|
`,s);s=d===-1?c:d;continue}if(u==="/"&&t[s+1]==="*"){let d=t.indexOf("*/",s+2);s=d===-1?c:d+2;continue}if(u==='"'||u==="'"||u==="`"){let d=u;for(s++;s<c;){if(t[s]==="\\"){s+=2;continue}if(t[s]===d){s++;break}if(d==="`"&&t[s]==="$"&&t[s+1]==="{"){s+=2;let h=1;for(;s<c&&h>0;)t[s]==="{"?h++:t[s]==="}"&&h--,s++;continue}s++}continue}if(u==="{"){i++,s++;continue}if(u==="}"){i--,s++;continue}if(i===1&&l.test(t.slice(s))){let d=s,h=0,g=s;for(;g<c;){let p=t[g];if(p==='"'||p==="'"||p==="`"){let m=p;for(g++;g<c;){if(t[g]==="\\"){g+=2;continue}if(t[g]===m){g++;break}g++}continue}if(p==="("||p==="["||p==="{"){h++,g++;continue}if(p===")"||p==="]"||p==="}"){if(h===0)break;h--,g++;continue}if(h===0&&(p===";"||p===`
|
|
13
|
-
`)){g++;break}g++}n.push([d,g]),s=g;continue}s++}if(!n.length)return null;let f=t;for(let u=n.length-1;u>=0;u--)f=f.slice(0,n[u][0])+f.slice(n[u][1]);return f},
|
|
14
|
-
First 200 chars of source: `+String(t).slice(0,200)),t)}},
|
|
13
|
+
`)){g++;break}g++}n.push([d,g]),s=g;continue}s++}if(!n.length)return null;let f=t;for(let u=n.length-1;u>=0;u--)f=f.slice(0,n[u][0])+f.slice(n[u][1]);return f},jb=(t,e,r)=>{let o=String(t).trimStart();if(/^(export|import)\s/.test(o))return t;try{return r.window.eval(`(${t})`)}catch(n){let s=n&&n.message?n.message:String(n),i=/await is only valid in async/.test(s),a=/Identifier '([^']+)' has already been declared/.exec(s),c=null;if(i){let l=String(t).trim();if(/^function[\s(]/.test(l))try{c=r.window.eval("(async "+l+")")}catch{}}else if(a){let l=String(t),f=a[1];for(let u=0;u<5;u++){let d=KC(l,f);if(!d||d===l)break;l=d;try{c=r.window.eval("("+l+")");break}catch(h){let g=/Identifier '([^']+)' has already been declared/.exec(h&&h.message||String(h));if(!g||g[1]!==f)break}}}if(!c&&/Unexpected (token '\{'|identifier)/.test(s))try{let l=r.window.eval("({"+t+"})");if(l&&typeof l=="object"){let f=Object.keys(l);f.length===1&&typeof l[f[0]]=="function"&&(c=l[f[0]])}}catch{}return c||(typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: eval failed on ${e} \u2014 value will be left as a string. Reason: `+s+`.
|
|
14
|
+
First 200 chars of source: `+String(t).slice(0,200)),t)}},ce=(t,e={},r={window:{eval:qC}})=>{if(!t||typeof t!="object")return e;let o=[[t,e]];for(;o.length;){let[n,s]=o.pop();for(let i in n){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let a=n[i];if(w(a))Fe(a)?s[i]=jb(a,`"${i}"`,r):s[i]=a;else if(O(a)){let c=s[i]=[];for(let l=0;l<a.length;l++){let f=a[l];if(w(f))c.push(Fe(f)?jb(f,`array index ${l} (prop "${i}")`,r):f);else if(S(f)){let u=Bb(f);if(u)c.push(u);else{let d={};c.push(d),o.push([f,d])}}else c.push(f)}}else if(S(a)){let c=Bb(a);if(c){s[i]=c;continue}let l=s[i]&&typeof s[i]=="object"&&!O(s[i])?s[i]:s[i]={};o.push([a,l])}else s[i]=a}}return e},GC="Set",YC="Map",Vb="RegExp",Hb=t=>{if(!t||typeof t!="object")return t;if(t.__type===GC&&Array.isArray(t.values))return new Set(t.values);if(t.__type===YC&&Array.isArray(t.entries))return new Map(t.entries);if(t.__type===Vb&&w(t.source))try{return new RegExp(t.source,w(t.flags)?t.flags:"")}catch{return t}return t},Bb=t=>{if(!t||typeof t!="object"||t.__type!==Vb)return null;let e=Hb(t);return e instanceof RegExp?e:null},Rs=t=>{if(!t||typeof t!="object")return t;let e={},r=[];for(let i of Object.keys(t)){let a=t[i];w(a)&&Fe(a)?r.push([i,a]):e[i]=Hb(a)}if(r.length===0)return e;let o=i=>/^[A-Za-z_$][\w$]*$/.test(i),n=r.filter(([i])=>o(i)),s=Object.keys(e).filter(o).map(i=>`var ${i} = __gs__[${JSON.stringify(i)}];`).join(`
|
|
15
15
|
`);try{let i=n.map(([l,f])=>`var ${l} = (${f});`).join(`
|
|
16
16
|
`),a="{ "+n.map(([l])=>`${JSON.stringify(l)}: ${l}`).join(", ")+" }",c=v.eval(`(function(__gs__) { ${s}
|
|
17
17
|
${i}
|
|
18
18
|
return ${a}; })`)(e);Object.assign(e,c)}catch{for(let[a,c]of n)try{let l=Object.keys(e).filter(o).map(f=>`var ${f} = __gs__[${JSON.stringify(f)}];`).join(`
|
|
19
19
|
`);e[a]=v.eval(`(function(__gs__) { ${l}
|
|
20
|
-
return (${c}); })`)(e)}catch{try{e[a]=v.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of r)if(!o(i))try{e[i]=v.eval(`(${a})`)}catch{e[i]=a}return e},rd=(t,e={verbose:!0})=>{try{return t?v.eval("("+t+")"):{}}catch(r){e.verbose&&console.warn(r)}},od=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),hc=t=>{for(let e in t)return!1;return!0},nd=t=>S(t)&&hc(t),sd=()=>Object.create(null),vs=(t,e,r={})=>{let o=r.exclude||[],n=r.preventUnderscore;for(let s in e)o.includes(s)||!n&&Yr(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},Xr=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)Yr(n)||n==="constructor"||n==="prototype"||(o?r.has(n):r.includes(n))||(t[n]=e[n]);return t},Ht=(t,e,r={},o=new WeakMap)=>{if(!z(t)||!z(e)||Ut(t)||Ut(e))return e;if(o.has(t))return o.get(t);o.set(t,t);let n=r.exclude,s=n?n instanceof Set?n:new Set(n):null,i=!r.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&Yr(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];Ut(l)?t[a]=l:z(c)&&z(l)?t[a]=Ht(c,l,r,o):l!==void 0&&(t[a]=l)}return t},gc=(t,e,r=new Set)=>{if(typeof t!="object"||typeof e!="object"||t===null||e===null)return t===e;if(r.has(t)||r.has(e))return!0;r.add(t),r.add(e);let o=Object.keys(t),n=Object.keys(e);if(o.length!==n.length)return!1;for(let s=0;s<o.length;s++){let i=o[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!gc(t[i],e[i],r))return!1}return!0},PC=new Set(["node","__ref"]),id=(t,e,r=PC)=>{if(t===e)return!0;if(!z(t)||!z(e)||Ut(t)||Ut(e))return t===e;let o=r instanceof Set?r:new Set(r),n=new WeakSet;function s(i,a){if(n.has(a))return!0;n.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||o.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(Ut(l)||Ut(f)){if(l!==f)return!1}else if(z(l)&&z(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},ad=(t,e)=>{if(e==null)return t;if(Vt(e)("string","number"))delete t[e];else if(O(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},mc=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]=mc(t[r]));return e},cd=(t,e)=>{if(t.length===0)return e;let r={},o=r;for(let n=0;n<t.length;n++)n===t.length-1&&e?o[t[n]]=e:(o[t[n]]={},o=o[t[n]]);return r},ld=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let n=0;n<e.length-1;n++){if(r[e[n]]===void 0)return;r=r[e[n]]}let o=e[e.length-1];r&&Object.prototype.hasOwnProperty.call(r,o)&&delete r[o]},fd=(t,e,r)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let o=t;for(let n=0;n<e.length-1;n++)(!o[e[n]]||typeof o[e[n]]!="object")&&(o[e[n]]={}),o=o[e[n]];return o[e[e.length-1]]=r,t},ud=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length;o++){if(r==null)return;r=r[e[o]]}return r},dd=t=>{let r=[],o=0;for(let n=0;n<t.length;n++)if(r.length<2)r.push(t[n]);else if(t[n]===r[n%2]?o++:(r=[t[n-1],t[n]],o=1),o>=20)return(eb==="test"||eb==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},pd=t=>{let e=new WeakSet;function r(o){if(o&&typeof o=="object"){if(e.has(o))return!0;e.add(o);for(let n in o)if(Object.prototype.hasOwnProperty.call(o,n)&&r(o[n]))return console.log(o,"cycle at "+n),!0}return!1}return r(t)},hd=(t,e)=>{let r=e instanceof Set?e:new Set(e),o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&!r.has(n)&&(o[n]=t[n]);return o}});var Cs,Es,As,yc=j(()=>{"use strict";Xe();Cs=(function(){let t=0;function e(){return t++,t}return e})(),Es=Cs,As=(t,e,r)=>(ct(r,t)||r||t.key||Cs()).toString()});var Se,gd,hr,bc,md,yd,bd,gr,_d,Jr,Ot,xd=j(()=>{"use strict";Se="production",gd=Se,hr=(t=Se)=>t==="production",bc=(t=Se)=>t==="testing"||t==="test",md=bc,yd=(t=Se)=>t==="staging",bd=(t=Se)=>t==="local",gr=(t=Se)=>t==="development"||t==="dev"||t==="local",_d=(t,e=Se)=>e[t],Jr=(t=Se)=>!hr(t),Ot=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 Ts(t,e,r){let o;return function(){let n=this,s=arguments,i=function(){o=null,r||t.apply(n,s)},a=r&&!o;clearTimeout(o),o=setTimeout(i,e),a&&t.apply(n,s)}}function vd(t,e=window){let r=function(){return t.apply(e,arguments)};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r}var wd,Sd,IC,kd,Bo,Uo,Ct,Vo=j(()=>{"use strict";wd=(t,e,r=300)=>{let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>{e.apply(t,n)},r)}},Sd=t=>{let e={};return(...r)=>{let o=r[0];if(o in e)return e[o];{let n=t(o);return e[o]=n,n}}},IC=/^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/,kd=t=>IC.test(t),Bo=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let r of e)if(r.resolveHandler)return!0;return!1},Uo=(t,e)=>{if(typeof t=="function")return t;let r=e?.context?.plugins;if(!r)return t;for(let o of r)if(o.resolveHandler){let n=o.resolveHandler(t,e);if(typeof n=="function")return n}return t},Ct=(t,e,...r)=>{let o=e?.context?.plugins;if(!o)return!1;let n=!1;for(let s of o)typeof s[t]=="function"&&(s[t](e,...r),n=!0);return n}});var Cd,ab=j(()=>{"use strict";At();Xe();Cd=(t,e)=>{let{__ref:r}=t,o=t.if;if(A(o)){let n;try{n=o(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete r.__if;return}n?r.__if=!0:delete r.__if}else o!=null&&typeof o=="object"?ct(o,t)?r.__if=!0:delete r.__if:r.__if=!0}});var Ed,Ad,cb=j(()=>{"use strict";Ed=(t,...e)=>{t&&e.map(r=>console.log(r))},Ad=(t,e,...r)=>{t&&(console.group(e),r.map(o=>console.log(o)),console.groupEnd(e))}});function Id(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 Dd(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 Td,Od,Rd,Pd,lb=j(()=>{"use strict";At();ls();Td=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),Od=(t,e,r=365)=>{if(Et(et)||Et(et.cookie))return;let o=new Date;o.setTime(o.getTime()+r*24*60*60*1e3);let n=`expires=${o.toUTCString()}`;et.cookie=`${t}=${e};${n};path=/`},Rd=t=>{if(Et(et)||Et(et.cookie))return;let e=`${t}=`,o=decodeURIComponent(et.cookie).split(";");for(let n=0;n<o.length;n++){let s=o[n];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},Pd=t=>{Et(et)||Et(et.cookie)||(et.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var Ho,fb,$d,Ld=j(()=>{"use strict";Ho={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"])},fb=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"]),$d=t=>Ho.body.has(t)});var Md,ub,zo,Ps,zt,Fd,_c,Is,Nd,Ds,xc,wc,$s,Sc,Wo,DC,Fe,db,Os,Ls,jd,Rs,Bd,Ud,kc,vc,Cc,Ec,Ac,Tc,pb,Oc=j(()=>{"use strict";Fo();Vd();Xe();At();Md="production",ub=t=>t.sourcemap!==!1&&Md!=="production",zo=t=>{if(t.includes("+"))return t.split("+").filter(Ne);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!Ne(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},Ps=(t,e,r)=>{let o=[],n=zo(r);n&&(o=[...n]);let s=t.extends;return s&&(o=O(s)?[...o,...s]:[...o,s]),o},zt=(t,e)=>{let{__ref:r}=e,{__extends:o}=r;if(!t)return o;let n=e.variant,s=e.context;if(n&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${n}`;s.components[i]&&(t=i)}return o.includes(t)||(o=Array.isArray(t)?[...o,...t]:[...o,t],r.__extends=o),o},Fd=(t,e)=>{if(!t)return e;let{extends:r}=e,o=O(r)?r:[r],n=O(t)?t:[t];return{...e,extends:Lo(n,o)}},_c=()=>Math.random().toString(36).substring(2),Is={},Nd={},Ds=t=>Is[t.__hash],xc=(t,e)=>{let r=_c();return w(t)||(t.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(Is[r]=e),e},wc=(t,e)=>t.__hash?e.concat(Ds(t)):xc(t,e),$s=(t,e,r,o=new Set,n,s)=>{for(let i of t)O(i)?$s(i,e,r,o,n,s):Wo(i,e,r,o,n,void 0,s);return e},Sc=(t,e,r,o=new Set,n,s,i)=>{let a=t.extends,c={...t};delete c.extends;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),n&&n.push(s)),a&&Wo(a,e,r,o,n,s,i),e},Wo=(t,e,r,o=new Set,n,s,i)=>{if(!t||o.has(t))return e;if(O(t))return $s(t,e,r,o,n,i);let a=s;return w(t)?(a=t,t=Ls(t,r)):i&&S(t)&&i.has(t)&&(a=i.get(t)),o.add(t),t?.extends?Sc(t,e,r,o,n,a,i):t&&(e.push(t),n&&n.push(a)),e},DC=new Set(["parent","node","__ref","__proto__","extends","childExtends","childExtendsRecursive"]),Fe=(t,e,r,o,n)=>{e=ut(e);for(let s in e){if(DC.has(s))continue;let i=t[s],a=e[s];if(a!==void 0&&Object.prototype.hasOwnProperty.call(e,s)&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"){if(i===void 0)t[s]=a,r&&o?S(a)&&!O(a)?(r[s]=r[s]||{},db(r[s],a,o)):r[s]=o:r&&n?.[s]&&(r[s]=n[s]);else if(S(i)&&S(a)){let c=r?r[s]=r[s]||{}:void 0,l=n?.[s];Ne(s)?t[s]=Fe(i,a,c,o,l):Fe(i,a,c,o,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(O(i)&&O(a))t[s]=i.concat(a);else if(O(i)&&S(a)){let c=Fe({},i);t[s]=Fe(c,a)}}}}return t},db=(t,e,r,o)=>{if(o||(o=new WeakSet),!o.has(e)){o.add(e);for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n)||n==="__proto__"||n==="constructor"||n==="prototype")continue;let s=e[n];S(s)&&!O(s)?(t[n]=t[n]||{},db(t[n],s,r,o)):t[n]=r}}},Os=(t,e,r)=>t.reduce((o,n,s)=>{let i=ut(n),a=r?r[s]:void 0;return Fe(o,i,e,a)},{}),Ls=(t,e,r={},o)=>{let n=e?.components||r.components,s=e?.pages||r.pages;if(w(t)){let i=n&&(n[t+"."+o]||n[t]||n["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;r.verbose&&(Md==="test"||Md==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},jd=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),Rs=(t,e,r,o)=>{if(!t)return[];if(t.__hash)return Ds(t)||[];let s=Wo(t,[],e,new Set,r,void 0,o);return r?s:wc(t,s)},Bd=(t,e)=>{if(!t)return e;let r=O(t)?t:[t];return Lo(r,e)},Ud=t=>{let e=[];function r(o){for(let n in o)Object.prototype.hasOwnProperty.call(o,n)&&(Ne(n)&&e.push(n),n==="extends"&&(typeof o[n]=="string"?e.push(o[n]):Array.isArray(o[n])&&(e=e.concat(o[n]))),typeof o[n]=="object"&&o[n]!==null&&r(o[n]))}return r(t),e},kc=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant;if(t.extends)if(Array.isArray(t.extends)&&t.extends.length>0){let[i,...a]=t.extends;if(typeof i=="string"&&s&&n?.components){let c=`${i}.${s}`;n.components[c]?zt([c,...a],t):zt(t.extends,t)}else zt(t.extends,t)}else if(typeof t.extends=="string"&&s&&n?.components){let i=`${t.extends}.${s}`;n.components[i]?zt(i,t):zt(t.extends,t)}else zt(t.extends,t);return vc(t,e,r),Cc(t,e,r),Ec(t,e,r),t.component&&zt(ct(t.component,t),t),n.defaultExtends&&zt(n.defaultExtends,t),Mo(o.__extends)},vc=(t,e,r={})=>{let{__ref:o}=t;return r.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&zt(e.childProps.extends,t),o.__extends},Cc=(t,e,r={})=>{let{__ref:o}=t,n=r.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!n&&s&&zt(s,t),o.__extends},Ec=(t,e,r={})=>{let{__ref:o}=t,n=e.childExtendsRecursive,s=r.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return n&&!i&&!s&&zt(n,t),o.__extends},Ac=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant,i=ub(r),a=i?[...o.__extends]:null,c=Mo(o.__extends.map((l,f)=>Ls(l,n,r,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let h=c[d],g=a[d];h&&S(h)&&w(g)&&l.set(h,g)}let f=[],u=Rs(c,n,f,l);o.__extendsStack=u,o.__extendsNames=f}else{let l=Rs(c,n);o.__extendsStack=l}return o.__extendsStack},Tc=(t,e,r={})=>{let{__ref:o}=t,{__extendsStack:n}=o;if(ub(r)){let s={},i=o.__extendsNames||[],a=Os(n,s,i),c={};Fe(t,a,c,void 0,s),o.__sourcemap=c}else{let s=Os(n);Fe(t,s)}return t},pb=(t,e,r={})=>(kc(t,e,r),Ac(t,e,r),Tc(t,e,r),t)});function Hd(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function zd(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function Wd(t,e,r){let{context:o}=e||{},[n]=zo(r),s=r||n;return o?.components?.[s]||o?.pages?.[s]}var Ne,Vd=j(()=>{"use strict";Oc();At();Ne=t=>{if(!w(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function hb(t,e){let{props:r,on:o}=e,n=Kr(t.split("on")[1]),s=o[n],i=r[t];A(s)?o[n]=(...a)=>{if(s(...a)!==!1&&A(i))return i(...a)}:o[n]=i}var gb=j(()=>{"use strict";bs();At()});function Rc(t,e={}){let r=e.cachedKeys||[];for(let o in t){let n=t[o];if(o.length>2&&o.charCodeAt(0)===111&&o.charCodeAt(1)===110&&o[2]===o[2].toUpperCase()&&(A(n)||n!=null&&Bo(this.context))){let g=Kr(o.slice(2));t.on&&(t.on[g]=n),delete t[o];continue}if(o==="childProps"){t.props[o]=n,delete t[o],r.push(o);continue}let a=this.define?.[o],c=this.context?.define?.[o],l=S(a)||A(a),f=S(c)||A(c);if(l||f)continue;let u=o.charAt(0);if(yb.has(u)){t.props[o]=n,delete t[o],r.push(o);continue}let d=qd.test(o)||mb.test(o)||LC(n),h=dr.has(o);!d&&!h&&(o in t.props||(t.props[o]=n),delete t[o],r.push(o))}return t}function Pc(t=this,e){let r=e.cachedKeys||[];for(let o in t.props){let n=t.props[o],s=o.length>2&&o.charCodeAt(0)===111&&o.charCodeAt(1)===110,i=A(n)||n!=null&&Bo(this.context);if(s&&i){hb(o,t),delete t.props[o];continue}if(r.includes(o)||o==="childProps")continue;let a=o.charAt(0);if(yb.has(a))continue;let c=this.define?.[o],l=this.context?.define?.[o],f=S(c)||A(c),u=S(l)||A(l),d=qd.test(o)||mb.test(o),h=dr.has(o);(d||h||f||u)&&(t[o]===void 0||n===null)&&(t[o]=n,t.props&&delete t.props[o])}return t}function Ic(t=this){let e=[];return Rc.call(this,t,{cachedKeys:e}),Pc.call(this,t,{cachedKeys:e}),t}function Kd(t={}){return t.on||(t.on={}),t.props||(t.props={}),Ic.call(this,t)}function Yd(t,e){this.__element.update({props:t},e)}function Bs(t){let e={update:Yd.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var qd,mb,yb,$C,LC,Ns,Ms,Gd,js,Us,Vs,Dc,Fs,Xd,Jd,Zd=j(()=>{"use strict";jo();gb();Xe();At();bs();Vo();qd=/^[A-Z]/,mb=/^\d+$/,yb=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),$C=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),LC=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if($C.has(e)||qd.test(e))return!0;return!1},Ns=(t,e,r)=>{let{props:o,__ref:n}=t;if(n.__propsStack=[],o)n.__initialProps=o;else return{};return z(o)?{...o}:(n.__propsStack.push(o),{})};Ms=t=>Vt(t)("string","number")?{inheritedString:t}:t,Gd=(t,e)=>!t||!e.length?!1:e.includes(t),js=(t,e)=>{let{__ref:r}=t,o=r.__propsStack||[],n=e.props;if(!n)return o;let s=n[t.key],i=n.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=Ms(i);o.unshift(c)}if(s){let c=Ms(s);o.unshift(c)}return o};Us=t=>{let e=new Set;return t.filter(r=>!r||pr.has(r)||e.has(r)?!1:(e.add(r),!0))},Vs=(t,e,r)=>(e.props=t.reduce((o,n)=>{if(pr.has(n))return o;for(;A(n);)n=ct(n,e);return nt(o,ut(n,{exclude:pr}))},{}),Bs(e),e.props),Dc=(t,e)=>{let{props:r,__ref:o}=t,n=o.__propsStack||[];if(e?.props&&(n=[...js(t,e)]),S(r)?n.push(r):r==="inherit"&&e?.props?n.push(e.props):r&&n.push(r),O(o.__extendsStack))for(let s=0;s<o.__extendsStack.length;s++){let i=o.__extendsStack[s];i.props&&i.props!==r&&n.push(i.props)}return o.__propsStack=Us(n),o.__propsStack},Fs=(t,e)=>{let{__ref:r}=t,o=Dc(t,e);o.length?Vs(o,t):(r.__propsStack=[],t.props={})},Xd=function(t,e,r){let{__ref:o}=t;if(o.__if)Fs(t,e);else try{Fs(t,e)}catch(n){t.context?.designSystem?.verbose&&console.warn("initProps error at",o.path?.join("."),n),t.props={},o.__propsStack=[]}return Bs(t),t},Jd=(t,e,r)=>{let{__ref:o}=e,s=[...o.__propsStack||[]],i=js(e,r);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),o.__propsStack=Us(s),o.__propsStack.length&&Vs(o.__propsStack,e),e}});var bb,$c,Lc,Mc,Fc,Qd,Nc,jc,Bc,tp,_b=j(()=>{"use strict";Oc();yc();us();Zd();Ld();At();bb="production",$c=(t,e,r)=>{let o=e.childExtends&&e.childExtends.tag,n=e.childProps&&e.childProps.tag,s=Ho.body.has(r)&&r;return{text:t,tag:o||n||s||"string"}},Lc=(t,e,r)=>{if(t===void 0)return(bb==="test"||bb==="development")&&console.warn(r,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:Vt(t)("string","number")?$c(t,e,r):A(t)?{props:t}:t},Mc=(t,e)=>{let r={};return r.origin=t,r.parent=e,r},Fc=(t,e,r,o,n)=>{if(!e)return n;if(Ye(e)){let s={key:":root",node:e};return n[`${r}_parent`]=s,s}return e},Qd=(t,e)=>{let{__ref:r}=t,{__ref:o}=e,n=e&&e.key===":root";r?.root||(r.root=n?t:o?.root)},Nc=(t,e,r)=>{let{__ref:o}=e;return o||(o=e.ref={}),o.path||(o.path=[]),o.path.concat(r)},jc=(t,e,r,o,n)=>(o.context&&!n.context&&!t.context&&(n.context=o.context),o.context||e.context||n.context||t.context),Bc=(t,e,r)=>{let o=Mc(t,e);return t.__ref=o,o.__defineCache||(o.__defineCache={}),o.__exec||(o.__exec={}),o.__execProps||(o.__execProps={}),o.__class||(o.__class={}),o.__classNames||(o.__classNames={}),o.__attr||(o.__attr={}),o.__changes||(o.__changes=[]),o.__children||(o.__children=[]),o.__extends=Ps(t,e,r),o.path=Nc(t,e,r),o},tp=(t,e,r,o,n)=>{let i=t?.__hash?{extends:[t]}:Lc(t,e,r);if(!i)return;let a=Fc(i,e,r,o,n),c=As(i,a,r);Bc(i,a,c);let l=Ns(i,a,c),f=jc(i,a,c,o,n),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var ep,Uc,Vc,Hc,zc,rp,Wc,op,np,sp,ip,xb=j(()=>{"use strict";Fo();jo();Xe();At();ep=t=>{let{state:e,props:r,__ref:o}=t,n=r?.state||e;return Vt(n)("string","number")?(o.__state=n,{value:n}):n===!0?(o.__state=t.key,{}):n?(o.__hasRootState=!0,n):!1},Uc=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},Vc=(t,e)=>{if(!t.includes("../"))return;let o=t.split("../").length-1;for(let n=0;n<o;n++){if(!e.parent)return null;e=e.parent}return e},Hc=(t,e,r={})=>{let o=w(t)?t.split("/"):[t],n=o.length-1;for(let s=0;s<n;s++){let i=o[s],a=o[s+1];if(i==="__proto__"||a==="__proto__")return;let c=e[i];c||(c=e[i]={}),c[a]||(c[a]={}),t=a,e=c}return r.returnParent?e:e[t]},zc=(t,e,r={})=>{let n=t.__ref.__state;if(!Wc(t))return;let s=Uc(n,e.state),i=e.state;if(s)i=s,n=n.replaceAll("~/","");else{let a=Vc(n,e.state);a&&(i=a,n=n.replaceAll("../",""))}if(i)return Hc(n,i,r)},rp=(t,e)=>{let r=t.__ref,o=zc(t,e);if(o===void 0)return t.state;if(Vt(o)("object","array"))return ut(o);if(Vt(o)("string","number","boolean"))return r.__stateType=typeof o,{value:o};console.warn(r.__state,"is not present. Replacing with",{})},Wc=t=>{let{__ref:e}=t,r=e?.__state;return!!(r&&Vt(r)("number","string","boolean"))},op=function(t){return z(t)?!!(t.update&&t.parse&&t.clean&&t.create&&t.parent&&t.destroy&&t.rootUpdate&&t.parentUpdate&&t.keys&&t.values&&t.toggle&&t.replace&&t.quietUpdate&&t.quietReplace&&t.add&&t.apply&&t.applyReplace&&t.setByPath&&t.setPathCollection&&t.removeByPath&&t.removePathCollection&&t.getByPath&&t.applyFunction&&t.__element&&t.__children):!1},np=(t,e)=>{if(!t)return e||{};let r=t.split("/"),o={},n=o,s=r.length-1;for(let i=0;i<=s;i++)n[r[i]]=i===s?e||{}:{},n=n[r[i]];return o},sp=(t,e)=>{let{__element:r}=e,o=r?.state;if(!o)return;let n=ut(o,Gr),s={[t.key]:n},i=S(o.__depends)?{...o.__depends,...s}:s;return Array.isArray(o)?gs(o,{...Object.getPrototypeOf(o),__depends:i}):Object.setPrototypeOf(o,{...Object.getPrototypeOf(o),__depends:i}),n},ip=(t,e,r={})=>{let{overwrite:o}=r;if(!o)return;let n=o==="shallow";if(o==="merge"){nt(t,e,Gr);return}(n?Xr:Ht)(t,e,Gr)}});var MC,ap,wb=j(()=>{"use strict";MC=(t,e)=>{let r=e;for(;r;){if(r===t)return!0;r=Object.getPrototypeOf(r)}return!1},ap=(t,e)=>{let{__ref:r}=t,o=t.context||e.context||r.root?.context;o&&!o.globalScope&&(o.globalScope={});let n=e.scope||r.root?.scope,s=o?.globalScope;if(!t.scope)n?t.scope=n:s?t.scope=Object.create(s):t.scope={};else if(typeof t.scope=="object"&&t.scope!==null&&Object.getPrototypeOf(t.scope)===Object.prototype){let i=n||s;i&&!MC(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var Sb,qc,mr,Kc,cp,lp=j(()=>{"use strict";At();Vo();Sb=(t,e)=>{let r="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[r]},qc=(t,e,r,o,n)=>{if(t=Uo(t,e),!!A(t))try{let s=t.call(e,e,r||e.state,o||e.context,n);return s&&typeof s.then=="function"&&s.catch(i=>{e.error=i,i instanceof ReferenceError?console.warn("[DOMQL] Async event warning:",i.message):console.error("[DOMQL] Async event error:",i)}),s}catch(s){if(e.error=s,s instanceof ReferenceError?console.warn("[DOMQL] Event handler warning:",s.message):console.error("[DOMQL] Event handler error:",s),e.context?.strictMode)throw s}},mr=(t,e,r)=>{if(!e)throw new Error("Element is required");Ct(t,e,r);let o=Sb(t,e);if(o){let{state:n,context:s}=e;return qc(o,e,n,s,r)}},Kc=(t,e,r,o,n,s)=>{if(t=Uo(t,r),!!A(t))try{let i=t.call(r,e,r,o||r.state,n||r.context,s);return i&&typeof i.then=="function"&&i.catch(a=>{r.error=a,console.error("[DOMQL] Async event update error:",a)}),i}catch(i){if(r.error=i,console.error("[DOMQL] Event update error:",i),r.context?.strictMode)throw i}},cp=(t,e,r,o)=>{Ct(t,r,e,o);let n=Sb(t,r);if(n){let{state:s,context:i}=r;return Kc(n,e,r,s,i,o)}}});var fp,Hs,up=j(()=>{"use strict";fp={},Hs={}});var vb={};P(vb,{restAdapter:()=>kb,setup:()=>NC});var FC,Je,NC,kb,Cb=j(()=>{"use strict";FC=(t,e,r)=>{let o=e&&!e.startsWith("/")?"/":"",n=new URL(`${t}${o}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&n.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return n.toString()},Je=async(t,e)=>{let r=await globalThis.fetch(t,e),o=r.headers.get("content-type"),n=o&&o.includes("json")?await r.json():await r.text();return{data:n,error:r.ok?null:n?.message||n?.error||r.statusText,status:r.status}},NC=async({url:t,headers:e,auth:r,fetchOptions:o})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return kb(t,e,r,o)},kb=(t,e={},r,o={})=>{let n=r?.token||null,s=f=>{let u={...e,...f};return n&&(u.Authorization=`Bearer ${n}`),u},i=f=>({...s(f),"Content-Type":"application/json"}),a=f=>({...o,...f}),c=(f,u)=>{let d=u||t;if(f&&(f.startsWith("http://")||f.startsWith("https://")))return f;let h=f&&!f.startsWith("/")?"/":"";return`${d}${h}${f||""}`};return{name:"rest",setToken:f=>{n=f},getSession:async()=>{if(!r?.sessionUrl)return n?{token:n}:null;let f=await Je(c(r.sessionUrl,r.baseUrl),a({headers:s()}));return f.error?null:f.data},signIn:async f=>{if(!r?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let u=await Je(c(r.signInUrl,r.baseUrl),a({method:"POST",headers:i(),body:JSON.stringify(f)}));return u.data?.token&&(n=u.data.token),u},signOut:async()=>(r?.signOutUrl&&await Je(c(r.signOutUrl,r.baseUrl),a({method:"POST",headers:s()})),n=null,{error:null}),select:({from:f,params:u,select:d,limit:h,offset:g,order:p,single:m,headers:_,baseUrl:b})=>{let y={...u};return d&&(y.select=d),h&&(y.limit=h),g&&(y.offset=g),m&&(y.single=!0),p&&(typeof p=="string"?y.order=p:Array.isArray(p)?y.order=p.map(x=>`${x.by}:${x.asc===!1?"desc":"asc"}`).join(","):p.by&&(y.order=`${p.by}:${p.asc===!1?"desc":"asc"}`)),Je(FC(b||t,f||"",y),a({headers:s(_)}))},rpc:({from:f,params:u,headers:d,baseUrl:h})=>Je(c(`rpc/${f}`,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:d,baseUrl:h})=>Je(c(f,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),update:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,_=m?`${f}/${m}`:f;return Je(c(_,p),a({method:h||"PATCH",headers:i(g),body:JSON.stringify(u)}))},upsert:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,_=m?`${f}/${m}`:f;return Je(c(_,p),a({method:h||"PUT",headers:i(g),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:d,baseUrl:h})=>{let g=u?.id,p=g?`${f}/${g}`:f;return Je(c(p,h),a({method:"DELETE",headers:s(d)}))}}}});var Ab={};P(Ab,{localAdapter:()=>Eb,setup:()=>BC});var Gc,jC,BC,Eb,Tb=j(()=>{"use strict";Gc=(t,e)=>{if(!e)return!0;for(let r in e){let o=e[r];if(o===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(o)){if(!o.includes(t[r]))return!1}else if(typeof o=="object"){for(let n in o)if(n==="gt"&&!(t[r]>o[n])||n==="gte"&&!(t[r]>=o[n])||n==="lt"&&!(t[r]<o[n])||n==="lte"&&!(t[r]<=o[n])||n==="neq"&&t[r]===o[n]||n==="like"&&!String(t[r]).includes(o[n]))return!1}else if(t[r]!==o)return!1}return!0},jC=(t,{order:e,limit:r,offset:o,single:n})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,a=e.asc!==!1;s.sort((c,l)=>c[i]<l[i]?a?-1:1:c[i]>l[i]?a?1:-1:0)}return o&&(s=s.slice(o)),r&&(s=s.slice(0,r)),n?{data:s[0]||null,error:null}:{data:s,error:null}},BC=async({data:t,...e})=>Eb(t,e),Eb=(t={},e={})=>{let r={},o={},n=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(n)try{let u=localStorage.getItem(s+f);r[f]=u?JSON.parse(u):t[f]||[]}catch{r[f]=t[f]||[]}else r[f]=t[f]||[];return r[f]},a=f=>{if(n)try{localStorage.setItem(s+f,JSON.stringify(r[f]))}catch{}},c=(f,u,d,h)=>{let g=o[f];if(g)for(let p of g)p(d,h,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...d})=>{let g=i(f).filter(p=>Gc(p,u));return jC(g,d)},insert:async({from:f,data:u})=>{let d=i(f),g=(Array.isArray(u)?u:[u]).map(p=>{let m={id:p.id||++l,...p};return d.push(m),m});a(f);for(let p of g)c(f,"INSERT",p,null);return{data:Array.isArray(u)?g:g[0],error:null}},update:async({from:f,data:u,params:d})=>{let h=i(f),g=[];for(let p=0;p<h.length;p++)if(Gc(h[p],d)){let m={...h[p]};Object.assign(h[p],u),g.push(h[p]),c(f,"UPDATE",h[p],m)}return a(f),{data:g,error:null}},upsert:async({from:f,data:u,params:d})=>{let h=i(f),g=Array.isArray(u)?u:[u],p=[];for(let m of g){let _=d||(m.id!==void 0?{id:m.id}:null),b=_?h.findIndex(y=>Gc(y,_)):-1;if(b>-1){let y={...h[b]};Object.assign(h[b],m),p.push(h[b]),c(f,"UPDATE",h[b],y)}else{let y={id:m.id||++l,...m};h.push(y),p.push(y),c(f,"INSERT",y,null)}}return a(f),{data:Array.isArray(u)?p:p[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),h=[];for(let g=d.length-1;g>=0;g--)Gc(d[g],u)&&(h.push(d[g]),d.splice(g,1),c(f,"DELETE",null,h[h.length-1]));return a(f),{data:h,error:null}},subscribe:({from:f,on:u},d)=>{o[f]||(o[f]=[]);let h=(g,p,m)=>{u&&u!=="*"&&u!==m.event||d(g,p,m)};return o[f].push(h),()=>{let g=o[f].indexOf(h);g>-1&&o[f].splice(g,1)}}}}});var Qr={};P(Qr,{createAdapter:()=>qC,default:()=>rE,executeFetch:()=>Js,fetchPlugin:()=>yp,initAdapterAuth:()=>Qc,parseDuration:()=>qs,queryClient:()=>eE,registerAdapter:()=>WC,resolveDb:()=>Ib});var UC,VC,Yc,Ws,Xc,hp,HC,zC,WC,qC,Ib,qs,Mt,Db,zs,KC,Xs,Ks,Gs,Jc,gp,Zc,GC,Ob,dp,$b,Lb,qo,Rb,YC,Pb,XC,tl,Mb,Fb,Qc,mp,ae,ke,Ys,Zr,je,yr,JC,ZC,QC,pp,tE,Js,eE,yp,rE,br=j(()=>{"use strict";R();UC=["select","rpc","insert","update","upsert","delete","subscribe"],VC={rest:()=>Promise.resolve().then(()=>(Cb(),vb)),local:()=>Promise.resolve().then(()=>(Tb(),Ab))},Yc=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),Ws=(()=>{if(typeof globalThis<"u"&&globalThis[Yc])return globalThis[Yc];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Yc,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Yc]}catch{}return t})(),Xc=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),hp=(()=>{if(typeof globalThis<"u"&&globalThis[Xc])return globalThis[Xc];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Xc,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Xc]}catch{}return t})(),HC=5e3,zC=t=>new Promise(e=>{if(Ws[t])return e(Ws[t]);let r=hp[t]||=[],o=!1,n=()=>{o||(o=!0,e(Ws[t]||null))};r.push(n),setTimeout(n,HC)}),WC=(t,e)=>{Ws[t]=e;let r=hp[t];if(r&&r.length){hp[t]=[];for(let o of r)o()}},qC=t=>{let e={};for(let r of UC)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},Ib=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,o=typeof e=="string"?e:typeof t=="string"?t:null;if(!o)return null;let n=Ws[o]||VC[o];if(!n&&(n=await zC(o),!n))throw new Error(`Unknown db adapter: "${o}". Use registerAdapter() for adapters with optional deps.`);let s=await n();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${o}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(r)},qs=t=>{if(!t)return 0;if(typeof t=="number")return t;let e=t.match(/^(\d+)(ms|s|m|h)$/);if(!e)return 0;let r=parseInt(e[1]),o=e[2];return o==="ms"?r:o==="s"?r*1e3:o==="m"?r*6e4:o==="h"?r*36e5:0},Mt=new Map,Db=new Map,zs=new Map,KC=(t,e,r)=>{if(t.cache?.key)return t.cache.key;let o=XC(t.params),n=r?`${r}:`:"",s=`${t.from}:${t.method}:${n}${JSON.stringify(o||"")}`;return e?`${s}:${e}`:s},Xs=t=>Mt.get(t)||null,Ks=(t,e,r)=>{let o=Mt.get(t),n={data:e,error:r,time:Date.now(),stale:!1};Mt.set(t,n);let s=Db.get(t);if(s)for(let i of s)A(i)&&i(n);return n},Gs=t=>{if(t){let e=Mt.get(t);e&&(e.stale=!0);return}for(let[,e]of Mt)e.stale=!0},Jc=t=>{if(t){Mt.delete(t);return}Mt.clear()},gp=t=>!t&&t!==!1?{staleTime:6e4,gcTime:3e5}:t===!1?null:t===!0?{staleTime:6e4,gcTime:3e5}:typeof t=="number"?{staleTime:t,gcTime:Math.max(t*5,3e5)}:w(t)?{staleTime:qs(t),gcTime:3e5}:{staleTime:qs(t.stale||t.staleTime)||6e4,gcTime:qs(t.gc||t.gcTime||t.expire)||3e5,key:t.key},Zc=null,GC=()=>{Zc||(Zc=setInterval(()=>{let t=Date.now();for(let[e,r]of Mt){let o=Db.get(e);!(o&&o.size>0)&&t-r.time>(r.gcTime||3e5)&&Mt.delete(e)}},3e4),Zc.unref&&Zc.unref())};GC();Ob=3,dp=t=>Math.min(1e3*2**t,3e4),$b=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:Ob,delay:dp}:typeof e=="number"?{count:e,delay:dp}:{count:e.count??Ob,delay:A(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:dp}},Lb=async(t,e)=>{let{count:r,delay:o}=e,n;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(n=i.error,s<r){let a=A(o)?o(s,n):o;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(n=i,s<r){let a=A(o)?o(s,i):o;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:n}},qo={focus:new Set,online:new Set},Rb=!1,YC=()=>{if(Rb||typeof window>"u")return;Rb=!0;let t=()=>{for(let r of qo.focus)r()},e=()=>{for(let r of qo.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},Pb=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(w(t))return{from:t,method:"select",query:!0,on:"create"};if(S(t)){let o={...t};return o.from=o.from||r.__state||e.key,o.method=o.method||"select",o.on=o.on||"create",o.query===void 0&&(o.query=!0),o}return null},XC=t=>(!t||A(t),t),tl=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},Mb=(t,e)=>{let o=(t?.state?.root||e?.state?.root)?.__fetchScope;return o?String(o):void 0},Fb=(t,e,r)=>{let o;if(!t)o=void 0;else if(A(t))o=t(e,e.state);else{o={};for(let n in t){let s=t[n];o[n]=A(s)?s(e,e.state):s}}return o},Qc=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(o,n)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:o,session:n,loading:!1}})};try{let o=await t.getSession();r(o?.user||null,o)}catch(o){console.warn("[fetch] Failed to restore auth session:",o.message)}t.onAuthStateChange&&t.onAuthStateChange((o,n)=>{r(n?.user||null,n)})},mp=async(t,e)=>{if(A(t.select))return t.auth!==!1&&await Qc(t,e),t;if(t.__resolved)return t.auth!==!1&&await Qc(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=Ib(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 Qc(r,e),r):null},ae=(t,e,...r)=>{let o=A(t[e])?t[e]:null;o&&o.call(t,...r,t,t.state,t.context)},ke=(t,e,r,...o)=>{let n=t&&A(t[r])?t[r]:null;n&&n.call(e,...o,e,e.state,e.context)},Ys=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let n=new FormData(r);for(let[s,i]of n.entries())e[s]=i;return e}let o=r.querySelectorAll("input, textarea, select");for(let n=0;n<o.length;n++){let s=o[n],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},Zr=(t,e,r,o={})=>{let n=r&&r.startsWith("~/"),s=n&&t.state?.root||t.state;if(s?.update)if(n){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&i in e?s.update(e,{preventFetch:!0,...o}):s.update({[i]:e},{preventFetch:!0,...o})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...o})}},je=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},yr=async(t,e,r,o={})=>{let n=r?.fetch;if(!n||!e||!e.__ref||t.enabled===!1||A(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||A(t.skip)&&t.skip(e,e.state))return;let s=await mp(n,r);if(!s||!e.__ref)return;let i=e.__ref,{from:a,method:c,query:l,params:f,cache:u,transform:d,single:h,auth:g,fields:p,as:m,limit:_,offset:b,order:y,headers:x,baseUrl:k,page:C,cursor:T,getNextPageParam:$,getPreviousPageParam:M,infinite:D,placeholderData:V,initialData:H,select:G,keepPreviousData:ft}=t,I=w(G)?G:void 0;if(l&&A(e.getQuery)){let at=e.getQuery(s.name||"paths");at&&(I=at.select||at.length&&at.join(",")||I)}let F=Fb(f,e,r),N=gp(u),St=$b(t),Dt=tl(e,r),xe=Mb(e,r),J=Dt?`:${Dt}`:"",dt=xe?`${xe}:`:"",L=N?u?.key||`${a}:${c}:${dt}${JSON.stringify(F||"")}${D?":infinite":""}${C?":p"+JSON.stringify(C):""}${J}`:null;if(!i.__fetchInitialized&&L&&(i.__fetchInitialized=!0,H!==void 0)){let at=A(H)?H():H;Ks(L,at,null)}if((c==="select"||c==="rpc")&&L&&N){let at=Xs(L);if(at&&!at.error){let tt=Date.now()-at.time,_t=at.stale||tt>(N.staleTime||0),q=at.data;if(A(G)&&(q=G(q,e,e.state)),d&&(q=d(q,e,e.state)),Zr(e,q,m),!_t){je(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(V!==void 0){let tt=A(V)?V(e,e.state):V;tt!==void 0&&Zr(e,tt,m)}}if(L&&zs.has(L)&&!o.force){let at=zs.get(L);try{let tt=await Promise.race([at,new Promise((_t,q)=>setTimeout(()=>q("DEDUP_TIMEOUT"),15e3))]);if(tt?.data!==void 0){let _t=tt.data;A(G)&&(_t=G(_t,e,e.state)),d&&(_t=d(_t,e,e.state)),Zr(e,_t,m),ae(e,"onFetchComplete",_t),ke(t,e,"onFetchComplete",_t)}}catch{}return}let W=!Xs(L)?.data;je(e,{isFetching:!0,isLoading:W,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),ae(e,"onFetchStart"),ke(t,e,"onFetchStart");let K=r?.analyze?.emitNetwork,Z=K?typeof performance<"u"?performance.now():Date.now():0;K&&K({phase:"start",mode:"query",from:a,method:c,cacheKey:L,lang:Dt});let Uy=Lb(async()=>{if(g!==!1&&s.auth!==!1&&s.getSession){let q=await s.getSession();if(g===!0&&!q){let $t={message:"Not authenticated"};return je(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:$t,status:"error",fetchStatus:"idle"}),ae(e,"onFetchError",$t),ke(t,e,"onFetchError",$t),{data:null,error:$t}}}let at=s[c];if(!A(at))return{data:null,error:{message:`Method "${c}" not found on adapter`}};let tt={from:a,select:I,params:F,single:h,limit:_,offset:b,order:y,headers:x,baseUrl:k},_t=tl(e,r);if(_t&&(tt.headers={...tt.headers,"Accept-Language":_t}),C!==void 0){if(S(C))C.offset!==void 0&&(tt.offset=C.offset),C.limit!==void 0&&(tt.limit=C.limit),C.cursor!==void 0&&(tt.params={...tt.params,cursor:C.cursor});else if(typeof C=="number"){let q=t.pageSize||_||20;tt.offset=(C-1)*q,tt.limit=q}}if(T!==void 0&&(tt.params={...tt.params,cursor:T}),c==="insert"||c==="update"||c==="upsert"){let q;if(p===!0||t.on==="submit")q=Ys(e);else if(O(p)){let $t=Ys(e);q={};for(let lu of p)q[lu]=$t[lu]}else e.state?.parse?q=e.state.parse():S(e.state)&&(q={...e.state});d&&(q=d(q,e,e.state)),tt.data=q}if(c==="rpc"){let q=F;if(t.on==="submit"){let $t=Ys(e);q=t.transformParams?t.transformParams($t,e,e.state):$t}tt.params=q}if(c==="subscribe"){let q=s.subscribe({from:a,params:F,on:t.subscribeOn},($t,lu,SP)=>{Zr(e,$t,m),ae(e,"onFetchComplete",$t),ke(t,e,"onFetchComplete",$t)});return i.__unsubscribe=q,{data:null,error:null,subscribed:!0}}return at(tt)},St);L&&zs.set(L,Uy);try{let at=await Uy;if(at?.subscribed)return;let{data:tt,error:_t}=at||{};if(_t){L&&Ks(L,null,_t),je(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:_t,status:"error",fetchStatus:"idle"}),ae(e,"onFetchError",_t),ke(t,e,"onFetchError",_t),K&&K({phase:"error",mode:"query",from:a,method:c,cacheKey:L,error:_t.message||_t,durationMs:(typeof performance<"u"?performance.now():Date.now())-Z});return}if(tt!==void 0){if((c==="select"||c==="rpc")&&L){let $t=Ks(L,tt,null);$t.gcTime=N?.gcTime||3e5}let q=tt;D&&O(tt)&&(i.__pages||(i.__pages=[]),o.direction==="previous"?i.__pages.unshift(tt):i.__pages.push(tt),q=i.__pages.flat(),$&&(i.__nextPageParam=$(tt,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),M&&(i.__prevPageParam=M(tt,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),A(G)&&(q=G(q,e,e.state)),d&&(q=d(q,e,e.state)),(!ft||q!==void 0)&&Zr(e,q,m),je(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),ae(e,"onFetchComplete",q),ke(t,e,"onFetchComplete",q),K&&K({phase:"success",mode:"query",ok:!0,from:a,method:c,cacheKey:L,durationMs:(typeof performance<"u"?performance.now():Date.now())-Z})}}catch(at){je(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:at,status:"error",fetchStatus:"idle"}),ae(e,"onFetchError",at),ke(t,e,"onFetchError",at),K&&K({phase:"error",mode:"query",from:a,method:c,cacheKey:L,error:at.message||String(at),durationMs:(typeof performance<"u"?performance.now():Date.now())-Z})}finally{L&&zs.delete(L)}},JC=(t,e,r)=>{let o=t.on,n=e.__ref;n.__fetchListeners||(n.__fetchListeners=[]);let s=t.__runner||yr;if(o==="submit"){let i=c=>{c.preventDefault(),s(t,e,r)},a=e.node;a&&(a.addEventListener("submit",i),n.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(o==="click"){let i=()=>s(t,e,r),a=e.node;a&&(a.addEventListener("click",i),n.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else o==="stateChange"&&(n.__fetchOnStateChange=()=>s(t,e,r))},ZC=(t,e,r)=>{let o=e.__ref;o.__fetchCleanups||(o.__fetchCleanups=[]),YC();let n=t.refetchInterval;if(n){let s=typeof n=="number"?n:qs(n);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&yr(t,e,r,{force:!0})},s);o.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=tl(e,r),a=Mb(e,r),c=KC(t,i,a),l=Xs(c),f=gp(t.cache);(!l||l.stale||Date.now()-l.time>(f?.staleTime||0))&&yr(t,e,r,{force:!0})};qo.focus.add(s),o.__fetchCleanups.push(()=>qo.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>yr(t,e,r,{force:!0});qo.online.add(s),o.__fetchCleanups.push(()=>qo.online.delete(s))}},QC=(t,e,r)=>{if(!e.optimistic)return null;let o=t.__ref,n=e.as,s=t.state?.parse?t.state.parse():S(t.state)?{...t.state}:t.state;o.__optimisticSnapshot=s;let i=A(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&Zr(t,i,n),s},pp=(t,e)=>{let r=t.__ref,o=r.__optimisticSnapshot;o!==void 0&&(Zr(t,o,e.as),delete r.__optimisticSnapshot)},tE=async(t,e,r)=>{let o=r?.fetch;if(!o)return;let n=await mp(o,r);if(!n)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:h,baseUrl:g,invalidates:p,optimistic:m,onMutate:_,onSuccess:b,onError:y,onSettled:x}=t,k;if(c===!0||u==="submit")k=Ys(e);else if(O(c)){let M=Ys(e);k={};for(let D of c)k[D]=M[D]}else e.state?.parse?k=e.state.parse():S(e.state)&&(k={...e.state});l&&(k=l(k,e,e.state)),A(_)&&_(k,e,e.state);let C=m?QC(e,t,k):null;s.__fetching=!0,je(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),ae(e,"onFetchStart"),ke(t,e,"onFetchStart");let T=r?.analyze?.emitNetwork,$=T?typeof performance<"u"?performance.now():Date.now():0;T&&T({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&n.auth!==!1&&n.getSession){let F=await n.getSession();if(d===!0&&!F){C!==void 0&&pp(e,t);let N={message:"Not authenticated"};ae(e,"onFetchError",N),ke(t,e,"onFetchError",N);return}}let M=n[i];if(!A(M))return;let D={from:a,data:k,headers:h,baseUrl:g};t.params&&(D.params=Fb(t.params,e,r));let V=tl(e,r);V&&(D.headers={...D.headers,"Accept-Language":V});let H=$b(t),G=await Lb(()=>M(D),H),{data:ft,error:I}=G||{};if(I){C!==void 0&&pp(e,t),je(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:I,status:"error",fetchStatus:"idle"}),ae(e,"onFetchError",I),A(y)&&y(I,k,e),A(x)&&x(null,I,k,e),T&&T({phase:"error",mode:"mutation",from:a,method:i,error:I.message||String(I),durationMs:(typeof performance<"u"?performance.now():Date.now())-$});return}if(delete s.__optimisticSnapshot,ft!==void 0){let F=f?{[f]:ft}:ft;e.state?.update&&e.state.update(F,{preventFetch:!0})}if(je(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),ae(e,"onFetchComplete",ft),ke(t,e,"onFetchComplete",ft),A(b)&&b(ft,k,e),A(x)&&x(ft,null,k,e),T&&T({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-$}),p){let F=O(p)?p:[p];for(let N of F)if(N===!0||N==="*")for(let[St]of Mt)St.startsWith(a+":")&&Gs(St);else Gs(N)}}catch(M){C!==void 0&&pp(e,t),je(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:M,status:"error",fetchStatus:"idle"}),ae(e,"onFetchError",M),ke(t,e,"onFetchError",M),A(y)&&y(M,k,e),A(x)&&x(null,M,k,e),T&&T({phase:"error",mode:"mutation",from:a,method:i,error:M.message||String(M),durationMs:(typeof performance<"u"?performance.now():Date.now())-$})}finally{s.__fetching=!1}},Js=(t,e,r,o)=>{if(!t||!o?.fetch)return;let s=ct(t,e);if(!s)return;let i=O(s)?s.map(c=>Pb(ct(c,e),e)).filter(Boolean):[Pb(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?tE:yr;c.on==="create"?f(c,e,o):Promise.resolve().then(()=>{JC({...c,__runner:f},e,o)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&ZC(c,e,o)}let a=e.__ref;a.refetch=c=>{for(let l of i)yr(l,e,o,{force:!0,...c})},a.fetchNextPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__nextPageParam;if(l==null)return;let f={...c,cursor:l};yr(f,e,o,{direction:"next",force:!0})},a.fetchPreviousPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__prevPageParam;if(l==null)return;let f={...c,cursor:l};yr(f,e,o,{direction:"previous",force:!0})}},eE={invalidateQueries:t=>{if(!t){Gs();return}if(w(t))for(let[e]of Mt)(e.startsWith(t)||e.includes(t))&&Gs(e);else if(O(t)){let e=t.join(":");for(let[r]of Mt)r.includes(e)&&Gs(r)}},removeQueries:t=>{if(!t){Jc();return}if(w(t))for(let[e]of Mt)(e.startsWith(t)||e.includes(t))&&Jc(e)},getQueryData:t=>Xs(t)?.data??void 0,setQueryData:(t,e)=>{let r=Xs(t),o=A(e)?e(r?.data):e;Ks(t,o,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let o=await mp(r,e);if(!o)return;let n=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=o[t.method||"select"];if(!A(s))return;let i=await s({from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single});if(i?.data!==void 0&&!i?.error){let a=Ks(n,i.data,null);a.gcTime=gp(t.cache)?.gcTime||3e5}return i},getCache:()=>Mt,clear:()=>Jc(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of Mt)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||Jc(r))}},yp={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||zs.clear(),Js(e,t,t.state,t.context))}},rE=Js});function Qs(t){let e=this,{__ref:r}=e,o=[].concat(t),n=r.root[o[0]];if(!o||!o.length)return console.log(o,"on",e.key,"is undefined");for(;n.key===o[0]&&(o.shift(),!!o.length);)if(n=n[o[0]],!n)return;return n}function _p(t){let e=this,{parent:r}=e;if(A(t))return r.state&&t(r,r.state,r.context)?r:r.parent?r.lookup(t):void 0;if(e[t])return e[t];for(;r.param!==t;){if(r[t])return r[t];if(r=r.parent,!r)return}return r}function xp(t){let e=this,{__ref:r}=e,o=r?.__children;if(o)for(let n=0;n<o.length;n++){let s=o[n],i=e[s];if(s===t)return i;if(A(t)){let c=t(i,i.state,i.context);if(i.state&&c)return i}let a=i?.lookdown?.(t);if(a)return a}}function wp(t,e=[]){let r=this,{__ref:o}=r,n=o?.__children;if(n){for(let s=0;s<n.length;s++){let i=n[s],a=r[i];if(i===t)e.push(a);else if(A(t)){let c=t(a,a.state,a.context);a.state&&c&&e.push(a)}a?.lookdownAll?.(t,e)}return e.length?e:void 0}}function el(t={}){let e=this;if(e.node?.style){for(let r in t){let o=t[r],n=e[r];if(S(o)&&n)el.call(n,o);else if(o!=null){let s=r.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(o).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function jb(t){let e=this;if(mr("beforeRemove",e,t)===!1)return e;A(e.node.remove)?e.node.remove():hr()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=hs(e.parent.__ref.__children,e.key)),mr("remove",e,t)}function Sp(t){return this[t]}function kp(t,e){let r=this;if(t)return r.update(t,e),r}function vp(t){return t?this.__ref&&this.__ref[t]:this.__ref}function ti(){return this.getRef("__children").map(e=>this[e])}function ei(){return this.getRef().path}function oi(t){let e=null,r=o=>o.__element&&o.root?.isRootState;if(!this)e=Nb();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let o=this.state&&r(this.state),n=A(this.state)&&this.parent.state&&r(this.parent.state);(o||n)&&(e=this.state.root||this.parent.state.root)}return e||(e=Nb()),t?e?.[t]:e}function ni(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function si(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function ii(t){let e=this.getRoot()?.context;return t?e[t]:e}function ai(t){let e=this.context;return t?e[t]:e}function rl(){let t=this,e=[];for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||dr.has(r)&&!_s.has(r)||e.push(r);return e}function ol(t=[]){let e=this,r={},o=rl.call(e),n=o.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<o.length;i++){let a=o[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||n&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=A(c&&c.parse)?c.parse():c;r[a]=A(l)?l:JSON.parse(JSON.stringify(l||{}))}else if(a==="scope"){if(e.__ref&&!e.__ref.__hasRootScope)continue;r[a]=JSON.parse(JSON.stringify(c||{}))}else if(a==="props"){let{__element:l,update:f,...u}=e[a];r[a]=u}else mt(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=c)}return r}function Zs(t=[],e=new WeakSet){let r=this;if(e.has(r))return;e.add(r);let o=ol.call(r,t),n=t.length?new Set(t):null;for(let s in o){if(n&&n.has(s)||!Object.prototype.hasOwnProperty.call(r,s))continue;let i=o[s];Array.isArray(i)?o[s]=i.map(a=>z(a)?Zs.call(a,t,e):a):z(i)&&(o[s]=Zs.call(i,t,e))}return o}function Ko(...t){if(_r!=="test"&&_r!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(o=>console.log(`%c${o}:
|
|
21
|
-
`,"font-weight: bold",e[o])):(console.log(r.path),e.keys().forEach(n=>console.log(`%c${n}:`,"font-weight: bold",e[n]))),console.log(e),console.groupEnd(e.key),e}function
|
|
22
|
-
${
|
|
20
|
+
return (${c}); })`)(e)}catch{try{e[a]=v.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of r)if(!o(i))try{e[i]=v.eval(`(${a})`)}catch{e[i]=a}return e},$d=(t,e={verbose:!0})=>{try{return t?v.eval("("+t+")"):{}}catch(r){e.verbose&&console.warn(r)}},Ld=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),wc=t=>{for(let e in t)return!1;return!0},Md=t=>S(t)&&wc(t),Fd=()=>Object.create(null),Ps=(t,e,r={})=>{let o=r.exclude||[],n=r.preventUnderscore;for(let s in e)o.includes(s)||!n&&to(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},eo=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)to(n)||n==="constructor"||n==="prototype"||(o?r.has(n):r.includes(n))||(t[n]=e[n]);return t},Wt=(t,e,r={},o=new WeakMap)=>{if(!H(t)||!H(e)||Ht(t)||Ht(e))return e;if(o.has(t))return o.get(t);o.set(t,t);let n=r.exclude,s=n?n instanceof Set?n:new Set(n):null,i=!r.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&to(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];Ht(l)?t[a]=l:H(c)&&H(l)?t[a]=Wt(c,l,r,o):l!==void 0&&(t[a]=l)}return t},Sc=(t,e,r=new Set)=>{if(typeof t!="object"||typeof e!="object"||t===null||e===null)return t===e;if(r.has(t)||r.has(e))return!0;r.add(t),r.add(e);let o=Object.keys(t),n=Object.keys(e);if(o.length!==n.length)return!1;for(let s=0;s<o.length;s++){let i=o[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!Sc(t[i],e[i],r))return!1}return!0},XC=new Set(["node","__ref"]),Nd=(t,e,r=XC)=>{if(t===e)return!0;if(!H(t)||!H(e)||Ht(t)||Ht(e))return t===e;let o=r instanceof Set?r:new Set(r),n=new WeakSet;function s(i,a){if(n.has(a))return!0;n.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||o.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(Ht(l)||Ht(f)){if(l!==f)return!1}else if(H(l)&&H(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},jd=(t,e)=>{if(e==null)return t;if(zt(e)("string","number"))delete t[e];else if(O(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},kc=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]=kc(t[r]));return e},Bd=(t,e)=>{if(t.length===0)return e;let r={},o=r;for(let n=0;n<t.length;n++)n===t.length-1&&e?o[t[n]]=e:(o[t[n]]={},o=o[t[n]]);return r},Ud=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let n=0;n<e.length-1;n++){if(r[e[n]]===void 0)return;r=r[e[n]]}let o=e[e.length-1];r&&Object.prototype.hasOwnProperty.call(r,o)&&delete r[o]},Vd=(t,e,r)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let o=t;for(let n=0;n<e.length-1;n++)(!o[e[n]]||typeof o[e[n]]!="object")&&(o[e[n]]={}),o=o[e[n]];return o[e[e.length-1]]=r,t},Hd=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length;o++){if(r==null)return;r=r[e[o]]}return r},zd=t=>{let r=[],o=0;for(let n=0;n<t.length;n++)if(r.length<2)r.push(t[n]);else if(t[n]===r[n%2]?o++:(r=[t[n-1],t[n]],o=1),o>=20)return(Nb==="test"||Nb==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},Wd=t=>{let e=new WeakSet;function r(o){if(o&&typeof o=="object"){if(e.has(o))return!0;e.add(o);for(let n in o)if(Object.prototype.hasOwnProperty.call(o,n)&&r(o[n]))return console.log(o,"cycle at "+n),!0}return!1}return r(t)},qd=(t,e)=>{let r=e instanceof Set?e:new Set(e),o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&!r.has(n)&&(o[n]=t[n]);return o}});var Is,Ds,$s,vc=F(()=>{"use strict";Ze();Is=(function(){let t=0;function e(){return t++,t}return e})(),Ds=Is,$s=(t,e,r)=>(ft(r,t)||r||t.key||Is()).toString()});var ke,Kd,br,Cc,Gd,Yd,Xd,_r,Jd,ro,Pt,Zd=F(()=>{"use strict";ke="production",Kd=ke,br=(t=ke)=>t==="production",Cc=(t=ke)=>t==="testing"||t==="test",Gd=Cc,Yd=(t=ke)=>t==="staging",Xd=(t=ke)=>t==="local",_r=(t=ke)=>t==="development"||t==="dev"||t==="local",Jd=(t,e=ke)=>e[t],ro=(t=ke)=>!br(t),Pt=t=>{let e=t&&"env"in t?t.env:typeof process<"u"&&process.env?"production":void 0;if(e&&e!=="production")return!0;let r=t&&"hostname"in t?t.hostname:typeof location<"u"?location.hostname:void 0;return typeof r=="string"&&r?r==="localhost"||r==="127.0.0.1"||r.endsWith(".localhost"):!1}});function Ls(t,e,r){let o;return function(){let n=this,s=arguments,i=function(){o=null,r||t.apply(n,s)},a=r&&!o;clearTimeout(o),o=setTimeout(i,e),a&&t.apply(n,s)}}function rp(t,e=window){let r=function(){return t.apply(e,arguments)};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r}var Qd,tp,JC,ep,zo,Wo,At,qo=F(()=>{"use strict";Qd=(t,e,r=300)=>{let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>{e.apply(t,n)},r)}},tp=t=>{let e={};return(...r)=>{let o=r[0];if(o in e)return e[o];{let n=t(o);return e[o]=n,n}}},JC=/^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/,ep=t=>JC.test(t),zo=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let r of e)if(r.resolveHandler)return!0;return!1},Wo=(t,e)=>{if(typeof t=="function")return t;let r=e?.context?.plugins;if(!r)return t;for(let o of r)if(o.resolveHandler){let n=o.resolveHandler(t,e);if(typeof n=="function")return n}return t},At=(t,e,...r)=>{let o=e?.context?.plugins;if(!o)return!1;let n=!1;for(let s of o)typeof s[t]=="function"&&(s[t](e,...r),n=!0);return n}});var op,zb=F(()=>{"use strict";Ot();Ze();op=(t,e)=>{let{__ref:r}=t,o=t.if;if(A(o)){let n;try{n=o(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete r.__if;return}n?r.__if=!0:delete r.__if}else o!=null&&typeof o=="object"?ft(o,t)?r.__if=!0:delete r.__if:r.__if=!0}});var np,sp,Wb=F(()=>{"use strict";np=(t,...e)=>{t&&e.map(r=>console.log(r))},sp=(t,e,...r)=>{t&&(console.group(e),r.map(o=>console.log(o)),console.groupEnd(e))}});function fp(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 up(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 ip,ap,cp,lp,qb=F(()=>{"use strict";Ot();ms();ip=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),ap=(t,e,r=365)=>{if(Tt(Q)||Tt(Q.cookie))return;let o=new Date;o.setTime(o.getTime()+r*24*60*60*1e3);let n=`expires=${o.toUTCString()}`;Q.cookie=`${t}=${e};${n};path=/`},cp=t=>{if(Tt(Q)||Tt(Q.cookie))return;let e=`${t}=`,o=decodeURIComponent(Q.cookie).split(";");for(let n=0;n<o.length;n++){let s=o[n];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},lp=t=>{Tt(Q)||Tt(Q.cookie)||(Q.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var Ko,Kb,dp,pp=F(()=>{"use strict";Ko={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"])},Kb=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"]),dp=t=>Ko.body.has(t)});var hp,Gb,Go,Ns,qt,gp,Ec,js,mp,Bs,Ac,Tc,Us,Oc,Yo,ZC,Ne,Yb,Ms,Vs,yp,Fs,bp,_p,Rc,Pc,Ic,Dc,$c,Lc,Xb,Mc=F(()=>{"use strict";Uo();xp();Ze();Ot();hp="production",Gb=t=>t.sourcemap!==!1&&hp!=="production",Go=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]},Ns=(t,e,r)=>{let o=[],n=Go(r);n&&(o=[...n]);let s=t.extends;return s&&(o=O(s)?[...o,...s]:[...o,s]),o},qt=(t,e)=>{let{__ref:r}=e,{__extends:o}=r;if(!t)return o;let n=e.variant,s=e.context;if(n&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${n}`;s.components[i]&&(t=i)}return o.includes(t)||(o=Array.isArray(t)?[...o,...t]:[...o,t],r.__extends=o),o},gp=(t,e)=>{if(!t)return e;let{extends:r}=e,o=O(r)?r:[r],n=O(t)?t:[t];return{...e,extends:jo(n,o)}},Ec=()=>Math.random().toString(36).substring(2),js={},mp={},Bs=t=>js[t.__hash],Ac=(t,e)=>{let r=Ec();return w(t)||(t.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(js[r]=e),e},Tc=(t,e)=>t.__hash?e.concat(Bs(t)):Ac(t,e),Us=(t,e,r,o=new Set,n,s)=>{for(let i of t)O(i)?Us(i,e,r,o,n,s):Yo(i,e,r,o,n,void 0,s);return e},Oc=(t,e,r,o=new Set,n,s,i)=>{let a=t.extends,c={...t};delete c.extends;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),n&&n.push(s)),a&&Yo(a,e,r,o,n,s,i),e},Yo=(t,e,r,o=new Set,n,s,i)=>{if(!t||o.has(t))return e;if(O(t))return Us(t,e,r,o,n,i);let a=s;return w(t)?(a=t,t=Vs(t,r)):i&&S(t)&&i.has(t)&&(a=i.get(t)),o.add(t),t?.extends?Oc(t,e,r,o,n,a,i):t&&(e.push(t),n&&n.push(a)),e},ZC=new Set(["parent","node","__ref","__proto__","extends","childExtends","childExtendsRecursive"]),Ne=(t,e,r,o,n)=>{e=dt(e);for(let s in e){if(ZC.has(s))continue;let i=t[s],a=e[s];if(a!==void 0&&Object.prototype.hasOwnProperty.call(e,s)&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"){if(i===void 0)t[s]=a,r&&o?S(a)&&!O(a)?(r[s]=r[s]||{},Yb(r[s],a,o)):r[s]=o:r&&n?.[s]&&(r[s]=n[s]);else if(S(i)&&S(a)){let c=r?r[s]=r[s]||{}:void 0,l=n?.[s];je(s)?t[s]=Ne(i,a,c,o,l):Ne(i,a,c,o,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(O(i)&&O(a))t[s]=i.concat(a);else if(O(i)&&S(a)){let c=Ne({},i);t[s]=Ne(c,a)}}}}return t},Yb=(t,e,r,o)=>{if(o||(o=new WeakSet),!o.has(e)){o.add(e);for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n)||n==="__proto__"||n==="constructor"||n==="prototype")continue;let s=e[n];S(s)&&!O(s)?(t[n]=t[n]||{},Yb(t[n],s,r,o)):t[n]=r}}},Ms=(t,e,r)=>t.reduce((o,n,s)=>{let i=dt(n),a=r?r[s]:void 0;return Ne(o,i,e,a)},{}),Vs=(t,e,r={},o)=>{let n=e?.components||r.components,s=e?.pages||r.pages;if(w(t)){let i=n&&(n[t+"."+o]||n[t]||n["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;r.verbose&&(hp==="test"||hp==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},yp=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),Fs=(t,e,r,o)=>{if(!t)return[];if(t.__hash)return Bs(t)||[];let s=Yo(t,[],e,new Set,r,void 0,o);return r?s:Tc(t,s)},bp=(t,e)=>{if(!t)return e;let r=O(t)?t:[t];return jo(r,e)},_p=t=>{let e=[];function r(o){for(let n in o)Object.prototype.hasOwnProperty.call(o,n)&&(je(n)&&e.push(n),n==="extends"&&(typeof o[n]=="string"?e.push(o[n]):Array.isArray(o[n])&&(e=e.concat(o[n]))),typeof o[n]=="object"&&o[n]!==null&&r(o[n]))}return r(t),e},Rc=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant;if(t.extends)if(Array.isArray(t.extends)&&t.extends.length>0){let[i,...a]=t.extends;if(typeof i=="string"&&s&&n?.components){let c=`${i}.${s}`;n.components[c]?qt([c,...a],t):qt(t.extends,t)}else qt(t.extends,t)}else if(typeof t.extends=="string"&&s&&n?.components){let i=`${t.extends}.${s}`;n.components[i]?qt(i,t):qt(t.extends,t)}else qt(t.extends,t);return Pc(t,e,r),Ic(t,e,r),Dc(t,e,r),t.component&&qt(ft(t.component,t),t),n.defaultExtends&&qt(n.defaultExtends,t),Bo(o.__extends)},Pc=(t,e,r={})=>{let{__ref:o}=t;return r.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&qt(e.childProps.extends,t),o.__extends},Ic=(t,e,r={})=>{let{__ref:o}=t,n=r.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!n&&s&&qt(s,t),o.__extends},Dc=(t,e,r={})=>{let{__ref:o}=t,n=e.childExtendsRecursive,s=r.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return n&&!i&&!s&&qt(n,t),o.__extends},$c=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant,i=Gb(r),a=i?[...o.__extends]:null,c=Bo(o.__extends.map((l,f)=>Vs(l,n,r,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let h=c[d],g=a[d];h&&S(h)&&w(g)&&l.set(h,g)}let f=[],u=Fs(c,n,f,l);o.__extendsStack=u,o.__extendsNames=f}else{let l=Fs(c,n);o.__extendsStack=l}return o.__extendsStack},Lc=(t,e,r={})=>{let{__ref:o}=t,{__extendsStack:n}=o;if(Gb(r)){let s={},i=o.__extendsNames||[],a=Ms(n,s,i),c={};Ne(t,a,c,void 0,s),o.__sourcemap=c}else{let s=Ms(n);Ne(t,s)}return t},Xb=(t,e,r={})=>(Rc(t,e,r),$c(t,e,r),Lc(t,e,r),t)});function wp(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function Sp(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function kp(t,e,r){let{context:o}=e||{},[n]=Go(r),s=r||n;return o?.components?.[s]||o?.pages?.[s]}var je,xp=F(()=>{"use strict";Mc();Ot();je=t=>{if(!w(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function Jb(t,e){let{props:r,on:o}=e,n=Zr(t.split("on")[1]),s=o[n],i=r[t];A(s)?o[n]=(...a)=>{if(s(...a)!==!1&&A(i))return i(...a)}:o[n]=i}var Zb=F(()=>{"use strict";Cs();Ot()});function Fc(t,e={}){let r=e.cachedKeys||[];for(let o in t){let n=t[o];if(o.length>2&&o.charCodeAt(0)===111&&o.charCodeAt(1)===110&&o[2]===o[2].toUpperCase()&&(A(n)||n!=null&&zo(this.context))){let g=Zr(o.slice(2));t.on&&(t.on[g]=n),delete t[o];continue}if(o==="childProps"){t.props[o]=n,delete t[o],r.push(o);continue}let a=this.define?.[o],c=this.context?.define?.[o],l=S(a)||A(a),f=S(c)||A(c);if(l||f)continue;let u=o.charAt(0);if(t_.has(u)){t.props[o]=n,delete t[o],r.push(o);continue}let d=vp.test(o)||Qb.test(o)||tE(n),h=mr.has(o);!d&&!h&&(o in t.props||(t.props[o]=n),delete t[o],r.push(o))}return t}function Nc(t=this,e){let r=e.cachedKeys||[];for(let o in t.props){let n=t.props[o],s=o.length>2&&o.charCodeAt(0)===111&&o.charCodeAt(1)===110,i=A(n)||n!=null&&zo(this.context);if(s&&i){Jb(o,t),delete t.props[o];continue}if(r.includes(o)||o==="childProps")continue;let a=o.charAt(0);if(t_.has(a))continue;let c=this.define?.[o],l=this.context?.define?.[o],f=S(c)||A(c),u=S(l)||A(l),d=vp.test(o)||Qb.test(o),h=mr.has(o);(d||h||f||u)&&(t[o]===void 0||n===null)&&(t[o]=n,t.props&&delete t.props[o])}return t}function jc(t=this){let e=[];return Fc.call(this,t,{cachedKeys:e}),Nc.call(this,t,{cachedKeys:e}),t}function Cp(t={}){return t.on||(t.on={}),t.props||(t.props={}),jc.call(this,t)}function Ap(t,e){this.__element.update({props:t},e)}function Ks(t){let e={update:Ap.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var vp,Qb,t_,QC,tE,Ws,Hs,Ep,qs,Gs,Ys,Bc,zs,Tp,Op,Rp=F(()=>{"use strict";Ho();Zb();Ze();Ot();Cs();qo();vp=/^[A-Z]/,Qb=/^\d+$/,t_=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),QC=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),tE=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(QC.has(e)||vp.test(e))return!0;return!1},Ws=(t,e,r)=>{let{props:o,__ref:n}=t;if(n.__propsStack=[],o)n.__initialProps=o;else return{};return H(o)?{...o}:(n.__propsStack.push(o),{})};Hs=t=>zt(t)("string","number")?{inheritedString:t}:t,Ep=(t,e)=>!t||!e.length?!1:e.includes(t),qs=(t,e)=>{let{__ref:r}=t,o=r.__propsStack||[],n=e.props;if(!n)return o;let s=n[t.key],i=n.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=Hs(i);o.unshift(c)}if(s){let c=Hs(s);o.unshift(c)}return o};Gs=t=>{let e=new Set;return t.filter(r=>!r||yr.has(r)||e.has(r)?!1:(e.add(r),!0))},Ys=(t,e,r)=>(e.props=t.reduce((o,n)=>{if(yr.has(n))return o;for(;A(n);)n=ft(n,e);return st(o,dt(n,{exclude:yr}))},{}),Ks(e),e.props),Bc=(t,e)=>{let{props:r,__ref:o}=t,n=o.__propsStack||[];if(e?.props&&(n=[...qs(t,e)]),S(r)?n.push(r):r==="inherit"&&e?.props?n.push(e.props):r&&n.push(r),O(o.__extendsStack))for(let s=0;s<o.__extendsStack.length;s++){let i=o.__extendsStack[s];i.props&&i.props!==r&&n.push(i.props)}return o.__propsStack=Gs(n),o.__propsStack},zs=(t,e)=>{let{__ref:r}=t,o=Bc(t,e);o.length?Ys(o,t):(r.__propsStack=[],t.props={})},Tp=function(t,e,r){let{__ref:o}=t;if(o.__if)zs(t,e);else try{zs(t,e)}catch(n){t.context?.designSystem?.verbose&&console.warn("initProps error at",o.path?.join("."),n),t.props={},o.__propsStack=[]}return Ks(t),t},Op=(t,e,r)=>{let{__ref:o}=e,s=[...o.__propsStack||[]],i=qs(e,r);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),o.__propsStack=Gs(s),o.__propsStack.length&&Ys(o.__propsStack,e),e}});var e_,Uc,Vc,Hc,zc,Pp,Wc,qc,Kc,Ip,r_=F(()=>{"use strict";Mc();vc();bs();Rp();pp();Ot();e_="production",Uc=(t,e,r)=>{let o=e.childExtends&&e.childExtends.tag,n=e.childProps&&e.childProps.tag,s=Ko.body.has(r)&&r;return{text:t,tag:o||n||s||"string"}},Vc=(t,e,r)=>{if(t===void 0)return(e_==="test"||e_==="development")&&console.warn(r,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:zt(t)("string","number")?Uc(t,e,r):A(t)?{props:t}:t},Hc=(t,e)=>{let r={};return r.origin=t,r.parent=e,r},zc=(t,e,r,o,n)=>{if(!e)return n;if(Je(e)){let s={key:":root",node:e};return n[`${r}_parent`]=s,s}return e},Pp=(t,e)=>{let{__ref:r}=t,{__ref:o}=e,n=e&&e.key===":root";r?.root||(r.root=n?t:o?.root)},Wc=(t,e,r)=>{let{__ref:o}=e;return o||(o=e.ref={}),o.path||(o.path=[]),o.path.concat(r)},qc=(t,e,r,o,n)=>(o.context&&!n.context&&!t.context&&(n.context=o.context),o.context||e.context||n.context||t.context),Kc=(t,e,r)=>{let o=Hc(t,e);return t.__ref=o,o.__defineCache||(o.__defineCache={}),o.__exec||(o.__exec={}),o.__execProps||(o.__execProps={}),o.__class||(o.__class={}),o.__classNames||(o.__classNames={}),o.__attr||(o.__attr={}),o.__changes||(o.__changes=[]),o.__children||(o.__children=[]),o.__extends=Ns(t,e,r),o.path=Wc(t,e,r),o},Ip=(t,e,r,o,n)=>{let i=t?.__hash?{extends:[t]}:Vc(t,e,r);if(!i)return;let a=zc(i,e,r,o,n),c=$s(i,a,r);Kc(i,a,c);let l=Ws(i,a,c),f=qc(i,a,c,o,n),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var Dp,Gc,Yc,Xc,Jc,$p,Zc,Lp,Mp,Fp,Np,o_=F(()=>{"use strict";Uo();Ho();Ze();Ot();Dp=t=>{let{state:e,props:r,__ref:o}=t,n=r?.state||e;return zt(n)("string","number")?(o.__state=n,{value:n}):n===!0?(o.__state=t.key,{}):n?(o.__hasRootState=!0,n):!1},Gc=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},Yc=(t,e)=>{if(!t.includes("../"))return;let o=t.split("../").length-1;for(let n=0;n<o;n++){if(!e.parent)return null;e=e.parent}return e},Xc=(t,e,r={})=>{let o=w(t)?t.split("/"):[t],n=o.length-1;for(let s=0;s<n;s++){let i=o[s],a=o[s+1];if(i==="__proto__"||a==="__proto__")return;let c=e[i];c||(c=e[i]={}),c[a]||(c[a]={}),t=a,e=c}return r.returnParent?e:e[t]},Jc=(t,e,r={})=>{let n=t.__ref.__state;if(!Zc(t))return;let s=Gc(n,e.state),i=e.state;if(s)i=s,n=n.replaceAll("~/","");else{let a=Yc(n,e.state);a&&(i=a,n=n.replaceAll("../",""))}if(i)return Xc(n,i,r)},$p=(t,e)=>{let r=t.__ref,o=Jc(t,e);if(o===void 0)return t.state;if(zt(o)("object","array"))return dt(o);if(zt(o)("string","number","boolean"))return r.__stateType=typeof o,{value:o};console.warn(r.__state,"is not present. Replacing with",{})},Zc=t=>{let{__ref:e}=t,r=e?.__state;return!!(r&&zt(r)("number","string","boolean"))},Lp=function(t){return H(t)?!!(t.update&&t.parse&&t.clean&&t.create&&t.parent&&t.destroy&&t.rootUpdate&&t.parentUpdate&&t.keys&&t.values&&t.toggle&&t.replace&&t.quietUpdate&&t.quietReplace&&t.add&&t.apply&&t.applyReplace&&t.setByPath&&t.setPathCollection&&t.removeByPath&&t.removePathCollection&&t.getByPath&&t.applyFunction&&t.__element&&t.__children):!1},Mp=(t,e)=>{if(!t)return e||{};let r=t.split("/"),o={},n=o,s=r.length-1;for(let i=0;i<=s;i++)n[r[i]]=i===s?e||{}:{},n=n[r[i]];return o},Fp=(t,e)=>{let{__element:r}=e,o=r?.state;if(!o)return;let n=dt(o,Qr),s={[t.key]:n},i=S(o.__depends)?{...o.__depends,...s}:s;return Array.isArray(o)?Ss(o,{...Object.getPrototypeOf(o),__depends:i}):Object.setPrototypeOf(o,{...Object.getPrototypeOf(o),__depends:i}),n},Np=(t,e,r={})=>{let{overwrite:o}=r;if(!o)return;let n=o==="shallow";if(o==="merge"){st(t,e,Qr);return}(n?eo:Wt)(t,e,Qr)}});var eE,jp,n_=F(()=>{"use strict";eE=(t,e)=>{let r=e;for(;r;){if(r===t)return!0;r=Object.getPrototypeOf(r)}return!1},jp=(t,e)=>{let{__ref:r}=t,o=t.context||e.context||r.root?.context;o&&!o.globalScope&&(o.globalScope={});let n=e.scope||r.root?.scope,s=o?.globalScope;if(!t.scope)n?t.scope=n:s?t.scope=Object.create(s):t.scope={};else if(typeof t.scope=="object"&&t.scope!==null&&Object.getPrototypeOf(t.scope)===Object.prototype){let i=n||s;i&&!eE(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var s_,Qc,xr,tl,Bp,Up=F(()=>{"use strict";Ot();qo();s_=(t,e)=>{let r="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[r]},Qc=(t,e,r,o,n)=>{if(t=Wo(t,e),!!A(t))try{let s=t.call(e,e,r||e.state,o||e.context,n);return s&&typeof s.then=="function"&&s.catch(i=>{e.error=i,i instanceof ReferenceError?console.warn("[DOMQL] Async event warning:",i.message):console.error("[DOMQL] Async event error:",i)}),s}catch(s){if(e.error=s,s instanceof ReferenceError?console.warn("[DOMQL] Event handler warning:",s.message):console.error("[DOMQL] Event handler error:",s),e.context?.strictMode)throw s}},xr=(t,e,r)=>{if(!e)throw new Error("Element is required");At(t,e,r);let o=s_(t,e);if(o){let{state:n,context:s}=e;return Qc(o,e,n,s,r)}},tl=(t,e,r,o,n,s)=>{if(t=Wo(t,r),!!A(t))try{let i=t.call(r,e,r,o||r.state,n||r.context,s);return i&&typeof i.then=="function"&&i.catch(a=>{r.error=a,console.error("[DOMQL] Async event update error:",a)}),i}catch(i){if(r.error=i,console.error("[DOMQL] Event update error:",i),r.context?.strictMode)throw i}},Bp=(t,e,r,o)=>{At(t,r,e,o);let n=s_(t,r);if(n){let{state:s,context:i}=r;return tl(n,e,r,s,i,o)}}});var Vp,Xs,Hp=F(()=>{"use strict";Vp={},Xs={}});var a_={};P(a_,{restAdapter:()=>i_,setup:()=>oE});var rE,Qe,oE,i_,c_=F(()=>{"use strict";rE=(t,e,r)=>{let o=e&&!e.startsWith("/")?"/":"",n=new URL(`${t}${o}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&n.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return n.toString()},Qe=async(t,e)=>{let r=await globalThis.fetch(t,e),o=r.headers.get("content-type"),n=o&&o.includes("json")?await r.json():await r.text();return{data:n,error:r.ok?null:n?.message||n?.error||r.statusText,status:r.status}},oE=async({url:t,headers:e,auth:r,fetchOptions:o})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return i_(t,e,r,o)},i_=(t,e={},r,o={})=>{let n=r?.token||null,s=f=>{let u={...e,...f};return n&&(u.Authorization=`Bearer ${n}`),u},i=f=>({...s(f),"Content-Type":"application/json"}),a=f=>({...o,...f}),c=(f,u)=>{let d=u||t;if(f&&(f.startsWith("http://")||f.startsWith("https://")))return f;let h=f&&!f.startsWith("/")?"/":"";return`${d}${h}${f||""}`};return{name:"rest",setToken:f=>{n=f},getSession:async()=>{if(!r?.sessionUrl)return n?{token:n}:null;let f=await Qe(c(r.sessionUrl,r.baseUrl),a({headers:s()}));return f.error?null:f.data},signIn:async f=>{if(!r?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let u=await Qe(c(r.signInUrl,r.baseUrl),a({method:"POST",headers:i(),body:JSON.stringify(f)}));return u.data?.token&&(n=u.data.token),u},signOut:async()=>(r?.signOutUrl&&await Qe(c(r.signOutUrl,r.baseUrl),a({method:"POST",headers:s()})),n=null,{error:null}),select:({from:f,params:u,select:d,limit:h,offset:g,order:p,single:m,headers:b,baseUrl:_})=>{let y={...u};return d&&(y.select=d),h&&(y.limit=h),g&&(y.offset=g),m&&(y.single=!0),p&&(typeof p=="string"?y.order=p:Array.isArray(p)?y.order=p.map(x=>`${x.by}:${x.asc===!1?"desc":"asc"}`).join(","):p.by&&(y.order=`${p.by}:${p.asc===!1?"desc":"asc"}`)),Qe(rE(_||t,f||"",y),a({headers:s(b)}))},rpc:({from:f,params:u,headers:d,baseUrl:h})=>Qe(c(`rpc/${f}`,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:d,baseUrl:h})=>Qe(c(f,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),update:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,b=m?`${f}/${m}`:f;return Qe(c(b,p),a({method:h||"PATCH",headers:i(g),body:JSON.stringify(u)}))},upsert:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,b=m?`${f}/${m}`:f;return Qe(c(b,p),a({method:h||"PUT",headers:i(g),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:d,baseUrl:h})=>{let g=u?.id,p=g?`${f}/${g}`:f;return Qe(c(p,h),a({method:"DELETE",headers:s(d)}))}}}});var f_={};P(f_,{localAdapter:()=>l_,setup:()=>sE});var el,nE,sE,l_,u_=F(()=>{"use strict";el=(t,e)=>{if(!e)return!0;for(let r in e){let o=e[r];if(o===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(o)){if(!o.includes(t[r]))return!1}else if(typeof o=="object"){for(let n in o)if(n==="gt"&&!(t[r]>o[n])||n==="gte"&&!(t[r]>=o[n])||n==="lt"&&!(t[r]<o[n])||n==="lte"&&!(t[r]<=o[n])||n==="neq"&&t[r]===o[n]||n==="like"&&!String(t[r]).includes(o[n]))return!1}else if(t[r]!==o)return!1}return!0},nE=(t,{order:e,limit:r,offset:o,single:n})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,a=e.asc!==!1;s.sort((c,l)=>c[i]<l[i]?a?-1:1:c[i]>l[i]?a?1:-1:0)}return o&&(s=s.slice(o)),r&&(s=s.slice(0,r)),n?{data:s[0]||null,error:null}:{data:s,error:null}},sE=async({data:t,...e})=>l_(t,e),l_=(t={},e={})=>{let r={},o={},n=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(n)try{let u=localStorage.getItem(s+f);r[f]=u?JSON.parse(u):t[f]||[]}catch{r[f]=t[f]||[]}else r[f]=t[f]||[];return r[f]},a=f=>{if(n)try{localStorage.setItem(s+f,JSON.stringify(r[f]))}catch{}},c=(f,u,d,h)=>{let g=o[f];if(g)for(let p of g)p(d,h,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...d})=>{let g=i(f).filter(p=>el(p,u));return nE(g,d)},insert:async({from:f,data:u})=>{let d=i(f),g=(Array.isArray(u)?u:[u]).map(p=>{let m={id:p.id||++l,...p};return d.push(m),m});a(f);for(let p of g)c(f,"INSERT",p,null);return{data:Array.isArray(u)?g:g[0],error:null}},update:async({from:f,data:u,params:d})=>{let h=i(f),g=[];for(let p=0;p<h.length;p++)if(el(h[p],d)){let m={...h[p]};Object.assign(h[p],u),g.push(h[p]),c(f,"UPDATE",h[p],m)}return a(f),{data:g,error:null}},upsert:async({from:f,data:u,params:d})=>{let h=i(f),g=Array.isArray(u)?u:[u],p=[];for(let m of g){let b=d||(m.id!==void 0?{id:m.id}:null),_=b?h.findIndex(y=>el(y,b)):-1;if(_>-1){let y={...h[_]};Object.assign(h[_],m),p.push(h[_]),c(f,"UPDATE",h[_],y)}else{let y={id:m.id||++l,...m};h.push(y),p.push(y),c(f,"INSERT",y,null)}}return a(f),{data:Array.isArray(u)?p:p[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),h=[];for(let g=d.length-1;g>=0;g--)el(d[g],u)&&(h.push(d[g]),d.splice(g,1),c(f,"DELETE",null,h[h.length-1]));return a(f),{data:h,error:null}},subscribe:({from:f,on:u},d)=>{o[f]||(o[f]=[]);let h=(g,p,m)=>{u&&u!=="*"&&u!==m.event||d(g,p,m)};return o[f].push(h),()=>{let g=o[f].indexOf(h);g>-1&&o[f].splice(g,1)}}}}});var no={};P(no,{createAdapter:()=>uE,default:()=>wE,executeFetch:()=>ni,fetchPlugin:()=>Yp,initAdapterAuth:()=>il,parseDuration:()=>Qs,queryClient:()=>xE,registerAdapter:()=>fE,resolveDb:()=>g_});var iE,aE,rl,Zs,ol,qp,cE,lE,fE,uE,g_,Qs,Ft,m_,Js,dE,oi,ti,ei,nl,Kp,sl,pE,d_,zp,y_,b_,Xo,p_,hE,h_,gE,al,__,x_,il,Gp,le,ve,ri,oo,Be,wr,mE,yE,bE,Wp,_E,ni,xE,Yp,wE,Sr=F(()=>{"use strict";R();iE=["select","rpc","insert","update","upsert","delete","subscribe"],aE={rest:()=>Promise.resolve().then(()=>(c_(),a_)),local:()=>Promise.resolve().then(()=>(u_(),f_))},rl=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),Zs=(()=>{if(typeof globalThis<"u"&&globalThis[rl])return globalThis[rl];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,rl,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[rl]}catch{}return t})(),ol=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),qp=(()=>{if(typeof globalThis<"u"&&globalThis[ol])return globalThis[ol];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,ol,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[ol]}catch{}return t})(),cE=5e3,lE=t=>new Promise(e=>{if(Zs[t])return e(Zs[t]);let r=qp[t]||=[],o=!1,n=()=>{o||(o=!0,e(Zs[t]||null))};r.push(n),setTimeout(n,cE)}),fE=(t,e)=>{Zs[t]=e;let r=qp[t];if(r&&r.length){qp[t]=[];for(let o of r)o()}},uE=t=>{let e={};for(let r of iE)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},g_=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,o=typeof e=="string"?e:typeof t=="string"?t:null;if(!o)return null;let n=Zs[o]||aE[o];if(!n&&(n=await lE(o),!n))throw new Error(`Unknown db adapter: "${o}". Use registerAdapter() for adapters with optional deps.`);let s=await n();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${o}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(r)},Qs=t=>{if(!t)return 0;if(typeof t=="number")return t;let e=t.match(/^(\d+)(ms|s|m|h)$/);if(!e)return 0;let r=parseInt(e[1]),o=e[2];return o==="ms"?r:o==="s"?r*1e3:o==="m"?r*6e4:o==="h"?r*36e5:0},Ft=new Map,m_=new Map,Js=new Map,dE=(t,e,r)=>{if(t.cache?.key)return t.cache.key;let o=gE(t.params),n=r?`${r}:`:"",s=`${t.from}:${t.method}:${n}${JSON.stringify(o||"")}`;return e?`${s}:${e}`:s},oi=t=>Ft.get(t)||null,ti=(t,e,r)=>{let o=Ft.get(t),n={data:e,error:r,time:Date.now(),stale:!1};Ft.set(t,n);let s=m_.get(t);if(s)for(let i of s)A(i)&&i(n);return n},ei=t=>{if(t){let e=Ft.get(t);e&&(e.stale=!0);return}for(let[,e]of Ft)e.stale=!0},nl=t=>{if(t){Ft.delete(t);return}Ft.clear()},Kp=t=>!t&&t!==!1?{staleTime:6e4,gcTime:3e5}:t===!1?null:t===!0?{staleTime:6e4,gcTime:3e5}:typeof t=="number"?{staleTime:t,gcTime:Math.max(t*5,3e5)}:w(t)?{staleTime:Qs(t),gcTime:3e5}:{staleTime:Qs(t.stale||t.staleTime)||6e4,gcTime:Qs(t.gc||t.gcTime||t.expire)||3e5,key:t.key},sl=null,pE=()=>{sl||(sl=setInterval(()=>{let t=Date.now();for(let[e,r]of Ft){let o=m_.get(e);!(o&&o.size>0)&&t-r.time>(r.gcTime||3e5)&&Ft.delete(e)}},3e4),sl.unref&&sl.unref())};pE();d_=3,zp=t=>Math.min(1e3*2**t,3e4),y_=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:d_,delay:zp}:typeof e=="number"?{count:e,delay:zp}:{count:e.count??d_,delay:A(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:zp}},b_=async(t,e)=>{let{count:r,delay:o}=e,n;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(n=i.error,s<r){let a=A(o)?o(s,n):o;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(n=i,s<r){let a=A(o)?o(s,i):o;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:n}},Xo={focus:new Set,online:new Set},p_=!1,hE=()=>{if(p_||typeof window>"u")return;p_=!0;let t=()=>{for(let r of Xo.focus)r()},e=()=>{for(let r of Xo.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},h_=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(w(t))return{from:t,method:"select",query:!0,on:"create"};if(S(t)){let o={...t};return o.from=o.from||r.__state||e.key,o.method=o.method||"select",o.on=o.on||"create",o.query===void 0&&(o.query=!0),o}return null},gE=t=>(!t||A(t),t),al=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},__=(t,e)=>{let o=(t?.state?.root||e?.state?.root)?.__fetchScope;return o?String(o):void 0},x_=(t,e,r)=>{let o;if(!t)o=void 0;else if(A(t))o=t(e,e.state);else{o={};for(let n in t){let s=t[n];o[n]=A(s)?s(e,e.state):s}}return o},il=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(o,n)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:o,session:n,loading:!1}})};try{let o=await t.getSession();r(o?.user||null,o)}catch(o){console.warn("[fetch] Failed to restore auth session:",o.message)}t.onAuthStateChange&&t.onAuthStateChange((o,n)=>{r(n?.user||null,n)})},Gp=async(t,e)=>{if(A(t.select))return t.auth!==!1&&await il(t,e),t;if(t.__resolved)return t.auth!==!1&&await il(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=g_(t);let r=await t.__resolving;return delete t.__resolving,r?(r.auth=t.auth,r.url=t.url,r.key=t.key,t.__resolved=r,e.fetch=r,t.auth!==!1&&await il(r,e),r):null},le=(t,e,...r)=>{let o=A(t[e])?t[e]:null;o&&o.call(t,...r,t,t.state,t.context)},ve=(t,e,r,...o)=>{let n=t&&A(t[r])?t[r]:null;n&&n.call(e,...o,e,e.state,e.context)},ri=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let n=new FormData(r);for(let[s,i]of n.entries())e[s]=i;return e}let o=r.querySelectorAll("input, textarea, select");for(let n=0;n<o.length;n++){let s=o[n],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},oo=(t,e,r,o={})=>{let n=r&&r.startsWith("~/"),s=n&&t.state?.root||t.state;if(s?.update)if(n){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&i in e?s.update(e,{preventFetch:!0,...o}):s.update({[i]:e},{preventFetch:!0,...o})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...o})}},Be=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},wr=async(t,e,r,o={})=>{let n=r?.fetch;if(!n||!e||!e.__ref||t.enabled===!1||A(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||A(t.skip)&&t.skip(e,e.state))return;let s=await Gp(n,r);if(!s||!e.__ref)return;let i=e.__ref,{from:a,method:c,query:l,params:f,cache:u,transform:d,single:h,auth:g,fields:p,as:m,limit:b,offset:_,order:y,headers:x,baseUrl:k,page:E,cursor:T,getNextPageParam:$,getPreviousPageParam:D,infinite:I,placeholderData:z,initialData:V,select:rt,keepPreviousData:at}=t,G=w(rt)?rt:void 0;if(l&&A(e.getQuery)){let nt=e.getQuery(s.name||"paths");nt&&(G=nt.select||nt.length&&nt.join(",")||G)}let K=x_(f,e,r),lt=Kp(u),Ut=y_(t),W=al(e,r),wt=__(e,r),L=W?`:${W}`:"",ot=wt?`${wt}:`:"",U=lt?u?.key||`${a}:${c}:${ot}${JSON.stringify(K||"")}${I?":infinite":""}${E?":p"+JSON.stringify(E):""}${L}`:null;if(!i.__fetchInitialized&&U&&(i.__fetchInitialized=!0,V!==void 0)){let nt=A(V)?V():V;ti(U,nt,null)}if((c==="select"||c==="rpc")&&U&<){let nt=oi(U);if(nt&&!nt.error){let M=Date.now()-nt.time,ht=nt.stale||M>(lt.staleTime||0),q=nt.data;if(A(rt)&&(q=rt(q,e,e.state)),d&&(q=d(q,e,e.state)),oo(e,q,m),!ht){Be(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(z!==void 0){let M=A(z)?z(e,e.state):z;M!==void 0&&oo(e,M,m)}}if(U&&Js.has(U)&&!o.force){let nt=Js.get(U);try{let M=await Promise.race([nt,new Promise((ht,q)=>setTimeout(()=>q("DEDUP_TIMEOUT"),15e3))]);if(M?.data!==void 0){let ht=M.data;A(rt)&&(ht=rt(ht,e,e.state)),d&&(ht=d(ht,e,e.state)),oo(e,ht,m),le(e,"onFetchComplete",ht),ve(t,e,"onFetchComplete",ht)}}catch{}return}let Y=!oi(U)?.data;Be(e,{isFetching:!0,isLoading:Y,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),le(e,"onFetchStart"),ve(t,e,"onFetchStart");let j=r?.analyze?.emitNetwork,pt=j?typeof performance<"u"?performance.now():Date.now():0;j&&j({phase:"start",mode:"query",from:a,method:c,cacheKey:U,lang:W});let Ke=b_(async()=>{if(g!==!1&&s.auth!==!1&&s.getSession){let q=await s.getSession();if(g===!0&&!q){let Lt={message:"Not authenticated"};return Be(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Lt,status:"error",fetchStatus:"idle"}),le(e,"onFetchError",Lt),ve(t,e,"onFetchError",Lt),{data:null,error:Lt}}}let nt=s[c];if(!A(nt))return{data:null,error:{message:`Method "${c}" not found on adapter`}};let M={from:a,select:G,params:K,single:h,limit:b,offset:_,order:y,headers:x,baseUrl:k},ht=al(e,r);if(ht&&(M.headers={...M.headers,"Accept-Language":ht}),E!==void 0){if(S(E))E.offset!==void 0&&(M.offset=E.offset),E.limit!==void 0&&(M.limit=E.limit),E.cursor!==void 0&&(M.params={...M.params,cursor:E.cursor});else if(typeof E=="number"){let q=t.pageSize||b||20;M.offset=(E-1)*q,M.limit=q}}if(T!==void 0&&(M.params={...M.params,cursor:T}),c==="insert"||c==="update"||c==="upsert"){let q;if(p===!0||t.on==="submit")q=ri(e);else if(O(p)){let Lt=ri(e);q={};for(let Uu of p)q[Uu]=Lt[Uu]}else e.state?.parse?q=e.state.parse():S(e.state)&&(q={...e.state});d&&(q=d(q,e,e.state)),M.data=q}if(c==="rpc"){let q=K;if(t.on==="submit"){let Lt=ri(e);q=t.transformParams?t.transformParams(Lt,e,e.state):Lt}M.params=q}if(c==="subscribe"){let q=s.subscribe({from:a,params:K,on:t.subscribeOn},(Lt,Uu,UP)=>{oo(e,Lt,m),le(e,"onFetchComplete",Lt),ve(t,e,"onFetchComplete",Lt)});return i.__unsubscribe=q,{data:null,error:null,subscribed:!0}}return nt(M)},Ut);U&&Js.set(U,Ke);try{let nt=await Ke;if(nt?.subscribed)return;let{data:M,error:ht}=nt||{};if(ht){U&&ti(U,null,ht),Be(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:ht,status:"error",fetchStatus:"idle"}),le(e,"onFetchError",ht),ve(t,e,"onFetchError",ht),j&&j({phase:"error",mode:"query",from:a,method:c,cacheKey:U,error:ht.message||ht,durationMs:(typeof performance<"u"?performance.now():Date.now())-pt});return}if(M!==void 0){if((c==="select"||c==="rpc")&&U){let Lt=ti(U,M,null);Lt.gcTime=lt?.gcTime||3e5}let q=M;I&&O(M)&&(i.__pages||(i.__pages=[]),o.direction==="previous"?i.__pages.unshift(M):i.__pages.push(M),q=i.__pages.flat(),$&&(i.__nextPageParam=$(M,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),D&&(i.__prevPageParam=D(M,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),A(rt)&&(q=rt(q,e,e.state)),d&&(q=d(q,e,e.state)),(!at||q!==void 0)&&oo(e,q,m),Be(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),le(e,"onFetchComplete",q),ve(t,e,"onFetchComplete",q),j&&j({phase:"success",mode:"query",ok:!0,from:a,method:c,cacheKey:U,durationMs:(typeof performance<"u"?performance.now():Date.now())-pt})}}catch(nt){Be(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:nt,status:"error",fetchStatus:"idle"}),le(e,"onFetchError",nt),ve(t,e,"onFetchError",nt),j&&j({phase:"error",mode:"query",from:a,method:c,cacheKey:U,error:nt.message||String(nt),durationMs:(typeof performance<"u"?performance.now():Date.now())-pt})}finally{U&&Js.delete(U)}},mE=(t,e,r)=>{let o=t.on,n=e.__ref;n.__fetchListeners||(n.__fetchListeners=[]);let s=t.__runner||wr;if(o==="submit"){let i=c=>{c.preventDefault(),s(t,e,r)},a=e.node;a&&(a.addEventListener("submit",i),n.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(o==="click"){let i=()=>s(t,e,r),a=e.node;a&&(a.addEventListener("click",i),n.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else o==="stateChange"&&(n.__fetchOnStateChange=()=>s(t,e,r))},yE=(t,e,r)=>{let o=e.__ref;o.__fetchCleanups||(o.__fetchCleanups=[]),hE();let n=t.refetchInterval;if(n){let s=typeof n=="number"?n:Qs(n);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&wr(t,e,r,{force:!0})},s);o.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=al(e,r),a=__(e,r),c=dE(t,i,a),l=oi(c),f=Kp(t.cache);(!l||l.stale||Date.now()-l.time>(f?.staleTime||0))&&wr(t,e,r,{force:!0})};Xo.focus.add(s),o.__fetchCleanups.push(()=>Xo.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>wr(t,e,r,{force:!0});Xo.online.add(s),o.__fetchCleanups.push(()=>Xo.online.delete(s))}},bE=(t,e,r)=>{if(!e.optimistic)return null;let o=t.__ref,n=e.as,s=t.state?.parse?t.state.parse():S(t.state)?{...t.state}:t.state;o.__optimisticSnapshot=s;let i=A(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&oo(t,i,n),s},Wp=(t,e)=>{let r=t.__ref,o=r.__optimisticSnapshot;o!==void 0&&(oo(t,o,e.as),delete r.__optimisticSnapshot)},_E=async(t,e,r)=>{let o=r?.fetch;if(!o)return;let n=await Gp(o,r);if(!n)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:h,baseUrl:g,invalidates:p,optimistic:m,onMutate:b,onSuccess:_,onError:y,onSettled:x}=t,k;if(c===!0||u==="submit")k=ri(e);else if(O(c)){let D=ri(e);k={};for(let I of c)k[I]=D[I]}else e.state?.parse?k=e.state.parse():S(e.state)&&(k={...e.state});l&&(k=l(k,e,e.state)),A(b)&&b(k,e,e.state);let E=m?bE(e,t,k):null;s.__fetching=!0,Be(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),le(e,"onFetchStart"),ve(t,e,"onFetchStart");let T=r?.analyze?.emitNetwork,$=T?typeof performance<"u"?performance.now():Date.now():0;T&&T({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&n.auth!==!1&&n.getSession){let K=await n.getSession();if(d===!0&&!K){E!==void 0&&Wp(e,t);let lt={message:"Not authenticated"};le(e,"onFetchError",lt),ve(t,e,"onFetchError",lt);return}}let D=n[i];if(!A(D))return;let I={from:a,data:k,headers:h,baseUrl:g};t.params&&(I.params=x_(t.params,e,r));let z=al(e,r);z&&(I.headers={...I.headers,"Accept-Language":z});let V=y_(t),rt=await b_(()=>D(I),V),{data:at,error:G}=rt||{};if(G){E!==void 0&&Wp(e,t),Be(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:G,status:"error",fetchStatus:"idle"}),le(e,"onFetchError",G),A(y)&&y(G,k,e),A(x)&&x(null,G,k,e),T&&T({phase:"error",mode:"mutation",from:a,method:i,error:G.message||String(G),durationMs:(typeof performance<"u"?performance.now():Date.now())-$});return}if(delete s.__optimisticSnapshot,at!==void 0){let K=f?{[f]:at}:at;e.state?.update&&e.state.update(K,{preventFetch:!0})}if(Be(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),le(e,"onFetchComplete",at),ve(t,e,"onFetchComplete",at),A(_)&&_(at,k,e),A(x)&&x(at,null,k,e),T&&T({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-$}),p){let K=O(p)?p:[p];for(let lt of K)if(lt===!0||lt==="*")for(let[Ut]of Ft)Ut.startsWith(a+":")&&ei(Ut);else ei(lt)}}catch(D){E!==void 0&&Wp(e,t),Be(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:D,status:"error",fetchStatus:"idle"}),le(e,"onFetchError",D),ve(t,e,"onFetchError",D),A(y)&&y(D,k,e),A(x)&&x(null,D,k,e),T&&T({phase:"error",mode:"mutation",from:a,method:i,error:D.message||String(D),durationMs:(typeof performance<"u"?performance.now():Date.now())-$})}finally{s.__fetching=!1}},ni=(t,e,r,o)=>{if(!t||!o?.fetch)return;let s=ft(t,e);if(!s)return;let i=O(s)?s.map(c=>h_(ft(c,e),e)).filter(Boolean):[h_(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?_E:wr;c.on==="create"?f(c,e,o):Promise.resolve().then(()=>{mE({...c,__runner:f},e,o)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&yE(c,e,o)}let a=e.__ref;a.refetch=c=>{for(let l of i)wr(l,e,o,{force:!0,...c})},a.fetchNextPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__nextPageParam;if(l==null)return;let f={...c,cursor:l};wr(f,e,o,{direction:"next",force:!0})},a.fetchPreviousPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__prevPageParam;if(l==null)return;let f={...c,cursor:l};wr(f,e,o,{direction:"previous",force:!0})}},xE={invalidateQueries:t=>{if(!t){ei();return}if(w(t))for(let[e]of Ft)(e.startsWith(t)||e.includes(t))&&ei(e);else if(O(t)){let e=t.join(":");for(let[r]of Ft)r.includes(e)&&ei(r)}},removeQueries:t=>{if(!t){nl();return}if(w(t))for(let[e]of Ft)(e.startsWith(t)||e.includes(t))&&nl(e)},getQueryData:t=>oi(t)?.data??void 0,setQueryData:(t,e)=>{let r=oi(t),o=A(e)?e(r?.data):e;ti(t,o,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let o=await Gp(r,e);if(!o)return;let n=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=o[t.method||"select"];if(!A(s))return;let i=await s({from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single});if(i?.data!==void 0&&!i?.error){let a=ti(n,i.data,null);a.gcTime=Kp(t.cache)?.gcTime||3e5}return i},getCache:()=>Ft,clear:()=>nl(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of Ft)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||nl(r))}},Yp={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||Js.clear(),ni(e,t,t.state,t.context))}},wE=ni});function ii(t){let e=this,{__ref:r}=e,o=[].concat(t),n=r.root[o[0]];if(!o||!o.length)return console.log(o,"on",e.key,"is undefined");for(;n.key===o[0]&&(o.shift(),!!o.length);)if(n=n[o[0]],!n)return;return n}function Jp(t){let e=this,{parent:r}=e;if(A(t))return r.state&&t(r,r.state,r.context)?r:r.parent?r.lookup(t):void 0;if(e[t])return e[t];for(;r.param!==t;){if(r[t])return r[t];if(r=r.parent,!r)return}return r}function Zp(t){let e=this,{__ref:r}=e,o=r?.__children;if(o)for(let n=0;n<o.length;n++){let s=o[n],i=e[s];if(s===t)return i;if(A(t)){let c=t(i,i.state,i.context);if(i.state&&c)return i}let a=i?.lookdown?.(t);if(a)return a}}function Qp(t,e=[]){let r=this,{__ref:o}=r,n=o?.__children;if(n){for(let s=0;s<n.length;s++){let i=n[s],a=r[i];if(i===t)e.push(a);else if(A(t)){let c=t(a,a.state,a.context);a.state&&c&&e.push(a)}a?.lookdownAll?.(t,e)}return e.length?e:void 0}}function cl(t={}){let e=this;if(e.node?.style){for(let r in t){let o=t[r],n=e[r];if(S(o)&&n)cl.call(n,o);else if(o!=null){let s=r.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(o).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function S_(t){let e=this;if(xr("beforeRemove",e,t)===!1)return e;A(e.node.remove)?e.node.remove():br()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=ws(e.parent.__ref.__children,e.key)),xr("remove",e,t)}function th(t){return this[t]}function eh(t,e){let r=this;if(t)return r.update(t,e),r}function rh(t){return t?this.__ref&&this.__ref[t]:this.__ref}function ai(){return this.getRef("__children").map(e=>this[e])}function ci(){return this.getRef().path}function fi(t){let e=null,r=o=>o.__element&&o.root?.isRootState;if(!this)e=w_();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let o=this.state&&r(this.state),n=A(this.state)&&this.parent.state&&r(this.parent.state);(o||n)&&(e=this.state.root||this.parent.state.root)}return e||(e=w_()),t?e?.[t]:e}function ui(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function di(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function pi(t){let e=this.getRoot()?.context;return t?e[t]:e}function hi(t){let e=this.context;return t?e[t]:e}function ll(){let t=this,e=[];for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||mr.has(r)&&!Es.has(r)||e.push(r);return e}function fl(t=[]){let e=this,r={},o=ll.call(e),n=o.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<o.length;i++){let a=o[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||n&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=A(c&&c.parse)?c.parse():c;r[a]=A(l)?l:JSON.parse(JSON.stringify(l||{}))}else if(a==="scope"){if(e.__ref&&!e.__ref.__hasRootScope)continue;r[a]=JSON.parse(JSON.stringify(c||{}))}else if(a==="props"){let{__element:l,update:f,...u}=e[a];r[a]=u}else bt(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=c)}return r}function si(t=[],e=new WeakSet){let r=this;if(e.has(r))return;e.add(r);let o=fl.call(r,t),n=t.length?new Set(t):null;for(let s in o){if(n&&n.has(s)||!Object.prototype.hasOwnProperty.call(r,s))continue;let i=o[s];Array.isArray(i)?o[s]=i.map(a=>H(a)?si.call(a,t,e):a):H(i)&&(o[s]=si.call(i,t,e))}return o}function Jo(...t){if(kr!=="test"&&kr!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(o=>console.log(`%c${o}:
|
|
21
|
+
`,"font-weight: bold",e[o])):(console.log(r.path),e.keys().forEach(n=>console.log(`%c${n}:`,"font-weight: bold",e[n]))),console.log(e),console.groupEnd(e.key),e}function nh(...t){(kr==="test"||kr==="development")&&console.log(...t)}function gi(...t){(kr==="test"||kr==="development")&&console.warn(...t)}function so(...t){if(kr==="test"||kr==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&Jo.call(this),new Error(...t)}}function mi(){let t=this,{key:e,parent:r}=t,{__children:o}=r.__ref,n=o.indexOf(e),s=o[n+1];return r[s]}function yi(t){let e=t||this,{key:r,parent:o}=e,{__children:n}=o.__ref;if(!n)return;let s=n.indexOf(r);return o[n[s-1]]}function bi(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let r=e.data.varCaches,o={},n;for(let s in t)t[s]!==r[s]&&(n=!0,o[s]=t[s]);return{changed:s=>{if(!n)return;let i=s(o,dt(r));for(let a in o)r[a]=o[a];return i},timeout:(s,i)=>{if(!n)return;let a=setTimeout(()=>{s(o),clearTimeout(a)},i)}}}function sh(t,...e){let r=this.context,o=r.utils?.[t]||r.functions?.[t]||r.methods?.[t]||r.snippets?.[t];if(o)try{let n=o.call(this,...e);return n&&typeof n.then=="function"&&n.catch(s=>{so.call(this,s)}),n}catch(n){if(so.call(this,n),r?.strictMode)throw n}}async function _i(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(Sr(),no));await n(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(Sr(),no));await n(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(Sr(),no)).then(({resolveDb:n})=>n(e));e.__resolving=r;let o=await r;if(e.__resolved=o,t.context.fetch=o,delete e.__resolving,o?.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(Sr(),no));await n(o,t.context)}return o}function xi(t){let e=this,r=t||Xs.useStateQuery||e.context?.useStateQuery;if(!r)return null;let o={};if(Xp(e,o),r===!0)return o;let n=TE[r];return n?n(o):o}function ih(t,e){return!!(Vo.has(t)||e?.context?.methods?.[t])}var kr,k_,li,w_,oh,Xp,SE,v_,kE,vE,CE,EE,AE,TE,C_=F(()=>{"use strict";Up();Ho();Ot();Ze();Zd();Uo();Hp();kr="production";k_=null,li=t=>{k_=t||null},w_=()=>k_||null;oh=(t,e,r,o)=>Object.defineProperty(t,e,{get:r,set:o});Xp=(t,e)=>{let r=t.__ref;if(!r)return;let o=r.__state;o&&typeof o=="string"&&SE(e,o);let n=r.__children;if(n)for(let a=0;a<n.length;a++){let c=t[n[a]];c&&c.__ref&&Xp(c,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&Xp(i,e)},SE=(t,e)=>{let o=e.replaceAll("../","").replaceAll("~/","").split("/"),n=t;for(let s=0;s<o.length;s++){let i=o[s];s===o.length-1?n[i]||(n[i]=!0):(n[i]===!0&&(n[i]={}),n[i]||(n[i]={}),n=n[i])}},v_=(t,e=0)=>{let r=" ".repeat(e),o=Object.entries(t);return o.length?o.map(([s,i])=>i===!0?`${r}${s}`:`${r}${s} {
|
|
22
|
+
${v_(i,e+1)}
|
|
23
23
|
${r}}`).join(`
|
|
24
|
-
`):""},
|
|
25
|
-
${
|
|
26
|
-
}`,
|
|
24
|
+
`):""},kE=t=>`{
|
|
25
|
+
${v_(t,1)}
|
|
26
|
+
}`,vE=t=>{let e={fields:{},include:[]},r=(o,n)=>{let s=[];for(let i in o)if(o[i]===!0)s.push(i);else{let a=n?`${n}.${i}`:i;e.include.push(a),r(o[i],a)}s.length&&(e.fields[n||"_root"]=s)};return r(t,""),e},CE=t=>{let e=s=>{let i=[],a=[];for(let c in s)if(s[c]===!0)i.push(c);else{let l=e(s[c]),f=[];l.select&&f.push(`$select=${l.select}`),l.expand&&f.push(`$expand=${l.expand}`),a.push(f.length?`${c}(${f.join(";")})`:c)}return{select:i.length?i.join(","):"",expand:a.length?a.join(","):""}},{select:r,expand:o}=e(t),n=[];return r&&n.push(`$select=${r}`),o&&n.push(`$expand=${o}`),n.join("&")},EE=(t,e)=>{let r=[],o=[],n=new Set,s=(f,u,d)=>{n.add(u),d&&o.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let h in f)f[h]===!0?r.push(`${u}.${h}`):s(f[h],h,u)},i=Object.keys(t);i.length===1&&t[i[0]]!==!0?s(t[i[0]],i[0],null):s(t,"_root",null);let a=[...n][0]||"_root",c=r.length?r.join(", "):"*",l=o.length?`
|
|
27
27
|
`+o.join(`
|
|
28
28
|
`):"";return`SELECT ${c}
|
|
29
|
-
FROM ${a}${l}`},
|
|
29
|
+
FROM ${a}${l}`},AE=t=>{let e=[],r=(o,n)=>{for(let s in o){let i=n?`${n}/${s}`:s;o[s]===!0?e.push(i):r(o[s],i)}};return r(t,""),e},TE={graphql:kE,"json-api":vE,odata:CE,sql:EE,paths:AE}});var OE,ah,E_=F(()=>{"use strict";vc();OE={snapshotId:Ds},ah=(t,e)=>{let r=t.__ref,{currentSnapshot:o,calleeElement:n}=e;if(!n||n===t){let a=OE.snapshotId();return r.__currentSnapshot=a,[a,t]}let i=n.__ref.__currentSnapshot;return o<i?[i,n,!0]:[i,n]}});var ul,ch,A_=F(()=>{ul=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),ch=t=>typeof t=="string"&&ul.has(t)});async function lh(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 T_=F(()=>{"use strict"});var Zo,Qo,wi,fe,vr,tn,Si,Ce,dl,RE,io,PE,en,fh,O_=F(()=>{"use strict";Zo=t=>t!=="latest"?`@${t}`:"",Qo=t=>t?`/${t}`:"",wi=t=>{let e=typeof t=="string"?t.replace(/\/+$/,""):"";if(!e)return{name:"",subpath:""};let r=e.split("/"),o=e.startsWith("@")?2:1;return{name:r.slice(0,o).join("/"),subpath:r.slice(o).join("/")}},fe={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,r)=>`${fe.skypack.url}/${t}${Zo(e)}${Qo(r)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,r)=>`${fe.esmsh.url}/${t}${Zo(e)}${Qo(r)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,r)=>`${fe.unpkg.url}/${t}${Zo(e)}${Qo(r)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,r)=>`${fe.jsdelivr.url}/${t}${Zo(e)}${Qo(r)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,r)=>`${fe.symbols.url}/${t}${Zo(e)}${Qo(r)}/+esm`}},vr={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},tn=(t={})=>{let{packageManager:e}=t;return vr[e]||null},Si=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},Ce=(t,e="latest",r="esmsh")=>{let o=fe[r]||fe.esmsh,{name:n,subpath:s}=wi(t);return o.formatUrl(n||t,Si(e),s)},dl=(t,e="latest",r="esmsh")=>{let o=fe[r]||fe.esmsh,n=Si(e),{name:s,subpath:i}=wi(t);return`${o.url}/${s||t}${Zo(n)}${Qo(i)}/`},RE=/^node:|^@symbo-ls\//,io=t=>typeof t=="string"&&RE.test(t),PE=/[<>…]/,en=t=>typeof t=="string"&&PE.test(t),fh=(t,e="skypack",r={})=>{let o=t.dependencies||{},n=Object.keys(o);if(!n.length)return"";let s=r.pin||{},i={};for(let f of n){if(io(f)||en(f))continue;let u=s[f]||o[f]||"latest";i[f]=Ce(f,u,e),f.endsWith("/")||(i[f+"/"]=dl(f,u,e))}if(!Object.keys(i).length)return"";let a='<script type="importmap">',c="<\/script>",l=`{
|
|
30
30
|
"imports": ${JSON.stringify(i,null,2)}
|
|
31
|
-
}`;return`${a}${l}${c}`}});var Dp,Kb=j(()=>{"use strict";Dp=t=>{if(!t)return"";let e=new Date(t),r=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),o=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${o}, ${r}`}});var $p,Gb=j(()=>{"use strict";$p=(t,e)=>{let r=setTimeout(()=>{let{props:o}=t;if(!e.clientHeight){let{node:{clientHeight:n}}=t;n&&(e.clientHeight=n)}if(e.active){if(o.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let n=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(n)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(r)})}});var Lp,Yb=j(()=>{"use strict";Lp=function(e){let r=[0,1];for(let o=2;o<=e;o++)r[o]=r[o-1]+r[o-2];return r[e]}});var Mp,Xb=j(()=>{"use strict";Mp=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function Xo(t,e={}){let{window:r=globalThis}=e,{document:o=r.document}=e;return new Promise((n,s)=>{let i=o.querySelector(`script[src="${t}"]`);if(i)return n(i);let a=o.createElement("script");a.src=t,a.async=e.async===!0,a.type=e.type||"text/javascript",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,n(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},o.head.appendChild(a)})}async function Vp(t,e={}){let{window:r=globalThis}=e,{document:o=r.document}=e;return new Promise((n,s)=>{let i=o.querySelector(`link[href="${t}"]`);if(i)return n(i);let a=o.createElement("link");a.href=t,a.rel=e.rel||"stylesheet",a.type="text/css",a.media=e.media||"all",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,n(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},o.head.appendChild(a)})}var Fp,Np,jp,Bp,Up,Jb=j(()=>{"use strict";Fp=(t,e=!1,r=document,o="text/javascript")=>new Promise((n,s)=>{try{let i=r.createElement("script");i.type=o,i.async=e,i.src=t,i.addEventListener("load",a=>{n({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),r.body.appendChild(i)}catch(i){s(i)}}),Np=(t,e=document,r="text/javascript")=>new Promise((o,n)=>{let s=e.createElement("script");s.type=r,s.src=t;let i=e.createElement("div");i.style.cssText="position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,0.8);z-index:9999;",e.body.appendChild(i),s.onload=()=>{console.log(`Successfully loaded: ${t}`),e.body.removeChild(i),o()},s.onerror=()=>{e.body.removeChild(i),n(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),jp=(t,e=document,r,o="text/javascript")=>{let n=new window.XMLHttpRequest;if(n.open("GET",t,!1),n.send(),n.status===200){let s=e.createElement("script");s.type=o,s.text=n.responseText,e.body.appendChild(s),typeof r=="function"&&r()}else throw new Error(`Failed to load the script ${t}`)},Bp=(t,e=!1,r=document,o="text/javascript")=>new Promise((n,s)=>{try{let i=r.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{n({status:!0})}),r.head.appendChild(i)}catch(i){s(i)}}),Up=(t,e=!1,r=document,o="text/javascript",n="smbls-script")=>{try{let s=r.createElement("script");s.type=o,s.async=e,s.id=n,s.innerHTML=t,r.body.appendChild(s)}catch(s){console.warn(s)}}});function mE(t,e){if(!e||typeof e!="object")return t;let r=n=>{if(!gE(n))return n;let s=e[n];return s?.src?s.src:n},o={...t};for(let[n,s]of Object.entries(o))typeof s=="string"?o[n]=r(s):Array.isArray(s)&&(o[n]=s.map(i=>typeof i=="string"?r(i):i));return o}function il(t,e){if(!t||!e)return;let r=e.split("."),o=t;for(let n of r){if(o==null||typeof o!="object")return;o=o[n]}return o}function yE(t,e,r){let n=(e.config||e.settings||{}).polyglot||e.polyglot,s=r?.lang||n?.defaultLang||"en",a=(n?.translations||{})[s]||{},c=r?.state||{},l={...t};for(let[f,u]of Object.entries(l))typeof u!="string"||!u.includes("{{")||(l[f]=u.replace(/\{\{\s*([^|{}]+?)\s*(?:\|\s*(\w+)\s*)?\}\}/g,(d,h,g)=>{let p=h.trim();if(g==="polyglot")return a[p]??il(a,p)??d;if(g==="getLocalStateLang")return il(c,p+s)??d;let m=il(c,p);return m!==void 0?m:a[p]??il(a,p)??d}));return l}function Zb(t){let e={...t};for(let[r,o]of Object.entries(e))if(typeof o=="function"){let n=o.toString(),s=n.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=n.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[r]=`{{ ${i[1]} | polyglot }}`;continue}let a=n.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[r]=`{{ ${a[1]} }}`;continue}delete e[r]}else if(typeof o=="string"){let n=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(n){e[r]=`{{ ${n[1]} | getLocalStateLang }}`;continue}let s=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | polyglot }}`;continue}if(o.includes("=>")&&o.includes("s.")){let i=o.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[r]=`{{ ${i[1]} }}`;continue}}}return e}function zp(t,e,r,{isProduction:o=!1,channel:n="production"}={}){let s=t.pages?.[e],i=S(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=Zb(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=Zb(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let p=t.name||t.key;p?o?d.title=p:n==="development"?d.title=`${p} / dev:symbo.ls`:n==="staging"?d.title=`${p} / staging:symbo.ls`:d.title=`${p} / symbo.ls`:d.title="Symbols demo"}d=yE(d,t,r),d.title&&(l.has("title")||!d["og:title"])&&(l.has("og:title")||(d["og:title"]=d.title)),d.description&&(l.has("description")||!d["og:description"])&&(l.has("og:description")||(d["og:description"]=d.description)),d.title&&!d["twitter:title"]&&(d["twitter:title"]=d.title),d.description&&!d["twitter:description"]&&(d["twitter:description"]=d.description);let h=r?.actualPathname||e;if(d["og:url"]||d.url){let p=(d["og:url"]||d.url||"").replace(/\/$/,"");if(p&&h&&h!=="/"){let m=h.startsWith("/")?h:"/"+h;d["og:url"]=p+m}}d=mE(d,t.files);let g=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[p,m]of Object.entries(d))if(typeof m=="string"&&m.includes("{{")){let _=m.replace(/\{\{[^}]*\}\}/g,"").trim();_?d[p]=_:p==="title"?d[p]=g:delete d[p]}return d}var Tt,pE,Jo,hE,al,Hp,gE,Qb=j(()=>{"use strict";At();Tt=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,r=>e[r])},pE=t=>Object.entries(t||{}).filter(([e,r])=>r!==void 0).map(([e,r])=>`${e}="${Tt(r)}"`).join(" "),Jo=t=>{let e=5381,r=String(t);for(let o=0;o<r.length;o++)e=(e*33^r.charCodeAt(o))>>>0;return e.toString(36)},hE=new Set(["jsonLd","styles","scripts"]),al=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let r of t.jsonLd){if(r==null)continue;let o=typeof r=="string"?r:JSON.stringify(r),n=String(o).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Jo(o)}">${n}<\/script>`)}if(Array.isArray(t.styles))for(let r of t.styles){if(r==null||!String(r).trim())continue;let o=String(r).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Jo(o)}">${o}</style>`)}if(Array.isArray(t.scripts))for(let r of t.scripts){if(!r)continue;let o=typeof r=="string",n=o?r:r.src;if(!n&&!r.body)continue;let s=[];n&&s.push(`src="${Tt(n)}"`),o||(r.type&&s.push(`type="${Tt(r.type)}"`),r.async&&s.push("async"),r.defer&&s.push("defer"),r.integrity&&s.push(`integrity="${Tt(r.integrity)}"`),r.crossorigin&&s.push(`crossorigin="${Tt(r.crossorigin)}"`),r.referrerpolicy&&s.push(`referrerpolicy="${Tt(r.referrerpolicy)}"`),r.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Tt(n||Jo(r.body||""))}"`;if(!o&&r.body){let a=String(r.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${s.join(" ")}${i}>${a}<\/script>`)}else e.push(`<script ${s.join(" ")}${i}><\/script>`)}return e},Hp=(t,e)=>{e||(t={...t,robots:"noindex"});let r=Object.entries(t).reduce((o,[n,s])=>{if(!s&&s!==0&&s!==!1||hE.has(n))return o;if(n==="title")return o.push(`<title>${Tt(s)}</title>`),o;if(n==="canonical")return o.push(`<link rel="canonical" href="${Tt(s)}">`),o;if(n==="manifest")return o.push(`<link rel="manifest" href="${Tt(s)}">`),o;if(n==="favicon"||n==="favicons"||n==="icon"||n==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="string")o.push(`<link rel="icon" href="${Tt(f)}">`);else if(typeof f=="object"){let u=pE(f);/rel=/.test(u)?o.push(`<link ${u}>`):o.push(`<link rel="icon" ${u}>`)}}),o;if(n==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).filter(([d,h])=>h!==void 0).map(([d,h])=>`${d}="${Tt(h)}"`).join(" ");o.push(`<link rel="alternate" ${u}>`)}}),o;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")o.push(`<meta ${u}="${Tt(l)}" content="${Tt(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")o.push(`<meta ${u}="${Tt(l)}" content="${Tt(d)}">`);else if(typeof d=="object"){let h=Object.entries(d).filter(([g,p])=>p!==void 0).map(([g,p])=>`${g}="${Tt(p)}"`).join(" ");o.push(`<meta ${h}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([h,g])=>g!==void 0).map(([h,g])=>`${h}="${Tt(g)}"`).join(" ");o.push(`<meta ${d}>`)}};if(n.startsWith("http-equiv:")){let l=n.replace("http-equiv:","");return i(l,s,"http-equiv"),o}if(n.startsWith("itemprop:")){let l=n.replace("itemprop:","");return i(l,s,"itemprop"),o}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>n.startsWith(l));if(c){let l=n.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),o}if(n.startsWith("apple:")||n.startsWith("msapplication:")){let l=n.startsWith("apple:")?"apple-":"msapplication-",f=n.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),o}return i(n,s),o},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return r.push(...al(t)),r.join(`
|
|
32
|
-
`)},gE=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http")});var cl,Wp,t_=j(()=>{"use strict";At();cl=(t,e)=>(O(e)?e:Object.values(e)).reduce((r,o)=>Math.abs(o-t)<Math.abs(r-t)?o:r),Wp=(t,e)=>(t=parseFloat(t),S(e)&&(e=Object.values(e)),cl(t,e))});function Zo(t){let e=String(t||"").trim();if(!e)return{owner:e_,key:"",full:""};let r=null,o=e;if(e.includes("/")){let s=e.indexOf("/");r=e.slice(0,s),o=e.slice(s+1)}o=o.replace(/\.symbo\.ls$/iu,""),r||(r=e_);let n=o?`${r}/${o}`:"";return{owner:r,key:o,full:n}}async function ll(t,e={}){if((e.provider||"kv")==="api")return o_(t,e);let o=await CE(t,e);return o||o_(t,e)}async function CE(t,e={}){let r=e.kvBaseUrl||bE,o=e.env||"production",n=`${r}/kv/${encodeURIComponent(t)}?env=${o}`;try{let s=await fetch(n,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function o_(t,e={}){let r=e.apiBaseUrl||_E,{key:o}=Zo(t);try{let n=`${r}/core/projects/libraries/available?search=${encodeURIComponent(o)}&limit=10`,s=await fetch(n,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(h=>{let{key:g}=Zo(h?.key);return g.toLowerCase()===o.toLowerCase()});if(!c?.id&&!c?._id)return null;let l=c.id||c._id,f=`${r}/core/projects/${encodeURIComponent(l)}/data?branch=main`,u=await fetch(f,{method:"GET"});if(!u.ok)return null;let d=await u.json();return d?.data||d||null}catch{return null}}async function n_(t,e={}){if(S(t))return t;if(w(t)){let{full:r}=Zo(t);if(!r)return null;try{let o=await ll(r,e);return o||console.warn(`[smbls] Shared library "${r}" not found`),o}catch(o){return console.warn(`[smbls] Failed to fetch shared library "${r}":`,o.message),null}}return null}async function Kp(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async o=>{if(yi(o)){let n=await n_(kE(o),e);return n?{library:n,ignoreList:o.ignoreList}:null}return n_(o,e)}))).filter(Boolean)}var e_,bE,_E,gi,s_,xE,wE,r_,SE,mi,qp,yi,kE,vE,bi,i_=j(()=>{"use strict";At();e_="system",bE="https://smbls-kv.nika-980.workers.dev",_E="https://api.symbols.app";gi=(t,e,r,o)=>{for(let n in e){let s=o?`${o}/${n}`:n;r&&r.has(s)||(n in t?S(t[n])&&S(e[n])&&gi(t[n],e[n],r,s):t[n]=e[n])}},s_=(t,e,r)=>{if(!S(t)||!e.size)return t;let o=`${r}/`,n=!1;for(let i of e)if(i.startsWith(o)){n=!0;break}if(!n)return t;let s={};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=`${r}/${i}`;e.has(a)||(s[i]=s_(t[i],e,a))}return s},xE=new Set,wE=new Set(["components","pages","functions","snippets","methods"]),r_=(t,e)=>e===""&&wE.has(t),SE=t=>t.replace(/\.js$/iu,""),mi=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let r of t){if(!w(r))continue;let o=r.split("/").map(n=>SE(n.trim())).filter(Boolean).join("/");o&&e.add(o)}return e},qp=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),yi=t=>S(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),kE=t=>t.library!==void 0?t.library:t.key??t.name,vE=(t,e,r)=>{let o=mi(e.sharedLibIgnore);e.sharePages===!1&&o.add("pages");let n=o.size?new Set([...r,...o]):r;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&!(s==="sharePages"||s==="sharedLibIgnore")&&!n.has(s))if(S(e[s])&&S(t[s]))if(s==="designSystem")gi(t[s],e[s],n,s);else for(let i in e[s])n.has(`${s}/${i}`)||(i in t[s]?r_(s,t[s][i])&&!r_(s,e[s][i])&&(t[s][i]=e[s][i]):t[s][i]=e[s][i]);else s in t||(t[s]=s_(e[s],n,s))},bi=(t,e)=>{if(!(!e||!e.length))for(let r=0;r<e.length;r++){let o=e[r],n=xE;yi(o)&&(n=mi(o.ignoreList),o=o.library),S(o)&&vE(t,o,n)}}});var Gp,Yp,Xp,_i,Jp,xi,Zp,ro,a_=j(()=>{"use strict";At();Gp=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},Yp=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)}},Xp=t=>t.replace(/[^a-zA-Z0-9_]/g,""),_i=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,"")),Jp=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),xi=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Zp=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},ro=t=>{if(O(t))return t;if(w(t))return t.split(" ");if(S(t))return Object.values(t);if(Le(t))return[t]}});var Qp,c_=j(()=>{"use strict";Qp=()=>{let t=document.styleSheets[0],e="";if(t)try{let r=t.cssRules||t.rules;for(let o=0;o<r.length;o++)e+=r[o].cssText}catch(r){console.error("Unable to access CSS rules. This may be due to CORS restrictions:",r)}else console.log("No stylesheets found in document.styleSheets[0].");return e}});var Wt,Qo,wi,Si,l_=j(()=>{"use strict";Wt=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let r=t.context;if(!r)return null;let o=r.assets&&r.assets[e]||r.files&&r.files[e];return o?typeof o=="string"?{src:o,type:null,variants:null}:typeof o=="object"&&typeof o.src=="string"?o:null:null},Qo=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let r=t.some(n=>typeof n.width=="number"),o=[];for(let n of t)r&&typeof n.width=="number"?o.push(`${n.src} ${n.width}w`):r||(n.scale===1&&e?o.push(n.src):n.scale&&n.scale!==1&&o.push(`${n.src} ${n.scale}x`));return o.join(", ")},wi=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(r=>r.format===t.type);return Qo(e,{keepOneX:!1})},Si=(t,e)=>{if(!t||typeof t!="object"||typeof t.src!="string")return[];if(!Array.isArray(t.variants)||!t.variants.length)return[{tag:"img",attr:{src:t.src,alt:e||""}}];let r=new Map;for(let a of t.variants)r.has(a.format)||r.set(a.format,[]),r.get(a.format).push(a);let o=[];for(let[a,c]of r)a!==t.type&&o.push({tag:"source",attr:{type:a,srcset:Qo(c,{keepOneX:!0})}});let n=r.get(t.type)||[],s=Qo(n,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...o,{tag:"img",attr:i}]}});var fl={};P(fl,{CDN_PROVIDERS:()=>ce,DOMQL_EVENTS:()=>Qu,DOMQ_PROPERTIES:()=>dr,ENV:()=>gd,HTML_TAGS:()=>Ho,METHODS:()=>No,METHODS_EXL:()=>xs,NODE_ENV:()=>Se,OPTIONS:()=>Hs,PACKAGE_MANAGER_TO_CDN:()=>xr,PARSED_DOMQ_PROPERTIES:()=>_s,PROPS_METHODS:()=>pr,STATE_METHODS:()=>Gr,STATE_PROPERTIES:()=>Zu,SVG_TAGS:()=>fb,TYPES:()=>ds,UNIVERSAL_RESERVED_KEYS:()=>nl,addCaching:()=>Bc,addContext:()=>jc,addExtend:()=>Bd,addExtends:()=>zt,addItemAfterEveryElement:()=>ju,addProtoToArray:()=>gs,addRef:()=>Mc,applyDependentState:()=>sp,applyEvent:()=>qc,applyEventUpdate:()=>Kc,applyExtends:()=>pb,applyProps:()=>Fs,arrayContainsOtherArray:()=>Iu,arraysEqual:()=>Uu,arrayzeValue:()=>ro,buildImgSrcset:()=>wi,buildSourcesAndImg:()=>Si,cache:()=>fp,call:()=>Ap,captureSnapshot:()=>Op,checkForStateTypes:()=>ep,checkIfInherits:()=>Wc,checkIfStringIsInArray:()=>zu,clone:()=>ed,cloneAndMergeArrayExtend:()=>Os,cloneFunction:()=>vd,concatAddExtends:()=>Fd,copyJavaScriptToClipboard:()=>Yp,copyStringToClipboard:()=>Gp,createBasedOnType:()=>Lc,createElement:()=>tp,createElementExtends:()=>kc,createExtends:()=>Ps,createExtendsFromKeys:()=>zo,createExtendsStack:()=>Ac,createIfConditionFlag:()=>Cd,createInheritedState:()=>rp,createKey:()=>As,createNestedObject:()=>cd,createNestedObjectByKeyPath:()=>np,createObjectWithoutPrototype:()=>mc,createParent:()=>Fc,createPath:()=>Nc,createProps:()=>Ns,createPropsStack:()=>Dc,createRoot:()=>Qd,createScope:()=>ap,createSnapshotId:()=>Es,customDecodeURIComponent:()=>Ju,customEncodeURIComponent:()=>Xu,cutArrayAfterValue:()=>Fu,cutArrayBeforeValue:()=>Mu,debounce:()=>Ts,debounceOnContext:()=>wd,decodeNewlines:()=>Yu,deepClone:()=>ut,deepContains:()=>id,deepDefaults:()=>gi,deepDestringifyFunctions:()=>ie,deepExtend:()=>Sc,deepMerge:()=>nt,deepMergeExtends:()=>Fe,deepStringifyFunctions:()=>ws,defineSetter:()=>Cp,destringifyGlobalScope:()=>ks,detectHeightOnInit:()=>$p,detectInfiniteLoop:()=>dd,document:()=>et,encodeNewlines:()=>Gu,error:()=>to,excludeKeysFromObject:()=>hd,exec:()=>ct,extendCachedRegistry:()=>Nd,extendStackRegistry:()=>Is,extractArrayExtend:()=>$s,fetchLibraryData:()=>ll,fibonacciNumberByIndex:()=>Lp,filterArrays:()=>Vu,filterArraysFast:()=>Hu,finalizeExtends:()=>Tc,findClosestNumber:()=>cl,findClosestNumberInFactory:()=>Wp,findInheritedState:()=>zc,findKeyPosition:()=>qu,flattenExtend:()=>Wo,formatDate:()=>Dp,generateHash:()=>_c,generateHeadArrayTags:()=>al,generateKey:()=>Cs,generateMetaTags:()=>Hp,get:()=>Sp,getCDNDirUrl:()=>sl,getCDNUrl:()=>ve,getCapitalCaseKeys:()=>Hd,getCdnProviderFromConfig:()=>Go,getChildStateInKey:()=>Hc,getChildren:()=>ti,getContext:()=>ai,getCookie:()=>Rd,getDB:()=>di,getEmotionStylesheet:()=>Qp,getExtendsInElement:()=>Ud,getExtendsStack:()=>Rs,getExtendsStackRegistry:()=>wc,getFrequencyInArray:()=>Du,getHashedExtend:()=>Ds,getImportMapScript:()=>Ip,getInObjectByPath:()=>ud,getLocalStorage:()=>Id,getNev:()=>_d,getPageMetadata:()=>zp,getParentStateInKey:()=>Vc,getPath:()=>ei,getQuery:()=>pi,getRef:()=>vp,getRoot:()=>ni,getRootContext:()=>ii,getRootData:()=>si,getRootState:()=>oi,getRootStateInKey:()=>Uc,getSpreadChildren:()=>zd,global:()=>Ou,hasFunction:()=>Me,hasHandlerPlugin:()=>Bo,hasOwnProperty:()=>od,hashContent:()=>Jo,inheritChildExtends:()=>Cc,inheritChildPropsExtends:()=>vc,inheritParentProps:()=>js,inheritRecursiveChildExtends:()=>Ec,initProps:()=>Xd,is:()=>Vt,isArray:()=>O,isBoolean:()=>uc,isContextComponent:()=>Wd,isCyclic:()=>pd,isDOMNode:()=>Ut,isDate:()=>pc,isDefined:()=>mt,isDevelopment:()=>gr,isEmpty:()=>hc,isEmptyObject:()=>nd,isEqualDeep:()=>gc,isFunction:()=>A,isHtmlElement:()=>fs,isLocal:()=>bd,isLoudDevRuntime:()=>Ot,isMalformedDependency:()=>Yo,isMethod:()=>Tp,isMobile:()=>Td,isNode:()=>Ye,isNot:()=>Pu,isNotProduction:()=>Jr,isNull:()=>dc,isNumber:()=>Le,isObject:()=>S,isObjectLike:()=>z,isPhoto:()=>Mp,isProduction:()=>hr,isStaging:()=>yd,isState:()=>op,isString:()=>w,isStringFunction:()=>kd,isTest:()=>bc,isTesting:()=>md,isUndefined:()=>Et,isUniversallyReservedKey:()=>Rp,isUnresolvableDependency:()=>eo,isValidHtmlTag:()=>$d,isWrappedLibrary:()=>yi,joinArrays:()=>Lo,jointStacks:()=>jd,keys:()=>rl,loadCssFile:()=>Bp,loadJavascript:()=>Up,loadJavascriptFile:()=>Fp,loadJavascriptFileEmbedSync:()=>jp,loadJavascriptFileSync:()=>Np,loadRemoteCSS:()=>Vp,loadRemoteScript:()=>Xo,log:()=>Ep,logGroupIf:()=>Ad,logIf:()=>Ed,lookdown:()=>xp,lookdownAll:()=>wp,lookup:()=>_p,lowercaseFirstLetter:()=>Kr,makeObjectWithoutPrototype:()=>sd,map:()=>td,mapStringsWithContextComponents:()=>Ls,matchesComponentNaming:()=>Ne,memoize:()=>Sd,merge:()=>pt,mergeSharedLibraries:()=>bi,nextElement:()=>li,normalizeIgnoreList:()=>mi,normalizeLibraryKey:()=>Zo,objectToString:()=>Ss,objectizeStringProperty:()=>Ms,overwrite:()=>vs,overwriteDeep:()=>Ht,overwriteShallow:()=>Xr,overwriteState:()=>ip,parse:()=>ol,parseDeep:()=>Zs,pickupElementFromProps:()=>Pc,pickupPropsFromElement:()=>Rc,previousElement:()=>fi,propExists:()=>Gd,propertizeElement:()=>Ic,propertizeUpdate:()=>Kd,remove:()=>jb,removeChars:()=>Xp,removeCookie:()=>Pd,removeDuplicateProps:()=>Us,removeDuplicatesInArray:()=>Mo,removeFromArray:()=>$u,removeFromObject:()=>ad,removeNestedKeyByPath:()=>ld,removeValueFromArray:()=>hs,removeValueFromArrayAll:()=>Nu,reorderArrayByValues:()=>Bu,replaceLiteralsWithObjectFields:()=>qr,replaceOctalEscapeSequences:()=>Ku,resolveAsset:()=>Wt,resolveHandler:()=>Uo,resolveSharedLibraries:()=>Kp,returnValueAsText:()=>$c,runPluginHook:()=>Ct,self:()=>Ru,setActiveRootState:()=>ri,setCookie:()=>Od,setHashedExtend:()=>xc,setInObjectByPath:()=>fd,setLocalStorage:()=>Dd,setNodeStyles:()=>el,setProps:()=>kp,setPropsPrototype:()=>Bs,sharedLibrary:()=>qp,spotByPath:()=>Qs,srcsetFor:()=>Qo,stringIncludesAny:()=>ys,stringToObject:()=>rd,stripVersionRangePrefix:()=>hi,swapItemsInArray:()=>Lu,syncProps:()=>Vs,toCamelCase:()=>_i,toDashCase:()=>xi,toDescriptionCase:()=>Zp,toTitleCase:()=>Jp,toggleFullscreen:()=>Pp,triggerEventOn:()=>mr,triggerEventOnUpdate:()=>cp,trimStringFromSymbols:()=>Wu,unstackArrayOfObjects:()=>ps,update:()=>Yd,updateProps:()=>Jd,variables:()=>ui,verbose:()=>Ko,warn:()=>ci,window:()=>v});var R=j(()=>{"use strict";yc();xd();At();Xe();Vo();Fo();us();ab();cb();bs();ls();lb();Ld();Vd();Zd();Oc();_b();xb();jo();wb();Vb();up();Hb();lp();zb();Wb();qb();Kb();Gb();Yb();Xb();Jb();Qb();t_();i_();a_();c_();l_()});var Lk=fu((EU,$k)=>{var Gn=1e3,Yn=Gn*60,Xn=Yn*60,Co=Xn*24,xR=Co*7,wR=Co*365.25;$k.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return SR(t);if(r==="number"&&isFinite(t))return e.long?vR(t):kR(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function SR(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),o=(e[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return r*wR;case"weeks":case"week":case"w":return r*xR;case"days":case"day":case"d":return r*Co;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Xn;case"minutes":case"minute":case"mins":case"min":case"m":return r*Yn;case"seconds":case"second":case"secs":case"sec":case"s":return r*Gn;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function kR(t){var e=Math.abs(t);return e>=Co?Math.round(t/Co)+"d":e>=Xn?Math.round(t/Xn)+"h":e>=Yn?Math.round(t/Yn)+"m":e>=Gn?Math.round(t/Gn)+"s":t+"ms"}function vR(t){var e=Math.abs(t);return e>=Co?ru(t,e,Co,"day"):e>=Xn?ru(t,e,Xn,"hour"):e>=Yn?ru(t,e,Yn,"minute"):e>=Gn?ru(t,e,Gn,"second"):t+" ms"}function ru(t,e,r,o){var n=e>=r*1.5;return Math.round(t/r)+" "+o+(n?"s":"")}});var Fk=fu((AU,Mk)=>{function CR(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=n,r.enabled=a,r.humanize=Lk(),r.destroy=l,Object.keys(t).forEach(f=>{r[f]=t[f]}),r.names=[],r.skips=[],r.formatters={};function e(f){let u=0;for(let d=0;d<f.length;d++)u=(u<<5)-u+f.charCodeAt(d),u|=0;return r.colors[Math.abs(u)%r.colors.length]}r.selectColor=e;function r(f){let u,d=null,h,g;function p(...m){if(!p.enabled)return;let _=p,b=Number(new Date),y=b-(u||b);_.diff=y,_.prev=u,_.curr=b,u=b,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let x=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(C,T)=>{if(C==="%%")return"%";x++;let $=r.formatters[T];if(typeof $=="function"){let M=m[x];C=$.call(_,M),m.splice(x,1),x--}return C}),r.formatArgs.call(_,m),(_.log||r.log).apply(_,m)}return p.namespace=f,p.useColors=r.useColors(),p.color=r.selectColor(f),p.extend=o,p.destroy=r.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,g=r.enabled(f)),g),set:m=>{d=m}}),typeof r.init=="function"&&r.init(p),p}function o(f,u){let d=r(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function n(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let u=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(f,u){let d=0,h=0,g=-1,p=0;for(;d<f.length;)if(h<u.length&&(u[h]===f[d]||u[h]==="*"))u[h]==="*"?(g=h,p=d,h++):(d++,h++);else if(g!==-1)h=g+1,p++,d=p;else return!1;for(;h<u.length&&u[h]==="*";)h++;return h===u.length}function i(){let f=[...r.names,...r.skips.map(u=>"-"+u)].join(",");return r.enable(""),f}function a(f){for(let u of r.skips)if(s(f,u))return!1;for(let u of r.names)if(s(f,u))return!0;return!1}function c(f){return f instanceof Error?f.stack||f.message:f}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Mk.exports=CR});var Nk=fu((Jt,ou)=>{Jt.formatArgs=AR;Jt.save=TR;Jt.load=OR;Jt.useColors=ER;Jt.storage=RR();Jt.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`."))}})();Jt.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 ER(){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 AR(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+ou.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(o=r))}),t.splice(o,0,e)}Jt.log=console.debug||console.log||(()=>{});function TR(t){try{t?Jt.storage.setItem("debug",t):Jt.storage.removeItem("debug")}catch{}}function OR(){let t;try{t=Jt.storage.getItem("debug")||Jt.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function RR(){try{return localStorage}catch{}}ou.exports=Fk()(Jt);var{formatters:PR}=ou.exports;PR.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var By={};P(By,{ANIMATION_PROPS:()=>fg,ARIA_ROLES:()=>DA,ATTR_TRANSFORMS:()=>sg,BLOCK_PROPS:()=>ug,CDN_PROVIDERS:()=>ce,CONFIG:()=>ao,CSS_NAMED_COLOR_HEX:()=>ul,CSS_NATIVE_COLOR_REGEX:()=>Zt,CSS_PROPS_REGISTRY:()=>bt,CSS_UNITS:()=>$o,DEFAULT_CONFIG:()=>ya,DEFAULT_CSS_PROPERTIES_LIST:()=>kt,DELEGATED_EVENTS:()=>Sn,DESIGN_SYSTEM_OPTIONS:()=>jm,DOMQL_EVENTS:()=>Qu,DOMQ_PROPERTIES:()=>dr,DOM_EVENTS:()=>J_,ENV:()=>gd,FACTORY:()=>ue,FLEX_PROPS:()=>bg,FONT_PROPS:()=>dg,GRID_PROPS:()=>_g,HOST_REGISTERED_PACKAGES:()=>z0,HTML_ATTRIBUTES:()=>of,HTML_TAGS:()=>Ho,LIFECYCLE_EVENTS:()=>Or,METHODS:()=>No,METHODS_EXL:()=>xs,MISC_PROPS:()=>pg,MIXINS:()=>Ql,NODE_ENV:()=>Se,OPTIONS:()=>Hs,PACKAGE_MANAGER_TO_CDN:()=>xr,PARSED_DOMQ_PROPERTIES:()=>_s,POSITION_PROPS:()=>hg,PROPS_METHODS:()=>pr,REGISTRY:()=>Ft,RESERVED_STORE_METHODS:()=>Zy,ROUTER_OPTIONS:()=>kf,SIGNAL_ENGINE_KEY:()=>Io,SIGNAL_INSTANCES_KEY:()=>Ro,STANDARD_SCHEME_QUERIES:()=>$l,STATE_PROPERTIES:()=>Zu,STORE_METHOD_NAMES:()=>Jy,SVG_TAGS:()=>xn,THEME_PROPS:()=>yg,TIMING_PROPS:()=>la,TYPES:()=>ds,UNIVERSAL_RESERVED_KEYS:()=>nl,VALUE_TRANSFORMERS:()=>zl,VERSION:()=>tb,__resetSignalEngine:()=>Eu,__resetSignalInstances:()=>Cu,__resetStateShadowWarnings:()=>Qy,activateConfig:()=>h_,addCaching:()=>Bc,addContext:()=>jc,addDelegatedEvent:()=>aa,addExtend:()=>Bd,addExtends:()=>zt,addItemAfterEveryElement:()=>ju,addMethods:()=>Tn,addProtoToArray:()=>gs,addRef:()=>Mc,animation:()=>vh,appendSVGSprite:()=>ea,appendSvgIconsSprite:()=>uo,applyAttrTransforms:()=>ag,applyCSS:()=>Im,applyDependentState:()=>sp,applyDocument:()=>ta,applyEvent:()=>qc,applyEventUpdate:()=>Kc,applyExtends:()=>vn,applyHeadings:()=>Nl,applyInitialState:()=>ff,applyMediaSequenceVars:()=>Sr,applyProps:()=>Fs,applyReset:()=>ra,applySequenceGlobalVars:()=>Ni,applySequenceVars:()=>er,applySpacingSequence:()=>Ui,applyStateMethods:()=>ne,applyTimingSequence:()=>Qi,applyTrueProps:()=>wg,applyTypographySequence:()=>Xi,arrayContainsOtherArray:()=>Iu,arraysEqual:()=>Uu,arrayzeValue:()=>ro,assertEmitIntegrity:()=>Yh,batch:()=>ac,breakpoints:()=>Sh,buildImgSrcset:()=>wi,buildSourcesAndImg:()=>Si,buildThemeVarStyles:()=>Ln,cache:()=>fp,cacheNode:()=>Tr,call:()=>Ap,callStateMethod:()=>ua,camelToAttr:()=>Pr,camelToLowerAttr:()=>Z_,captureSnapshot:()=>Op,changeGlobalTheme:()=>Wl,changeLightness:()=>sh,checkAttributeByTagName:()=>Ir,checkEventFunctions:()=>ig,checkForStateTypes:()=>ep,checkIfBoxSize:()=>Bi,checkIfInherits:()=>Wc,checkIfStringIsInArray:()=>zu,class:()=>Oh,clone:()=>ed,cloneAndMergeArrayExtend:()=>Os,cloneFunction:()=>vd,color:()=>gh,colorStringToRgbaArray:()=>le,components:()=>Dn,compositeOverBackdrop:()=>no,concatAddExtends:()=>Fd,contrastRatio:()=>rn,convertSvgToSymbol:()=>ji,copyJavaScriptToClipboard:()=>Yp,copyStringToClipboard:()=>Gp,create:()=>jy,createAsync:()=>_P,createBasedOnType:()=>Lc,createComputed:()=>Gy,createConfig:()=>Pi,createDefine:()=>XS,createEffect:()=>Q,createElement:()=>tp,createElementExtends:()=>kc,createExtends:()=>Ps,createExtendsFromKeys:()=>zo,createExtendsStack:()=>Ac,createHTMLNode:()=>_n,createIfConditionFlag:()=>Cd,createInheritedState:()=>rp,createKey:()=>As,createNestedObject:()=>cd,createNestedObjectByKeyPath:()=>np,createObjectWithoutPrototype:()=>mc,createParent:()=>Fc,createPath:()=>Nc,createProps:()=>Ns,createPropsStack:()=>Dc,createRoot:()=>Qd,createScope:()=>ap,createScopeStore:()=>lc,createSignal:()=>as,createSkeleton:()=>wP,createSnapshotId:()=>Es,createState:()=>Eg,createStore:()=>qe,createSync:()=>xP,css:()=>me,cssMediaVars:()=>Ol,cssVars:()=>Tl,customDecodeURIComponent:()=>Ju,customEncodeURIComponent:()=>Xu,cutArrayAfterValue:()=>Fu,cutArrayBeforeValue:()=>Mu,debounce:()=>Ts,debounceOnContext:()=>wd,decodeNewlines:()=>Yu,deepClone:()=>ut,deepContains:()=>id,deepDefaults:()=>gi,deepDestringifyFunctions:()=>ie,deepExtend:()=>Sc,deepMerge:()=>nt,deepMergeExtends:()=>Fe,deepStringifyFunctions:()=>ws,defaultDefine:()=>Fn,defineResolvedThemeSignal:()=>cn,defineSetter:()=>Cp,defineThemeSignal:()=>an,destringifyGlobalScope:()=>ks,destroy:()=>ka,detectHeightOnInit:()=>$p,detectInfiniteLoop:()=>dd,detectTag:()=>Ar,devices:()=>kh,dispose:()=>Dr,encodeNewlines:()=>Gu,error:()=>to,excludeKeysFromObject:()=>hd,exec:()=>ct,executeAttr:()=>FA,exetuteClassPerComponent:()=>pT,extendCachedRegistry:()=>Nd,extendStackRegistry:()=>Is,extractArrayExtend:()=>$s,extractConditionalAttrs:()=>BA,fetchLibraryData:()=>ll,fibonacciNumberByIndex:()=>Lp,filterArrays:()=>Vu,filterArraysFast:()=>Hu,filterAttributesByTagName:()=>MA,finalizeExtends:()=>Tc,findClosestNumber:()=>cl,findClosestNumberInFactory:()=>Wp,findHeadingLetter:()=>Dl,findHeadings:()=>Fi,findInheritedState:()=>zc,findKeyPosition:()=>qu,flattenExtend:()=>Wo,font:()=>lh,fontFace:()=>dh,fontFamily:()=>fh,fontFamilyTypes:()=>uh,formatDate:()=>Dp,generateHash:()=>_c,generateHeadArrayTags:()=>al,generateKey:()=>Cs,generateMetaTags:()=>Hp,generateSequence:()=>Kt,generateSequencePosition:()=>$h,generateSprite:()=>ln,generateSubSequence:()=>Li,get:()=>Sp,getActiveConfig:()=>E,getActiveDocument:()=>Xl,getActiveLang:()=>jn,getCDNDirUrl:()=>sl,getCDNUrl:()=>ve,getCacheSize:()=>Jh,getCapitalCaseKeys:()=>Hd,getCdnProviderFromConfig:()=>Go,getChildStateInKey:()=>Hc,getChildren:()=>ti,getColor:()=>ot,getColorShade:()=>ml,getContext:()=>ai,getCookie:()=>Rd,getDB:()=>di,getDefaultOrFirstKey:()=>so,getEmitStats:()=>Jl,getEmotionStylesheet:()=>Qp,getExtendsInElement:()=>Ud,getExtendsStack:()=>Rs,getExtendsStackRegistry:()=>wc,getFnPrefixAndValue:()=>tr,getFontFace:()=>ah,getFontFaceEach:()=>io,getFontFaceEachString:()=>vl,getFontFaceString:()=>Ai,getFontFamily:()=>Yi,getFontFormat:()=>Sl,getFontSizeByKey:()=>Ji,getFrequencyInArray:()=>Du,getHashedExtend:()=>Ds,getImportMapScript:()=>Ip,getInObjectByPath:()=>ud,getLanguages:()=>Ea,getLocalStateLang:()=>Pa,getLocalStorage:()=>Id,getMediaColor:()=>Rt,getMediaTheme:()=>pe,getNev:()=>_d,getObserver:()=>cc,getPageMetadata:()=>zp,getParentStateInKey:()=>Vc,getPath:()=>ei,getQuery:()=>pi,getRef:()=>vp,getResolvedThemeSignal:()=>p_,getRgbTone:()=>Be,getRoot:()=>ni,getRootContext:()=>ii,getRootData:()=>si,getRootState:()=>oi,getRootStateInKey:()=>Uc,getSafeInk:()=>Ll,getSafeInkInfo:()=>Mh,getSequenceValue:()=>Mi,getSequenceValueBySymbols:()=>Il,getSequenceValuePropertyPair:()=>Ve,getShadow:()=>Hi,getShapeByKey:()=>Zi,getSignals:()=>Xy,getSpacingBasedOnRatio:()=>Ee,getSpacingByKey:()=>xt,getSpreadChildren:()=>zd,getSubratio:()=>$i,getSubratioDifference:()=>Di,getSystemGlobalTheme:()=>ye,getTheme:()=>Wi,getThemeSignal:()=>d_,getTimingByKey:()=>te,getTimingFunction:()=>he,global:()=>Ou,gradient:()=>mh,grid:()=>Th,hasFunction:()=>Me,hasHandlerPlugin:()=>Bo,hasOwnProperty:()=>od,hashContent:()=>Jo,hexToRgb:()=>eh,hexToRgbArray:()=>dl,hexToRgba:()=>oh,hslToRgb:()=>gl,icons:()=>_h,inheritChildExtends:()=>Cc,inheritChildPropsExtends:()=>vc,inheritParentProps:()=>js,inheritRecursiveChildExtends:()=>Ec,init:()=>ir,initPolyglot:()=>Ef,initProps:()=>Xd,injectGlobal:()=>wt,is:()=>Vt,isArray:()=>O,isBoolean:()=>uc,isCSSVar:()=>ht,isContextComponent:()=>Wd,isCyclic:()=>pd,isDOMNode:()=>Ut,isDate:()=>pc,isDefined:()=>mt,isDevelopment:()=>gr,isDomDocument:()=>Ke,isEmpty:()=>hc,isEmptyObject:()=>nd,isEnumeratedTrueFalseAttr:()=>or,isEqualDeep:()=>gc,isFunction:()=>A,isGoogleFontsUrl:()=>on,isHostObject:()=>Ge,isHtmlElement:()=>fs,isLocal:()=>bd,isLoudDevRuntime:()=>Ot,isMalformedDependency:()=>Yo,isMethod:()=>Tp,isMobile:()=>Td,isNode:()=>Ye,isNot:()=>Pu,isNotProduction:()=>Jr,isNull:()=>dc,isNumber:()=>Le,isObject:()=>S,isObjectLike:()=>z,isPhoto:()=>Mp,isProduction:()=>hr,isRawUnitValue:()=>cs,isResolvedColor:()=>Ce,isScalingUnit:()=>Wr,isStaging:()=>yd,isState:()=>op,isStore:()=>gt,isString:()=>w,isStringFunction:()=>kd,isSvgTag:()=>wn,isTest:()=>bc,isTesting:()=>md,isTracking:()=>Tg,isUndefined:()=>Et,isUniversallyReservedKey:()=>Rp,isUnresolvableDependency:()=>eo,isValidHtmlTag:()=>$d,isValidTag:()=>bn,isWasmLoaded:()=>MS,isWrappedLibrary:()=>yi,isWritableFamilyBucket:()=>Tu,joinArrays:()=>Lo,jointStacks:()=>jd,keyframes:()=>yn,keys:()=>rl,linearChannelToSrgb:()=>_l,loadCssFile:()=>Bp,loadJavascript:()=>Up,loadJavascriptFile:()=>Fp,loadJavascriptFileEmbedSync:()=>jp,loadJavascriptFileSync:()=>Np,loadRemoteCSS:()=>Vp,loadRemoteScript:()=>Xo,loadTranslations:()=>Ta,loadWasm:()=>LS,log:()=>Ep,logGroupIf:()=>Ad,logIf:()=>Ed,lookdown:()=>xp,lookdownAll:()=>wp,lookup:()=>_p,lowercaseFirstLetter:()=>Kr,makeObjectWithoutPrototype:()=>sd,map:()=>td,mapStringsWithContextComponents:()=>Ls,matchesComponentNaming:()=>Ne,media:()=>ph,memoize:()=>Sd,merge:()=>pt,mergeSharedLibraries:()=>bi,mixTwoColors:()=>th,mixTwoRgb:()=>nh,mixTwoRgba:()=>yl,nextElement:()=>li,normalizeIgnoreList:()=>mi,normalizeLibraryKey:()=>Zo,numToLetterMap:()=>Ue,objectToString:()=>Ss,objectizeStringProperty:()=>Ms,oklabToLinearSrgb:()=>xl,oklabToOklch:()=>vi,oklchToGamutSafeSrgb:()=>Ci,oklchToOklab:()=>wl,opacify:()=>en,overwrite:()=>vs,overwriteDeep:()=>Ht,overwriteShallow:()=>Xr,overwriteState:()=>ip,parkHostObject:()=>ur,parse:()=>ol,parseColorToken:()=>qt,parseDeep:()=>Zs,pickupElementFromProps:()=>Pc,pickupPropsFromElement:()=>Rc,polyglotFunctions:()=>Ua,polyglotPlugin:()=>Bn,popConfig:()=>rt,popStaticCssPass:()=>mg,previousElement:()=>fi,propExists:()=>Gd,propertizeElement:()=>Ic,propertizeUpdate:()=>Kd,pushConfig:()=>st,pushStaticCssPass:()=>gg,refreshContextProto:()=>cf,registerEvent:()=>kn,registerHostPackages:()=>W0,registerSignalInstance:()=>Po,reinit:()=>Pm,relativeLuminance:()=>oo,remove:()=>An,removeChars:()=>Xp,removeCookie:()=>Pd,removeDelegatedEvent:()=>ca,removeDuplicateProps:()=>Us,removeDuplicatesInArray:()=>Mo,removeFromArray:()=>$u,removeFromObject:()=>ad,removeNestedKeyByPath:()=>ld,removeValueFromArray:()=>hs,removeValueFromArrayAll:()=>Nu,reorderArrayByValues:()=>Bu,replaceLiteralsWithObjectFields:()=>qr,replaceOctalEscapeSequences:()=>Ku,resetEmitStats:()=>Gh,resolveAsset:()=>Wt,resolveBorderValue:()=>Qt,resolveColorRgb:()=>co,resolveColorsInGradient:()=>na,resolveConfigDocument:()=>Do,resolveFileSource:()=>ng,resolveFileUrl:()=>fe,resolveHandler:()=>Uo,resolvePropValue:()=>Rr,resolveShadowValue:()=>lo,resolveSharedLibraries:()=>Kp,returnSubThemeOrDefault:()=>ih,returnValueAsText:()=>$c,rgbArrayToHex:()=>pl,rgbToHSL:()=>hl,rgbToHex:()=>rh,runPluginHook:()=>Ct,runThroughMedia:()=>Fl,scratchDefaultConfig:()=>sn,scratchSystem:()=>pn,scratchUtils:()=>kr,self:()=>Ru,semanticIcons:()=>xh,sequence:()=>Qe,serializeAttrValue:()=>ze,set:()=>po,setActiveConfig:()=>Rl,setActiveDocument:()=>Kh,setActiveRootState:()=>ri,setAdaptiveSchemeVar:()=>Cr,setClass:()=>S1,setClassname:()=>hT,setColor:()=>vr,setCookie:()=>Od,setCssEngineHook:()=>wf,setCustomFont:()=>Ei,setCustomFontMedia:()=>wr,setEach:()=>Hh,setFont:()=>Gi,setFontFamily:()=>un,setFontImport:()=>nn,setGradient:()=>fn,setHashedExtend:()=>xc,setInCustomFontMedia:()=>kl,setInObjectByPath:()=>fd,setLang:()=>Oa,setLocalStorage:()=>Dd,setMediaTheme:()=>Ki,setNodeStyles:()=>el,setObserver:()=>Yy,setProps:()=>kp,setPropsPrototype:()=>Bs,setSVG:()=>dn,setScalingVar:()=>Ii,setShadow:()=>Er,setSubScalingVar:()=>Pl,setSvgIcon:()=>fo,setTheme:()=>qi,setValue:()=>Vh,setVariables:()=>Lh,setWasmEngine:()=>ia,shadow:()=>bh,shape:()=>Ih,sharedLibrary:()=>qp,sizes:()=>Ph,spacing:()=>hh,splitSpacedValue:()=>Vi,splitTopLevelCommas:()=>Ze,splitTransition:()=>Hl,spotByPath:()=>Qs,srcsetFor:()=>Qo,srgbChannelToLinear:()=>bl,srgbToOklab:()=>ki,stringIncludesAny:()=>ys,stringToObject:()=>rd,stripVersionRangePrefix:()=>hi,svg:()=>Ch,svgData:()=>Eh,swapItemsInArray:()=>Lu,syncProps:()=>Vs,templates:()=>Ah,theme:()=>yh,timing:()=>wh,toCamel:()=>Ri,toCamelCase:()=>_i,toDashCase:()=>xi,toDescriptionCase:()=>Zp,toLinearChannel:()=>tn,toTitleCase:()=>Jp,toggleFullscreen:()=>Pp,transformBackgroundImage:()=>Ul,transformBorder:()=>He,transformBorderRadius:()=>rr,transformBoxShadow:()=>oa,transformClassname:()=>ax,transformDuration:()=>sa,transformShadow:()=>Bl,transformSize:()=>yt,transformSizeRatio:()=>B,transformTextStroke:()=>jl,transformTransition:()=>Uh,transformersByPrefix:()=>Sg,transfromGap:()=>Vl,translate:()=>Aa,triggerEventOn:()=>mr,triggerEventOnUpdate:()=>cp,trimStringFromSymbols:()=>Wu,typography:()=>Ti,unit:()=>ch,unstackArrayOfObjects:()=>ps,update:()=>Cn,updateProps:()=>Jd,updateVars:()=>w1,upsertTranslation:()=>Ra,useCssInProps:()=>oe,useHostState:()=>Ag,usePropsAsCSS:()=>sx,useSelectorsAsCSS:()=>ix,variables:()=>ui,vars:()=>Rh,verbose:()=>Ko,warn:()=>ci,warnStateKeyShadowsMethod:()=>fc,window:()=>v,wrapHoverRule:()=>Ae});module.exports=oC(By);var Au={};P(Au,{RESERVED_STORE_METHODS:()=>Zy,SIGNAL_ENGINE_KEY:()=>Io,SIGNAL_INSTANCES_KEY:()=>Ro,STORE_METHOD_NAMES:()=>Jy,VERSION:()=>tb,__resetSignalEngine:()=>Eu,__resetSignalInstances:()=>Cu,__resetStateShadowWarnings:()=>Qy,batch:()=>ac,createComputed:()=>Gy,createEffect:()=>Q,createScopeStore:()=>lc,createSignal:()=>as,createStore:()=>qe,getObserver:()=>cc,getSignals:()=>Xy,isStore:()=>gt,registerSignalInstance:()=>Po,setObserver:()=>Yy,warnStateKeyShadowsMethod:()=>fc});var yu={};P(yu,{WRITE_JOURNAL:()=>os,batch:()=>ss,createComputed:()=>sC,createEffect:()=>iC,createSignal:()=>De,getObserver:()=>gu,journalWrite:()=>ns,setObserver:()=>nC});var Bt=null,tc=0,ec=[],gu=()=>Bt,nC=t=>{Bt=t},rc=0,uu=[];function De(t){let e=new Set;function r(){return Bt&&(e.add(Bt),Bt._sources.add(s)),t}function o(i){i!==t&&(t=i,dC(e))}function n(){return t}let s={get:r,set:o,peek:n,_subscribers:e,_type:"signal"};return s}function sC(t){let e,r=!0,o=new Set,n={_sources:new Set,_type:"computed",_subscribers:o,_execute(){hu(n);let s=Bt;Bt=n;try{e=t(),r=!1}finally{Bt=s}},_notify(){r=!0,o.size>0&&qy(o)},get(){return Bt&&(o.add(Bt),Bt._sources.add(n)),r&&n._execute(),e},peek(){return r&&n._execute(),e}};return n._execute(),n}var we=new Set,du=!1,os=[];function ns(t){os.push(t),os.length>32&&os.shift()}function iC(t,e){let r=e?.depth??0,o={_sources:new Set,_type:"effect",_depth:r,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(o._disposed)return;hu(o);let n=Bt;Bt=o;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Bt=n}},_notify(){o._disposed||(tc>0?ec.push(o):rc>0?uu.push(o):mu(o))},dispose(){o._disposed=!0,hu(o)}};return o._execute(),o}function ss(t){tc++;try{t()}finally{tc--,tc===0&&uC()}}var pu=!1,Hy=1e3,aC=8,cC=256,lC=4;function zy(){return typeof performance<"u"?performance.now():Date.now()}function mu(t){we.add(t),!pu&&(du||(du=!0,queueMicrotask(Wy)))}var Oo=[];function fC(){if(we.size===1){let[e]=we;return we.clear(),e._disposed?0:(e._execute(),1)}Oo.length=0;for(let e of we)Oo.push(e);we.clear(),Oo.sort((e,r)=>e._depth-r._depth);let t=0;for(let e=0;e<Oo.length;e++){let r=Oo[e];r._disposed||(r._execute(),t++)}return Oo.length=0,t}function Wy(t=0,e=0){if(du=!1,we.size===0)return;pu=!0;let r=zy(),o=!1;try{for(;we.size>0;){if(++t>Hy){let n=new Map;for(let c of we){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",n.set(l,(n.get(l)||0)+1),n.size>=12)break}let s=[...n.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of os)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",Hy,"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>"),we.clear();break}if(e+=fC(),we.size>0&&(e>=cC||t>=lC)&&zy()-r>aC){o=!0,setTimeout(()=>Wy(t,e),0);break}}}finally{o||(pu=!1)}}function uC(){for(let t=0;t<ec.length;t++)mu(ec[t]);ec.length=0}function qy(t){rc++;try{for(let e of t)e._notify()}finally{if(rc--,rc===0&&uu.length>0){let e=uu.splice(0);for(let r=0;r<e.length;r++)mu(e[r])}}}function dC(t){qy(t)}function hu(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var vu={};P(vu,{RESERVED_STORE_METHODS:()=>is,STORE_METHOD_NAMES:()=>ku,__resetStateShadowWarnings:()=>pC,createScopeStore:()=>yC,createStore:()=>oc,getSignals:()=>mC,isStore:()=>gC,warnStateKeyShadowsMethod:()=>Su});var $e=Symbol("store"),nc=Symbol("signals"),ku=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],is=new Set(ku),wu=new Set,bu=(t,e)=>t?t+"."+e:String(e);function Su(t,e){let r=(e||"")+"::"+t;if(wu.has(r))return;wu.add(r);let o=e?`state.${e}`:"state",n=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${o}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${o}.${t}(\u2026)" no longer reaches the store method on this node. Use "${o}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${ku.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(n)}function pC(){wu.clear()}var _u=t=>!t||typeof t!="object"||Array.isArray(t)||t[$e]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!sc(t),hC=12,sc=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function ic(t,e,r){if(t===e)return!0;if(r>hC)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!ic(t[o],e[o],r+1))return!1;return!0}if(sc(t)&&sc(e)){let o=Object.keys(t),n=Object.keys(e);if(o.length!==n.length)return!1;for(let s of o)if(!Object.prototype.hasOwnProperty.call(e,s)||!ic(t[s],e[s],r+1))return!1;return!0}return!1}function oc(t,e,r,o){r===void 0&&(r=0),o===void 0&&(o="");let n={},s={},i=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let b in t){if(b==="__proto__"||!Object.prototype.hasOwnProperty.call(t,b))continue;if(b.startsWith("__")){s[b]=t[b];continue}is.has(b)&&Su(b,o);let y=t[b];r<i&&y&&typeof y=="object"&&!_u(y)?(s[b]=y,n[b]=De(oc(y,e,r+1,bu(o,b)))):(s[b]=y,n[b]=De(y))}let a=new Proxy(s,{get(b,y){if(y===$e)return!0;if(y===nc)return n;if(y==="__raw")return b;if(y==="$update")return c;if(y==="$parse")return f;if(y==="$clean")return u;if(y==="$keys")return d;if(y==="$values")return h;if(y==="$replace")return g;if(y==="$add")return p;if(y==="$remove")return m;if(y==="$destroy")return _;if(y==="$quietUpdate")return l;if(is.has(y)&&!Object.prototype.hasOwnProperty.call(n,y))switch(y){case"update":return c;case"parse":return f;case"clean":return u;case"keys":return d;case"values":return h;case"replace":return g;case"add":return p;case"remove":return m;case"destroy":return _;case"quietUpdate":return l}if(y==="__element")return b.__element;if(y==="parent")return b.parent;if(y==="root")return b.root;if(Object.prototype.hasOwnProperty.call(n,y)){let k=n[y].get();if(k!==void 0||!(y!=="root"&&b.root&&b.root!==a))return k}if(b[y]!==void 0)return b[y];let x=typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&gu()!=null;if(y!=="root"&&b.root&&b.root!==a){let k=b.root[y];return k===void 0&&x&&!Object.prototype.hasOwnProperty.call(n,y)?(n[y]=De(void 0),n[y].get()):k}if(x)return n[y]=De(void 0),n[y].get()},set(b,y,x){if(y==="__proto__")return!1;if(y==="__element"||y==="parent"||y==="root"||typeof y=="string"&&y.startsWith("__")&&!Object.prototype.hasOwnProperty.call(n,y))return b[y]=x,!0;is.has(y)&&Su(y,o);let k=bu(o,y);if(Object.prototype.hasOwnProperty.call(n,y))if(x&&typeof x=="object"&&!_u(x)){if(x===b[y])return!0;let C=n[y].peek(),T=C&&C[$e]?C.$parse():C;if(ic(x,T,0))return!0;b[y]=x,ns(k),n[y].set(oc(x,e,r+1,k))}else{if(Array.isArray(x)&&x!==b[y]&&Array.isArray(n[y].peek())&&ic(x,n[y].peek(),0))return!0;n[y].peek()!==x&&ns(k),b[y]=x,n[y].set(x)}else b[y]=x,x&&typeof x=="object"&&!_u(x)?n[y]=De(oc(x,e,r+1,k)):n[y]=De(x);return!0},has(b,y){return typeof y=="string"&&y.charCodeAt(0)===36&&is.has(y.slice(1))?!0:y in n||y in b},ownKeys(b){return Object.keys(n)},getOwnPropertyDescriptor(b,y){return y in n?{enumerable:!0,configurable:!0,value:n[y].peek()}:Object.getOwnPropertyDescriptor(b,y)},deleteProperty(b,y){return n[y]&&(n[y].peek()!==void 0&&ns(bu(o,y)),n[y].set(void 0),delete n[y]),delete b[y],!0}});function c(b,y){ss(()=>{for(let k in b)k!=="__proto__"&&(a[k]=b[k])});let x=s.__element;return x&&x.onUpdate&&!y?.quiet&&x.onUpdate(x,a,x.context),a}function l(b){return c(b,{quiet:!0})}function f(b){if(b||(b=new Set),b.has(a))return"[Circular]";b.add(a);let y={};for(let x in n){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let k=n[x].peek();k&&k[$e]?y[x]=k.$parse(b):y[x]=k}return y}function u(){return ss(()=>{for(let b in n)delete a[b]}),a}function d(){return Object.keys(n)}function h(){return Object.keys(n).map(b=>n[b].peek())}function g(b){return ss(()=>{for(let y in n)y in b||delete a[y];for(let y in b)y!=="__proto__"&&(a[y]=b[y])}),a}function p(b,y){let x=Object.prototype.hasOwnProperty.call(n,b)?n[b].peek():void 0;if(Array.isArray(x))return a[b]=[...x,y],a;if(x&&typeof x=="object"&&!Array.isArray(x)){if(sc(y))x[$e]?x.$update(y):a[b]={...x,...y};else{let k=String(Object.keys(x).length);x[$e]?x.$update({[k]:y}):a[b]={...x,[k]:y}}return a}return a[b]=y,a}function m(b){return delete a[b],a}function _(){u(),s.__element=null,s.parent=null}return a}function gC(t){return t&&t[$e]===!0}function mC(t){return t[nc]}function yC(t,e){let r={},o={};if(t&&typeof t=="object")for(let i in t)o[i]=t[i],r[i]=De(t[i]);let n=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let a=e;for(;a;){let c=a[nc];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[$e]?a[xu]:null}return null};return new Proxy(o,{get(i,a){return a===$e?!0:a===nc?r:a===xu?e:a==="__raw"?i:Object.prototype.hasOwnProperty.call(r,a)?r[a].get():e&&a!=="then"&&a!=="constructor"?e[a]:i[a]},set(i,a,c){let l=n(a);return l?(l===r&&(i[a]=c),l[a].set(c),!0):(i[a]=c,r[a]=De(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[$e]?c[xu]: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 xu=Symbol("scope.parent");var zr="3.14.779";var Ro="__SMBLS_SIGNAL_INSTANCES__",Po=(t,e,r)=>{let o=e||(typeof globalThis<"u"?globalThis:null);if(!o)return null;let n=o[Ro]||(o[Ro]={versions:[],engines:0,reported:!1});return typeof n.engines!="number"&&(n.engines=n.versions.length),n.versions.push(t||zr),r||n.engines++,n.engines>1&&!n.reported&&(n.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",n.engines,"copies of the reactive engine are loaded on this page:",n.versions.join(", ")+".","Each copy keeps its own observer and effect queue, so an effect created","by one copy never re-fires from another copy's store writes, and one","copy's cascade breaker cannot see the other's queue.","Copies of the SAME version adopt a single engine automatically, so","this means the versions above DIFFER: a fossil copy is resolving beside","the current one. That is a dependency-graph fault, not an application","bug \u2014 align the version wherever @symbo.ls/signal is imported, then","regenerate the lockfile so exactly one version resolves.")),n},Cu=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Ro]};var Io="__SMBLS_SIGNAL_ENGINE__",Ky=(t,e,r)=>{let o=e||zr,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[Io];return s&&s.engine&&s.version===o?(Po(o,n,!0),s.engine):(s||(n[Io]={version:o,engine:t}),Po(o,n,!1),t)},Eu=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Io]};var Lt=Ky({...yu,...vu,VERSION:zr},zr),as=Lt.createSignal,Gy=Lt.createComputed,Q=Lt.createEffect,ac=Lt.batch,cc=Lt.getObserver,Yy=Lt.setObserver,qe=Lt.createStore,lc=Lt.createScopeStore,gt=Lt.isStore,Xy=Lt.getSignals,Jy=Lt.STORE_METHOD_NAMES,Zy=Lt.RESERVED_STORE_METHODS,fc=Lt.warnStateKeyShadowsMethod,Qy=Lt.__resetStateShadowWarnings,tb=Lt.VERSION;var Zh={};P(Zh,{assertEmitIntegrity:()=>Yh,css:()=>me,getActiveDocument:()=>Xl,getCacheSize:()=>Jh,getEmitStats:()=>Jl,injectGlobal:()=>wt,keyframes:()=>yn,reset:()=>U_,resetEmitStats:()=>Gh,setActiveDocument:()=>Kh,setWasmEngine:()=>ia,wrapHoverRule:()=>Ae});var zh={};P(zh,{CONFIG:()=>ao,CSS_NAMED_COLOR_HEX:()=>ul,CSS_NATIVE_COLOR_REGEX:()=>Zt,CSS_UNITS:()=>$o,FACTORY:()=>ue,STANDARD_SCHEME_QUERIES:()=>$l,VALUE_TRANSFORMERS:()=>zl,activateConfig:()=>h_,animation:()=>vh,appendSVGSprite:()=>ea,appendSvgIconsSprite:()=>uo,applyDocument:()=>ta,applyHeadings:()=>Nl,applyMediaSequenceVars:()=>Sr,applyReset:()=>ra,applySequenceGlobalVars:()=>Ni,applySequenceVars:()=>er,applySpacingSequence:()=>Ui,applyTimingSequence:()=>Qi,applyTypographySequence:()=>Xi,breakpoints:()=>Sh,changeGlobalTheme:()=>Wl,changeLightness:()=>sh,checkIfBoxSize:()=>Bi,class:()=>Oh,color:()=>gh,colorStringToRgbaArray:()=>le,compositeOverBackdrop:()=>no,contrastRatio:()=>rn,convertSvgToSymbol:()=>ji,createConfig:()=>Pi,cssMediaVars:()=>Ol,cssVars:()=>Tl,defineResolvedThemeSignal:()=>cn,defineThemeSignal:()=>an,devices:()=>kh,document:()=>f_,findHeadingLetter:()=>Dl,findHeadings:()=>Fi,font:()=>lh,fontFace:()=>dh,fontFamily:()=>fh,fontFamilyTypes:()=>uh,generateSequence:()=>Kt,generateSequencePosition:()=>$h,generateSprite:()=>ln,generateSubSequence:()=>Li,getActiveConfig:()=>E,getColor:()=>ot,getColorShade:()=>ml,getDefaultOrFirstKey:()=>so,getFnPrefixAndValue:()=>tr,getFontFace:()=>ah,getFontFaceEach:()=>io,getFontFaceEachString:()=>vl,getFontFaceString:()=>Ai,getFontFamily:()=>Yi,getFontFormat:()=>Sl,getFontSizeByKey:()=>Ji,getMediaColor:()=>Rt,getMediaTheme:()=>pe,getResolvedThemeSignal:()=>p_,getRgbTone:()=>Be,getSafeInk:()=>Ll,getSafeInkInfo:()=>Mh,getSequenceValue:()=>Mi,getSequenceValueBySymbols:()=>Il,getSequenceValuePropertyPair:()=>Ve,getShadow:()=>Hi,getShapeByKey:()=>Zi,getSpacingBasedOnRatio:()=>Ee,getSpacingByKey:()=>xt,getSubratio:()=>$i,getSubratioDifference:()=>Di,getTheme:()=>Wi,getThemeSignal:()=>d_,getTimingByKey:()=>te,getTimingFunction:()=>he,gradient:()=>mh,grid:()=>Th,hexToRgb:()=>eh,hexToRgbArray:()=>dl,hexToRgba:()=>oh,hslToRgb:()=>gl,icons:()=>_h,isCSSVar:()=>ht,isDomDocument:()=>Ke,isGoogleFontsUrl:()=>on,isHostObject:()=>Ge,isRawUnitValue:()=>cs,isResolvedColor:()=>Ce,isScalingUnit:()=>Wr,isWritableFamilyBucket:()=>Tu,linearChannelToSrgb:()=>_l,media:()=>ph,mixTwoColors:()=>th,mixTwoRgb:()=>nh,mixTwoRgba:()=>yl,numToLetterMap:()=>Ue,oklabToLinearSrgb:()=>xl,oklabToOklch:()=>vi,oklchToGamutSafeSrgb:()=>Ci,oklchToOklab:()=>wl,opacify:()=>en,parkHostObject:()=>ur,parseColorToken:()=>qt,popConfig:()=>rt,pushConfig:()=>st,relativeLuminance:()=>oo,reset:()=>u_,resolveBorderValue:()=>Qt,resolveColorRgb:()=>co,resolveColorsInGradient:()=>na,resolveConfigDocument:()=>Do,resolveFileUrl:()=>fe,resolveShadowValue:()=>lo,returnSubThemeOrDefault:()=>ih,rgbArrayToHex:()=>pl,rgbToHSL:()=>hl,rgbToHex:()=>rh,runThroughMedia:()=>Fl,scratchDefaultConfig:()=>sn,scratchSystem:()=>pn,scratchUtils:()=>kr,semanticIcons:()=>xh,sequence:()=>Qe,set:()=>po,setActiveConfig:()=>Rl,setAdaptiveSchemeVar:()=>Cr,setColor:()=>vr,setCustomFont:()=>Ei,setCustomFontMedia:()=>wr,setEach:()=>Hh,setFont:()=>Gi,setFontFamily:()=>un,setFontImport:()=>nn,setGradient:()=>fn,setInCustomFontMedia:()=>kl,setMediaTheme:()=>Ki,setSVG:()=>dn,setScalingVar:()=>Ii,setShadow:()=>Er,setSubScalingVar:()=>Pl,setSvgIcon:()=>fo,setTheme:()=>qi,setValue:()=>Vh,setVariables:()=>Lh,shadow:()=>bh,shape:()=>Ih,sizes:()=>Ph,spacing:()=>hh,splitSpacedValue:()=>Vi,splitTopLevelCommas:()=>Ze,splitTransition:()=>Hl,srgbChannelToLinear:()=>bl,srgbToOklab:()=>ki,svg:()=>Ch,svgData:()=>Eh,templates:()=>Ah,theme:()=>yh,timing:()=>wh,toCamel:()=>Ri,toLinearChannel:()=>tn,transformBackgroundImage:()=>Ul,transformBorder:()=>He,transformBorderRadius:()=>rr,transformBoxShadow:()=>oa,transformDuration:()=>sa,transformShadow:()=>Bl,transformSize:()=>yt,transformSizeRatio:()=>B,transformTextStroke:()=>jl,transformTransition:()=>Uh,transfromGap:()=>Vl,typography:()=>Ti,unit:()=>ch,vars:()=>Rh});var kr={};P(kr,{CSS_NAMED_COLOR_HEX:()=>ul,CSS_NATIVE_COLOR_REGEX:()=>Zt,CSS_UNITS:()=>$o,applyMediaSequenceVars:()=>Sr,applySequenceGlobalVars:()=>Ni,applySequenceVars:()=>er,changeLightness:()=>sh,colorStringToRgbaArray:()=>le,compositeOverBackdrop:()=>no,contrastRatio:()=>rn,convertSvgToSymbol:()=>ji,findHeadingLetter:()=>Dl,findHeadings:()=>Fi,generateSequence:()=>Kt,generateSequencePosition:()=>$h,generateSprite:()=>ln,generateSubSequence:()=>Li,getColorShade:()=>ml,getDefaultOrFirstKey:()=>so,getFnPrefixAndValue:()=>tr,getFontFace:()=>ah,getFontFaceEach:()=>io,getFontFaceEachString:()=>vl,getFontFaceString:()=>Ai,getFontFormat:()=>Sl,getRgbTone:()=>Be,getSequenceValue:()=>Mi,getSequenceValueBySymbols:()=>Il,getSequenceValuePropertyPair:()=>Ve,getSubratio:()=>$i,getSubratioDifference:()=>Di,hexToRgb:()=>eh,hexToRgbArray:()=>dl,hexToRgba:()=>oh,hslToRgb:()=>gl,isCSSVar:()=>ht,isDomDocument:()=>Ke,isGoogleFontsUrl:()=>on,isHostObject:()=>Ge,isRawUnitValue:()=>cs,isResolvedColor:()=>Ce,isScalingUnit:()=>Wr,isWritableFamilyBucket:()=>Tu,linearChannelToSrgb:()=>_l,mixTwoColors:()=>th,mixTwoRgb:()=>nh,mixTwoRgba:()=>yl,numToLetterMap:()=>Ue,oklabToLinearSrgb:()=>xl,oklabToOklch:()=>vi,oklchToGamutSafeSrgb:()=>Ci,oklchToOklab:()=>wl,opacify:()=>en,parkHostObject:()=>ur,parseColorToken:()=>qt,relativeLuminance:()=>oo,resolveConfigDocument:()=>Do,resolveFileUrl:()=>fe,returnSubThemeOrDefault:()=>ih,rgbArrayToHex:()=>pl,rgbToHSL:()=>hl,rgbToHex:()=>rh,setCustomFont:()=>Ei,setCustomFontMedia:()=>wr,setFontImport:()=>nn,setInCustomFontMedia:()=>kl,setScalingVar:()=>Ii,setSubScalingVar:()=>Pl,setVariables:()=>Lh,splitTopLevelCommas:()=>Ze,srgbChannelToLinear:()=>bl,srgbToOklab:()=>ki,toLinearChannel:()=>tn});var Ke=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),Ge=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)},Tu=t=>t!==null&&typeof t=="object"&&!Ge(t),ur=(t,e,r)=>{if(!t)return;if(Ke(r)){t.__domDocument||(t.__domDocument=r);return}let o=`__host_${e}`;t[o]||(t[o]=r)},Do=t=>t?Ke(t.__domDocument)?t.__domDocument:Ke(t.document)?t.document:null:null;var Wr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",$o=["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"],bC=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),_C=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${$o.filter(t=>t!=="auto").map(bC).join("|")})$`),cs=t=>_C.test(String(t).trim());R();var ul={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"},le=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=ul[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&&et&&v){let r=et.body.appendChild(et.createElement("fictum")),o="rgb(1, 2, 3)";if(r.style.color=o,r.style.color!==o){et.body.removeChild(r);return}if(r.style.color=t,r.style.color===o||r.style.color==="")return et.body.removeChild(r),[0,0,0,0];t=v.getComputedStyle(r).color,et.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]},th=(t,e,r=.5)=>(t=le(t),e=le(e),yl(t,e,r)),eh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${o},${n})`},dl=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,o,n]},rh=(t,e,r)=>"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1),pl=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1),oh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${r},${o},${n},${e})`},nh=(t,e,r=.5)=>{let o=[];for(let n=0;n<3;n++)o[n]=~~(t[n]+(e[n]-t[n])*r);return`rgb(${o})`},sh=(t,e)=>{let[r,o,n]=e,s=Math.max(0,Math.min(100,n+parseFloat(t)));return[r,o,s]},hl=(t,e,r)=>{let o=Math.max(t,e,r),n=o-Math.min(t,e,r),s=1-Math.abs(o+o-n-1),i=n&&(o==t?(e-r)/n:o==e?2+(r-t)/n:4+(t-e)/n);return[60*(i<0?i+6:i),s?n/s:0,(o+o-n)/2]},gl=(t,e,r,o=e*Math.min(r,1-r),n=(s,i=(s+t/30)%12)=>r-o*Math.max(Math.min(i-3,9-i,1),-1))=>[n(0),n(8),n(4)],ml=(t,e)=>{let r=parseInt(t,16),o=(r>>16)+e;o>255?o=255:o<0&&(o=0);let n=(r>>8&255)+e;n>255?n=255:n<0&&(n=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|n<<8|o<<16)+16777216).toString(16).slice(1)},yl=(t,e,r=.5)=>{let o=[];for(let n=0;n<4;n++){let s=n===3?i=>i:Math.round;o[n]=s(t[n]+(e[n]-t[n])*r)}return`rgba(${o})`},en=(t,e)=>{let r=le(t);if(!r){Jr()&&console.warn(t+" color is not rgba");return}return r[3]=e,`rgba(${r})`},ht=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Zt=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,EE=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,qt=t=>{if(!w(t))return null;if(Zt.test(t))return{passthrough:t};if(ht(t))return{cssVar:t};let e=t.match(EE);if(!e)return null;let[,r,o,n]=e,s=o!==void 0?`0.${o}`:void 0,i=n&&n[0]==="="?n.slice(1):n;return{name:r,alpha:s,tone:i}},Ce=t=>w(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),Ze=t=>{let e=[],r="",o=0;for(let n of t){if(n==="("?o+=1:n===")"&&o>0&&(o-=1),n===","&&o===0){e.push(r),r="";continue}r+=n}return(r.length||!e.length)&&e.push(r),e},tn=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),oo=t=>.2126*tn(t[0])+.7152*tn(t[1])+.0722*tn(t[2]),rn=(t,e)=>{let r=oo(t)+.05,o=oo(e)+.05;return r>o?r/o:o/r},bl=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),_l=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,ki=([t,e,r])=>{let[o,n,s]=[t,e,r].map(bl),i=.4122214708*o+.5363325363*n+.0514459929*s,a=.2119034982*o+.6806995451*n+.1073969566*s,c=.0883024619*o+.2817188376*n+.6299787005*s,l=Math.cbrt(i),f=Math.cbrt(a),u=Math.cbrt(c);return[.2104542553*l+.793617785*f-.0040720468*u,1.9779984951*l-2.428592205*f+.4505937099*u,.0259040371*l+.7827717662*f-.808675766*u]},xl=([t,e,r])=>{let o=t+.3963377774*e+.2158037573*r,n=t-.1055613458*e-.0638541728*r,s=t-.0894841775*e-1.291485548*r,i=o**3,a=n**3,c=s**3;return[4.0767416621*i-3.3077115913*a+.2309699292*c,-1.2684380046*i+2.6097574011*a-.3413193965*c,-.0041960863*i-.7034186147*a+1.707614701*c]},vi=([t,e,r])=>{let o=Math.atan2(r,e)*180/Math.PI;return o<0&&(o+=360),[t,Math.sqrt(e*e+r*r),o]},wl=([t,e,r])=>{let o=r*Math.PI/180;return[t,e*Math.cos(o),e*Math.sin(o)]},Ci=(t,e,r,o=24)=>{let n=a=>xl(wl([t,a,r])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=n(e);if(!s(i)){let a=0,c=e;for(let l=0;l<o;l++){let f=(a+c)/2;s(n(f))?a=f:c=f}i=n(a)}return i.map(a=>_l(Math.max(0,Math.min(1,a))))},no=(t,e=1,r=[255,255,255])=>e>=1?t:t.map((o,n)=>o*e+r[n]*(1-e)),Be=(t,e)=>{w(t)&&t.includes("rgb")&&(t=le(t).join(", ")),w(t)&&(t=t.split(",").map(n=>parseFloat(n.trim()))),Le(e)&&(e+="");let r=pl(t),o=e.slice(0,1);if(o==="-"||o==="+"){let n=ml(r,parseFloat(e));return dl(n).join(", ")}else{let[n,s,i]=t,[a,c]=hl(n/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return gl(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var ih=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var fe=(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},so=(t,e)=>{if(t[e])return t[e].value;let r=()=>Object.keys(t).find(n=>n!=="default"&&t[n]&&t[n].value&&!t[n].isSystemFallback);if(t.default){let n=t[t.default];if(n&&n.isSystemFallback){let s=r();if(s)return t[s].value}if(n)return n.value}let o=r()||Object.keys(t).find(n=>n!=="default"&&t[n]&&t[n].value);return o&&t[o]&&t[o].value},Sl=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},on=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),nn=t=>`@import url('${t}');`,kl=t=>`@font-face { ${t} }`,Ei=(t,e,r,o={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=Sl(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
|
|
31
|
+
}`;return`${a}${l}${c}`}});var uh,R_=F(()=>{"use strict";uh=t=>{if(!t)return"";let e=new Date(t),r=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),o=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${o}, ${r}`}});var dh,P_=F(()=>{"use strict";dh=(t,e)=>{let r=setTimeout(()=>{let{props:o}=t;if(!e.clientHeight){let{node:{clientHeight:n}}=t;n&&(e.clientHeight=n)}if(e.active){if(o.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let n=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(n)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(r)})}});var ph,I_=F(()=>{"use strict";ph=function(e){let r=[0,1];for(let o=2;o<=e;o++)r[o]=r[o-1]+r[o-2];return r[e]}});var hh,D_=F(()=>{"use strict";hh=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function rn(t,e={}){let{window:r=globalThis}=e,{document:o=r.document}=e;return new Promise((n,s)=>{let i=o.querySelector(`script[src="${t}"]`);if(i)return n(i);let a=o.createElement("script");a.src=t,a.async=e.async===!0,a.type=e.type||"text/javascript",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,n(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},o.head.appendChild(a)})}async function xh(t,e={}){let{window:r=globalThis}=e,{document:o=r.document}=e;return new Promise((n,s)=>{let i=o.querySelector(`link[href="${t}"]`);if(i)return n(i);let a=o.createElement("link");a.href=t,a.rel=e.rel||"stylesheet",a.type="text/css",a.media=e.media||"all",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,n(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},o.head.appendChild(a)})}var gh,mh,yh,bh,_h,$_=F(()=>{"use strict";gh=(t,e=!1,r=document,o="text/javascript")=>new Promise((n,s)=>{try{let i=r.createElement("script");i.type=o,i.async=e,i.src=t,i.addEventListener("load",a=>{n({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),r.body.appendChild(i)}catch(i){s(i)}}),mh=(t,e=document,r="text/javascript")=>new Promise((o,n)=>{let s=e.createElement("script");s.type=r,s.src=t;let i=e.createElement("div");i.style.cssText="position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,0.8);z-index:9999;",e.body.appendChild(i),s.onload=()=>{console.log(`Successfully loaded: ${t}`),e.body.removeChild(i),o()},s.onerror=()=>{e.body.removeChild(i),n(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),yh=(t,e=document,r,o="text/javascript")=>{let n=new window.XMLHttpRequest;if(n.open("GET",t,!1),n.send(),n.status===200){let s=e.createElement("script");s.type=o,s.text=n.responseText,e.body.appendChild(s),typeof r=="function"&&r()}else throw new Error(`Failed to load the script ${t}`)},bh=(t,e=!1,r=document,o="text/javascript")=>new Promise((n,s)=>{try{let i=r.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{n({status:!0})}),r.head.appendChild(i)}catch(i){s(i)}}),_h=(t,e=!1,r=document,o="text/javascript",n="smbls-script")=>{try{let s=r.createElement("script");s.type=o,s.async=e,s.id=n,s.innerHTML=t,r.body.appendChild(s)}catch(s){console.warn(s)}}});function LE(t,e){if(!e||typeof e!="object")return t;let r=n=>{if(!$E(n))return n;let s=e[n];return s?.src?s.src:n},o={...t};for(let[n,s]of Object.entries(o))typeof s=="string"?o[n]=r(s):Array.isArray(s)&&(o[n]=s.map(i=>typeof i=="string"?r(i):i));return o}function pl(t,e){if(!t||!e)return;let r=e.split("."),o=t;for(let n of r){if(o==null||typeof o!="object")return;o=o[n]}return o}function ME(t,e,r){let n=(e.config||e.settings||{}).polyglot||e.polyglot,s=r?.lang||n?.defaultLang||"en",a=(n?.translations||{})[s]||{},c=r?.state||{},l={...t};for(let[f,u]of Object.entries(l))typeof u!="string"||!u.includes("{{")||(l[f]=u.replace(/\{\{\s*([^|{}]+?)\s*(?:\|\s*(\w+)\s*)?\}\}/g,(d,h,g)=>{let p=h.trim();if(g==="polyglot")return a[p]??pl(a,p)??d;if(g==="getLocalStateLang")return pl(c,p+s)??d;let m=pl(c,p);return m!==void 0?m:a[p]??pl(a,p)??d}));return l}function L_(t){let e={...t};for(let[r,o]of Object.entries(e))if(typeof o=="function"){let n=o.toString(),s=n.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=n.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[r]=`{{ ${i[1]} | polyglot }}`;continue}let a=n.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[r]=`{{ ${a[1]} }}`;continue}delete e[r]}else if(typeof o=="string"){let n=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(n){e[r]=`{{ ${n[1]} | getLocalStateLang }}`;continue}let s=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | polyglot }}`;continue}if(o.includes("=>")&&o.includes("s.")){let i=o.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[r]=`{{ ${i[1]} }}`;continue}}}return e}function Sh(t,e,r,{isProduction:o=!1,channel:n="production"}={}){let s=t.pages?.[e],i=S(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=L_(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=L_(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let p=t.name||t.key;p?o?d.title=p:n==="development"?d.title=`${p} / dev:symbo.ls`:n==="staging"?d.title=`${p} / staging:symbo.ls`:d.title=`${p} / symbo.ls`:d.title="Symbols demo"}d=ME(d,t,r),d.title&&(l.has("title")||!d["og:title"])&&(l.has("og:title")||(d["og:title"]=d.title)),d.description&&(l.has("description")||!d["og:description"])&&(l.has("og:description")||(d["og:description"]=d.description)),d.title&&!d["twitter:title"]&&(d["twitter:title"]=d.title),d.description&&!d["twitter:description"]&&(d["twitter:description"]=d.description);let h=r?.actualPathname||e;if(d["og:url"]||d.url){let p=(d["og:url"]||d.url||"").replace(/\/$/,"");if(p&&h&&h!=="/"){let m=h.startsWith("/")?h:"/"+h;d["og:url"]=p+m}}d=LE(d,t.files);let g=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[p,m]of Object.entries(d))if(typeof m=="string"&&m.includes("{{")){let b=m.replace(/\{\{[^}]*\}\}/g,"").trim();b?d[p]=b:p==="title"?d[p]=g:delete d[p]}return d}var Rt,IE,on,DE,hl,wh,$E,M_=F(()=>{"use strict";Ot();Rt=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,r=>e[r])},IE=t=>Object.entries(t||{}).filter(([e,r])=>r!==void 0).map(([e,r])=>`${e}="${Rt(r)}"`).join(" "),on=t=>{let e=5381,r=String(t);for(let o=0;o<r.length;o++)e=(e*33^r.charCodeAt(o))>>>0;return e.toString(36)},DE=new Set(["jsonLd","styles","scripts"]),hl=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let r of t.jsonLd){if(r==null)continue;let o=typeof r=="string"?r:JSON.stringify(r),n=String(o).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${on(o)}">${n}<\/script>`)}if(Array.isArray(t.styles))for(let r of t.styles){if(r==null||!String(r).trim())continue;let o=String(r).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${on(o)}">${o}</style>`)}if(Array.isArray(t.scripts))for(let r of t.scripts){if(!r)continue;let o=typeof r=="string",n=o?r:r.src;if(!n&&!r.body)continue;let s=[];n&&s.push(`src="${Rt(n)}"`),o||(r.type&&s.push(`type="${Rt(r.type)}"`),r.async&&s.push("async"),r.defer&&s.push("defer"),r.integrity&&s.push(`integrity="${Rt(r.integrity)}"`),r.crossorigin&&s.push(`crossorigin="${Rt(r.crossorigin)}"`),r.referrerpolicy&&s.push(`referrerpolicy="${Rt(r.referrerpolicy)}"`),r.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Rt(n||on(r.body||""))}"`;if(!o&&r.body){let a=String(r.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${s.join(" ")}${i}>${a}<\/script>`)}else e.push(`<script ${s.join(" ")}${i}><\/script>`)}return e},wh=(t,e)=>{e||(t={...t,robots:"noindex"});let r=Object.entries(t).reduce((o,[n,s])=>{if(!s&&s!==0&&s!==!1||DE.has(n))return o;if(n==="title")return o.push(`<title>${Rt(s)}</title>`),o;if(n==="canonical")return o.push(`<link rel="canonical" href="${Rt(s)}">`),o;if(n==="manifest")return o.push(`<link rel="manifest" href="${Rt(s)}">`),o;if(n==="favicon"||n==="favicons"||n==="icon"||n==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="string")o.push(`<link rel="icon" href="${Rt(f)}">`);else if(typeof f=="object"){let u=IE(f);/rel=/.test(u)?o.push(`<link ${u}>`):o.push(`<link rel="icon" ${u}>`)}}),o;if(n==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).filter(([d,h])=>h!==void 0).map(([d,h])=>`${d}="${Rt(h)}"`).join(" ");o.push(`<link rel="alternate" ${u}>`)}}),o;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")o.push(`<meta ${u}="${Rt(l)}" content="${Rt(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")o.push(`<meta ${u}="${Rt(l)}" content="${Rt(d)}">`);else if(typeof d=="object"){let h=Object.entries(d).filter(([g,p])=>p!==void 0).map(([g,p])=>`${g}="${Rt(p)}"`).join(" ");o.push(`<meta ${h}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([h,g])=>g!==void 0).map(([h,g])=>`${h}="${Rt(g)}"`).join(" ");o.push(`<meta ${d}>`)}};if(n.startsWith("http-equiv:")){let l=n.replace("http-equiv:","");return i(l,s,"http-equiv"),o}if(n.startsWith("itemprop:")){let l=n.replace("itemprop:","");return i(l,s,"itemprop"),o}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>n.startsWith(l));if(c){let l=n.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),o}if(n.startsWith("apple:")||n.startsWith("msapplication:")){let l=n.startsWith("apple:")?"apple-":"msapplication-",f=n.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),o}return i(n,s),o},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return r.push(...hl(t)),r.join(`
|
|
32
|
+
`)},$E=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http")});var gl,kh,F_=F(()=>{"use strict";Ot();gl=(t,e)=>(O(e)?e:Object.values(e)).reduce((r,o)=>Math.abs(o-t)<Math.abs(r-t)?o:r),kh=(t,e)=>(t=parseFloat(t),S(e)&&(e=Object.values(e)),gl(t,e))});function nn(t){let e=String(t||"").trim();if(!e)return{owner:N_,key:"",full:""};let r=null,o=e;if(e.includes("/")){let s=e.indexOf("/");r=e.slice(0,s),o=e.slice(s+1)}o=o.replace(/\.symbo\.ls$/iu,""),r||(r=N_);let n=o?`${r}/${o}`:"";return{owner:r,key:o,full:n}}async function ml(t,e={}){if((e.provider||"kv")==="api")return B_(t,e);let o=await zE(t,e);return o||B_(t,e)}async function zE(t,e={}){let r=e.kvBaseUrl||FE,o=e.env||"production",n=`${r}/kv/${encodeURIComponent(t)}?env=${o}`;try{let s=await fetch(n,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function B_(t,e={}){let r=e.apiBaseUrl||NE,{key:o}=nn(t);try{let n=`${r}/core/projects/libraries/available?search=${encodeURIComponent(o)}&limit=10`,s=await fetch(n,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(h=>{let{key:g}=nn(h?.key);return g.toLowerCase()===o.toLowerCase()});if(!c?.id&&!c?._id)return null;let l=c.id||c._id,f=`${r}/core/projects/${encodeURIComponent(l)}/data?branch=main`,u=await fetch(f,{method:"GET"});if(!u.ok)return null;let d=await u.json();return d?.data||d||null}catch{return null}}async function U_(t,e={}){if(S(t))return t;if(w(t)){let{full:r}=nn(t);if(!r)return null;try{let o=await ml(r,e);return o||console.warn(`[smbls] Shared library "${r}" not found`),o}catch(o){return console.warn(`[smbls] Failed to fetch shared library "${r}":`,o.message),null}}return null}async function Ch(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async o=>{if(Ci(o)){let n=await U_(VE(o),e);return n?{library:n,ignoreList:o.ignoreList}:null}return U_(o,e)}))).filter(Boolean)}var N_,FE,NE,ki,V_,jE,BE,j_,UE,vi,vh,Ci,VE,HE,Ei,H_=F(()=>{"use strict";Ot();N_="system",FE="https://smbls-kv.nika-980.workers.dev",NE="https://api.symbols.app";ki=(t,e,r,o)=>{for(let n in e){let s=o?`${o}/${n}`:n;r&&r.has(s)||(n in t?S(t[n])&&S(e[n])&&ki(t[n],e[n],r,s):t[n]=e[n])}},V_=(t,e,r)=>{if(!S(t)||!e.size)return t;let o=`${r}/`,n=!1;for(let i of e)if(i.startsWith(o)){n=!0;break}if(!n)return t;let s={};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=`${r}/${i}`;e.has(a)||(s[i]=V_(t[i],e,a))}return s},jE=new Set,BE=new Set(["components","pages","functions","snippets","methods"]),j_=(t,e)=>e===""&&BE.has(t),UE=t=>t.replace(/\.js$/iu,""),vi=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let r of t){if(!w(r))continue;let o=r.split("/").map(n=>UE(n.trim())).filter(Boolean).join("/");o&&e.add(o)}return e},vh=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),Ci=t=>S(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),VE=t=>t.library!==void 0?t.library:t.key??t.name,HE=(t,e,r)=>{let o=vi(e.sharedLibIgnore);e.sharePages===!1&&o.add("pages");let n=o.size?new Set([...r,...o]):r;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&!(s==="sharePages"||s==="sharedLibIgnore")&&!n.has(s))if(S(e[s])&&S(t[s]))if(s==="designSystem")ki(t[s],e[s],n,s);else for(let i in e[s])n.has(`${s}/${i}`)||(i in t[s]?j_(s,t[s][i])&&!j_(s,e[s][i])&&(t[s][i]=e[s][i]):t[s][i]=e[s][i]);else s in t||(t[s]=V_(e[s],n,s))},Ei=(t,e)=>{if(!(!e||!e.length))for(let r=0;r<e.length;r++){let o=e[r],n=jE;Ci(o)&&(n=vi(o.ignoreList),o=o.library),S(o)&&HE(t,o,n)}}});var Eh,Ah,Th,Ai,Oh,Ti,Rh,ao,z_=F(()=>{"use strict";Ot();Eh=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},Ah=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)}},Th=t=>t.replace(/[^a-zA-Z0-9_]/g,""),Ai=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,"")),Oh=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),Ti=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Rh=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},ao=t=>{if(O(t))return t;if(w(t))return t.split(" ");if(S(t))return Object.values(t);if(Me(t))return[t]}});var Ph,W_=F(()=>{"use strict";Ph=()=>{let t=document.styleSheets[0],e="";if(t)try{let r=t.cssRules||t.rules;for(let o=0;o<r.length;o++)e+=r[o].cssText}catch(r){console.error("Unable to access CSS rules. This may be due to CORS restrictions:",r)}else console.log("No stylesheets found in document.styleSheets[0].");return e}});var Kt,sn,Oi,Ri,q_=F(()=>{"use strict";Kt=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let r=t.context;if(!r)return null;let o=r.assets&&r.assets[e]||r.files&&r.files[e];return o?typeof o=="string"?{src:o,type:null,variants:null}:typeof o=="object"&&typeof o.src=="string"?o:null:null},sn=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let r=t.some(n=>typeof n.width=="number"),o=[];for(let n of t)r&&typeof n.width=="number"?o.push(`${n.src} ${n.width}w`):r||(n.scale===1&&e?o.push(n.src):n.scale&&n.scale!==1&&o.push(`${n.src} ${n.scale}x`));return o.join(", ")},Oi=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(r=>r.format===t.type);return sn(e,{keepOneX:!1})},Ri=(t,e)=>{if(!t||typeof t!="object"||typeof t.src!="string")return[];if(!Array.isArray(t.variants)||!t.variants.length)return[{tag:"img",attr:{src:t.src,alt:e||""}}];let r=new Map;for(let a of t.variants)r.has(a.format)||r.set(a.format,[]),r.get(a.format).push(a);let o=[];for(let[a,c]of r)a!==t.type&&o.push({tag:"source",attr:{type:a,srcset:sn(c,{keepOneX:!0})}});let n=r.get(t.type)||[],s=sn(n,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...o,{tag:"img",attr:i}]}});var yl={};P(yl,{CDN_PROVIDERS:()=>fe,DOMQL_EVENTS:()=>Pd,DOMQ_PROPERTIES:()=>mr,ENV:()=>Kd,HTML_TAGS:()=>Ko,METHODS:()=>Vo,METHODS_EXL:()=>As,NODE_ENV:()=>ke,OPTIONS:()=>Xs,PACKAGE_MANAGER_TO_CDN:()=>vr,PARSED_DOMQ_PROPERTIES:()=>Es,PROPS_METHODS:()=>yr,STATE_METHODS:()=>Qr,STATE_PROPERTIES:()=>Rd,SVG_TAGS:()=>Kb,TYPES:()=>_s,UNIVERSAL_RESERVED_KEYS:()=>ul,addCaching:()=>Kc,addContext:()=>qc,addExtend:()=>bp,addExtends:()=>qt,addItemAfterEveryElement:()=>yd,addProtoToArray:()=>Ss,addRef:()=>Hc,applyDependentState:()=>Fp,applyEvent:()=>Qc,applyEventUpdate:()=>tl,applyExtends:()=>Xb,applyProps:()=>zs,arrayContainsOtherArray:()=>fd,arraysEqual:()=>_d,arrayzeValue:()=>ao,buildImgSrcset:()=>Oi,buildSourcesAndImg:()=>Ri,cache:()=>Vp,call:()=>sh,captureSnapshot:()=>ah,checkForStateTypes:()=>Dp,checkIfInherits:()=>Zc,checkIfStringIsInArray:()=>Sd,clone:()=>Dd,cloneAndMergeArrayExtend:()=>Ms,cloneFunction:()=>rp,concatAddExtends:()=>gp,copyJavaScriptToClipboard:()=>Ah,copyStringToClipboard:()=>Eh,createBasedOnType:()=>Vc,createElement:()=>Ip,createElementExtends:()=>Rc,createExtends:()=>Ns,createExtendsFromKeys:()=>Go,createExtendsStack:()=>$c,createIfConditionFlag:()=>op,createInheritedState:()=>$p,createKey:()=>$s,createNestedObject:()=>Bd,createNestedObjectByKeyPath:()=>Mp,createObjectWithoutPrototype:()=>kc,createParent:()=>zc,createPath:()=>Wc,createProps:()=>Ws,createPropsStack:()=>Bc,createRoot:()=>Pp,createScope:()=>jp,createSnapshotId:()=>Ds,customDecodeURIComponent:()=>Od,customEncodeURIComponent:()=>Td,cutArrayAfterValue:()=>gd,cutArrayBeforeValue:()=>hd,debounce:()=>Ls,debounceOnContext:()=>Qd,decodeNewlines:()=>Ad,deepClone:()=>dt,deepContains:()=>Nd,deepDefaults:()=>ki,deepDestringifyFunctions:()=>ce,deepExtend:()=>Oc,deepMerge:()=>st,deepMergeExtends:()=>Ne,deepStringifyFunctions:()=>Ts,defineSetter:()=>oh,destringifyGlobalScope:()=>Rs,detectHeightOnInit:()=>dh,detectInfiniteLoop:()=>zd,document:()=>Q,encodeNewlines:()=>Ed,error:()=>so,excludeKeysFromObject:()=>qd,exec:()=>ft,extendCachedRegistry:()=>mp,extendStackRegistry:()=>js,extractArrayExtend:()=>Us,fetchLibraryData:()=>ml,fibonacciNumberByIndex:()=>ph,filterArrays:()=>xd,filterArraysFast:()=>wd,finalizeExtends:()=>Lc,findClosestNumber:()=>gl,findClosestNumberInFactory:()=>kh,findInheritedState:()=>Jc,findKeyPosition:()=>vd,flattenExtend:()=>Yo,formatDate:()=>uh,generateHash:()=>Ec,generateHeadArrayTags:()=>hl,generateKey:()=>Is,generateMetaTags:()=>wh,get:()=>th,getCDNDirUrl:()=>dl,getCDNUrl:()=>Ce,getCapitalCaseKeys:()=>wp,getCdnProviderFromConfig:()=>tn,getChildStateInKey:()=>Xc,getChildren:()=>ai,getContext:()=>hi,getCookie:()=>cp,getDB:()=>_i,getEmotionStylesheet:()=>Ph,getExtendsInElement:()=>_p,getExtendsStack:()=>Fs,getExtendsStackRegistry:()=>Tc,getFrequencyInArray:()=>ud,getHashedExtend:()=>Bs,getImportMapScript:()=>fh,getInObjectByPath:()=>Hd,getLocalStorage:()=>fp,getNev:()=>Jd,getPageMetadata:()=>Sh,getParentStateInKey:()=>Yc,getPath:()=>ci,getQuery:()=>xi,getRef:()=>rh,getRoot:()=>ui,getRootContext:()=>pi,getRootData:()=>di,getRootState:()=>fi,getRootStateInKey:()=>Gc,getSpreadChildren:()=>Sp,global:()=>ad,hasFunction:()=>Fe,hasHandlerPlugin:()=>zo,hasOwnProperty:()=>Ld,hashContent:()=>on,inheritChildExtends:()=>Ic,inheritChildPropsExtends:()=>Pc,inheritParentProps:()=>qs,inheritRecursiveChildExtends:()=>Dc,initProps:()=>Tp,is:()=>zt,isArray:()=>O,isBoolean:()=>bc,isContextComponent:()=>kp,isCyclic:()=>Wd,isDOMNode:()=>Ht,isDate:()=>xc,isDefined:()=>bt,isDevelopment:()=>_r,isEmpty:()=>wc,isEmptyObject:()=>Md,isEqualDeep:()=>Sc,isFunction:()=>A,isHtmlElement:()=>ys,isLocal:()=>Xd,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>en,isMethod:()=>ih,isMobile:()=>ip,isNode:()=>Je,isNot:()=>ld,isNotProduction:()=>ro,isNull:()=>_c,isNumber:()=>Me,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>hh,isProduction:()=>br,isStaging:()=>Yd,isState:()=>Lp,isString:()=>w,isStringFunction:()=>ep,isTest:()=>Cc,isTesting:()=>Gd,isUndefined:()=>Tt,isUniversallyReservedKey:()=>ch,isUnresolvableDependency:()=>io,isValidHtmlTag:()=>dp,isWrappedLibrary:()=>Ci,joinArrays:()=>jo,jointStacks:()=>yp,keys:()=>ll,loadCssFile:()=>bh,loadJavascript:()=>_h,loadJavascriptFile:()=>gh,loadJavascriptFileEmbedSync:()=>yh,loadJavascriptFileSync:()=>mh,loadRemoteCSS:()=>xh,loadRemoteScript:()=>rn,log:()=>nh,logGroupIf:()=>sp,logIf:()=>np,lookdown:()=>Zp,lookdownAll:()=>Qp,lookup:()=>Jp,lowercaseFirstLetter:()=>Zr,makeObjectWithoutPrototype:()=>Fd,map:()=>Id,mapStringsWithContextComponents:()=>Vs,matchesComponentNaming:()=>je,memoize:()=>tp,merge:()=>gt,mergeSharedLibraries:()=>Ei,nextElement:()=>mi,normalizeIgnoreList:()=>vi,normalizeLibraryKey:()=>nn,objectToString:()=>Os,objectizeStringProperty:()=>Hs,overwrite:()=>Ps,overwriteDeep:()=>Wt,overwriteShallow:()=>eo,overwriteState:()=>Np,parse:()=>fl,parseDeep:()=>si,pickupElementFromProps:()=>Nc,pickupPropsFromElement:()=>Fc,previousElement:()=>yi,propExists:()=>Ep,propertizeElement:()=>jc,propertizeUpdate:()=>Cp,remove:()=>S_,removeChars:()=>Th,removeCookie:()=>lp,removeDuplicateProps:()=>Gs,removeDuplicatesInArray:()=>Bo,removeFromArray:()=>dd,removeFromObject:()=>jd,removeNestedKeyByPath:()=>Ud,removeValueFromArray:()=>ws,removeValueFromArrayAll:()=>md,reorderArrayByValues:()=>bd,replaceLiteralsWithObjectFields:()=>Jr,replaceOctalEscapeSequences:()=>Cd,resolveAsset:()=>Kt,resolveHandler:()=>Wo,resolveSharedLibraries:()=>Ch,returnValueAsText:()=>Uc,runPluginHook:()=>At,self:()=>cd,setActiveRootState:()=>li,setCookie:()=>ap,setHashedExtend:()=>Ac,setInObjectByPath:()=>Vd,setLocalStorage:()=>up,setNodeStyles:()=>cl,setProps:()=>eh,setPropsPrototype:()=>Ks,sharedLibrary:()=>vh,splitPackageSpecifier:()=>wi,spotByPath:()=>ii,srcsetFor:()=>sn,stringIncludesAny:()=>vs,stringToObject:()=>$d,stripVersionRangePrefix:()=>Si,swapItemsInArray:()=>pd,syncProps:()=>Ys,toCamelCase:()=>Ai,toDashCase:()=>Ti,toDescriptionCase:()=>Rh,toTitleCase:()=>Oh,toggleFullscreen:()=>lh,triggerEventOn:()=>xr,triggerEventOnUpdate:()=>Bp,trimStringFromSymbols:()=>kd,unstackArrayOfObjects:()=>xs,update:()=>Ap,updateProps:()=>Op,variables:()=>bi,verbose:()=>Jo,warn:()=>gi,window:()=>v});var R=F(()=>{"use strict";vc();Zd();Ot();Ze();qo();Uo();bs();zb();Wb();Cs();ms();qb();pp();xp();Rp();Mc();r_();o_();Ho();n_();C_();Hp();E_();Up();A_();T_();O_();R_();P_();I_();D_();$_();M_();F_();H_();z_();W_();q_()});var Cv=Vu((KU,vv)=>{var es=1e3,rs=es*60,os=rs*60,Ro=os*24,jR=Ro*7,BR=Ro*365.25;vv.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return UR(t);if(r==="number"&&isFinite(t))return e.long?HR(t):VR(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function UR(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),o=(e[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return r*BR;case"weeks":case"week":case"w":return r*jR;case"days":case"day":case"d":return r*Ro;case"hours":case"hour":case"hrs":case"hr":case"h":return r*os;case"minutes":case"minute":case"mins":case"min":case"m":return r*rs;case"seconds":case"second":case"secs":case"sec":case"s":return r*es;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function VR(t){var e=Math.abs(t);return e>=Ro?Math.round(t/Ro)+"d":e>=os?Math.round(t/os)+"h":e>=rs?Math.round(t/rs)+"m":e>=es?Math.round(t/es)+"s":t+"ms"}function HR(t){var e=Math.abs(t);return e>=Ro?pu(t,e,Ro,"day"):e>=os?pu(t,e,os,"hour"):e>=rs?pu(t,e,rs,"minute"):e>=es?pu(t,e,es,"second"):t+" ms"}function pu(t,e,r,o){var n=e>=r*1.5;return Math.round(t/r)+" "+o+(n?"s":"")}});var Av=Vu((GU,Ev)=>{function zR(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=n,r.enabled=a,r.humanize=Cv(),r.destroy=l,Object.keys(t).forEach(f=>{r[f]=t[f]}),r.names=[],r.skips=[],r.formatters={};function e(f){let u=0;for(let d=0;d<f.length;d++)u=(u<<5)-u+f.charCodeAt(d),u|=0;return r.colors[Math.abs(u)%r.colors.length]}r.selectColor=e;function r(f){let u,d=null,h,g;function p(...m){if(!p.enabled)return;let b=p,_=Number(new Date),y=_-(u||_);b.diff=y,b.prev=u,b.curr=_,u=_,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let x=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(E,T)=>{if(E==="%%")return"%";x++;let $=r.formatters[T];if(typeof $=="function"){let D=m[x];E=$.call(b,D),m.splice(x,1),x--}return E}),r.formatArgs.call(b,m),(b.log||r.log).apply(b,m)}return p.namespace=f,p.useColors=r.useColors(),p.color=r.selectColor(f),p.extend=o,p.destroy=r.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,g=r.enabled(f)),g),set:m=>{d=m}}),typeof r.init=="function"&&r.init(p),p}function o(f,u){let d=r(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function n(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let u=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(f,u){let d=0,h=0,g=-1,p=0;for(;d<f.length;)if(h<u.length&&(u[h]===f[d]||u[h]==="*"))u[h]==="*"?(g=h,p=d,h++):(d++,h++);else if(g!==-1)h=g+1,p++,d=p;else return!1;for(;h<u.length&&u[h]==="*";)h++;return h===u.length}function i(){let f=[...r.names,...r.skips.map(u=>"-"+u)].join(",");return r.enable(""),f}function a(f){for(let u of r.skips)if(s(f,u))return!1;for(let u of r.names)if(s(f,u))return!0;return!1}function c(f){return f instanceof Error?f.stack||f.message:f}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Ev.exports=zR});var Tv=Vu((Qt,hu)=>{Qt.formatArgs=qR;Qt.save=KR;Qt.load=GR;Qt.useColors=WR;Qt.storage=YR();Qt.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Qt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function WR(){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 qR(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+hu.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(o=r))}),t.splice(o,0,e)}Qt.log=console.debug||console.log||(()=>{});function KR(t){try{t?Qt.storage.setItem("debug",t):Qt.storage.removeItem("debug")}catch{}}function GR(){let t;try{t=Qt.storage.getItem("debug")||Qt.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function YR(){try{return localStorage}catch{}}hu.exports=Av()(Qt);var{formatters:XR}=hu.exports;XR.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var vb={};P(vb,{ANIMATION_PROPS:()=>Vg,ARIA_ROLES:()=>ZA,ATTR_TRANSFORMS:()=>Fg,BLOCK_PROPS:()=>Hg,CDN_PROVIDERS:()=>fe,CONFIG:()=>po,CSS_NAMED_COLOR_HEX:()=>bl,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_PROPS_REGISTRY:()=>xt,CSS_UNITS:()=>No,DEFAULT_CONFIG:()=>Ca,DEFAULT_CSS_PROPERTIES_LIST:()=>vt,DELEGATED_EVENTS:()=>Tn,DESIGN_SYSTEM_OPTIONS:()=>yy,DOMQL_EVENTS:()=>Pd,DOMQ_PROPERTIES:()=>mr,DOM_EVENTS:()=>$x,ENV:()=>Kd,FACTORY:()=>pe,FLEX_PROPS:()=>Xg,FONT_PROPS:()=>zg,GRID_PROPS:()=>Jg,HOST_REGISTERED_PACKAGES:()=>$k,HTML_ATTRIBUTES:()=>uf,HTML_TAGS:()=>Ko,LIFECYCLE_EVENTS:()=>Dr,METHODS:()=>Vo,METHODS_EXL:()=>As,MISC_PROPS:()=>Wg,MIXINS:()=>af,NODE_ENV:()=>ke,OPTIONS:()=>Xs,PACKAGE_MANAGER_TO_CDN:()=>vr,PARSED_DOMQ_PROPERTIES:()=>Es,POSITION_PROPS:()=>qg,PROPS_METHODS:()=>yr,REGISTRY:()=>Nt,RESERVED_STORE_METHODS:()=>Lb,ROUTER_OPTIONS:()=>Df,SIGNAL_ENGINE_KEY:()=>Mo,SIGNAL_INSTANCES_KEY:()=>$o,STANDARD_SCHEME_QUERIES:()=>Ul,STATE_PROPERTIES:()=>Rd,STORE_METHOD_NAMES:()=>$b,SVG_TAGS:()=>En,THEME_PROPS:()=>Yg,TIMING_PROPS:()=>ya,TYPES:()=>_s,UNIVERSAL_RESERVED_KEYS:()=>ul,VALUE_TRANSFORMERS:()=>Jl,VERSION:()=>Fb,__resetSignalEngine:()=>nd,__resetSignalInstances:()=>od,__resetStateShadowWarnings:()=>Mb,activateConfig:()=>J_,addCaching:()=>Kc,addContext:()=>qc,addDelegatedEvent:()=>ga,addExtend:()=>bp,addExtends:()=>qt,addItemAfterEveryElement:()=>yd,addMethods:()=>$n,addProtoToArray:()=>Ss,addRef:()=>Hc,animation:()=>rg,appendSVGSprite:()=>la,appendSvgIconsSprite:()=>yo,applyAttrTransforms:()=>jg,applyCSS:()=>fy,applyDependentState:()=>Fp,applyDocument:()=>ca,applyEvent:()=>Qc,applyEventUpdate:()=>tl,applyExtends:()=>Rn,applyHeadings:()=>Wl,applyInitialState:()=>xf,applyMediaSequenceVars:()=>Er,applyProps:()=>zs,applyReset:()=>fa,applySequenceGlobalVars:()=>qi,applySequenceVars:()=>or,applySpacingSequence:()=>Yi,applyStateMethods:()=>ie,applyTimingSequence:()=>aa,applyTrueProps:()=>Qg,applyTypographySequence:()=>na,arrayContainsOtherArray:()=>fd,arraysEqual:()=>_d,arrayzeValue:()=>ao,assertEmitIntegrity:()=>Ag,batch:()=>hc,breakpoints:()=>tg,buildImgSrcset:()=>Oi,buildSourcesAndImg:()=>Ri,buildThemeVarStyles:()=>Vn,cache:()=>Vp,cacheNode:()=>Ir,call:()=>sh,callStateMethod:()=>_a,camelToAttr:()=>Lr,camelToLowerAttr:()=>Lx,captureSnapshot:()=>ah,changeGlobalTheme:()=>Zl,changeLightness:()=>Fh,checkAttributeByTagName:()=>Mr,checkEventFunctions:()=>Ng,checkForStateTypes:()=>Dp,checkIfBoxSize:()=>Gi,checkIfInherits:()=>Zc,checkIfStringIsInArray:()=>Sd,class:()=>ag,clone:()=>Dd,cloneAndMergeArrayExtend:()=>Ms,cloneFunction:()=>rp,color:()=>Kh,colorStringToRgbaArray:()=>ue,components:()=>Bn,compositeOverBackdrop:()=>lo,concatAddExtends:()=>gp,contrastRatio:()=>ln,convertSvgToSymbol:()=>Ki,copyJavaScriptToClipboard:()=>Ah,copyStringToClipboard:()=>Eh,create:()=>kb,createAsync:()=>NP,createBasedOnType:()=>Vc,createComputed:()=>Pb,createConfig:()=>ji,createDefine:()=>j0,createEffect:()=>Z,createElement:()=>Ip,createElementExtends:()=>Rc,createExtends:()=>Ns,createExtendsFromKeys:()=>Go,createExtendsStack:()=>$c,createHTMLNode:()=>Cn,createIfConditionFlag:()=>op,createInheritedState:()=>$p,createKey:()=>$s,createNestedObject:()=>Bd,createNestedObjectByKeyPath:()=>Mp,createObjectWithoutPrototype:()=>kc,createParent:()=>zc,createPath:()=>Wc,createProps:()=>Ws,createPropsStack:()=>Bc,createRoot:()=>Pp,createScope:()=>jp,createScopeStore:()=>mc,createSignal:()=>hs,createSkeleton:()=>BP,createSnapshotId:()=>Ds,createState:()=>nm,createStore:()=>Ge,createSync:()=>jP,css:()=>be,cssMediaVars:()=>Ml,cssVars:()=>Ll,customDecodeURIComponent:()=>Od,customEncodeURIComponent:()=>Td,cutArrayAfterValue:()=>gd,cutArrayBeforeValue:()=>hd,debounce:()=>Ls,debounceOnContext:()=>Qd,decodeNewlines:()=>Ad,deepClone:()=>dt,deepContains:()=>Nd,deepDefaults:()=>ki,deepDestringifyFunctions:()=>ce,deepExtend:()=>Oc,deepMerge:()=>st,deepMergeExtends:()=>Ne,deepStringifyFunctions:()=>Ts,defaultDefine:()=>zn,defineResolvedThemeSignal:()=>hn,defineSetter:()=>oh,defineThemeSignal:()=>pn,destringifyGlobalScope:()=>Rs,destroy:()=>Pa,detectHeightOnInit:()=>dh,detectInfiniteLoop:()=>zd,detectTag:()=>Pr,devices:()=>eg,dispose:()=>Fr,encodeNewlines:()=>Ed,error:()=>so,excludeKeysFromObject:()=>qd,exec:()=>ft,executeAttr:()=>rT,exetuteClassPerComponent:()=>IT,extendCachedRegistry:()=>mp,extendStackRegistry:()=>js,extractArrayExtend:()=>Us,extractConditionalAttrs:()=>sT,fetchLibraryData:()=>ml,fibonacciNumberByIndex:()=>ph,filterArrays:()=>xd,filterArraysFast:()=>wd,filterAttributesByTagName:()=>eT,finalizeExtends:()=>Lc,findClosestNumber:()=>gl,findClosestNumberInFactory:()=>kh,findHeadingLetter:()=>Bl,findHeadings:()=>Wi,findInheritedState:()=>Jc,findKeyPosition:()=>vd,flattenExtend:()=>Yo,font:()=>Uh,fontFace:()=>zh,fontFamily:()=>Vh,fontFamilyTypes:()=>Hh,formatDate:()=>uh,generateHash:()=>Ec,generateHeadArrayTags:()=>hl,generateKey:()=>Is,generateMetaTags:()=>wh,generateSequence:()=>Yt,generateSequencePosition:()=>dg,generateSprite:()=>gn,generateSubSequence:()=>Hi,get:()=>th,getActiveConfig:()=>C,getActiveDocument:()=>of,getActiveLang:()=>qn,getCDNDirUrl:()=>dl,getCDNUrl:()=>Ce,getCacheSize:()=>Og,getCapitalCaseKeys:()=>wp,getCdnProviderFromConfig:()=>tn,getChildStateInKey:()=>Xc,getChildren:()=>ai,getColor:()=>et,getColorShade:()=>kl,getContext:()=>hi,getCookie:()=>cp,getDB:()=>_i,getDefaultOrFirstKey:()=>fo,getEmitStats:()=>nf,getEmotionStylesheet:()=>Ph,getExtendsInElement:()=>_p,getExtendsStack:()=>Fs,getExtendsStackRegistry:()=>Tc,getFnPrefixAndValue:()=>rr,getFontFace:()=>jh,getFontFaceEach:()=>uo,getFontFaceEachString:()=>Pl,getFontFaceString:()=>Li,getFontFamily:()=>oa,getFontFormat:()=>Ol,getFontSizeByKey:()=>sa,getFrequencyInArray:()=>ud,getHashedExtend:()=>Bs,getImportMapScript:()=>fh,getInObjectByPath:()=>Hd,getLanguages:()=>$a,getLocalStateLang:()=>ja,getLocalStorage:()=>fp,getMediaColor:()=>It,getMediaTheme:()=>ge,getNev:()=>Jd,getObserver:()=>gc,getPageMetadata:()=>Sh,getParentStateInKey:()=>Yc,getPath:()=>ci,getQuery:()=>xi,getRef:()=>rh,getResolvedThemeSignal:()=>X_,getRgbTone:()=>Ue,getRoot:()=>ui,getRootContext:()=>pi,getRootData:()=>di,getRootState:()=>fi,getRootStateInKey:()=>Gc,getSafeInk:()=>Vl,getSafeInkInfo:()=>hg,getSequenceValue:()=>zi,getSequenceValueBySymbols:()=>jl,getSequenceValuePropertyPair:()=>He,getShadow:()=>Ji,getShapeByKey:()=>ia,getSignals:()=>Db,getSpacingBasedOnRatio:()=>Ae,getSpacingByKey:()=>St,getSpreadChildren:()=>Sp,getSubratio:()=>Vi,getSubratioDifference:()=>Ui,getSystemGlobalTheme:()=>_e,getTheme:()=>Qi,getThemeSignal:()=>Y_,getTimingByKey:()=>re,getTimingFunction:()=>me,global:()=>ad,gradient:()=>Gh,grid:()=>ig,hasFunction:()=>Fe,hasHandlerPlugin:()=>zo,hasOwnProperty:()=>Ld,hashContent:()=>on,hexToRgb:()=>Dh,hexToRgbArray:()=>_l,hexToRgba:()=>Lh,hslToRgb:()=>Sl,icons:()=>Jh,inheritChildExtends:()=>Ic,inheritChildPropsExtends:()=>Pc,inheritParentProps:()=>qs,inheritRecursiveChildExtends:()=>Dc,init:()=>cr,initPolyglot:()=>Mf,initProps:()=>Tp,injectGlobal:()=>kt,is:()=>zt,isArray:()=>O,isBoolean:()=>bc,isCSSVar:()=>mt,isContextComponent:()=>kp,isCyclic:()=>Wd,isDOMNode:()=>Ht,isDate:()=>xc,isDefined:()=>bt,isDevelopment:()=>_r,isDomDocument:()=>Ye,isEmpty:()=>wc,isEmptyObject:()=>Md,isEnumeratedTrueFalseAttr:()=>sr,isEqualDeep:()=>Sc,isFunction:()=>A,isGoogleFontsUrl:()=>fn,isHostObject:()=>Xe,isHtmlElement:()=>ys,isLocal:()=>Xd,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>en,isMethod:()=>ih,isMobile:()=>ip,isNode:()=>Je,isNot:()=>ld,isNotProduction:()=>ro,isNull:()=>_c,isNumber:()=>Me,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>hh,isProduction:()=>br,isRawUnitValue:()=>gs,isResolvedColor:()=>Ee,isScalingUnit:()=>Xr,isStaging:()=>Yd,isState:()=>Lp,isStore:()=>yt,isString:()=>w,isStringFunction:()=>ep,isSvgTag:()=>An,isTest:()=>Cc,isTesting:()=>Gd,isTracking:()=>im,isUndefined:()=>Tt,isUniversallyReservedKey:()=>ch,isUnresolvableDependency:()=>io,isValidHtmlTag:()=>dp,isValidTag:()=>vn,isWasmLoaded:()=>C0,isWrappedLibrary:()=>Ci,isWritableFamilyBucket:()=>id,joinArrays:()=>jo,jointStacks:()=>yp,keyframes:()=>kn,keys:()=>ll,linearChannelToSrgb:()=>El,loadCssFile:()=>bh,loadJavascript:()=>_h,loadJavascriptFile:()=>gh,loadJavascriptFileEmbedSync:()=>yh,loadJavascriptFileSync:()=>mh,loadRemoteCSS:()=>xh,loadRemoteScript:()=>rn,loadTranslations:()=>Ma,loadWasm:()=>v0,log:()=>nh,logGroupIf:()=>sp,logIf:()=>np,lookdown:()=>Zp,lookdownAll:()=>Qp,lookup:()=>Jp,lowercaseFirstLetter:()=>Zr,makeObjectWithoutPrototype:()=>Fd,map:()=>Id,mapStringsWithContextComponents:()=>Vs,matchesComponentNaming:()=>je,media:()=>Wh,memoize:()=>tp,merge:()=>gt,mergeSharedLibraries:()=>Ei,mixTwoColors:()=>Ih,mixTwoRgb:()=>Mh,mixTwoRgba:()=>vl,nextElement:()=>mi,normalizeIgnoreList:()=>vi,normalizeLibraryKey:()=>nn,numToLetterMap:()=>Ve,objectToString:()=>Os,objectizeStringProperty:()=>Hs,oklabToLinearSrgb:()=>Al,oklabToOklch:()=>Ii,oklchToGamutSafeSrgb:()=>Di,oklchToOklab:()=>Tl,opacify:()=>cn,overwrite:()=>Ps,overwriteDeep:()=>Wt,overwriteShallow:()=>eo,overwriteState:()=>Np,parkHostObject:()=>gr,parse:()=>fl,parseColorToken:()=>Gt,parseDeep:()=>si,pickupElementFromProps:()=>Nc,pickupPropsFromElement:()=>Fc,polyglotFunctions:()=>Ya,polyglotPlugin:()=>Kn,popConfig:()=>tt,popStaticCssPass:()=>Gg,previousElement:()=>yi,propExists:()=>Ep,propertizeElement:()=>jc,propertizeUpdate:()=>Cp,pushConfig:()=>it,pushStaticCssPass:()=>Kg,refreshContextProto:()=>gf,registerEvent:()=>On,registerHostPackages:()=>Lk,registerSignalInstance:()=>Lo,reinit:()=>ly,relativeLuminance:()=>co,remove:()=>Dn,removeChars:()=>Th,removeCookie:()=>lp,removeDelegatedEvent:()=>ma,removeDuplicateProps:()=>Gs,removeDuplicatesInArray:()=>Bo,removeFromArray:()=>dd,removeFromObject:()=>jd,removeNestedKeyByPath:()=>Ud,removeValueFromArray:()=>ws,removeValueFromArrayAll:()=>md,reorderArrayByValues:()=>bd,replaceLiteralsWithObjectFields:()=>Jr,replaceOctalEscapeSequences:()=>Cd,resetEmitStats:()=>Eg,resolveAsset:()=>Kt,resolveBorderValue:()=>ee,resolveColorRgb:()=>ho,resolveColorsInGradient:()=>da,resolveConfigDocument:()=>Fo,resolveFileSource:()=>Mg,resolveFileUrl:()=>de,resolveHandler:()=>Wo,resolvePropValue:()=>$r,resolveShadowValue:()=>go,resolveSharedLibraries:()=>Ch,returnSubThemeOrDefault:()=>Nh,returnValueAsText:()=>Uc,rgbArrayToHex:()=>xl,rgbToHSL:()=>wl,rgbToHex:()=>$h,runPluginHook:()=>At,runThroughMedia:()=>zl,scratchDefaultConfig:()=>dn,scratchSystem:()=>_n,scratchUtils:()=>Ar,self:()=>cd,semanticIcons:()=>Zh,sequence:()=>er,serializeAttrValue:()=>We,set:()=>bo,setActiveConfig:()=>Fl,setActiveDocument:()=>Cg,setActiveRootState:()=>li,setAdaptiveSchemeVar:()=>Or,setClass:()=>U1,setClassname:()=>DT,setColor:()=>Tr,setCookie:()=>ap,setCssEngineHook:()=>Pf,setCustomFont:()=>$i,setCustomFontMedia:()=>Cr,setEach:()=>wg,setFont:()=>ra,setFontFamily:()=>yn,setFontImport:()=>un,setGradient:()=>mn,setHashedExtend:()=>Ac,setInCustomFontMedia:()=>Rl,setInObjectByPath:()=>Vd,setLang:()=>Fa,setLocalStorage:()=>up,setMediaTheme:()=>ea,setNodeStyles:()=>cl,setObserver:()=>Ib,setProps:()=>eh,setPropsPrototype:()=>Ks,setSVG:()=>bn,setScalingVar:()=>Bi,setShadow:()=>Rr,setSubScalingVar:()=>Nl,setSvgIcon:()=>mo,setTheme:()=>ta,setValue:()=>xg,setVariables:()=>pg,setWasmEngine:()=>ha,shadow:()=>Xh,shape:()=>fg,sharedLibrary:()=>vh,sizes:()=>lg,spacing:()=>qh,splitPackageSpecifier:()=>wi,splitSpacedValue:()=>Xi,splitTopLevelCommas:()=>tr,splitTransition:()=>Xl,spotByPath:()=>ii,srcsetFor:()=>sn,srgbChannelToLinear:()=>Cl,srgbToOklab:()=>Pi,stringIncludesAny:()=>vs,stringToObject:()=>$d,stripVersionRangePrefix:()=>Si,svg:()=>og,svgData:()=>ng,swapItemsInArray:()=>pd,syncProps:()=>Ys,templates:()=>sg,theme:()=>Yh,timing:()=>Qh,toCamel:()=>Ni,toCamelCase:()=>Ai,toDashCase:()=>Ti,toDescriptionCase:()=>Rh,toLinearChannel:()=>an,toTitleCase:()=>Oh,toggleFullscreen:()=>lh,transformBackgroundImage:()=>Gl,transformBorder:()=>ze,transformBorderRadius:()=>nr,transformBoxShadow:()=>ua,transformClassname:()=>zx,transformDuration:()=>pa,transformShadow:()=>Kl,transformSize:()=>_t,transformSizeRatio:()=>N,transformTextStroke:()=>ql,transformTransition:()=>_g,transformersByPrefix:()=>tm,transfromGap:()=>Yl,translate:()=>La,triggerEventOn:()=>xr,triggerEventOnUpdate:()=>Bp,trimStringFromSymbols:()=>kd,typography:()=>Mi,unit:()=>Bh,unstackArrayOfObjects:()=>xs,update:()=>Pn,updateProps:()=>Op,updateVars:()=>B1,upsertTranslation:()=>Na,useCssInProps:()=>se,useHostState:()=>sm,usePropsAsCSS:()=>Vx,useSelectorsAsCSS:()=>Hx,variables:()=>bi,vars:()=>cg,verbose:()=>Jo,warn:()=>gi,warnStateKeyShadowsMethod:()=>yc,window:()=>v,wrapHoverRule:()=>Te});module.exports=SC(vb);var sd={};P(sd,{RESERVED_STORE_METHODS:()=>Lb,SIGNAL_ENGINE_KEY:()=>Mo,SIGNAL_INSTANCES_KEY:()=>$o,STORE_METHOD_NAMES:()=>$b,VERSION:()=>Fb,__resetSignalEngine:()=>nd,__resetSignalInstances:()=>od,__resetStateShadowWarnings:()=>Mb,batch:()=>hc,createComputed:()=>Pb,createEffect:()=>Z,createScopeStore:()=>mc,createSignal:()=>hs,createStore:()=>Ge,getObserver:()=>gc,getSignals:()=>Db,isStore:()=>yt,registerSignalInstance:()=>Lo,setObserver:()=>Ib,warnStateKeyShadowsMethod:()=>yc});var Yu={};P(Yu,{WRITE_JOURNAL:()=>fs,batch:()=>ds,createComputed:()=>vC,createEffect:()=>CC,createSignal:()=>$e,getObserver:()=>Ku,journalWrite:()=>us,setObserver:()=>kC});var Vt=null,ac=0,cc=[],Ku=()=>Vt,kC=t=>{Vt=t},lc=0,Hu=[];function $e(t){let e=new Set;function r(){return Vt&&(e.add(Vt),Vt._sources.add(s)),t}function o(i){i!==t&&(t=i,PC(e))}function n(){return t}let s={get:r,set:o,peek:n,_subscribers:e,_type:"signal"};return s}function vC(t){let e,r=!0,o=new Set,n={_sources:new Set,_type:"computed",_subscribers:o,_execute(){qu(n);let s=Vt;Vt=n;try{e=t(),r=!1}finally{Vt=s}},_notify(){r=!0,o.size>0&&Ob(o)},get(){return Vt&&(o.add(Vt),Vt._sources.add(n)),r&&n._execute(),e},peek(){return r&&n._execute(),e}};return n._execute(),n}var Se=new Set,zu=!1,fs=[];function us(t){fs.push(t),fs.length>32&&fs.shift()}function CC(t,e){let r=e?.depth??0,o={_sources:new Set,_type:"effect",_depth:r,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(o._disposed)return;qu(o);let n=Vt;Vt=o;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Vt=n}},_notify(){o._disposed||(ac>0?cc.push(o):lc>0?Hu.push(o):Gu(o))},dispose(){o._disposed=!0,qu(o)}};return o._execute(),o}function ds(t){ac++;try{t()}finally{ac--,ac===0&&RC()}}var Wu=!1,Eb=1e3,EC=8,AC=256,TC=4;function Ab(){return typeof performance<"u"?performance.now():Date.now()}function Gu(t){Se.add(t),!Wu&&(zu||(zu=!0,queueMicrotask(Tb)))}var Do=[];function OC(){if(Se.size===1){let[e]=Se;return Se.clear(),e._disposed?0:(e._execute(),1)}Do.length=0;for(let e of Se)Do.push(e);Se.clear(),Do.sort((e,r)=>e._depth-r._depth);let t=0;for(let e=0;e<Do.length;e++){let r=Do[e];r._disposed||(r._execute(),t++)}return Do.length=0,t}function Tb(t=0,e=0){if(zu=!1,Se.size===0)return;Wu=!0;let r=Ab(),o=!1;try{for(;Se.size>0;){if(++t>Eb){let n=new Map;for(let c of Se){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",n.set(l,(n.get(l)||0)+1),n.size>=12)break}let s=[...n.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of fs)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",Eb,"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>"),Se.clear();break}if(e+=OC(),Se.size>0&&(e>=AC||t>=TC)&&Ab()-r>EC){o=!0,setTimeout(()=>Tb(t,e),0);break}}}finally{o||(Wu=!1)}}function RC(){for(let t=0;t<cc.length;t++)Gu(cc[t]);cc.length=0}function Ob(t){lc++;try{for(let e of t)e._notify()}finally{if(lc--,lc===0&&Hu.length>0){let e=Hu.splice(0);for(let r=0;r<e.length;r++)Gu(e[r])}}}function PC(t){Ob(t)}function qu(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var rd={};P(rd,{RESERVED_STORE_METHODS:()=>ps,STORE_METHOD_NAMES:()=>ed,__resetStateShadowWarnings:()=>IC,createScopeStore:()=>MC,createStore:()=>fc,getSignals:()=>LC,isStore:()=>$C,warnStateKeyShadowsMethod:()=>td});var Le=Symbol("store"),uc=Symbol("signals"),ed=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],ps=new Set(ed),Qu=new Set,Xu=(t,e)=>t?t+"."+e:String(e);function td(t,e){let r=(e||"")+"::"+t;if(Qu.has(r))return;Qu.add(r);let o=e?`state.${e}`:"state",n=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${o}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${o}.${t}(\u2026)" no longer reaches the store method on this node. Use "${o}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${ed.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(n)}function IC(){Qu.clear()}var Ju=t=>!t||typeof t!="object"||Array.isArray(t)||t[Le]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!dc(t),DC=12,dc=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function pc(t,e,r){if(t===e)return!0;if(r>DC)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!pc(t[o],e[o],r+1))return!1;return!0}if(dc(t)&&dc(e)){let o=Object.keys(t),n=Object.keys(e);if(o.length!==n.length)return!1;for(let s of o)if(!Object.prototype.hasOwnProperty.call(e,s)||!pc(t[s],e[s],r+1))return!1;return!0}return!1}function fc(t,e,r,o){r===void 0&&(r=0),o===void 0&&(o="");let n={},s={},i=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let _ in t){if(_==="__proto__"||!Object.prototype.hasOwnProperty.call(t,_))continue;if(_.startsWith("__")){s[_]=t[_];continue}ps.has(_)&&td(_,o);let y=t[_];r<i&&y&&typeof y=="object"&&!Ju(y)?(s[_]=y,n[_]=$e(fc(y,e,r+1,Xu(o,_)))):(s[_]=y,n[_]=$e(y))}let a=new Proxy(s,{get(_,y){if(y===Le)return!0;if(y===uc)return n;if(y==="__raw")return _;if(y==="$update")return c;if(y==="$parse")return f;if(y==="$clean")return u;if(y==="$keys")return d;if(y==="$values")return h;if(y==="$replace")return g;if(y==="$add")return p;if(y==="$remove")return m;if(y==="$destroy")return b;if(y==="$quietUpdate")return l;if(ps.has(y)&&!Object.prototype.hasOwnProperty.call(n,y))switch(y){case"update":return c;case"parse":return f;case"clean":return u;case"keys":return d;case"values":return h;case"replace":return g;case"add":return p;case"remove":return m;case"destroy":return b;case"quietUpdate":return l}if(y==="__element")return _.__element;if(y==="parent")return _.parent;if(y==="root")return _.root;if(Object.prototype.hasOwnProperty.call(n,y)){let k=n[y].get();if(k!==void 0||!(y!=="root"&&_.root&&_.root!==a))return k}if(_[y]!==void 0)return _[y];let x=typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&Ku()!=null;if(y!=="root"&&_.root&&_.root!==a){let k=_.root[y];return k===void 0&&x&&!Object.prototype.hasOwnProperty.call(n,y)?(n[y]=$e(void 0),n[y].get()):k}if(x)return n[y]=$e(void 0),n[y].get()},set(_,y,x){if(y==="__proto__")return!1;if(y==="__element"||y==="parent"||y==="root"||typeof y=="string"&&y.startsWith("__")&&!Object.prototype.hasOwnProperty.call(n,y))return _[y]=x,!0;ps.has(y)&&td(y,o);let k=Xu(o,y);if(Object.prototype.hasOwnProperty.call(n,y))if(x&&typeof x=="object"&&!Ju(x)){if(x===_[y])return!0;let E=n[y].peek(),T=E&&E[Le]?E.$parse():E;if(pc(x,T,0))return!0;_[y]=x,us(k),n[y].set(fc(x,e,r+1,k))}else{if(Array.isArray(x)&&x!==_[y]&&Array.isArray(n[y].peek())&&pc(x,n[y].peek(),0))return!0;n[y].peek()!==x&&us(k),_[y]=x,n[y].set(x)}else _[y]=x,x&&typeof x=="object"&&!Ju(x)?n[y]=$e(fc(x,e,r+1,k)):n[y]=$e(x);return!0},has(_,y){return typeof y=="string"&&y.charCodeAt(0)===36&&ps.has(y.slice(1))?!0:y in n||y in _},ownKeys(_){return Object.keys(n)},getOwnPropertyDescriptor(_,y){return y in n?{enumerable:!0,configurable:!0,value:n[y].peek()}:Object.getOwnPropertyDescriptor(_,y)},deleteProperty(_,y){return n[y]&&(n[y].peek()!==void 0&&us(Xu(o,y)),n[y].set(void 0),delete n[y]),delete _[y],!0}});function c(_,y){ds(()=>{for(let k in _)k!=="__proto__"&&(a[k]=_[k])});let x=s.__element;return x&&x.onUpdate&&!y?.quiet&&x.onUpdate(x,a,x.context),a}function l(_){return c(_,{quiet:!0})}function f(_){if(_||(_=new Set),_.has(a))return"[Circular]";_.add(a);let y={};for(let x in n){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let k=n[x].peek();k&&k[Le]?y[x]=k.$parse(_):y[x]=k}return y}function u(){return ds(()=>{for(let _ in n)delete a[_]}),a}function d(){return Object.keys(n)}function h(){return Object.keys(n).map(_=>n[_].peek())}function g(_){return ds(()=>{for(let y in n)y in _||delete a[y];for(let y in _)y!=="__proto__"&&(a[y]=_[y])}),a}function p(_,y){let x=Object.prototype.hasOwnProperty.call(n,_)?n[_].peek():s[_];if(Array.isArray(x))return a[_]=[...x,y],a;if(x&&typeof x=="object"&&!Array.isArray(x)){if(dc(y))x[Le]?x.$update(y):a[_]={...x,...y};else{let k=String(Object.keys(x).length);x[Le]?x.$update({[k]:y}):a[_]={...x,[k]:y}}return a}return a[_]=y,a}function m(_){return delete a[_],a}function b(){u(),s.__element=null,s.parent=null}return a}function $C(t){return t&&t[Le]===!0}function LC(t){return t[uc]}function MC(t,e){let r={},o={};if(t&&typeof t=="object")for(let i in t)o[i]=t[i],r[i]=$e(t[i]);let n=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let a=e;for(;a;){let c=a[uc];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[Le]?a[Zu]:null}return null};return new Proxy(o,{get(i,a){return a===Le?!0:a===uc?r:a===Zu?e:a==="__raw"?i:Object.prototype.hasOwnProperty.call(r,a)?r[a].get():e&&a!=="then"&&a!=="constructor"?e[a]:i[a]},set(i,a,c){let l=n(a);return l?(l===r&&(i[a]=c),l[a].set(c),!0):(i[a]=c,r[a]=$e(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[Le]?c[Zu]: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 Zu=Symbol("scope.parent");var Yr="3.14.781";var $o="__SMBLS_SIGNAL_INSTANCES__",Lo=(t,e,r)=>{let o=e||(typeof globalThis<"u"?globalThis:null);if(!o)return null;let n=o[$o]||(o[$o]={versions:[],engines:0,reported:!1});return typeof n.engines!="number"&&(n.engines=n.versions.length),n.versions.push(t||Yr),r||n.engines++,n.engines>1&&!n.reported&&(n.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",n.engines,"copies of the reactive engine are loaded on this page:",n.versions.join(", ")+".","Each copy keeps its own observer and effect queue, so an effect created","by one copy never re-fires from another copy's store writes, and one","copy's cascade breaker cannot see the other's queue.","Copies of the SAME version adopt a single engine automatically, so","this means the versions above DIFFER: a fossil copy is resolving beside","the current one. That is a dependency-graph fault, not an application","bug \u2014 align the version wherever @symbo.ls/signal is imported, then","regenerate the lockfile so exactly one version resolves.")),n},od=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[$o]};var Mo="__SMBLS_SIGNAL_ENGINE__",Rb=(t,e,r)=>{let o=e||Yr,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[Mo];return s&&s.engine&&s.version===o?(Lo(o,n,!0),s.engine):(s||(n[Mo]={version:o,engine:t}),Lo(o,n,!1),t)},nd=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Mo]};var Mt=Rb({...Yu,...rd,VERSION:Yr},Yr),hs=Mt.createSignal,Pb=Mt.createComputed,Z=Mt.createEffect,hc=Mt.batch,gc=Mt.getObserver,Ib=Mt.setObserver,Ge=Mt.createStore,mc=Mt.createScopeStore,yt=Mt.isStore,Db=Mt.getSignals,$b=Mt.STORE_METHOD_NAMES,Lb=Mt.RESERVED_STORE_METHODS,yc=Mt.warnStateKeyShadowsMethod,Mb=Mt.__resetStateShadowWarnings,Fb=Mt.VERSION;var Rg={};P(Rg,{assertEmitIntegrity:()=>Ag,css:()=>be,getActiveDocument:()=>of,getCacheSize:()=>Og,getEmitStats:()=>nf,injectGlobal:()=>kt,keyframes:()=>kn,reset:()=>vx,resetEmitStats:()=>Eg,setActiveDocument:()=>Cg,setWasmEngine:()=>ha,wrapHoverRule:()=>Te});var Sg={};P(Sg,{CONFIG:()=>po,CSS_NAMED_COLOR_HEX:()=>bl,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_UNITS:()=>No,FACTORY:()=>pe,STANDARD_SCHEME_QUERIES:()=>Ul,VALUE_TRANSFORMERS:()=>Jl,activateConfig:()=>J_,animation:()=>rg,appendSVGSprite:()=>la,appendSvgIconsSprite:()=>yo,applyDocument:()=>ca,applyHeadings:()=>Wl,applyMediaSequenceVars:()=>Er,applyReset:()=>fa,applySequenceGlobalVars:()=>qi,applySequenceVars:()=>or,applySpacingSequence:()=>Yi,applyTimingSequence:()=>aa,applyTypographySequence:()=>na,breakpoints:()=>tg,changeGlobalTheme:()=>Zl,changeLightness:()=>Fh,checkIfBoxSize:()=>Gi,class:()=>ag,color:()=>Kh,colorStringToRgbaArray:()=>ue,compositeOverBackdrop:()=>lo,contrastRatio:()=>ln,convertSvgToSymbol:()=>Ki,createConfig:()=>ji,cssMediaVars:()=>Ml,cssVars:()=>Ll,defineResolvedThemeSignal:()=>hn,defineThemeSignal:()=>pn,devices:()=>eg,document:()=>K_,findHeadingLetter:()=>Bl,findHeadings:()=>Wi,font:()=>Uh,fontFace:()=>zh,fontFamily:()=>Vh,fontFamilyTypes:()=>Hh,generateSequence:()=>Yt,generateSequencePosition:()=>dg,generateSprite:()=>gn,generateSubSequence:()=>Hi,getActiveConfig:()=>C,getColor:()=>et,getColorShade:()=>kl,getDefaultOrFirstKey:()=>fo,getFnPrefixAndValue:()=>rr,getFontFace:()=>jh,getFontFaceEach:()=>uo,getFontFaceEachString:()=>Pl,getFontFaceString:()=>Li,getFontFamily:()=>oa,getFontFormat:()=>Ol,getFontSizeByKey:()=>sa,getMediaColor:()=>It,getMediaTheme:()=>ge,getResolvedThemeSignal:()=>X_,getRgbTone:()=>Ue,getSafeInk:()=>Vl,getSafeInkInfo:()=>hg,getSequenceValue:()=>zi,getSequenceValueBySymbols:()=>jl,getSequenceValuePropertyPair:()=>He,getShadow:()=>Ji,getShapeByKey:()=>ia,getSpacingBasedOnRatio:()=>Ae,getSpacingByKey:()=>St,getSubratio:()=>Vi,getSubratioDifference:()=>Ui,getTheme:()=>Qi,getThemeSignal:()=>Y_,getTimingByKey:()=>re,getTimingFunction:()=>me,gradient:()=>Gh,grid:()=>ig,hexToRgb:()=>Dh,hexToRgbArray:()=>_l,hexToRgba:()=>Lh,hslToRgb:()=>Sl,icons:()=>Jh,isCSSVar:()=>mt,isDomDocument:()=>Ye,isGoogleFontsUrl:()=>fn,isHostObject:()=>Xe,isRawUnitValue:()=>gs,isResolvedColor:()=>Ee,isScalingUnit:()=>Xr,isWritableFamilyBucket:()=>id,linearChannelToSrgb:()=>El,media:()=>Wh,mixTwoColors:()=>Ih,mixTwoRgb:()=>Mh,mixTwoRgba:()=>vl,numToLetterMap:()=>Ve,oklabToLinearSrgb:()=>Al,oklabToOklch:()=>Ii,oklchToGamutSafeSrgb:()=>Di,oklchToOklab:()=>Tl,opacify:()=>cn,parkHostObject:()=>gr,parseColorToken:()=>Gt,popConfig:()=>tt,pushConfig:()=>it,relativeLuminance:()=>co,reset:()=>G_,resolveBorderValue:()=>ee,resolveColorRgb:()=>ho,resolveColorsInGradient:()=>da,resolveConfigDocument:()=>Fo,resolveFileUrl:()=>de,resolveShadowValue:()=>go,returnSubThemeOrDefault:()=>Nh,rgbArrayToHex:()=>xl,rgbToHSL:()=>wl,rgbToHex:()=>$h,runThroughMedia:()=>zl,scratchDefaultConfig:()=>dn,scratchSystem:()=>_n,scratchUtils:()=>Ar,semanticIcons:()=>Zh,sequence:()=>er,set:()=>bo,setActiveConfig:()=>Fl,setAdaptiveSchemeVar:()=>Or,setColor:()=>Tr,setCustomFont:()=>$i,setCustomFontMedia:()=>Cr,setEach:()=>wg,setFont:()=>ra,setFontFamily:()=>yn,setFontImport:()=>un,setGradient:()=>mn,setInCustomFontMedia:()=>Rl,setMediaTheme:()=>ea,setSVG:()=>bn,setScalingVar:()=>Bi,setShadow:()=>Rr,setSubScalingVar:()=>Nl,setSvgIcon:()=>mo,setTheme:()=>ta,setValue:()=>xg,setVariables:()=>pg,shadow:()=>Xh,shape:()=>fg,sizes:()=>lg,spacing:()=>qh,splitSpacedValue:()=>Xi,splitTopLevelCommas:()=>tr,splitTransition:()=>Xl,srgbChannelToLinear:()=>Cl,srgbToOklab:()=>Pi,svg:()=>og,svgData:()=>ng,templates:()=>sg,theme:()=>Yh,timing:()=>Qh,toCamel:()=>Ni,toLinearChannel:()=>an,transformBackgroundImage:()=>Gl,transformBorder:()=>ze,transformBorderRadius:()=>nr,transformBoxShadow:()=>ua,transformDuration:()=>pa,transformShadow:()=>Kl,transformSize:()=>_t,transformSizeRatio:()=>N,transformTextStroke:()=>ql,transformTransition:()=>_g,transfromGap:()=>Yl,typography:()=>Mi,unit:()=>Bh,vars:()=>cg});var Ar={};P(Ar,{CSS_NAMED_COLOR_HEX:()=>bl,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_UNITS:()=>No,applyMediaSequenceVars:()=>Er,applySequenceGlobalVars:()=>qi,applySequenceVars:()=>or,changeLightness:()=>Fh,colorStringToRgbaArray:()=>ue,compositeOverBackdrop:()=>lo,contrastRatio:()=>ln,convertSvgToSymbol:()=>Ki,findHeadingLetter:()=>Bl,findHeadings:()=>Wi,generateSequence:()=>Yt,generateSequencePosition:()=>dg,generateSprite:()=>gn,generateSubSequence:()=>Hi,getColorShade:()=>kl,getDefaultOrFirstKey:()=>fo,getFnPrefixAndValue:()=>rr,getFontFace:()=>jh,getFontFaceEach:()=>uo,getFontFaceEachString:()=>Pl,getFontFaceString:()=>Li,getFontFormat:()=>Ol,getRgbTone:()=>Ue,getSequenceValue:()=>zi,getSequenceValueBySymbols:()=>jl,getSequenceValuePropertyPair:()=>He,getSubratio:()=>Vi,getSubratioDifference:()=>Ui,hexToRgb:()=>Dh,hexToRgbArray:()=>_l,hexToRgba:()=>Lh,hslToRgb:()=>Sl,isCSSVar:()=>mt,isDomDocument:()=>Ye,isGoogleFontsUrl:()=>fn,isHostObject:()=>Xe,isRawUnitValue:()=>gs,isResolvedColor:()=>Ee,isScalingUnit:()=>Xr,isWritableFamilyBucket:()=>id,linearChannelToSrgb:()=>El,mixTwoColors:()=>Ih,mixTwoRgb:()=>Mh,mixTwoRgba:()=>vl,numToLetterMap:()=>Ve,oklabToLinearSrgb:()=>Al,oklabToOklch:()=>Ii,oklchToGamutSafeSrgb:()=>Di,oklchToOklab:()=>Tl,opacify:()=>cn,parkHostObject:()=>gr,parseColorToken:()=>Gt,relativeLuminance:()=>co,resolveConfigDocument:()=>Fo,resolveFileUrl:()=>de,returnSubThemeOrDefault:()=>Nh,rgbArrayToHex:()=>xl,rgbToHSL:()=>wl,rgbToHex:()=>$h,setCustomFont:()=>$i,setCustomFontMedia:()=>Cr,setFontImport:()=>un,setInCustomFontMedia:()=>Rl,setScalingVar:()=>Bi,setSubScalingVar:()=>Nl,setVariables:()=>pg,splitTopLevelCommas:()=>tr,srgbChannelToLinear:()=>Cl,srgbToOklab:()=>Pi,toLinearChannel:()=>an});var Ye=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),Xe=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)},id=t=>t!==null&&typeof t=="object"&&!Xe(t),gr=(t,e,r)=>{if(!t)return;if(Ye(r)){t.__domDocument||(t.__domDocument=r);return}let o=`__host_${e}`;t[o]||(t[o]=r)},Fo=t=>t?Ye(t.__domDocument)?t.__domDocument:Ye(t.document)?t.document:null:null;var Xr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",No=["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"],FC=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),NC=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${No.filter(t=>t!=="auto").map(FC).join("|")})$`),gs=t=>NC.test(String(t).trim());R();var bl={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},ue=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=bl[t.toLowerCase()];if(e&&(t=e),t[0]==="#")return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(t.indexOf("rgb")===-1&&Q&&v){let r=Q.body.appendChild(Q.createElement("fictum")),o="rgb(1, 2, 3)";if(r.style.color=o,r.style.color!==o){Q.body.removeChild(r);return}if(r.style.color=t,r.style.color===o||r.style.color==="")return Q.body.removeChild(r),[0,0,0,0];t=v.getComputedStyle(r).color,Q.body.removeChild(r)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(r=>+r)):[0,0,0,0]},Ih=(t,e,r=.5)=>(t=ue(t),e=ue(e),vl(t,e,r)),Dh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${o},${n})`},_l=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,o,n]},$h=(t,e,r)=>"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1),xl=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1),Lh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${r},${o},${n},${e})`},Mh=(t,e,r=.5)=>{let o=[];for(let n=0;n<3;n++)o[n]=~~(t[n]+(e[n]-t[n])*r);return`rgb(${o})`},Fh=(t,e)=>{let[r,o,n]=e,s=Math.max(0,Math.min(100,n+parseFloat(t)));return[r,o,s]},wl=(t,e,r)=>{let o=Math.max(t,e,r),n=o-Math.min(t,e,r),s=1-Math.abs(o+o-n-1),i=n&&(o==t?(e-r)/n:o==e?2+(r-t)/n:4+(t-e)/n);return[60*(i<0?i+6:i),s?n/s:0,(o+o-n)/2]},Sl=(t,e,r,o=e*Math.min(r,1-r),n=(s,i=(s+t/30)%12)=>r-o*Math.max(Math.min(i-3,9-i,1),-1))=>[n(0),n(8),n(4)],kl=(t,e)=>{let r=parseInt(t,16),o=(r>>16)+e;o>255?o=255:o<0&&(o=0);let n=(r>>8&255)+e;n>255?n=255:n<0&&(n=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|n<<8|o<<16)+16777216).toString(16).slice(1)},vl=(t,e,r=.5)=>{let o=[];for(let n=0;n<4;n++){let s=n===3?i=>i:Math.round;o[n]=s(t[n]+(e[n]-t[n])*r)}return`rgba(${o})`},cn=(t,e)=>{let r=ue(t);if(!r){ro()&&console.warn(t+" color is not rgba");return}return r[3]=e,`rgba(${r})`},mt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,te=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,WE=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Gt=t=>{if(!w(t))return null;if(te.test(t))return{passthrough:t};if(mt(t))return{cssVar:t};let e=t.match(WE);if(!e)return null;let[,r,o,n]=e,s=o!==void 0?`0.${o}`:void 0,i=n&&n[0]==="="?n.slice(1):n;return{name:r,alpha:s,tone:i}},Ee=t=>w(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),tr=t=>{let e=[],r="",o=0;for(let n of t){if(n==="("?o+=1:n===")"&&o>0&&(o-=1),n===","&&o===0){e.push(r),r="";continue}r+=n}return(r.length||!e.length)&&e.push(r),e},an=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),co=t=>.2126*an(t[0])+.7152*an(t[1])+.0722*an(t[2]),ln=(t,e)=>{let r=co(t)+.05,o=co(e)+.05;return r>o?r/o:o/r},Cl=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),El=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,Pi=([t,e,r])=>{let[o,n,s]=[t,e,r].map(Cl),i=.4122214708*o+.5363325363*n+.0514459929*s,a=.2119034982*o+.6806995451*n+.1073969566*s,c=.0883024619*o+.2817188376*n+.6299787005*s,l=Math.cbrt(i),f=Math.cbrt(a),u=Math.cbrt(c);return[.2104542553*l+.793617785*f-.0040720468*u,1.9779984951*l-2.428592205*f+.4505937099*u,.0259040371*l+.7827717662*f-.808675766*u]},Al=([t,e,r])=>{let o=t+.3963377774*e+.2158037573*r,n=t-.1055613458*e-.0638541728*r,s=t-.0894841775*e-1.291485548*r,i=o**3,a=n**3,c=s**3;return[4.0767416621*i-3.3077115913*a+.2309699292*c,-1.2684380046*i+2.6097574011*a-.3413193965*c,-.0041960863*i-.7034186147*a+1.707614701*c]},Ii=([t,e,r])=>{let o=Math.atan2(r,e)*180/Math.PI;return o<0&&(o+=360),[t,Math.sqrt(e*e+r*r),o]},Tl=([t,e,r])=>{let o=r*Math.PI/180;return[t,e*Math.cos(o),e*Math.sin(o)]},Di=(t,e,r,o=24)=>{let n=a=>Al(Tl([t,a,r])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=n(e);if(!s(i)){let a=0,c=e;for(let l=0;l<o;l++){let f=(a+c)/2;s(n(f))?a=f:c=f}i=n(a)}return i.map(a=>El(Math.max(0,Math.min(1,a))))},lo=(t,e=1,r=[255,255,255])=>e>=1?t:t.map((o,n)=>o*e+r[n]*(1-e)),Ue=(t,e)=>{w(t)&&t.includes("rgb")&&(t=ue(t).join(", ")),w(t)&&(t=t.split(",").map(n=>parseFloat(n.trim()))),Me(e)&&(e+="");let r=xl(t),o=e.slice(0,1);if(o==="-"||o==="+"){let n=kl(r,parseFloat(e));return _l(n).join(", ")}else{let[n,s,i]=t,[a,c]=wl(n/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return Sl(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var Nh=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var de=(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},fo=(t,e)=>{if(t[e])return t[e].value;let r=()=>Object.keys(t).find(n=>n!=="default"&&t[n]&&t[n].value&&!t[n].isSystemFallback);if(t.default){let n=t[t.default];if(n&&n.isSystemFallback){let s=r();if(s)return t[s].value}if(n)return n.value}let o=r()||Object.keys(t).find(n=>n!=="default"&&t[n]&&t[n].value);return o&&t[o]&&t[o].value},Ol=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},fn=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),un=t=>`@import url('${t}');`,Rl=t=>`@font-face { ${t} }`,$i=(t,e,r,o={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=Ol(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
|
|
33
33
|
`);return`
|
|
34
34
|
font-family: '${t}';
|
|
35
35
|
font-style: ${o.fontStyle||"normal"};${r?`
|
|
36
36
|
font-weight: ${r};`:""}${o.fontStretch?`
|
|
37
37
|
font-stretch: ${o.fontStretch};`:""}${o.fontDisplay?`
|
|
38
38
|
font-display: ${o.fontDisplay};`:""}
|
|
39
|
-
src: ${i};`},
|
|
40
|
-
}`,io=(t,e,r)=>Object.keys(e).map(n=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l}=e[n],f=Array.isArray(s)?s.map(u=>fe(u,r)||u):fe(s,r)||s;return Ei(t,f,i,{fontStyle:a,fontDisplay:c,fontStretch:l})}),ah=t=>Object.keys(t).map(r=>io(r,t[r].value)),vl=(t,e,r)=>{if(e&&e.isVariable){let s=fe(e.url,r)||e.url;return on(s)?nn(s):wr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap"})}if(e[0])return io(t,e,r).map(kl);let n=Array.isArray(e.url)?e.url.map(s=>fe(s,r)||s):fe(e.url,r)||e.url;return wr(t,n,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch})},Ai=(t,e)=>Object.keys(t).map(o=>vl(o,t[o].value,e));R();R();R();R();var sn={};P(sn,{animation:()=>vh,breakpoints:()=>Sh,class:()=>Oh,color:()=>gh,devices:()=>kh,document:()=>f_,font:()=>lh,fontFace:()=>dh,fontFamily:()=>fh,fontFamilyTypes:()=>uh,gradient:()=>mh,grid:()=>Th,icons:()=>_h,media:()=>ph,reset:()=>u_,semanticIcons:()=>xh,sequence:()=>Qe,shadow:()=>bh,shape:()=>Ih,sizes:()=>Ph,spacing:()=>hh,svg:()=>Ch,svgData:()=>Eh,templates:()=>Ah,theme:()=>yh,timing:()=>wh,typography:()=>Ti,unit:()=>ch,vars:()=>Rh});var Qe={"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 ch={default:"em"};var AE={browserDefault:16,base:16,type:"font-size",ratio:Qe["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Ti=AE;var lh={};var fh={},uh={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},dh={};var ph={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var TE={base:Ti.base,type:"spacing",ratio:Qe.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},hh=TE;var gh={},mh={};var yh={};var bh={};var _h={},xh={};var OE={default:150,base:150,type:"timing",ratio:Qe["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},wh=OE;var f_={};var Sh={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},kh={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 vh={};var Ch={},Eh={};var Ah={};var RE={},Th=RE;var Oh={};var u_={},Rh={},Ph={},Ih={};var Tl={},Ol={},Cl=sn,El={},Ri=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Cl){let e=t.toLowerCase();El[e]=Cl[t];let r=Ri(e);r!==e&&(El[r]=Cl[t]),e!==t&&(El[t]=Cl[t])}var ao={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Tl,cssMediaVars:Ol,CSS_VARS:Tl,CSS_MEDIA_VARS:Ol,_scratchConfig:!0,...El},an=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return mt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let r=mt(e)?e:t.globalTheme,o=as(mt(r)?r:"auto");return Object.defineProperty(t,"globalTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},d_=t=>t?an(t):null,cn=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return mt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let r=mt(e)?e:t.resolvedTheme,o=as(mt(r)?r:null);return Object.defineProperty(t,"resolvedTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},p_=t=>t?cn(t):null;an(ao);cn(ao);var Al=ut(ao),ue={active:"0",0:ao},h_=t=>(mt(t)&&(ue.active=t),ue[t||ue.active]),Oi=[],st=t=>{t&&t._scratchConfig&&Oi.push(t)},rt=()=>{Oi.pop()},E=t=>Oi.length?Oi[Oi.length-1]:ue[t||ue.active]||ao,Rl=t=>{if(S(t))return ue.active="1",ue[1]=nt(t,ut(Al)),an(ue[1]),cn(ue[1]),t},PE=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],IE=["useVariable","globalTheme","verbose"],DE=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],$E=t=>{for(let e of DE){let r;for(let o of e){let n=t[o];S(n)&&(r=r?nt(n,r):n)}if(r)for(let o of e)S(t[o])&&(t[o]=r)}},Pi=(t,e,{cleanBase:r=!1}={})=>{let o=r?null:E(),n=ut(!r&&o&&o._scratchConfig?o:Al);for(let i of PE)delete n[i];for(let i of IE)Object.prototype.hasOwnProperty.call(Al,i)?n[i]=Al[i]:delete n[i];let s=nt(e||{},n);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,$E(s),an(s),cn(s),t&&(ue[t]=s),s};var Ue={"-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"},Dh=(t,e)=>{let{key:r,variable:o,value:n,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(n*100)/100,val:~~n,scaling:s,index:i,scalingVariable:a,variable:o},e.scales[r]=s;let c=g_.has(e.unit)?"rem":e.unit;e.vars[o]=s+c},tr=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},g_=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Ii=(t,e)=>{let{base:r,type:o,unit:n}=e,s=g_.has(n)?"rem":n,i=(Wr(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(o&&o.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=Ue[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=Ue[t+1],u=Math.abs(t),d=Math.pow(m_,2*u),h=Ue[u];return h?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${h}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Pl=(t,e,r,o)=>{let{type:n}=o,i=t===2&&e.length===2?t+1:t,l=`${"--"+(o.varPrefix?o.varPrefix+"-":"")+(n&&n.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},Di=(t,e)=>{let o=(t*e-t)/1.618,n=t*e-o,s=t+o,i=(n+s)/2;return[n,i,s]},$i=(t,e)=>Di(t,e).map(r=>r/t),Li=(t,e)=>{let{key:r,base:o,value:n,ratio:s,variable:i,index:a}=t,l=~~(n*s)-~~n,f,[u,d,h]=Di(n,s);l>16?f=[u,d,h]:f=[u,h],f.forEach((g,p)=>{let m=~~(g/o*1e3)/1e3,_=i+(p+1),b=a+(p+1)/10,y=Pl(p+1,f,i,e),x={key:r+(p+1),variable:_,value:g,scaling:m,scalingVariable:y,index:b};Dh(x,e)})},m_=1.618,LE=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let o=Math.abs(t),n=e*Math.pow(r,t),s=e*Math.pow(r,o)/Math.pow(m_,2*o);return Math.max(n,s)},Kt=t=>{let{type:e,base:r,ratio:o,range:n,subSequence:s}=t,i=Math.abs(n[0])+Math.abs(n[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=n[1]-l,u=Ue[f],d=LE(f,r,o),h=~~(d/r*100)/100,g=c+u,p=Ii(f,t),m={key:u,variable:g,value:d,base:r,scaling:h,scalingVariable:p,ratio:o,index:f};Dh(m,t),s&&Li(m,t)}return t},$h=(t,e=0)=>{let{type:r,base:o,ratio:n,subSequence:s}=t,i=w(e)?e:Ue[e],a=w(e)?Object.entries(Ue).find(([,m])=>m===e)?.[0]:e;if(!i)return console.warn(`Position ${e} is out of range in numToLetterMap`),null;let c={sequence:{},scales:{},vars:{},...t},l=o*Math.pow(n,a),f=~~(l/o*100)/100,h="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,g=Ii(a,t),p={key:i,variable:h,value:l,base:o,scaling:f,scalingVariable:g,ratio:n,index:a};return Dh(p,c),s&&Li(p,c),c},Mi=(t="A",e)=>{let r=E(),{unit:o}=r;if(w(t)&&ht(t))return`var(${t})`;if(w(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(w(t)){let y=r.sizes;if(y){let x=y[t]||y[t.toLowerCase()];if(x!==void 0)return t.slice(0,1)==="-"?`calc(${x} * -1)`:x}}let{sequence:n,unit:s=o.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(cs(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+"-":""}${xi(e.type.replace(".","-"))}-`,h=t.toUpperCase(),g=h.slice(0,1)==="-"?"-":"",p=g?h.slice(1):h,m="";p.includes("_")&&(m="_"+p.split("_")[1].toLowerCase(),p=p.split("_")[0]);let _=y=>a.test(y)?`var(${d}${y}${m})`:y;if(p.includes("+")){let[y,x]=p.split("+"),k=`${_(y)} + ${_(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("*")){let[y,x]=p.split("*"),k=`${_(y)} * ${_(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("-")){let[y,x]=p.split("-"),k=`${_(y)} - ${_(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}if(!n[p]&&p.length===2&&(r.verbose&&console.warn(p,"- value is not found because `subSequence` is set to false"),p=p.slice(0,1)),i||r.useVariable){let y=`var(${d}${p}${m})`;return g?`calc(${y} * -1)`:y}let b=n?n[p]:null;if(!b){if(console.warn("can't find",n,p),Ot())throw new Error(`[smbls] Unresolvable design-system token "${t}"`+(e.type?` for sequence "${e.type}"`:"")+" \u2014 not a registered `sizes` name and not a valid spacing/typography/timing sequence letter. The CSS property using it would silently be dropped in production. Register the token in `designSystem/sizes.js` (or the relevant sequence family) or fix the typo.");return}return s==="ms"||s==="s"?g+b.val+s:g+b.scaling+s},Il=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let o=/(\s+-\s+|\s*[+*/,]\s*)/;return t.split(o).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:Mi(i,e)}).join("")},Ve=(t,e,r,o)=>{if(typeof t!="string")return E().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!o&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=tr(t);o=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Il(t,r):t=Mi(t,r),{[e]:o?`${o}(${t})`:t}},Dl=(t,e)=>Ue[t-e],Fi=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((o,n)=>{let s=Dl(e,n);return r[s]})};R();var Lh=(t,e)=>{let r=E(),{cssVars:o}=r;z(t.value)||(o[t.var]=t.value)},Ni=(t,e,r)=>{let o=E(),{unit:n}=o,s=e.unit||n.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[d,h,g]=$i(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${h/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${g/a})`},y_=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),er=(t,e={})=>{let r=E(),{unit:o,timing:n,cssVars:s}=r,i=t.unit||o.default,a=y_.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||Ni(s,t,e);for(let u in l){let d=l[u],h=(t.type===n.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=h,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=h:(s[d.variable+"_default"]=h,s[d.variable]=`var(${d.variable+"_default"})`)}},Sr=(t,e,r={})=>{let o=E(),{unit:n,media:s,cssVars:i}=o,a=e.slice(1),c=t[e],l=c.unit||t.unit||n.default,f=y_.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:h}=c,g=s[a];if(!g&&o.verbose&&console.warn("Can't find media query ",g),!u){let p=i[`@media ${g}`];p||(p=i[`@media ${g}`]={}),Ni(p,c,r);let m=t.unit||n.default;if(f!==m&&d)for(let _ in d){let b=d[_],y=h[_]+f;p[b.variable+"_default"]=y,p[b.variable]=y}return}for(let p in d){let m=d[p],_=(Wr(f)?h[p]:d[p].val)+f;!g&&o.verbose&&console.warn("Can't find query ",g);let b=i[`@media ${g}`];b||(b=i[`@media ${g}`]={}),b[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=_}};R();var __=Jr(),ln=t=>{let e=E(),r="";for(let o in t)e.__svgCache[o]||(e.__svgCache[o]=!0,r+=t[o]);return r},ME=t=>{let e=t&&(t.default||t);if(!w(e))return __&&console.warn("parseRootAttributes:",e,"is not a string"),{};let r=e.match(/<svg\s+(.*?)>/);if(!r||!r[1])return{};let n=r[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return n?n.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},FE=(t,e)=>{let r=[];if(t.replace(/id="([^"]*)"/g,(n,s)=>(r.push(s),n)),!r.length)return t;let o=t;for(let n of r){let s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${n}`;o=o.replace(new RegExp(`id="${s}"`,"g"),`id="${i}"`).replace(new RegExp(`url\\(#${s}\\)`,"g"),`url(#${i})`).replace(new RegExp(`xlink:href="#${s}"`,"g"),`xlink:href="#${i}"`).replace(new RegExp(`href="#${s}"`,"g"),`href="#${i}"`)}return o},b_=new Set,ji=(t,e)=>{let r=e&&e.default?e.default:e;if(!w(r))return __&&!b_.has(t)&&(b_.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=r;let o=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(o){let u=o[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let n=ME(e),{width:s,height:i}=n,a=n.viewBox||`0 0 ${s||24} ${i||24}`,f=FE(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/width="[^"]*"/,""),f=f.replace(/height="[^"]*"/,""),f=f.replace("</svg","</symbol"),f=BE(f),f},NE="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",jE=new RegExp(`<(${NE})\\b([^>]*?)\\s*/>`,"g"),BE=t=>t.replace(jE,"<$1$2></$1>");var pn={};P(pn,{STANDARD_SCHEME_QUERIES:()=>$l,appendSVGSprite:()=>ea,appendSvgIconsSprite:()=>uo,applyDocument:()=>ta,applyHeadings:()=>Nl,applyReset:()=>ra,applySpacingSequence:()=>Ui,applyTimingSequence:()=>Qi,applyTypographySequence:()=>Xi,checkIfBoxSize:()=>Bi,getColor:()=>ot,getFontFamily:()=>Yi,getFontSizeByKey:()=>Ji,getMediaColor:()=>Rt,getMediaTheme:()=>pe,getSafeInk:()=>Ll,getSafeInkInfo:()=>Mh,getShadow:()=>Hi,getShapeByKey:()=>Zi,getSpacingBasedOnRatio:()=>Ee,getSpacingByKey:()=>xt,getTheme:()=>Wi,getTimingByKey:()=>te,getTimingFunction:()=>he,resolveBorderValue:()=>Qt,resolveColorRgb:()=>co,resolveShadowValue:()=>lo,runThroughMedia:()=>Fl,setAdaptiveSchemeVar:()=>Cr,setColor:()=>vr,setFont:()=>Gi,setFontFamily:()=>un,setGradient:()=>fn,setMediaTheme:()=>Ki,setSVG:()=>dn,setShadow:()=>Er,setSvgIcon:()=>fo,setTheme:()=>qi,splitSpacedValue:()=>Vi});R();var $l={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},de=new Set,UE=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"]),x_=new Set,VE=t=>{if(!t)return!1;let{color:e,gradient:r}=t;return!!(S(e)&&Object.keys(e).length||S(r)&&Object.keys(r).length)},S_=(t,e,r)=>{let o=w(e)?e.toLowerCase():"";if(!UE.has(o)||!VE(r))return t;if(!x_.has(o)){x_.add(o);let n=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color \`${t}\` is a CSS named colour that is not in the palette${n}. 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.`)}},ot=(t,e,r)=>{let o=r||E();if(!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(ht(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let n,s,i;if(O(t))[n,s,i]=t;else{let u=qt(t);if(!u){let{color:d,gradient:h}=o,g=h[t]||d[t];return g?(e&&g[e]&&(g=g[e]),o.useVariable?`var(${g.var})`:g.value):t}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=o,l=a[n]||c[n];if(!l)return S_(t,n,o);if(e)if(l[e]!==void 0)l=l[e];else if(O(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&o.verbose&&console.warn(t," - array-form color tokens only support light/dark; falling back to the light slot for scheme",e),l=l[0])}else o.verbose&&console.warn(t," - does not have ",e);if(w(l)){if(de.has(n))return l;de.add(n);try{return ot(l,null,r)}finally{de.delete(n)}}let f=l.rgb;if(!f){let u=o.useVariable?`var(${l.var})`:l.value;if((s||i)&&u){let d=s!==void 0?s:1;if(!i)return`rgb(from ${u} r g b / ${d})`;if(i.charCodeAt(0)===43||i.charCodeAt(0)===45){let g=parseFloat(i),p=g<0?"-":"+",m=Math.abs(g);return`rgb(from ${u} calc(r ${p} ${m}) calc(g ${p} ${m}) calc(b ${p} ${m}) / ${d})`}return`hsl(from ${u} h s ${i}% / ${d})`}return u}return i&&!l[i]&&(f=Be(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, 1)`:o.useVariable?`var(${l.var})`:`rgb(${f})`},w_=t=>{let e=le(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}},HE=(t,e)=>{if(!e)return t;let r=t.rgb;if(e.tone){let n=Be(r,e.tone);r=w(n)?n.split(",").map(s=>parseFloat(s.trim())):n}let o=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:r,alpha:o}},co=(t,e,r)=>{let o=e||E();if(!w(t))return null;let n=qt(t);if(n){if(n.passthrough){let d=le(n.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(n.cssVar)return null}let s=n?n.name:t,{color:i,gradient:a}=o,c=i[s]||a[s];if(!c)return w_(t);if(w(c)){let d;if(de.has(s))d=w_(c);else{de.add(s);try{d=co(c,o,r)}finally{de.delete(s)}}return d?HE(d,n):null}if(c.rgb===void 0&&S(c)){let d=`@${r||"light"}`;c=c[d]!==void 0?c[d]:c["@light"]}if(!c||c.rgb===void 0)return null;let l=c.rgb;n&&n.tone&&(l=Be(l,n.tone));let f=w(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=n&&n.alpha!==void 0?parseFloat(n.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},Rt=(t,e,r)=>{let o=r||E();if(e||(e=o.globalTheme==="auto"?null:o.globalTheme),!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(ht(t))return`var(${t})`;let n,s,i;if(O(t))n=t[0];else{let u=qt(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}else n=t}let{color:a,gradient:c}=o,l=a[n]||c[n],f=S(l);if(f&&l.value)return ot(t,`@${e}`,r);if(f){if(o.useVariable&&l.var)return s||i?ot(t,null,r):`var(${l.var})`;if(e)return ot(t,`@${e}`,r);{let u={},d=o.scopeSelector||":root",h=d===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${d}:not([data-theme])`;for(let g in l){if(g.charCodeAt(0)!==64)continue;let p=g.slice(1),m=ot(t,g,r);if(m!==void 0&&(u[`[data-theme="${p}"] &`]=m,p==="light"||p==="dark")){let _=o.media&&o.media[p]||$l[p];if(!_)continue;let b="@media "+(_==="print"?`${_}`:`screen and ${_}`);u[b]={[`${h} &`]:m}}}return u}}else return S_(t,n,o)},Cr=(t,e,r,o)=>{let s=`--${o.varPrefix?o.varPrefix+"-":""}${e}-${r}`,i,a={};for(let c in t){if(c.charCodeAt(0)!==64)continue;let l=c.slice(1),f=t[c],u=f&&(f.value||f);!u||typeof u!="string"||(a[l]=u,(l==="light"||i===void 0)&&(i=u))}if(i!==void 0){o.cssVars[s]=i,o.cssMediaVars||(o.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(o.cssMediaVars[l]||(o.cssMediaVars[l]={}),o.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;o.cssMediaVars[f]||(o.cssMediaVars[f]={}),o.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},vr=(t,e,r)=>{let o=E();if(S(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0))return o.useVariable&&t.var&&(o.cssVars[t.var]=t.value),t;if(w(t)&&ht(t)){let p=t.slice(2);if(t=ot(p),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=p.split(" "),_=o.color[m[0]];if(_&&!_.value&&!_.rgb&&(w(_)||O(_)||S(_))&&!de.has(m[0])){de.add(m[0]);try{o.color[m[0]]=vr(_,m[0])}finally{de.delete(m[0])}_=o.color[m[0]]}if(_&&_.value){let b=_.rgb,y=m[1]!==void 0?m[1]:"1",x=m[2];x&&(b=Be(b,x)),t=`rgba(${b}, ${y})`}else{let b=m[2],y=m[1]!==void 0?m[1]:"1";if(b)try{let x=le(m[0]);x&&x.length>=3?t=`rgba(${Be(x.slice(0,3).join(", "),b)}, ${y})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(O(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let p={};for(let m in t)m!=="var"&&(p[m]=vr(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return o.useVariable&&Cr(p,"color",e,o),p}let s=`--${o.varPrefix?o.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(w(i)&&!i.includes("(")&&!i.startsWith("#")){let p=qt(i);if(p&&p.name&&!p.passthrough&&!p.cssVar){let m=o.color[p.name];if(m&&!m.value&&!m.rgb&&(w(m)||O(m)||S(m))&&!de.has(p.name)){de.add(p.name);try{o.color[p.name]=vr(m,p.name)}finally{de.delete(p.name)}}let _=o.color[p.name];if(_&&_.rgb){let b=_.rgb;p.tone&&(b=Be(b,p.tone));let y=p.alpha!==void 0?parseFloat(p.alpha):_.alpha!==void 0?_.alpha:1;i=`rgba(${b}, ${y})`}}}let a=le(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),h=`${c}, ${l}, ${f}`,g=`rgba(${h}, ${d})`;return o.useVariable&&(o.cssVars[s]=g),{var:s,rgb:h,alpha:d,value:g}},fn=(t,e,r)=>{let o=E();if(S(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(w(t)&&ht(t)&&(t=ot(t.slice(2))),O(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let i={};for(let a in t)a!=="var"&&(i[a]=fn(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return o.useVariable&&Cr(i,"gradient",e,o),i}let s=`--${o.varPrefix?o.varPrefix+"-":""}gradient-${e}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[s]=t.value||t),{var:s,value:t.value||t}};R();var Ll=(t,e,r={},o)=>{let n=o||E(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=r,f=i?3:s,u=a||(n.globalTheme&&n.globalTheme!=="auto"?n.globalTheme:"light"),d=w(e)?e:String(e),h=qt(t),g=h&&!h.passthrough&&!h.cssVar?h.name:null,p=(W,K)=>c?{value:W,...K}:W;if(g){let W=n.color[`${g}Safe`];if(W){let K=`${d}@${u}`,Z=W[K]!==void 0?W[K]:W[d];if(Z!==void 0){let To=Z&&Z.rgb!==void 0?n.useVariable&&Z.var?`var(${Z.var})`:Z.value:ot(Z,null,n);return p(To,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=ot(t,u?`@${u}`:null,n),_=co(t,n,u),b=co(e,n,u);if(!_||!b)return n.verbose&&console.warn("getSafeInk: could not resolve",t,e,"\u2014 returning hue unchanged"),p(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let y=no(b.rgb,b.alpha),x=no(_.rgb,_.alpha,y),k=rn(x,y);if(k>=f-.02)return p(m,{ratio:k,deviation:0,derived:!1,overridden:!1});let[C,T,$]=ki(_.rgb),[,M,D]=vi([C,T,$]),V=oo(y)>.5,H=V?C:1-C,G=W=>{let K=V?C-W:C+W,Z=Math.max(0,Math.min(1,K));return{rgb:Ci(Z,M,D),L:Z}},ft=W=>{let{rgb:K}=G(W),Z=no(K.map(To=>Math.round(To)),_.alpha,y);return rn(Z,y)},I=0,F=H,N=ft(F)>=f;if(N)for(let W=0;W<l;W++){let K=(I+F)/2;ft(K)>=f?F=K:I=K}else I=F;let{rgb:St,L:Dt}=G(F),xe=St.map(W=>Math.round(W)),J=ft(F),dt=_.alpha<1?`rgba(${xe.join(", ")}, ${_.alpha})`:`rgb(${xe.join(", ")})`,L=Math.abs(Dt-C)*100;return p(dt,{rgb:xe,ratio:J,startRatio:k,deviation:L,derived:!0,overridden:!1,reachable:N})},Mh=(t,e,r={},o)=>Ll(t,e,{...r,meta:!0},o);R();R();var zE=t=>{let r=E().spacing||{},o=parseFloat(t.spacingRatio),n={...r,ratio:Number.isFinite(o)?o:r.ratio,sequence:{},scales:{}};return Kt(n),n},WE=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;pt(r,{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Kt(r),Sr(t,e)}},Bi=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),o=e.includes("border")||e.includes("outline");return r&&!o},Ui=()=>{let t=E(),{spacing:e}=t;Kt(e),er(e),WE(e)},qE=t=>{let e=E(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Kt(t)},xt=(t,e="padding",r,o)=>{let n=qE(r);if(w(t)){if(!o&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!o&&t.includes("(")){let i=tr(t);o=i[0],t=i[1]}}let s=o?[t]:ro(t);if(O(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)=>Ve(s[f],e+l+i,n,o);return a[s.length].map((l,f)=>c(l,f))}return Ve(t,e,n,o)}},Ee=(t,e,r,o)=>{let n=E(),{spacing:s}=n,i=r||t[e];if(!o&&w(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!o&&w(i)&&i.includes("(")){let a=tr(i);o=a[0],i=a[1]}if(t.spacingRatio){let a=zE(t);return xt(i,e,a,o)}return xt(i,e,s,o)},Vi=t=>{let e=r=>{let o=["+","-","*","/"].includes(r),n=$o.some(i=>t.includes(i));return o||n?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};R();var lo=(t,e,r)=>!w(t)||Zt.test(t)?t:Ze(t).map(o=>(o=o.trim(),o.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(n.startsWith("--"))return`var(${n})`;let s=ot(n,e);if(Ce(s))return s;if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em"||n==="inset"||n==="none")return n;r&&r(n);let i=xt(n,"shadow");return i&&i.shadow?i.shadow:n}).join(" "))).join(", "),Er=(t,e,r,o)=>{let n=E();if(O(t)){let a={"@light":Er(t[0],e,"light"),"@dark":Er(t[1],e,"dark")};return n.useVariable&&Cr(a,"shadow",e,n),a}if(S(t)){let a={};for(let c in t)a[c]=Er(t[c],e,c.startsWith("@")?c.slice(1):c);return n.useVariable&&Cr(a,"shadow",e,n),a}w(t)&&!Zt.test(t)&&(t=lo(t));let i=`--${n.varPrefix?n.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[i]=t),{var:i,value:t}},Hi=(t,e)=>{let r=E();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!w(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(ht(t))return`var(${t})`;let[o]=O(t)?t:t.split(" "),s=r.shadow[o],i=S(s);if(!s)return r.verbose&&console.warn("Can't find color ",o),t;if(e){let a=s["@"+e]||s[e];if(a)return a.value!==void 0?a.value:a;r.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={};for(let c in s){if(c.charCodeAt(0)!==64)continue;let l=r.media[c.slice(1)];if(!l)continue;let f="@media "+(l==="print"?`${l}`:`screen and ${l}`),u=s[c],d=u&&(u.value!==void 0?u.value:u);d!==void 0&&(a[f]=d)}return a}return r.verbose&&console.warn("Can't find color",t),t};var KE=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),GE=t=>KE.has(t),Qt=(t,e,r)=>{let o=t+"";if(Zt.test(o))return o;let n=o.trim();return n==="none"||n==="0"||n==="initial"||n==="inherit"||n==="unset"?o:o.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(ht(s))return`var(${s})`;if(GE(s)||/^\d/.test(s)||s==="0")return s;let i=ot(s,e);if(Ce(i))return i;r&&r(s);let a=xt(s,"border");return a&&a.border?a.border:s}).join(" ")};R();var YE=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"]),k_=["color","Color","background","Background","fill","Fill","stroke","Stroke"],XE=t=>{for(let e=0;e<k_.length;e++)if(t.includes(k_[e]))return!0;return!1},JE={boxShadow:lo,textShadow:lo,border:Qt,borderTop:Qt,borderRight:Qt,borderBottom:Qt,borderLeft:Qt,outline:Qt,columnRule:Qt},ZE=t=>{if(!t)return!1;let e=qt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},v_=new Set,QE=(t,e,r,o,n,s)=>{if(!Ot())return;let i=`${t}::${e}::${r||""}::${o}`;v_.has(i)||(v_.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(r?` (${r})`:"")+` did not fully resolve: "${o}" -> "${n}" still contains the unresolved token "${s}". This is not valid CSS \u2014 the browser will drop the whole declaration. Register "${s}" as a design-system color token or fix the typo.`))},E_=(t,e,r,o)=>{let n=JE[e];if(!n)return ot(r,o);let s=null,i=n(r,o,a=>{!s&&ZE(a)&&(s=a)});return s&&QE(t,e,o,r,i,s),i},Ml=t=>{let e={},{state:r,media:o,helpers:n,...s}=t;return Object.keys(s).map(a=>{let l=["color","Color","background","border"].some(f=>a.includes(f));return e[a]=l?ot(t[a]):t[a]}),e},zi=t=>(t.value||(t.value=Ml(t)),t.value),Wi=(t,e)=>{let r=E();if(r.useVariable)return pe(t,e);let o=r.theme;if(w(t)){let[n,s]=t.split(" "),i=o[n];if(i){if(!s&&!e)return zi(i);t=[n,s||e]}}if(z(t)&&t[1]){let n=t[0],s=t[1],{helpers:i,media:a,state:c}=o[n];if(a&&a[s])return zi(a[s]);if(i&&i[s])return zi(i[s]);if(c&&c[s])return zi(c[s])}else if(S(t))return Ml(t)},tA=(t,e,r)=>{if(S(e))t.variants.inverse.value=Ml(e);else if(e===!0){let{color:o,background:n}=r;t.variants.inverse={value:{color:n,background:o}}}},eA=(t,e,r,o)=>{let n=Wi(r);o[`&:${e}`]=n,S(r)&&!r.value&&(r.value=n)},rA=(t,e)=>{let{state:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return eA(t,n,s,e),t}),t):void 0},oA=(t,e,r,o)=>{let n=Wi(r);o[`@media (prefers-color-scheme: ${e})`]=n,S(r)&&!r.value&&(r.value=n)},nA=(t,e)=>{let{media:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return(n==="dark"||n==="light")&&oA(t,n,s,e),n==="inverse"&&tA(t,s,e),t}),t):void 0},sA=(t,e)=>{let r=E(),{helpers:o}=t;return o?(Object.keys(o).map(s=>{let i=o[s];return w(i)?o[s]=r.theme[i]:zi(o[s]),t}),t):void 0},qi=(t,e)=>{let r=E();if(r.useVariable)return Ki(t,e);let{state:o,media:n,helpers:s}=t,i=Ml(t,e),c=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}`;return rA(t,i),nA(t,i),sA(t,i),{var:c,value:i,state:o,media:n,helpers:s}};var Fh=(t,e,r)=>{let{cssVars:o}=r;r.cssMediaVars||(r.cssMediaVars={});let n=r.cssMediaVars,s=r.globalTheme!==void 0?r.globalTheme:"auto",i={},a=new Set;for(let l in t)if(t[l])for(let f of Object.keys(t[l]))a.add(f);let c=new Set;for(let l of a){let f=l.slice(0,1);if(!(f==="@"||f==="."||f===":")&&XE(l))for(let u in t){if(c.has(u))continue;let d=t[u]?.[l];if(d===void 0)continue;let h=ot(d,`@${u}`);h!==void 0&&w(h)&&/^[a-z][a-zA-Z]+$/.test(h)&&!YE.has(h)&&c.add(u)}}for(let l of a){let f=l.slice(0,1),u=Object.values(t).some(d=>z(d?.[l]));if(f==="."&&u){let d=l.slice(1),h={};for(let g in t)z(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=Fh(h,`${e}-${d}`,r)}else if(f===":"&&u){let d=l.replace(/^:+/,""),h={};for(let g in t)z(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=Fh(h,`${e}-${d}`,r)}else if(f!=="@"&&f!=="."&&f!==":"){let h=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${l}`,g=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,p;for(let m in t){if(c.has(m))continue;let _=t[m]?.[l];if(_===void 0)continue;let b=E_(e,l,_,`@${m}`);if(b===void 0)continue;(g&&m===g||!g&&(m==="light"||p===void 0))&&(p=b);let y=`[data-theme="${m}"]`;if(n[y]||(n[y]={}),n[y][h]=b,m==="dark"||m==="light"){let x=`@media (prefers-color-scheme: ${m})`;n[x]||(n[x]={}),n[x][h]=b}}p!==void 0&&(o[h]=p),i[l]=`var(${h})`,i[`.${l}`]={[l]:i[l]}}}return(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color}),i},Ki=(t,e,r,o)=>{let n=E(),{cssVars:s}=n,i={value:t},a=!r&&!o;if(z(t)){if(a&&n.useVariable){let c={};for(let l in t)l.startsWith("@")&&z(t[l])&&(c[l.slice(1)]=t[l]);if(Object.keys(c).length){let l=Fh(c,e,n);Object.assign(i,l)}}for(let c in t){let l=c.slice(0,1),f=t[c];if(l==="@"||l===":"||l==="."){let u=l==="@"&&c;i[c]=Ki(f,e,c,o||u)}else if(!a){let u=E_(e,c,f,o),d=[...new Set([o,r].filter(m=>m).map(m=>m.slice(1)))],h=d.length?"-"+d.join("-"):"",p=`--${n.varPrefix?n.varPrefix+"-":""}theme-${e}${h}-${c}`;n.useVariable?(n.useThemeSuffixedVars&&(s[p]=u),i[c]=`var(${p})`):i[c]=u,i[`.${c}`]={[c]:i[c]}}}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(w(t)&&ht(t)){let l=n.theme[t.slice(2)];return pe(l,o)}return i},Nh=t=>{let e=E(),r={};for(let o in t){let n=o.slice(0,1);if(z(t[o])){if(n==="@")continue;n===":"?r[`&${o}`]=Nh(t[o]):n==="."&&(r[`&${o}`]=Nh(t[o]))}else r[o]=t[o]}return r},A_=(t,e)=>{let r=e.shift();return t[r]?A_(t[r],e):t},C_=(t,e)=>O(e)?A_(t,e):w(e)&&t[e]?t[e]:t;var pe=(t,e)=>{let r=E();if(w(t)&&ht(t)&&(t=pe(t.slice(2))),!t||!w(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[o,...n]=O(t)?t:t.split(" "),s=r.theme[o];return s&&n.length?s=C_(s,n):s&&e&&(s=C_(s,e)),Nh(s)};R();R();var Gi=(t,e)=>{let r=E(),o=`--font-${e}`;if(!t||O(t)&&!t[0])return;let n;if(t.isVariable){let s=fe(t.url,r.files)||t.url;on(s)?n=nn(s):n=wr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap"})}else if(t[0])n=io(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>fe(i,r.files)||i):fe(t.url,r.files)||t.url;n=wr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch})}return{var:o,value:t,fontFace:n}},Yi=(t,e)=>{let r=E(),{fontFamily:o}=r;return so(e||o,t)},un=(t,e)=>{let r=E(),{fontFamily:o,fontFamilyTypes:n}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!o.default)&&(o.default=e),S(s)&&(s=ro(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${n[i]}`;return{var:a,value:c,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};R();var Fl=t=>{let e=E(),{typography:r,media:o}=e;for(let n in t){let s=n.slice(0,1)==="@",i=t[n];if(!s)continue;let{mediaRegenerate:a}=t,c=n.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p}=t;pt(i,{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),_=i.unit||p,b=!i.unit&&m.has(p)?"rem":_,y=o[c],x="@media "+(y==="print"?`${y}`:`screen and ${y}`);if(r.templates[x]={fontSize:i.base/r.browserDefault+b},!a){pt(i,{sequence:{},scales:{},vars:{}}),Kt(i),Sr(t,n);continue}pt(i,{sequence:{},scales:{},templates:{},vars:{}}),Kt(i),Sr(t,n)}},Nl=t=>{let e=E();if(t.h1Matches){let r=t.unit,o=Fi(t),{templates:n}=t;for(let s in o){let i=`h${parseInt(s)+1}`,a=n[i];n[i]={fontSize:e.useVariable?`var(${o[s]?.variable})`:`${o[s]?.scaling}${r}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},Xi=()=>{let t=E(),{typography:e}=t;Kt(e),Nl(e),er(e),Fl(e)},Ji=t=>{let e=E(),{typography:r}=e;return Ve(t,"fontSize",r)};R();var Zi=t=>{if(!w(t))return;let r=E().shape;if(r)return r[t]!==void 0?r[t]:r[t.toLowerCase()]};R();var Qi=()=>{let t=E(),{timing:e}=t;Kt(e),er(e)},he=t=>{let e=E(),{timing:r}=e;return r[t]||r[_i(t)]||t},te=(t,e="timing")=>{let r=E(),{timing:o}=r;return Ve(t,e,o)};R();var ta=()=>{let t=E(),{fontFamily:e,theme:r,typography:o}=t,n=t.document;return Ge(n)?(ur(t,"document",n),n=t.document={}):n||(n=t.document={}),pt(n,{theme:r.document,fontFamily:so(e),fontSize:o.base,lineHeight:o.lineHeight})};R();var Bh={document:et},dn=(t,e)=>{let r=E();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?ji(e,t):t},ea=(t,e=Bh)=>{let r=E(),o=Object.keys(t).length?{}:r.svg;for(let n in t)o[n]=t[n];O_(o,e)},fo=(t,e)=>{let r=E();return r.useIconSprite&&!r.semanticIcons?.[e]?dn(t,e):t},uo=(t,e=Bh)=>{let r=E(),o=Object.keys(t).length?{}:r.icons;for(let n in t)o[n]=t[n];O_(o,e)},jh=(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},iA=(t,e)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let o=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new r().parseFromString(o,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},T_=(t,e,r)=>{for(;e.firstChild;){let o=e.firstChild;r.appendChild(t.importNode(o,!0)),o.remove()}},O_=(t,e=Bh)=>{let r=E(),o=e.document||et;if(!o||!o.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),ln(t);let n=o.querySelector("#svgSprite"),s=ln(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=iA(o,s);if(n)if(a)T_(o,a,n);else if(o.body.insertAdjacentHTML)n.insertAdjacentHTML("beforeend",s);else{let c=jh(o,{isRoot:!1});c.innerHTML=s,n.append(...c.children)}else if(a){let c=jh(o);c&&c.nodeType&&(T_(o,a,c),o.body.prepend(c))}else if(o.body.insertAdjacentHTML)o.body.insertAdjacentHTML("afterbegin",i);else{let c=jh(o);c&&c.nodeType&&(c.innerHTML=s,o.body.prepend(c))}};R();var ra=(t={})=>{let e=E(),r=e.typography||{},o=e.document||{},n=S(e.reset)?e.reset:e.reset={};if(n[":root"]){let c=n,l=r.templates||{};c.body={...e.useDocumentTheme?pe("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?pe("document"):{};if(n.html&&Ht(n.html,a),r.unit){let c=e.media||{};for(let l in r){if(l.charAt(0)!=="@")continue;let f=r[l];if(!f||f.unit===r.unit||!f.unit)continue;let u=f.unit,d=f.base||r.base,h=f.browserDefault||r.browserDefault,g=l.slice(1),p=c[g];if(!p)continue;let m="@media "+(p==="print"?p:"screen and "+p);n[m]||(n[m]={}),n[m].html||(n[m].html={}),n[m].html.fontSize=d/h+u}}return nt(pt(n,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",scrollBehavior:"smooth",...a,fontSize:r.unit?r.base/r.browserDefault+r.unit:r.browserDefault+"px",fontFamily:o.fontFamily,lineHeight:o.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:o.fontFamily,fontSize:r.unit?"1"+e.unit.default:r.base/r.browserDefault+e.unit.default,...i,...s},a:{color:"currentColor"},button:{color:"inherit",font:"inherit",background:"transparent",border:"none",cursor:"pointer",appearance:"none",WebkitAppearance:"none"},"input, select, textarea":{color:"inherit",font:"inherit"},fieldset:{border:0,padding:0,margin:0}})};R();var aA=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),He=t=>Qt(t),jl=t=>Zt.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(ht(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=ot(e);return Ce(r)?r:e}).join(" "),Bl=(t,e)=>Hi(t,e),oa=(t,e)=>Zt.test(t)?t:Ze(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(ht(o))return`var(${o})`;if(o==="inset"||o==="none")return o;let n=ot(o);if(Ce(n)){let i=Rt(o,e);return S(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em")return o;let s=xt(o,"shadow");return s&&s.shadow?s.shadow:o}).join(" "):"")).join(", "),na=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let o=t.slice(0,r+1),n=t.slice(r+1,t.lastIndexOf(")")),s=")",a=Ze(n).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||aA.has(f)||f==="transparent"||Zt.test(f))return f;let u=ot(f);return Ce(u)?u:f}).join(" ")));return o+a.join(", ")+s},Ul=(t,e)=>{let r=E();return Ze(t).map(o=>{let n=o.trim();if(ht(n))return`var(${n})`;if(/^var\(/.test(n)||n.includes("url"))return n;if(r.gradient?.[n]){let s=Rt(n,e);if(w(s))return s;if(S(s)){for(let i in s)if(w(s[i]))return s[i]}return n}return n.includes("gradient")?na(n,e):n.includes("/")||n.startsWith("http")||n.includes(".")&&!qt(n)?`url(${n})`:n}).join(", ")},Vl=t=>w(t)&&t.split(" ").map(e=>xt(e,"gap").gap).join(" "),Uh=t=>{let e=t.split(" ");return e.length?e.map(r=>ht(r)?`var(${r})`:r.length<3||r.includes("ms")?te(r).timing||r:he(r)?he(r):r).join(" "):t},sa=(t,e,r)=>{if(w(t))return t.split(",").map(o=>te(o).timing||o).join(",")},Hl=t=>{let e=t.split(",");if(e.length)return e.map(Uh).join(",")};function yt(t,e,r={},o={}){let n=ct.call(this,e||r[t]);if(n==null)return;let s;if(w(n)){if(/^(?:env|var)\(/.test(n.trim()))return{[t]:n};if(n.includes("(")){let c=tr(n);s=c[0],n=c[1]}let i=r.scaleBoxSize,a=Bi(t);!i&&a&&!o.ratio&&(n=Vi(n))}return o.ratio?Ee(r,t,n,s):xt(n,t,void 0,s)}var B=(t,e=null,r)=>yt(t,e,r,{ratio:!0}),rr=(t,e,r,o="borderRadius")=>{if(w(t))return{[o]:t.split(" ").map(n=>{let s=Zi(n);return s!==void 0?s:Ee(e,r,n)[r]}).join(" ")}};R();var hn="__smblsThemeRootOwner",gn=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)},R_=(t,e,r)=>{if(!(!t||!e)){gn(t),t.__prefersListener=r,t.__prefersMq=e;try{e.addEventListener("change",r)}catch{e.addListener(r)}}},cA=(t,e)=>{let r=E(),{cssVars:o}=r,n=e.startsWith("--")?e:`--${e}`;return o[n]=t,t},Gt=t=>t,zl={color:vr,gradient:fn,font:Gi,fontFamily:un,fontfamily:un,theme:qi,icons:fo,semanticIcons:Gt,semanticicons:Gt,svg:dn,svgData:Gt,typography:Gt,shadow:Er,spacing:Gt,media:Gt,grid:Gt,class:Gt,timing:Gt,reset:Gt,unit:Gt,animation:Gt,vars:cA,sizes:Gt,shape:Gt},lA=(t,e,r,o)=>{ur(t,r,e);let n={};for(let s of o)t[s]===e&&(t[s]=n);return t.verbose&&console.warn("[scratch] design-system family",r,"resolved to a host object; parked it and allocated a plain bucket"),n},Vh=(t,e,r)=>{let o=E(),n=Ri(t),s=n.toLowerCase(),i=o[n]||o[s]||o[t],a=Ge(i)?lA(o,i,s,[n,s,t]):i,c=zl[n]||zl[s];if(c)try{let l=c(e,r);return a&&(a[r]=l),a}catch(l){o.verbose&&console.warn("Error setting",s,"value",e,r,l)}if(!c){let l=a||(o[s]={});return l[r]=e,l}o.verbose&&console.warn("Can not find",s,"method in scratch")},Hh=(t,e)=>{let r=E(),o=t.toLowerCase();return Ge(e)?(ur(r,o,e),r.verbose&&console.warn("[scratch] ignoring host object passed as the",o,"design-system family"),r[o]||r[t]):e==null?(r.verbose&&console.warn("[scratch] skipping empty design-system family",o),r[o]||r[t]):(Object.keys(e).sort((s,i)=>{let a=S(e[s])||O(e[s])?1:0,c=S(e[i])||O(e[i])?1:0;return a-c}).forEach(s=>{try{return Vh(o,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",o,"value",e[s],s,i)}}),r[o]||r[t])},Wl=(t,e)=>{let r=e||E();r.globalTheme=t;let n=Do(r)||(typeof document<"u"?document:null),s=n&&n.defaultView||(typeof window<"u"?window:null);if(n){let a=r.themeRoot||n.documentElement,c=t&&t!=="auto";if(a[hn]=r,c)gn(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",R_(r,f,l)}else gn(r),a.setAttribute("data-theme","light"),r.resolvedTheme="light",a.style.colorScheme="light"}let i=r.varPrefix?`--${r.varPrefix}-theme-`:"--theme-";for(let a in r.cssVars)a.startsWith(i)&&delete r.cssVars[a];for(let a in r.cssMediaVars)delete r.cssMediaVars[a];if(n&&r.cssVars){let a=r.scopeSelector||":root",c=n.styleSheets;for(let l=0;l<c.length;l++)try{let f=c[l].cssRules;for(let u=0;u<f.length;u++)if(f[u].selectorText===a){for(let d in r.cssVars)f[u].style.setProperty(d,r.cssVars[d]);return r}}catch{}}return r},fA={},po=(t,e=fA)=>{let r=e.config||E(),{version:o,verbose:n,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:h,semanticIcons:g,hoverMedia:p,files:m,assets:_,...b}=t;e.newConfig&&(r=Rl(e.newConfig)),Ke(b.document)&&(r.__domDocument=b.document,delete b.document),Ke(r.document)&&(r.__domDocument||(r.__domDocument=r.document),r.document={}),m!==void 0&&(r.files=m),_!==void 0&&(r.assets=_),n!==void 0&&(r.verbose=n),s!==void 0&&(r.useVariable=s),i!==void 0&&(r.useReset=i),c!==void 0&&(r.useFontImport=c),a!==void 0&&(r.useSvgSprite=a),l!==void 0&&(r.useIconSprite=l),d!==void 0&&(r.useDocumentTheme=d),f!==void 0&&(r.globalTheme=f),u!==void 0&&(r.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(r.useThemeSuffixedVars=t.useThemeSuffixedVars),h!==void 0&&(r.useDefaultConfig=h),g!==void 0&&(r.semanticIcons=g),p!==void 0&&(r.hoverMedia=p),r.verbose&&console.log(r);let x=Do(r)||(typeof document<"u"?document:null),k=x&&x.defaultView||(typeof window<"u"?window:null),C=x&&(r.themeRoot||x.documentElement);if(C&&typeof C.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")gn(r),C.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,C[hn]=r,r.globalTheme==="dark"||r.globalTheme==="light"?C.style.colorScheme=r.globalTheme:C.style.colorScheme="light dark";else if(C[hn]&&C[hn]!==r&&C.hasAttribute("data-theme"))gn(r),r.resolvedTheme=C.getAttribute("data-theme");else if(k&&k.matchMedia){let V=G=>{let ft=G.matches?"dark":"light";C.setAttribute("data-theme",ft),r.resolvedTheme=ft},H=k.matchMedia("(prefers-color-scheme: dark)");V(H),C.style.colorScheme="light dark",C[hn]=r,R_(r,H,V)}else gn(r),C.setAttribute("data-theme","light"),r.resolvedTheme="light",C.style.colorScheme="light",C[hn]=r;r.__svgCache||(r.__svgCache={});let T=Object.keys(b).filter(D=>!D.startsWith("__")),$=new Set(T);if(T.forEach(D=>{let V=D.toLowerCase();V!==D&&$.has(V)&&nt(b[V],b[D])}),T.map(D=>{let V=D.toLowerCase();if(!(V!==D&&$.has(V)))return Hh(D,b[D])}),r.varPrefix&&(r.typography&&(r.typography.varPrefix=r.varPrefix),r.spacing&&(r.spacing.varPrefix=r.varPrefix),r.timing&&(r.timing.varPrefix=r.varPrefix)),b.typography)try{Xi()}catch(D){r.verbose&&console.warn("Error applying typography sequence",D)}if(b.spacing)try{Ui()}catch(D){r.verbose&&console.warn("Error applying spacing sequence",D)}if(b.timing)try{Qi()}catch(D){r.verbose&&console.warn("Error applying timing sequence",D)}ta();let M=ra();return M&&(r.reset=M),r};var ho=new Map,N_=null,qh=null,uA=null;function ia(t){t.batchAtomicCss&&(qh=t.batchAtomicCss),t.compoundCssClass&&(uA=t.compoundCssClass)}var dA=new Set,I_=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function Kh(t){try{let e=E();e&&(e.__domDocument=t)}catch{}t&&dA.add(t)}function Xl(){try{let t=E();if(t){if(I_(t.__domDocument))return t.__domDocument;if(I_(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var Yt={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function Jl(){return{...Yt}}function Gh(){for(let t in Yt)Yt[t]=0;Gl=!1}var Gl=!1,Kl=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function pA(t){let e=Date.parse(t);if(!isFinite(e))return"";let r=Math.floor((Date.now()-e)/864e5);return r<1?" (today)":` (${Kl(r,"day")} ago)`}function hA(){try{let t=Zl();return t&&t.cssRules?t.cssRules.length:-1}catch{return-1}}function gA(t,e){if(Gl)return!1;Gl=!0;let r="n/a \u2014 running from src/ (unbuilt), so no dist is in play",o="this IS the source",n="@symbo.ls/css";return console.error(`[@symbo.ls/css] CSS EMIT FAILURE (${t}) \u2014 the engine emitted ${Kl(Yt.variable,"variable rule")} and ${Kl(Yt.atomic,"atomic rule")}, while the design system held ${Kl(e,"CSS variable")}.
|
|
39
|
+
src: ${i};`},Cr=(t,e,r,o)=>`@font-face {${$i(t,e,r,o)}
|
|
40
|
+
}`,uo=(t,e,r)=>Object.keys(e).map(n=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l}=e[n],f=Array.isArray(s)?s.map(u=>de(u,r)||u):de(s,r)||s;return $i(t,f,i,{fontStyle:a,fontDisplay:c,fontStretch:l})}),jh=t=>Object.keys(t).map(r=>uo(r,t[r].value)),Pl=(t,e,r)=>{if(e&&e.isVariable){let s=de(e.url,r)||e.url;return fn(s)?un(s):Cr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap"})}if(e[0])return uo(t,e,r).map(Rl);let n=Array.isArray(e.url)?e.url.map(s=>de(s,r)||s):de(e.url,r)||e.url;return Cr(t,n,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch})},Li=(t,e)=>Object.keys(t).map(o=>Pl(o,t[o].value,e));R();R();R();R();var dn={};P(dn,{animation:()=>rg,breakpoints:()=>tg,class:()=>ag,color:()=>Kh,devices:()=>eg,document:()=>K_,font:()=>Uh,fontFace:()=>zh,fontFamily:()=>Vh,fontFamilyTypes:()=>Hh,gradient:()=>Gh,grid:()=>ig,icons:()=>Jh,media:()=>Wh,reset:()=>G_,semanticIcons:()=>Zh,sequence:()=>er,shadow:()=>Xh,shape:()=>fg,sizes:()=>lg,spacing:()=>qh,svg:()=>og,svgData:()=>ng,templates:()=>sg,theme:()=>Yh,timing:()=>Qh,typography:()=>Mi,unit:()=>Bh,vars:()=>cg});var er={"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 Bh={default:"em"};var qE={browserDefault:16,base:16,type:"font-size",ratio:er["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Mi=qE;var Uh={};var Vh={},Hh={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},zh={};var Wh={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var KE={base:Mi.base,type:"spacing",ratio:er.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},qh=KE;var Kh={},Gh={};var Yh={};var Xh={};var Jh={},Zh={};var GE={default:150,base:150,type:"timing",ratio:er["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Qh=GE;var K_={};var tg={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},eg={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 rg={};var og={},ng={};var sg={};var YE={},ig=YE;var ag={};var G_={},cg={},lg={},fg={};var Ll={},Ml={},Il=dn,Dl={},Ni=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Il){let e=t.toLowerCase();Dl[e]=Il[t];let r=Ni(e);r!==e&&(Dl[r]=Il[t]),e!==t&&(Dl[t]=Il[t])}var po={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Ll,cssMediaVars:Ml,CSS_VARS:Ll,CSS_MEDIA_VARS:Ml,_scratchConfig:!0,...Dl},pn=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return bt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let r=bt(e)?e:t.globalTheme,o=hs(bt(r)?r:"auto");return Object.defineProperty(t,"globalTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},Y_=t=>t?pn(t):null,hn=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return bt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let r=bt(e)?e:t.resolvedTheme,o=hs(bt(r)?r:null);return Object.defineProperty(t,"resolvedTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},X_=t=>t?hn(t):null;pn(po);hn(po);var $l=dt(po),pe={active:"0",0:po},J_=t=>(bt(t)&&(pe.active=t),pe[t||pe.active]),Fi=[],it=t=>{t&&t._scratchConfig&&Fi.push(t)},tt=()=>{Fi.pop()},C=t=>Fi.length?Fi[Fi.length-1]:pe[t||pe.active]||po,Fl=t=>{if(S(t))return pe.active="1",pe[1]=st(t,dt($l)),pn(pe[1]),hn(pe[1]),t},XE=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],JE=["useVariable","globalTheme","verbose"],ZE=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],QE=t=>{for(let e of ZE){let r;for(let o of e){let n=t[o];S(n)&&(r=r?st(n,r):n)}if(r)for(let o of e)S(t[o])&&(t[o]=r)}},ji=(t,e,{cleanBase:r=!1}={})=>{let o=r?null:C(),n=dt(!r&&o&&o._scratchConfig?o:$l);for(let i of XE)delete n[i];for(let i of JE)Object.prototype.hasOwnProperty.call($l,i)?n[i]=$l[i]:delete n[i];let s=st(e||{},n);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,QE(s),pn(s),hn(s),t&&(pe[t]=s),s};var Ve={"-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"},ug=(t,e)=>{let{key:r,variable:o,value:n,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(n*100)/100,val:~~n,scaling:s,index:i,scalingVariable:a,variable:o},e.scales[r]=s;let c=Z_.has(e.unit)?"rem":e.unit;e.vars[o]=s+c},rr=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},Z_=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Bi=(t,e)=>{let{base:r,type:o,unit:n}=e,s=Z_.has(n)?"rem":n,i=(Xr(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(o&&o.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=Ve[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=Ve[t+1],u=Math.abs(t),d=Math.pow(Q_,2*u),h=Ve[u];return h?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${h}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Nl=(t,e,r,o)=>{let{type:n}=o,i=t===2&&e.length===2?t+1:t,l=`${"--"+(o.varPrefix?o.varPrefix+"-":"")+(n&&n.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},Ui=(t,e)=>{let o=(t*e-t)/1.618,n=t*e-o,s=t+o,i=(n+s)/2;return[n,i,s]},Vi=(t,e)=>Ui(t,e).map(r=>r/t),Hi=(t,e)=>{let{key:r,base:o,value:n,ratio:s,variable:i,index:a}=t,l=~~(n*s)-~~n,f,[u,d,h]=Ui(n,s);l>16?f=[u,d,h]:f=[u,h],f.forEach((g,p)=>{let m=~~(g/o*1e3)/1e3,b=i+(p+1),_=a+(p+1)/10,y=Nl(p+1,f,i,e),x={key:r+(p+1),variable:b,value:g,scaling:m,scalingVariable:y,index:_};ug(x,e)})},Q_=1.618,tA=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let o=Math.abs(t),n=e*Math.pow(r,t),s=e*Math.pow(r,o)/Math.pow(Q_,2*o);return Math.max(n,s)},Yt=t=>{let{type:e,base:r,ratio:o,range:n,subSequence:s}=t,i=Math.abs(n[0])+Math.abs(n[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=n[1]-l,u=Ve[f],d=tA(f,r,o),h=~~(d/r*100)/100,g=c+u,p=Bi(f,t),m={key:u,variable:g,value:d,base:r,scaling:h,scalingVariable:p,ratio:o,index:f};ug(m,t),s&&Hi(m,t)}return t},dg=(t,e=0)=>{let{type:r,base:o,ratio:n,subSequence:s}=t,i=w(e)?e:Ve[e],a=w(e)?Object.entries(Ve).find(([,m])=>m===e)?.[0]:e;if(!i)return console.warn(`Position ${e} is out of range in numToLetterMap`),null;let c={sequence:{},scales:{},vars:{},...t},l=o*Math.pow(n,a),f=~~(l/o*100)/100,h="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,g=Bi(a,t),p={key:i,variable:h,value:l,base:o,scaling:f,scalingVariable:g,ratio:n,index:a};return ug(p,c),s&&Hi(p,c),c},zi=(t="A",e)=>{let r=C(),{unit:o}=r;if(w(t)&&mt(t))return`var(${t})`;if(w(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(w(t)){let y=r.sizes;if(y){let x=y[t]||y[t.toLowerCase()];if(x!==void 0)return t.slice(0,1)==="-"?`calc(${x} * -1)`:x}}let{sequence:n,unit:s=o.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(gs(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+"-":""}${Ti(e.type.replace(".","-"))}-`,h=t.toUpperCase(),g=h.slice(0,1)==="-"?"-":"",p=g?h.slice(1):h,m="";p.includes("_")&&(m="_"+p.split("_")[1].toLowerCase(),p=p.split("_")[0]);let b=y=>a.test(y)?`var(${d}${y}${m})`:y;if(p.includes("+")){let[y,x]=p.split("+"),k=`${b(y)} + ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("*")){let[y,x]=p.split("*"),k=`${b(y)} * ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("-")){let[y,x]=p.split("-"),k=`${b(y)} - ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}if(!n[p]&&p.length===2&&(r.verbose&&console.warn(p,"- value is not found because `subSequence` is set to false"),p=p.slice(0,1)),i||r.useVariable){let y=`var(${d}${p}${m})`;return g?`calc(${y} * -1)`:y}let _=n?n[p]:null;if(!_){if(console.warn("can't find",n,p),Pt())throw new Error(`[smbls] Unresolvable design-system token "${t}"`+(e.type?` for sequence "${e.type}"`:"")+" \u2014 not a registered `sizes` name and not a valid spacing/typography/timing sequence letter. The CSS property using it would silently be dropped in production. Register the token in `designSystem/sizes.js` (or the relevant sequence family) or fix the typo.");return}return s==="ms"||s==="s"?g+_.val+s:g+_.scaling+s},jl=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let o=/(\s+-\s+|\s*[+*/,]\s*)/;return t.split(o).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:zi(i,e)}).join("")},He=(t,e,r,o)=>{if(typeof t!="string")return C().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!o&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=rr(t);o=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=jl(t,r):t=zi(t,r),{[e]:o?`${o}(${t})`:t}},Bl=(t,e)=>Ve[t-e],Wi=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((o,n)=>{let s=Bl(e,n);return r[s]})};R();var pg=(t,e)=>{let r=C(),{cssVars:o}=r;H(t.value)||(o[t.var]=t.value)},qi=(t,e,r)=>{let o=C(),{unit:n}=o,s=e.unit||n.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[d,h,g]=Vi(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${h/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${g/a})`},tx=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),or=(t,e={})=>{let r=C(),{unit:o,timing:n,cssVars:s}=r,i=t.unit||o.default,a=tx.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||qi(s,t,e);for(let u in l){let d=l[u],h=(t.type===n.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=h,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=h:(s[d.variable+"_default"]=h,s[d.variable]=`var(${d.variable+"_default"})`)}},Er=(t,e,r={})=>{let o=C(),{unit:n,media:s,cssVars:i}=o,a=e.slice(1),c=t[e],l=c.unit||t.unit||n.default,f=tx.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:h}=c,g=s[a];if(!g&&o.verbose&&console.warn("Can't find media query ",g),!u){let p=i[`@media ${g}`];p||(p=i[`@media ${g}`]={}),qi(p,c,r);let m=t.unit||n.default;if(f!==m&&d)for(let b in d){let _=d[b],y=h[b]+f;p[_.variable+"_default"]=y,p[_.variable]=y}return}for(let p in d){let m=d[p],b=(Xr(f)?h[p]:d[p].val)+f;!g&&o.verbose&&console.warn("Can't find query ",g);let _=i[`@media ${g}`];_||(_=i[`@media ${g}`]={}),_[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=b}};R();var rx=ro(),gn=t=>{let e=C(),r="";for(let o in t)e.__svgCache[o]||(e.__svgCache[o]=!0,r+=t[o]);return r},eA=t=>{let e=t&&(t.default||t);if(!w(e))return rx&&console.warn("parseRootAttributes:",e,"is not a string"),{};let r=e.match(/<svg\s+(.*?)>/);if(!r||!r[1])return{};let n=r[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return n?n.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},rA=(t,e)=>{let r=[];if(t.replace(/id="([^"]*)"/g,(n,s)=>(r.push(s),n)),!r.length)return t;let o=t;for(let n of r){let s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${n}`;o=o.replace(new RegExp(`id="${s}"`,"g"),`id="${i}"`).replace(new RegExp(`url\\(#${s}\\)`,"g"),`url(#${i})`).replace(new RegExp(`xlink:href="#${s}"`,"g"),`xlink:href="#${i}"`).replace(new RegExp(`href="#${s}"`,"g"),`href="#${i}"`)}return o},ex=new Set,Ki=(t,e)=>{let r=e&&e.default?e.default:e;if(!w(r))return rx&&!ex.has(t)&&(ex.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=r;let o=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(o){let u=o[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let n=eA(e),{width:s,height:i}=n,a=n.viewBox||`0 0 ${s||24} ${i||24}`,f=rA(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/width="[^"]*"/,""),f=f.replace(/height="[^"]*"/,""),f=f.replace("</svg","</symbol"),f=sA(f),f},oA="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",nA=new RegExp(`<(${oA})\\b([^>]*?)\\s*/>`,"g"),sA=t=>t.replace(nA,"<$1$2></$1>");var _n={};P(_n,{STANDARD_SCHEME_QUERIES:()=>Ul,appendSVGSprite:()=>la,appendSvgIconsSprite:()=>yo,applyDocument:()=>ca,applyHeadings:()=>Wl,applyReset:()=>fa,applySpacingSequence:()=>Yi,applyTimingSequence:()=>aa,applyTypographySequence:()=>na,checkIfBoxSize:()=>Gi,getColor:()=>et,getFontFamily:()=>oa,getFontSizeByKey:()=>sa,getMediaColor:()=>It,getMediaTheme:()=>ge,getSafeInk:()=>Vl,getSafeInkInfo:()=>hg,getShadow:()=>Ji,getShapeByKey:()=>ia,getSpacingBasedOnRatio:()=>Ae,getSpacingByKey:()=>St,getTheme:()=>Qi,getTimingByKey:()=>re,getTimingFunction:()=>me,resolveBorderValue:()=>ee,resolveColorRgb:()=>ho,resolveShadowValue:()=>go,runThroughMedia:()=>zl,setAdaptiveSchemeVar:()=>Or,setColor:()=>Tr,setFont:()=>ra,setFontFamily:()=>yn,setGradient:()=>mn,setMediaTheme:()=>ea,setSVG:()=>bn,setShadow:()=>Rr,setSvgIcon:()=>mo,setTheme:()=>ta,splitSpacedValue:()=>Xi});R();var Ul={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},he=new Set,iA=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"]),ox=new Set,aA=t=>{if(!t)return!1;let{color:e,gradient:r}=t;return!!(S(e)&&Object.keys(e).length||S(r)&&Object.keys(r).length)},sx=(t,e,r)=>{let o=w(e)?e.toLowerCase():"";if(!iA.has(o)||!aA(r))return t;if(!ox.has(o)){ox.add(o);let n=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color \`${t}\` is a CSS named colour that is not in the palette${n}. Dropped rather than emitted as a raw browser colour, which renders theme-blind and can be unreadable ("looks designed", so it ships unnoticed). Define it in designSystem/color.js or use a palette token.`)}},et=(t,e,r)=>{let o=r||C();if(!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let n,s,i;if(O(t))[n,s,i]=t;else{let u=Gt(t);if(!u){let{color:d,gradient:h}=o,g=h[t]||d[t];return g?(e&&g[e]&&(g=g[e]),o.useVariable?`var(${g.var})`:g.value):t}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=o,l=a[n]||c[n];if(!l)return sx(t,n,o);if(e)if(l[e]!==void 0)l=l[e];else if(O(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&o.verbose&&console.warn(t," - array-form color tokens only support light/dark; falling back to the light slot for scheme",e),l=l[0])}else o.verbose&&console.warn(t," - does not have ",e);if(w(l)){if(he.has(n))return l;he.add(n);try{return et(l,null,r)}finally{he.delete(n)}}let f=l.rgb;if(!f){let u=o.useVariable?`var(${l.var})`:l.value;if((s||i)&&u){let d=s!==void 0?s:1;if(!i)return`rgb(from ${u} r g b / ${d})`;if(i.charCodeAt(0)===43||i.charCodeAt(0)===45){let g=parseFloat(i),p=g<0?"-":"+",m=Math.abs(g);return`rgb(from ${u} calc(r ${p} ${m}) calc(g ${p} ${m}) calc(b ${p} ${m}) / ${d})`}return`hsl(from ${u} h s ${i}% / ${d})`}return u}return i&&!l[i]&&(f=Ue(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, 1)`:o.useVariable?`var(${l.var})`:`rgb(${f})`},nx=t=>{let e=ue(t);return!e||e.length<3||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===0&&t.toLowerCase()!=="transparent"?null:{rgb:[e[0],e[1],e[2]],alpha:e[3]!==void 0?e[3]:1}},cA=(t,e)=>{if(!e)return t;let r=t.rgb;if(e.tone){let n=Ue(r,e.tone);r=w(n)?n.split(",").map(s=>parseFloat(s.trim())):n}let o=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:r,alpha:o}},ho=(t,e,r)=>{let o=e||C();if(!w(t))return null;let n=Gt(t);if(n){if(n.passthrough){let d=ue(n.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(n.cssVar)return null}let s=n?n.name:t,{color:i,gradient:a}=o,c=i[s]||a[s];if(!c)return nx(t);if(w(c)){let d;if(he.has(s))d=nx(c);else{he.add(s);try{d=ho(c,o,r)}finally{he.delete(s)}}return d?cA(d,n):null}if(c.rgb===void 0&&S(c)){let d=`@${r||"light"}`;c=c[d]!==void 0?c[d]:c["@light"]}if(!c||c.rgb===void 0)return null;let l=c.rgb;n&&n.tone&&(l=Ue(l,n.tone));let f=w(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=n&&n.alpha!==void 0?parseFloat(n.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},It=(t,e,r)=>{let o=r||C();if(e||(e=o.globalTheme==="auto"?null:o.globalTheme),!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;let n,s,i;if(O(t))n=t[0];else{let u=Gt(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}else n=t}let{color:a,gradient:c}=o,l=a[n]||c[n],f=S(l);if(f&&l.value)return et(t,`@${e}`,r);if(f){if(o.useVariable&&l.var)return s||i?et(t,null,r):`var(${l.var})`;if(e)return et(t,`@${e}`,r);{let u={},d=o.scopeSelector||":root",h=d===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${d}:not([data-theme])`;for(let g in l){if(g.charCodeAt(0)!==64)continue;let p=g.slice(1),m=et(t,g,r);if(m!==void 0&&(u[`[data-theme="${p}"] &`]=m,p==="light"||p==="dark")){let b=o.media&&o.media[p]||Ul[p];if(!b)continue;let _="@media "+(b==="print"?`${b}`:`screen and ${b}`);u[_]={[`${h} &`]:m}}}return u}}else return sx(t,n,o)},Or=(t,e,r,o)=>{let s=`--${o.varPrefix?o.varPrefix+"-":""}${e}-${r}`,i,a={};for(let c in t){if(c.charCodeAt(0)!==64)continue;let l=c.slice(1),f=t[c],u=f&&(f.value||f);!u||typeof u!="string"||(a[l]=u,(l==="light"||i===void 0)&&(i=u))}if(i!==void 0){o.cssVars[s]=i,o.cssMediaVars||(o.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(o.cssMediaVars[l]||(o.cssMediaVars[l]={}),o.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;o.cssMediaVars[f]||(o.cssMediaVars[f]={}),o.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},Tr=(t,e,r)=>{let o=C();if(S(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0))return o.useVariable&&t.var&&(o.cssVars[t.var]=t.value),t;if(w(t)&&mt(t)){let p=t.slice(2);if(t=et(p),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=p.split(" "),b=o.color[m[0]];if(b&&!b.value&&!b.rgb&&(w(b)||O(b)||S(b))&&!he.has(m[0])){he.add(m[0]);try{o.color[m[0]]=Tr(b,m[0])}finally{he.delete(m[0])}b=o.color[m[0]]}if(b&&b.value){let _=b.rgb,y=m[1]!==void 0?m[1]:"1",x=m[2];x&&(_=Ue(_,x)),t=`rgba(${_}, ${y})`}else{let _=m[2],y=m[1]!==void 0?m[1]:"1";if(_)try{let x=ue(m[0]);x&&x.length>=3?t=`rgba(${Ue(x.slice(0,3).join(", "),_)}, ${y})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(O(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let p={};for(let m in t)m!=="var"&&(p[m]=Tr(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return o.useVariable&&Or(p,"color",e,o),p}let s=`--${o.varPrefix?o.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(w(i)&&!i.includes("(")&&!i.startsWith("#")){let p=Gt(i);if(p&&p.name&&!p.passthrough&&!p.cssVar){let m=o.color[p.name];if(m&&!m.value&&!m.rgb&&(w(m)||O(m)||S(m))&&!he.has(p.name)){he.add(p.name);try{o.color[p.name]=Tr(m,p.name)}finally{he.delete(p.name)}}let b=o.color[p.name];if(b&&b.rgb){let _=b.rgb;p.tone&&(_=Ue(_,p.tone));let y=p.alpha!==void 0?parseFloat(p.alpha):b.alpha!==void 0?b.alpha:1;i=`rgba(${_}, ${y})`}}}let a=ue(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),h=`${c}, ${l}, ${f}`,g=`rgba(${h}, ${d})`;return o.useVariable&&(o.cssVars[s]=g),{var:s,rgb:h,alpha:d,value:g}},mn=(t,e,r)=>{let o=C();if(S(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(w(t)&&mt(t)&&(t=et(t.slice(2))),O(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let i={};for(let a in t)a!=="var"&&(i[a]=mn(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return o.useVariable&&Or(i,"gradient",e,o),i}let s=`--${o.varPrefix?o.varPrefix+"-":""}gradient-${e}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[s]=t.value||t),{var:s,value:t.value||t}};R();var Vl=(t,e,r={},o)=>{let n=o||C(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=r,f=i?3:s,u=a||(n.globalTheme&&n.globalTheme!=="auto"?n.globalTheme:"light"),d=w(e)?e:String(e),h=Gt(t),g=h&&!h.passthrough&&!h.cssVar?h.name:null,p=(Y,j)=>c?{value:Y,...j}:Y;if(g){let Y=n.color[`${g}Safe`];if(Y){let j=`${d}@${u}`,pt=Y[j]!==void 0?Y[j]:Y[d];if(pt!==void 0){let Et=pt&&pt.rgb!==void 0?n.useVariable&&pt.var?`var(${pt.var})`:pt.value:et(pt,null,n);return p(Et,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=et(t,u?`@${u}`:null,n),b=ho(t,n,u),_=ho(e,n,u);if(!b||!_)return n.verbose&&console.warn("getSafeInk: could not resolve",t,e,"\u2014 returning hue unchanged"),p(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let y=lo(_.rgb,_.alpha),x=lo(b.rgb,b.alpha,y),k=ln(x,y);if(k>=f-.02)return p(m,{ratio:k,deviation:0,derived:!1,overridden:!1});let[E,T,$]=Pi(b.rgb),[,D,I]=Ii([E,T,$]),z=co(y)>.5,V=z?E:1-E,rt=Y=>{let j=z?E-Y:E+Y,pt=Math.max(0,Math.min(1,j));return{rgb:Di(pt,D,I),L:pt}},at=Y=>{let{rgb:j}=rt(Y),pt=lo(j.map(Et=>Math.round(Et)),b.alpha,y);return ln(pt,y)},G=0,K=V,lt=at(K)>=f;if(lt)for(let Y=0;Y<l;Y++){let j=(G+K)/2;at(j)>=f?K=j:G=j}else G=K;let{rgb:Ut,L:W}=rt(K),wt=Ut.map(Y=>Math.round(Y)),L=at(K),ot=b.alpha<1?`rgba(${wt.join(", ")}, ${b.alpha})`:`rgb(${wt.join(", ")})`,U=Math.abs(W-E)*100;return p(ot,{rgb:wt,ratio:L,startRatio:k,deviation:U,derived:!0,overridden:!1,reachable:lt})},hg=(t,e,r={},o)=>Vl(t,e,{...r,meta:!0},o);R();R();var lA=t=>{let r=C().spacing||{},o=parseFloat(t.spacingRatio),n={...r,ratio:Number.isFinite(o)?o:r.ratio,sequence:{},scales:{}};return Yt(n),n},fA=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;gt(r,{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Yt(r),Er(t,e)}},Gi=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),o=e.includes("border")||e.includes("outline");return r&&!o},Yi=()=>{let t=C(),{spacing:e}=t;Yt(e),or(e),fA(e)},uA=t=>{let e=C(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Yt(t)},St=(t,e="padding",r,o)=>{let n=uA(r);if(w(t)){if(!o&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!o&&t.includes("(")){let i=rr(t);o=i[0],t=i[1]}}let s=o?[t]:ao(t);if(O(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)=>He(s[f],e+l+i,n,o);return a[s.length].map((l,f)=>c(l,f))}return He(t,e,n,o)}},Ae=(t,e,r,o)=>{let n=C(),{spacing:s}=n,i=r||t[e];if(!o&&w(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!o&&w(i)&&i.includes("(")){let a=rr(i);o=a[0],i=a[1]}if(t.spacingRatio){let a=lA(t);return St(i,e,a,o)}return St(i,e,s,o)},Xi=t=>{let e=r=>{let o=["+","-","*","/"].includes(r),n=No.some(i=>t.includes(i));return o||n?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};R();var go=(t,e,r)=>!w(t)||te.test(t)?t:tr(t).map(o=>(o=o.trim(),o.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(n.startsWith("--"))return`var(${n})`;let s=et(n,e);if(Ee(s))return s;if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em"||n==="inset"||n==="none")return n;r&&r(n);let i=St(n,"shadow");return i&&i.shadow?i.shadow:n}).join(" "))).join(", "),Rr=(t,e,r,o)=>{let n=C();if(O(t)){let a={"@light":Rr(t[0],e,"light"),"@dark":Rr(t[1],e,"dark")};return n.useVariable&&Or(a,"shadow",e,n),a}if(S(t)){let a={};for(let c in t)a[c]=Rr(t[c],e,c.startsWith("@")?c.slice(1):c);return n.useVariable&&Or(a,"shadow",e,n),a}w(t)&&!te.test(t)&&(t=go(t));let i=`--${n.varPrefix?n.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[i]=t),{var:i,value:t}},Ji=(t,e)=>{let r=C();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!w(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;let[o]=O(t)?t:t.split(" "),s=r.shadow[o],i=S(s);if(!s)return r.verbose&&console.warn("Can't find color ",o),t;if(e){let a=s["@"+e]||s[e];if(a)return a.value!==void 0?a.value:a;r.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={};for(let c in s){if(c.charCodeAt(0)!==64)continue;let l=r.media[c.slice(1)];if(!l)continue;let f="@media "+(l==="print"?`${l}`:`screen and ${l}`),u=s[c],d=u&&(u.value!==void 0?u.value:u);d!==void 0&&(a[f]=d)}return a}return r.verbose&&console.warn("Can't find color",t),t};var dA=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),pA=t=>dA.has(t),ee=(t,e,r)=>{let o=t+"";if(te.test(o))return o;let n=o.trim();return n==="none"||n==="0"||n==="initial"||n==="inherit"||n==="unset"?o:o.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(mt(s))return`var(${s})`;if(pA(s)||/^\d/.test(s)||s==="0")return s;let i=et(s,e);if(Ee(i))return i;r&&r(s);let a=St(s,"border");return a&&a.border?a.border:s}).join(" ")};R();var hA=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"]),ix=["color","Color","background","Background","fill","Fill","stroke","Stroke"],gA=t=>{for(let e=0;e<ix.length;e++)if(t.includes(ix[e]))return!0;return!1},mA={boxShadow:go,textShadow:go,border:ee,borderTop:ee,borderRight:ee,borderBottom:ee,borderLeft:ee,outline:ee,columnRule:ee},yA=t=>{if(!t)return!1;let e=Gt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},ax=new Set,bA=(t,e,r,o,n,s)=>{if(!Pt())return;let i=`${t}::${e}::${r||""}::${o}`;ax.has(i)||(ax.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(r?` (${r})`:"")+` did not fully resolve: "${o}" -> "${n}" still contains the unresolved token "${s}". This is not valid CSS \u2014 the browser will drop the whole declaration. Register "${s}" as a design-system color token or fix the typo.`))},lx=(t,e,r,o)=>{let n=mA[e];if(!n)return et(r,o);let s=null,i=n(r,o,a=>{!s&&yA(a)&&(s=a)});return s&&bA(t,e,o,r,i,s),i},Hl=t=>{let e={},{state:r,media:o,helpers:n,...s}=t;return Object.keys(s).map(a=>{let l=["color","Color","background","border"].some(f=>a.includes(f));return e[a]=l?et(t[a]):t[a]}),e},Zi=t=>(t.value||(t.value=Hl(t)),t.value),Qi=(t,e)=>{let r=C();if(r.useVariable)return ge(t,e);let o=r.theme;if(w(t)){let[n,s]=t.split(" "),i=o[n];if(i){if(!s&&!e)return Zi(i);t=[n,s||e]}}if(H(t)&&t[1]){let n=t[0],s=t[1],{helpers:i,media:a,state:c}=o[n];if(a&&a[s])return Zi(a[s]);if(i&&i[s])return Zi(i[s]);if(c&&c[s])return Zi(c[s])}else if(S(t))return Hl(t)},_A=(t,e,r)=>{if(S(e))t.variants.inverse.value=Hl(e);else if(e===!0){let{color:o,background:n}=r;t.variants.inverse={value:{color:n,background:o}}}},xA=(t,e,r,o)=>{let n=Qi(r);o[`&:${e}`]=n,S(r)&&!r.value&&(r.value=n)},wA=(t,e)=>{let{state:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return xA(t,n,s,e),t}),t):void 0},SA=(t,e,r,o)=>{let n=Qi(r);o[`@media (prefers-color-scheme: ${e})`]=n,S(r)&&!r.value&&(r.value=n)},kA=(t,e)=>{let{media:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return(n==="dark"||n==="light")&&SA(t,n,s,e),n==="inverse"&&_A(t,s,e),t}),t):void 0},vA=(t,e)=>{let r=C(),{helpers:o}=t;return o?(Object.keys(o).map(s=>{let i=o[s];return w(i)?o[s]=r.theme[i]:Zi(o[s]),t}),t):void 0},ta=(t,e)=>{let r=C();if(r.useVariable)return ea(t,e);let{state:o,media:n,helpers:s}=t,i=Hl(t,e),c=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}`;return wA(t,i),kA(t,i),vA(t,i),{var:c,value:i,state:o,media:n,helpers:s}};var gg=(t,e,r)=>{let{cssVars:o}=r;r.cssMediaVars||(r.cssMediaVars={});let n=r.cssMediaVars,s=r.globalTheme!==void 0?r.globalTheme:"auto",i={},a=new Set;for(let l in t)if(t[l])for(let f of Object.keys(t[l]))a.add(f);let c=new Set;for(let l of a){let f=l.slice(0,1);if(!(f==="@"||f==="."||f===":")&&gA(l))for(let u in t){if(c.has(u))continue;let d=t[u]?.[l];if(d===void 0)continue;let h=et(d,`@${u}`);h!==void 0&&w(h)&&/^[a-z][a-zA-Z]+$/.test(h)&&!hA.has(h)&&c.add(u)}}for(let l of a){let f=l.slice(0,1),u=Object.values(t).some(d=>H(d?.[l]));if(f==="."&&u){let d=l.slice(1),h={};for(let g in t)H(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=gg(h,`${e}-${d}`,r)}else if(f===":"&&u){let d=l.replace(/^:+/,""),h={};for(let g in t)H(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=gg(h,`${e}-${d}`,r)}else if(f!=="@"&&f!=="."&&f!==":"){let h=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${l}`,g=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,p;for(let m in t){if(c.has(m))continue;let b=t[m]?.[l];if(b===void 0)continue;let _=lx(e,l,b,`@${m}`);if(_===void 0)continue;(g&&m===g||!g&&(m==="light"||p===void 0))&&(p=_);let y=`[data-theme="${m}"]`;if(n[y]||(n[y]={}),n[y][h]=_,m==="dark"||m==="light"){let x=`@media (prefers-color-scheme: ${m})`;n[x]||(n[x]={}),n[x][h]=_}}p!==void 0&&(o[h]=p),i[l]=`var(${h})`,i[`.${l}`]={[l]:i[l]}}}return(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color}),i},ea=(t,e,r,o)=>{let n=C(),{cssVars:s}=n,i={value:t},a=!r&&!o;if(H(t)){if(a&&n.useVariable){let c={};for(let l in t)l.startsWith("@")&&H(t[l])&&(c[l.slice(1)]=t[l]);if(Object.keys(c).length){let l=gg(c,e,n);Object.assign(i,l)}}for(let c in t){let l=c.slice(0,1),f=t[c];if(l==="@"||l===":"||l==="."){let u=l==="@"&&c;i[c]=ea(f,e,c,o||u)}else if(!a){let u=lx(e,c,f,o),d=[...new Set([o,r].filter(m=>m).map(m=>m.slice(1)))],h=d.length?"-"+d.join("-"):"",p=`--${n.varPrefix?n.varPrefix+"-":""}theme-${e}${h}-${c}`;n.useVariable?(n.useThemeSuffixedVars&&(s[p]=u),i[c]=`var(${p})`):i[c]=u,i[`.${c}`]={[c]:i[c]}}}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(w(t)&&mt(t)){let l=n.theme[t.slice(2)];return ge(l,o)}return i},mg=t=>{let e=C(),r={};for(let o in t){let n=o.slice(0,1);if(H(t[o])){if(n==="@")continue;n===":"?r[`&${o}`]=mg(t[o]):n==="."&&(r[`&${o}`]=mg(t[o]))}else r[o]=t[o]}return r},fx=(t,e)=>{let r=e.shift();return t[r]?fx(t[r],e):t},cx=(t,e)=>O(e)?fx(t,e):w(e)&&t[e]?t[e]:t;var ge=(t,e)=>{let r=C();if(w(t)&&mt(t)&&(t=ge(t.slice(2))),!t||!w(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[o,...n]=O(t)?t:t.split(" "),s=r.theme[o];return s&&n.length?s=cx(s,n):s&&e&&(s=cx(s,e)),mg(s)};R();R();var ra=(t,e)=>{let r=C(),o=`--font-${e}`;if(!t||O(t)&&!t[0])return;let n;if(t.isVariable){let s=de(t.url,r.files)||t.url;fn(s)?n=un(s):n=Cr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap"})}else if(t[0])n=uo(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>de(i,r.files)||i):de(t.url,r.files)||t.url;n=Cr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch})}return{var:o,value:t,fontFace:n}},oa=(t,e)=>{let r=C(),{fontFamily:o}=r;return fo(e||o,t)},yn=(t,e)=>{let r=C(),{fontFamily:o,fontFamilyTypes:n}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!o.default)&&(o.default=e),S(s)&&(s=ao(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${n[i]}`;return{var:a,value:c,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};R();var zl=t=>{let e=C(),{typography:r,media:o}=e;for(let n in t){let s=n.slice(0,1)==="@",i=t[n];if(!s)continue;let{mediaRegenerate:a}=t,c=n.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p}=t;gt(i,{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),b=i.unit||p,_=!i.unit&&m.has(p)?"rem":b,y=o[c],x="@media "+(y==="print"?`${y}`:`screen and ${y}`);if(r.templates[x]={fontSize:i.base/r.browserDefault+_},!a){gt(i,{sequence:{},scales:{},vars:{}}),Yt(i),Er(t,n);continue}gt(i,{sequence:{},scales:{},templates:{},vars:{}}),Yt(i),Er(t,n)}},Wl=t=>{let e=C();if(t.h1Matches){let r=t.unit,o=Wi(t),{templates:n}=t;for(let s in o){let i=`h${parseInt(s)+1}`,a=n[i];n[i]={fontSize:e.useVariable?`var(${o[s]?.variable})`:`${o[s]?.scaling}${r}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},na=()=>{let t=C(),{typography:e}=t;Yt(e),Wl(e),or(e),zl(e)},sa=t=>{let e=C(),{typography:r}=e;return He(t,"fontSize",r)};R();var ia=t=>{if(!w(t))return;let r=C().shape;if(r)return r[t]!==void 0?r[t]:r[t.toLowerCase()]};R();var aa=()=>{let t=C(),{timing:e}=t;Yt(e),or(e)},me=t=>{let e=C(),{timing:r}=e;return r[t]||r[Ai(t)]||t},re=(t,e="timing")=>{let r=C(),{timing:o}=r;return He(t,e,o)};R();var ca=()=>{let t=C(),{fontFamily:e,theme:r,typography:o}=t,n=t.document;return Xe(n)?(gr(t,"document",n),n=t.document={}):n||(n=t.document={}),gt(n,{theme:r.document,fontFamily:fo(e),fontSize:o.base,lineHeight:o.lineHeight})};R();var bg={document:Q},bn=(t,e)=>{let r=C();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?Ki(e,t):t},la=(t,e=bg)=>{let r=C(),o=Object.keys(t).length?{}:r.svg;for(let n in t)o[n]=t[n];dx(o,e)},mo=(t,e)=>{let r=C();return r.useIconSprite&&!r.semanticIcons?.[e]?bn(t,e):t},yo=(t,e=bg)=>{let r=C(),o=Object.keys(t).length?{}:r.icons;for(let n in t)o[n]=t[n];dx(o,e)},yg=(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},CA=(t,e)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let o=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new r().parseFromString(o,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},ux=(t,e,r)=>{for(;e.firstChild;){let o=e.firstChild;r.appendChild(t.importNode(o,!0)),o.remove()}},dx=(t,e=bg)=>{let r=C(),o=e.document||Q;if(!o||!o.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),gn(t);let n=o.querySelector("#svgSprite"),s=gn(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=CA(o,s);if(n)if(a)ux(o,a,n);else if(o.body.insertAdjacentHTML)n.insertAdjacentHTML("beforeend",s);else{let c=yg(o,{isRoot:!1});c.innerHTML=s,n.append(...c.children)}else if(a){let c=yg(o);c&&c.nodeType&&(ux(o,a,c),o.body.prepend(c))}else if(o.body.insertAdjacentHTML)o.body.insertAdjacentHTML("afterbegin",i);else{let c=yg(o);c&&c.nodeType&&(c.innerHTML=s,o.body.prepend(c))}};R();var fa=(t={})=>{let e=C(),r=e.typography||{},o=e.document||{},n=S(e.reset)?e.reset:e.reset={};if(n[":root"]){let c=n,l=r.templates||{};c.body={...e.useDocumentTheme?ge("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?ge("document"):{};if(n.html&&Wt(n.html,a),r.unit){let c=e.media||{};for(let l in r){if(l.charAt(0)!=="@")continue;let f=r[l];if(!f||f.unit===r.unit||!f.unit)continue;let u=f.unit,d=f.base||r.base,h=f.browserDefault||r.browserDefault,g=l.slice(1),p=c[g];if(!p)continue;let m="@media "+(p==="print"?p:"screen and "+p);n[m]||(n[m]={}),n[m].html||(n[m].html={}),n[m].html.fontSize=d/h+u}}return st(gt(n,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",scrollBehavior:"smooth",...a,fontSize:r.unit?r.base/r.browserDefault+r.unit:r.browserDefault+"px",fontFamily:o.fontFamily,lineHeight:o.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:o.fontFamily,fontSize:r.unit?"1"+e.unit.default:r.base/r.browserDefault+e.unit.default,...i,...s},a:{color:"currentColor"},button:{color:"inherit",font:"inherit",background:"transparent",border:"none",cursor:"pointer",appearance:"none",WebkitAppearance:"none"},"input, select, textarea":{color:"inherit",font:"inherit"},fieldset:{border:0,padding:0,margin:0}})};R();var EA=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),ze=t=>ee(t),ql=t=>te.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(mt(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=et(e);return Ee(r)?r:e}).join(" "),Kl=(t,e)=>Ji(t,e),ua=(t,e)=>te.test(t)?t:tr(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(mt(o))return`var(${o})`;if(o==="inset"||o==="none")return o;let n=et(o);if(Ee(n)){let i=It(o,e);return S(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em")return o;let s=St(o,"shadow");return s&&s.shadow?s.shadow:o}).join(" "):"")).join(", "),da=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let o=t.slice(0,r+1),n=t.slice(r+1,t.lastIndexOf(")")),s=")",a=tr(n).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||EA.has(f)||f==="transparent"||te.test(f))return f;let u=et(f);return Ee(u)?u:f}).join(" ")));return o+a.join(", ")+s},Gl=(t,e)=>{let r=C();return tr(t).map(o=>{let n=o.trim();if(mt(n))return`var(${n})`;if(/^var\(/.test(n)||n.includes("url"))return n;if(r.gradient?.[n]){let s=It(n,e);if(w(s))return s;if(S(s)){for(let i in s)if(w(s[i]))return s[i]}return n}return n.includes("gradient")?da(n,e):n.includes("/")||n.startsWith("http")||n.includes(".")&&!Gt(n)?`url(${n})`:n}).join(", ")},Yl=t=>w(t)&&t.split(" ").map(e=>St(e,"gap").gap).join(" "),_g=t=>{let e=t.split(" ");return e.length?e.map(r=>mt(r)?`var(${r})`:r.length<3||r.includes("ms")?re(r).timing||r:me(r)?me(r):r).join(" "):t},pa=(t,e,r)=>{if(w(t))return t.split(",").map(o=>re(o).timing||o).join(",")},Xl=t=>{let e=t.split(",");if(e.length)return e.map(_g).join(",")};function _t(t,e,r={},o={}){let n=ft.call(this,e||r[t]);if(n==null)return;let s;if(w(n)){if(/^(?:env|var)\(/.test(n.trim()))return{[t]:n};if(n.includes("(")){let c=rr(n);s=c[0],n=c[1]}let i=r.scaleBoxSize,a=Gi(t);!i&&a&&!o.ratio&&(n=Xi(n))}return o.ratio?Ae(r,t,n,s):St(n,t,void 0,s)}var N=(t,e=null,r)=>_t(t,e,r,{ratio:!0}),nr=(t,e,r,o="borderRadius")=>{if(w(t))return{[o]:t.split(" ").map(n=>{let s=ia(n);return s!==void 0?s:Ae(e,r,n)[r]}).join(" ")}};R();var xn="__smblsThemeRootOwner",wn=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)},px=(t,e,r)=>{if(!(!t||!e)){wn(t),t.__prefersListener=r,t.__prefersMq=e;try{e.addEventListener("change",r)}catch{e.addListener(r)}}},AA=(t,e)=>{let r=C(),{cssVars:o}=r,n=e.startsWith("--")?e:`--${e}`;return o[n]=t,t},Xt=t=>t,Jl={color:Tr,gradient:mn,font:ra,fontFamily:yn,fontfamily:yn,theme:ta,icons:mo,semanticIcons:Xt,semanticicons:Xt,svg:bn,svgData:Xt,typography:Xt,shadow:Rr,spacing:Xt,media:Xt,grid:Xt,class:Xt,timing:Xt,reset:Xt,unit:Xt,animation:Xt,vars:AA,sizes:Xt,shape:Xt},TA=(t,e,r,o)=>{gr(t,r,e);let n={};for(let s of o)t[s]===e&&(t[s]=n);return t.verbose&&console.warn("[scratch] design-system family",r,"resolved to a host object; parked it and allocated a plain bucket"),n},xg=(t,e,r)=>{let o=C(),n=Ni(t),s=n.toLowerCase(),i=o[n]||o[s]||o[t],a=Xe(i)?TA(o,i,s,[n,s,t]):i,c=Jl[n]||Jl[s];if(c)try{let l=c(e,r);return a&&(a[r]=l),a}catch(l){o.verbose&&console.warn("Error setting",s,"value",e,r,l)}if(!c){let l=a||(o[s]={});return l[r]=e,l}o.verbose&&console.warn("Can not find",s,"method in scratch")},wg=(t,e)=>{let r=C(),o=t.toLowerCase();return Xe(e)?(gr(r,o,e),r.verbose&&console.warn("[scratch] ignoring host object passed as the",o,"design-system family"),r[o]||r[t]):e==null?(r.verbose&&console.warn("[scratch] skipping empty design-system family",o),r[o]||r[t]):(Object.keys(e).sort((s,i)=>{let a=S(e[s])||O(e[s])?1:0,c=S(e[i])||O(e[i])?1:0;return a-c}).forEach(s=>{try{return xg(o,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",o,"value",e[s],s,i)}}),r[o]||r[t])},Zl=(t,e)=>{let r=e||C();r.globalTheme=t;let n=Fo(r)||(typeof document<"u"?document:null),s=n&&n.defaultView||(typeof window<"u"?window:null);if(n){let a=r.themeRoot||n.documentElement,c=t&&t!=="auto";if(a[xn]=r,c)wn(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",px(r,f,l)}else wn(r),a.setAttribute("data-theme","light"),r.resolvedTheme="light",a.style.colorScheme="light"}let i=r.varPrefix?`--${r.varPrefix}-theme-`:"--theme-";for(let a in r.cssVars)a.startsWith(i)&&delete r.cssVars[a];for(let a in r.cssMediaVars)delete r.cssMediaVars[a];if(n&&r.cssVars){let a=r.scopeSelector||":root",c=n.styleSheets;for(let l=0;l<c.length;l++)try{let f=c[l].cssRules;for(let u=0;u<f.length;u++)if(f[u].selectorText===a){for(let d in r.cssVars)f[u].style.setProperty(d,r.cssVars[d]);return r}}catch{}}return r},OA={},bo=(t,e=OA)=>{let r=e.config||C(),{version:o,verbose:n,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:h,semanticIcons:g,hoverMedia:p,files:m,assets:b,..._}=t;e.newConfig&&(r=Fl(e.newConfig)),Ye(_.document)&&(r.__domDocument=_.document,delete _.document),Ye(r.document)&&(r.__domDocument||(r.__domDocument=r.document),r.document={}),m!==void 0&&(r.files=m),b!==void 0&&(r.assets=b),n!==void 0&&(r.verbose=n),s!==void 0&&(r.useVariable=s),i!==void 0&&(r.useReset=i),c!==void 0&&(r.useFontImport=c),a!==void 0&&(r.useSvgSprite=a),l!==void 0&&(r.useIconSprite=l),d!==void 0&&(r.useDocumentTheme=d),f!==void 0&&(r.globalTheme=f),u!==void 0&&(r.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(r.useThemeSuffixedVars=t.useThemeSuffixedVars),h!==void 0&&(r.useDefaultConfig=h),g!==void 0&&(r.semanticIcons=g),p!==void 0&&(r.hoverMedia=p),r.verbose&&console.log(r);let x=Fo(r)||(typeof document<"u"?document:null),k=x&&x.defaultView||(typeof window<"u"?window:null),E=x&&(r.themeRoot||x.documentElement);if(E&&typeof E.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")wn(r),E.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,E[xn]=r,r.globalTheme==="dark"||r.globalTheme==="light"?E.style.colorScheme=r.globalTheme:E.style.colorScheme="light dark";else if(E[xn]&&E[xn]!==r&&E.hasAttribute("data-theme"))wn(r),r.resolvedTheme=E.getAttribute("data-theme");else if(k&&k.matchMedia){let z=rt=>{let at=rt.matches?"dark":"light";E.setAttribute("data-theme",at),r.resolvedTheme=at},V=k.matchMedia("(prefers-color-scheme: dark)");z(V),E.style.colorScheme="light dark",E[xn]=r,px(r,V,z)}else wn(r),E.setAttribute("data-theme","light"),r.resolvedTheme="light",E.style.colorScheme="light",E[xn]=r;r.__svgCache||(r.__svgCache={});let T=Object.keys(_).filter(I=>!I.startsWith("__")),$=new Set(T);if(T.forEach(I=>{let z=I.toLowerCase();z!==I&&$.has(z)&&st(_[z],_[I])}),T.map(I=>{let z=I.toLowerCase();if(!(z!==I&&$.has(z)))return wg(I,_[I])}),r.varPrefix&&(r.typography&&(r.typography.varPrefix=r.varPrefix),r.spacing&&(r.spacing.varPrefix=r.varPrefix),r.timing&&(r.timing.varPrefix=r.varPrefix)),_.typography)try{na()}catch(I){r.verbose&&console.warn("Error applying typography sequence",I)}if(_.spacing)try{Yi()}catch(I){r.verbose&&console.warn("Error applying spacing sequence",I)}if(_.timing)try{aa()}catch(I){r.verbose&&console.warn("Error applying timing sequence",I)}ca();let D=fa();return D&&(r.reset=D),r};var _o=new Map,wx=null,vg=null,RA=null;function ha(t){t.batchAtomicCss&&(vg=t.batchAtomicCss),t.compoundCssClass&&(RA=t.compoundCssClass)}var PA=new Set,gx=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function Cg(t){try{let e=C();e&&(e.__domDocument=t)}catch{}t&&PA.add(t)}function of(){try{let t=C();if(t){if(gx(t.__domDocument))return t.__domDocument;if(gx(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var Jt={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function nf(){return{...Jt}}function Eg(){for(let t in Jt)Jt[t]=0;ef=!1}var ef=!1,tf=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function IA(t){let e=Date.parse(t);if(!isFinite(e))return"";let r=Math.floor((Date.now()-e)/864e5);return r<1?" (today)":` (${tf(r,"day")} ago)`}function DA(){try{let t=sf();return t&&t.cssRules?t.cssRules.length:-1}catch{return-1}}function $A(t,e){if(ef)return!1;ef=!0;let r="n/a \u2014 running from src/ (unbuilt), so no dist is in play",o="this IS the source",n="@symbo.ls/css";return console.error(`[@symbo.ls/css] CSS EMIT FAILURE (${t}) \u2014 the engine emitted ${tf(Jt.variable,"variable rule")} and ${tf(Jt.atomic,"atomic rule")}, while the design system held ${tf(e,"CSS variable")}.
|
|
41
41
|
The document will render UNSTYLED and nothing else will report an error.
|
|
42
42
|
This is what a STALE dist/ looks like: an obsolete emitter against a current design system.
|
|
43
43
|
package : ${n}
|
|
44
44
|
built : ${r}
|
|
45
45
|
source : ${o}
|
|
46
|
-
emitted : ${JSON.stringify(
|
|
47
|
-
sheet : style[data-smbls] currently holds ${
|
|
46
|
+
emitted : ${JSON.stringify(Jt)}
|
|
47
|
+
sheet : style[data-smbls] currently holds ${DA()} rule(s)
|
|
48
48
|
FIX : cd smbls && npm run check:stale # every package whose src is newer than its dist
|
|
49
49
|
then rebuild the listed packages and clear the app's .parcel-cache
|
|
50
|
-
Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function
|
|
51
|
-
`);for(let g=0;g<h.length;g++)h[g]&&ge(h[g],void 0,"atomic")}s.push(u)}else if(o)for(let c=0;c<o.length;c+=2)s.push($_(o[c],o[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(vA(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var Wh=new Map,SA=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function kA(t){return typeof t!="string"||!t||t.startsWith("@media")||t.startsWith("@supports")?!1:t.split(",").every(e=>SA.test(e.trim()))}function vA(t,e,r){let o=JSON.stringify(e),n=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,s=n&&Xh(),i=(r?r+"":"")+t+o+(n&&!s?"rawhover":""),a=ho.get(i);if(a){let _=Wh.get(a);if(_)for(let b=0;b<_.length;b++)ge(_[b],void 0,"atomic");return a}a=r?`_${r}_c${Yl(i)}`:`_c${Yl(i)}`;let c=`.${a}`,l=kA(t)?`.${a}.${a}`:c,f="",u=[],d=_=>typeof _=="string"&&(_.indexOf("{")!==-1||_.indexOf("}")!==-1),h=(_,b)=>{let y="";for(let x in b){let k=b[x];if(k!=null)if(typeof k=="object")h([..._,x],k);else{if(d(k))continue;y+=mn(go(x),k)}}y&&(_.length===0?f+=y:u.push({chain:_,body:y}))};h([],e);let g=_=>{let b=_.length===1?l:c;if(!_.length)return b;let y=_[0].split(",").map(x=>x.trim()).map(x=>x.includes("&")?x.replace(/&/g,b):x.startsWith(":")?`${b}${x}`:`${b} ${x}`);for(let x=1;x<_.length;x++){let k=_[x].split(",").map(T=>T.trim()),C=[];for(let T of y)for(let $ of k)$.includes("&")?C.push($.replace(/&/g,T)):$.startsWith(":")?C.push(T+$):C.push(T+" "+$);y=C}return y.join(", ")},p=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(f){let _=`${t}{${c}{${f}}}`;p.push(_),ge(_,void 0,"atomic")}for(let _ of u){let b=g(_.chain),y=Ae(`${t}{${b}{${_.body}}}`,b,s);p.push(y),ge(y,void 0,"atomic")}return Wh.set(a,p),ho.set(i,a),a}let m=g([t]);if(f){let _=Ae(`${m}{${f}}`,m,s);p.push(_),ge(_,void 0,"atomic")}for(let _ of u){let b=g([t,..._.chain]),y=Ae(`${b}{${_.body}}`,b,s);p.push(y),ge(y,void 0,"atomic")}return Wh.set(a,p),ho.set(i,a),a}function wt(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(Zl(),typeof t=="string"){let s=t.indexOf("--")!==-1;ge(t,void 0,s?"variable":"global"),s&&D_(1);return}let e=Xh(),r=0,o=Object.keys(t),n=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};o.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?n(i)-n(s):1:-1});for(let s of o){let i=t[s];if(s.startsWith("@media")||s.startsWith("@supports"))for(let a in i){let c=i[a];if(typeof c=="object"&&c!==null){let l="",f=0;for(let u in c){let d=u.charCodeAt(0)===45&&u.charCodeAt(1)===45;d&&f++;let h=d?u:go(u);l+=mn(h,c[u])}r+=f,ge(Ae(`${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:go(a);ge(`${s}{${mn(f,c)}}`,void 0,l?"variable":"global")}}else{let a="",c=!1,l=0;for(let f in i){let u=i[f];if(typeof u=="object"&&u!==null)c=!0;else{let d=f.charCodeAt(0)===45&&f.charCodeAt(1)===45;d&&l++;let h=d?f:go(f);a+=mn(h,u)}}if(r+=l,a&&ge(Ae(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let f=[],u=[];for(let d in i)typeof i[d]=="object"&&i[d]!==null&&(d.startsWith("@media")||d.startsWith("@supports")?f.push(d):u.push(d));f.sort((d,h)=>{let g=p=>{let m=p.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return g(h)-g(d)});for(let d of u)wt({[`${s} ${d}`]:i[d]});for(let d of f)wt({[d]:{[s]:i[d]}})}}}r>0&&D_(r)}function yn(t,e){let r="";for(let o in e){let n="";for(let s in e[o])n+=mn(go(s),e[o][s]);r+=`${o}{${n}}`}return ge(`@keyframes ${t}{${r}}`,void 0,"keyframes"),t}function U_(){ho.clear(),N_=null}function Jh(){return ho.size}R();var Vg={};P(Vg,{DELEGATED_EVENTS:()=>Sn,LIFECYCLE_EVENTS:()=>Or,MIXINS:()=>Ql,NON_BUBBLING_EVENTS:()=>tf,REGISTRY:()=>Ft,SVG_TAGS:()=>xn,addDelegatedEvent:()=>aa,addMethods:()=>Tn,applyExtends:()=>vn,cacheNode:()=>Tr,create:()=>ee,createHTMLNode:()=>_n,detectTag:()=>Ar,dispose:()=>Dr,flushMounts:()=>ga,globalEventKeyInfo:()=>ef,isSvgTag:()=>wn,isValidTag:()=>bn,refreshContextProto:()=>cf,registerEvent:()=>kn,registerGlobalEvent:()=>rf,remove:()=>An,removeDelegatedEvent:()=>ca,update:()=>Cn});var Qh="http://www.w3.org/2000/svg",xn=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"]),CA=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 bn(t){return CA.has(t)||xn.has(t)}function wn(t){return xn.has(t)}function Ar(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"&&bn(e))return e;if(!r||typeof r!="string")return"div";let o=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),n=r.toLowerCase();return n.includes(".")&&(n=n.split(".")[0]),n.includes("_")&&(n=n.split("_")[0]),bn(n)&&!o.has(n)?n:"div"}var V_={};function _n(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(wn(t)){let o=e?.parent;if(t==="svg"||o?.node?.namespaceURI===Qh)return r.createElementNS(Qh,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Tr(t){let e=t.tag=Ar(t),o=wn(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Qh)?"svg:"+e:e,n=t?.context?.document||globalThis.document,s=V_[o];if(s||(s=V_[o]=_n(e,t)),!s)return null;let i=n&&s.ownerDocument!==n?_n(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var Ft=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","__name","__ref","__hash","__text","parent","node"]),Ql={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Or=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"]),tf=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"]),tg=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Sn=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 rg=new WeakMap,EA={passive:!0},AA={passive:!0,capture:!0},og=(t,e)=>tg.has(t)?e?AA:EA:e||!1;function z_(t){let e=rg.get(t);return e||(e={handlers:new Map,installed:new Set},rg.set(t,e)),e}function TA(t,e){let r=z_(e);if(r.installed.has(t))return;r.installed.add(t);let o=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",n=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let a=r.handlers.get(t);if(a){let c=a.get(i);if(c){if(n&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},og(t,o))}function aa(t,e,r,o){o||(o=e.ownerDocument?.documentElement||e.getRootNode());let n=z_(o);TA(t,o),n.handlers.has(t)||n.handlers.set(t,new WeakMap),n.handlers.get(t).set(e,r)}function ca(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=rg.get(r);if(!o)return;let n=o.handlers.get(t);n&&n.delete(e)}function H_(t){return Sn.has(t)&&!Or.has(t)}function W_(t,e){let{context:r}=t,o=r?.designSystem;return n=>{o&&st(o);try{let s=e.call(t,n,t,t.state,r);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{o&&rt()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),r?.strictMode)throw s}o&&rt()}}function kn(t,e,r){let{node:o,context:n}=e;if(!o)return;let s=W_(e,r),i=tf.has(t);if(!i&&H_(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;aa(t,o,s,a)}else o.addEventListener(t,s,og(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&H_(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;ca(t,o,a)}else o.removeEventListener(t,s,og(t,!1))})}var eg=[["onDocument","document"],["onWindow","window"]];function ef(t){if(typeof t!="string")return null;for(let e=0;e<eg.length;e++){let r=eg[e][0];if(t.length<=r.length||!t.startsWith(r))continue;let o=t.charCodeAt(r.length);if(!(o<65||o>90))return{target:eg[e][1],eventName:t.slice(r.length).toLowerCase()}}return null}var OA=/^[A-Za-z_$][\w$]*$/;function RA(t,e,r){let o=e,n=!1,s,i=!1;if(e&&typeof e=="object"&&typeof e!="function"&&(o=e.handler,n=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive)),typeof o=="string"&&OA.test(o)){let a=o;o=function(l){return t.call(a,l)}}return typeof o!="function"?null:(s===void 0&&(s=tg.has(r)),{handler:o,capture:n,passive:s,once:i})}function PA(t,e){let r=t.node?.ownerDocument||t.context?.document||(typeof document<"u"?document:null);if(!r||typeof r.addEventListener!="function")return null;if(e==="document")return r;let o=r.defaultView||(typeof window<"u"?window:null);return o&&typeof o.addEventListener=="function"?o:null}function IA(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 rf(t,e,r){let o=e.__ref;if(!o)return;let n=RA(e,r,t.eventName);if(!n)return;let s=PA(e,t.target);if(!s)return;o.__globalEvents||(o.__globalEvents=new Map);let i=t.target+":"+t.eventName+":"+(n.capture?1:0);if(o.__globalEvents.has(i))return;let a=W_(e,n.handler),c=f=>{IA(e)&&a(f)},l={capture:n.capture,passive:n.passive,once:n.once};s.addEventListener(t.eventName,c,l),o.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:c,options:l}),o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{s.removeEventListener(t.eventName,c,l),o.__globalEvents&&o.__globalEvents.delete(i)})}function q_(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 vn(t,e,r){let o=q_(e);if(!o.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<o.length;i++){let a=K_(o[i],s);a&&a!==e&&G_(t,a,r,new Set([e]))}}function K_(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(n=>n.trim()),o=e[r[0]]||e[`smbls.${r[0]}`];for(let n=1;n<r.length&&o;n++)o=o[r[n]];return o||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function G_(t,e,r,o=new Set){if(o.has(e))return;o.add(e);let n=q_(e);if(n.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<n.length;a++){let c=K_(n[a],i);c&&G_(t,c,r,o)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=Y_(t[s],i):t[s]=i}}function Y_(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=Y_(n,s):r[o]=s}return r}Vo();R();var DA=["alert","alertdialog","application","article","banner","button","cell","checkbox","columnheader","combobox","complementary","contentinfo","definition","dialog","directory","document","feed","figure","form","grid","gridcell","group","heading","img","link","list","listbox","listitem","log","main","marquee","math","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","switch","tab","table","tablist","tabpanel","term","textbox","timer","toolbar","tooltip","tree","treegrid","treeitem"],of={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","hidden","id","lang","part","placeholder","slot","spellcheck","style","tabindex","title","translate","inert","radiogroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autocapitalize","autocorrect","autosave","color","itemprop","itemscope","itemtype","itemid","itemref","results","security","unselectable","is"],a:["accesskey","charset","coords","download","href","hreflang","name","rel","rev","shape","target","type"],aria:["aria-activedescendant","aria-atomic","aria-autocomplete","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],anchor:["download","href","hreflang","media","ping","rel","target","type","referrerpolicy"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["open"],del:["cite","datetime"],dialog:["open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["acceptcharset","action","autocomplete","enctype","method","name","novalidate","target","rel"],html:["manifest"],iframe:["allow","allowfullscreen","allowtransparency","frameborder","height","loading","marginheight","marginwidth","mozallowfullscreen","name","referrerpolicy","sandbox","scrolling","seamless","src","srcdoc","webkitallowfullscreen","width"],img:["alt","crossorigin","decoding","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alt","autocomplete","capture","checked","crossorigin","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","crossorigin","href","hreflang","integrity","media","imagesrcset","imagesizes","referrerpolicy","rel","sizes","type","charset"],map:["name"],menu:["type"],media:["autoplay","controls","currenttime","defaultmuted","defaultplaybackrate","loop","mediagroup","muted","playsinline","preload","src","volume"],meta:["charset","content","http-equiv","name","media"],meter:["form","high","low","max","min","optimum","value"],quote:["cite"],object:["classid","data","form","height","name","type","usemap","width","wmode"],ol:["reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["form","for","name"],param:["name","value"],progress:["max","value"],slot:["name"],script:["async","charset","crossorigin","defer","integrity","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","disabled","form","multiple","name","required","size","value","onchange"],source:["height","media","sizes","src","srcset","type","width"],style:["media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],textarea:["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","value","wrap"],td:["align","colspan","headers","rowspan","scope","abbr","height","width","valign"],th:["align","colspan","headers","rowspan","scope","abbr"],time:["datetime"],track:["default","kind","label","src","srclang"],video:["autoplay","controls","crossorigin","disablepictureinpicture","disableremoteplayback","height","loop","muted","playsinline","poster","preload","src","width"],svg:["className","class","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabindex","crossorigin","accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clip-path","clipPathUnits","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","focusable","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","href","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","markerHeight","marker-mid","marker-start","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","paint-order","panose-1","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","textLength","text-rendering","to","transform","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","v-hanging","v-ideographic","viewBox","viewTarget","visibility","v-mathematical","widths","word-spacing","writing-mode","x1","x2","x","xChannelSelector","x-height","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xmlns","xmlns:xlink","xml:space","y1","y2","y","yChannelSelector","z","zoomAndPan"]},J_=["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"],Pr=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()):Z_(t),$A=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),Z_=t=>$A.has(t)?t.toLowerCase():null,LA=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),or=t=>typeof t=="string"&&(LA.has(t)||t.startsWith("aria-")),ze=(t,e)=>e!==!0&&e!==!1?e:or(t)?e?"true":"false":e===!0?"":e,Ir=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Pr(e)||of.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(of,t)?of[t].includes(e):!1,ig=t=>{if(!w(t))return!1;let e=t.toLowerCase();return J_.includes(e)},MA=(t,e,r)=>{let o={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(r&&n in r)continue;if(n==="aria"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])mt(e[n][a])&&(o["aria-"+a]=e[n][a]);continue}if(n==="data"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])if(mt(e[n][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());o["data-"+c]=e[n][a]}continue}let s=Ir(t,n),i=ig(n);if(mt(e[n])&&(s||i)){let a=Pr(n)||n;o[a]=e[n]}}return o},FA=(t,e)=>{let r={};if(t.attr)for(let o in t.attr)r[o]=t.attr[o](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let n=t.aria[o];typeof n=="function"&&(r["aria-"+o]=n(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let o in t.data){let n=t.data[o];if(typeof n=="function"){let s=o.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=n(e,e.state,e.context)}}return r},Rr=(t,e)=>{let r=t.call("exec",e,t);if(r)return w(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},ng=(t,e)=>{let r=(t.preSrc||"")+(Rr(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:o}=t;if(!o.files&&!o.assets)return r;if(r.startsWith("/assets/")){let n=r.slice(8),s=o.assets&&(o.assets[r]||o.assets[n]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let n=r.slice(7),s=o.files&&(o.files[r]||o.files[n]);return s&&s.content?s.content.src:r}if(o.assets){let n=o.assets[r];if(n&&n.content)return n.content.src}if(o.files){let n=o.files[r];if(n&&n.content)return n.content.src}return r},sg={src:t=>ng(t,t.src),href:t=>Rr(t,t.href),action:t=>Rr(t,t.action),poster:t=>ng(t,t.poster),data:t=>Rr(t,t.data)},ag=t=>{let e=t.tag||"div",r={};for(let o in sg)if(t[o]!==void 0&&Ir(e,o)){let n=sg[o](t);n!==void 0&&(r[o]=n)}return r},X_=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},NA=(t,e,r)=>{if(t==="$"){let n=X_(e,r);return n===void 0&&(n=!!r[e]),n}let o=r[e]===!0||r.state[e];if(!o){let n=X_(e,r);n!==void 0&&(o=n)}return t==="."?!!o:!o},jA=new Set(["$",".","!"]),BA=(t,e,r)=>{let o={},n=(s,i,a,c)=>{let l=i;o[s]=f=>{if(NA(a,c,f))return A(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!jA.has(i))continue;let a=t[s];if(!a||typeof a!="object")continue;let c=s.slice(1);for(let l in a){if(r&&l in r)continue;if(l==="aria"&&a[l]&&typeof a[l]=="object"){for(let h in a[l])n("aria-"+h,a[l][h],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let h in a[l]){let g=h.replace(/([A-Z])/g,p=>"-"+p.toLowerCase());n("data-"+g,a[l][h],i,c)}continue}let f=Ir(e,l),u=ig(l);if(!f&&!u)continue;let d=Pr(l)||l;n(d,a[l],i,c)}}return o};function Cn(t={},e={}){let r=this,o=r.__ref;if(!o)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&cg(o))try{let s=r.onBeforeUpdate(r,r.state,r.context,e);if(s&&typeof s.then=="function")s.then(()=>nr(o,!1),i=>{nr(o,!0),r.context?.plugins?.length&&Ct("error",r,{hook:"onBeforeUpdate",error:i})||console.error("[DOMQL] onBeforeUpdate error:",i)});else if(nr(o,!1),s===!1)return r}catch(s){throw nr(o,!0),s}let n=!t||Object.keys(t).length===0;if(ac(()=>{if(t.state&>(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!o.__exec.text&&r.node&&En(r,t.text??"")),t.html!==void 0&&(r.html=t.html,!o.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!o.__exec.style)for(let s in t.style){let i=t.style[s];if(i==null)continue;let a=s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=String(i).replace(/\s*!important\s*$/,"");r.node.style.setProperty(a,c,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let s in t.attr){let i=t.attr[s];i==null||i===!1&&!or(s)?r.node.removeAttribute(s):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(s,ze(s,i))}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let s in t.data)r.node.dataset[s]=t.data[s];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let s in t){if(Ft.has(s)||s==="state")continue;let i=t[s],a=r[s];if(a&&a.__ref&&typeof a.update=="function")a.update(i,e);else if(typeof i=="object"&&i!==null){let c=s.charCodeAt(0);c>=65&&c<=90&&ee(i,r,s,e)}else s!=="text"&&s!=="html"&&s!=="style"&&s!=="attr"&&s!=="data"&&(r[s]=i)}}),r.node&&n&&o.__effects&&o.__effects.length)for(let s=0;s<o.__effects.length;s++){let i=o.__effects[s];i&&!i._disposed&&!i._isSubscribeToEffect&&typeof i._execute=="function"&&i._execute()}else if(r.node&&o.__conditionalRunners)for(let s of o.__conditionalRunners)s();return Ct("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function Dr(t){if(!t)return;let e=t.__ref;if(!e)return;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(o){console.error("[smbls] onBeforeRemove error:",o)}if(e.__effects){for(let o=0;o<e.__effects.length;o++)e.__effects[o].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let o=0;o<e.__eventCleanup.length;o++)e.__eventCleanup[o]();e.__eventCleanup.length=0}if(e.__children){let o=e.__children.slice();e.__children.length=0;for(let n=0;n<o.length;n++){let s=t[o[n]];s&&s.__ref&&Dr(s)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let r=t.state?.$destroy||t.state?.destroy;if(typeof r=="function"&&t.state.__element===t&&r.call(t.state),t.parent?.__ref?.__children){let o=t.parent.__ref.__children.indexOf(t.key);o!==-1&&t.parent.__ref.__children.splice(o,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(o){console.error("[smbls] onRemove error:",o)}t.node=null,t.parent=null,t.__ref=null}function An(){Dr(this)}R();R();R();var UA=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],VA=["none","forwards","backwards","both"],HA=["normal","reverse","alternate","alternate-reverse"],zA=["running","paused"],WA=t=>/^[\d.]+m?s$/.test(t),qA=/^(?: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*\))$/,KA=t=>{let e=String(t).trim().toLowerCase();if(e===""||e==="none"||e==="initial"||e==="unset")return!0;let r=e.match(/[a-z0-9]+\([^()]*\)/g);return!r||r.join("").replace(/\s+/g,"")!==e.replace(/\s+/g,"")?!1:r.every(o=>qA.test(o.replace(/\s+/g,"")))},Q_=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),GA={transform:KA,translate:Q_,rotate:t=>Q_(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},YA=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},XA=t=>{if(!S(t))return null;let e=null,r=-1;for(let o in t){let n=YA(o);n==null||!S(t[o])||n>=r&&(r=n,e=t[o])}return e},JA=t=>{let e=XA(t);if(!e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let o of r){let n=GA[o];if(!n)return!1;let s=e[o];if(s==null||typeof s=="object"||typeof s=="function"||!n(s))return!1}return!0},ZA=(t,e)=>{if(S(t))return t;let{animation:r}=e.context&&e.context.designSystem||{},o=r&&r[t];return S(o)?o:null},QA=["reverse","alternate","alternate-reverse"],tx=(t,e,r)=>{let o=r||e.animationDirection;return o&&QA.includes(String(o))?"both":JA(ZA(t,e))?"backwards":"both"},tT=0,ex=new Map,lg=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(S(t)){let n=JSON.stringify(t),s=ex.get(n);if(s)return s;let i=`smbls-anim-${tT++}`,a=yn(i,t);return ex.set(n,a),a}let o=r&&r[t];return S(o)?yn(t,o):t},eT=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},o=t.split(/\s+/),n=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of o)r&&r[u]?n=u:WA(u)?s.push(u):UA.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):HA.includes(u)?c=u:VA.includes(u)?l=u:zA.includes(u)?f=u:n||(n=u);return{name:n,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},fg={animation:(t,e)=>{if(w(t)&&t.includes(" ")){let r=eT(t,e);return{animationName:lg(r.name||t,e),animationDuration:r.durations[0]||te(e.animationDuration||"A").timing,animationDelay:r.durations[1]||te(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||he(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||tx(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:lg(t,e),animationDuration:te(e.animationDuration||"A").timing,animationDelay:te(e.animationDelay||"0s").timing,animationTimingFunction:he(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||tx(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:lg(t,e)}),animationDuration:t=>({animationDuration:te(t).timing}),animationDelay:t=>({animationDelay:te(t).timing}),animationTimingFunction:t=>({animationTimingFunction:he(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};R();var ug={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>B("height",t,e),width:(t,e)=>B("width",t,e),boxSizing:t=>Et(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...yt("height",e),...yt("width",r||e)}},inlineSize:(t,e)=>B("inlineSize",t,e),blockSize:(t,e)=>B("blockSize",t,e),minWidth:(t,e)=>B("minWidth",t,e),maxWidth:(t,e)=>B("maxWidth",t,e),widthRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...yt("minWidth",e),...yt("maxWidth",r||e)}},minHeight:(t,e)=>B("minHeight",t,e),maxHeight:(t,e)=>B("maxHeight",t,e),heightRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...yt("minHeight",e),...yt("maxHeight",r||e)}},size:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...B("inlineSize",e),...B("blockSize",r||e)}},minBlockSize:(t,e)=>B("minBlockSize",t,e),minInlineSize:(t,e)=>B("minInlineSize",t,e),maxBlockSize:(t,e)=>B("maxBlockSize",t,e),maxInlineSize:(t,e)=>B("maxInlineSize",t,e),minSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...yt("minInlineSize",e),...yt("minBlockSize",r||e)}},maxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...yt("maxInlineSize",e),...yt("maxBlockSize",r||e)}},borderWidth:(t,e)=>B("borderWidth",t,e),borderTopWidth:(t,e)=>B("borderTopWidth",t,e),borderRightWidth:(t,e)=>B("borderRightWidth",t,e),borderBottomWidth:(t,e)=>B("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>B("borderLeftWidth",t,e),padding:(t,e)=>B("padding",t,e),scrollPadding:(t,e)=>B("scrollPadding",t,e),paddingInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...yt("paddingInlineStart",e),...yt("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...yt("paddingBlockStart",e),...yt("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>B("paddingBlockStart",t,e),paddingBottom:(t,e)=>B("paddingBlockEnd",t,e),paddingLeft:(t,e)=>B("paddingInlineStart",t,e),paddingRight:(t,e)=>B("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>B("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>B("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>B("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>B("paddingInlineEnd",t,e),margin:(t,e)=>B("margin",t,e),marginInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...yt("marginInlineStart",e),...yt("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!w(e.marginBlock))return;let[r,o]=e.marginBlock.split(" ");return{...yt("marginBlockStart",r),...yt("marginBlockEnd",o||r)}},marginTop:(t,e)=>B("marginBlockStart",t,e),marginBottom:(t,e)=>B("marginBlockEnd",t,e),marginLeft:(t,e)=>B("marginInlineStart",t,e),marginRight:(t,e)=>B("marginInlineEnd",t,e),marginInlineStart:(t,e)=>B("marginInlineStart",t,e),marginInlineEnd:(t,e)=>B("marginInlineEnd",t,e),marginBlockStart:(t,e)=>B("marginBlockStart",t,e),marginBlockEnd:(t,e)=>B("marginBlockEnd",t,e),gap:t=>({gap:Vl(t)}),columnGap:(t,e)=>Ee(e,"columnGap",t),rowGap:(t,e)=>Ee(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},flexAlign:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>rr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>rr(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>rr(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>rr(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>rr(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>rr(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var dg={fontSize:t=>Ji(t)||t,fontFamily:t=>({fontFamily:Yi(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 pg={overflow:t=>({overflow:t}),cursor:(t,e,r,o)=>{if(!t)return;let n=o.assets&&o.assets[t];if(n&&n.content)t=`url(${n.content.src})`;else{let s=o.files&&o.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var hg={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>xt(r,"k").k).join(" ")}},left:t=>xt(t,"left"),top:t=>xt(t,"top"),right:t=>xt(t,"right"),bottom:t=>xt(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>xt(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>xt(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};R();var nf=0,gg=()=>{nf++},mg=()=>{nf>0&&nf--},ye=({context:t,state:e})=>{let r=t?.designSystem,o=e?.root?.globalTheme||r?.globalTheme;return o&&o!=="auto"?o:nf>0?null:r&&r.resolvedTheme||null},re=(t,e)=>{if(e==null||e==="")return;if(!S(e))return{[t]:e};let r={},o=!1;for(let n in e){let s=e[n];if(!(s==null||s==="")){if(S(s)){let i=re(t,s);i&&(r[n]=i,o=!0);continue}r[n]={[t]:s},o=!0}}return o?r:void 0},yg={theme:(t,e)=>{if(t)return e.themeModifier?pe(t,`@${e.themeModifier}`):pe(t)},color:(t,e)=>{let r=ye(e);if(t)return re("color",Rt(t,r))},background:(t,e)=>{let r=ye(e);if(t)return w(t)&&t.includes("gradient")&&t.includes("(")?{background:na(t,r)}:re("background",Rt(t,r))},backgroundColor:(t,e)=>{let r=ye(e);if(t)return re("backgroundColor",Rt(t,r))},backgroundImage:(t,e,r,o)=>{let n=ye(e);if(!t)return;let s=o.assets&&o.assets[t];if(s&&s.content)t=s.content.src;else{let i=o.files&&o.files[t];i&&i.content&&(t=i.content.src)}return re("backgroundImage",Ul(t,n))},textStroke:t=>({WebkitTextStroke:jl(t)}),outline:t=>({outline:He(t)}),outlineOffset:(t,e)=>B("outlineOffset",t,e),border:t=>({border:He(t)}),borderColor:(t,e)=>{let r=ye(e);if(t)return re("borderColor",Rt(t,r))},borderTopColor:(t,e)=>{let r=ye(e);if(t)return re("borderTopColor",Rt(t,r))},borderBottomColor:(t,e)=>{let r=ye(e);if(t)return re("borderBottomColor",Rt(t,r))},borderLeftColor:(t,e)=>{let r=ye(e);if(t)return re("borderLeftColor",Rt(t,r))},borderRightColor:(t,e)=>{let r=ye(e);if(t)return re("borderRightColor",Rt(t,r))},borderLeft:t=>({borderLeft:He(t)}),borderTop:t=>({borderTop:He(t)}),borderRight:t=>({borderRight:He(t)}),borderBottom:t=>({borderBottom:He(t)}),shadow:(t,e)=>{let r=ye(e);if(t)return re("boxShadow",Bl(t,r))},boxShadow:(t,e)=>{if(!w(t))return;let[r,o]=t.split("!importan"),n=ye(e),s=o?" !important":"",i=oa(r.trim(),n);return w(i)?{boxShadow:i+s}:re("boxShadow",i)},textShadow:(t,{context:e})=>re("textShadow",oa(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:He(t)})};var la={transition:t=>({transition:Hl(t)}),transitionDuration:t=>({transitionDuration:sa(t)}),transitionDelay:t=>({transitionDelay:sa(t)}),transitionTimingFunction:t=>({transitionTimingFunction:he(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};R();var bg={flow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,o]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:o}}};var _g={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var bt={...fg,...ug,...dg,...pg,...hg,...yg,...la,...bg,..._g};var kt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);R();var rT=/^-?[A-Z][0-9]?$/,oT=/^[a-z][0-9]?$/,rx=/var\(\s*(--[A-Za-z0-9-]+)/g,nT=t=>{let e=new Set,r=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:r};for(let o in t){let n=t[o];if(!(!n||typeof n!="object")){if(n.sequence&&typeof n.sequence=="object")for(let s in n.sequence)e.add(s);if(n.vars&&typeof n.vars=="object")for(let s in n.vars)r.add(s)}}return{knownLetters:e,knownVars:r}},sT=(t,e)=>{if(!e.size)return[];let r=t.split(/[(),\s]+/).filter(Boolean),o=new Set;for(let n of r){if(!rT.test(n))continue;let s=n.charCodeAt(0)===45?n.slice(1):n;e.has(s)&&o.add(n)}return[...o]},iT=(t,e)=>{if(!e.size)return[];let r=[];rx.lastIndex=0;let o;for(;o=rx.exec(t);){let n=o[1];if(e.has(n))continue;let s=n.lastIndexOf("-");if(s===-1)continue;let i=n.slice(s+1);if(!oT.test(i))continue;let a=n.slice(0,s+1)+i.toUpperCase();a!==n&&e.has(a)&&r.push({varName:n,corrected:a})}return r},sf=new Set,ox=(t,e,r)=>{if(!Ot()||!w(e)||!e)return;let o;try{o=E()}catch{return}let{knownLetters:n,knownVars:s}=nT(o);if(!n.size&&!s.size)return;let i=sT(e,n),a=iT(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}`;sf.has(f)||(sf.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}`;sf.has(u)||(sf.add(u),console.warn(`[smbls/css-in-props] "${t}" on <${c}> references ${l}, which the active design system never emits. CSS custom-property names are case-sensitive \u2014 the real variable is ${f}, so this reference silently never resolves. Value: "${e}"`))}};R();var aT=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,cT=(t,e,r)=>{let{context:o}=r;if(!o.designSystem?.media)return;let n=t.slice(1),s=o.designSystem.media[n],i=oe(e,r);if(!s)return{[t]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(aT),c=a?a[1]||a[2]:n,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=o.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},nx=(t,e,r)=>({[t]:oe(e,r)}),fa=(t,e,r)=>{let o=`&${t}`,n=oe(e,r);if(t.includes(",")&&n){let s={},i={};for(let a in n)typeof n[a]=="object"&&n[a]!==null?i[a]=n[a]:s[a]=n[a];if(Object.keys(i).length){let a=o.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[o]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[o]:n}},xg=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},lT=(t,e,r)=>{let o=t.slice(1),n=xg(o,r);if(n===void 0&&(n=!!r[o]),!!n)return oe(e,r)},fT=(t,e,r)=>({[t]:e}),uT=(t,e,r)=>{let o=t.slice(1),n=r[o]===!0||r.state?.[o];if(!n)if(typeof r[o]=="function")try{n=r[o](r,r.state,r.context)}catch{}else{let s=xg(o,r);s!==void 0&&(n=s)}if(n)return oe(e,r)},dT=(t,e,r)=>{let o=t.slice(1),n=r[o]===!0||r.state?.[o];if(!n)if(typeof r[o]=="function")try{n=r[o](r,r.state,r.context)}catch{}else{let s=xg(o,r);s!==void 0&&(n=s)}if(!n)return oe(e,r)},wg=(t,e)=>oe(t,e),Sg={"@":cT,":":fa,"[":fa,"*":fa,"+":fa,"~":fa,"&":nx,">":nx,$:lT,"-":fT,".":uT,"!":dT};var af=hr(),sx=(t,e,r)=>{let o=e?.context?.designSystem;o&&st(o);try{let n={},s={},i=(a,c)=>{if(r.unpack){n={...n,...c};return}n[a]=c};for(let a in t){let c=t[a];if(a==="class"&&e.call("isString",t.class)){let l=c.split(" ");if(l.length){let f=e.context.designSystem.class,u=l.reduce((d,h)=>pt(d,f[h]),{});n.designSystemClass=u}}else if(a==="true"){let l=ct(c,e);pt(n,wg(l,e))}else if(e.classlist[a]){let l=e.classlist[a],f=A(l)?l(e,e.state,e.context):l;f&&i(a,f),!af&&S(n[a])&&(n[a].label=a)}else if(bt[a]){let l=ct(c,e);O(l)&&(l=l.reduce((u,d)=>pt(u,d),{}));let f=bt[a](l,e,e.state,e.context);O(f)&&(f=f.reduce((u,d)=>pt(u,d),{})),f&&i(a,f),!af&&S(n[a])&&(n[a].label=a)}else if(kt.has(a)){let l=ct(c,e);typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),af||ox(a,l,e),i(a,{[a]:l}),!af&&S(n[a])&&(n[a].label=a)}else s[a]=c}return[n,s]}finally{o&&rt()}},ix=(t,e)=>{let r={};for(let o in t){let n=Sg[o.slice(0,1)];if(n){let s=n(o,t[o],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?Ht(r[i],s[i]):r[i]=s[i])}}return r},oe=(t,e,r={unpack:!0})=>{let[o,n]=sx(t,e,r),s=ix(n,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return vs(o,s);o._selectors=s}return o},pT=(t,e)=>{let r={};if(t.class)for(let o in t.class)r[o]=t.class[o](e);return r};R();var ax=t=>{if(S(t))return oe(t,t)},hT=(t,e)=>{let r=ax(t);return typeof e=="function"?e(r):me(r)};R();function vg(t,e,r){let o=t?.context?.analyze;if(!o||!o.emit||e==="warn"&&!o.shouldCapture("warnings")||e==="error"&&!o.shouldCapture("errors"))return;let n=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");o.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:n||null,args:r})}var cx=new Set;function gT(t,e,r){let o=String(e);if(cx.has(o))return;cx.add(o);let n=t?.__ref?.path,s=Array.isArray(n)&&n.length?n.join("."):t?.key!=null?String(t.key):"(unknown element)",i=r!=null?`resolves to a non-function (${typeof r}) \u2014 it cannot be called`:"is not registered in context.methods, context.functions, or context.utils, and is not an element method",a=`[smbls] el.call('${o}') at <${s}>: "${o}" ${i}. Returning undefined (unchanged behavior) \u2014 check the name for typos or register the function on the project. Warned once per name; repeat misses are silent.`;vg(t,"error",[a]),console.error(a)}function mT(...t){return vg(this,"warn",t),ci.apply(this,t)}function yT(...t){return vg(this,"error",t),to.apply(this,t)}var lx={update:Cn,remove:An,getDB:di,getQuery:pi,getRootData:si,getChildren:ti,getPath:ei,nextElement:li,previousElement:fi,verbose:Ko,warn:mT,error:yT,variables:ui,spotByPath:Qs,set(t,e){let r=this.__ref;if(r){if(r.__setLocked){r.__setQueued={content:t,options:e};return}r.__setLocked=!0}try{if(this.removeContent(),t!=null){let o=this.context?.__create;o&&o(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let o=r.__setQueued;o&&(r.__setQueued=null,this.set(o.content,o.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,o=this.key,n=this.parse();return this.remove(),e(n,r,o,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let o=this[r];if(!o)continue;if(typeof t=="function"){if(t(o))return o}else if(typeof t=="string"&&o.key===t)return o;let n=o.lookdown?.(t);if(n)return n}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let o of r.__children){let n=this[o];n&&(typeof t=="function"?t(n)&&e.push(n):typeof t=="string"&&n.key===t&&e.push(n),n.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:ni,getRootState:oi,getRootContext:ii,getContext:ai,parse(t){let e={},r=t?new Set(t):null,o=this.__ref?.__exec;for(let n in this)if(!(n==="parent"||n==="node"||n==="__ref")&&!r?.has(n)){if(o&&o[n]!==void 0){e[n]=o[n];continue}typeof this[n]!="function"&&(e[n]=this[n])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let o of r.__children)this[o]?.parseDeep&&(e[o]=this[o].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let o=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),n=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(o,n,"important")}},call(t,...e){let r=this.context,o=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof o=="function")return o.call(this,...e);Ot()&&gT(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)}},kg=new WeakMap;function bT(t){if(!t)return lx;let e=kg.get(t);if(e)return e;e=Object.create(lx);let r=t.methods;if(r)for(let o in r)e[o]=r[o];return kg.set(t,e),e}function Tn(t){let e=bT(t.context);Object.setPrototypeOf(t,e)}function cf(t){if(!t)return!1;let e=kg.get(t);if(!e)return!1;let r=t.methods;if(!r)return!1;for(let o in r)e[o]=r[o];return!0}R();Vo();var Og={};P(Og,{STATE_METHODS:()=>fx,applyInitialState:()=>ff,applyStateMethods:()=>ne,callStateMethod:()=>ua,createState:()=>Eg,isTracking:()=>Tg,useHostState:()=>Ag});var fx=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"]),lf=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Te=(t,e,r,{onlyIfAbsent:o}={})=>{lf(t,"$"+e,r),!(o&&Object.prototype.hasOwnProperty.call(t,e))&&lf(t,e,r)},ua=(t,e,...r)=>{if(!t)return;let o=t["$"+e];if(typeof o=="function")return o.apply(t,r);let n=t[e];if(typeof n=="function")return n.apply(t,r)},ne=(t,e)=>{if(gt(e)){let n=e.__raw||e;Te(n,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Te(n,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Te(n,"setByPath",function(s,i,a={}){let c=s.split("."),l=e;for(let f=0;f<c.length-1;f++)l[c[f]]===void 0&&(l[c[f]]={}),l=l[c[f]];return l[c[c.length-1]]=i,e}),Te(n,"getByPath",function(s){let i=s.split("."),a=e;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a}),Te(n,"removeByPath",function(s,i={}){let a=s.split("."),c=e;for(let l=0;l<a.length-1;l++){if(c==null)return e;c=c[a[l]]}return c&&delete c[a[a.length-1]],e}),Te(n,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Te(n,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Te(n,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Te(n,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&>(a.parent);)a=a.parent;return ua(a,"update",s,i)}),Te(n,"parentUpdate",function(s,i={}){if(e.parent)return ua(e.parent,"update",s,i)}),Te(n,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(n,"root")||Object.defineProperty(n,"root",{get:function(){let s=e,i=gt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,gt(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]},o={update(n){if(!n||typeof n!="object")return e;for(let s in n)e[s]=n[s];return e},apply(n){if(typeof n!="function")return e;let s=n(e);return s?e.$update(s):e},parse(){return{...e}},toggle(n){return e[n]=!e[n],e},set(n){if(!n||typeof n!="object")return e;r();for(let s in n)e[s]=n[s];return e},replace(n){return e.$set(n)},clean(){return r(),e}};for(let n in o)if(lf(e,"$"+n,o[n]),typeof e[n]!="function"){if(Object.prototype.hasOwnProperty.call(e,n)){fc(n,"");continue}lf(e,n,o[n])}};var Eg=function(t,e,r){return t.state=ff(t,e,r),t.state},ff=function(t,e,r){let{__ref:o}=t,n=t.state;if(n==null||n===!1){let s=e?.state||{};return ne(t,s),s}if(typeof n=="string")return o&&(o.__state=n),o.__stateType="string",_T(n,t,e);if(typeof n=="number"||typeof n=="boolean"){o&&(o.__state=n,o.__stateType=typeof n,o.__hasRootState=!0);let s=qe({value:n});return s.__element=t,e?.state&&(s.parent=e.state),ne(t,s),s}if(typeof n=="function"&&(n=n(t,e?.state)||{}),typeof n=="object"&&!gt(n)){o&&(o.__hasRootState=!0),n.isRootState&&o&&(o.__hasRootState=!0);let s=qe({...n});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),ne(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return gt(n)?(n.__element=t,n):e?.state||{}};function Cg(t,e){if(!e)return t;let r=e.split("/"),o=t;for(let n of r){if(o==null)return{};o=o[n]}return o??{}}function _T(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let n=t.slice(3),s=r.state?.parent;return n&&s?Cg(s,n):s??r.state??{}}if(t.startsWith("~/")){let n=r.state;for(;n?.parent;)n=n.parent;let s=t.slice(2);return s?Cg(n,s):n??{}}let o=Cg(r.state,t);if(o&&typeof o=="object"&&!gt(o)&&!Object.getOwnPropertyDescriptor(o,"root")){let n=r.state?.root||r.state;Object.defineProperty(o,"root",{get:()=>n,enumerable:!1,configurable:!0})}return o}var Ag=(t,e)=>{if(!t)return dx;let r=wT(t,e);return!r||!r.state?dx:kT(r.state)},Tg=()=>cc()!=null,xT=128;function wT(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,o=t,n=null;for(let s=0;s<xT&&o;s++){if(r(o)&&o.state)return o;if(o.state&&!n&&(n=o),!o.parent||o.parent===o)break;o=o.parent}return n}var ST={get(t,e){return t[e]}},ux=new WeakMap,kT=t=>{let e=ux.get(t);return e||(e=new Proxy(t,ST),ux.set(t,e)),e},dx=new Proxy(Object.create(null),{get(){},has(){return!1}});var vT=1,pa=[],Dg=!1;function px(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function CT(){return typeof document<"u"&&document.visibilityState==="hidden"}var ET=250;function xx(){if(!Dg){if(Dg=!0,typeof requestAnimationFrame!="function"){setTimeout(ga,0);return}CT()?setTimeout(ga,ET):requestAnimationFrame(ga)}}var AT=300,TT=15e4;function ga(){if(Dg=!1,!pa.length)return;let t=pa.splice(0,pa.length);for(let e=0;e<t.length;e++){let r=t[e];if(r.node){if(!r.node.isConnected){let o=r.__ref||(r.__ref={});o.__mountAttempts=(o.__mountAttempts||0)+1,o.__mountFirstAttemptAt==null&&(o.__mountFirstAttemptAt=px());let n=px()-o.__mountFirstAttemptAt;o.__mountAttempts<=AT&&n<TT?(pa.push(r),xx()):console.warn("[DOMQL] onMounted dropped after",o.__mountAttempts,"attempts /",n,"ms \u2014 node never connected:",r.key||r.tag||r);continue}sr("Mounted",r,r.__ref?.__mountOptions||{})}}}function wx(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,pa.push(t),xx())}function hx(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&Ct("contentUpdate",t,e);let r=t.context?.designSystem;r&&st(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(o){if(t.context?.plugins?.length&&Ct("error",t,{hook:"onContentUpdate",error:o})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',o),t.context?.strictMode)throw o}finally{r&&rt()}}function Rn(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function OT(t){return t.charAt(2).toLowerCase()+t.slice(3)}function RT(t){return t.toLowerCase()}function $g(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function ha(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=ha(n,s):r[o]=s}return r}function ee(t,e,r,o={},n){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${vT++}`,s.parent=e||null,s.context=t.context||e?.context||o.context||{},s.context.__create||(s.context.__create=ee);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key],origin:t};if(r&&!t.extends&&!t.extend){let p=r.indexOf("_");if(p>0){let m=r.substring(0,p),_=s.context?.components;_&&(_[m]||_["smbls."+m])?t={...t,extends:m}:_&&Ot()&&/^[A-Z]\w*_\d+$/.test(r)&&console.warn(`[smbls] auto-extend: key "${r}" looks like a multi-instance (${m}_N) but neither "${m}" nor "smbls.${m}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}vn(s,t,o);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let p in t){if(p==="parent"||p==="node"||p==="__ref"||p==="extends"||p==="context"||p==="props")continue;let m=t[p],_=s[p],b=_&&m&&typeof _=="object"&&typeof m=="object"&&!Array.isArray(_)&&!Array.isArray(m)&&typeof _!="function"&&typeof m!="function";b&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?s[p]=ha(_,m):b&&a.has(p)?s[p]={..._,...m}:b&&$g(p)?s[p]=ha(_,m):s[p]=m}function l(p){for(let m in p){let _=p[m],b=s[m],y=b&&_&&typeof b=="object"&&typeof _=="object"&&!Array.isArray(b)&&!Array.isArray(_)&&typeof b!="function"&&typeof _!="function";y&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=ha(b,_):y&&a.has(m)?s[m]={...b,..._}:y&&$g(m)?s[m]=ha(b,_):s[m]=_}}c&&l(c),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,d=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,h=u||d||null;if(t.scope!==void 0||f){let p={};f&&Object.assign(p,f),t.scope!==void 0&&Object.assign(p,t.scope),s.scope=lc(p,h)}else h&&(s.scope=h);if(t.if!==void 0&&(s.if=t.if),Tn(s),PT(s,e,t),s.if!=null){let p;if(typeof s.if=="function")try{p=s.if(s,s.state,s.context)}catch(m){if(p=!1,i.__ifError=m,typeof console<"u"&&console.warn){let _=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${_} \u2014 treating as false:`,m?.message||m)}}else p=s.if;i.__if=!!p}if(i.__if)typeof s.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof s.if=="function"&&vx(s,i,s.if),s;s.tag||(s.tag=Ar(s)),sr("Init",s,o);let g=s.node=Tr(s);if(!g)return s;if(s.tag==="fragment"){let m=(s.context?.document||globalThis.document).createComment("");g.appendChild(m),i.__fragmentAnchor=m}sr("AttachNode",s,o),g.setAttribute&&s.key&&g.setAttribute("data-key",s.key),e&&(e[s.key]=s,e.__ref?.__children&&(e.__ref.__children.includes(s.key)||e.__ref.__children.push(s.key))),g.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&g.setAttribute("data-smbls-app",s.context.key),s.id&&g.setAttribute&&(g.id=s.id),Tx(s,o),kx(s),Lg(s),Ex(s),KT(s);try{Ox(s,o)}catch(p){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,p?.message||p,p?.stack?`
|
|
50
|
+
Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function Sx(){try{let t=C(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function mx(t){ef||Jt.variable>0||Jt.atomic>0||kx(Math.max(t,Sx()))}function Ag(t){let e=t&&(t.CSS_VARS||t.cssVars);return kx(e?Object.keys(e).length:Sx())}function kx(t){let e=nf();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!sf())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 $A(r,t),{ok:!1,reason:r,stats:e,varCount:t}}var LA={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 xo(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function rf(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 MA(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():rf(e)}var FA={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"};function Sn(t,e){let r=FA[t];return r?`${t}:${e};${r}:${e};`:`${t}:${e};`}var NA="@media (hover: hover)",jA=/(?:^|[^\\]):hover(?![\w-])/;function Tg(){try{let t=C();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Te(t,e,r){return r===!1||!jA.test(e)||r===void 0&&!Tg()?t:`${NA}{${t}}`}function yx(t,e,r){let o=(r?r+"":"")+t+":"+e,n=_o.get(o),s=n?null:xo(t);if(!n){let c=LA[t]||rf(t),l=MA(e);n=r?`_${r}_${c}-${l}`:`_${c}-${l}`,_o.set(o,n)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return n;let i=s||xo(t),a=`.${n}{${Sn(i,e)}}`;return ye(a,void 0,"atomic"),n}var bx=new WeakMap,_x=new WeakMap;function ye(t,e,r){let o=sf(e);if(!o)return Jt.dropped++,"dropped";let n=bx.get(o);if(n||(n=new Set,bx.set(o,n)),n.has(t))return Jt.duplicate++,Jt[r||"global"]++,"duplicate";let s=_x.get(o);if(s&&s.has(t))return Jt.invalid++,"invalid";try{o.insertRule(t,o.cssRules.length)}catch{return s||(s=new Set,_x.set(o,s)),s.add(t),Jt.invalid++,"invalid"}return n.add(t),Jt[r||"global"]++,"inserted"}var xx=new WeakMap;function sf(t){let e=t||of();if(!e||!e.head)return null;let r=xx.get(e);if(r&&r.ownerNode&&r.ownerNode.parentNode===e.head)return r;let o=e.head.querySelector("style[data-smbls]");o||(o=e.createElement("style"),o.setAttribute("data-smbls",""),e.head.appendChild(o));let n=o.sheet;return xx.set(e,n),wx=n,n}var BA=8;function be(t,e,r){if(!t||typeof t!="object")return"";let o=null,n=0,s=[],i=[];for(let c in t){let l=t[c];l==null||l===!1||l===""||(typeof l=="object"?i.push([c,l]):vg?(o||(o=[]),o.push(c,String(l)),n++):s.push(yx(c,String(l),r)))}if(o&&n>=BA){let c=o.join("\0"),l=vg(c),f=l.indexOf("\0"),u=l.substring(0,f),d=l.substring(f+1);if(d){let h=d.split(`
|
|
51
|
+
`);for(let g=0;g<h.length;g++)h[g]&&ye(h[g],void 0,"atomic")}s.push(u)}else if(o)for(let c=0;c<o.length;c+=2)s.push(yx(o[c],o[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(HA(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var kg=new Map,UA=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function VA(t){return typeof t!="string"||!t||t.startsWith("@media")||t.startsWith("@supports")?!1:t.split(",").every(e=>UA.test(e.trim()))}function HA(t,e,r){let o=JSON.stringify(e),n=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,s=n&&Tg(),i=(r?r+"":"")+t+o+(n&&!s?"rawhover":""),a=_o.get(i);if(a){let b=kg.get(a);if(b)for(let _=0;_<b.length;_++)ye(b[_],void 0,"atomic");return a}a=r?`_${r}_c${rf(i)}`:`_c${rf(i)}`;let c=`.${a}`,l=VA(t)?`.${a}.${a}`:c,f="",u=[],d=b=>typeof b=="string"&&(b.indexOf("{")!==-1||b.indexOf("}")!==-1),h=(b,_)=>{let y="";for(let x in _){let k=_[x];if(k!=null)if(typeof k=="object")h([...b,x],k);else{if(d(k))continue;y+=Sn(xo(x),k)}}y&&(b.length===0?f+=y:u.push({chain:b,body:y}))};h([],e);let g=b=>{let _=b.length===1?l:c;if(!b.length)return _;let y=b[0].split(",").map(x=>x.trim()).map(x=>x.includes("&")?x.replace(/&/g,_):x.startsWith(":")?`${_}${x}`:`${_} ${x}`);for(let x=1;x<b.length;x++){let k=b[x].split(",").map(T=>T.trim()),E=[];for(let T of y)for(let $ of k)$.includes("&")?E.push($.replace(/&/g,T)):$.startsWith(":")?E.push(T+$):E.push(T+" "+$);y=E}return y.join(", ")},p=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(f){let b=`${t}{${c}{${f}}}`;p.push(b),ye(b,void 0,"atomic")}for(let b of u){let _=g(b.chain),y=Te(`${t}{${_}{${b.body}}}`,_,s);p.push(y),ye(y,void 0,"atomic")}return kg.set(a,p),_o.set(i,a),a}let m=g([t]);if(f){let b=Te(`${m}{${f}}`,m,s);p.push(b),ye(b,void 0,"atomic")}for(let b of u){let _=g([t,...b.chain]),y=Te(`${_}{${b.body}}`,_,s);p.push(y),ye(y,void 0,"atomic")}return kg.set(a,p),_o.set(i,a),a}function kt(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(sf(),typeof t=="string"){let s=t.indexOf("--")!==-1;ye(t,void 0,s?"variable":"global"),s&&mx(1);return}let e=Tg(),r=0,o=Object.keys(t),n=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};o.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?n(i)-n(s):1:-1});for(let s of o){let i=t[s];if(s.startsWith("@media")||s.startsWith("@supports"))for(let a in i){let c=i[a];if(typeof c=="object"&&c!==null){let l="",f=0;for(let u in c){let d=u.charCodeAt(0)===45&&u.charCodeAt(1)===45;d&&f++;let h=d?u:xo(u);l+=Sn(h,c[u])}r+=f,ye(Te(`${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:xo(a);ye(`${s}{${Sn(f,c)}}`,void 0,l?"variable":"global")}}else{let a="",c=!1,l=0;for(let f in i){let u=i[f];if(typeof u=="object"&&u!==null)c=!0;else{let d=f.charCodeAt(0)===45&&f.charCodeAt(1)===45;d&&l++;let h=d?f:xo(f);a+=Sn(h,u)}}if(r+=l,a&&ye(Te(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let f=[],u=[];for(let d in i)typeof i[d]=="object"&&i[d]!==null&&(d.startsWith("@media")||d.startsWith("@supports")?f.push(d):u.push(d));f.sort((d,h)=>{let g=p=>{let m=p.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return g(h)-g(d)});for(let d of u)kt({[`${s} ${d}`]:i[d]});for(let d of f)kt({[d]:{[s]:i[d]}})}}}r>0&&mx(r)}function kn(t,e){let r="";for(let o in e){let n="";for(let s in e[o])n+=Sn(xo(s),e[o][s]);r+=`${o}{${n}}`}return ye(`@keyframes ${t}{${r}}`,void 0,"keyframes"),t}function vx(){_o.clear(),wx=null}function Og(){return _o.size}R();var xm={};P(xm,{DELEGATED_EVENTS:()=>Tn,LIFECYCLE_EVENTS:()=>Dr,MIXINS:()=>af,NON_BUBBLING_EVENTS:()=>cf,REGISTRY:()=>Nt,SVG_TAGS:()=>En,addDelegatedEvent:()=>ga,addMethods:()=>$n,applyExtends:()=>Rn,cacheNode:()=>Ir,create:()=>oe,createHTMLNode:()=>Cn,detectTag:()=>Pr,dispose:()=>Fr,flushMounts:()=>ka,globalEventKeyInfo:()=>lf,isSvgTag:()=>An,isValidTag:()=>vn,refreshContextProto:()=>gf,registerEvent:()=>On,registerGlobalEvent:()=>ff,remove:()=>Dn,removeDelegatedEvent:()=>ma,update:()=>Pn});var Pg="http://www.w3.org/2000/svg",En=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"]),zA=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 vn(t){return zA.has(t)||En.has(t)}function An(t){return En.has(t)}function Pr(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"&&vn(e))return e;if(!r||typeof r!="string")return"div";let o=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),n=r.toLowerCase();return n.includes(".")&&(n=n.split(".")[0]),n.includes("_")&&(n=n.split("_")[0]),vn(n)&&!o.has(n)?n:"div"}var Cx={};function Cn(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(An(t)){let o=e?.parent;if(t==="svg"||o?.node?.namespaceURI===Pg)return r.createElementNS(Pg,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Ir(t){let e=t.tag=Pr(t),o=An(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Pg)?"svg:"+e:e,n=t?.context?.document||globalThis.document,s=Cx[o];if(s||(s=Cx[o]=Cn(e,t)),!s)return null;let i=n&&s.ownerDocument!==n?Cn(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","__name","__ref","__hash","__text","parent","node"]),af={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Dr=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"]),cf=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"]),Ig=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Tn=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 $g=new WeakMap,WA={passive:!0},qA={passive:!0,capture:!0},Lg=(t,e)=>Ig.has(t)?e?qA:WA:e||!1;function Ax(t){let e=$g.get(t);return e||(e={handlers:new Map,installed:new Set},$g.set(t,e)),e}function KA(t,e){let r=Ax(e);if(r.installed.has(t))return;r.installed.add(t);let o=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",n=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let a=r.handlers.get(t);if(a){let c=a.get(i);if(c){if(n&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},Lg(t,o))}function ga(t,e,r,o){o||(o=e.ownerDocument?.documentElement||e.getRootNode());let n=Ax(o);KA(t,o),n.handlers.has(t)||n.handlers.set(t,new WeakMap),n.handlers.get(t).set(e,r)}function ma(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=$g.get(r);if(!o)return;let n=o.handlers.get(t);n&&n.delete(e)}function Ex(t){return Tn.has(t)&&!Dr.has(t)}function Tx(t,e){let{context:r}=t,o=r?.designSystem;return n=>{o&&it(o);try{let s=e.call(t,n,t,t.state,r);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{o&&tt()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),r?.strictMode)throw s}o&&tt()}}function On(t,e,r){let{node:o,context:n}=e;if(!o)return;let s=Tx(e,r),i=cf.has(t);if(!i&&Ex(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;ga(t,o,s,a)}else o.addEventListener(t,s,Lg(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&Ex(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;ma(t,o,a)}else o.removeEventListener(t,s,Lg(t,!1))})}var Dg=[["onDocument","document"],["onWindow","window"]];function lf(t){if(typeof t!="string")return null;for(let e=0;e<Dg.length;e++){let r=Dg[e][0];if(t.length<=r.length||!t.startsWith(r))continue;let o=t.charCodeAt(r.length);if(!(o<65||o>90))return{target:Dg[e][1],eventName:t.slice(r.length).toLowerCase()}}return null}var GA=/^[A-Za-z_$][\w$]*$/;function YA(t,e,r){let o=e,n=!1,s,i=!1;if(e&&typeof e=="object"&&typeof e!="function"&&(o=e.handler,n=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive)),typeof o=="string"&&GA.test(o)){let a=o;o=function(l){return t.call(a,l)}}return typeof o!="function"?null:(s===void 0&&(s=Ig.has(r)),{handler:o,capture:n,passive:s,once:i})}function XA(t,e){let r=t.node?.ownerDocument||t.context?.document||(typeof document<"u"?document:null);if(!r||typeof r.addEventListener!="function")return null;if(e==="document")return r;let o=r.defaultView||(typeof window<"u"?window:null);return o&&typeof o.addEventListener=="function"?o:null}function JA(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 ff(t,e,r){let o=e.__ref;if(!o)return;let n=YA(e,r,t.eventName);if(!n)return;let s=XA(e,t.target);if(!s)return;o.__globalEvents||(o.__globalEvents=new Map);let i=t.target+":"+t.eventName+":"+(n.capture?1:0);if(o.__globalEvents.has(i))return;let a=Tx(e,n.handler),c=f=>{JA(e)&&a(f)},l={capture:n.capture,passive:n.passive,once:n.once};s.addEventListener(t.eventName,c,l),o.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:c,options:l}),o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{s.removeEventListener(t.eventName,c,l),o.__globalEvents&&o.__globalEvents.delete(i)})}function Ox(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 Rn(t,e,r){let o=Ox(e);if(!o.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<o.length;i++){let a=Rx(o[i],s);a&&a!==e&&Px(t,a,r,new Set([e]))}}function Rx(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(n=>n.trim()),o=e[r[0]]||e[`smbls.${r[0]}`];for(let n=1;n<r.length&&o;n++)o=o[r[n]];return o||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function Px(t,e,r,o=new Set){if(o.has(e))return;o.add(e);let n=Ox(e);if(n.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<n.length;a++){let c=Rx(n[a],i);c&&Px(t,c,r,o)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=Ix(t[s],i):t[s]=i}}function Ix(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=Ix(n,s):r[o]=s}return r}qo();R();var ZA=["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"],uf={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"]},$x=["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"],Lr=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()):Lx(t),QA=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),Lx=t=>QA.has(t)?t.toLowerCase():null,tT=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),sr=t=>typeof t=="string"&&(tT.has(t)||t.startsWith("aria-")),We=(t,e)=>e!==!0&&e!==!1?e:sr(t)?e?"true":"false":e===!0?"":e,Mr=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Lr(e)||uf.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(uf,t)?uf[t].includes(e):!1,Ng=t=>{if(!w(t))return!1;let e=t.toLowerCase();return $x.includes(e)},eT=(t,e,r)=>{let o={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(r&&n in r)continue;if(n==="aria"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])bt(e[n][a])&&(o["aria-"+a]=e[n][a]);continue}if(n==="data"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])if(bt(e[n][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());o["data-"+c]=e[n][a]}continue}let s=Mr(t,n),i=Ng(n);if(bt(e[n])&&(s||i)){let a=Lr(n)||n;o[a]=e[n]}}return o},rT=(t,e)=>{let r={};if(t.attr)for(let o in t.attr)r[o]=t.attr[o](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let n=t.aria[o];typeof n=="function"&&(r["aria-"+o]=n(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let o in t.data){let n=t.data[o];if(typeof n=="function"){let s=o.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=n(e,e.state,e.context)}}return r},$r=(t,e)=>{let r=t.call("exec",e,t);if(r)return w(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},Mg=(t,e)=>{let r=(t.preSrc||"")+($r(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:o}=t;if(!o.files&&!o.assets)return r;if(r.startsWith("/assets/")){let n=r.slice(8),s=o.assets&&(o.assets[r]||o.assets[n]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let n=r.slice(7),s=o.files&&(o.files[r]||o.files[n]);return s&&s.content?s.content.src:r}if(o.assets){let n=o.assets[r];if(n&&n.content)return n.content.src}if(o.files){let n=o.files[r];if(n&&n.content)return n.content.src}return r},Fg={src:t=>Mg(t,t.src),href:t=>$r(t,t.href),action:t=>$r(t,t.action),poster:t=>Mg(t,t.poster),data:t=>$r(t,t.data)},jg=t=>{let e=t.tag||"div",r={};for(let o in Fg)if(t[o]!==void 0&&Mr(e,o)){let n=Fg[o](t);n!==void 0&&(r[o]=n)}return r},Dx=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},oT=(t,e,r)=>{if(t==="$"){let n=Dx(e,r);return n===void 0&&(n=!!r[e]),n}let o=r[e]===!0||r.state[e];if(!o){let n=Dx(e,r);n!==void 0&&(o=n)}return t==="."?!!o:!o},nT=new Set(["$",".","!"]),sT=(t,e,r)=>{let o={},n=(s,i,a,c)=>{let l=i;o[s]=f=>{if(oT(a,c,f))return A(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!nT.has(i))continue;let a=t[s];if(!a||typeof a!="object")continue;let c=s.slice(1);for(let l in a){if(r&&l in r)continue;if(l==="aria"&&a[l]&&typeof a[l]=="object"){for(let h in a[l])n("aria-"+h,a[l][h],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let h in a[l]){let g=h.replace(/([A-Z])/g,p=>"-"+p.toLowerCase());n("data-"+g,a[l][h],i,c)}continue}let f=Mr(e,l),u=Ng(l);if(!f&&!u)continue;let d=Lr(l)||l;n(d,a[l],i,c)}}return o};function Pn(t={},e={}){let r=this,o=r.__ref;if(!o)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&Bg(o))try{let s=r.onBeforeUpdate(r,r.state,r.context,e);if(s&&typeof s.then=="function")s.then(()=>ir(o,!1),i=>{ir(o,!0),r.context?.plugins?.length&&At("error",r,{hook:"onBeforeUpdate",error:i})||console.error("[DOMQL] onBeforeUpdate error:",i)});else if(ir(o,!1),s===!1)return r}catch(s){throw ir(o,!0),s}let n=!t||Object.keys(t).length===0;if(hc(()=>{if(t.state&&yt(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!o.__exec.text&&r.node&&In(r,t.text??"")),t.html!==void 0&&(r.html=t.html,!o.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!o.__exec.style)for(let s in t.style){let i=t.style[s];if(i==null)continue;let a=s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=String(i).replace(/\s*!important\s*$/,"");r.node.style.setProperty(a,c,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let s in t.attr){let i=t.attr[s];i==null||i===!1&&!sr(s)?r.node.removeAttribute(s):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(s,We(s,i))}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let s in t.data)r.node.dataset[s]=t.data[s];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let s in t){if(Nt.has(s)||s==="state")continue;let i=t[s],a=r[s];if(a&&a.__ref&&typeof a.update=="function")a.update(i,e);else if(typeof i=="object"&&i!==null){let c=s.charCodeAt(0);c>=65&&c<=90&&oe(i,r,s,e)}else s!=="text"&&s!=="html"&&s!=="style"&&s!=="attr"&&s!=="data"&&(r[s]=i)}}),r.node&&n&&o.__effects&&o.__effects.length)for(let s=0;s<o.__effects.length;s++){let i=o.__effects[s];i&&!i._disposed&&!i._isSubscribeToEffect&&typeof i._execute=="function"&&i._execute()}else if(r.node&&o.__conditionalRunners)for(let s of o.__conditionalRunners)s();return At("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function Fr(t){if(!t)return;let e=t.__ref;if(!e)return;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(o){console.error("[smbls] onBeforeRemove error:",o)}if(e.__effects){for(let o=0;o<e.__effects.length;o++)e.__effects[o].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let o=0;o<e.__eventCleanup.length;o++)e.__eventCleanup[o]();e.__eventCleanup.length=0}if(e.__children){let o=e.__children.slice();e.__children.length=0;for(let n=0;n<o.length;n++){let s=t[o[n]];s&&s.__ref&&Fr(s)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let r=t.state?.$destroy||t.state?.destroy;if(typeof r=="function"&&t.state.__element===t&&r.call(t.state),t.parent?.__ref?.__children){let o=t.parent.__ref.__children.indexOf(t.key);o!==-1&&t.parent.__ref.__children.splice(o,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(o){console.error("[smbls] onRemove error:",o)}t.node=null,t.parent=null,t.__ref=null}function Dn(){Fr(this)}R();R();R();var iT=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],aT=["none","forwards","backwards","both"],cT=["normal","reverse","alternate","alternate-reverse"],lT=["running","paused"],fT=t=>/^[\d.]+m?s$/.test(t),uT=/^(?:translate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|scale(?:3d|x|y|z)?\((?:\s*1(?:\.0+)?\s*,?)+\)|rotate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|skew(?:x|y)?\((?:\s*0[a-z%]*\s*,?)+\)|matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\))$/,dT=t=>{let e=String(t).trim().toLowerCase();if(e===""||e==="none"||e==="initial"||e==="unset")return!0;let r=e.match(/[a-z0-9]+\([^()]*\)/g);return!r||r.join("").replace(/\s+/g,"")!==e.replace(/\s+/g,"")?!1:r.every(o=>uT.test(o.replace(/\s+/g,"")))},Mx=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),pT={transform:dT,translate:Mx,rotate:t=>Mx(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},hT=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},gT=t=>{if(!S(t))return null;let e=null,r=-1;for(let o in t){let n=hT(o);n==null||!S(t[o])||n>=r&&(r=n,e=t[o])}return e},mT=t=>{let e=gT(t);if(!e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let o of r){let n=pT[o];if(!n)return!1;let s=e[o];if(s==null||typeof s=="object"||typeof s=="function"||!n(s))return!1}return!0},yT=(t,e)=>{if(S(t))return t;let{animation:r}=e.context&&e.context.designSystem||{},o=r&&r[t];return S(o)?o:null},bT=["reverse","alternate","alternate-reverse"],Fx=(t,e,r)=>{let o=r||e.animationDirection;return o&&bT.includes(String(o))?"both":mT(yT(t,e))?"backwards":"both"},_T=0,Nx=new Map,Ug=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(S(t)){let n=JSON.stringify(t),s=Nx.get(n);if(s)return s;let i=`smbls-anim-${_T++}`,a=kn(i,t);return Nx.set(n,a),a}let o=r&&r[t];return S(o)?kn(t,o):t},xT=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},o=t.split(/\s+/),n=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of o)r&&r[u]?n=u:fT(u)?s.push(u):iT.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):cT.includes(u)?c=u:aT.includes(u)?l=u:lT.includes(u)?f=u:n||(n=u);return{name:n,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},Vg={animation:(t,e)=>{if(w(t)&&t.includes(" ")){let r=xT(t,e);return{animationName:Ug(r.name||t,e),animationDuration:r.durations[0]||re(e.animationDuration||"A").timing,animationDelay:r.durations[1]||re(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||me(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||Fx(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:Ug(t,e),animationDuration:re(e.animationDuration||"A").timing,animationDelay:re(e.animationDelay||"0s").timing,animationTimingFunction:me(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||Fx(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:Ug(t,e)}),animationDuration:t=>({animationDuration:re(t).timing}),animationDelay:t=>({animationDelay:re(t).timing}),animationTimingFunction:t=>({animationTimingFunction:me(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};R();var Hg={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>N("height",t,e),width:(t,e)=>N("width",t,e),boxSizing:t=>Tt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("height",e),..._t("width",r||e)}},inlineSize:(t,e)=>N("inlineSize",t,e),blockSize:(t,e)=>N("blockSize",t,e),minWidth:(t,e)=>N("minWidth",t,e),maxWidth:(t,e)=>N("maxWidth",t,e),widthRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minWidth",e),..._t("maxWidth",r||e)}},minHeight:(t,e)=>N("minHeight",t,e),maxHeight:(t,e)=>N("maxHeight",t,e),heightRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minHeight",e),..._t("maxHeight",r||e)}},size:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...N("inlineSize",e),...N("blockSize",r||e)}},minBlockSize:(t,e)=>N("minBlockSize",t,e),minInlineSize:(t,e)=>N("minInlineSize",t,e),maxBlockSize:(t,e)=>N("maxBlockSize",t,e),maxInlineSize:(t,e)=>N("maxInlineSize",t,e),minSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minInlineSize",e),..._t("minBlockSize",r||e)}},maxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("maxInlineSize",e),..._t("maxBlockSize",r||e)}},borderWidth:(t,e)=>N("borderWidth",t,e),borderTopWidth:(t,e)=>N("borderTopWidth",t,e),borderRightWidth:(t,e)=>N("borderRightWidth",t,e),borderBottomWidth:(t,e)=>N("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>N("borderLeftWidth",t,e),padding:(t,e)=>N("padding",t,e),scrollPadding:(t,e)=>N("scrollPadding",t,e),paddingInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("paddingInlineStart",e),..._t("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("paddingBlockStart",e),..._t("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>N("paddingBlockStart",t,e),paddingBottom:(t,e)=>N("paddingBlockEnd",t,e),paddingLeft:(t,e)=>N("paddingInlineStart",t,e),paddingRight:(t,e)=>N("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>N("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>N("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>N("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>N("paddingInlineEnd",t,e),margin:(t,e)=>N("margin",t,e),marginInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("marginInlineStart",e),..._t("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!w(e.marginBlock))return;let[r,o]=e.marginBlock.split(" ");return{..._t("marginBlockStart",r),..._t("marginBlockEnd",o||r)}},marginTop:(t,e)=>N("marginBlockStart",t,e),marginBottom:(t,e)=>N("marginBlockEnd",t,e),marginLeft:(t,e)=>N("marginInlineStart",t,e),marginRight:(t,e)=>N("marginInlineEnd",t,e),marginInlineStart:(t,e)=>N("marginInlineStart",t,e),marginInlineEnd:(t,e)=>N("marginInlineEnd",t,e),marginBlockStart:(t,e)=>N("marginBlockStart",t,e),marginBlockEnd:(t,e)=>N("marginBlockEnd",t,e),gap:t=>({gap:Yl(t)}),columnGap:(t,e)=>Ae(e,"columnGap",t),rowGap:(t,e)=>Ae(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},flexAlign:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>nr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>nr(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>nr(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>nr(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>nr(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>nr(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var zg={fontSize:t=>sa(t)||t,fontFamily:t=>({fontFamily:oa(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 Wg={overflow:t=>({overflow:t}),cursor:(t,e,r,o)=>{if(!t)return;let n=o.assets&&o.assets[t];if(n&&n.content)t=`url(${n.content.src})`;else{let s=o.files&&o.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var qg={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>St(r,"k").k).join(" ")}},left:t=>St(t,"left"),top:t=>St(t,"top"),right:t=>St(t,"right"),bottom:t=>St(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>St(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>St(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};R();var df=0,Kg=()=>{df++},Gg=()=>{df>0&&df--},_e=({context:t,state:e})=>{let r=t?.designSystem,o=e?.root?.globalTheme||r?.globalTheme;return o&&o!=="auto"?o:df>0?null:r&&r.resolvedTheme||null},ne=(t,e)=>{if(e==null||e==="")return;if(!S(e))return{[t]:e};let r={},o=!1;for(let n in e){let s=e[n];if(!(s==null||s==="")){if(S(s)){let i=ne(t,s);i&&(r[n]=i,o=!0);continue}r[n]={[t]:s},o=!0}}return o?r:void 0},Yg={theme:(t,e)=>{if(t)return e.themeModifier?ge(t,`@${e.themeModifier}`):ge(t)},color:(t,e)=>{let r=_e(e);if(t)return ne("color",It(t,r))},background:(t,e)=>{let r=_e(e);if(t)return w(t)&&t.includes("gradient")&&t.includes("(")?{background:da(t,r)}:ne("background",It(t,r))},backgroundColor:(t,e)=>{let r=_e(e);if(t)return ne("backgroundColor",It(t,r))},backgroundImage:(t,e,r,o)=>{let n=_e(e);if(!t)return;let s=o.assets&&o.assets[t];if(s&&s.content)t=s.content.src;else{let i=o.files&&o.files[t];i&&i.content&&(t=i.content.src)}return ne("backgroundImage",Gl(t,n))},textStroke:t=>({WebkitTextStroke:ql(t)}),outline:t=>({outline:ze(t)}),outlineOffset:(t,e)=>N("outlineOffset",t,e),border:t=>({border:ze(t)}),borderColor:(t,e)=>{let r=_e(e);if(t)return ne("borderColor",It(t,r))},borderTopColor:(t,e)=>{let r=_e(e);if(t)return ne("borderTopColor",It(t,r))},borderBottomColor:(t,e)=>{let r=_e(e);if(t)return ne("borderBottomColor",It(t,r))},borderLeftColor:(t,e)=>{let r=_e(e);if(t)return ne("borderLeftColor",It(t,r))},borderRightColor:(t,e)=>{let r=_e(e);if(t)return ne("borderRightColor",It(t,r))},borderLeft:t=>({borderLeft:ze(t)}),borderTop:t=>({borderTop:ze(t)}),borderRight:t=>({borderRight:ze(t)}),borderBottom:t=>({borderBottom:ze(t)}),shadow:(t,e)=>{let r=_e(e);if(t)return ne("boxShadow",Kl(t,r))},boxShadow:(t,e)=>{if(!w(t))return;let[r,o]=t.split("!importan"),n=_e(e),s=o?" !important":"",i=ua(r.trim(),n);return w(i)?{boxShadow:i+s}:ne("boxShadow",i)},textShadow:(t,{context:e})=>ne("textShadow",ua(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:ze(t)})};var ya={transition:t=>({transition:Xl(t)}),transitionDuration:t=>({transitionDuration:pa(t)}),transitionDelay:t=>({transitionDelay:pa(t)}),transitionTimingFunction:t=>({transitionTimingFunction:me(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};R();var Xg={flow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,o]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:o}}};var Jg={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var xt={...Vg,...Hg,...zg,...Wg,...qg,...Yg,...ya,...Xg,...Jg};var vt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);R();var wT=/^-?[A-Z][0-9]?$/,ST=/^[a-z][0-9]?$/,jx=/var\(\s*(--[A-Za-z0-9-]+)/g,kT=t=>{let e=new Set,r=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:r};for(let o in t){let n=t[o];if(!(!n||typeof n!="object")){if(n.sequence&&typeof n.sequence=="object")for(let s in n.sequence)e.add(s);if(n.vars&&typeof n.vars=="object")for(let s in n.vars)r.add(s)}}return{knownLetters:e,knownVars:r}},vT=(t,e)=>{if(!e.size)return[];let r=t.split(/[(),\s]+/).filter(Boolean),o=new Set;for(let n of r){if(!wT.test(n))continue;let s=n.charCodeAt(0)===45?n.slice(1):n;e.has(s)&&o.add(n)}return[...o]},CT=(t,e)=>{if(!e.size)return[];let r=[];jx.lastIndex=0;let o;for(;o=jx.exec(t);){let n=o[1];if(e.has(n))continue;let s=n.lastIndexOf("-");if(s===-1)continue;let i=n.slice(s+1);if(!ST.test(i))continue;let a=n.slice(0,s+1)+i.toUpperCase();a!==n&&e.has(a)&&r.push({varName:n,corrected:a})}return r},pf=new Set,Bx=(t,e,r)=>{if(!Pt()||!w(e)||!e)return;let o;try{o=C()}catch{return}let{knownLetters:n,knownVars:s}=kT(o);if(!n.size&&!s.size)return;let i=vT(e,n),a=CT(e,s);if(!i.length&&!a.length)return;let c=r?.__ref?.path?r.__ref.path.join("."):r?.key||"?";for(let l of i){let f=`${c}::${t}::bare::${l}::${e}`;pf.has(f)||(pf.add(f),console.warn(`[smbls/css-in-props] "${t}" on <${c}> looks like it contains an un-wrapped design-system token ("${l}") \u2014 "${t}" has no registered resolver, so its value is forwarded to the browser untouched. A bare letter token there is invalid CSS, so the browser drops the ENTIRE "${t}" declaration (not just this argument). Wrap it in var(--<family>-${l.replace("-","")}) (or calc(-1 * var(--<family>-${l.replace("-","")})) for a negative). Value: "${e}"`))}for(let{varName:l,corrected:f}of a){let u=`${c}::${t}::case::${l}::${e}`;pf.has(u)||(pf.add(u),console.warn(`[smbls/css-in-props] "${t}" on <${c}> references ${l}, which the active design system never emits. CSS custom-property names are case-sensitive \u2014 the real variable is ${f}, so this reference silently never resolves. Value: "${e}"`))}};R();var ET=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,AT=(t,e,r)=>{let{context:o}=r;if(!o.designSystem?.media)return;let n=t.slice(1),s=o.designSystem.media[n],i=se(e,r);if(!s)return{[t]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(ET),c=a?a[1]||a[2]:n,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=o.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},Ux=(t,e,r)=>({[t]:se(e,r)}),ba=(t,e,r)=>{let o=`&${t}`,n=se(e,r);if(t.includes(",")&&n){let s={},i={};for(let a in n)typeof n[a]=="object"&&n[a]!==null?i[a]=n[a]:s[a]=n[a];if(Object.keys(i).length){let a=o.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[o]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[o]:n}},Zg=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},TT=(t,e,r)=>{let o=t.slice(1),n=Zg(o,r);if(n===void 0&&(n=!!r[o]),!!n)return se(e,r)},OT=(t,e,r)=>({[t]:e}),RT=(t,e,r)=>{let o=t.slice(1),n=r[o]===!0||r.state?.[o];if(!n)if(typeof r[o]=="function")try{n=r[o](r,r.state,r.context)}catch{}else{let s=Zg(o,r);s!==void 0&&(n=s)}if(n)return se(e,r)},PT=(t,e,r)=>{let o=t.slice(1),n=r[o]===!0||r.state?.[o];if(!n)if(typeof r[o]=="function")try{n=r[o](r,r.state,r.context)}catch{}else{let s=Zg(o,r);s!==void 0&&(n=s)}if(!n)return se(e,r)},Qg=(t,e)=>se(t,e),tm={"@":AT,":":ba,"[":ba,"*":ba,"+":ba,"~":ba,"&":Ux,">":Ux,$:TT,"-":OT,".":RT,"!":PT};var hf=br(),Vx=(t,e,r)=>{let o=e?.context?.designSystem;o&&it(o);try{let n={},s={},i=(a,c)=>{if(r.unpack){n={...n,...c};return}n[a]=c};for(let a in t){let c=t[a];if(a==="class"&&e.call("isString",t.class)){let l=c.split(" ");if(l.length){let f=e.context.designSystem.class,u=l.reduce((d,h)=>gt(d,f[h]),{});n.designSystemClass=u}}else if(a==="true"){let l=ft(c,e);gt(n,Qg(l,e))}else if(e.classlist[a]){let l=e.classlist[a],f=A(l)?l(e,e.state,e.context):l;f&&i(a,f),!hf&&S(n[a])&&(n[a].label=a)}else if(xt[a]){let l=ft(c,e);O(l)&&(l=l.reduce((u,d)=>gt(u,d),{}));let f=xt[a](l,e,e.state,e.context);O(f)&&(f=f.reduce((u,d)=>gt(u,d),{})),f&&i(a,f),!hf&&S(n[a])&&(n[a].label=a)}else if(vt.has(a)){let l=ft(c,e);typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),hf||Bx(a,l,e),i(a,{[a]:l}),!hf&&S(n[a])&&(n[a].label=a)}else s[a]=c}return[n,s]}finally{o&&tt()}},Hx=(t,e)=>{let r={};for(let o in t){let n=tm[o.slice(0,1)];if(n){let s=n(o,t[o],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?Wt(r[i],s[i]):r[i]=s[i])}}return r},se=(t,e,r={unpack:!0})=>{let[o,n]=Vx(t,e,r),s=Hx(n,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return Ps(o,s);o._selectors=s}return o},IT=(t,e)=>{let r={};if(t.class)for(let o in t.class)r[o]=t.class[o](e);return r};R();var zx=t=>{if(S(t))return se(t,t)},DT=(t,e)=>{let r=zx(t);return typeof e=="function"?e(r):be(r)};R();function rm(t,e,r){let o=t?.context?.analyze;if(!o||!o.emit||e==="warn"&&!o.shouldCapture("warnings")||e==="error"&&!o.shouldCapture("errors"))return;let n=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");o.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:n||null,args:r})}var Wx=new Set;function $T(t,e,r){let o=String(e);if(Wx.has(o))return;Wx.add(o);let n=t?.__ref?.path,s=Array.isArray(n)&&n.length?n.join("."):t?.key!=null?String(t.key):"(unknown element)",i=r!=null?`resolves to a non-function (${typeof r}) \u2014 it cannot be called`:"is not registered in context.methods, context.functions, or context.utils, and is not an element method",a=`[smbls] el.call('${o}') at <${s}>: "${o}" ${i}. Returning undefined (unchanged behavior) \u2014 check the name for typos or register the function on the project. Warned once per name; repeat misses are silent.`;rm(t,"error",[a]),console.error(a)}function LT(...t){return rm(this,"warn",t),gi.apply(this,t)}function MT(...t){return rm(this,"error",t),so.apply(this,t)}var qx={update:Pn,remove:Dn,getDB:_i,getQuery:xi,getRootData:di,getChildren:ai,getPath:ci,nextElement:mi,previousElement:yi,verbose:Jo,warn:LT,error:MT,variables:bi,spotByPath:ii,set(t,e){let r=this.__ref;if(r){if(r.__setLocked){r.__setQueued={content:t,options:e};return}r.__setLocked=!0}try{if(this.removeContent(),t!=null){let o=this.context?.__create;o&&o(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let o=r.__setQueued;o&&(r.__setQueued=null,this.set(o.content,o.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,o=this.key,n=this.parse();return this.remove(),e(n,r,o,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let o=this[r];if(!o)continue;if(typeof t=="function"){if(t(o))return o}else if(typeof t=="string"&&o.key===t)return o;let n=o.lookdown?.(t);if(n)return n}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let o of r.__children){let n=this[o];n&&(typeof t=="function"?t(n)&&e.push(n):typeof t=="string"&&n.key===t&&e.push(n),n.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:ui,getRootState:fi,getRootContext:pi,getContext:hi,parse(t){let e={},r=t?new Set(t):null,o=this.__ref?.__exec;for(let n in this)if(!(n==="parent"||n==="node"||n==="__ref")&&!r?.has(n)){if(o&&o[n]!==void 0){e[n]=o[n];continue}typeof this[n]!="function"&&(e[n]=this[n])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let o of r.__children)this[o]?.parseDeep&&(e[o]=this[o].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let o=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),n=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(o,n,"important")}},call(t,...e){let r=this.context,o=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof o=="function")return o.call(this,...e);Pt()&&$T(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)}},em=new WeakMap;function FT(t){if(!t)return qx;let e=em.get(t);if(e)return e;e=Object.create(qx);let r=t.methods;if(r)for(let o in r)e[o]=r[o];return em.set(t,e),e}function $n(t){let e=FT(t.context);Object.setPrototypeOf(t,e)}function gf(t){if(!t)return!1;let e=em.get(t);if(!e)return!1;let r=t.methods;if(!r)return!1;for(let o in r)e[o]=r[o];return!0}var mf=[],yf=!1,Nr=0;function bf(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function Kx(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 Gx(){return Nr?bf()-Nr>=50:!1}var Ln=0;function Yx(){Ln===0&&!Nr&&(Nr=bf()),Ln++}function Xx(){Ln>0&&Ln--,Ln===0&&!yf&&(Nr=0)}function Jx(t){mf.push(t),yf||(yf=!0,Kx(Zx))}function Zx(){for(Nr=bf();mf.length;){let t=mf.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(bf()-Nr>=50)break}if(mf.length){Kx(Zx);return}yf=!1,Nr=0,Ln=0}R();qo();var am={};P(am,{STATE_METHODS:()=>Qx,applyInitialState:()=>xf,applyStateMethods:()=>ie,callStateMethod:()=>_a,createState:()=>nm,isTracking:()=>im,useHostState:()=>sm});var Qx=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"]),_f=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Oe=(t,e,r,{onlyIfAbsent:o}={})=>{_f(t,"$"+e,r),!(o&&Object.prototype.hasOwnProperty.call(t,e))&&_f(t,e,r)},_a=(t,e,...r)=>{if(!t)return;let o=t["$"+e];if(typeof o=="function")return o.apply(t,r);let n=t[e];if(typeof n=="function")return n.apply(t,r)},ie=(t,e)=>{if(yt(e)){let n=e.__raw||e;Oe(n,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Oe(n,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Oe(n,"setByPath",function(s,i,a={}){let c=s.split("."),l=e;for(let f=0;f<c.length-1;f++)l[c[f]]===void 0&&(l[c[f]]={}),l=l[c[f]];return l[c[c.length-1]]=i,e}),Oe(n,"getByPath",function(s){let i=s.split("."),a=e;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a}),Oe(n,"removeByPath",function(s,i={}){let a=s.split("."),c=e;for(let l=0;l<a.length-1;l++){if(c==null)return e;c=c[a[l]]}return c&&delete c[a[a.length-1]],e}),Oe(n,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Oe(n,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Oe(n,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Oe(n,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&yt(a.parent);)a=a.parent;return _a(a,"update",s,i)}),Oe(n,"parentUpdate",function(s,i={}){if(e.parent)return _a(e.parent,"update",s,i)}),Oe(n,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(n,"root")||Object.defineProperty(n,"root",{get:function(){let s=e,i=yt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,yt(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]},o={update(n){if(!n||typeof n!="object")return e;for(let s in n)e[s]=n[s];return e},apply(n){if(typeof n!="function")return e;let s=n(e);return s?e.$update(s):e},parse(){return{...e}},toggle(n){return e[n]=!e[n],e},set(n){if(!n||typeof n!="object")return e;r();for(let s in n)e[s]=n[s];return e},replace(n){return e.$set(n)},clean(){return r(),e}};for(let n in o)if(_f(e,"$"+n,o[n]),typeof e[n]!="function"){if(Object.prototype.hasOwnProperty.call(e,n)){yc(n,"");continue}_f(e,n,o[n])}};var nm=function(t,e,r){return t.state=xf(t,e,r),t.state},xf=function(t,e,r){let{__ref:o}=t,n=t.state;if(n==null||n===!1){let s=e?.state||{};return ie(t,s),s}if(typeof n=="string")return o&&(o.__state=n),o.__stateType="string",NT(n,t,e);if(typeof n=="number"||typeof n=="boolean"){o&&(o.__state=n,o.__stateType=typeof n,o.__hasRootState=!0);let s=Ge({value:n});return s.__element=t,e?.state&&(s.parent=e.state),ie(t,s),s}if(typeof n=="function"&&(n=n(t,e?.state)||{}),typeof n=="object"&&!yt(n)){o&&(o.__hasRootState=!0),n.isRootState&&o&&(o.__hasRootState=!0);let s=Ge({...n});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),ie(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return yt(n)?(n.__element=t,n):e?.state||{}};function om(t,e){if(!e)return t;let r=e.split("/"),o=t;for(let n of r){if(o==null)return{};o=o[n]}return o??{}}function NT(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let n=t.slice(3),s=r.state?.parent;return n&&s?om(s,n):s??r.state??{}}if(t.startsWith("~/")){let n=r.state;for(;n?.parent;)n=n.parent;let s=t.slice(2);return s?om(n,s):n??{}}let o=om(r.state,t);if(o&&typeof o=="object"&&!yt(o)&&!Object.getOwnPropertyDescriptor(o,"root")){let n=r.state?.root||r.state;Object.defineProperty(o,"root",{get:()=>n,enumerable:!1,configurable:!0})}return o}var sm=(t,e)=>{if(!t)return ew;let r=BT(t,e);return!r||!r.state?ew:VT(r.state)},im=()=>gc()!=null,jT=128;function BT(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,o=t,n=null;for(let s=0;s<jT&&o;s++){if(r(o)&&o.state)return o;if(o.state&&!n&&(n=o),!o.parent||o.parent===o)break;o=o.parent}return n}var UT={get(t,e){return t[e]}},tw=new WeakMap,VT=t=>{let e=tw.get(t);return e||(e=new Proxy(t,UT),tw.set(t,e)),e},ew=new Proxy(Object.create(null),{get(){},has(){return!1}});var HT=1,wa=[],um=!1;function rw(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function zT(){return typeof document<"u"&&document.visibilityState==="hidden"}var WT=250;function lw(){if(!um){if(um=!0,typeof requestAnimationFrame!="function"){setTimeout(ka,0);return}zT()?setTimeout(ka,WT):requestAnimationFrame(ka)}}var qT=300,KT=15e4;function ka(){if(um=!1,!wa.length)return;let t=wa.splice(0,wa.length);for(let e=0;e<t.length;e++){let r=t[e];if(r.node){if(!r.node.isConnected){let o=r.__ref||(r.__ref={});o.__mountAttempts=(o.__mountAttempts||0)+1,o.__mountFirstAttemptAt==null&&(o.__mountFirstAttemptAt=rw());let n=rw()-o.__mountFirstAttemptAt;o.__mountAttempts<=qT&&n<KT?(wa.push(r),lw()):console.warn("[DOMQL] onMounted dropped after",o.__mountAttempts,"attempts /",n,"ms \u2014 node never connected:",r.key||r.tag||r);continue}ar("Mounted",r,r.__ref?.__mountOptions||{})}}}function fw(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,wa.push(t),lw())}function ow(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&At("contentUpdate",t,e);let r=t.context?.designSystem;r&&it(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(o){if(t.context?.plugins?.length&&At("error",t,{hook:"onContentUpdate",error:o})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',o),t.context?.strictMode)throw o}finally{r&&tt()}}function Fn(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function GT(t){return t.charAt(2).toLowerCase()+t.slice(3)}function YT(t){return t.toLowerCase()}function dm(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function Sa(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=Sa(n,s):r[o]=s}return r}function oe(t,e,r,o={},n){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${HT++}`,s.parent=e||null,s.context=t.context||e?.context||o.context||{},s.context.__create||(s.context.__create=oe);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key],origin:t};if(r&&!t.extends&&!t.extend){let p=r.indexOf("_");if(p>0){let m=r.substring(0,p),b=s.context?.components;b&&(b[m]||b["smbls."+m])?t={...t,extends:m}:b&&Pt()&&/^[A-Z]\w*_\d+$/.test(r)&&console.warn(`[smbls] auto-extend: key "${r}" looks like a multi-instance (${m}_N) but neither "${m}" nor "smbls.${m}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}Rn(s,t,o);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let p in t){if(p==="parent"||p==="node"||p==="__ref"||p==="extends"||p==="context"||p==="props")continue;let m=t[p],b=s[p],_=b&&m&&typeof b=="object"&&typeof m=="object"&&!Array.isArray(b)&&!Array.isArray(m)&&typeof b!="function"&&typeof m!="function";_&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?s[p]=Sa(b,m):_&&a.has(p)?s[p]={...b,...m}:_&&dm(p)?s[p]=Sa(b,m):s[p]=m}function l(p){for(let m in p){let b=p[m],_=s[m],y=_&&b&&typeof _=="object"&&typeof b=="object"&&!Array.isArray(_)&&!Array.isArray(b)&&typeof _!="function"&&typeof b!="function";y&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=Sa(_,b):y&&a.has(m)?s[m]={..._,...b}:y&&dm(m)?s[m]=Sa(_,b):s[m]=b}}c&&l(c),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,d=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,h=u||d||null;if(t.scope!==void 0||f){let p={};f&&Object.assign(p,f),t.scope!==void 0&&Object.assign(p,t.scope),s.scope=mc(p,h)}else h&&(s.scope=h);if(t.if!==void 0&&(s.if=t.if),$n(s),XT(s,e,t),s.if!=null){let p;if(typeof s.if=="function")try{p=s.if(s,s.state,s.context)}catch(m){if(p=!1,i.__ifError=m,typeof console<"u"&&console.warn){let b=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${b} \u2014 treating as false:`,m?.message||m)}}else p=s.if;i.__if=!!p}if(i.__if)typeof s.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof s.if=="function"&&pw(s,i,s.if),s;s.tag||(s.tag=Pr(s)),ar("Init",s,o);let g=s.node=Ir(s);if(!g)return s;if(s.tag==="fragment"){let m=(s.context?.document||globalThis.document).createComment("");g.appendChild(m),i.__fragmentAnchor=m}ar("AttachNode",s,o),g.setAttribute&&s.key&&g.setAttribute("data-key",s.key),e&&(e[s.key]=s,e.__ref?.__children&&(e.__ref.__children.includes(s.key)||e.__ref.__children.push(s.key))),g.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&g.setAttribute("data-smbls-app",s.context.key),s.id&&g.setAttribute&&(g.id=s.id),yw(s,o),dw(s),pm(s),gw(s),d1(s);try{bw(s,o)}catch(p){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,p?.message||p,p?.stack?`
|
|
52
52
|
`+p.stack.split(`
|
|
53
53
|
`).slice(0,6).join(`
|
|
54
|
-
`):"")}}if(Ng(s,!0),Rx(s,e,n),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let p=s.context?.designSystem;p&&st(p);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{p&&rt()}}if(sr("Create",s,o),sr("Complete",s,o),sr("Render",s,o),sr("RenderRouter",s,o),wx(s,o),typeof s.onFrame=="function"){let p=s.onFrame,m=s.context?.designSystem,_=()=>{if(s.node){if(s.node.isConnected){m&&st(m);try{p(s,s.state,s.context)}catch(b){console.error("[DOMQL] onFrame error:",b)}finally{m&&rt()}}requestAnimationFrame(_)}};requestAnimationFrame(_)}return s}function PT(t,e,r){let o=!e,n=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=o&&n&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!gt(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,ne(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},l=t.context?.polyglot;if(l?.translations){let f=a.lang||l.defaultLang||"en",u=l.translations[f];if(u&&typeof u=="object")for(let h in u)c[h]===void 0&&(c[h]=u[h]);let d=new Set(l.languages||[]);for(let h in l.translations)!d.has(h)&&c[h]===void 0&&(c[h]=l.translations[h])}t.state=gt(c)?c:qe(c),t.state.__element=t,t.state.root=t.state,ne(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),ne(t,t.state);return}if(typeof i=="string"){if(t.state=Sx(i,e),t.state&&typeof t.state=="object"&&!gt(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}ne(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=gt(a)?a:qe(a||{})}else gt(i)?t.state=i:t.state=qe({...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,ne(t,t.state)}function Rg(t,e){if(!e)return t;let r=e.split("/"),o=t;for(let n of r){if(o==null)return{};o=o[n]}return o??{}}function Sx(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let n=t.slice(3);return n?Rg(e.state,n):e.state??{}}if(t.startsWith("~/")){let n=e.state?.root||e.state,s=t.slice(2);return s?Rg(n,s):n??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=Rg(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let o=e.context?.polyglot;if(o?.translations){let n=e.state?.root?.lang||o.defaultLang||"en",s=o.translations[n];if(s?.[t]!==void 0)return s[t];if(o.translations[t]!==void 0)return o.translations[t]}return{}}var IT=new Set(["s","state","ctx","context"]);function DT(t){try{let r=Function.prototype.toString.call(t).match(/^[^(]*\(([^)]*)\)/);return r?r[1].split(",").map(o=>o.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function $T(t){if(typeof t!="function"||t.length!==2)return!1;let e=DT(t);if(e.length<2)return!1;let r=e[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!IT.has(r)}function LT(t){let e=t.__ref,r=t.tag||"div",o=t.context?.designSystem,n=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||Ft.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Rn(a)||bt[a]||kt&&kt.has(a)||Ir(r,a)||(Ot()&&$T(t[a])&&console.warn(`[smbls] custom prop "${a}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${a}', \u2026) instead of reading el.${a}(\u2026) directly (see RULES.md Rule 8).`),n.push({prop:a,fn:t[a]}))}for(let i=0;i<n.length;i++){let{prop:a,fn:c}=n[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){o&&st(o);try{return c(t,t.state,t.context)}catch{return}finally{o&&rt()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function MT(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let o=e[r];try{typeof o=="function"?o(t,t.state,t.context):typeof o=="string"&&t.state?.[o]}catch{}}}function Nt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...o){return MT(t,e),r.apply(this,o)}}function da(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function vt(t,e){return()=>t.path.join(".")+"::"+e}function kx(t,e){let r=t.__ref,o=!!(e&&e.skipIfEffect);if(LT(t),typeof t.text=="function"){let s=t.text,i=Nt(t,t.textDeps,s),a=Q(()=>{if(!r.contentManaged)try{let c=i(t,t.state,t.context);t.node&&c!=null&&typeof c!="function"&&typeof c!="object"&&(typeof c=="string"&&c.includes("{{")&&(c=qr.call(t,c,t.state)),En(t,c))}catch{}},{depth:r.path.length,label:vt(r,"text")});r.__effects.push(a),r.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){let s=t.text,i=Q(()=>{if(r.contentManaged)return;let a=qr.call(t,s,t.state);a!=null&&(t.text=a),t.node&&En(t,a??"")},{depth:r.path.length,label:vt(r,"text")});r.__effects.push(i),r.__exec.text=s}for(let s of Object.keys(t))if(typeof t[s]=="function"&&!Ft.has(s)&&!Rn(s)&&!r.__exec[s]){if(bt[s]){let i=t[s],a=Nt(t,t[s+"Deps"],i),c=s,l,f=Q(()=>{let u=t.context?.designSystem;u&&st(u);try{let d=a(t,t.state,t.context),h=bt[c](d,t,t.state,t.context),g=c==="show"||c==="hide";if(h&&t.node){let p=Mg(h),m=g&&t.node.style.display!=="none";(p===null||p!==l||m)&&(l=p,On(t.node,h))}else if(t.node&&g){l=void 0;let p=r.__explicitDisplay;t.node.style.display=typeof p=="string"?p:""}}finally{u&&rt()}},{depth:r.path.length,label:vt(r,c)});r.__effects.push(f),r.__exec[s]=i}else if(kt&&kt.has(s)){let i=t[s],a=Nt(t,t[s+"Deps"],i),c=s,l,f=Q(()=>{let u=t.context?.designSystem;u&&st(u);try{let d=a(t,t.state,t.context);if(t.node)if(d!=null){let h=c+":"+String(d);h!==l&&(l=h,On(t.node,{[c]:d}))}else l=void 0,t.node.style[c]=""}finally{u&&rt()}},{depth:r.path.length,label:vt(r,c)});r.__effects.push(f),r.__exec[s]=i}}if(typeof t.html=="function"){let s=t.html,i=Nt(t,t.htmlDeps,s),a=Q(()=>{let c=t.context?.designSystem;c&&st(c);try{let l=i(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&(t.node.innerHTML=l)}finally{c&&rt()}},{depth:r.path.length,label:vt(r,"html")});r.__effects.push(a),r.__exec.html=s}if(typeof t.value=="function"){let s=t.value,i=Nt(t,t.valueDeps,s),a=Q(()=>{try{let c=i(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let l=c==null?"":String(c);if(t.node.value===l)return;let f=typeof document<"u"&&document.activeElement===t.node,u=f&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,d=f&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=l,f&&u!=null&&d!=null)try{t.node.setSelectionRange(u,d)}catch{}}catch{}},{depth:r.path.length,label:vt(r,"value")});r.__effects.push(a),r.__exec.value=s}if(typeof t.style=="function"){let s=t.style,i=Nt(t,t.styleDeps,s),a,c=Q(()=>{let l=i(t,t.state,t.context),f=Mg(l);(f===null||f!==a)&&(a=f,On(t.node,l))},{depth:r.path.length,label:vt(r,"style")});r.__effects.push(c),r.__exec.style=s}else if(t.style&&typeof t.style=="object")for(let s in t.style){let i=t.style[s];if(typeof i!="function")continue;let a=Nt(t,da(t.styleDeps,s),i),c,l=Q(()=>{try{let f=a(t,t.state,t.context);if(t.node){let u=s+":"+String(f);u!==c&&(c=u,On(t.node,{[s]:f}))}}catch{}},{depth:r.path.length,label:vt(r,"style."+s)});r.__effects.push(l)}if(t.attr&&typeof t.attr=="object"){for(let s in t.attr)if(typeof t.attr[s]=="function"){let i=Nt(t,da(t.attrDeps,s),t.attr[s]),a=s,c=Q(()=>{try{let l=i(t,t.state,t.context);t.node?.setAttribute&&(l==null||l===!1&&!or(a)?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,ze(a,l)))}catch{}},{depth:r.path.length,label:vt(r,"attr."+a)});r.__effects.push(c)}}if(t.aria&&typeof t.aria=="object")for(let s in t.aria){if(typeof t.aria[s]!="function")continue;let i=Nt(t,da(t.ariaDeps,s),t.aria[s]),a="aria-"+s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=Q(()=>{try{let l=i(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,ze(a,l))}catch{}},{depth:r.path.length,label:vt(r,"aria."+s)});r.__effects.push(c)}if(t.data&&typeof t.data=="object")for(let s in t.data){if(typeof t.data[s]!="function")continue;let i=Nt(t,da(t.dataDeps,s),t.data[s]),c="data-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=Q(()=>{try{let f=i(t,t.state,t.context);if(!t.node?.setAttribute)return;f==null||f===!1?t.node.removeAttribute(c):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(c,f===!0?"":f)}catch{}},{depth:r.path.length,label:vt(r,"data."+s)});r.__effects.push(l)}let n=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(n)for(let s in n){if(typeof n[s]!="function")continue;let i=Nt(t,da(t.classDeps,s),n[s]),a=Q(()=>{try{let c=i(t,t.state,t.context);if(!t.node?.classList)return;typeof c=="string"?t.node.classList.add(c):c?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:r.path.length,label:vt(r,"class."+s)});r.__effects.push(a)}!o&&typeof t.if=="function"&&vx(t,r,t.if);for(let s of Object.keys(t)){if(Ft.has(s)||typeof t[s]!="function")continue;let i=s.charCodeAt(0);if(i>=65&&i<=90||Rn(s))continue;let a=t[s];r.__exec[s]=a;let c=t.tag||"div";if(Ir(c,s)&&!bt[s]&&!(kt&&kt.has(s))){let l=Pr(s)||s,f=Nt(t,t[s+"Deps"],a),u=Q(()=>{try{let d=f(t,t.state,t.context);t.node?.setAttribute&&(d==null||d===!1&&!or(l)?t.node.removeAttribute(l):typeof d!="function"&&typeof d!="object"&&(l==="src"&&"src"in t.node?t.node.src=d:t.node.setAttribute(l,ze(l,d))))}catch{}},{depth:r.path.length,label:vt(r,s)});r.__effects.push(u)}}if(BT(t),HT(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let s=t.onStateUpdate,i=t.stateDeps,a=!1,c=[],l=Q(()=>{let f=[];for(let g=0;g<i.length;g++){let p=i[g];try{f[g]=typeof p=="function"?p(t,t.state,t.context):t.state?.[p]}catch{f[g]=void 0}}if(!a){a=!0,c=f;return}let u=f.length!==c.length;for(let g=0;!u&&g<f.length;g++)f[g]!==c[g]&&(u=!0);let d=c;if(c=f,!u)return;let h=t.context?.designSystem;h&&st(h);try{s(t,t.state,t.context,{prev:d,next:f})}catch(g){if(t.context?.plugins?.length&&Ct("error",t,{hook:"onStateUpdate",error:g})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',g),t.context?.strictMode)throw g}finally{h&&rt()}},{depth:r.path.length,label:vt(r,"onStateUpdate")});r.__effects.push(l)}VT(t)}function gx(t){let e=t.parent,r=e?.node;if(!r||!t.node){Rx(t,t.parent);return}let o=null,n=Object.keys(e),s=n.indexOf(t.key);for(let i=s+1;i<n.length;i++){let a=e[n[i]];if(a?.node?.parentNode===r){o=a.node;break}}o?r.insertBefore(t.node,o):r.appendChild(t.node)}function vx(t,e,r){let o=Nt(t,t.ifDeps,r),n=Q(()=>{let s;try{s=o(t,t.state,t.context)}catch(a){if(s=!1,e.__ifError=a,typeof console<"u"&&console.warn){let c=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,a?.message||a)}return}let i=e.__if;if(e.__if=!!s,i&&!e.__if&&t.node)t.node.remove();else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=Tr(t)),t.node&&(t.node.ref=t),gx(t),Lg(t);else{if(e.__ifInitialized=!0,t.tag||(t.tag=Ar(t)),sr("Init",t,{}),t.node||(t.node=Tr(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.tag==="fragment"&&!e.__fragmentAnchor){let c=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(c),e.__fragmentAnchor=c}sr("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),Tx(t,{}),kx(t,{skipIfEffect:!0}),Lg(t),Ex(t),Ox(t,{}),gx(t),wx(t,{})}},{depth:e.path.length,label:vt(e,"if")});e.__effects.push(n)}function En(t,e){let r=t.node;if(!r)return;let o=e==null?"":String(e);if(t.tag==="string"){r.nodeValue!==o&&(r.nodeValue=o);return}let n=t.__ref,s=n?n.__textNode:null;if(s&&s.parentNode!==r&&(s=null),!s){let i=r.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==o&&(s.nodeValue=o):r.firstChild?(s=(r.ownerDocument||t.context?.document||globalThis.document).createTextNode(o),r.insertBefore(s,r.firstChild)):(r.textContent=o,s=r.firstChild&&r.firstChild.nodeType===3?r.firstChild:null),n&&(n.__textNode=s||null)}function Lg(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&En(t,t.text),WT(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"&&On(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let o=t.attr[r];typeof o=="function"||typeof o=="object"||o!=null&&(o===!1&&!or(r)||e.setAttribute&&e.setAttribute(r,ze(r,o)))}if(t.data&&typeof t.data=="object")for(let r in t.data){let o=t.data[r];typeof o=="function"||typeof o=="object"||o==null||o===!1||e.dataset&&(e.dataset[r]=o===!0?"":o)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(o=>o&&e.classList.add(o));else if(typeof r=="object")for(let o in r){let n=typeof r[o]=="function"?r[o](t,t.state,t.context):r[o];n&&e.classList.add(typeof n=="string"?n:o)}}}}function Mg(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function On(t,e){if(!t||!e||!t.style)return;let r=null;for(let o in e){let n=e[o];if(n!=null){if(o.charAt(0)==="&"&&typeof n=="object"){r||(r={}),r[o]=n;continue}try{let s=String(n),i=o.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,c?"important":"")}catch{}}}r&&NT(t,r)}var FT=0;function NT(t,e){let r=`_ds${FT++}`;t.classList.add(r);let o=t.ownerDocument,n=o.querySelector("style[data-smbls-scoped]");n||(n=o.createElement("style"),n.setAttribute("data-smbls-scoped",""),o.head.appendChild(n));let s="";for(let i in e){let a="."+r,c=i.replace(/&/g,a).split(",").map(f=>{let u=f.trim();return u.includes(a)?u:a+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let d in l){let h=l[d];if(typeof h=="object"){let g=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),p="";for(let m in h)p+=`${m.replace(/[A-Z]/g,_=>"-"+_.toLowerCase())}: ${h[m]};`;u+=Ae(`${g} { ${p} }`,g)+`
|
|
55
|
-
`}else f+=`${d.replace(/[A-Z]/g,g=>"-"+g.toLowerCase())}: ${h};`}f&&(s+=
|
|
56
|
-
`),u&&(s+=u)}}s&&(n.textContent+=s)}var mx=new Set;function yx(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 jT(t,e,r){let o=yx(r);queueMicrotask(()=>{if(!t.__ref)return;let n;try{n=e(t,t.state,t.context)}catch{return}if(yx(n)===o)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";mx.has(s)||(mx.add(s),console.warn(`[smbls] subscribeTo function at "${s}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${r.join(", ")||"(none)"}], probed [${Array.isArray(n)?n.join(", "):String(n)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function BT(t){let e=t.subscribeTo,r=typeof e=="function",o=e;if(r)try{o=e(t,t.state,t.context)}catch{o=null}if(r&&Ot()&&jT(t,e,Array.isArray(o)?o:[]),!Array.isArray(o)||o.length===0)return;let n=t.__ref;for(let s=0;s<o.length;s++){let i=o[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],l=a.slice(1),f={value:!1},u=Q(()=>{let d=t.state&&(gt(t.state)?t.state.root:null);if(!d||!gt(d))return;let h=d;h=h[c];for(let p=0;p<l.length&&!(h==null||typeof h!="object");p++)if(gt(h))h=h[l[p]];else break;if(!f.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"){let p=t.context?.designSystem;p&&st(p);try{if(cg(n)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>nr(n,!1),_=>{nr(n,!0),t.context?.plugins?.length&&Ct("error",t,{hook:"onBeforeUpdate",error:_})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",_)}):(nr(n,!1),m===!1&&(g=!0))}}catch(m){nr(n,!0),t.context?.plugins?.length&&Ct("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{p&&rt()}}if(!g&&t.node&&n.__effects)for(let p=0;p<n.__effects.length;p++){let m=n.__effects[p];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!g&&typeof t.onUpdate=="function"){let p=t.context?.designSystem;p&&st(p);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&Ct("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{p&&rt()}}},{depth:n.path.length,label:vt(n,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,n.__effects.push(u)}}function Bg(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}var bx=new Set;function UT(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",o=r+"::"+t;bx.has(o)||(bx.add(o),console.warn(`[smbls/css] "${t}" at ${r} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}function Pn(t,e,r){let o={},n=new Set,s=(i,a,c)=>{let l=c?new Set(Object.keys(o)):null;if(bt[i]){let f=bt[i](a,e,e.state,e.context);if(f){let u=Array.isArray(f)?f:[f];for(let d of u)d&&Object.assign(o,d)}}else o[i]=a;if(c)for(let f in o)l.has(f)||n.add(f)};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=t[i];if(typeof a=="function"&&(a=a(e,e.state,e.context)),a==null||typeof a=="function")continue;if(typeof a=="object"&&!Array.isArray(a)){if(i==="style"){for(let u in a){let d=a[u];if(typeof d=="function"&&(d=d(e,e.state,e.context)),d==null||typeof d=="function")continue;let h=typeof e[u]=="function"&&(bt[u]||kt&&kt.has(u));s(u,d,h)}continue}if(Bg(i,e)){let u=Pn(a,e,!1);Object.keys(u).length&&(o[`[data-theme="${i.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(i)){Ot()&&UT(i,e);continue}let l=i;if(i.charCodeAt(0)===64&&!i.startsWith("@media")&&!i.startsWith("@keyframes")){let u=e.context?.designSystem?.media?.[i.slice(1)];u&&(l=`@media ${u}`)}let f=Pn(a,e,!1);Object.keys(f).length&&(o[l]=f);continue}let c=typeof e[i]=="function"&&(bt[i]||kt&&kt.has(i));s(i,a,c)}if(r)for(let i in o)n.add(i);for(let i of n){let a=o[i];typeof a=="string"&&!a.includes("!important")&&(o[i]=a+" !important")}return o}function Ug(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)&&Ug(t[r],e+1))return!0}return!1}function Cx(t,e,r){if(!e||typeof e!="object"||Array.isArray(e))return null;if(Bg(t,r)){let s=Pn(e,r,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let o=t;if(t.charAt(0)==="@"&&!t.startsWith("@media")&&!t.startsWith("@keyframes")){let s=r.context?.designSystem?.media?.[t.slice(1)];s&&(o=`@media ${s}`)}let n=Pn(e,r,!1);return Object.keys(n).length?{cssProp:o,block:n}:null}function VT(t){let e=t.__ref;for(let r of Object.keys(t)){if(!$g(r))continue;let o=t[r];if(!o||typeof o!="object"||Array.isArray(o)||!Ug(o))continue;let n=null,s,i=Q(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&st(a);let c,l=!1;try{let f=Cx(r,o,t),u=f?Mg(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=me({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&rt()}if(!(l||!t.node.classList)){if(n)for(let f of n)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);n=c}},{depth:e.path.length,label:vt(e,"cssBlock("+r+")")});e.__effects.push(i)}}function HT(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let o of Object.keys(t)){let n=o.charAt(0);if(n!=="."&&n!=="!")continue;let s=o.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let u=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${n}\` is read as one prop name. Nest the selector inside instead: \`${n}${u}: { '${s.slice(u.length)}': {...} }\`.`)}continue}let i=t[o];if(!i||typeof i!="object")continue;let a=n==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=()=>{let u,d=t[s];if(d===void 0){let p=!!t.state&&s in t.state,m=t.state?t.state[s]:void 0;if(p||m!==void 0)u=m;else{let _=t.context?.cases?.[s];if(_===void 0)return;try{u=typeof _=="function"?_.call(t,t):_}catch(b){u=!1,e.__conditionalError=b,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,b?.message||b)}}}else if(typeof d=="function")try{u=d(t,t.state,t.context)}catch(p){u=!1,e.__conditionalError=p,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,p?.message||p)}else u=d;let h=a?!u:!!u;if(!t.node||h===c.lastMatch)return;c.lastMatch=h;let g=t.context?.designSystem;g&&st(g);try{if(h){let p={},m={},_=!1;for(let y in i){if(!Object.prototype.hasOwnProperty.call(i,y))continue;let x=i[y],k=y.charAt(0);if((k===":"||k==="@"||k==="&")&&x&&typeof x=="object"&&!Array.isArray(x)){if(Bg(y,t)){let T=Pn(x,t,!1);Object.keys(T).length&&(m[`[data-theme="${y.slice(1)}"] &`]=T,_=!0)}else{let T=y;if(k==="@"&&!y.startsWith("@media")&&!y.startsWith("@keyframes")){let M=t.context?.designSystem?.media?.[y.slice(1)];M&&(T=`@media ${M}`)}let $=Pn(x,t,!1);Object.keys($).length&&(m[T]=$,_=!0)}continue}let C=typeof x=="function"?x(t,t.state,t.context):x;if(C!=null)if(bt[y]){let T=bt[y](C,t,t.state,t.context);if(T){let $=Array.isArray(T)?T:[T];for(let M of $)M&&Object.assign(p,M)}}else kt&&kt.has(y)&&(p[y]=C)}let b=Object.keys(p);if(b.length){On(t.node,p);for(let y of b)r.set(y,o);c.appliedKeys=b}else c.appliedKeys=null;if(_){let y=me(m,null,t.context?.cssPrefix),x=y?y.split(" ").filter(Boolean):[];if(x.length&&t.node.classList){for(let k of x)t.node.classList.add(k);c.appliedClasses=x}else c.appliedClasses=null}else if(c.appliedClasses){for(let y of c.appliedClasses)t.node.classList.remove(y);c.appliedClasses=null}}else{if(c.appliedKeys){for(let p of c.appliedKeys)r.get(p)===o&&(t.node.style[p]="",r.delete(p));c.appliedKeys=null}if(c.appliedClasses){for(let p of c.appliedClasses)t.node.classList.remove(p);c.appliedClasses=null}}}finally{g&&rt()}};e.__conditionalRunners.push(l);let f=Q(l,{depth:e.path.length,label:vt(e,"conditional("+o+")")});e.__effects.push(f)}}var Pg=new WeakSet;function zT(t){let e=t.ownerDocument;!e||Pg.has(e)||(Pg.add(e),queueMicrotask(()=>{Pg.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var Ig=new WeakSet,_x=!1;function WT(t){let{node:e}=t;if(!e)return;if(_x||(_x=!0,me({display:"none"})),Ig.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}Ig.add(t);let r=t.context?.designSystem;r&&st(r),gg();try{let o={},n=!1;if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&bt.theme){let s=bt.theme(t.theme,t,t.state,t.context);if(s){if(Array.isArray(s))for(let i of s)i&&Object.assign(o,i);else Object.assign(o,s);n=!0}}for(let s of Object.keys(t)){if(typeof t[s]=="function"||Ft.has(s)||s==="theme")continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!Rn(s)){if(bt[s]){let a=t[s],c=bt[s](a,t,t.state,t.context);if(c){if(Array.isArray(c))for(let l of c)l&&Object.assign(o,l);else Object.assign(o,c);n=!0}}else if(kt&&kt.has(s)){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charCodeAt(0)===45){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charAt(0)==="&"||s.charAt(0)==="@"||s.charAt(0)===":"){let a=t[s];if(a&&typeof a=="object"&&!Array.isArray(a)){if(Ug(a))continue;let c=Cx(s,a,t);c&&(o[c.cssProp]=c.block,n=!0)}}}}if(n){o.display&&String(o.display).includes("!important")&&(e.style.setProperty("display",String(o.display).replace(/\s*!important\s*$/,""),"important"),delete o.display);let s=me(o,null,t.context?.cssPrefix);if(s&&e.classList){let a=s.split(" ").filter(Boolean),c=!1;for(let l of a)e.classList.add(l),c||(l.charCodeAt(0)===95&&l.charCodeAt(1)===99||l.charCodeAt(0)===95&&l.indexOf("_c",1)!==-1)&&(c=!0);c&&zT(e)}let i=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(i!=null){let a=o.display;if(a&&a!==i)if(i==="none"){let c=[];for(let l of e.classList)l.startsWith("_d-")&&l!=="_d-none"&&c.push(l);for(let l of c)e.classList.remove(l);e.classList.add("_d-none")}else e.style.display==="none"&&(typeof t.hide=="function"||typeof t.show=="function")||(e.style.display=t.display),t.__ref&&(t.__ref.__explicitDisplay=t.display)}}}finally{mg(),r&&rt(),Ig.delete(t)}}function Ex(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let s=t.aria[n];if(typeof s=="function"||typeof s=="object"||s==null)continue;let i="aria-"+n.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,ze(i,s))}let r=ag(t);for(let n in r){let s=r[n];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(n,s===!0?"":s)}let o=t.tag||"div";for(let n of Object.keys(t)){if(typeof t[n]=="function"||Ft.has(n)||n==="on"||r[n]!==void 0)continue;let s=n.charCodeAt(0);if(!(s>=65&&s<=90)&&!Rn(n)&&!(bt[n]||kt&&kt.has(n))&&Ir(o,n)){let i=t[n];if(i==null||(typeof i=="string"&&i.includes("{{")&&(i=qr(i,t,t.state,t.context),t[n]=i),i==null||typeof i=="function"||typeof i=="object")||i===!1&&!or(Pr(n)||n))continue;let a=Pr(n)||n;e.setAttribute(a,ze(a,i))}}}function qT(t,e){let r=t.node,o=t.__ref,n=o.__autoGrow;if(!e){if(n&&n.active){try{r.removeEventListener("input",n.resize)}catch{}r.style.height="",n.appliedMax!=null&&r.style.maxHeight===n.appliedMax&&(r.style.maxHeight=""),n.active=!1,n.appliedMax=null,n.lastMeasure=0}return}n||(n=o.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,resize:()=>{if(r.scrollHeight===0&&n.lastMeasure>0)return;r.style.height="auto";let i=r.scrollHeight;r.style.height=i+"px",i>0&&(n.lastMeasure=i)}},o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{try{r.removeEventListener("input",n.resize)}catch{}})),n.active||(r.addEventListener("input",n.resize),n.active=!0);let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==n.appliedMax&&(s==null?n.appliedMax!=null&&r.style.maxHeight===n.appliedMax&&(r.style.maxHeight=""):r.style.maxHeight=s,n.appliedMax=s),n.resize()}function KT(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.__ref,o=t.autoGrow,n=typeof o=="function"?Nt(t,t.autoGrowDeps,o):null,s=Q(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===o&&n?n:i)(t,t.state,t.context)}catch{a=null}qT(t,a)},{depth:r.path.length,label:vt(r,"autoGrow")});r.__effects||(r.__effects=[]),r.__effects.push(s),n&&(r.__exec.autoGrow=o)}var Ax=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Tx(t,e){for(let r of Object.keys(t)){if(!Rn(r)||Ax.has(r))continue;let o=ef(r);if(o){rf(o,t,t[r]);continue}let n=t[r];if(typeof n=="string"&&/^[A-Za-z_$][\w$]*$/.test(n)){let i=n;n=function(c){return t.call(i,c)}}if(typeof n!="function")continue;let s=OT(r);Or.has(s)||kn(RT(s),t,n)}GT(t)}function GT(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},o=!1;for(let d of Ax){let h=t[d];typeof h=="function"&&(r[d]=h,o=!0)}if(!o)return;let n=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,s=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,a=0,c=0,l=!1,f=d=>{let h=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];h&&(i=h.clientX,a=h.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let h=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!h)return;let g=h.clientX-i,p=h.clientY-a,m=Date.now()-c;if(m>s)return;let _=Math.abs(g),b=Math.abs(p);if(Math.max(_,b)<n)return;let y;if(_>b*1.2)y=g<0?"left":"right";else if(b>_*1.2)y=p<0?"up":"down";else return;let x="onSwipe"+y.charAt(0).toUpperCase()+y.slice(1),k=r[x],C=r.onSwipe;k&&k.call(t,d,t,t.state,t.context),C&&C.call(t,{direction:y,dx:g,dy:p,dt:m,event:d},t,t.state,t.context)};e.addEventListener("touchstart",f,{passive:!0}),e.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",f)}catch{}try{e.removeEventListener("touchend",u)}catch{}})}function ma(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=ma(n,s):r[o]=s}return r}function Fg(t,e,r){if(!e||!t.node)return;let o=t.childExtends;if(Array.isArray(e)){let n=t.tag==="fragment",s=t.context?.document||globalThis.document,i=n?null:s?.createDocumentFragment();if(!n&&!i)return;let a=t.childProps,c=t.childrenAs;for(let l=0;l<e.length;l++){let f=e[l],u=f;(typeof f=="string"||typeof f=="number")&&(f={text:f});let d=a;if(typeof a=="function")try{d=a(t,f)}catch{d=null}if(c==="state"){let p=u;(typeof u=="string"||typeof u=="number")&&(p={value:u,text:u}),f=d?{...d,state:p}:{state:p}}else d&&(f=ma(d,f));if(o&&!f.ignoreChildExtends)if(f.extends){let p=Array.isArray(f.extends)?f.extends:[f.extends],m=Array.isArray(o)?o:[o];f={...f,extends:[...m,...p]}}else f={...f,extends:o};let h=f?.key||u&&typeof u=="object"&&u.key||`${l}`,g;try{g=ee(f,t,h,r)}catch(p){if(typeof console<"u"&&console.error){let m=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${h}" failed to construct at ${m} (initial render, skipping this row):`,p?.message||p)}continue}!n&&g?.node&&i.appendChild(g.node)}return n||t.node.appendChild(i),!0}if(typeof e=="string"){let n=Sx(e,t);if(Array.isArray(n))return Fg(t,n,r)}if(typeof e=="object")for(let n in e){if(Ft.has(n))continue;let s=e[n];if(!(s==null||s===!1)){if((typeof s=="string"||typeof s=="number")&&(s={text:s}),t.childProps&&(s=ma(t.childProps,s)),o&&!s.ignoreChildExtends)if(s.extends){let i=Array.isArray(s.extends)?s.extends:[s.extends],a=Array.isArray(o)?o:[o];s={...s,extends:[...a,...i]}}else s={...s,extends:o};ee(s,t,n,r)}}}function Ng(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let o=r.options;if(!o||!o.length)return;let n=t.__ref,s=n&&n.__exec&&n.__exec.value,i=typeof s=="function",a=t.value!=null&&typeof t.value!="function";if(i||a){let f;if(i)try{f=s(t,t.state,t.context)}catch{return}else f=t.value;let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let c=e||!(n&&n.__selectSynced);if(n&&(n.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<o.length;f++)o[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function Ox(t,e){let{children:r,content:o}=t,n=t.childExtends;if(typeof r=="function"){let a=r;try{r=a(t,t.state,t.context)}catch(d){if(r=void 0,typeof console<"u"&&console.error){let h=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${h} (initial run, treating as empty):`,d?.message||d)}}t.children=r;let c=t.__ref,l=!1,f=Nt(t,t.childrenDeps,a),u=Q(()=>{let d=l;l=!0;let h;try{h=f(t,t.state,t.context)}catch(k){if(typeof console<"u"&&console.error){let C=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${C}${d?"":" (initial tracking run)"}:`,k?.message||k)}return}if(!d||h===t.children)return;t.children=h;let g=typeof t.onContentUpdate=="function",p=g?[]:null,m=g?[]:null,_=g?[]:null;if(Array.isArray(h)&&t.childrenAs==="state"){let k=t.childProps,C=[],T=new Map;for(let I=0;I<h.length;I++){let F=h[I],N=k;if(typeof k=="function")try{N=k(t,F)}catch{N=null}let St=N&&N.key||F&&F.key||`${I}`;C.push(St),T.set(St,{rawChild:F,childProps:N})}let $=new Set(C),M=c.__children.slice();for(let I of M)if(!$.has(I)){let F=t[I];F?.remove&&F.remove(),delete t[I],m&&m.push(I)}let D=t.childExtends,V=t.tag==="fragment",H=t.context?.document||globalThis.document,G=V?null:H?.createDocumentFragment(),ft=new Set;for(let I of C){let F=T.get(I),N=F.rawChild,St=t[I];if(St&&St.state){if(N&&typeof N=="object"){let L=St.state,W=L.$replace||L.replace,K=L.$update||L.update;try{if(typeof W=="function")W.call(L,N);else if(typeof K=="function"){for(let Z in L)if(!(Z==="__element"||Z==="root"||Z==="parent"||Z==="update")&&!Object.prototype.hasOwnProperty.call(N,Z))try{L[Z]=void 0}catch{}K.call(L,N)}else for(let Z in N)L[Z]=N[Z]}catch(Z){if(typeof console<"u"&&console.error){let To=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${I}" failed to patch at ${To} (reconcile, keeping its previous data for this pass):`,Z?.message||Z)}}}_&&_.push(I);continue}let Dt=N;(typeof N=="string"||typeof N=="number")&&(Dt={value:N,text:N});let xe=F.childProps,J=xe?{...xe,state:Dt}:{state:Dt};if(D&&!J.ignoreChildExtends)if(J.extends){let L=Array.isArray(J.extends)?J.extends:[J.extends],W=Array.isArray(D)?D:[D];J={...J,extends:[...W,...L]}}else J={...J,extends:D};let dt;try{dt=ee(J,t,I,e)}catch(L){if(typeof console<"u"&&console.error){let W=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${I}" failed to construct at ${W} (reconcile, skipping this row):`,L?.message||L)}ft.add(I);continue}!V&&dt?.node&&G&&G.appendChild(dt.node),p&&p.push(I)}if(!V&&G&&G.childNodes.length&&t.node&&t.node.appendChild(G),!V&&t.node){let I=null;for(let F of C){let N=t[F]?.node;if(!N)continue;let St=I?I.nextSibling:t.node.firstChild;N!==St&&t.node.insertBefore(N,St),I=N}}c.__children=ft.size?C.filter(I=>!ft.has(I)):C,g&&(p.length||m.length)&&hx(t,{added:p,removed:m,kept:_}),Ng(t,!1);return}let x=g?[...c.__children]:null;for(let k of[...c.__children]){let C=t[k];C?.remove&&C.remove(),delete t[k]}c.__children=[],Fg(t,h,e),Ng(t,!1),g&&hx(t,{added:[...c.__children],removed:x,kept:[]})},{depth:c.path.length,label:vt(c,"children")});c.__effects.push(u)}let s=Fg(t,r,e);if(o!=null&&!(o&&o.__ref)){let a=o;if(typeof a=="string"||typeof a=="number"?a={text:a}:typeof a!="object"&&(a={}),t.childProps&&(a=ma(t.childProps,a)),n&&!a.ignoreChildExtends)if(a.extends){let c=Array.isArray(a.extends)?a.extends:[a.extends],l=Array.isArray(n)?n:[n];a={...a,extends:[...l,...c]}}else a={...a,extends:n};ee(a,t,"content",e)}if(r&&!s)return;let i=t.context?.components||{};{let a=Object.keys(t);for(let c=0;c<a.length;c++){let l=a[c];if(!l.endsWith("Extends")||typeof t[l]!="string")continue;let f=l.slice(0,-7);if(!f||f.charCodeAt(0)<65||f.charCodeAt(0)>90)continue;let u={extends:t[l]};delete t[l];for(let d=c+1;d<a.length;d++){let h=a[d],g=h.charCodeAt(0);if(g>=65&&g<=90||Ft.has(h)||typeof t[h]=="function"&&(h.startsWith("on")||h.startsWith(".")))break;let p=t[h];p!==void 0&&(u[h]=p,delete t[h])}t[f]&&typeof t[f]=="object"?t[f]={...u,...t[f]}:t[f]=u}}for(let a of Object.keys(t)){if(Ft.has(a)||typeof t[a]!="object"||t[a]===null)continue;let c=a.charCodeAt(0);if(c<65||c>90)continue;let l=t[a];if(!l.__ref){if(!l.extends&&!l.extend){let f=i[a]||i[`smbls.${a}`];f&&(l={...l,extends:f})}if(t.childProps&&(l=ma(t.childProps,l)),n&&!l.ignoreChildExtends)if(l.extends){let f=Array.isArray(l.extends)?l.extends:[l.extends],u=Array.isArray(n)?n:[n];l={...l,extends:[...u,...f]}}else l={...l,extends:n};ee(l,t,a,e)}}}function Rx(t,e,r){let{node:o}=t;if(!o)return;o.ref=t;let n=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(n){let i=n.parentNode;if(i){if(r?.position==="before"&&r.node)i.insertBefore(o,r.node);else if(r?.position==="after"&&r.node){let a=r.node.nextSibling;i.insertBefore(o,a||n)}else i.insertBefore(o,n);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(r?.position==="before"&&r.node)s.insertBefore(o,r.node);else if(r?.position==="after"&&r.node){let i=r.node.nextSibling;i?s.insertBefore(o,i):s.appendChild(o)}else s.appendChild(o)}var jg=3;function cg(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=jg?!1:(t.__inBeforeUpdate=!0,!0)}function nr(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===jg&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${jg}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function sr(t,e,r){let o=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&Ct(o,e,r);let n="on"+t,s=e[n];if(typeof s=="function"){let c=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(c){if(e.__ref[c])return!0;e.__ref[c]=!0}let l=e.context?.designSystem;l&&st(l);let f=!!c;try{let u=s(e,e.state,e.context,r);if(u&&typeof u.then=="function"){let d=e.__ref;return u.catch(h=>{e.context?.plugins?.length&&Ct("error",e,{hook:n,error:h})||console.error(`[DOMQL] Lifecycle "${n}" error:`,h)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(e.context?.plugins?.length&&Ct("error",e,{hook:n,error:u})||console.error(`[DOMQL] Lifecycle "${n}" error:`,u),e.context?.strictMode)throw u}finally{l&&rt(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var Px={blue:"#213eb0",green:"#389d34",red:"#e15c55",yellow:"#EDCB38",orange:"#e97c16",transparent:"rgba(0, 0, 0, 0)",black:"black",gray:"#4e4e50",white:"white",title:["--gray 1 -168","--gray 1 +168"],caption:["--gray 1 -68","--gray 1 +68"],paragraph:["--gray 1 -42","--gray 1 +42"],disabled:["--gray 1 -26","--gray 1 +26"],line:["--gray 1 -16","--gray 1 +16"],blueDeep:"#0A5CB8",blueBright:"#47A8FF",accentInk:["blueDeep","blueBright"],greenDeep:"#2A6E28",greenBright:"#7FD07B",successInk:["greenDeep","greenBright"],redDeep:"#A83520",redBright:"#FF8C78",dangerInk:["redDeep","redBright"],orangeDeep:"#94500F",orangeBright:"#F4A45E",warningInk:["orangeDeep","orangeBright"],magentaDeep:"#A100A1",magentaBright:"#FF7AFF",magentaInk:["magentaDeep","magentaBright"]},Ix={"gradient-blue-light":`linear-gradient(to right,
|
|
54
|
+
`):"")}}if(mm(s,!0),_w(s,e,n),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let p=s.context?.designSystem;p&&it(p);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{p&&tt()}}if(ar("Create",s,o),ar("Complete",s,o),ar("Render",s,o),ar("RenderRouter",s,o),fw(s,o),typeof s.onFrame=="function"){let p=s.onFrame,m=s.context?.designSystem,b=()=>{if(s.node){if(s.node.isConnected){m&&it(m);try{p(s,s.state,s.context)}catch(_){console.error("[DOMQL] onFrame error:",_)}finally{m&&tt()}}requestAnimationFrame(b)}};requestAnimationFrame(b)}return s}function XT(t,e,r){let o=!e,n=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=o&&n&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!yt(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,ie(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},l=t.context?.polyglot;if(l?.translations){let f=a.lang||l.defaultLang||"en",u=l.translations[f];if(u&&typeof u=="object")for(let h in u)c[h]===void 0&&(c[h]=u[h]);let d=new Set(l.languages||[]);for(let h in l.translations)!d.has(h)&&c[h]===void 0&&(c[h]=l.translations[h])}t.state=yt(c)?c:Ge(c),t.state.__element=t,t.state.root=t.state,ie(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),ie(t,t.state);return}if(typeof i=="string"){if(t.state=uw(i,e),t.state&&typeof t.state=="object"&&!yt(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}ie(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=yt(a)?a:Ge(a||{})}else yt(i)?t.state=i:t.state=Ge({...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,ie(t,t.state)}function cm(t,e){if(!e)return t;let r=e.split("/"),o=t;for(let n of r){if(o==null)return{};o=o[n]}return o??{}}function uw(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let n=t.slice(3);return n?cm(e.state,n):e.state??{}}if(t.startsWith("~/")){let n=e.state?.root||e.state,s=t.slice(2);return s?cm(n,s):n??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=cm(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let o=e.context?.polyglot;if(o?.translations){let n=e.state?.root?.lang||o.defaultLang||"en",s=o.translations[n];if(s?.[t]!==void 0)return s[t];if(o.translations[t]!==void 0)return o.translations[t]}return{}}var JT=new Set(["s","state","ctx","context"]);function ZT(t){try{let r=Function.prototype.toString.call(t).match(/^[^(]*\(([^)]*)\)/);return r?r[1].split(",").map(o=>o.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function QT(t){if(typeof t!="function"||t.length!==2)return!1;let e=ZT(t);if(e.length<2)return!1;let r=e[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!JT.has(r)}function t1(t){let e=t.__ref,r=t.tag||"div",o=t.context?.designSystem,n=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||Nt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Fn(a)||xt[a]||vt&&vt.has(a)||Mr(r,a)||(Pt()&&QT(t[a])&&console.warn(`[smbls] custom prop "${a}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${a}', \u2026) instead of reading el.${a}(\u2026) directly (see RULES.md Rule 8).`),n.push({prop:a,fn:t[a]}))}for(let i=0;i<n.length;i++){let{prop:a,fn:c}=n[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){o&&it(o);try{return c(t,t.state,t.context)}catch{return}finally{o&&tt()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function e1(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let o=e[r];try{typeof o=="function"?o(t,t.state,t.context):typeof o=="string"&&t.state?.[o]}catch{}}}function jt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...o){return e1(t,e),r.apply(this,o)}}function xa(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function Ct(t,e){return()=>t.path.join(".")+"::"+e}function dw(t,e){let r=t.__ref,o=!!(e&&e.skipIfEffect);if(t1(t),typeof t.text=="function"){let s=t.text,i=jt(t,t.textDeps,s),a=Z(()=>{if(!r.contentManaged)try{let c=i(t,t.state,t.context);t.node&&c!=null&&typeof c!="function"&&typeof c!="object"&&(typeof c=="string"&&c.includes("{{")&&(c=Jr.call(t,c,t.state)),In(t,c))}catch{}},{depth:r.path.length,label:Ct(r,"text")});r.__effects.push(a),r.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){let s=t.text,i=Z(()=>{if(r.contentManaged)return;let a=Jr.call(t,s,t.state);a!=null&&(t.text=a),t.node&&In(t,a??"")},{depth:r.path.length,label:Ct(r,"text")});r.__effects.push(i),r.__exec.text=s}for(let s of Object.keys(t))if(typeof t[s]=="function"&&!Nt.has(s)&&!Fn(s)&&!r.__exec[s]){if(xt[s]){let i=t[s],a=jt(t,t[s+"Deps"],i),c=s,l,f=Z(()=>{let u=t.context?.designSystem;u&&it(u);try{let d=a(t,t.state,t.context),h=xt[c](d,t,t.state,t.context),g=c==="show"||c==="hide";if(h&&t.node){let p=hm(h),m=g&&t.node.style.display!=="none";(p===null||p!==l||m)&&(l=p,Mn(t.node,h))}else if(t.node&&g){l=void 0;let p=r.__explicitDisplay;t.node.style.display=typeof p=="string"?p:""}}finally{u&&tt()}},{depth:r.path.length,label:Ct(r,c)});r.__effects.push(f),r.__exec[s]=i}else if(vt&&vt.has(s)){let i=t[s],a=jt(t,t[s+"Deps"],i),c=s,l,f=Z(()=>{let u=t.context?.designSystem;u&&it(u);try{let d=a(t,t.state,t.context);if(t.node)if(d!=null){let h=c+":"+String(d);h!==l&&(l=h,Mn(t.node,{[c]:d}))}else l=void 0,t.node.style[c]=""}finally{u&&tt()}},{depth:r.path.length,label:Ct(r,c)});r.__effects.push(f),r.__exec[s]=i}}if(typeof t.html=="function"){let s=t.html,i=jt(t,t.htmlDeps,s),a=Z(()=>{let c=t.context?.designSystem;c&&it(c);try{let l=i(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&(t.node.innerHTML=l)}finally{c&&tt()}},{depth:r.path.length,label:Ct(r,"html")});r.__effects.push(a),r.__exec.html=s}if(typeof t.value=="function"){let s=t.value,i=jt(t,t.valueDeps,s),a=Z(()=>{try{let c=i(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let l=c==null?"":String(c);if(t.node.value===l)return;let f=typeof document<"u"&&document.activeElement===t.node,u=f&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,d=f&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=l,f&&u!=null&&d!=null)try{t.node.setSelectionRange(u,d)}catch{}}catch{}},{depth:r.path.length,label:Ct(r,"value")});r.__effects.push(a),r.__exec.value=s}if(typeof t.style=="function"){let s=t.style,i=jt(t,t.styleDeps,s),a,c=Z(()=>{let l=i(t,t.state,t.context),f=hm(l);(f===null||f!==a)&&(a=f,Mn(t.node,l))},{depth:r.path.length,label:Ct(r,"style")});r.__effects.push(c),r.__exec.style=s}else if(t.style&&typeof t.style=="object")for(let s in t.style){let i=t.style[s];if(typeof i!="function")continue;let a=jt(t,xa(t.styleDeps,s),i),c,l=Z(()=>{try{let f=a(t,t.state,t.context);if(t.node){let u=s+":"+String(f);u!==c&&(c=u,Mn(t.node,{[s]:f}))}}catch{}},{depth:r.path.length,label:Ct(r,"style."+s)});r.__effects.push(l)}if(t.attr&&typeof t.attr=="object"){for(let s in t.attr)if(typeof t.attr[s]=="function"){let i=jt(t,xa(t.attrDeps,s),t.attr[s]),a=s,c=Z(()=>{try{let l=i(t,t.state,t.context);t.node?.setAttribute&&(l==null||l===!1&&!sr(a)?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,We(a,l)))}catch{}},{depth:r.path.length,label:Ct(r,"attr."+a)});r.__effects.push(c)}}if(t.aria&&typeof t.aria=="object")for(let s in t.aria){if(typeof t.aria[s]!="function")continue;let i=jt(t,xa(t.ariaDeps,s),t.aria[s]),a="aria-"+s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=Z(()=>{try{let l=i(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,We(a,l))}catch{}},{depth:r.path.length,label:Ct(r,"aria."+s)});r.__effects.push(c)}if(t.data&&typeof t.data=="object")for(let s in t.data){if(typeof t.data[s]!="function")continue;let i=jt(t,xa(t.dataDeps,s),t.data[s]),c="data-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=Z(()=>{try{let f=i(t,t.state,t.context);if(!t.node?.setAttribute)return;f==null||f===!1?t.node.removeAttribute(c):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(c,f===!0?"":f)}catch{}},{depth:r.path.length,label:Ct(r,"data."+s)});r.__effects.push(l)}let n=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(n)for(let s in n){if(typeof n[s]!="function")continue;let i=jt(t,xa(t.classDeps,s),n[s]),a=Z(()=>{try{let c=i(t,t.state,t.context);if(!t.node?.classList)return;typeof c=="string"?t.node.classList.add(c):c?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:r.path.length,label:Ct(r,"class."+s)});r.__effects.push(a)}!o&&typeof t.if=="function"&&pw(t,r,t.if);for(let s of Object.keys(t)){if(Nt.has(s)||typeof t[s]!="function")continue;let i=s.charCodeAt(0);if(i>=65&&i<=90||Fn(s))continue;let a=t[s];r.__exec[s]=a;let c=t.tag||"div";if(Mr(c,s)&&!xt[s]&&!(vt&&vt.has(s))){let l=Lr(s)||s,f=jt(t,t[s+"Deps"],a),u=Z(()=>{try{let d=f(t,t.state,t.context);t.node?.setAttribute&&(d==null||d===!1&&!sr(l)?t.node.removeAttribute(l):typeof d!="function"&&typeof d!="object"&&(l==="src"&&"src"in t.node?t.node.src=d:t.node.setAttribute(l,We(l,d))))}catch{}},{depth:r.path.length,label:Ct(r,s)});r.__effects.push(u)}}if(s1(t),c1(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let s=t.onStateUpdate,i=t.stateDeps,a=!1,c=[],l=Z(()=>{let f=[];for(let g=0;g<i.length;g++){let p=i[g];try{f[g]=typeof p=="function"?p(t,t.state,t.context):t.state?.[p]}catch{f[g]=void 0}}if(!a){a=!0,c=f;return}let u=f.length!==c.length;for(let g=0;!u&&g<f.length;g++)f[g]!==c[g]&&(u=!0);let d=c;if(c=f,!u)return;let h=t.context?.designSystem;h&&it(h);try{s(t,t.state,t.context,{prev:d,next:f})}catch(g){if(t.context?.plugins?.length&&At("error",t,{hook:"onStateUpdate",error:g})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',g),t.context?.strictMode)throw g}finally{h&&tt()}},{depth:r.path.length,label:Ct(r,"onStateUpdate")});r.__effects.push(l)}a1(t)}function nw(t){let e=t.parent,r=e?.node;if(!r||!t.node){_w(t,t.parent);return}let o=null,n=Object.keys(e),s=n.indexOf(t.key);for(let i=s+1;i<n.length;i++){let a=e[n[i]];if(a?.node?.parentNode===r){o=a.node;break}}o?r.insertBefore(t.node,o):r.appendChild(t.node)}function pw(t,e,r){let o=jt(t,t.ifDeps,r),n=Z(()=>{let s;try{s=o(t,t.state,t.context)}catch(a){if(s=!1,e.__ifError=a,typeof console<"u"&&console.warn){let c=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,a?.message||a)}return}let i=e.__if;if(e.__if=!!s,i&&!e.__if&&t.node)t.node.remove();else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=Ir(t)),t.node&&(t.node.ref=t),nw(t),pm(t);else{if(e.__ifInitialized=!0,t.tag||(t.tag=Pr(t)),ar("Init",t,{}),t.node||(t.node=Ir(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.tag==="fragment"&&!e.__fragmentAnchor){let c=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(c),e.__fragmentAnchor=c}ar("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),yw(t,{}),dw(t,{skipIfEffect:!0}),pm(t),gw(t),bw(t,{}),nw(t),fw(t,{})}},{depth:e.path.length,label:Ct(e,"if")});e.__effects.push(n)}function In(t,e){let r=t.node;if(!r)return;let o=e==null?"":String(e);if(t.tag==="string"){r.nodeValue!==o&&(r.nodeValue=o);return}let n=t.__ref,s=n?n.__textNode:null;if(s&&s.parentNode!==r&&(s=null),!s){let i=r.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==o&&(s.nodeValue=o):r.firstChild?(s=(r.ownerDocument||t.context?.document||globalThis.document).createTextNode(o),r.insertBefore(s,r.firstChild)):(r.textContent=o,s=r.firstChild&&r.firstChild.nodeType===3?r.firstChild:null),n&&(n.__textNode=s||null)}function pm(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&In(t,t.text),f1(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"&&Mn(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let o=t.attr[r];typeof o=="function"||typeof o=="object"||o!=null&&(o===!1&&!sr(r)||e.setAttribute&&e.setAttribute(r,We(r,o)))}if(t.data&&typeof t.data=="object")for(let r in t.data){let o=t.data[r];typeof o=="function"||typeof o=="object"||o==null||o===!1||e.dataset&&(e.dataset[r]=o===!0?"":o)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(o=>o&&e.classList.add(o));else if(typeof r=="object")for(let o in r){let n=typeof r[o]=="function"?r[o](t,t.state,t.context):r[o];n&&e.classList.add(typeof n=="string"?n:o)}}}}function hm(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Mn(t,e){if(!t||!e||!t.style)return;let r=null;for(let o in e){let n=e[o];if(n!=null){if(o.charAt(0)==="&"&&typeof n=="object"){r||(r={}),r[o]=n;continue}try{let s=String(n),i=o.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,c?"important":"")}catch{}}}r&&o1(t,r)}var r1=0;function o1(t,e){let r=`_ds${r1++}`;t.classList.add(r);let o=t.ownerDocument,n=o.querySelector("style[data-smbls-scoped]");n||(n=o.createElement("style"),n.setAttribute("data-smbls-scoped",""),o.head.appendChild(n));let s="";for(let i in e){let a="."+r,c=i.replace(/&/g,a).split(",").map(f=>{let u=f.trim();return u.includes(a)?u:a+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let d in l){let h=l[d];if(typeof h=="object"){let g=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),p="";for(let m in h)p+=`${m.replace(/[A-Z]/g,b=>"-"+b.toLowerCase())}: ${h[m]};`;u+=Te(`${g} { ${p} }`,g)+`
|
|
55
|
+
`}else f+=`${d.replace(/[A-Z]/g,g=>"-"+g.toLowerCase())}: ${h};`}f&&(s+=Te(`${c} { ${f} }`,c)+`
|
|
56
|
+
`),u&&(s+=u)}}s&&(n.textContent+=s)}var sw=new Set;function iw(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 n1(t,e,r){let o=iw(r);queueMicrotask(()=>{if(!t.__ref)return;let n;try{n=e(t,t.state,t.context)}catch{return}if(iw(n)===o)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";sw.has(s)||(sw.add(s),console.warn(`[smbls] subscribeTo function at "${s}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${r.join(", ")||"(none)"}], probed [${Array.isArray(n)?n.join(", "):String(n)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function s1(t){let e=t.subscribeTo,r=typeof e=="function",o=e;if(r)try{o=e(t,t.state,t.context)}catch{o=null}if(r&&Pt()&&n1(t,e,Array.isArray(o)?o:[]),!Array.isArray(o)||o.length===0)return;let n=t.__ref;for(let s=0;s<o.length;s++){let i=o[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],l=a.slice(1),f={value:!1},u=Z(()=>{let d=t.state&&(yt(t.state)?t.state.root:null);if(!d||!yt(d))return;let h=d;h=h[c];for(let p=0;p<l.length&&!(h==null||typeof h!="object");p++)if(yt(h))h=h[l[p]];else break;if(!f.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"){let p=t.context?.designSystem;p&&it(p);try{if(Bg(n)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>ir(n,!1),b=>{ir(n,!0),t.context?.plugins?.length&&At("error",t,{hook:"onBeforeUpdate",error:b})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",b)}):(ir(n,!1),m===!1&&(g=!0))}}catch(m){ir(n,!0),t.context?.plugins?.length&&At("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{p&&tt()}}if(!g&&t.node&&n.__effects)for(let p=0;p<n.__effects.length;p++){let m=n.__effects[p];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!g&&typeof t.onUpdate=="function"){let p=t.context?.designSystem;p&&it(p);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&At("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{p&&tt()}}},{depth:n.path.length,label:Ct(n,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,n.__effects.push(u)}}function bm(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}var aw=new Set;function i1(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",o=r+"::"+t;aw.has(o)||(aw.add(o),console.warn(`[smbls/css] "${t}" at ${r} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}function Nn(t,e,r){let o={},n=new Set,s=(i,a,c)=>{let l=c?new Set(Object.keys(o)):null;if(xt[i]){let f=xt[i](a,e,e.state,e.context);if(f){let u=Array.isArray(f)?f:[f];for(let d of u)d&&Object.assign(o,d)}}else o[i]=a;if(c)for(let f in o)l.has(f)||n.add(f)};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=t[i];if(typeof a=="function"&&(a=a(e,e.state,e.context)),a==null||typeof a=="function")continue;if(typeof a=="object"&&!Array.isArray(a)){if(i==="style"){for(let u in a){let d=a[u];if(typeof d=="function"&&(d=d(e,e.state,e.context)),d==null||typeof d=="function")continue;let h=typeof e[u]=="function"&&(xt[u]||vt&&vt.has(u));s(u,d,h)}continue}if(bm(i,e)){let u=Nn(a,e,!1);Object.keys(u).length&&(o[`[data-theme="${i.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(i)){Pt()&&i1(i,e);continue}let l=i;if(i.charCodeAt(0)===64&&!i.startsWith("@media")&&!i.startsWith("@keyframes")){let u=e.context?.designSystem?.media?.[i.slice(1)];u&&(l=`@media ${u}`)}let f=Nn(a,e,!1);Object.keys(f).length&&(o[l]=f);continue}let c=typeof e[i]=="function"&&(xt[i]||vt&&vt.has(i));s(i,a,c)}if(r)for(let i in o)n.add(i);for(let i of n){let a=o[i];typeof a=="string"&&!a.includes("!important")&&(o[i]=a+" !important")}return o}function _m(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)&&_m(t[r],e+1))return!0}return!1}function hw(t,e,r){if(!e||typeof e!="object"||Array.isArray(e))return null;if(bm(t,r)){let s=Nn(e,r,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let o=t;if(t.charAt(0)==="@"&&!t.startsWith("@media")&&!t.startsWith("@keyframes")){let s=r.context?.designSystem?.media?.[t.slice(1)];s&&(o=`@media ${s}`)}let n=Nn(e,r,!1);return Object.keys(n).length?{cssProp:o,block:n}:null}function a1(t){let e=t.__ref;for(let r of Object.keys(t)){if(!dm(r))continue;let o=t[r];if(!o||typeof o!="object"||Array.isArray(o)||!_m(o))continue;let n=null,s,i=Z(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&it(a);let c,l=!1;try{let f=hw(r,o,t),u=f?hm(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=be({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&tt()}if(!(l||!t.node.classList)){if(n)for(let f of n)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);n=c}},{depth:e.path.length,label:Ct(e,"cssBlock("+r+")")});e.__effects.push(i)}}function c1(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let o of Object.keys(t)){let n=o.charAt(0);if(n!=="."&&n!=="!")continue;let s=o.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let u=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${n}\` is read as one prop name. Nest the selector inside instead: \`${n}${u}: { '${s.slice(u.length)}': {...} }\`.`)}continue}let i=t[o];if(!i||typeof i!="object")continue;let a=n==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=()=>{let u,d=t[s];if(d===void 0){let p=!!t.state&&s in t.state,m=t.state?t.state[s]:void 0;if(p||m!==void 0)u=m;else{let b=t.context?.cases?.[s];if(b===void 0)return;try{u=typeof b=="function"?b.call(t,t):b}catch(_){u=!1,e.__conditionalError=_,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,_?.message||_)}}}else if(typeof d=="function")try{u=d(t,t.state,t.context)}catch(p){u=!1,e.__conditionalError=p,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,p?.message||p)}else u=d;let h=a?!u:!!u;if(!t.node||h===c.lastMatch)return;c.lastMatch=h;let g=t.context?.designSystem;g&&it(g);try{if(h){let p={},m={},b=!1;for(let y in i){if(!Object.prototype.hasOwnProperty.call(i,y))continue;let x=i[y],k=y.charAt(0);if((k===":"||k==="@"||k==="&")&&x&&typeof x=="object"&&!Array.isArray(x)){if(bm(y,t)){let T=Nn(x,t,!1);Object.keys(T).length&&(m[`[data-theme="${y.slice(1)}"] &`]=T,b=!0)}else{let T=y;if(k==="@"&&!y.startsWith("@media")&&!y.startsWith("@keyframes")){let D=t.context?.designSystem?.media?.[y.slice(1)];D&&(T=`@media ${D}`)}let $=Nn(x,t,!1);Object.keys($).length&&(m[T]=$,b=!0)}continue}let E=typeof x=="function"?x(t,t.state,t.context):x;if(E!=null)if(xt[y]){let T=xt[y](E,t,t.state,t.context);if(T){let $=Array.isArray(T)?T:[T];for(let D of $)D&&Object.assign(p,D)}}else vt&&vt.has(y)&&(p[y]=E)}let _=Object.keys(p);if(_.length){Mn(t.node,p);for(let y of _)r.set(y,o);c.appliedKeys=_}else c.appliedKeys=null;if(b){let y=be(m,null,t.context?.cssPrefix),x=y?y.split(" ").filter(Boolean):[];if(x.length&&t.node.classList){for(let k of x)t.node.classList.add(k);c.appliedClasses=x}else c.appliedClasses=null}else if(c.appliedClasses){for(let y of c.appliedClasses)t.node.classList.remove(y);c.appliedClasses=null}}else{if(c.appliedKeys){for(let p of c.appliedKeys)r.get(p)===o&&(t.node.style[p]="",r.delete(p));c.appliedKeys=null}if(c.appliedClasses){for(let p of c.appliedClasses)t.node.classList.remove(p);c.appliedClasses=null}}}finally{g&&tt()}};e.__conditionalRunners.push(l);let f=Z(l,{depth:e.path.length,label:Ct(e,"conditional("+o+")")});e.__effects.push(f)}}var lm=new WeakSet;function l1(t){let e=t.ownerDocument;!e||lm.has(e)||(lm.add(e),queueMicrotask(()=>{lm.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var fm=new WeakSet,cw=!1;function f1(t){let{node:e}=t;if(!e)return;if(cw||(cw=!0,be({display:"none"})),fm.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}fm.add(t);let r=t.context?.designSystem;r&&it(r),Kg();try{let o={},n=!1;if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&xt.theme){let s=xt.theme(t.theme,t,t.state,t.context);if(s){if(Array.isArray(s))for(let i of s)i&&Object.assign(o,i);else Object.assign(o,s);n=!0}}for(let s of Object.keys(t)){if(typeof t[s]=="function"||Nt.has(s)||s==="theme")continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!Fn(s)){if(xt[s]){let a=t[s],c=xt[s](a,t,t.state,t.context);if(c){if(Array.isArray(c))for(let l of c)l&&Object.assign(o,l);else Object.assign(o,c);n=!0}}else if(vt&&vt.has(s)){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charCodeAt(0)===45){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charAt(0)==="&"||s.charAt(0)==="@"||s.charAt(0)===":"){let a=t[s];if(a&&typeof a=="object"&&!Array.isArray(a)){if(_m(a))continue;let c=hw(s,a,t);c&&(o[c.cssProp]=c.block,n=!0)}}}}if(n){o.display&&String(o.display).includes("!important")&&(e.style.setProperty("display",String(o.display).replace(/\s*!important\s*$/,""),"important"),delete o.display);let s=be(o,null,t.context?.cssPrefix);if(s&&e.classList){let a=s.split(" ").filter(Boolean),c=!1;for(let l of a)e.classList.add(l),c||(l.charCodeAt(0)===95&&l.charCodeAt(1)===99||l.charCodeAt(0)===95&&l.indexOf("_c",1)!==-1)&&(c=!0);c&&l1(e)}let i=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(i!=null){let a=o.display;if(a&&a!==i)if(i==="none"){let c=[];for(let l of e.classList)l.startsWith("_d-")&&l!=="_d-none"&&c.push(l);for(let l of c)e.classList.remove(l);e.classList.add("_d-none")}else e.style.display==="none"&&(typeof t.hide=="function"||typeof t.show=="function")||(e.style.display=t.display),t.__ref&&(t.__ref.__explicitDisplay=t.display)}}}finally{Gg(),r&&tt(),fm.delete(t)}}function gw(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let s=t.aria[n];if(typeof s=="function"||typeof s=="object"||s==null)continue;let i="aria-"+n.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,We(i,s))}let r=jg(t);for(let n in r){let s=r[n];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(n,s===!0?"":s)}let o=t.tag||"div";for(let n of Object.keys(t)){if(typeof t[n]=="function"||Nt.has(n)||n==="on"||r[n]!==void 0)continue;let s=n.charCodeAt(0);if(!(s>=65&&s<=90)&&!Fn(n)&&!(xt[n]||vt&&vt.has(n))&&Mr(o,n)){let i=t[n];if(i==null||(typeof i=="string"&&i.includes("{{")&&(i=Jr(i,t,t.state,t.context),t[n]=i),i==null||typeof i=="function"||typeof i=="object")||i===!1&&!sr(Lr(n)||n))continue;let a=Lr(n)||n;e.setAttribute(a,We(a,i))}}}function u1(t,e){let r=t.node,o=t.__ref,n=o.__autoGrow;if(!e){if(n&&n.active){try{r.removeEventListener("input",n.resize)}catch{}r.style.height="",n.appliedMax!=null&&r.style.maxHeight===n.appliedMax&&(r.style.maxHeight=""),n.active=!1,n.appliedMax=null,n.lastMeasure=0}return}n||(n=o.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,resize:()=>{if(r.scrollHeight===0&&n.lastMeasure>0)return;r.style.height="auto";let i=r.scrollHeight;r.style.height=i+"px",i>0&&(n.lastMeasure=i)}},o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{try{r.removeEventListener("input",n.resize)}catch{}})),n.active||(r.addEventListener("input",n.resize),n.active=!0);let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==n.appliedMax&&(s==null?n.appliedMax!=null&&r.style.maxHeight===n.appliedMax&&(r.style.maxHeight=""):r.style.maxHeight=s,n.appliedMax=s),n.resize()}function d1(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.__ref,o=t.autoGrow,n=typeof o=="function"?jt(t,t.autoGrowDeps,o):null,s=Z(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===o&&n?n:i)(t,t.state,t.context)}catch{a=null}u1(t,a)},{depth:r.path.length,label:Ct(r,"autoGrow")});r.__effects||(r.__effects=[]),r.__effects.push(s),n&&(r.__exec.autoGrow=o)}var mw=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function yw(t,e){for(let r of Object.keys(t)){if(!Fn(r)||mw.has(r))continue;let o=lf(r);if(o){ff(o,t,t[r]);continue}let n=t[r];if(typeof n=="string"&&/^[A-Za-z_$][\w$]*$/.test(n)){let i=n;n=function(c){return t.call(i,c)}}if(typeof n!="function")continue;let s=GT(r);Dr.has(s)||On(YT(s),t,n)}p1(t)}function p1(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},o=!1;for(let d of mw){let h=t[d];typeof h=="function"&&(r[d]=h,o=!0)}if(!o)return;let n=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,s=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,a=0,c=0,l=!1,f=d=>{let h=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];h&&(i=h.clientX,a=h.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let h=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!h)return;let g=h.clientX-i,p=h.clientY-a,m=Date.now()-c;if(m>s)return;let b=Math.abs(g),_=Math.abs(p);if(Math.max(b,_)<n)return;let y;if(b>_*1.2)y=g<0?"left":"right";else if(_>b*1.2)y=p<0?"up":"down";else return;let x="onSwipe"+y.charAt(0).toUpperCase()+y.slice(1),k=r[x],E=r.onSwipe;k&&k.call(t,d,t,t.state,t.context),E&&E.call(t,{direction:y,dx:g,dy:p,dt:m,event:d},t,t.state,t.context)};e.addEventListener("touchstart",f,{passive:!0}),e.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",f)}catch{}try{e.removeEventListener("touchend",u)}catch{}})}function va(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=va(n,s):r[o]=s}return r}function gm(t,e,r){if(!e||!t.node)return;let o=t.childExtends;if(Array.isArray(e)){let n=t.tag==="fragment",s=t.context?.document||globalThis.document,i=n?null:s?.createDocumentFragment();if(!n&&!i)return;let a=t.childProps,c=t.childrenAs;for(let l=0;l<e.length;l++){let f=e[l],u=f;(typeof f=="string"||typeof f=="number")&&(f={text:f});let d=a;if(typeof a=="function")try{d=a(t,f)}catch{d=null}if(c==="state"){let p=u;(typeof u=="string"||typeof u=="number")&&(p={value:u,text:u}),f=d?{...d,state:p}:{state:p}}else d&&(f=va(d,f));if(o&&!f.ignoreChildExtends)if(f.extends){let p=Array.isArray(f.extends)?f.extends:[f.extends],m=Array.isArray(o)?o:[o];f={...f,extends:[...m,...p]}}else f={...f,extends:o};let h=f?.key||u&&typeof u=="object"&&u.key||`${l}`,g;try{g=oe(f,t,h,r)}catch(p){if(typeof console<"u"&&console.error){let m=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${h}" failed to construct at ${m} (initial render, skipping this row):`,p?.message||p)}continue}!n&&g?.node&&i.appendChild(g.node)}return n||t.node.appendChild(i),!0}if(typeof e=="string"){let n=uw(e,t);if(Array.isArray(n))return gm(t,n,r)}if(typeof e=="object")for(let n in e){if(Nt.has(n))continue;let s=e[n];if(!(s==null||s===!1)){if((typeof s=="string"||typeof s=="number")&&(s={text:s}),t.childProps&&(s=va(t.childProps,s)),o&&!s.ignoreChildExtends)if(s.extends){let i=Array.isArray(s.extends)?s.extends:[s.extends],a=Array.isArray(o)?o:[o];s={...s,extends:[...a,...i]}}else s={...s,extends:o};oe(s,t,n,r)}}}function mm(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let o=r.options;if(!o||!o.length)return;let n=t.__ref,s=n&&n.__exec&&n.__exec.value,i=typeof s=="function",a=t.value!=null&&typeof t.value!="function";if(i||a){let f;if(i)try{f=s(t,t.state,t.context)}catch{return}else f=t.value;let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let c=e||!(n&&n.__selectSynced);if(n&&(n.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<o.length;f++)o[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function bw(t,e){let{children:r,content:o}=t,n=t.childExtends;if(typeof r=="function"){let u=r;try{r=u(t,t.state,t.context)}catch(m){if(r=void 0,typeof console<"u"&&console.error){let b=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${b} (initial run, treating as empty):`,m?.message||m)}}t.children=r;let d=t.__ref,h=!1,g=jt(t,t.childrenDeps,u),p=Z(()=>{let m=h;h=!0;let b;try{b=g(t,t.state,t.context)}catch(D){if(typeof console<"u"&&console.error){let I=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${I}${m?"":" (initial tracking run)"}:`,D?.message||D)}return}if(!m||b===t.children)return;t.children=b;let _=typeof t.onContentUpdate=="function",y=_?[]:null,x=_?[]:null,k=_?[]:null;if(Array.isArray(b)&&t.childrenAs==="state"){let D=t.childProps,I=[],z=new Map;for(let W=0;W<b.length;W++){let wt=b[W],L=D;if(typeof D=="function")try{L=D(t,wt)}catch{L=null}let ot=L&&L.key||wt&&wt.key||`${W}`;I.push(ot),z.set(ot,{rawChild:wt,childProps:L})}let V=new Set(I),rt=d.__children.slice();for(let W of rt)if(!V.has(W)){let wt=t[W];wt?.remove&&wt.remove(),delete t[W],x&&x.push(W)}let at=t.childExtends,G=t.tag==="fragment",K=t.context?.document||globalThis.document,lt=G?null:K?.createDocumentFragment(),Ut=new Set;for(let W of I){let wt=z.get(W),L=wt.rawChild,ot=t[W];if(ot&&ot.state){if(L&&typeof L=="object"){let Et=ot.state,Ke=Et.$replace||Et.replace,nt=Et.$update||Et.update;try{if(typeof Ke=="function")Ke.call(Et,L);else if(typeof nt=="function"){for(let M in Et)if(!(M==="__element"||M==="root"||M==="parent"||M==="update")&&!Object.prototype.hasOwnProperty.call(L,M))try{Et[M]=void 0}catch{}nt.call(Et,L)}else for(let M in L)Et[M]=L[M]}catch(M){if(typeof console<"u"&&console.error){let ht=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${W}" failed to patch at ${ht} (reconcile, keeping its previous data for this pass):`,M?.message||M)}}}k&&k.push(W);continue}let U=L;(typeof L=="string"||typeof L=="number")&&(U={value:L,text:L});let Y=wt.childProps,j=Y?{...Y,state:U}:{state:U};if(at&&!j.ignoreChildExtends)if(j.extends){let Et=Array.isArray(j.extends)?j.extends:[j.extends],Ke=Array.isArray(at)?at:[at];j={...j,extends:[...Ke,...Et]}}else j={...j,extends:at};let pt;try{pt=oe(j,t,W,e)}catch(Et){if(typeof console<"u"&&console.error){let Ke=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${W}" failed to construct at ${Ke} (reconcile, skipping this row):`,Et?.message||Et)}Ut.add(W);continue}!G&&pt?.node&<&<.appendChild(pt.node),y&&y.push(W)}if(!G&<&<.childNodes.length&&t.node&&t.node.appendChild(lt),!G&&t.node){let W=null;for(let wt of I){let L=t[wt]?.node;if(!L)continue;let ot=W?W.nextSibling:t.node.firstChild;L!==ot&&t.node.insertBefore(L,ot),W=L}}d.__children=Ut.size?I.filter(W=>!Ut.has(W)):I,_&&(y.length||x.length)&&ow(t,{added:y,removed:x,kept:k}),mm(t,!1);return}let $=_?[...d.__children]:null;for(let D of[...d.__children]){let I=t[D];I?.remove&&I.remove(),delete t[D]}d.__children=[],gm(t,b,e),mm(t,!1),_&&ow(t,{added:[...d.__children],removed:$,kept:[]})},{depth:d.path.length,label:Ct(d,"children")});d.__effects.push(p)}let s=gm(t,r,e);if(o!=null&&!(o&&o.__ref)){let u=o;if(typeof u=="string"||typeof u=="number"?u={text:u}:typeof u!="object"&&(u={}),t.childProps&&(u=va(t.childProps,u)),n&&!u.ignoreChildExtends)if(u.extends){let d=Array.isArray(u.extends)?u.extends:[u.extends],h=Array.isArray(n)?n:[n];u={...u,extends:[...h,...d]}}else u={...u,extends:n};oe(u,t,"content",e)}if(r&&!s)return;let i=t.context?.components||{};{let u=Object.keys(t);for(let d=0;d<u.length;d++){let h=u[d];if(!h.endsWith("Extends")||typeof t[h]!="string")continue;let g=h.slice(0,-7);if(!g||g.charCodeAt(0)<65||g.charCodeAt(0)>90)continue;let p={extends:t[h]};delete t[h];for(let m=d+1;m<u.length;m++){let b=u[m],_=b.charCodeAt(0);if(_>=65&&_<=90||Nt.has(b)||typeof t[b]=="function"&&(b.startsWith("on")||b.startsWith(".")))break;let y=t[b];y!==void 0&&(p[b]=y,delete t[b])}t[g]&&typeof t[g]=="object"?t[g]={...p,...t[g]}:t[g]=p}}let a=e?.mountYield===!0||t.yieldChildren===!0,c=Object.keys(t),l=u=>{if(Nt.has(u)||typeof t[u]!="object"||t[u]===null)return;let d=u.charCodeAt(0);if(d<65||d>90)return;let h=t[u];if(!h.__ref){if(!h.extends&&!h.extend){let g=i[u]||i[`smbls.${u}`];g&&(h={...h,extends:g})}if(t.childProps&&(h=va(t.childProps,h)),n&&!h.ignoreChildExtends)if(h.extends){let g=Array.isArray(h.extends)?h.extends:[h.extends],p=Array.isArray(n)?n:[n];h={...h,extends:[...p,...g]}}else h={...h,extends:n};oe(h,t,u,e)}};if(!a){for(let u of c)l(u);return}Yx();let f=u=>{for(let d=u;d<c.length;d++)if(l(c[d]),d+1<c.length&&Gx()){let h=d+1;Jx(()=>f(h));return}};f(0),Xx()}function _w(t,e,r){let{node:o}=t;if(!o)return;o.ref=t;let n=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(n){let i=n.parentNode;if(i){if(r?.position==="before"&&r.node)i.insertBefore(o,r.node);else if(r?.position==="after"&&r.node){let a=r.node.nextSibling;i.insertBefore(o,a||n)}else i.insertBefore(o,n);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(r?.position==="before"&&r.node)s.insertBefore(o,r.node);else if(r?.position==="after"&&r.node){let i=r.node.nextSibling;i?s.insertBefore(o,i):s.appendChild(o)}else s.appendChild(o)}var ym=3;function Bg(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=ym?!1:(t.__inBeforeUpdate=!0,!0)}function ir(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===ym&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${ym}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function ar(t,e,r){let o=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&At(o,e,r);let n="on"+t,s=e[n];if(typeof s=="function"){let c=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(c){if(e.__ref[c])return!0;e.__ref[c]=!0}let l=e.context?.designSystem;l&&it(l);let f=!!c;try{let u=s(e,e.state,e.context,r);if(u&&typeof u.then=="function"){let d=e.__ref;return u.catch(h=>{e.context?.plugins?.length&&At("error",e,{hook:n,error:h})||console.error(`[DOMQL] Lifecycle "${n}" error:`,h)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(e.context?.plugins?.length&&At("error",e,{hook:n,error:u})||console.error(`[DOMQL] Lifecycle "${n}" error:`,u),e.context?.strictMode)throw u}finally{l&&tt(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var xw={blue:"#213eb0",green:"#389d34",red:"#e15c55",yellow:"#EDCB38",orange:"#e97c16",transparent:"rgba(0, 0, 0, 0)",black:"black",gray:"#4e4e50",white:"white",title:["--gray 1 -168","--gray 1 +168"],caption:["--gray 1 -68","--gray 1 +68"],paragraph:["--gray 1 -42","--gray 1 +42"],disabled:["--gray 1 -26","--gray 1 +26"],line:["--gray 1 -16","--gray 1 +16"],blueDeep:"#0A5CB8",blueBright:"#47A8FF",accentInk:["blueDeep","blueBright"],greenDeep:"#2A6E28",greenBright:"#7FD07B",successInk:["greenDeep","greenBright"],redDeep:"#A83520",redBright:"#FF8C78",dangerInk:["redDeep","redBright"],orangeDeep:"#94500F",orangeBright:"#F4A45E",warningInk:["orangeDeep","orangeBright"],magentaDeep:"#A100A1",magentaBright:"#FF7AFF",magentaInk:["magentaDeep","magentaBright"]},ww={"gradient-blue-light":`linear-gradient(to right,
|
|
57
57
|
rgba(4, 116, 242, 1),
|
|
58
58
|
rgba(0, 48, 103, 1)
|
|
59
59
|
)`,"gradient-blue-dark":`linear-gradient(to right,
|
|
@@ -79,28 +79,28 @@ FROM ${a}${l}`},cE=t=>{let e=[],r=(o,n)=>{for(let s in o){let i=n?`${n}/${s}`:s;
|
|
|
79
79
|
#1E54F0 36%,
|
|
80
80
|
#8B4CCA 69%,
|
|
81
81
|
#C66894 100%
|
|
82
|
-
)`};var YT={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"}}}},XT={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},JT={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"}}},Dx={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...YT,...XT,...JT,none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var $x={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var Lx={ratio:1.618,subSequence:!0};var Mx={SourceSans:[{url:""}]},Fx={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 Nx={symbols:'<svg height="24" width="24"><path d="M13.843 2.7C19.063 2.7 23 6.366 23 11.228c0 3.754-2.862 6.584-6.658 6.584-3.287 0-5.007-2.318-5.007-4.609 0-2.395 1.923-4.344 4.287-4.344.566 0 1.023.12 1.309.223a.212.212 0 01.137.229l-.016.058-.514 1.18a.223.223 0 01-.245.13 2.965 2.965 0 00-.506-.046c-1.245 0-2.258 1.027-2.258 2.288 0 1.33 1.165 2.373 2.651 2.373 2.195 0 3.913-1.777 3.913-4.046 0-3.024-2.294-5.135-5.58-5.135-4.076 0-7.393 3.36-7.393 7.491a7.519 7.519 0 002.871 5.924l-4.96 3.18A12.042 12.042 0 012 14.7c0-6.617 5.313-12 11.843-12z" fill-rule="evenodd"/></svg>',logo:'<svg height="24" width="24"><path d="M13.843 2.7C19.063 2.7 23 6.366 23 11.228c0 3.754-2.862 6.584-6.658 6.584-3.287 0-5.007-2.318-5.007-4.609 0-2.395 1.923-4.344 4.287-4.344.566 0 1.023.12 1.309.223a.212.212 0 01.137.229l-.016.058-.514 1.18a.223.223 0 01-.245.13 2.965 2.965 0 00-.506-.046c-1.245 0-2.258 1.027-2.258 2.288 0 1.33 1.165 2.373 2.651 2.373 2.195 0 3.913-1.777 3.913-4.046 0-3.024-2.294-5.135-5.58-5.135-4.076 0-7.393 3.36-7.393 7.491a7.519 7.519 0 002.871 5.924l-4.96 3.18A12.042 12.042 0 012 14.7c0-6.617 5.313-12 11.843-12z" fill-rule="evenodd"/></svg>',arrowDownCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-circle"><circle cx="12" cy="12" r="10"/><path d="M8 12l4 4 4-4M12 8v8"/></svg>',arrowDownLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-left"><path d="M17 7L7 17M17 17H7V7"/></svg>',arrowDownRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-right"><path d="M7 7l10 10M17 7v10H7"/></svg>',arrowDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down"><path d="M12 5v14M19 12l-7 7-7-7"/></svg>',arrowLeftCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left-circle"><circle cx="12" cy="12" r="10"/><path d="M12 8l-4 4 4 4M16 12H8"/></svg>',arrowLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>',arrowRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><path d="M5 12h14M12 5l7 7-7 7"/></svg>',arrowRightCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right-circle"><circle cx="12" cy="12" r="10"/><path d="M12 16l4-4-4-4M8 12h8"/></svg>',arrowUpCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-circle"><circle cx="12" cy="12" r="10"/><path d="M16 12l-4-4-4 4M12 16V8"/></svg>',arrowUpLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-left"><path d="M17 17L7 7M7 17V7h10"/></svg>',arrowUpRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-right"><path d="M7 17L17 7M7 7h10v10"/></svg>',arrowUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up"><path d="M12 19V5M5 12l7-7 7 7"/></svg>',checkCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><path d="M22 4L12 14.01l-3-3"/></svg>',check:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17l-5-5"/></svg>',chevronDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path d="M6 9l6 6 6-6"/></svg>',chevronLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><path d="M15 18l-6-6 6-6"/></svg>',chevronRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><path d="M9 18l6-6-6-6"/></svg>',chevronUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-up"><path d="M18 15l-6-6-6 6"/></svg>',copy:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>',eyeOff:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye-off"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24M1 1l22 22"/></svg>',eye:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',info:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-info"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>',lock:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg>',minus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minus"><path d="M5 12h14"/></svg>',sun:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>',moon:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg>',moreHorizontal:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-horizontal"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',moreVertical:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>',send:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-send"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg>',smile:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-smile"><circle cx="12" cy="12" r="10"/><path d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"/></svg>',search:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>',upload:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-upload"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"/></svg>',video:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video"><path d="M23 7l-7 5 7 5V7z"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>',x:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><path d="M18 6L6 18M6 6l12 12"/></svg>',star:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',plus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><path d="M12 5v14M5 12h14"/></svg>'};var jx={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 Bx={base:150,ratio:1.333,unit:"ms",subSequence:!0};var Ux={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var ya={version:"0.0.1",color:Px,gradient:Ix,theme:Dx,typography:$x,spacing:Lx,font:Mx,fontFamily:Fx,timing:Bx,icons:Nx,media:jx,sizes:Ux,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Dn={};P(Dn,{A:()=>nS,AssetPicture:()=>sw,Audio:()=>cw,Avatar:()=>_S,B:()=>Aw,Block:()=>Vx,Box:()=>gf,Br:()=>Pw,Button:()=>aS,ButtonSet:()=>uS,COMPONENTS:()=>mo,Caption:()=>bw,Checkbox:()=>Uw,CheckboxHgroup:()=>Vw,Circle:()=>rw,CircleButton:()=>lS,Clickable:()=>Qx,Data:()=>Ow,Dialog:()=>pS,DialogFooter:()=>gS,DialogHeader:()=>hS,Dropdown:()=>wS,DropdownList:()=>SS,DropdownParent:()=>kS,DropdownParentFocus:()=>vS,DropdownSiblingFocus:()=>CS,FileIcon:()=>tS,Flex:()=>zx,Focusable:()=>tw,FocusableComponent:()=>ew,Footnote:()=>Ew,Form:()=>Xx,Grid:()=>qx,Gutter:()=>Gx,H1:()=>uw,H2:()=>dw,H3:()=>pw,H4:()=>hw,H5:()=>gw,H6:()=>mw,Headline:()=>vw,Hgroup:()=>Mw,HgroupButton:()=>Nw,HgroupRows:()=>Fw,Hoverable:()=>Zx,Hr:()=>Rw,I:()=>Tw,Icon:()=>Zw,IconButton:()=>dS,IconText:()=>Qw,Iframe:()=>Jx,Img:()=>Yx,Inline:()=>Hx,InlineFlex:()=>Wx,InlineGrid:()=>Kx,Input:()=>jw,Italic:()=>Sw,KangorooButton:()=>fS,Li:()=>Iw,Link:()=>ym,Notification:()=>ES,NumberInput:()=>Bw,Ol:()=>$w,P:()=>yw,Picture:()=>nw,Radio:()=>Hw,RadioHgroup:()=>zw,Range:()=>xS,RouteLink:()=>sS,RouterLink:()=>bm,SHAPES:()=>pf,Select:()=>iS,Shape:()=>Gg,Span:()=>fw,SquareButton:()=>cS,Strong:()=>_w,Subhead:()=>Cw,Svg:()=>iw,Text:()=>lw,Textarea:()=>Kw,TextareaWithButton:()=>Gw,Theme:()=>ow,Title:()=>kw,Toggle:()=>Ww,ToggleHgroup:()=>qw,Tooltip:()=>mS,TooltipHidden:()=>yS,TooltipParent:()=>bS,U:()=>xw,Ul:()=>Dw,Underline:()=>ww,Video:()=>aw,depth:()=>hf,focusableRingEnabled:()=>uf,getSystemGlobalTheme:()=>ba});var Hg={};P(Hg,{Block:()=>Vx,Flex:()=>zx,Grid:()=>qx,Gutter:()=>Gx,Inline:()=>Hx,InlineFlex:()=>Wx,InlineGrid:()=>Kx});var Vx={display:"block"},Hx={display:"inline"},zx={display:"flex"},Wx={display:"inline-flex"},qx={display:"grid"},Kx={display:"inline-grid"},Gx={boxSize:"C1"};var zg={};P(zg,{Img:()=>Yx});R();var Yx={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=Wt(t);return e&&e.src||t.src},srcset:t=>{let e=Wt(t);return(e?wi(e):"")||t.srcset}}};var Wg={};P(Wg,{Form:()=>Xx});var Xx={tag:"form"};var qg={};P(qg,{Iframe:()=>Jx});var Jx={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var Kg={};P(Kg,{Clickable:()=>Qx,Focusable:()=>tw,FocusableComponent:()=>ew,Hoverable:()=>Zx,focusableRingEnabled:()=>uf});var ZT={appearance:"none",cursor:"pointer",fontFamily:"inherit"},Zx={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}}},Qx={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function uf(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}var tw={border:"none",outline:t=>uf(t)?"solid 0 blue.3":"none",":focus-visible":{opacity:1,outline:t=>uf(t)?"solid X blue.3":"none"},attr:{tabIndex:t=>t.tabIndex}},ew={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",style:ZT};var Jg={};P(Jg,{Picture:()=>nw});var Xg={};P(Xg,{Theme:()=>ow,getSystemGlobalTheme:()=>ba});var Yg={};P(Yg,{Circle:()=>rw,SHAPES:()=>pf,Shape:()=>Gg,default:()=>QT,depth:()=>hf});R();var be=E(),hf={4:{boxShadow:`rgba(0,0,0,.10) 0 2${be.unit.default} 4${be.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${be.unit.default} 6${be.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${be.unit.default} 10${be.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${be.unit.default} 16${be.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${be.unit.default} 26${be.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${be.unit.default} 42${be.unit.default}`}},In=t=>ot(t.shapeDirectionColor)||ot(t.borderColor)||ot(t.backgroundColor)||ot(t.background),df=t=>{let e=la.transition(t.transition,t);return e&&e.transition},pf={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:In(t),transition:df(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:In(t),transition:df(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:In(t),transition:df(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:df(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${In(t)} 25%, transparent 25%), linear-gradient(315deg, ${In(t)} 25%, transparent 25%)`},"&:after":{background:In(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)"}}}},Gg={deps:{exec:ct,getSpacingBasedOnRatio:Ee,getMediaColor:Rt},classlist:{shape:t=>t.deps.exec(pf[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=pf[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}}},rw={round:"100%"},QT=Gg;R();var ba=({context:t,state:e})=>{let r=e&&e.root,o=r&&r.globalTheme||t.designSystem&&t.designSystem.globalTheme;return o==="auto"?null:o},ow={deps:{depth:hf},classlist:{depth:t=>!Et(t.depth)&&t.deps.depth[t.depth]}};var nw={deps:{getSystemGlobalTheme:ba},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:ba},tag:"source",attr:{media:t=>{let{key:e,context:r,deps:o}=t,{media:n}=r.designSystem,s=o.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":n[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var Zg={};P(Zg,{AssetPicture:()=>sw});R();var sw={tag:"picture",children:t=>{let e=Wt(t);if(e)return Si(e,t.alt)}};var Qg={};P(Qg,{Svg:()=>iw});var iw={tag:"svg",attr:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},html:t=>{let{context:e}=t;if(t.semanticIcons)return;if(t.html&&typeof t.html!="function")return t.call("exec",t.html,t);let{designSystem:r,utils:o}=e,n=r&&r.svg,s=t.spriteId||r&&r.useSvgSprite,i=t.call("exec",t.src,t),a=d=>`<use xlink:href="#${d}" />`;if(typeof i=="string"){let d=i.match(/^\s*<symbol\b[^>]*\bid="([^"]+)"/);if(d){let h=d[1],g=e.document||(typeof document<"u"?document:null);if(!(g&&typeof g.getElementById=="function"&&g.getElementById(h))){let m=o&&o.scratchSystem&&o.scratchSystem.appendSVGSprite;r&&!r.__svgCache&&(r.__svgCache={}),typeof m=="function"?m({[h]:i},{document:g}):o&&typeof o.init=="function"&&o.init({svg:{[h]:i}},{document:g,emotion:e.emotion})}return a(h)}}if(!s&&i)return i;let c=t.spriteId;if(c)return a(c);if(n&&n[i])return a(i);let l=Symbol.for(i),f=n[l];if(f&&n[f])return a(f);if(!i)return a("");if(typeof i=="string"&&!i.includes("<"))return typeof console<"u"&&console.warn&&console.warn(`[Svg] Unknown sprite symbol "${i}" \u2014 not registered in design-system sprite. Set the icon name to one that exists in designSystem.icons / context.svg, or register the SVG body via utils.init({ svg: { '${i}': '<svg>...</svg>' } }).`),a("");let u=0;for(let d=0;d<i.length;d++)u=(u<<5)-u+i.charCodeAt(d)|0;return f=n[l]=`svg-${(u>>>0).toString(36)}`,o.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var tm={};P(tm,{Video:()=>aw});R();var aw={tag:"video",controls:!0,attr:{src:t=>{let e=Wt(t);return e&&e.src||t.src}},children:t=>{let e=Wt(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 em={};P(em,{Audio:()=>cw});R();var cw={tag:"audio",controls:!0,attr:{src:t=>{let e=Wt(t);return e&&e.src||t.src}},children:t=>{let e=Wt(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 rm={};P(rm,{B:()=>Aw,Caption:()=>bw,Data:()=>Ow,Footnote:()=>Ew,H1:()=>uw,H2:()=>dw,H3:()=>pw,H4:()=>hw,H5:()=>gw,H6:()=>mw,Headline:()=>vw,I:()=>Tw,Italic:()=>Sw,P:()=>yw,Span:()=>fw,Strong:()=>_w,Subhead:()=>Cw,Text:()=>lw,Title:()=>kw,U:()=>xw,Underline:()=>ww});var lw={},fw={tag:"span"},uw={tag:"h1"},dw={tag:"h2"},pw={tag:"h3"},hw={tag:"h4"},gw={tag:"h5"},mw={tag:"h6"},yw={tag:"p"},bw={tag:"caption"},_w={tag:"strong",fontWeight:"700"},xw={tag:"u"},ww={tag:"u"},Sw={tag:"i"},kw={},vw={tag:"h6",fontSize:"B",fontWeight:500},Cw={tag:"span",fontSize:"Z1"},Ew={tag:"span",fontSize:"Z"},Aw={tag:"b"},Tw={tag:"i"},Ow={tag:"data"};var om={};P(om,{Box:()=>gf,Br:()=>Pw,Hr:()=>Rw,Li:()=>Iw,Ol:()=>$w,Ul:()=>Dw});var t1=t=>{if(!t.context)return;let{props:e,__ref:r}=t,o=oe(e,t,{unpack:!1});r.__class=o},gf={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:t1},Rw={tag:"hr",margin:"C1 0"},Pw={tag:"br"},Iw={tag:"li"},Dw={tag:"ul",childExtends:{extends:"Li"}},$w={tag:"ol",childExtends:{extends:"Li"}};var nm={};P(nm,{Hgroup:()=>Mw,HgroupButton:()=>Nw,HgroupRows:()=>Fw});var Lw=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},Mw={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:Lw,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:Lw,margin:"0",color:"paragraph"}},Fw={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},Nw={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var sm={};P(sm,{Input:()=>jw});var jw={extends:["Focusable"],tag:"input",border:"none",type:"input",theme:"field",fontSize:"A",round:"C",lineHeight:"1",padding:"Z2 B",attr:{pattern:t=>t.pattern,minLength:t=>t.minlength,maxLength:t=>t.maxlength,name:t=>t.name,autocomplete:t=>t.autocomplete,placeholder:t=>t.placeholder,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e},checked:t=>t.call("exec",t.checked,t),disabled:t=>t.disabled||null,readonly:t=>t.readonly,required:t=>t.required,type:t=>t.type}};var im={};P(im,{NumberInput:()=>Bw});var Bw={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 am={};P(am,{Checkbox:()=>Uw,CheckboxHgroup:()=>Vw});var Uw={extends:"Focusable",tag:"label",boxSize:"fit-content fit-content",cursor:"pointer",round:"Y",Input:{type:"checkbox",position:"absolute",opacity:"0",width:"1px",height:"1px",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",":checked + div":{theme:"primary"},":checked + div > svg":{transform:"none",opacity:"1"},":focus-visible + div":{outline:"solid X blue.3",outlineOffset:"Z"},attr:{checked:t=>t.call("exec",t.parent.checked)}},Flex:{align:"center center",fontSize:"B1",padding:"V",theme:"field",round:"X2",transition:"background A defaultBezier",Icon:{icon:"check",opacity:"0",transform:"scale(0.9) rotate(-15deg)",transition:"opacity B defaultBezier"}}},Vw={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var cm={};P(cm,{Radio:()=>Hw,RadioHgroup:()=>zw});var Hw={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}},zw={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var lm={};P(lm,{Toggle:()=>Ww,ToggleHgroup:()=>qw});var Ww={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}},qw={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var fm={};P(fm,{Textarea:()=>Kw,TextareaWithButton:()=>Gw});var Kw={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"}},Gw={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 um={};P(um,{FileIcon:()=>tS,Icon:()=>Zw,IconText:()=>Qw});var Yw=new Set,Xw=(t,e)=>{if(!Yw.has(t)&&(Yw.add(t),typeof console<"u"&&console.warn)){let r=e&&e.__ref&&e.__ref.path,o=r&&r.length?` at <${r.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${o} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},Jw=new WeakMap,e1=t=>{let e=Jw.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},Jw.set(t,e)),e},r1=(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},o1=(t,e,r)=>{let o=r&&r.context&&r.context.document||(typeof document<"u"?document:null);st(t);try{let n=E();n&&!n.__svgCache&&(n.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=fo(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&o&&Object.keys(s).length&&uo(s,{document:o}),Object.keys(s).length>0}finally{rt()}},n1=(t,e,r,o,n)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=e1(s);if(a.failed.has(e))return!1;let c=a.waiting.get(e);if(c||(c=new Set,a.waiting.set(e,c)),c.add(n),a.pending.has(e))return!0;let l=Promise.resolve().then(()=>i(e,t)).then(f=>{let u=r1(f,r);return u?o1(s,u,o):!1}).catch(f=>(typeof console<"u"&&console.error&&console.error(`[Icon] iconsLoader failed for "${e}":`,f),!1)).then(f=>{a.pending.delete(e);let u=a.waiting.get(e);a.waiting.delete(e),f||a.failed.add(e),u&&u.forEach(d=>{try{d(f)}catch(h){console.error("[Icon] repaint error:",h)}})});return a.pending.set(e,l),!0},Zw={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,r)=>{let{parent:o}=t,{icons:n,useIconSprite:s,verbose:i}=r&&r.designSystem,{toCamelCase:a}=r&&r.utils,c=g=>{let p=g[".isActive"];if(p)return g.call("exec",p.name||p.icon)},l=(g,p,m)=>{let{semanticIcons:_}=m&&m.designSystem,{toCamelCase:b}=m&&m.utils,y=f(g,p),k=b(y).split(/([a-z])([A-Z])/g),C=k[1]?k[0]:y.split(".")[0].split(" ")[0],T=_&&_[C];if(T){let $=y.includes(".")?"sfsymbols."+y.split(".").slice(1).join("."):"sfsymbols";return y=T[$]||T[y.split(".")[0].split(" ")[0]],{tag:"span",semanticIcons:!0,width:"A",height:"A",lineHeight:"1em",":after":{fontSize:"Z",fontWeight:"300",content:`"${y}"`,textAlign:"center",display:"inline-block",style:{color:"currentColor",fontFamily:"'SF Pro Icons', 'SF Pro', 'SF Symbols', 'Segoe UI'"}}}}},f=(g,p)=>{let{key:m}=g,_=g.call("exec",g.name||g.icon||m,g);return g.call("isString",_)&&_.includes("{{")&&(_=g.call("replaceLiteralsWithObjectFields",_)),g.call("isString",_)?_:m},u=t.src,d,h=()=>{let g=f(t,e),p=g;if(g.includes(" ")){let D=g.split(" ");g=D[0]+D.slice(1).map(V=>V.charAt(0).toUpperCase()+V.slice(1)).join("")}let m=a(g),_=m.split(/([a-z])([A-Z])/g),b=l(t,e,r);if(b){Object.assign(t,b);return}let y;t.isActive&&(y=c(t));let x=o[".isActive"];o&&o.isActive&&x&&x.icon&&(y=t.call("exec",x.icon||x.Icon.name||x.Icon.icon,t)),t.call("isString",y)&&y.includes("{{")&&(y=t.call("replaceLiteralsWithObjectFields",y));let k;n[y]&&(k=y),n[m]?k=m:n[_[0]+_[1]]?k=_[0]+_[1]:n[_[0]]?k=_[0]:i&&t.warn("Can't find icon:",g,k);let C=n[k],T=o&&o.src||u;!C&&!T&&(n1(r,p,m,t,V=>{if(!(d&&d._disposed)){if(!V)return Xw(p,t);h()}})||Xw(p,t));let $=s&&k,M=C||T||n.noIcon;if(!(t.spriteId===$&&t.src===M&&t.node&&t.node.innerHTML)&&(t.spriteId=$,t.src=M,typeof t.html=="function"&&t.node)){let D=t.context&&t.context.designSystem;D&&st(D);try{let V=t.html(t,t.state,t.context);V!=null&&typeof V!="function"&&(t.node.innerHTML=V)}finally{D&&rt()}}};d=Q(h,{depth:t.__ref&&t.__ref.path&&t.__ref.path.length||0}),t.__ref&&(t.__ref.__effects||(t.__ref.__effects=[]),t.__ref.__effects.push(d))},attr:{viewBox:"0 0 24 24","aria-hidden":t=>t.ariaLabel||t.role==="img"?null:"true",focusable:"false"}},Qw={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,r=typeof t.icon=="string"&&t.icon;return t.call("exec",r||e.icon||t.name||t.sfSymbols||e.sfSymbols,t)},icon:t=>t.call("exec",t.parent.icon,t.parent)},text:t=>t.text},tS={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var _m={};P(_m,{A:()=>nS,Link:()=>ym,RouteLink:()=>sS,RouterLink:()=>bm});var _a={};P(_a,{default:()=>l1,getActiveRoute:()=>mm,lastLevel:()=>yf,lastPathname:()=>mf,matchRoute:()=>pm,parseQuery:()=>hm,parseRoutePattern:()=>dm,router:()=>We,runGuards:()=>gm});R();var rS=/^:(.+)/,oS=/^\*$/,eS=new Map,dm=t=>{let e=eS.get(t);if(e)return e;let r=t.replace(/^\//,"").split("/"),o=[],n=!1;for(let i=0;i<r.length;i++){let a=r[i].match(rS);a?o.push({index:i,name:a[1]}):oS.test(r[i])&&(n=!0)}let s={segments:r,params:o,hasWildcard:n,pattern:t};return eS.set(t,s),s},pm=(t,e,r=0)=>{let n=t.replace(/^\//,"").split("/").filter(Boolean).slice(r),s="/"+(n[0]||"");if(!e)return{key:null,content:null,params:{},routePath:s};let i=null,a=-1,c={};for(let l in e){if(l==="/*")continue;let f=dm(l),u=s1(n,f);u>a&&(a=u,i=l,c=i1(n,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},s1=(t,e)=>{let{segments:r,hasWildcard:o}=e;if(!o&&r.length!==t.length&&r.length!==1&&r.length>t.length)return-1;let n=0,s=Math.min(r.length,t.length);for(let i=0;i<s;i++)if(r[i]===t[i])n+=3;else if(rS.test(r[i]))n+=1;else if(oS.test(r[i]))n+=.5;else return-1;return n},i1=(t,e)=>{let r={};for(let{index:o,name:n}of e.params)t[o]&&(r[n]=decodeURIComponent(t[o]));return r},hm=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((o,n)=>{e[n]!==void 0?(Array.isArray(e[n])||(e[n]=[e[n]]),e[n].push(o)):e[n]=o}),e},gm=async(t,e)=>{if(!t||!t.length)return!0;for(let r of t){let o=await r(e);if(o===!1)return!1;if(typeof o=="string")return o}return!0},mm=(t=0,e)=>{e||(e=typeof v<"u"?v.location.pathname:"/");let o=e.split("/")[t+1];if(o)return`/${o}`},mf,yf=0,a1=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,c1={level:yf,pushState:!0,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof et<"u"&&(et.scrollingElement||et.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0},We=async(t,e,r={},o={})=>{let n=e||void 0,s=n?.context?.window||v,i=n?.context?.document||et,a={...c1,...n.context.routerOptions,...o};yf=a.lastLevel;let c=n.__ref;(a.contentElementKey!=="content"&&a.contentElementKey!==c.contentElementKey||!c.contentElementKey)&&(c.contentElementKey=a.contentElementKey||"content");let l=c.contentElementKey||a.contentElementKey||"content",f=s.location.origin!=="null"?s.location.origin:"http://localhost";t=a1(t);let u=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,d=new u(f+t),{pathname:h,search:g,hash:p}=d,m=hm(g),_=n.node,b=p&&p!==s.location.hash.slice(1),y=h!==mf;mf=h;let x=c.__routerRendered,k,C,T,$;if(a.useParamsMatching){let H=pm(h,n.routes,a.level);k=H.key,C=H.routePath,T=H.content,$=H.params}else{k=mm(a.level,h),C=k;let H=n.routes;T=H?H[k||"/"]||H["/*"]:null,$={}}let M=a.scrollToNode?_:a.scrollNode;if(n.state?.root?.debugging){n.state.root.debugging=!1;return}if(!T){a.onNotFound?a.onNotFound({pathname:h,route:k,element:n}):a.silent||console.warn("[smbls/router] no content matched for path",h,"\u2014 available routes:",Object.keys(n.routes||{}));return}if(a.guards&&a.guards.length){let H={pathname:h,route:k,params:$,query:m,hash:p,element:n,state:r},G=await gm(a.guards,H);if(G===!1)return;if(typeof G=="string")return We(G,e,r,{...o,guards:[]})}if(a.pushState)try{s.history.pushState(r,null,h+(g||"")+(p||""))}catch{}if(y||!b){let H={route:k,routePath:C,hash:p,debugging:!1};Object.keys($).length&&(H.params=$),Object.keys(m).length&&(H.query=m),a.updateState&&n.state.update(H,{preventContentUpdate:!0})}let D=!x||x.content!==T||x.route!==k;if(y||D||a.force===!0){l&&a.removeOldElement&&n[l].remove();let H=n.__ref?.origin?.content,G={};if(H)for(let I in H){let F=H[I];I==="__ref"||I==="props"||I==="node"||I==="parent"||I==="key"||(typeof F=="string"||typeof F=="number"||typeof F=="boolean"||typeof F=="object"&&F!==null&&!F.node&&!F.__ref)&&(G[I]=F)}let ft={...G,...typeof T=="object"?T:{extends:T}};a.useFragment&&(ft.tag="fragment");try{if(typeof n?.set!="function")return;n.set(ft,{contentElementKey:l}),c.__routerRendered={content:T,route:k}}catch(I){console.error("[smbls/router] failed to render route content",h,I)}}if(a.scrollToTop&&M?.scrollTo&&M.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&T[l]?.node?.scrollTo&&T[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),p){let H=i.getElementById(p);if(H&&M?.scrollTo){let G=H.getBoundingClientRect().top+_.scrollTop-(a.scrollToOffset||0);M.scrollTo({...a.scrollToOptions||{},top:G,left:0})}}mr("routeChanged",n,a)},l1=We;var f1=(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let _ of p){if(!m||!m[_]){m=null;break}m=m[_]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||We)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}},ym={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>Rr(t,t.href)||Rr(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:f1},nS={extends:"Link"},bm={onClick:(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let _ of p){if(!m||!m[_]){m=null;break}m=m[_]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||We)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}}},sS={extends:[ym,bm]};var xm={};P(xm,{Select:()=>iS});var iS={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 wm={};P(wm,{Button:()=>aS,ButtonSet:()=>uS,CircleButton:()=>lS,IconButton:()=>dS,KangorooButton:()=>fS,SquareButton:()=>cS});var aS={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)},cS={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"},lS={extends:"SquareButton",round:"C"},fS={extends:"Button",childExtends:"IconText"},uS={tag:"nav",display:"flex",childExtends:"SquareButton"},dS={extends:["SquareButton","ClickableItem"],round:"Z"};var Sm={};P(Sm,{Dialog:()=>pS,DialogFooter:()=>gS,DialogHeader:()=>hS});var pS={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},hS={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},gS={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 km={};P(km,{Tooltip:()=>mS,TooltipHidden:()=>yS,TooltipParent:()=>bS});R();var mS={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=>mt(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)}},yS={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)}},bS={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,o=e||r;if(!o)return;let n=o&&o[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":n||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var vm={};P(vm,{Avatar:()=>_S});var u1=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)},_S={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=u1(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 Cm={};P(Cm,{Range:()=>xS});var xS={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:en("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:en("#fff",.35)}},":focus":{"::-webkit-slider-thumb":{borderColor:"#3C6AC0"}}},"@light":{background:"gray9","::-webkit-slider-thumb":{background:"white",borderColor:"gray9"},":hover":{"::-webkit-slider-thumb":{borderColor:"gray7"}},":focus":{"::-webkit-slider-thumb":{borderColor:"blue"}}},deps:{returnPropertyValue:(t,e,r)=>{let o=t.call("exec",t[e],t);return(t.call("isFunction",o)?o(t,t.state):o!==void 0?o:r!==void 0?r:0)+""}},attr:{type:"range",value:(t,e)=>t.call("exec",e.value||t.value||t.defaultValue,t),min:(t,e)=>t.deps.returnPropertyValue(t,"min",0),max:(t,e)=>t.deps.returnPropertyValue(t,"max",100),step:(t,e)=>t.deps.returnPropertyValue(t,"step",1)}};var Em={};P(Em,{Dropdown:()=>wS,DropdownList:()=>SS,DropdownParent:()=>kS,DropdownParentFocus:()=>vS,DropdownSiblingFocus:()=>CS});var wS={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"},SS={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"}}},kS={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},vS={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()}}},CS={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 Am={};P(Am,{Notification:()=>ES});var ES={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 mo=Object.assign({},Hg,zg,Wg,qg,Kg,Jg,Zg,Qg,Yg,tm,em,Xg,rm,om,nm,sm,im,am,cm,lm,fm,um,_m,xm,wm,Sm,km,vm,Cm,Em,Am);function bf(t){if(t==null)return 0;if(typeof t!="object")return AS(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let o=0;o<t.length;o++)e=(e^bf(t[o]))*16777619;return e>>>0}let r=Object.keys(t).sort();for(let o=0;o<r.length;o++)e=(e^AS(r[o]))*16777619,e=(e^bf(t[r[o]]))*16777619;return e>>>0}function AS(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e}function _f(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!=typeof e||typeof t!="object")return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!_f(t[n],e[n]))return!1;return!0}let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let n=0;n<r.length;n++){let s=r[n];if(!Object.prototype.hasOwnProperty.call(e,s)||!_f(t[s],e[s]))return!1}return!0}function Tm(t,e){if(e===void 0)return t;if(t===void 0)return e;if(e===null)return null;if(typeof e!="object"||Array.isArray(e))return e;if(typeof t!="object"||Array.isArray(t))return{...e};let r=!1,o={};for(let n in t)if(n in e){let s=Tm(t[n],e[n]);o[n]=s,s!==t[n]&&(r=!0)}else o[n]=t[n];for(let n in e)n in t||(o[n]=e[n],r=!0);return r?o:t}function Om(t,e,r){if(!e||typeof e!="object")return t;if(!t||typeof t!="object")return e;if(r||(r=new WeakSet),r.has(e))return t;r.add(e);for(let o in e){let n=e[o];n&&typeof n=="object"&&!Array.isArray(n)&&t[o]&&typeof t[o]=="object"&&!Array.isArray(t[o])?Om(t[o],n,r):t[o]=n}return t}function $r(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 $n(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function xa(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():$r(e)}function TS(t){return t.split(`
|
|
83
|
-
`).map(
|
|
84
|
-
`)}var
|
|
85
|
-
${c}`}var
|
|
86
|
-
`)}function
|
|
87
|
-
${a}`}var Rm=null;function wf(t){Rm=t}var Oe={structuralHash:bf,deepEqual:_f,mergeStructural:Tm,overwriteDeep:Om,shortHash:$r,toKebab:$n,sanitizeValue:xa,batchShortHash:TS,atomicCssClass:RS,batchAtomicCss:IS,compoundCssClass:DS},$S=!1,xf=null;function LS(t){return xf||(xf=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(Oe.structuralHash=e.structuralHash),e.deepEqual&&(Oe.deepEqual=e.deepEqual),e.mergeStructural&&(Oe.mergeStructural=e.mergeStructural),e.overwriteDeep&&(Oe.overwriteDeep=e.overwriteDeep),e.shortHash&&(Oe.shortHash=e.shortHash),e.toKebab&&(Oe.toKebab=e.toKebab),e.sanitizeValue&&(Oe.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(Oe.batchShortHash=e.batchShortHash),e.atomicCssClass&&(Oe.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(Oe.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(Oe.compoundCssClass=e.compoundCssClass),$S=!0,Rm&&e.batchAtomicCss&&Rm({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),xf)}function MS(){return $S}R();var wa={};P(wa,{CDN_PROVIDERS:()=>ce,DOMQL_EVENTS:()=>Qu,DOMQ_PROPERTIES:()=>dr,ENV:()=>gd,HTML_TAGS:()=>Ho,METHODS:()=>No,METHODS_EXL:()=>xs,NODE_ENV:()=>Se,OPTIONS:()=>Hs,PACKAGE_MANAGER_TO_CDN:()=>xr,PARSED_DOMQ_PROPERTIES:()=>_s,PROPS_METHODS:()=>pr,STATE_METHODS:()=>Gr,STATE_PROPERTIES:()=>Zu,SVG_TAGS:()=>fb,TYPES:()=>ds,UNIVERSAL_RESERVED_KEYS:()=>nl,addCaching:()=>Bc,addContext:()=>jc,addExtend:()=>Bd,addExtends:()=>zt,addItemAfterEveryElement:()=>ju,addProtoToArray:()=>gs,addRef:()=>Mc,applyCSS:()=>Im,applyDependentState:()=>sp,applyEvent:()=>qc,applyEventUpdate:()=>Kc,applyExtends:()=>pb,applyProps:()=>Fs,arrayContainsOtherArray:()=>Iu,arraysEqual:()=>Uu,arrayzeValue:()=>ro,buildImgSrcset:()=>wi,buildSourcesAndImg:()=>Si,cache:()=>fp,call:()=>Ap,captureSnapshot:()=>Op,checkForStateTypes:()=>ep,checkIfInherits:()=>Wc,checkIfStringIsInArray:()=>zu,clone:()=>ed,cloneAndMergeArrayExtend:()=>Os,cloneFunction:()=>vd,concatAddExtends:()=>Fd,copyJavaScriptToClipboard:()=>Yp,copyStringToClipboard:()=>Gp,createBasedOnType:()=>Lc,createElement:()=>tp,createElementExtends:()=>kc,createExtends:()=>Ps,createExtendsFromKeys:()=>zo,createExtendsStack:()=>Ac,createIfConditionFlag:()=>Cd,createInheritedState:()=>rp,createKey:()=>As,createNestedObject:()=>cd,createNestedObjectByKeyPath:()=>np,createObjectWithoutPrototype:()=>mc,createParent:()=>Fc,createPath:()=>Nc,createProps:()=>Ns,createPropsStack:()=>Dc,createRoot:()=>Qd,createScope:()=>ap,createSnapshotId:()=>Es,customDecodeURIComponent:()=>Ju,customEncodeURIComponent:()=>Xu,cutArrayAfterValue:()=>Fu,cutArrayBeforeValue:()=>Mu,debounce:()=>Ts,debounceOnContext:()=>wd,decodeNewlines:()=>Yu,deepClone:()=>ut,deepContains:()=>id,deepDefaults:()=>gi,deepDestringifyFunctions:()=>ie,deepExtend:()=>Sc,deepMerge:()=>nt,deepMergeExtends:()=>Fe,deepStringifyFunctions:()=>ws,defineSetter:()=>Cp,destringifyGlobalScope:()=>ks,detectHeightOnInit:()=>$p,detectInfiniteLoop:()=>dd,document:()=>et,encodeNewlines:()=>Gu,error:()=>to,excludeKeysFromObject:()=>hd,exec:()=>ct,extendCachedRegistry:()=>Nd,extendStackRegistry:()=>Is,extractArrayExtend:()=>$s,fetchLibraryData:()=>ll,fibonacciNumberByIndex:()=>Lp,filterArrays:()=>Vu,filterArraysFast:()=>Hu,finalizeExtends:()=>Tc,findClosestNumber:()=>cl,findClosestNumberInFactory:()=>Wp,findInheritedState:()=>zc,findKeyPosition:()=>qu,flattenExtend:()=>Wo,formatDate:()=>Dp,generateHash:()=>_c,generateHeadArrayTags:()=>al,generateKey:()=>Cs,generateMetaTags:()=>Hp,get:()=>Sp,getActiveRoute:()=>mm,getCDNDirUrl:()=>sl,getCDNUrl:()=>ve,getCapitalCaseKeys:()=>Hd,getCdnProviderFromConfig:()=>Go,getChildStateInKey:()=>Hc,getChildren:()=>ti,getContext:()=>ai,getCookie:()=>Rd,getDB:()=>di,getEmotionStylesheet:()=>Qp,getExtendsInElement:()=>Ud,getExtendsStack:()=>Rs,getExtendsStackRegistry:()=>wc,getFrequencyInArray:()=>Du,getHashedExtend:()=>Ds,getImportMapScript:()=>Ip,getInObjectByPath:()=>ud,getLocalStorage:()=>Id,getNev:()=>_d,getPageMetadata:()=>zp,getParentStateInKey:()=>Vc,getPath:()=>ei,getQuery:()=>pi,getRef:()=>vp,getRoot:()=>ni,getRootContext:()=>ii,getRootData:()=>si,getRootState:()=>oi,getRootStateInKey:()=>Uc,getSpreadChildren:()=>zd,global:()=>Ou,hasFunction:()=>Me,hasHandlerPlugin:()=>Bo,hasOwnProperty:()=>od,hashContent:()=>Jo,inheritChildExtends:()=>Cc,inheritChildPropsExtends:()=>vc,inheritParentProps:()=>js,inheritRecursiveChildExtends:()=>Ec,init:()=>ir,initProps:()=>Xd,is:()=>Vt,isArray:()=>O,isBoolean:()=>uc,isContextComponent:()=>Wd,isCyclic:()=>pd,isDOMNode:()=>Ut,isDate:()=>pc,isDefined:()=>mt,isDevelopment:()=>gr,isEmpty:()=>hc,isEmptyObject:()=>nd,isEqualDeep:()=>gc,isFunction:()=>A,isHtmlElement:()=>fs,isLocal:()=>bd,isLoudDevRuntime:()=>Ot,isMalformedDependency:()=>Yo,isMethod:()=>Tp,isMobile:()=>Td,isNode:()=>Ye,isNot:()=>Pu,isNotProduction:()=>Jr,isNull:()=>dc,isNumber:()=>Le,isObject:()=>S,isObjectLike:()=>z,isPhoto:()=>Mp,isProduction:()=>hr,isStaging:()=>yd,isState:()=>op,isString:()=>w,isStringFunction:()=>kd,isTest:()=>bc,isTesting:()=>md,isUndefined:()=>Et,isUniversallyReservedKey:()=>Rp,isUnresolvableDependency:()=>eo,isValidHtmlTag:()=>$d,isWrappedLibrary:()=>yi,joinArrays:()=>Lo,jointStacks:()=>jd,keys:()=>rl,lastLevel:()=>yf,lastPathname:()=>mf,loadCssFile:()=>Bp,loadJavascript:()=>Up,loadJavascriptFile:()=>Fp,loadJavascriptFileEmbedSync:()=>jp,loadJavascriptFileSync:()=>Np,loadRemoteCSS:()=>Vp,loadRemoteScript:()=>Xo,log:()=>Ep,logGroupIf:()=>Ad,logIf:()=>Ed,lookdown:()=>xp,lookdownAll:()=>wp,lookup:()=>_p,lowercaseFirstLetter:()=>Kr,makeObjectWithoutPrototype:()=>sd,map:()=>td,mapStringsWithContextComponents:()=>Ls,matchRoute:()=>pm,matchesComponentNaming:()=>Ne,memoize:()=>Sd,merge:()=>pt,mergeSharedLibraries:()=>bi,nextElement:()=>li,normalizeIgnoreList:()=>mi,normalizeLibraryKey:()=>Zo,objectToString:()=>Ss,objectizeStringProperty:()=>Ms,overwrite:()=>vs,overwriteDeep:()=>Ht,overwriteShallow:()=>Xr,overwriteState:()=>ip,parse:()=>ol,parseDeep:()=>Zs,parseQuery:()=>hm,parseRoutePattern:()=>dm,pickupElementFromProps:()=>Pc,pickupPropsFromElement:()=>Rc,previousElement:()=>fi,propExists:()=>Gd,propertizeElement:()=>Ic,propertizeUpdate:()=>Kd,reinit:()=>Pm,remove:()=>jb,removeChars:()=>Xp,removeCookie:()=>Pd,removeDuplicateProps:()=>Us,removeDuplicatesInArray:()=>Mo,removeFromArray:()=>$u,removeFromObject:()=>ad,removeNestedKeyByPath:()=>ld,removeValueFromArray:()=>hs,removeValueFromArrayAll:()=>Nu,reorderArrayByValues:()=>Bu,replaceLiteralsWithObjectFields:()=>qr,replaceOctalEscapeSequences:()=>Ku,resolveAsset:()=>Wt,resolveHandler:()=>Uo,resolveSharedLibraries:()=>Kp,returnValueAsText:()=>$c,router:()=>We,runGuards:()=>gm,runPluginHook:()=>Ct,scratchSystem:()=>pn,scratchUtils:()=>kr,self:()=>Ru,set:()=>po,setActiveRootState:()=>ri,setCookie:()=>Od,setHashedExtend:()=>xc,setInObjectByPath:()=>fd,setLocalStorage:()=>Dd,setNodeStyles:()=>el,setProps:()=>kp,setPropsPrototype:()=>Bs,sharedLibrary:()=>qp,spotByPath:()=>Qs,srcsetFor:()=>Qo,stringIncludesAny:()=>ys,stringToObject:()=>rd,stripVersionRangePrefix:()=>hi,swapItemsInArray:()=>Lu,syncProps:()=>Vs,toCamelCase:()=>_i,toDashCase:()=>xi,toDescriptionCase:()=>Zp,toTitleCase:()=>Jp,toggleFullscreen:()=>Pp,triggerEventOn:()=>mr,triggerEventOnUpdate:()=>cp,trimStringFromSymbols:()=>Wu,unstackArrayOfObjects:()=>ps,update:()=>Yd,updateProps:()=>Jd,variables:()=>ui,verbose:()=>Ko,warn:()=>ci,window:()=>v});R();R();var _1=E(),FS=(t=_1,e)=>{let r=S(e.localFile)?e.localFile:{},o=ut(r.designSystem||{});return nt(t,o)},x1={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},Ln=(t,e)=>{let r=!e||e===":root",o={};for(let n in t)if(n.startsWith("@media")){let s=r?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;o[n]={[s]:t[n]}}else r?o[n]=t[n]:o[`${e}${n}, ${n} ${e}`]=t[n];return o},ir=(t,e=x1)=>{let r=FS(t||{},e),o=e.scopeSelector||":root",n=e.globalTheme;if(typeof window<"u"&&window.location){let p=new URLSearchParams(window.location.search).get("globalTheme");p&&(n=p)}let s=po({verbose:e.verbose,useReset:e.useReset,useFontImport:e.useFontImport,useVariable:e.useVariable,useSvgSprite:e.useSvgSprite,useDocumentTheme:e.useDocumentTheme,useIconSprite:e.useIconSprite,useDefaultConfig:e.useDefaultConfig,globalTheme:n,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...r},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=o);let i=Ai(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=t.svg,d=s.useIconSprite,h=t.icons;l&&wt(i),c&&(wt({[o]:s.CSS_VARS}),s.CSS_MEDIA_VARS&&wt(Ln(s.CSS_MEDIA_VARS,o))),a&&wt(s.reset);let g=s.animation;if(g){let p={};for(let m in g)p[`@keyframes ${m}`]=g[m];wt(p)}return(u||f)&&ea(s.svg,{document:e.document}),(h||d)&&uo(s.icons,{document:e.document}),s},Sf={},Pm=(t,e=Sf)=>{let r=FS(t||{},e),o=e.scopeSelector||":root",n=po({verbose:!1,...r});return e.preventInject||(wt({[o]:n.CSS_VARS}),n.CSS_MEDIA_VARS&&wt(Ln(n.CSS_MEDIA_VARS,o)),wt(n.reset)),n},Im=(t,e=Sf)=>{wt(t)},w1=(t,e=Sf)=>{let r=e.scopeSelector||":root";wt({[r]:t.CSS_VARS}),t.CSS_MEDIA_VARS&&wt(Ln(t.CSS_MEDIA_VARS,r))};var S1=(t,e=Sf)=>{};R();var NS=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,k1=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},Dm={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},Sa=(t,e)=>{if(!e)return t;let r=Array.isArray(e)?e:e.split("."),o=t;for(let n of r){if(!o||!o[n])return null;o=o[n]}return o},jS=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=Dm:e.router=pt(e.router||{},Dm);let r=e.router,o=async(s,i)=>{let a=s.context?.window||v,c=k1(r);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=NS(f),c=f+u+d}let l=s;if(r.customRouterElement){let f=Sa(s,r.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await We(c,l,{},{initialRender:!0,pushState:!1})},n=!Et(t.onRenderRouter);return r&&r.initRouter&&!n&&(t.onRenderRouter=o),v1(e,r),r},$m=(t,e)=>{if(e.router===!1)return;let r=e.router||Dm;if(!r.popState)return;let o=e.utils&&e.utils.router?e.utils.router:We,n=e.window||v,s=async i=>{let{pathname:a,search:c,hash:l}=n.location;a=NS(a);let f=a+c+l,u=t;if(r.customRouterElement){let d=Sa(t,r.customRouterElement);d&&(u=d,t.routes&&(u.routes=t.routes))}await u.call("router",f,u,{},{pushState:!1,scrollToTop:!1,level:0,event:i})};n.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>n.removeEventListener("popstate",s))},v1=(t,e)=>{let{components:r}=t;if(e&&e.injectRouterInLinkComponent)return nt(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};R();var Lm=v&&v.location?v.location.host.includes("dev."):gr(),BS=Lm?"http://localhost:8080/get":"https://api.symbols.app/get",C1={endpoint:BS},US=async(t,e=C1)=>{let r=e.endpoint||BS,o=e.serviceRoute?O(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",n;try{return n=await globalThis.fetch(r+"/?"+o,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await n.json()}catch(s){if(A(e.onError))return e.onError(s);console.error(s)}},E1=async(t,e)=>{let{editor:r}=e;if(r&&r.remote){let o=await US(t,r),n=Lm||e.isDevelopment?ie(o):ie(o.releases[0]);r.serviceRoute?O(r.serviceRoute)?r.serviceRoute.forEach(s=>{Ht(e[s],n[s.toLowerCase()])}):Ht(e[r.serviceRoute],n):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{Ht(e[s],n[s.toLowerCase()])})}return e},A1=async(t,e,r)=>{let{editor:o}=e;if(o&&o.remote){let n=await US(t,o),s=Lm||e.isDevelopment?ie(n):ie(n.releases[0]);r(s)}},VS=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await E1(t,e)}catch(r){console.error(r)}},HS=(t,e,r,o)=>{if(e&&r.editor)try{r.editor.async&&A1(e,r,o||(n=>{let s=n.designSystem;S(s)&&r.utils.init(s),S(n.state)&&t.state.set(n.state)}))}catch(n){console.error(n)}};var ka=t=>{if(!t||t.__destroyed)return!1;let e=t.context;if(!e)return t.__destroyed=!0,!1;if(Array.isArray(e.__teardowns)){for(let r of e.__teardowns)try{r()}catch(o){console.error("[smbls] destroy teardown error:",o)}e.__teardowns.length=0}try{Dr(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 Nm={};P(Nm,{Helmet:()=>qS,applyMetadata:()=>Mn,default:()=>D1,extractMetadata:()=>R1,generateHeadHtml:()=>I1,helmetPlugin:()=>Fm,resolveMetadata:()=>Lr});R();var T1={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"}},O1=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}"]`},zS=t=>ie({v:t}).v,WS=(t,e,r,o)=>{try{return ct(t,e,r)}catch(n){console.warn(`[helmet] metadata factory for "${o}" threw; treating as unset:`,n&&n.message||n);return}},Lr=(t,e,r)=>{if(!t)return{};let o=t;w(o)&&Me(o)&&(o=zS(o));let n=A(o)?WS(o,e,r,"metadata"):S(o)?{...o}:{};if(!S(n))return{};for(let s in n){let i=n[s];w(i)&&Me(i)&&(i=zS(i)),A(i)?i=WS(i,e,r,s):w(i)&&Me(i)&&(i=void 0),w(i)&&i.includes("{{")&&e?.call&&(i=e.call("replaceLiteralsWithObjectFields",i,r)),n[s]=i}return n},R1=(t,e="/",r,o)=>{let s=(t.pages||{})[e],i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=Lr(t.app.metadata,r,o);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=Lr(c,r,o);for(let f in l)a.add(f);i={...i,...l},!i.title&&s.state?.title&&(i.title=s.state.title,a.add("title")),!i.description&&s.state?.description&&(i.description=s.state.description,a.add("description"))}if(i.title||(i.title=t.name||"Symbols"),i.title&&(a.has("title")||!i["og:title"])&&(a.has("og:title")||(i["og:title"]=i.title)),i.description&&(a.has("description")||!i["og:description"])&&(a.has("og:description")||(i["og:description"]=i.description)),i.title&&!i["twitter:title"]&&(i["twitter:title"]=i.title),i.description&&!i["twitter:description"]&&(i["twitter:description"]=i.description),i["og:url"]||i.url){let c=(i["og:url"]||i.url||"").replace(/\/$/,"");if(c&&e&&e!=="/"){let l=e.startsWith("/")?e:"/"+e;i["og:url"]=c+l}}if(t.files)for(let c in i){let l=i[c];if(typeof l=="string"&&l.length>0&&!l.startsWith("/")&&!l.startsWith("http")){let f=t.files[l];f?.src&&(i[c]=f.src)}}return i},P1=(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},va=t=>{let e=5381,r=String(t);for(let o=0;o<r.length;o++)e=(e*33^r.charCodeAt(o))>>>0;return e.toString(36)},Mm=(t,e,r,o)=>{let n=t.head||t.querySelector("head");if(!n)return;let s=new Map;for(let a of n.querySelectorAll(`[${e}]`))s.set(a.getAttribute(e),a);let i=new Set;for(let a of r)i.add(a);for(let[a,c]of s)i.has(a)||c.remove();for(let a of r){if(s.has(a))continue;let c=o(a);c&&(c.setAttribute(e,a),n.appendChild(c))}},Mn=(t,e)=>{if(!(!S(t)||!e)){for(let r in t){let o=t[r];if(o==null||r==="jsonLd"||r==="styles"||r==="scripts")continue;let n=T1[r];if(!n)continue;let s=O1(n),i=e.querySelector(s)||P1(n,e);i&&(r==="title"?i.textContent=o:n.valueAttr?i.setAttribute(n.valueAttr,o):i.setAttribute("content",o))}if(Array.isArray(t.jsonLd)){let o=t.jsonLd.filter(s=>s!=null).map(s=>w(s)?s:JSON.stringify(s)),n=o.map(va);Mm(e,"data-smbls-jsonld",n,s=>{let i=n.indexOf(s),a=e.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=o[i],a})}if(Array.isArray(t.styles)){let r=t.styles.filter(n=>n!=null&&String(n).trim()),o=r.map(va);Mm(e,"data-smbls-style",o,n=>{let s=o.indexOf(n),i=e.createElement("style");return i.textContent=String(r[s]),i})}if(Array.isArray(t.scripts)){let r=t.scripts.filter(n=>n&&(w(n)?n.trim():n.src)),o=r.map(n=>w(n)?n:String(n.src));Mm(e,"data-smbls-script",o,n=>{let s=o.indexOf(n),i=r[s],a=e.createElement("script");return w(i)?a.setAttribute("src",i):(i.src&&a.setAttribute("src",i.src),i.type&&a.setAttribute("type",i.type),i.async&&(a.async=!0),i.defer&&(a.defer=!0),i.integrity&&a.setAttribute("integrity",i.integrity),i.crossorigin&&a.setAttribute("crossorigin",i.crossorigin),i.referrerpolicy&&a.setAttribute("referrerpolicy",i.referrerpolicy),i.nomodule&&(a.noModule=!0),i.body&&(a.textContent=String(i.body))),a})}}},it=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,r=>e[r])},I1=t=>{let e=['<meta charset="UTF-8">'],r=new Set(["charset","jsonLd","styles","scripts"]),o=!1;for(let[n,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||r.has(n)||typeof s=="function")continue;if(n==="title"){e.push(`<title>${it(s)}</title>`);continue}if(n==="viewport"){o||(e.push(`<meta name="viewport" content="${it(s)}">`),o=!0);continue}if(n==="canonical"){e.push(`<link rel="canonical" href="${it(s)}">`);continue}if(n==="icon"||n==="favicon"){let f=it(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";e.push(`<link rel="icon" href="${f}"${u}>`);continue}if(n==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${it(h)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${it(f)}">`)});continue}if(n==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${it(h)}"`).join(" ");e.push(`<link rel="alternate" ${u}>`)}});continue}let i=["og:","article:","product:","fb:","profile:","book:","business:","music:","video:"],a=["twitter:","DC:","DCTERMS:"],c=i.some(f=>n.startsWith(f)),l=a.some(f=>n.startsWith(f));if(n.startsWith("http-equiv:")){let f=n.replace("http-equiv:","");e.push(`<meta http-equiv="${it(f)}" content="${it(s)}">`)}else if(n.startsWith("itemprop:")){let f=n.replace("itemprop:","");e.push(`<meta itemprop="${it(f)}" content="${it(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${it(n)}" content="${it(f)}">`)):e.push(`<meta property="${it(n)}" content="${it(s)}">`):l?e.push(`<meta name="${it(n)}" content="${it(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${it(n)}" content="${it(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${it(n)}" content="${it(s)}">`)}if(o||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let n of t.jsonLd){if(n==null)continue;let s=typeof n=="string"?n:JSON.stringify(n),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${va(s)}">${i}<\/script>`)}if(Array.isArray(t.styles))for(let n of t.styles){if(n==null||!String(n).trim())continue;let s=String(n).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${va(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let n of t.scripts){if(!n)continue;let s=typeof n=="string",i=s?n:n.src;if(!i&&!(n&&n.body))continue;let a=[];i&&a.push(`src="${it(i)}"`),s||(n.type&&a.push(`type="${it(n.type)}"`),n.async&&a.push("async"),n.defer&&a.push("defer"),n.integrity&&a.push(`integrity="${it(n.integrity)}"`),n.crossorigin&&a.push(`crossorigin="${it(n.crossorigin)}"`),n.referrerpolicy&&a.push(`referrerpolicy="${it(n.referrerpolicy)}"`),n.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${it(i||va(n.body||""))}"`;if(!s&&n.body){let l=String(n.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
|
|
88
|
-
`)},qS={define:{metadata:(t,e,r)=>{let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Q(()=>{let s=Lr(t,e,e.state);Mn(s,o);let i=e.state?.root;S(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(n)}}},Fm={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;if(!e)return;let r=Q(()=>{let o=t.metadata;if(!o)return;let n=Lr(o,t,t.state);Mn(n,e)});t.__ref?.__effects&&t.__ref.__effects.push(r)},update(t){let e=t.metadata;if(!e)return;let r=t.context?.document||typeof document<"u"&&document;if(!r)return;let o=Lr(e,t,t.state);Mn(o,r)}},D1=qS;br();var KS=(t,e,r,o)=>{t&&Js(t,e,r,o)},GS=(t,e,r)=>{if(!t)return;let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Lr(t,e,r);Mn(n,o)},YS=async(t,e)=>{if(!t)return;let r={tag:"fragment",...t},o=async()=>{await e.set(r,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(o):await o(),r},Fn={routes:t=>t,metadata:GS,fetch:KS,$router:YS},XS=(t={})=>{let e={routes:r=>r};return t.metadata!==!1&&(e.metadata=GS),t.fetch!==!1&&(e.fetch=KS),t.router!==!1&&(e.$router=YS),e};var jm={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},kf={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},vf={...jm,router:kf},$1={state:{},pages:{},components:{},router:kf,define:Fn},Mr=$1;R();R();var JS=(t,e)=>z(t.extends)?t.extends:[];R();var Bm={};P(Bm,{default:()=>F1,getActiveLang:()=>jn,getLanguages:()=>Ea,getLocalStateLang:()=>Pa,initPolyglot:()=>Ef,loadTranslations:()=>Ta,polyglotPlugin:()=>Bn,setLang:()=>Oa,translate:()=>Aa,upsertTranslation:()=>Ra});R();var QS="smbls_lang",L1="smbls_t_",M1="smbls_tv_",Nn={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)}}},Ca={};function jn(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||e?.defaultLang||"en"}function Ea(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var Cf=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let r=e.split("."),o=t;for(let n=0;n<r.length;n++){if(o==null)return;o=o[r[n]]}return o},ZS=(t,e,r)=>{let o=e.lastIndexOf(".");if(o===-1)return t[e+"_"+r];let n=Cf(t,e.substring(0,o));if(n!=null)return n[e.substring(o+1)+"_"+r]};function Aa(t,e){if(!t)return"";let r=this?.context,o=r?.polyglot,n=e||this.call("getActiveLang"),s=this?.state;if(s){let l=ZS(s,t,n);if(l!==void 0)return l}if(o?.translations){let l=o.translations[n];if(l){let f=Cf(l,t);if(f!==void 0)return f}}let a=(s?.root||r?.state?.root)?.translations;if(a){let l=a[n];if(l){let f=Cf(l,t);if(f!==void 0)return f}}let c=o?.defaultLang||"en";if(s){let l=ZS(s,t,c);if(l!==void 0)return l}if(o?.translations){let l=o.translations[c];if(l){let f=Cf(l,t);if(f!==void 0)return f}}return t}async function Ta(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!r||!o)return;let n=r.storagePrefix||L1,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):M1);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!o.translations?.[t]){let c=Nn.get(n+t);if(c)try{let l=JSON.parse(c),f={translations:{...o.translations||{}}};f.translations[t]=l,o.update&&o.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(r.storagePrefix||"smbls")+":"+t;if(Ca[i])return Ca[i];let a=this;return Ca[i]=(async()=>{try{let c=r.fetch,l=parseInt(Nn.get(s+t),10)||0,f,u,d;if(A(c)){let g=await c(t,l,a);if(!g||g.changed===!1)return;f=g.translations||g.data||g,u=g.version||0,d=!0}else if(S(c)){let g=a.getDB||(()=>e.fetch),p=A(g)?await g.call(a):e.fetch;if(!p)return;let m=c.rpc||c.from||"get_translations_if_changed",_={p_lang:t,p_cached_version:l,...c.params||{}},b=await p.rpc({from:m,params:_});if(b.error)throw r._fetchFailed||(r._fetchFailed={}),r._fetchFailed[t]=!0,b.error;let y=b.data;if(!y||!y.changed)return;f=y.translations||{},u=y.version||0,d=!0}else return;if(!d||!f)return;Nn.set(n+t,JSON.stringify(f)),u&&Nn.set(s+t,String(u));let h={translations:{...o.translations||{}}};h.translations[t]=f,o.update&&o.update(h)}catch(c){if(r.verbose!==!1){let l=c?.message||c?.details||(typeof c=="object"?JSON.stringify(c):String(c));console.warn("[polyglot] Failed to load translations for",t,"-",l)}}finally{delete Ca[i]}})(),Ca[i]}async function Oa(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!o||this.call("getActiveLang")===t)return;let n=r?.storageLangKey||QS;Nn.set(n,t),r?.fetch&&await this.call("loadTranslations",t),e?.state&&(e.state.lang=t);let s=r?.translations?.[t],i={lang:t};if(s&&typeof s=="object")for(let c in s){let l=s[c];(Array.isArray(l)||typeof l=="string"||typeof l=="number")&&(i[c]=l)}if(o.update&&o.update(i),s&&typeof s=="object")for(let c in s){let l=s[c];if(l&&typeof l=="object"&&!Array.isArray(l)&&o[c]&&typeof o[c]=="object"&&!Array.isArray(o[c]))for(let f in l)o[c][f]=l[f]}let a=this?.context?.document||globalThis.document;if(a&&s){let c=a.querySelectorAll("[data-key]");for(let l of c){let f=l.ref;if(!f)continue;let u=f.__ref?.__exec?.text;if(typeof u=="string"&&u.includes("{{"))try{let d=f.call("replaceLiteralsWithObjectFields",u,f.state);d!=null&&l.textContent!==d&&(l.textContent=d)}catch{}}}}async function Ra(t,e,r){let o=this?.context,n=o?.polyglot,s=this?.state?.root||o?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=r),n?.translations?.[e]&&(n.translations[e][t]=r),n?.fetch&&S(n.fetch)){let i=this.getDB||(()=>o.fetch),a=A(i)?await i.call(this):o.fetch;if(!a)return;let c=n.fetch.table||"translations",l=await a.upsert({from:c,data:{key:t,lang:e,text:r}});if(l?.error)throw l.error;return l.data}}async function Ef(){let t=this?.context,e=t?.polyglot;if(!e)return;let r=this?.state?.root||t?.state?.root;if(!r)return;let o=e.storageLangKey||QS,s=Nn.get(o)||e.defaultLang||r.lang||"en";r.update&&r.lang!==s&&r.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function Pa(t){try{let e=this?.context?.polyglot,o=(this?.state?.root||this?.context?.state?.root)?.lang||e?.defaultLang||"en",n=this?.state;if(!n)return"";let s=t.lastIndexOf(".");if(s===-1)return n[t+o]??"";let i=t.substring(0,s).split("."),a=n;for(let c=0;c<i.length;c++){if(a==null)return"";a=a[i[c]]}return a==null?"":a[t.substring(s+1)+o]??""}catch{return""}}var Bn={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,Ef.call(t))}},F1=Bn;br();var Vm={};P(Vm,{SYSTEM_METRICS:()=>Ia,capsizeHandler:()=>Um,capsizePlugin:()=>Tf,computeCapsize:()=>t0,default:()=>N1,resolveFontSizePx:()=>e0,resolveMetrics:()=>r0});var Ia={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}},Af=t=>parseFloat(t.toFixed(4)),t0=(t,e,r)=>{let{ascent:o,descent:n,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(n),l=o+c+s,f=r!==void 0?r:l/i*t,u=f/t,d=l/i,h=(o-a+s/2)/i-(u-d)/2,g=(c+s/2)/i-(u-d)/2;return{fontSize:`${Af(t/16)}rem`,lineHeight:`${Af(f)}px`,capHeightTrim:`${Af(-h)}em`,baselineTrim:`${Af(-g)}em`}},e0=(t,e)=>{if(typeof t=="number")return t;let r=e?.designSystem;if(!r)return null;let{typography:o}=r;if(o?.sequence){let s=String(t).toUpperCase(),i=o.sequence[s];if(i)return i.decimal||i.val}let n=parseFloat(t);return isNaN(n)?null:typeof t=="string"&&t.endsWith("rem")?n*(r.typography?.browserDefault||16):n},r0=(t,e)=>{let o=e?.designSystem?.font_family||{};if(t){let s=o[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(Ia[i])return Ia[i]}let n=o.default||Object.keys(o)[0];if(n){let s=o[n];if(s?.metrics)return s.metrics;if(s?.value&&Array.isArray(s.value))for(let i of s.value){let a=i.toLowerCase().replace(/['"]/g,"").trim();if(Ia[a])return Ia[a]}}return null},Um=(t,e,r,o)=>{if(!t)return;let n=e0(e.fontSize,o);if(!n)return;let s=r0(e.fontFamily,o);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=t0(n,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},Tf={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},N1=Tf;var Ym={};P(Ym,{PRESERVE_VALUE_KEYS:()=>It,SKIP_INLINE_KEYS:()=>Fr,abbrToProp:()=>Pt,decode:()=>a0,encode:()=>n0,expand:()=>bo,isComponentKey:()=>Re,isSelectorKey:()=>Pe,parse:()=>_o,parseFurther:()=>wo,propToAbbr:()=>_e,shorten:()=>Da,shorthandPlugin:()=>$a,stringify:()=>yo,stringifyFurther:()=>xo});var _e={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"},Pt=Object.create(null);for(let t in _e)Pt[_e[t]]=t;var Hm=Object.create(null);for(let t in _e){let e=_e[t];if(Hm[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${Hm[e]}"`);Hm[e]=t}var It=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),Fr=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function Re(t){return/^[A-Z]/.test(t)}function Pe(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function n0(t){if(!t||typeof t!="object")return"";let e=[];for(let r in t){let o=t[r];if(typeof o=="function"||o!==null&&typeof o=="object"&&!Array.isArray(o)||o===void 0)continue;let n=_e[r]||r;if(o===!0)e.push(n);else if(o===!1)e.push("!"+n);else if(Array.isArray(o)){let s=o.map(i=>Of(i));e.push(n+":"+s.join(","))}else e.push(n+":"+Of(o))}return e.join(" ")}function Of(t){return String(t).replace(/ /g,"_")}function Da(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Da(r):r});let e={};for(let r in t){let o=t[r];if(Re(r)){e[r]=zm(o);continue}if(Pe(r)){e[r]=zm(o);continue}let n=_e[r]||r;if(It.has(r)||It.has(n)){e[n]=o;continue}e[n]=zm(o)}return e}function zm(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Da(e):e}):typeof t=="object"?Da(t):t}function yo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?yo(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Re(o)){e[o]=o0(n);continue}if(Pe(o)){e[o]=o0(n);continue}let s=_e[o]||o;if(It.has(o)||It.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Fr.has(o)||Fr.has(s)){e[s]=n;continue}if(Array.isArray(n)){if(n.some(function(a){return a!==null&&typeof a=="object"})){e[s]=n.map(function(a){return a!==null&&typeof a=="object"?yo(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(Of).join(","));continue}if(typeof n=="object"){e[s]=yo(n);continue}n===!0?r.push(s):n===!1?r.push("!"+s):typeof n=="number"||typeof n=="string"&&(n.includes(",")||n.includes("_"))?e[s]=n:r.push(s+":"+Of(n))}return r.length&&(e.in=r.join(" ")),e}function o0(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?yo(e):e}):typeof t=="object"?yo(t):t}function a0(t){if(!t||typeof t!="string")return{};let e={},r=c0(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Pt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Pt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Pt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(s0);continue}e[a]=s0(i)}return e}function c0(t){return t.trim().split(/\s+/).filter(Boolean)}function s0(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function i0(t){return t.replace(/_/g," ")}function j1(t){if(!t||typeof t!="string")return{};let e={},r=c0(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Pt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Pt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Pt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(i0);continue}e[a]=i0(i)}return e}function bo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?bo(r):r});let e={};for(let r in t){let o=t[r];if(Re(r)){e[r]=Wm(o);continue}let n=Pt[r]||r;if(Pe(r)&&n===r){e[r]=Wm(o);continue}if(It.has(n)||It.has(r)){e[n]=o;continue}e[n]=Wm(o)}return e}function Wm(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?bo(e):e}):typeof t=="object"?bo(t):t}function _o(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?_o(r):r});let e={};if(typeof t.in=="string"){let r=j1(t.in);for(let o in r)e[o]=r[o]}for(let r in t){if(r==="in")continue;let o=t[r];if(Re(r)){e[r]=qm(o);continue}let n=Pt[r]||r;if(Pe(r)&&n===r){e[r]=qm(o);continue}if(It.has(n)||It.has(r)){e[n]=o;continue}e[n]=qm(o)}return e}function qm(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?_o(e):e}):typeof t=="object"?_o(t):t}function l0(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function B1(t){let e="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){let o=t[r+1];if(o===","||o==="_"||o==="\\"){e+=o,r+=2;continue}}t[r]==="_"?e+=" ":e+=t[r],r++}return e}function U1(t){let e=[],r="",o=0;for(;o<t.length;){if(t[o]==="\\"&&o+1<t.length){r+=t[o]+t[o+1],o+=2;continue}if(t[o]===","){e.push(r),r="",o++;continue}r+=t[o],o++}return e.push(r),e}function f0(t){if(t==null||typeof t!="object"||Array.isArray(t))return!1;let e=Object.keys(t);return e.length===1&&e[0]==="in"&&typeof t.in=="string"}function xo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?xo(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Re(o)){let i=u0(n);e[o]=f0(i)?i.in:i;continue}if(Pe(o)){let i=u0(n);e[o]=f0(i)?i.in:i;continue}let s=_e[o]||o;if(It.has(o)||It.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Fr.has(o)||Fr.has(s)){e[s]=n;continue}if(Array.isArray(n)){if(n.some(function(a){return a!==null&&typeof a=="object"})){e[s]=n.map(function(a){return a!==null&&typeof a=="object"?xo(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(l0).join(","));continue}if(typeof n=="object"){e[s]=xo(n);continue}if(n===!0){r.push(s);continue}if(n===!1){r.push("!"+s);continue}if(typeof n=="number"){r.push(s+":#"+n);continue}r.push(s+":"+l0(n))}return r.length&&(e.in=r.join(" ")),e}function u0(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?xo(e):e}):typeof t=="object"?xo(t):t}function d0(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):B1(t)}function Km(t){if(!t||typeof t!="string")return{};let e={},r=t.trim().split(/\s+/).filter(Boolean);for(let o of r){if(o.startsWith("!")){let l=o.slice(1),f=Pt[l]||l;e[f]=!1;continue}let n=o.indexOf(":");if(n===-1){let l=Pt[o]||o;e[l]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Pt[s]||s,c=U1(i);if(c.length>1){e[a]=c.map(d0);continue}e[a]=d0(i)}return e}function wo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?wo(r):r});let e={};if(typeof t.in=="string"){let r=Km(t.in);for(let o in r)e[o]=r[o]}for(let r in t){if(r==="in")continue;let o=t[r];if(Re(r)){typeof o=="string"?e[r]=Km(o):e[r]=Gm(o);continue}let n=Pt[r]||r;if(Pe(r)&&n===r){typeof o=="string"?e[r]=Km(o):e[r]=Gm(o);continue}if(It.has(n)||It.has(r)){e[n]=o;continue}e[n]=Gm(o)}return e}function Gm(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?wo(e):e}):typeof t=="object"?wo(t):t}var V1={shorten:bo,stringify:_o,stringifyFurther:wo};function H1(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(o=>e(o));let r={};for(let o in t){let n=t[o];r[o]=n&&typeof n=="object"?e(n):n}return r}var z1=["components","pages","snippets"],$a={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let o=V1[e===!0?"shorten":e];if(o){for(let n of z1)t[n]&&(t[n]=H1(t[n],o));t.app&&typeof t.app=="object"&&(t.app=o(t.app))}}};var ay={};P(ay,{LEVELS:()=>La,analyzePlugin:()=>Vn,attachBrowserListeners:()=>Nf,attachNetworkListeners:()=>Fa,classifyEvent:()=>ry,createAnalyzeState:()=>jf,createBeaconSink:()=>sy,createConsoleSink:()=>oy,createDedupe:()=>Qm,createEnrich:()=>Jm,createMemorySink:()=>ny,createPipeline:()=>Df,createRedact:()=>If,createRemoteSink:()=>Lf,createSample:()=>ty,createSummarize:()=>Zm,default:()=>Vn,emitFetchEvent:()=>x0,makeEvent:()=>Y,meetsLevel:()=>Rf,normalizeLevel:()=>Ma,resolveSinks:()=>Ff,summarizeElement:()=>So});var W1=0,q1=()=>`${Date.now().toString(36)}-${(W1++).toString(36)}`,Y=(t,e,r={})=>({id:q1(),ts:Date.now(),type:t,level:e,...r}),K1=t=>{let e=[],r=t,o=0;for(;r&&o<32;)r.key!=null&&e.unshift(String(r.key)),r=r.parent,o++;return e.join(" > ")},So=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:K1(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var Un=t=>t?.context?.analyze,G1={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"}},Y1=(t,{category:e,type:r,level:o})=>n=>{let s=Un(n);!s||!s.shouldCapture(e)||s.emit(Y(r,o,{hook:t,element:So(n)}))},p0=t=>(e,r)=>{let o=Un(e);!o||!o.shouldCapture("state")||o.emit(Y("state","debug",{hook:t,element:So(e),changedKeys:r?.changedKeys||null}))},Vn={name:"analyze",error(t,e){let r=Un(t);if(!r||r.config.enabled===!1||!r.shouldCapture("errors"))return;let o=e?.error||e?.err||(e instanceof Error?e:null);r.emit(Y("error","error",{hook:e?.hook||"error",element:So(t),error:o,message:o?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=Un(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(Y("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=Un(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=Un(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(Y("update","debug",{hook:"update",element:So(t),durationMs:r}))},beforeStateUpdate:p0("beforeStateUpdate"),stateUpdate:p0("stateUpdate")};for(let[t,e]of Object.entries(G1))Vn[t]=Y1(t,e);R();var La={error:0,warn:1,info:2,debug:3,trace:4};var Rf=(t,e)=>{let r=La[t],o=La[e];return r==null||o==null?!0:r<=o},Ma=t=>La[t]!=null?t:"warn";R();var Pf=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var X1=(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},J1=(t,e)=>{if(e!=="redact"){if(e==="hash"){let r=0,o=String(t);for(let n=0;n<o.length;n++)r=(r<<5)-r+o.charCodeAt(n)|0;return`#${(r>>>0).toString(36)}`}return"***"}},Xm=(t,e,r,o)=>{if(o>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>Xm(s,e,r,o+1));let n={};for(let s of Object.keys(t))if(X1(s,e)||Pf.test(s)){let a=J1(t[s],r);a!==void 0&&(n[s]=a)}else n[s]=Xm(t[s],e,r,o+1);return n},If=(t=[],e="mask")=>{let r=Array.isArray(t)?t:[t];return o=>{if(!o)return o;let{id:n,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...g}=o,p=Xm(g,r,e,0);return{id:n,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...p}}};var Jm=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,r=typeof navigator<"u"?navigator.userAgent:null,o=t.config.buildHash||null,n=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=v,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:n,build:o,route:i},meta:{ua:r,viewport:c}}}},Zm=()=>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},Qm=(t=1e3,e=500)=>{let r=new Map;return o=>{if(!o)return o;let n=`${o.type}:${o.level}:${o.message||""}:${o.error?.message||""}`,s=r.get(n),i=o.ts||Date.now();if(s&&i-s<t)return null;if(r.set(n,i),r.size>e){let a=Math.ceil(e/10),c=0;for(let l of r.keys()){if(c++>=a)break;r.delete(l)}}return o}},ty=t=>e=>{if(!e)return e;let r=t[e.type];return r==null||r>=1?e:Math.random()>r?null:e},h0={redact:t=>If(t.config.redact||[],t.config.maskStrategy),enrich:t=>Jm(t),summarize:()=>Zm(),dedupe:t=>Qm(t.config.cache?.dedupeWindowMs||1e3),sample:t=>ty(t.config.sample||{})},Z1=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let r=h0[t];return r?r(e):null}return null},Df=t=>{let e=t.config,r=Array.isArray(e.transformers)?e.transformers.slice():[],o=r.findIndex(s=>s==="redact");o>=0&&r.splice(o,1);let n=[];e.redact!==!1&&n.push(h0.redact(t));for(let s of r){let i=Z1(s,t);i&&n.push(i)}return s=>{let i=s;for(let a of n){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=n.slice(n.indexOf(a)+1),f=[];for(let u of c){let d=u,h=!1;for(let g of l)if(d=g(d),d==null){h=!0;break}!h&&d!=null&&f.push(d)}return f}i=c}return i}};R();R();var $f=typeof v<"u"&&typeof v.document<"u",Q1=5e3,tO=50,eO=3,rO=1500,oO=1e3,ry=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",nO=t=>{try{return JSON.stringify(t)}catch{return null}},sO=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},iO=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}},aO=()=>{if(!$f)return null;try{let t=v.document?.documentElement?.getAttribute("data-theme")||null,e=typeof v.matchMedia=="function"?v.matchMedia("(prefers-color-scheme: dark)").matches:null;return{active:t||(e?"dark":e===!1?"light":null),forced:t||null,prefers:e==null?null:e?"dark":"light"}}catch{return null}},cO=()=>{if(!$f)return null;let t=v.location,e=typeof navigator<"u"?navigator:null,r=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:v.document?.referrer||null,title:v.document?.title||null,ua:e?.userAgent||null,browser:iO(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:sO(),viewport:v.innerWidth?{w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}:null,screen:r?{w:r.width||null,h:r.height||null,availW:r.availWidth||null,availH:r.availHeight||null,colorDepth:r.colorDepth||null,orientation:r.orientation?.type||null}:null,theme:aO()}},Lf=(t={})=>{let e=t.url,r=typeof t.transport=="function"?t.transport:null,o=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!r)return()=>{};let n=t.apiKey||null,s=t.appKey||t.appId||null,i=t.tenantKey||t.tenant||null,a=t.release||null,c=t.env||null,l=t.sdk||null,f=typeof t.getAuth=="function"?t.getAuth:null,u=typeof t.getContext=="function"?t.getContext:null,d=typeof t.classify=="function"?t.classify:ry,h=typeof t.beforeSend=="function"?t.beforeSend:null,g=t.debug===!0,p=typeof t.getDebug=="function"?t.getDebug:null,m=t.batchMs!=null?t.batchMs:Q1,_=t.maxBatch||tO,b=t.maxRetries!=null?t.maxRetries:eO,y=t.backoffMs||rO,x=t.queueLimit||oO,k=t.sampleRate!=null?t.sampleRate:1,C=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,T=t.sessionId||C(),$=[],M=[],D=null,V=null,H=()=>{D||!$.length||(D=setTimeout(F,m))},G=J=>{if(V)return;let dt=y*Math.pow(2,Math.max(0,J-1));V=setTimeout(()=>{if(V=null,!M.length)return;let L=M.shift();I(L.envelope,L.attempt)},dt)},ft=(J,dt=!1)=>{let L=u?ey(u):null,W={id:T,sentAt:Date.now()};dt&&(W.endedAt=Date.now());let K={v:1,session:W,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:cO(),user:L?.user||null,traits:L?.traits||null,tags:L?.tags||null,events:J};if((p?ey(p)===!0:g)&&(K.app.debug=!0),h)try{return h(K)||null}catch{return K}return K},I=async(J,dt=1)=>{if(J)try{let L=!0;if(r){let W=await r(J);L=W!==!1&&W?.ok!==!1}else L=await lO(e,J,{apiKey:n,getAuth:f});!L&&dt<b&&(M.push({envelope:J,attempt:dt+1}),G(dt+1))}catch{dt<b&&(M.push({envelope:J,attempt:dt+1}),G(dt+1))}},F=(J=!1,dt=!1)=>{if(D&&(clearTimeout(D),D=null),!$.length&&!dt)return;let L=$;$=[];let W=ft(L,dt);if(W){if(J&&$f){if(typeof o=="function"&&ey(()=>o(W)))return;if(navigator.sendBeacon&&e){let K=nO(W);if(K)try{navigator.sendBeacon(e,new v.Blob([K],{type:"application/json"}));return}catch{}}}I(W)}},N=!1,St=()=>{N||(N=!0,F(!0,!0))};$f&&(v.addEventListener("pagehide",St,{passive:!0}),v.addEventListener("beforeunload",St,{passive:!0}),v.addEventListener("visibilitychange",()=>{v.document.visibilityState==="hidden"&&F(!0)},{passive:!0}));let Dt=J=>{if(!J||k<1&&Math.random()>k)return;N&&(N=!1);let dt={...J,log_type:d(J)};$.push(dt),$.length>x&&($=$.slice(-x)),$.length>=_?F():H()},xe=J=>(F(!1,!0),T=J||C(),N=!1,Dt.sessionId=T,T);return Dt.flush=()=>F(!1),Dt.endSession=St,Dt.startNewSession=xe,Dt.sessionId=T,Dt},ey=t=>{try{return t()}catch{return null}},lO=async(t,e,{apiKey:r,getAuth:o})=>{let n={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(r&&(n["X-Analyze-Key"]=r),o)try{let s=await o();s&&(n.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:n,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var fO={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},uO="\x1B[0m",Mf=typeof v<"u"&&typeof v.document<"u",oy=(t={})=>{let e=t.minLevel||null,r=console.error.bind(console),o=console.warn.bind(console),n=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?r:s.level==="warn"?o:n,a=`[analyze:${s.type}]`;if(Mf)i(a,s);else{let c=fO[s.level]||"";i(`${c}${a}${uO}`,s)}}},ny=(t,e={})=>{let r=e.max||t.config.cache?.max||500,o=new Array(r),n=0,s=0,i=a=>{o[n]=a,n=(n+1)%r,s<r&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(n-s+r)%r;for(let l=0;l<s;l++)a[l]=o[(c+l)%r];return a},query:(a={})=>{let c=t.__memory.snapshot(),l=a.sinceMs?Date.now()-a.sinceMs:0;return c.filter(f=>!(!f||a.level&&f.level!==a.level||a.type&&f.type!==a.type||l&&f.ts<l))},clear:()=>{n=0,s=0}},i},sy=(t={})=>{let e=t.url,r=t.batchMs!=null?t.batchMs:5e3,o=t.maxBatch||50;if(!e)return()=>{};let n=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!n.length)return;let c=JSON.stringify({events:n});n=[];let l=Mf?new v.Blob([c],{type:"application/json"}):c;if(Mf&&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(()=>{})};Mf&&(v.addEventListener("pagehide",i,{passive:!0}),v.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(n.push(c),n.length>=o?i():s||(s=setTimeout(i,r)))};return a.flush=i,a},g0={console:oy,memory:ny,beacon:sy,remote:Lf},m0=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},Ff=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],r=[];for(let o of e)if(typeof o=="function")r.push(o);else if(typeof o=="string"){let n=g0[o];if(!n)continue;r.push(o==="memory"?n(t,{}):n(o==="remote"?m0(t,{}):{}))}else if(o&&typeof o=="object"&&o.type){let n=g0[o.type];if(!n)continue;r.push(o.type==="memory"?n(t,o):n(o.type==="remote"?m0(t,o):o))}return r};R();var dO=typeof v<"u"&&typeof v.document<"u",pO=new Set(["password","hidden"]),y0=(t,e)=>{let r=0,o=null,n=null;return(...s)=>{let i=Date.now();i-r>=e?(r=i,t(...s)):(n=s,o||(o=setTimeout(()=>{r=Date.now(),o=null,n&&(t(...n),n=null)},e-(i-r))))}},iy="__analyzeKeyPath",Hn=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[iy])return e[iy];let r=[],o=e,n=0,s=null;for(;o&&n<64;){if(o.getAttribute){let a=o.getAttribute("data-key");a&&(s==null&&(s=a),r.unshift(a))}o=o.parentNode,n++}let i;if(r.length)i={selector:null,key:s,path:r.join(" > "),tag:e.tagName?.toLowerCase()||null};else{let a=(e.tagName||"unknown").toLowerCase(),c=e.id?`#${e.id}`:"",l=e.className&&typeof e.className=="string"?"."+e.className.trim().split(/\s+/).slice(0,2).join("."):"";i={selector:`${a}${c}${l}`,key:null,path:null}}try{e[iy]=i}catch{}return i},hO=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let r=0,o=String(t||"");for(let n=0;n<o.length;n++)r=(r<<5)-r+o.charCodeAt(n)|0;return`#${(r>>>0).toString(36)}`}return"***"}},gO=t=>!!(!t||t.tagName==="INPUT"&&pO.has(t.type)||Pf.test(t.name||"")||Pf.test(t.id||"")||t.dataset?.analyze==="skip"),Nf=t=>{if(!dO)return;let e=t.config.capture,r=t.config.throttle,o=t.__teardown,n=(s,i,a,c)=>{s.addEventListener(i,a,c),o.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(n(v,"error",s=>{t.emit(Y("error","error",{hook:"window.onerror",message:s.message||null,error:s.error||null,source:s.filename||null,line:s.lineno||null,col:s.colno||null}))}),n(v,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(Y("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){n(v,"click",i=>{t.emit(Y("pointer","info",{hook:"click",target:Hn(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:b0(i)}))},{passive:!0,capture:!0}),n(v,"dblclick",i=>{t.emit(Y("pointer","info",{hook:"dblclick",target:Hn(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),n(v,"contextmenu",i=>{t.emit(Y("pointer","info",{hook:"contextmenu",target:Hn(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=y0(i=>{t.emit(Y("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},r.pointermove);n(v,"pointermove",s,{passive:!0})}if(e.keyboard&&n(v,"keydown",s=>{t.emit(Y("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:b0(s),target:Hn(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=gO(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=hO(a.value,t.config.maskStrategy)),t.emit(Y("forms","info",{hook:i.type,target:Hn(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};n(v,"input",s,{passive:!0,capture:!0}),n(v,"change",s,{passive:!0,capture:!0}),n(v,"submit",i=>{t.emit(Y("forms","info",{hook:"submit",target:Hn(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=y0(()=>{t.emit(Y("scroll","trace",{hook:"scroll",x:v.scrollX,y:v.scrollY}))},r.scroll);n(v,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=Ts(()=>{t.emit(Y("viewport","info",{hook:"resize",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))},r.resize);n(v,"resize",s,{passive:!0}),n(v,"orientationchange",()=>{t.emit(Y("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),n(v.document,"visibilitychange",()=>{t.emit(Y("viewport","info",{hook:"visibilitychange",hidden:v.document.hidden}))},{passive:!0}),t.emit(Y("viewport","info",{hook:"initial",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(Y("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(_0)}))}catch{}return i.apply(console,a)},o.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(Y("performance","info",{hook:c.entryType,name:c.name,startTime:c.startTime,duration:c.duration,value:c.value!=null?c.value:null}))}),i=["largest-contentful-paint","layout-shift","longtask","paint","first-input","event"];for(let a of i)try{s.observe({type:a,buffered:!0})}catch{}o.push(()=>s.disconnect())}catch{}},b0=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),mO=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=_0(t.cause)),e},_0=t=>{if(t==null)return t;if(t instanceof Error)return mO(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};R();var yO=typeof v<"u"&&typeof v.document<"u",x0=(t,e)=>{let r=t?.analyze;if(!r||!r.shouldCapture("network"))return;let o=e.phase==="error"?"error":"info";r.emit(Y("network",o,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},Fa=t=>{if(yO&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof v.fetch=="function"){let e=v.fetch.bind(v),r=function(o,n){if(n?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(o,n);let s=typeof o=="string"?o:o&&o.url||"",i=(n?.method||typeof o=="object"&&o?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(Y("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(o,n).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(Y("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(Y("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};v.fetch=r,t.__teardown.push(()=>{v.fetch=e})}if(typeof v.XMLHttpRequest=="function"){let e=v.XMLHttpRequest,r=e.prototype.open,o=e.prototype.send;e.prototype.open=function(n,s){return this.__analyze={method:String(n).toUpperCase(),url:String(s)},r.apply(this,arguments)},e.prototype.send=function(n){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return o.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(Y("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(Y("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(Y("network","error",{hook:"xhr.error",source:"xhr",url:s.url,method:s.method,status:this.status,durationMs:l}))};return this.addEventListener("loadend",a),this.addEventListener("error",c),o.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=r,e.prototype.send=o})}}};var bO={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},_O={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},xO={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},wO={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},SO=t=>{let e={...bO,...t};return e.replay&&Object.assign(e,_O),e.telemetry&&Object.assign(e,xO),e.remote&&Object.assign(e,wO),Object.assign(e,t),e},kO=64,vO=()=>{if(typeof v>"u"||!v.location)return null;try{let e=new URLSearchParams(v.location.search).get("analyze");return e||null}catch{return null}},jf=(t={})=>{let e=t===!0?{}:{...t};e.capture=SO(e.capture||{});let r=vO();(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=Ma(e.level||"warn"),e.cache={max:500,dedupeWindowMs:1e3,...e.cache||{}},e.throttle={pointermove:80,mousemove:80,scroll:100,resize:200,...e.throttle||{}},e.maskFormValues==null&&(e.maskFormValues=!0),e.maskStrategy||(e.maskStrategy="mask"),Array.isArray(e.sinks)||(e.sinks=["console","memory"]),Array.isArray(e.transformers)||(e.transformers=["enrich","summarize"]);let o={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},n=()=>{o.__pipeline||(o.__pipeline=Df(o),o.__sinks=Ff(o))};return o.shouldCapture=s=>o.config.enabled===!1?!1:!!o.config.capture[s],o.emit=s=>{if(s&&o.config.enabled!==!1&&!o.__paused&&Rf(s.level,o.config.level)){if(!o.__ready){if(s.level!=="error"&&!o.config.captureDuringHydration)return;o.__preBuffer.length<kO&&o.__preBuffer.push(s);return}n(),w0(o,s)}},o.activate=s=>{if(o.context==null&&(o.context=s||null),o.__ready)return;o.__ready=!0;let i=o.__preBuffer;if(o.__preBuffer=[],i.length){n();for(let a of i)w0(o,a)}try{Nf(o)}catch(a){console.error("[analyze] browser attach error:",a)}try{Fa(o)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of o.__onActivate||[])try{a(o)}catch(c){console.error("[analyze] onActivate error:",c)}},o.pause=()=>{o.__paused=!0},o.resume=()=>{o.__paused=!1},o.setLevel=s=>{o.config.level=Ma(s)},o.setCapture=(s,i)=>{if(o.config.capture[s]=!!i,s==="network"&&i&&o.__ready)try{Fa(o)}catch(a){console.error("[analyze] network attach error:",a)}},o.query=s=>o.__memory?o.__memory.query(s):[],o.snapshot=()=>o.__memory?o.__memory.snapshot():[],o.emitNetwork=s=>{if(!o.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";o.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:"network",level:a,hook:`fetch.${i||"unknown"}`,...s})},o.flush=()=>{if(o.__sinks)for(let s of o.__sinks)typeof s.flush=="function"&&s.flush()},o.startNewSession=s=>{let i=s||(typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),a=Array.isArray(o.config.sinks)?o.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(o.__sinks)for(let c of o.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},o.replay=()=>({initialSnapshot:o.__initialSnapshot,events:o.snapshot()}),o.destroy=()=>{for(let s of o.__teardown)try{s()}catch{}o.__teardown=[],o.__ready=!1,o.__paused=!0},o.__onActivate=[],o.onActivate=s=>{o.__onActivate.push(s)},o},w0=(t,e)=>{let r=t.__pipeline(e);if(r==null)return;let o=Array.isArray(r)?r:[r];for(let n of o){if(typeof t.config.onEvent=="function")try{t.config.onEvent(n)}catch{}for(let s of t.__sinks)try{s(n)}catch(i){console.error("[analyze] sink error:",i)}}};var fy={};P(fy,{Inspect:()=>Bf,inspectPlugin:()=>ly});R();function S0(t){return w(t)?t:O(t)?t.find(e=>w(e)):""}function cy(t){if(!t)return;let e=t.__ref.__componentKey,r=t.extends&&S0(t.extends),o=t.parent&&t.parent.childExtends&&S0(t.parent.childExtends);return(e||r||o||"").split("_")[0].split(".")[0].split("+")[0]}function Uf(t){if(!t||!t.__ref)return;let{components:e,pages:r,editor:o}=t.context,n=cy(t);return o&&o.onInitInspect&&!o.onInitInspect(n,t,t.state)?Uf(t.parent):n&&(e[n]||r[n])?t:Uf(t.parent)}var CO=(t,e,r)=>{let o=r.window||window;o.onkeydown=n=>{n.altKey&&n.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},o.onkeyup=n=>{t.state.preventSelect&&(!n.altKey||!n.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},Bf={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:CO,onMousemove:(t,e,r)=>{let o=t.target.ref,n=Uf(o),s=e.Inspector.state;if(!n||!r.debugging||!n.__ref)return s.update({area:!1});let i=cy(n),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=n.node.getBoundingClientRect(),h={x:l,y:f,width:u,height:d};if(!s.area)return a(h);s.area.x!==h.x&&a(h)}else s.area&&s.update({area:!1})};window.requestAnimationFrame(()=>{c(),window.requestAnimationFrame(c)})},onMousedown:(t,e,r)=>{if(!r.debugging)return;let o=t.target.ref,n=Uf(o);if(!n)return;let s=cy(n);if(!s)return;let i=o.context.editor;if(i&&i.onInspect)return i.onInspect(s,o,o.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return o.context.socket?.emit&&o.context.socket.emit("route",a),t.preventDefault(),t.stopPropagation(),!1},Inspector:{state:{},transition:"all, defaultBezier, X",position:"fixed",hide:(t,e)=>!(e.area&&e.parent.debugging),style:{boxShadow:"0 0 10px #3686F733, 0 0 0 3px #3686F766, 0 0 100vmax 100vmax #000A",zIndex:"9999999",borderRadius:"10px",pointerEvents:"none"},Span:{position:"absolute",margin:"A2 0",fontSize:"Z",color:"text",zIndex:"99999999",transition:"all, defaultBezier, X",textDecoration:"underline",fontWeight:"500",top:"100%",style:{boxShadow:"0 25px 10px 35px black",textShadow:"0 0 10px black"},text:"{{ focusKey }}"},onInit:({context:t})=>{let{components:e}=t;if(S(e)){let{Content:r,...o}=e;for(let n in o)Dn[n]||(o[n].__ref||(o[n].__ref={}),o[n].__ref.__componentKey||(o[n].__ref.__componentKey=n))}},onBeforeUpdate:(t,e,r)=>{let{area:o}=r,n=r.area&&r.parent.debugging,s;if(!n)s="display: none !important";else if(o){let{x:i,y:a,width:c,height:l}=o;s=`
|
|
82
|
+
)`};var h1={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"}}}},g1={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},m1={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"}}},Sw={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...h1,...g1,...m1,none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var kw={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var vw={ratio:1.618,subSequence:!0};var Cw={SourceSans:[{url:""}]},Ew={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 Aw={symbols:'<svg height="24" width="24"><path d="M13.843 2.7C19.063 2.7 23 6.366 23 11.228c0 3.754-2.862 6.584-6.658 6.584-3.287 0-5.007-2.318-5.007-4.609 0-2.395 1.923-4.344 4.287-4.344.566 0 1.023.12 1.309.223a.212.212 0 01.137.229l-.016.058-.514 1.18a.223.223 0 01-.245.13 2.965 2.965 0 00-.506-.046c-1.245 0-2.258 1.027-2.258 2.288 0 1.33 1.165 2.373 2.651 2.373 2.195 0 3.913-1.777 3.913-4.046 0-3.024-2.294-5.135-5.58-5.135-4.076 0-7.393 3.36-7.393 7.491a7.519 7.519 0 002.871 5.924l-4.96 3.18A12.042 12.042 0 012 14.7c0-6.617 5.313-12 11.843-12z" fill-rule="evenodd"/></svg>',logo:'<svg height="24" width="24"><path d="M13.843 2.7C19.063 2.7 23 6.366 23 11.228c0 3.754-2.862 6.584-6.658 6.584-3.287 0-5.007-2.318-5.007-4.609 0-2.395 1.923-4.344 4.287-4.344.566 0 1.023.12 1.309.223a.212.212 0 01.137.229l-.016.058-.514 1.18a.223.223 0 01-.245.13 2.965 2.965 0 00-.506-.046c-1.245 0-2.258 1.027-2.258 2.288 0 1.33 1.165 2.373 2.651 2.373 2.195 0 3.913-1.777 3.913-4.046 0-3.024-2.294-5.135-5.58-5.135-4.076 0-7.393 3.36-7.393 7.491a7.519 7.519 0 002.871 5.924l-4.96 3.18A12.042 12.042 0 012 14.7c0-6.617 5.313-12 11.843-12z" fill-rule="evenodd"/></svg>',arrowDownCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-circle"><circle cx="12" cy="12" r="10"/><path d="M8 12l4 4 4-4M12 8v8"/></svg>',arrowDownLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-left"><path d="M17 7L7 17M17 17H7V7"/></svg>',arrowDownRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-right"><path d="M7 7l10 10M17 7v10H7"/></svg>',arrowDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down"><path d="M12 5v14M19 12l-7 7-7-7"/></svg>',arrowLeftCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left-circle"><circle cx="12" cy="12" r="10"/><path d="M12 8l-4 4 4 4M16 12H8"/></svg>',arrowLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>',arrowRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><path d="M5 12h14M12 5l7 7-7 7"/></svg>',arrowRightCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right-circle"><circle cx="12" cy="12" r="10"/><path d="M12 16l4-4-4-4M8 12h8"/></svg>',arrowUpCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-circle"><circle cx="12" cy="12" r="10"/><path d="M16 12l-4-4-4 4M12 16V8"/></svg>',arrowUpLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-left"><path d="M17 17L7 7M7 17V7h10"/></svg>',arrowUpRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-right"><path d="M7 17L17 7M7 7h10v10"/></svg>',arrowUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up"><path d="M12 19V5M5 12l7-7 7 7"/></svg>',checkCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><path d="M22 4L12 14.01l-3-3"/></svg>',check:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17l-5-5"/></svg>',chevronDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path d="M6 9l6 6 6-6"/></svg>',chevronLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><path d="M15 18l-6-6 6-6"/></svg>',chevronRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><path d="M9 18l6-6-6-6"/></svg>',chevronUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-up"><path d="M18 15l-6-6-6 6"/></svg>',copy:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>',eyeOff:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye-off"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24M1 1l22 22"/></svg>',eye:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',info:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-info"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>',lock:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg>',minus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minus"><path d="M5 12h14"/></svg>',sun:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>',moon:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg>',moreHorizontal:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-horizontal"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',moreVertical:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>',send:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-send"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg>',smile:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-smile"><circle cx="12" cy="12" r="10"/><path d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"/></svg>',search:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>',upload:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-upload"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"/></svg>',video:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video"><path d="M23 7l-7 5 7 5V7z"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>',x:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><path d="M18 6L6 18M6 6l12 12"/></svg>',star:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',plus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><path d="M12 5v14M5 12h14"/></svg>'};var Tw={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 Ow={base:150,ratio:1.333,unit:"ms",subSequence:!0};var Rw={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Ca={version:"0.0.1",color:xw,gradient:ww,theme:Sw,typography:kw,spacing:vw,font:Cw,fontFamily:Ew,timing:Ow,icons:Aw,media:Tw,sizes:Rw,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Bn={};P(Bn,{A:()=>KS,AssetPicture:()=>Gw,Audio:()=>Jw,Avatar:()=>c0,B:()=>mS,Block:()=>Pw,Box:()=>Cf,Br:()=>xS,Button:()=>XS,ButtonSet:()=>t0,COMPONENTS:()=>wo,Caption:()=>aS,Checkbox:()=>RS,CheckboxHgroup:()=>PS,Circle:()=>Ww,CircleButton:()=>ZS,Clickable:()=>Vw,Data:()=>bS,Dialog:()=>r0,DialogFooter:()=>n0,DialogHeader:()=>o0,Dropdown:()=>f0,DropdownList:()=>u0,DropdownParent:()=>d0,DropdownParentFocus:()=>p0,DropdownSiblingFocus:()=>h0,FileIcon:()=>HS,Flex:()=>Dw,Focusable:()=>Hw,FocusableComponent:()=>zw,Footnote:()=>gS,Form:()=>jw,Grid:()=>Lw,Gutter:()=>Fw,H1:()=>tS,H2:()=>eS,H3:()=>rS,H4:()=>oS,H5:()=>nS,H6:()=>sS,Headline:()=>pS,Hgroup:()=>CS,HgroupButton:()=>AS,HgroupRows:()=>ES,Hoverable:()=>Uw,Hr:()=>_S,I:()=>yS,Icon:()=>US,IconButton:()=>e0,IconText:()=>VS,Iframe:()=>Bw,Img:()=>Nw,Inline:()=>Iw,InlineFlex:()=>$w,InlineGrid:()=>Mw,Input:()=>TS,Italic:()=>uS,KangorooButton:()=>QS,Li:()=>wS,Link:()=>Ym,Notification:()=>g0,NumberInput:()=>OS,Ol:()=>kS,P:()=>iS,Picture:()=>Kw,Radio:()=>IS,RadioHgroup:()=>DS,Range:()=>l0,RouteLink:()=>GS,RouterLink:()=>Xm,SHAPES:()=>kf,Select:()=>YS,Shape:()=>Em,Span:()=>Qw,SquareButton:()=>JS,Strong:()=>cS,Subhead:()=>hS,Svg:()=>Yw,Text:()=>Zw,Textarea:()=>MS,TextareaWithButton:()=>FS,Theme:()=>qw,Title:()=>dS,Toggle:()=>$S,ToggleHgroup:()=>LS,Tooltip:()=>s0,TooltipHidden:()=>i0,TooltipParent:()=>a0,U:()=>lS,Ul:()=>SS,Underline:()=>fS,Video:()=>Xw,depth:()=>vf,focusableRingEnabled:()=>wf,getSystemGlobalTheme:()=>Ea});var wm={};P(wm,{Block:()=>Pw,Flex:()=>Dw,Grid:()=>Lw,Gutter:()=>Fw,Inline:()=>Iw,InlineFlex:()=>$w,InlineGrid:()=>Mw});var Pw={display:"block"},Iw={display:"inline"},Dw={display:"flex"},$w={display:"inline-flex"},Lw={display:"grid"},Mw={display:"inline-grid"},Fw={boxSize:"C1"};var Sm={};P(Sm,{Img:()=>Nw});R();var Nw={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=Kt(t);return e&&e.src||t.src},srcset:t=>{let e=Kt(t);return(e?Oi(e):"")||t.srcset}}};var km={};P(km,{Form:()=>jw});var jw={tag:"form"};var vm={};P(vm,{Iframe:()=>Bw});var Bw={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var Cm={};P(Cm,{Clickable:()=>Vw,Focusable:()=>Hw,FocusableComponent:()=>zw,Hoverable:()=>Uw,focusableRingEnabled:()=>wf});var y1={appearance:"none",cursor:"pointer",fontFamily:"inherit"},Uw={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}}},Vw={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function wf(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}var Hw={border:"none",outline:t=>wf(t)?"solid 0 blue.3":"none",":focus-visible":{opacity:1,outline:t=>wf(t)?"solid X blue.3":"none"},attr:{tabIndex:t=>t.tabIndex}},zw={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",style:y1};var Om={};P(Om,{Picture:()=>Kw});var Tm={};P(Tm,{Theme:()=>qw,getSystemGlobalTheme:()=>Ea});var Am={};P(Am,{Circle:()=>Ww,SHAPES:()=>kf,Shape:()=>Em,default:()=>b1,depth:()=>vf});R();var xe=C(),vf={4:{boxShadow:`rgba(0,0,0,.10) 0 2${xe.unit.default} 4${xe.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${xe.unit.default} 6${xe.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${xe.unit.default} 10${xe.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${xe.unit.default} 16${xe.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${xe.unit.default} 26${xe.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${xe.unit.default} 42${xe.unit.default}`}},jn=t=>et(t.shapeDirectionColor)||et(t.borderColor)||et(t.backgroundColor)||et(t.background),Sf=t=>{let e=ya.transition(t.transition,t);return e&&e.transition},kf={rectangle:{},circle:{borderRadius:"100%"},bubble:{},tv:{borderRadius:"1.15em/2.5em"},tooltip:t=>({position:t.position||"relative","&:before":{content:'""',display:"block",width:"0px",height:"0px",border:".35em solid",borderColor:jn(t),transition:Sf(t),transitionProperty:"border-color",position:"absolute",borderRadius:".15em"}}),tooltipDirection:{top:{"&:before":{top:"0",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},right:{"&:before":{top:"50%",right:"0",transform:"translate(50%, -50%) rotate(45deg)"}},bottom:{"&:before":{bottom:"0",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},left:{"&:before":{top:"50%",left:"0",transform:"translate(-50%, -50%) rotate(45deg)"}}},tag:t=>({position:"relative","&:before":{content:'""',display:"block",background:jn(t),transition:Sf(t),transitionProperty:"background",borderRadius:".25em",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%"}}),tagDirection:{top:{"&:before":{bottom:"100%",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},right:{"&:before":{top:"50%",left:"100%",transform:"translate(-50%, -50%) rotate(45deg)"}},bottom:{"&:before":{top:"100%",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},left:{"&:before":{top:"50%",right:"100%",transform:"translate(50%, -50%) rotate(45deg)"}}},hexagon:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",borderRadius:".25em",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%",background:jn(t),transition:Sf(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:Sf(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${jn(t)} 25%, transparent 25%), linear-gradient(315deg, ${jn(t)} 25%, transparent 25%)`},"&:after":{background:jn(t),borderRadius:".25em"}}),chevronDirection:{left:{"&:before":{height:"100%",left:"100%",transform:"translate3d(-1%, -50%, 1px) scale(-1, 1)"},"&:after":{height:"73%",left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}},right:{"&:before":{height:"100%",left:"0",transform:"translate3d(-99%, -50%, 1px)"},"&:after":{height:"73%",left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}}},Em={deps:{exec:ft,getSpacingBasedOnRatio:Ae,getMediaColor:It},classlist:{shape:t=>t.deps.exec(kf[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=kf[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}}},Ww={round:"100%"},b1=Em;R();var Ea=({context:t,state:e})=>{let r=e&&e.root,o=r&&r.globalTheme||t.designSystem&&t.designSystem.globalTheme;return o==="auto"?null:o},qw={deps:{depth:vf},classlist:{depth:t=>!Tt(t.depth)&&t.deps.depth[t.depth]}};var Kw={deps:{getSystemGlobalTheme:Ea},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:Ea},tag:"source",attr:{media:t=>{let{key:e,context:r,deps:o}=t,{media:n}=r.designSystem,s=o.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":n[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var Rm={};P(Rm,{AssetPicture:()=>Gw});R();var Gw={tag:"picture",children:t=>{let e=Kt(t);if(e)return Ri(e,t.alt)}};var Pm={};P(Pm,{Svg:()=>Yw});var Yw={tag:"svg",attr:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},html:t=>{let{context:e}=t;if(t.semanticIcons)return;if(t.html&&typeof t.html!="function")return t.call("exec",t.html,t);let{designSystem:r,utils:o}=e,n=r&&r.svg,s=t.spriteId||r&&r.useSvgSprite,i=t.call("exec",t.src,t),a=d=>`<use xlink:href="#${d}" />`;if(typeof i=="string"){let d=i.match(/^\s*<symbol\b[^>]*\bid="([^"]+)"/);if(d){let h=d[1],g=e.document||(typeof document<"u"?document:null);if(!(g&&typeof g.getElementById=="function"&&g.getElementById(h))){let m=o&&o.scratchSystem&&o.scratchSystem.appendSVGSprite;r&&!r.__svgCache&&(r.__svgCache={}),typeof m=="function"?m({[h]:i},{document:g}):o&&typeof o.init=="function"&&o.init({svg:{[h]:i}},{document:g,emotion:e.emotion})}return a(h)}}if(!s&&i)return i;let c=t.spriteId;if(c)return a(c);if(n&&n[i])return a(i);let l=Symbol.for(i),f=n[l];if(f&&n[f])return a(f);if(!i)return a("");if(typeof i=="string"&&!i.includes("<"))return typeof console<"u"&&console.warn&&console.warn(`[Svg] Unknown sprite symbol "${i}" \u2014 not registered in design-system sprite. Set the icon name to one that exists in designSystem.icons / context.svg, or register the SVG body via utils.init({ svg: { '${i}': '<svg>...</svg>' } }).`),a("");let u=0;for(let d=0;d<i.length;d++)u=(u<<5)-u+i.charCodeAt(d)|0;return f=n[l]=`svg-${(u>>>0).toString(36)}`,o.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var Im={};P(Im,{Video:()=>Xw});R();var Xw={tag:"video",controls:!0,attr:{src:t=>{let e=Kt(t);return e&&e.src||t.src}},children:t=>{let e=Kt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(r=>({tag:"source",attr:{src:r.src,type:r.format}}))},childExtends:{tag:"source"}};var Dm={};P(Dm,{Audio:()=>Jw});R();var Jw={tag:"audio",controls:!0,attr:{src:t=>{let e=Kt(t);return e&&e.src||t.src}},children:t=>{let e=Kt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(r=>({tag:"source",attr:{src:r.src,type:r.format}}))},childExtends:{tag:"source"}};var $m={};P($m,{B:()=>mS,Caption:()=>aS,Data:()=>bS,Footnote:()=>gS,H1:()=>tS,H2:()=>eS,H3:()=>rS,H4:()=>oS,H5:()=>nS,H6:()=>sS,Headline:()=>pS,I:()=>yS,Italic:()=>uS,P:()=>iS,Span:()=>Qw,Strong:()=>cS,Subhead:()=>hS,Text:()=>Zw,Title:()=>dS,U:()=>lS,Underline:()=>fS});var Zw={},Qw={tag:"span"},tS={tag:"h1"},eS={tag:"h2"},rS={tag:"h3"},oS={tag:"h4"},nS={tag:"h5"},sS={tag:"h6"},iS={tag:"p"},aS={tag:"caption"},cS={tag:"strong",fontWeight:"700"},lS={tag:"u"},fS={tag:"u"},uS={tag:"i"},dS={},pS={tag:"h6",fontSize:"B",fontWeight:500},hS={tag:"span",fontSize:"Z1"},gS={tag:"span",fontSize:"Z"},mS={tag:"b"},yS={tag:"i"},bS={tag:"data"};var Lm={};P(Lm,{Box:()=>Cf,Br:()=>xS,Hr:()=>_S,Li:()=>wS,Ol:()=>kS,Ul:()=>SS});var _1=t=>{if(!t.context)return;let{props:e,__ref:r}=t,o=se(e,t,{unpack:!1});r.__class=o},Cf={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:_1},_S={tag:"hr",margin:"C1 0"},xS={tag:"br"},wS={tag:"li"},SS={tag:"ul",childExtends:{extends:"Li"}},kS={tag:"ol",childExtends:{extends:"Li"}};var Mm={};P(Mm,{Hgroup:()=>CS,HgroupButton:()=>AS,HgroupRows:()=>ES});var vS=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},CS={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:vS,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:vS,margin:"0",color:"paragraph"}},ES={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},AS={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var Fm={};P(Fm,{Input:()=>TS});var TS={extends:["Focusable"],tag:"input",border:"none",type:"input",theme:"field",fontSize:"A",round:"C",lineHeight:"1",padding:"Z2 B",attr:{pattern:t=>t.pattern,minLength:t=>t.minlength,maxLength:t=>t.maxlength,name:t=>t.name,autocomplete:t=>t.autocomplete,placeholder:t=>t.placeholder,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e},checked:t=>t.call("exec",t.checked,t),disabled:t=>t.disabled||null,readonly:t=>t.readonly,required:t=>t.required,type:t=>t.type}};var Nm={};P(Nm,{NumberInput:()=>OS});var OS={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 jm={};P(jm,{Checkbox:()=>RS,CheckboxHgroup:()=>PS});var RS={extends:"Focusable",tag:"label",boxSize:"fit-content fit-content",cursor:"pointer",round:"Y",Input:{type:"checkbox",position:"absolute",opacity:"0",width:"1px",height:"1px",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",":checked + div":{theme:"primary"},":checked + div > svg":{transform:"none",opacity:"1"},":focus-visible + div":{outline:"solid X blue.3",outlineOffset:"Z"},attr:{checked:t=>t.call("exec",t.parent.checked)}},Flex:{align:"center center",fontSize:"B1",padding:"V",theme:"field",round:"X2",transition:"background A defaultBezier",Icon:{icon:"check",opacity:"0",transform:"scale(0.9) rotate(-15deg)",transition:"opacity B defaultBezier"}}},PS={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var Bm={};P(Bm,{Radio:()=>IS,RadioHgroup:()=>DS});var IS={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}},DS={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var Um={};P(Um,{Toggle:()=>$S,ToggleHgroup:()=>LS});var $S={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}},LS={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var Vm={};P(Vm,{Textarea:()=>MS,TextareaWithButton:()=>FS});var MS={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"}},FS={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 Hm={};P(Hm,{FileIcon:()=>HS,Icon:()=>US,IconText:()=>VS});var NS=new Set,jS=(t,e)=>{if(!NS.has(t)&&(NS.add(t),typeof console<"u"&&console.warn)){let r=e&&e.__ref&&e.__ref.path,o=r&&r.length?` at <${r.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${o} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},BS=new WeakMap,x1=t=>{let e=BS.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},BS.set(t,e)),e},w1=(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},S1=(t,e,r)=>{let o=r&&r.context&&r.context.document||(typeof document<"u"?document:null);it(t);try{let n=C();n&&!n.__svgCache&&(n.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=mo(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&o&&Object.keys(s).length&&yo(s,{document:o}),Object.keys(s).length>0}finally{tt()}},k1=(t,e,r,o,n)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=x1(s);if(a.failed.has(e))return!1;let c=a.waiting.get(e);if(c||(c=new Set,a.waiting.set(e,c)),c.add(n),a.pending.has(e))return!0;let l=Promise.resolve().then(()=>i(e,t)).then(f=>{let u=w1(f,r);return u?S1(s,u,o):!1}).catch(f=>(typeof console<"u"&&console.error&&console.error(`[Icon] iconsLoader failed for "${e}":`,f),!1)).then(f=>{a.pending.delete(e);let u=a.waiting.get(e);a.waiting.delete(e),f||a.failed.add(e),u&&u.forEach(d=>{try{d(f)}catch(h){console.error("[Icon] repaint error:",h)}})});return a.pending.set(e,l),!0},US={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,r)=>{let{parent:o}=t,{icons:n,useIconSprite:s,verbose:i}=r&&r.designSystem,{toCamelCase:a}=r&&r.utils,c=g=>{let p=g[".isActive"];if(p)return g.call("exec",p.name||p.icon)},l=(g,p,m)=>{let{semanticIcons:b}=m&&m.designSystem,{toCamelCase:_}=m&&m.utils,y=f(g,p),k=_(y).split(/([a-z])([A-Z])/g),E=k[1]?k[0]:y.split(".")[0].split(" ")[0],T=b&&b[E];if(T){let $=y.includes(".")?"sfsymbols."+y.split(".").slice(1).join("."):"sfsymbols";return y=T[$]||T[y.split(".")[0].split(" ")[0]],{tag:"span",semanticIcons:!0,width:"A",height:"A",lineHeight:"1em",":after":{fontSize:"Z",fontWeight:"300",content:`"${y}"`,textAlign:"center",display:"inline-block",style:{color:"currentColor",fontFamily:"'SF Pro Icons', 'SF Pro', 'SF Symbols', 'Segoe UI'"}}}}},f=(g,p)=>{let{key:m}=g,b=g.call("exec",g.name||g.icon||m,g);return g.call("isString",b)&&b.includes("{{")&&(b=g.call("replaceLiteralsWithObjectFields",b)),g.call("isString",b)?b:m},u=t.src,d,h=()=>{let g=f(t,e),p=g;if(g.includes(" ")){let I=g.split(" ");g=I[0]+I.slice(1).map(z=>z.charAt(0).toUpperCase()+z.slice(1)).join("")}let m=a(g),b=m.split(/([a-z])([A-Z])/g),_=l(t,e,r);if(_){Object.assign(t,_);return}let y;t.isActive&&(y=c(t));let x=o[".isActive"];o&&o.isActive&&x&&x.icon&&(y=t.call("exec",x.icon||x.Icon.name||x.Icon.icon,t)),t.call("isString",y)&&y.includes("{{")&&(y=t.call("replaceLiteralsWithObjectFields",y));let k;n[y]&&(k=y),n[m]?k=m:n[b[0]+b[1]]?k=b[0]+b[1]:n[b[0]]?k=b[0]:i&&t.warn("Can't find icon:",g,k);let E=n[k],T=o&&o.src||u;!E&&!T&&(k1(r,p,m,t,z=>{if(!(d&&d._disposed)){if(!z)return jS(p,t);h()}})||jS(p,t));let $=s&&k,D=E||T||n.noIcon;if(!(t.spriteId===$&&t.src===D&&t.node&&t.node.innerHTML)&&(t.spriteId=$,t.src=D,typeof t.html=="function"&&t.node)){let I=t.context&&t.context.designSystem;I&&it(I);try{let z=t.html(t,t.state,t.context);z!=null&&typeof z!="function"&&(t.node.innerHTML=z)}finally{I&&tt()}}};d=Z(h,{depth:t.__ref&&t.__ref.path&&t.__ref.path.length||0}),t.__ref&&(t.__ref.__effects||(t.__ref.__effects=[]),t.__ref.__effects.push(d))},attr:{viewBox:"0 0 24 24","aria-hidden":t=>t.ariaLabel||t.role==="img"?null:"true",focusable:"false"}},VS={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,r=typeof t.icon=="string"&&t.icon;return t.call("exec",r||e.icon||t.name||t.sfSymbols||e.sfSymbols,t)},icon:t=>t.call("exec",t.parent.icon,t.parent)},text:t=>t.text},HS={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var Jm={};P(Jm,{A:()=>KS,Link:()=>Ym,RouteLink:()=>GS,RouterLink:()=>Xm});var Aa={};P(Aa,{default:()=>T1,getActiveRoute:()=>Gm,lastLevel:()=>Af,lastPathname:()=>Ef,matchRoute:()=>Wm,parseQuery:()=>qm,parseRoutePattern:()=>zm,router:()=>qe,runGuards:()=>Km});R();var WS=/^:(.+)/,qS=/^\*$/,zS=new Map,zm=t=>{let e=zS.get(t);if(e)return e;let r=t.replace(/^\//,"").split("/"),o=[],n=!1;for(let i=0;i<r.length;i++){let a=r[i].match(WS);a?o.push({index:i,name:a[1]}):qS.test(r[i])&&(n=!0)}let s={segments:r,params:o,hasWildcard:n,pattern:t};return zS.set(t,s),s},Wm=(t,e,r=0)=>{let n=t.replace(/^\//,"").split("/").filter(Boolean).slice(r),s="/"+(n[0]||"");if(!e)return{key:null,content:null,params:{},routePath:s};let i=null,a=-1,c={};for(let l in e){if(l==="/*")continue;let f=zm(l),u=v1(n,f);u>a&&(a=u,i=l,c=C1(n,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},v1=(t,e)=>{let{segments:r,hasWildcard:o}=e;if(!o&&r.length!==t.length&&r.length!==1&&r.length>t.length)return-1;let n=0,s=Math.min(r.length,t.length);for(let i=0;i<s;i++)if(r[i]===t[i])n+=3;else if(WS.test(r[i]))n+=1;else if(qS.test(r[i]))n+=.5;else return-1;return n},C1=(t,e)=>{let r={};for(let{index:o,name:n}of e.params)t[o]&&(r[n]=decodeURIComponent(t[o]));return r},qm=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((o,n)=>{e[n]!==void 0?(Array.isArray(e[n])||(e[n]=[e[n]]),e[n].push(o)):e[n]=o}),e},Km=async(t,e)=>{if(!t||!t.length)return!0;for(let r of t){let o=await r(e);if(o===!1)return!1;if(typeof o=="string")return o}return!0},Gm=(t=0,e)=>{e||(e=typeof v<"u"?v.location.pathname:"/");let o=e.split("/")[t+1];if(o)return`/${o}`},Ef,Af=0,E1=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,A1={level:Af,pushState:!0,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof Q<"u"&&(Q.scrollingElement||Q.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0},qe=async(t,e,r={},o={})=>{let n=e||void 0,s=n?.context?.window||v,i=n?.context?.document||Q,a={...A1,...n.context.routerOptions,...o};Af=a.lastLevel;let c=n.__ref;(a.contentElementKey!=="content"&&a.contentElementKey!==c.contentElementKey||!c.contentElementKey)&&(c.contentElementKey=a.contentElementKey||"content");let l=c.contentElementKey||a.contentElementKey||"content",f=s.location.origin!=="null"?s.location.origin:"http://localhost";t=E1(t);let u=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,d=new u(f+t),{pathname:h,search:g,hash:p}=d,m=qm(g),b=n.node,_=p&&p!==s.location.hash.slice(1),y=h!==Ef;Ef=h;let x=c.__routerRendered,k,E,T,$;if(a.useParamsMatching){let V=Wm(h,n.routes,a.level);k=V.key,E=V.routePath,T=V.content,$=V.params}else{k=Gm(a.level,h),E=k;let V=n.routes;T=V?V[k||"/"]||V["/*"]:null,$={}}let D=a.scrollToNode?b:a.scrollNode;if(n.state?.root?.debugging){n.state.root.debugging=!1;return}if(!T){a.onNotFound?a.onNotFound({pathname:h,route:k,element:n}):a.silent||console.warn("[smbls/router] no content matched for path",h,"\u2014 available routes:",Object.keys(n.routes||{}));return}if(a.guards&&a.guards.length){let V={pathname:h,route:k,params:$,query:m,hash:p,element:n,state:r},rt=await Km(a.guards,V);if(rt===!1)return;if(typeof rt=="string")return qe(rt,e,r,{...o,guards:[]})}if(a.pushState)try{s.history.pushState(r,null,h+(g||"")+(p||""))}catch{}if(y||!_){let V={route:k,routePath:E,hash:p,debugging:!1};Object.keys($).length&&(V.params=$),Object.keys(m).length&&(V.query=m),a.updateState&&n.state.update(V,{preventContentUpdate:!0})}let I=!x||x.content!==T||x.route!==k;if(y||I||a.force===!0){l&&a.removeOldElement&&n[l].remove();let V=n.__ref?.origin?.content,rt={};if(V)for(let G in V){let K=V[G];G==="__ref"||G==="props"||G==="node"||G==="parent"||G==="key"||(typeof K=="string"||typeof K=="number"||typeof K=="boolean"||typeof K=="object"&&K!==null&&!K.node&&!K.__ref)&&(rt[G]=K)}let at={...rt,...typeof T=="object"?T:{extends:T}};a.useFragment&&(at.tag="fragment");try{if(typeof n?.set!="function")return;n.set(at,{contentElementKey:l}),c.__routerRendered={content:T,route:k}}catch(G){console.error("[smbls/router] failed to render route content",h,G)}}if(a.scrollToTop&&D?.scrollTo&&D.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&T[l]?.node?.scrollTo&&T[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),p){let V=i.getElementById(p);if(V&&D?.scrollTo){let rt=V.getBoundingClientRect().top+b.scrollTop-(a.scrollToOffset||0);D.scrollTo({...a.scrollToOptions||{},top:rt,left:0})}}xr("routeChanged",n,a)},T1=qe;var O1=(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let b of p){if(!m||!m[b]){m=null;break}m=m[b]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||qe)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}},Ym={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>$r(t,t.href)||$r(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:O1},KS={extends:"Link"},Xm={onClick:(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let b of p){if(!m||!m[b]){m=null;break}m=m[b]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||qe)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}}},GS={extends:[Ym,Xm]};var Zm={};P(Zm,{Select:()=>YS});var YS={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 Qm={};P(Qm,{Button:()=>XS,ButtonSet:()=>t0,CircleButton:()=>ZS,IconButton:()=>e0,KangorooButton:()=>QS,SquareButton:()=>JS});var XS={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)},JS={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"},ZS={extends:"SquareButton",round:"C"},QS={extends:"Button",childExtends:"IconText"},t0={tag:"nav",display:"flex",childExtends:"SquareButton"},e0={extends:["SquareButton","ClickableItem"],round:"Z"};var ty={};P(ty,{Dialog:()=>r0,DialogFooter:()=>n0,DialogHeader:()=>o0});var r0={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},o0={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},n0={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 ey={};P(ey,{Tooltip:()=>s0,TooltipHidden:()=>i0,TooltipParent:()=>a0});R();var s0={display:"flex",theme:"dialog",background:"black",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>bt(t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},i0={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)}},a0={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,o=e||r;if(!o)return;let n=o&&o[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":n||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var ry={};P(ry,{Avatar:()=>c0});var R1=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)},c0={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=R1(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 oy={};P(oy,{Range:()=>l0});var l0={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:cn("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:cn("#fff",.35)}},":focus":{"::-webkit-slider-thumb":{borderColor:"#3C6AC0"}}},"@light":{background:"gray9","::-webkit-slider-thumb":{background:"white",borderColor:"gray9"},":hover":{"::-webkit-slider-thumb":{borderColor:"gray7"}},":focus":{"::-webkit-slider-thumb":{borderColor:"blue"}}},deps:{returnPropertyValue:(t,e,r)=>{let o=t.call("exec",t[e],t);return(t.call("isFunction",o)?o(t,t.state):o!==void 0?o:r!==void 0?r:0)+""}},attr:{type:"range",value:(t,e)=>t.call("exec",e.value||t.value||t.defaultValue,t),min:(t,e)=>t.deps.returnPropertyValue(t,"min",0),max:(t,e)=>t.deps.returnPropertyValue(t,"max",100),step:(t,e)=>t.deps.returnPropertyValue(t,"step",1)}};var ny={};P(ny,{Dropdown:()=>f0,DropdownList:()=>u0,DropdownParent:()=>d0,DropdownParentFocus:()=>p0,DropdownSiblingFocus:()=>h0});var f0={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"},u0={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"}}},d0={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},p0={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()}}},h0={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 sy={};P(sy,{Notification:()=>g0});var g0={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 wo=Object.assign({},wm,Sm,km,vm,Cm,Om,Rm,Pm,Am,Im,Dm,Tm,$m,Lm,Mm,Fm,Nm,jm,Bm,Um,Vm,Hm,Jm,Zm,Qm,ty,ey,ry,oy,ny,sy);function Tf(t){if(t==null)return 0;if(typeof t!="object")return m0(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let o=0;o<t.length;o++)e=(e^Tf(t[o]))*16777619;return e>>>0}let r=Object.keys(t).sort();for(let o=0;o<r.length;o++)e=(e^m0(r[o]))*16777619,e=(e^Tf(t[r[o]]))*16777619;return e>>>0}function m0(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e}function Of(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!=typeof e||typeof t!="object")return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!Of(t[n],e[n]))return!1;return!0}let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let n=0;n<r.length;n++){let s=r[n];if(!Object.prototype.hasOwnProperty.call(e,s)||!Of(t[s],e[s]))return!1}return!0}function iy(t,e){if(e===void 0)return t;if(t===void 0)return e;if(e===null)return null;if(typeof e!="object"||Array.isArray(e))return e;if(typeof t!="object"||Array.isArray(t))return{...e};let r=!1,o={};for(let n in t)if(n in e){let s=iy(t[n],e[n]);o[n]=s,s!==t[n]&&(r=!0)}else o[n]=t[n];for(let n in e)n in t||(o[n]=e[n],r=!0);return r?o:t}function ay(t,e,r){if(!e||typeof e!="object")return t;if(!t||typeof t!="object")return e;if(r||(r=new WeakSet),r.has(e))return t;r.add(e);for(let o in e){let n=e[o];n&&typeof n=="object"&&!Array.isArray(n)&&t[o]&&typeof t[o]=="object"&&!Array.isArray(t[o])?ay(t[o],n,r):t[o]=n}return t}function jr(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 Un(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Ta(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():jr(e)}function y0(t){return t.split(`
|
|
83
|
+
`).map(jr).join(`
|
|
84
|
+
`)}var b0={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 _0(t,e){let r=b0[t]||jr(t),o=Ta(e),n=`_${r}-${o}`,s=Un(t),i=$1[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${n}{${a}}`;return`${n}
|
|
85
|
+
${c}`}var $1={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"},L1="@media (hover: hover)",M1=/(?:^|[^\\]):hover(?![\w-])/,x0=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function w0(t){let e=t.split("\0"),r=[],o=[];for(let n=0;n+1<e.length;n+=2){let s=e[n],i=e[n+1];if(!i||x0(i))continue;let a=b0[s]||jr(s),c=Ta(i),l=`_${a}-${c}`,f=Un(s);r.push(l),o.push(`.${l}{${f}:${i}}`)}return r.join(" ")+"\0"+o.join(`
|
|
86
|
+
`)}function S0(t,e,r){let o=t+e,n=`_c${jr(o)}`,s=e.split("\0"),i="";for(let l=0;l+1<s.length;l+=2){let f=s[l],u=s[l+1];u&&(x0(u)||(i+=`${Un(f)}:${u};`))}let a,c;if(t.startsWith("@media"))c=`.${n}`,a=`${t}{${c}{${i}}}`;else if(t.startsWith(":")||t.startsWith("&")){let l=t.startsWith("&")?t.slice(1):t;c=`.${n}${l}`,a=`${c}{${i}}`}else t.includes("&")?(c=t.replace("&",`.${n}`),a=`${c}{${i}}`):(c=`.${n} ${t}`,a=`${c}{${i}}`);return r!==!1&&M1.test(c)&&(a=`${L1}{${a}}`),`${n}
|
|
87
|
+
${a}`}var cy=null;function Pf(t){cy=t}var Re={structuralHash:Tf,deepEqual:Of,mergeStructural:iy,overwriteDeep:ay,shortHash:jr,toKebab:Un,sanitizeValue:Ta,batchShortHash:y0,atomicCssClass:_0,batchAtomicCss:w0,compoundCssClass:S0},k0=!1,Rf=null;function v0(t){return Rf||(Rf=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(Re.structuralHash=e.structuralHash),e.deepEqual&&(Re.deepEqual=e.deepEqual),e.mergeStructural&&(Re.mergeStructural=e.mergeStructural),e.overwriteDeep&&(Re.overwriteDeep=e.overwriteDeep),e.shortHash&&(Re.shortHash=e.shortHash),e.toKebab&&(Re.toKebab=e.toKebab),e.sanitizeValue&&(Re.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(Re.batchShortHash=e.batchShortHash),e.atomicCssClass&&(Re.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(Re.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(Re.compoundCssClass=e.compoundCssClass),k0=!0,cy&&e.batchAtomicCss&&cy({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),Rf)}function C0(){return k0}R();var Oa={};P(Oa,{CDN_PROVIDERS:()=>fe,DOMQL_EVENTS:()=>Pd,DOMQ_PROPERTIES:()=>mr,ENV:()=>Kd,HTML_TAGS:()=>Ko,METHODS:()=>Vo,METHODS_EXL:()=>As,NODE_ENV:()=>ke,OPTIONS:()=>Xs,PACKAGE_MANAGER_TO_CDN:()=>vr,PARSED_DOMQ_PROPERTIES:()=>Es,PROPS_METHODS:()=>yr,STATE_METHODS:()=>Qr,STATE_PROPERTIES:()=>Rd,SVG_TAGS:()=>Kb,TYPES:()=>_s,UNIVERSAL_RESERVED_KEYS:()=>ul,addCaching:()=>Kc,addContext:()=>qc,addExtend:()=>bp,addExtends:()=>qt,addItemAfterEveryElement:()=>yd,addProtoToArray:()=>Ss,addRef:()=>Hc,applyCSS:()=>fy,applyDependentState:()=>Fp,applyEvent:()=>Qc,applyEventUpdate:()=>tl,applyExtends:()=>Xb,applyProps:()=>zs,arrayContainsOtherArray:()=>fd,arraysEqual:()=>_d,arrayzeValue:()=>ao,buildImgSrcset:()=>Oi,buildSourcesAndImg:()=>Ri,cache:()=>Vp,call:()=>sh,captureSnapshot:()=>ah,checkForStateTypes:()=>Dp,checkIfInherits:()=>Zc,checkIfStringIsInArray:()=>Sd,clone:()=>Dd,cloneAndMergeArrayExtend:()=>Ms,cloneFunction:()=>rp,concatAddExtends:()=>gp,copyJavaScriptToClipboard:()=>Ah,copyStringToClipboard:()=>Eh,createBasedOnType:()=>Vc,createElement:()=>Ip,createElementExtends:()=>Rc,createExtends:()=>Ns,createExtendsFromKeys:()=>Go,createExtendsStack:()=>$c,createIfConditionFlag:()=>op,createInheritedState:()=>$p,createKey:()=>$s,createNestedObject:()=>Bd,createNestedObjectByKeyPath:()=>Mp,createObjectWithoutPrototype:()=>kc,createParent:()=>zc,createPath:()=>Wc,createProps:()=>Ws,createPropsStack:()=>Bc,createRoot:()=>Pp,createScope:()=>jp,createSnapshotId:()=>Ds,customDecodeURIComponent:()=>Od,customEncodeURIComponent:()=>Td,cutArrayAfterValue:()=>gd,cutArrayBeforeValue:()=>hd,debounce:()=>Ls,debounceOnContext:()=>Qd,decodeNewlines:()=>Ad,deepClone:()=>dt,deepContains:()=>Nd,deepDefaults:()=>ki,deepDestringifyFunctions:()=>ce,deepExtend:()=>Oc,deepMerge:()=>st,deepMergeExtends:()=>Ne,deepStringifyFunctions:()=>Ts,defineSetter:()=>oh,destringifyGlobalScope:()=>Rs,detectHeightOnInit:()=>dh,detectInfiniteLoop:()=>zd,document:()=>Q,encodeNewlines:()=>Ed,error:()=>so,excludeKeysFromObject:()=>qd,exec:()=>ft,extendCachedRegistry:()=>mp,extendStackRegistry:()=>js,extractArrayExtend:()=>Us,fetchLibraryData:()=>ml,fibonacciNumberByIndex:()=>ph,filterArrays:()=>xd,filterArraysFast:()=>wd,finalizeExtends:()=>Lc,findClosestNumber:()=>gl,findClosestNumberInFactory:()=>kh,findInheritedState:()=>Jc,findKeyPosition:()=>vd,flattenExtend:()=>Yo,formatDate:()=>uh,generateHash:()=>Ec,generateHeadArrayTags:()=>hl,generateKey:()=>Is,generateMetaTags:()=>wh,get:()=>th,getActiveRoute:()=>Gm,getCDNDirUrl:()=>dl,getCDNUrl:()=>Ce,getCapitalCaseKeys:()=>wp,getCdnProviderFromConfig:()=>tn,getChildStateInKey:()=>Xc,getChildren:()=>ai,getContext:()=>hi,getCookie:()=>cp,getDB:()=>_i,getEmotionStylesheet:()=>Ph,getExtendsInElement:()=>_p,getExtendsStack:()=>Fs,getExtendsStackRegistry:()=>Tc,getFrequencyInArray:()=>ud,getHashedExtend:()=>Bs,getImportMapScript:()=>fh,getInObjectByPath:()=>Hd,getLocalStorage:()=>fp,getNev:()=>Jd,getPageMetadata:()=>Sh,getParentStateInKey:()=>Yc,getPath:()=>ci,getQuery:()=>xi,getRef:()=>rh,getRoot:()=>ui,getRootContext:()=>pi,getRootData:()=>di,getRootState:()=>fi,getRootStateInKey:()=>Gc,getSpreadChildren:()=>Sp,global:()=>ad,hasFunction:()=>Fe,hasHandlerPlugin:()=>zo,hasOwnProperty:()=>Ld,hashContent:()=>on,inheritChildExtends:()=>Ic,inheritChildPropsExtends:()=>Pc,inheritParentProps:()=>qs,inheritRecursiveChildExtends:()=>Dc,init:()=>cr,initProps:()=>Tp,is:()=>zt,isArray:()=>O,isBoolean:()=>bc,isContextComponent:()=>kp,isCyclic:()=>Wd,isDOMNode:()=>Ht,isDate:()=>xc,isDefined:()=>bt,isDevelopment:()=>_r,isEmpty:()=>wc,isEmptyObject:()=>Md,isEqualDeep:()=>Sc,isFunction:()=>A,isHtmlElement:()=>ys,isLocal:()=>Xd,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>en,isMethod:()=>ih,isMobile:()=>ip,isNode:()=>Je,isNot:()=>ld,isNotProduction:()=>ro,isNull:()=>_c,isNumber:()=>Me,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>hh,isProduction:()=>br,isStaging:()=>Yd,isState:()=>Lp,isString:()=>w,isStringFunction:()=>ep,isTest:()=>Cc,isTesting:()=>Gd,isUndefined:()=>Tt,isUniversallyReservedKey:()=>ch,isUnresolvableDependency:()=>io,isValidHtmlTag:()=>dp,isWrappedLibrary:()=>Ci,joinArrays:()=>jo,jointStacks:()=>yp,keys:()=>ll,lastLevel:()=>Af,lastPathname:()=>Ef,loadCssFile:()=>bh,loadJavascript:()=>_h,loadJavascriptFile:()=>gh,loadJavascriptFileEmbedSync:()=>yh,loadJavascriptFileSync:()=>mh,loadRemoteCSS:()=>xh,loadRemoteScript:()=>rn,log:()=>nh,logGroupIf:()=>sp,logIf:()=>np,lookdown:()=>Zp,lookdownAll:()=>Qp,lookup:()=>Jp,lowercaseFirstLetter:()=>Zr,makeObjectWithoutPrototype:()=>Fd,map:()=>Id,mapStringsWithContextComponents:()=>Vs,matchRoute:()=>Wm,matchesComponentNaming:()=>je,memoize:()=>tp,merge:()=>gt,mergeSharedLibraries:()=>Ei,nextElement:()=>mi,normalizeIgnoreList:()=>vi,normalizeLibraryKey:()=>nn,objectToString:()=>Os,objectizeStringProperty:()=>Hs,overwrite:()=>Ps,overwriteDeep:()=>Wt,overwriteShallow:()=>eo,overwriteState:()=>Np,parse:()=>fl,parseDeep:()=>si,parseQuery:()=>qm,parseRoutePattern:()=>zm,pickupElementFromProps:()=>Nc,pickupPropsFromElement:()=>Fc,previousElement:()=>yi,propExists:()=>Ep,propertizeElement:()=>jc,propertizeUpdate:()=>Cp,reinit:()=>ly,remove:()=>S_,removeChars:()=>Th,removeCookie:()=>lp,removeDuplicateProps:()=>Gs,removeDuplicatesInArray:()=>Bo,removeFromArray:()=>dd,removeFromObject:()=>jd,removeNestedKeyByPath:()=>Ud,removeValueFromArray:()=>ws,removeValueFromArrayAll:()=>md,reorderArrayByValues:()=>bd,replaceLiteralsWithObjectFields:()=>Jr,replaceOctalEscapeSequences:()=>Cd,resolveAsset:()=>Kt,resolveHandler:()=>Wo,resolveSharedLibraries:()=>Ch,returnValueAsText:()=>Uc,router:()=>qe,runGuards:()=>Km,runPluginHook:()=>At,scratchSystem:()=>_n,scratchUtils:()=>Ar,self:()=>cd,set:()=>bo,setActiveRootState:()=>li,setCookie:()=>ap,setHashedExtend:()=>Ac,setInObjectByPath:()=>Vd,setLocalStorage:()=>up,setNodeStyles:()=>cl,setProps:()=>eh,setPropsPrototype:()=>Ks,sharedLibrary:()=>vh,splitPackageSpecifier:()=>wi,spotByPath:()=>ii,srcsetFor:()=>sn,stringIncludesAny:()=>vs,stringToObject:()=>$d,stripVersionRangePrefix:()=>Si,swapItemsInArray:()=>pd,syncProps:()=>Ys,toCamelCase:()=>Ai,toDashCase:()=>Ti,toDescriptionCase:()=>Rh,toTitleCase:()=>Oh,toggleFullscreen:()=>lh,triggerEventOn:()=>xr,triggerEventOnUpdate:()=>Bp,trimStringFromSymbols:()=>kd,unstackArrayOfObjects:()=>xs,update:()=>Ap,updateProps:()=>Op,variables:()=>bi,verbose:()=>Jo,warn:()=>gi,window:()=>v});R();R();var N1=C(),E0=(t=N1,e)=>{let r=S(e.localFile)?e.localFile:{},o=dt(r.designSystem||{});return st(t,o)},j1={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},Vn=(t,e)=>{let r=!e||e===":root",o={};for(let n in t)if(n.startsWith("@media")){let s=r?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;o[n]={[s]:t[n]}}else r?o[n]=t[n]:o[`${e}${n}, ${n} ${e}`]=t[n];return o},cr=(t,e=j1)=>{let r=E0(t||{},e),o=e.scopeSelector||":root",n=e.globalTheme;if(typeof window<"u"&&window.location){let p=new URLSearchParams(window.location.search).get("globalTheme");p&&(n=p)}let s=bo({verbose:e.verbose,useReset:e.useReset,useFontImport:e.useFontImport,useVariable:e.useVariable,useSvgSprite:e.useSvgSprite,useDocumentTheme:e.useDocumentTheme,useIconSprite:e.useIconSprite,useDefaultConfig:e.useDefaultConfig,globalTheme:n,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...r},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=o);let i=Li(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=t.svg,d=s.useIconSprite,h=t.icons;l&&kt(i),c&&(kt({[o]:s.CSS_VARS}),s.CSS_MEDIA_VARS&&kt(Vn(s.CSS_MEDIA_VARS,o))),a&&kt(s.reset);let g=s.animation;if(g){let p={};for(let m in g)p[`@keyframes ${m}`]=g[m];kt(p)}return(u||f)&&la(s.svg,{document:e.document}),(h||d)&&yo(s.icons,{document:e.document}),s},If={},ly=(t,e=If)=>{let r=E0(t||{},e),o=e.scopeSelector||":root",n=bo({verbose:!1,...r});return e.preventInject||(kt({[o]:n.CSS_VARS}),n.CSS_MEDIA_VARS&&kt(Vn(n.CSS_MEDIA_VARS,o)),kt(n.reset)),n},fy=(t,e=If)=>{kt(t)},B1=(t,e=If)=>{let r=e.scopeSelector||":root";kt({[r]:t.CSS_VARS}),t.CSS_MEDIA_VARS&&kt(Vn(t.CSS_MEDIA_VARS,r))};var U1=(t,e=If)=>{};R();var A0=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,V1=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},uy={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},Ra=(t,e)=>{if(!e)return t;let r=Array.isArray(e)?e:e.split("."),o=t;for(let n of r){if(!o||!o[n])return null;o=o[n]}return o},T0=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=uy:e.router=gt(e.router||{},uy);let r=e.router,o=async(s,i)=>{let a=s.context?.window||v,c=V1(r);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=A0(f),c=f+u+d}let l=s;if(r.customRouterElement){let f=Ra(s,r.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await qe(c,l,{},{initialRender:!0,pushState:!1})},n=!Tt(t.onRenderRouter);return r&&r.initRouter&&!n&&(t.onRenderRouter=o),H1(e,r),r},dy=(t,e)=>{if(e.router===!1)return;let r=e.router||uy;if(!r.popState)return;let o=e.utils&&e.utils.router?e.utils.router:qe,n=e.window||v,s=async i=>{let{pathname:a,search:c,hash:l}=n.location;a=A0(a);let f=a+c+l,u=t;if(r.customRouterElement){let d=Ra(t,r.customRouterElement);d&&(u=d,t.routes&&(u.routes=t.routes))}await u.call("router",f,u,{},{pushState:!1,scrollToTop:!1,level:0,event:i})};n.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>n.removeEventListener("popstate",s))},H1=(t,e)=>{let{components:r}=t;if(e&&e.injectRouterInLinkComponent)return st(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};R();var py=v&&v.location?v.location.host.includes("dev."):_r(),O0=py?"http://localhost:8080/get":"https://api.symbols.app/get",z1={endpoint:O0},R0=async(t,e=z1)=>{let r=e.endpoint||O0,o=e.serviceRoute?O(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",n;try{return n=await globalThis.fetch(r+"/?"+o,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await n.json()}catch(s){if(A(e.onError))return e.onError(s);console.error(s)}},W1=async(t,e)=>{let{editor:r}=e;if(r&&r.remote){let o=await R0(t,r),n=py||e.isDevelopment?ce(o):ce(o.releases[0]);r.serviceRoute?O(r.serviceRoute)?r.serviceRoute.forEach(s=>{Wt(e[s],n[s.toLowerCase()])}):Wt(e[r.serviceRoute],n):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{Wt(e[s],n[s.toLowerCase()])})}return e},q1=async(t,e,r)=>{let{editor:o}=e;if(o&&o.remote){let n=await R0(t,o),s=py||e.isDevelopment?ce(n):ce(n.releases[0]);r(s)}},P0=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await W1(t,e)}catch(r){console.error(r)}},I0=(t,e,r,o)=>{if(e&&r.editor)try{r.editor.async&&q1(e,r,o||(n=>{let s=n.designSystem;S(s)&&r.utils.init(s),S(n.state)&&t.state.set(n.state)}))}catch(n){console.error(n)}};var Pa=t=>{if(!t||t.__destroyed)return!1;let e=t.context;if(!e)return t.__destroyed=!0,!1;if(Array.isArray(e.__teardowns)){for(let r of e.__teardowns)try{r()}catch(o){console.error("[smbls] destroy teardown error:",o)}e.__teardowns.length=0}try{Fr(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 my={};P(my,{Helmet:()=>L0,applyMetadata:()=>Hn,default:()=>Z1,extractMetadata:()=>Y1,generateHeadHtml:()=>J1,helmetPlugin:()=>gy,resolveMetadata:()=>Br});R();var K1={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"}},G1=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}"]`},D0=t=>ce({v:t}).v,$0=(t,e,r,o)=>{try{return ft(t,e,r)}catch(n){console.warn(`[helmet] metadata factory for "${o}" threw; treating as unset:`,n&&n.message||n);return}},Br=(t,e,r)=>{if(!t)return{};let o=t;w(o)&&Fe(o)&&(o=D0(o));let n=A(o)?$0(o,e,r,"metadata"):S(o)?{...o}:{};if(!S(n))return{};for(let s in n){let i=n[s];w(i)&&Fe(i)&&(i=D0(i)),A(i)?i=$0(i,e,r,s):w(i)&&Fe(i)&&(i=void 0),w(i)&&i.includes("{{")&&e?.call&&(i=e.call("replaceLiteralsWithObjectFields",i,r)),n[s]=i}return n},Y1=(t,e="/",r,o)=>{let s=(t.pages||{})[e],i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=Br(t.app.metadata,r,o);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=Br(c,r,o);for(let f in l)a.add(f);i={...i,...l},!i.title&&s.state?.title&&(i.title=s.state.title,a.add("title")),!i.description&&s.state?.description&&(i.description=s.state.description,a.add("description"))}if(i.title||(i.title=t.name||"Symbols"),i.title&&(a.has("title")||!i["og:title"])&&(a.has("og:title")||(i["og:title"]=i.title)),i.description&&(a.has("description")||!i["og:description"])&&(a.has("og:description")||(i["og:description"]=i.description)),i.title&&!i["twitter:title"]&&(i["twitter:title"]=i.title),i.description&&!i["twitter:description"]&&(i["twitter:description"]=i.description),i["og:url"]||i.url){let c=(i["og:url"]||i.url||"").replace(/\/$/,"");if(c&&e&&e!=="/"){let l=e.startsWith("/")?e:"/"+e;i["og:url"]=c+l}}if(t.files)for(let c in i){let l=i[c];if(typeof l=="string"&&l.length>0&&!l.startsWith("/")&&!l.startsWith("http")){let f=t.files[l];f?.src&&(i[c]=f.src)}}return i},X1=(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},Ia=t=>{let e=5381,r=String(t);for(let o=0;o<r.length;o++)e=(e*33^r.charCodeAt(o))>>>0;return e.toString(36)},hy=(t,e,r,o)=>{let n=t.head||t.querySelector("head");if(!n)return;let s=new Map;for(let a of n.querySelectorAll(`[${e}]`))s.set(a.getAttribute(e),a);let i=new Set;for(let a of r)i.add(a);for(let[a,c]of s)i.has(a)||c.remove();for(let a of r){if(s.has(a))continue;let c=o(a);c&&(c.setAttribute(e,a),n.appendChild(c))}},Hn=(t,e)=>{if(!(!S(t)||!e)){for(let r in t){let o=t[r];if(o==null||r==="jsonLd"||r==="styles"||r==="scripts")continue;let n=K1[r];if(!n)continue;let s=G1(n),i=e.querySelector(s)||X1(n,e);i&&(r==="title"?i.textContent=o:n.valueAttr?i.setAttribute(n.valueAttr,o):i.setAttribute("content",o))}if(Array.isArray(t.jsonLd)){let o=t.jsonLd.filter(s=>s!=null).map(s=>w(s)?s:JSON.stringify(s)),n=o.map(Ia);hy(e,"data-smbls-jsonld",n,s=>{let i=n.indexOf(s),a=e.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=o[i],a})}if(Array.isArray(t.styles)){let r=t.styles.filter(n=>n!=null&&String(n).trim()),o=r.map(Ia);hy(e,"data-smbls-style",o,n=>{let s=o.indexOf(n),i=e.createElement("style");return i.textContent=String(r[s]),i})}if(Array.isArray(t.scripts)){let r=t.scripts.filter(n=>n&&(w(n)?n.trim():n.src)),o=r.map(n=>w(n)?n:String(n.src));hy(e,"data-smbls-script",o,n=>{let s=o.indexOf(n),i=r[s],a=e.createElement("script");return w(i)?a.setAttribute("src",i):(i.src&&a.setAttribute("src",i.src),i.type&&a.setAttribute("type",i.type),i.async&&(a.async=!0),i.defer&&(a.defer=!0),i.integrity&&a.setAttribute("integrity",i.integrity),i.crossorigin&&a.setAttribute("crossorigin",i.crossorigin),i.referrerpolicy&&a.setAttribute("referrerpolicy",i.referrerpolicy),i.nomodule&&(a.noModule=!0),i.body&&(a.textContent=String(i.body))),a})}}},ct=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,r=>e[r])},J1=t=>{let e=['<meta charset="UTF-8">'],r=new Set(["charset","jsonLd","styles","scripts"]),o=!1;for(let[n,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||r.has(n)||typeof s=="function")continue;if(n==="title"){e.push(`<title>${ct(s)}</title>`);continue}if(n==="viewport"){o||(e.push(`<meta name="viewport" content="${ct(s)}">`),o=!0);continue}if(n==="canonical"){e.push(`<link rel="canonical" href="${ct(s)}">`);continue}if(n==="icon"||n==="favicon"){let f=ct(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";e.push(`<link rel="icon" href="${f}"${u}>`);continue}if(n==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${ct(h)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${ct(f)}">`)});continue}if(n==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${ct(h)}"`).join(" ");e.push(`<link rel="alternate" ${u}>`)}});continue}let i=["og:","article:","product:","fb:","profile:","book:","business:","music:","video:"],a=["twitter:","DC:","DCTERMS:"],c=i.some(f=>n.startsWith(f)),l=a.some(f=>n.startsWith(f));if(n.startsWith("http-equiv:")){let f=n.replace("http-equiv:","");e.push(`<meta http-equiv="${ct(f)}" content="${ct(s)}">`)}else if(n.startsWith("itemprop:")){let f=n.replace("itemprop:","");e.push(`<meta itemprop="${ct(f)}" content="${ct(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${ct(n)}" content="${ct(f)}">`)):e.push(`<meta property="${ct(n)}" content="${ct(s)}">`):l?e.push(`<meta name="${ct(n)}" content="${ct(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${ct(n)}" content="${ct(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${ct(n)}" content="${ct(s)}">`)}if(o||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let n of t.jsonLd){if(n==null)continue;let s=typeof n=="string"?n:JSON.stringify(n),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Ia(s)}">${i}<\/script>`)}if(Array.isArray(t.styles))for(let n of t.styles){if(n==null||!String(n).trim())continue;let s=String(n).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Ia(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let n of t.scripts){if(!n)continue;let s=typeof n=="string",i=s?n:n.src;if(!i&&!(n&&n.body))continue;let a=[];i&&a.push(`src="${ct(i)}"`),s||(n.type&&a.push(`type="${ct(n.type)}"`),n.async&&a.push("async"),n.defer&&a.push("defer"),n.integrity&&a.push(`integrity="${ct(n.integrity)}"`),n.crossorigin&&a.push(`crossorigin="${ct(n.crossorigin)}"`),n.referrerpolicy&&a.push(`referrerpolicy="${ct(n.referrerpolicy)}"`),n.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${ct(i||Ia(n.body||""))}"`;if(!s&&n.body){let l=String(n.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
|
|
88
|
+
`)},L0={define:{metadata:(t,e,r)=>{let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Z(()=>{let s=Br(t,e,e.state);Hn(s,o);let i=e.state?.root;S(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(n)}}},gy={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;if(!e)return;let r=Z(()=>{let o=t.metadata;if(!o)return;let n=Br(o,t,t.state);Hn(n,e)});t.__ref?.__effects&&t.__ref.__effects.push(r)},update(t){let e=t.metadata;if(!e)return;let r=t.context?.document||typeof document<"u"&&document;if(!r)return;let o=Br(e,t,t.state);Hn(o,r)}},Z1=L0;Sr();var M0=(t,e,r,o)=>{t&&ni(t,e,r,o)},F0=(t,e,r)=>{if(!t)return;let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Br(t,e,r);Hn(n,o)},N0=async(t,e)=>{if(!t)return;let r={tag:"fragment",...t},o=async()=>{await e.set(r,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(o):await o(),r},zn={routes:t=>t,metadata:F0,fetch:M0,$router:N0},j0=(t={})=>{let e={routes:r=>r};return t.metadata!==!1&&(e.metadata=F0),t.fetch!==!1&&(e.fetch=M0),t.router!==!1&&(e.$router=N0),e};var yy={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},Df={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},$f={...yy,router:Df},Q1={state:{},pages:{},components:{},router:Df,define:zn},Ur=Q1;R();R();var B0=(t,e)=>H(t.extends)?t.extends:[];R();var by={};P(by,{default:()=>rO,getActiveLang:()=>qn,getLanguages:()=>$a,getLocalStateLang:()=>ja,initPolyglot:()=>Mf,loadTranslations:()=>Ma,polyglotPlugin:()=>Kn,setLang:()=>Fa,translate:()=>La,upsertTranslation:()=>Na});R();var V0="smbls_lang",tO="smbls_t_",eO="smbls_tv_",Wn={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)}}},Da={};function qn(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||e?.defaultLang||"en"}function $a(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var Lf=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let r=e.split("."),o=t;for(let n=0;n<r.length;n++){if(o==null)return;o=o[r[n]]}return o},U0=(t,e,r)=>{let o=e.lastIndexOf(".");if(o===-1)return t[e+"_"+r];let n=Lf(t,e.substring(0,o));if(n!=null)return n[e.substring(o+1)+"_"+r]};function La(t,e){if(!t)return"";let r=this?.context,o=r?.polyglot,n=e||this.call("getActiveLang"),s=this?.state;if(s){let l=U0(s,t,n);if(l!==void 0)return l}if(o?.translations){let l=o.translations[n];if(l){let f=Lf(l,t);if(f!==void 0)return f}}let a=(s?.root||r?.state?.root)?.translations;if(a){let l=a[n];if(l){let f=Lf(l,t);if(f!==void 0)return f}}let c=o?.defaultLang||"en";if(s){let l=U0(s,t,c);if(l!==void 0)return l}if(o?.translations){let l=o.translations[c];if(l){let f=Lf(l,t);if(f!==void 0)return f}}return t}async function Ma(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!r||!o)return;let n=r.storagePrefix||tO,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):eO);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!o.translations?.[t]){let c=Wn.get(n+t);if(c)try{let l=JSON.parse(c),f={translations:{...o.translations||{}}};f.translations[t]=l,o.update&&o.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(r.storagePrefix||"smbls")+":"+t;if(Da[i])return Da[i];let a=this;return Da[i]=(async()=>{try{let c=r.fetch,l=parseInt(Wn.get(s+t),10)||0,f,u,d;if(A(c)){let g=await c(t,l,a);if(!g||g.changed===!1)return;f=g.translations||g.data||g,u=g.version||0,d=!0}else if(S(c)){let g=a.getDB||(()=>e.fetch),p=A(g)?await g.call(a):e.fetch;if(!p)return;let m=c.rpc||c.from||"get_translations_if_changed",b={p_lang:t,p_cached_version:l,...c.params||{}},_=await p.rpc({from:m,params:b});if(_.error)throw r._fetchFailed||(r._fetchFailed={}),r._fetchFailed[t]=!0,_.error;let y=_.data;if(!y||!y.changed)return;f=y.translations||{},u=y.version||0,d=!0}else return;if(!d||!f)return;Wn.set(n+t,JSON.stringify(f)),u&&Wn.set(s+t,String(u));let h={translations:{...o.translations||{}}};h.translations[t]=f,o.update&&o.update(h)}catch(c){if(r.verbose!==!1){let l=c?.message||c?.details||(typeof c=="object"?JSON.stringify(c):String(c));console.warn("[polyglot] Failed to load translations for",t,"-",l)}}finally{delete Da[i]}})(),Da[i]}async function Fa(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!o||this.call("getActiveLang")===t)return;let n=r?.storageLangKey||V0;Wn.set(n,t),r?.fetch&&await this.call("loadTranslations",t),e?.state&&(e.state.lang=t);let s=r?.translations?.[t],i={lang:t};if(s&&typeof s=="object")for(let c in s){let l=s[c];(Array.isArray(l)||typeof l=="string"||typeof l=="number")&&(i[c]=l)}if(o.update&&o.update(i),s&&typeof s=="object")for(let c in s){let l=s[c];if(l&&typeof l=="object"&&!Array.isArray(l)&&o[c]&&typeof o[c]=="object"&&!Array.isArray(o[c]))for(let f in l)o[c][f]=l[f]}let a=this?.context?.document||globalThis.document;if(a&&s){let c=a.querySelectorAll("[data-key]");for(let l of c){let f=l.ref;if(!f)continue;let u=f.__ref?.__exec?.text;if(typeof u=="string"&&u.includes("{{"))try{let d=f.call("replaceLiteralsWithObjectFields",u,f.state);d!=null&&l.textContent!==d&&(l.textContent=d)}catch{}}}}async function Na(t,e,r){let o=this?.context,n=o?.polyglot,s=this?.state?.root||o?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=r),n?.translations?.[e]&&(n.translations[e][t]=r),n?.fetch&&S(n.fetch)){let i=this.getDB||(()=>o.fetch),a=A(i)?await i.call(this):o.fetch;if(!a)return;let c=n.fetch.table||"translations",l=await a.upsert({from:c,data:{key:t,lang:e,text:r}});if(l?.error)throw l.error;return l.data}}async function Mf(){let t=this?.context,e=t?.polyglot;if(!e)return;let r=this?.state?.root||t?.state?.root;if(!r)return;let o=e.storageLangKey||V0,s=Wn.get(o)||e.defaultLang||r.lang||"en";r.update&&r.lang!==s&&r.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function ja(t){try{let e=this?.context?.polyglot,o=(this?.state?.root||this?.context?.state?.root)?.lang||e?.defaultLang||"en",n=this?.state;if(!n)return"";let s=t.lastIndexOf(".");if(s===-1)return n[t+o]??"";let i=t.substring(0,s).split("."),a=n;for(let c=0;c<i.length;c++){if(a==null)return"";a=a[i[c]]}return a==null?"":a[t.substring(s+1)+o]??""}catch{return""}}var Kn={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,Mf.call(t))}},rO=Kn;Sr();var xy={};P(xy,{SYSTEM_METRICS:()=>Ba,capsizeHandler:()=>_y,capsizePlugin:()=>Nf,computeCapsize:()=>H0,default:()=>oO,resolveFontSizePx:()=>z0,resolveMetrics:()=>W0});var Ba={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}},Ff=t=>parseFloat(t.toFixed(4)),H0=(t,e,r)=>{let{ascent:o,descent:n,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(n),l=o+c+s,f=r!==void 0?r:l/i*t,u=f/t,d=l/i,h=(o-a+s/2)/i-(u-d)/2,g=(c+s/2)/i-(u-d)/2;return{fontSize:`${Ff(t/16)}rem`,lineHeight:`${Ff(f)}px`,capHeightTrim:`${Ff(-h)}em`,baselineTrim:`${Ff(-g)}em`}},z0=(t,e)=>{if(typeof t=="number")return t;let r=e?.designSystem;if(!r)return null;let{typography:o}=r;if(o?.sequence){let s=String(t).toUpperCase(),i=o.sequence[s];if(i)return i.decimal||i.val}let n=parseFloat(t);return isNaN(n)?null:typeof t=="string"&&t.endsWith("rem")?n*(r.typography?.browserDefault||16):n},W0=(t,e)=>{let o=e?.designSystem?.font_family||{};if(t){let s=o[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(Ba[i])return Ba[i]}let n=o.default||Object.keys(o)[0];if(n){let s=o[n];if(s?.metrics)return s.metrics;if(s?.value&&Array.isArray(s.value))for(let i of s.value){let a=i.toLowerCase().replace(/['"]/g,"").trim();if(Ba[a])return Ba[a]}}return null},_y=(t,e,r,o)=>{if(!t)return;let n=z0(e.fontSize,o);if(!n)return;let s=W0(e.fontFamily,o);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=H0(n,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},Nf={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},oO=Nf;var Ay={};P(Ay,{PRESERVE_VALUE_KEYS:()=>$t,SKIP_INLINE_KEYS:()=>Vr,abbrToProp:()=>Dt,decode:()=>X0,encode:()=>K0,expand:()=>ko,isComponentKey:()=>Pe,isSelectorKey:()=>Ie,parse:()=>vo,parseFurther:()=>Eo,propToAbbr:()=>we,shorten:()=>Ua,shorthandPlugin:()=>Va,stringify:()=>So,stringifyFurther:()=>Co});var we={attr:"at",childExtends:"cex",childExtendsRecursive:"cexr",childProps:"cp",children:"ch",childrenAs:"cha",class:"cl",content:"cnt",context:"ctx",data:"dt",extends:"ext",hide:"hd",html:"htm",if:"if",ignoreChildExtends:"icex",key:"ky",query:"qy",routes:"rt",scope:"scp",show:"shw",state:"st",style:"sy",tag:"tg",text:"tx",align:"aln",boxSize:"bsz",flow:"fl",heightRange:"hr",horizontalInset:"hi",round:"rnd",shadow:"shd",size:"sz",templateColumns:"tcol",verticalInset:"vi",widthRange:"wr",wrap:"wrp",aspectRatio:"ar",blockSize:"bks",boxSizing:"bxs",height:"h",inlineSize:"ins",margin:"m",marginBottom:"mb",marginLeft:"ml",marginRight:"mr",marginTop:"mt",maxBlockSize:"mxbs",maxHeight:"mxh",maxInlineSize:"mxis",maxWidth:"mxw",minBlockSize:"mnbs",minHeight:"mnh",minInlineSize:"mnis",minWidth:"mnw",padding:"p",paddingBottom:"pb",paddingInline:"pil",paddingLeft:"pl",paddingRight:"pr",paddingTop:"pt",width:"w",alignContent:"ac",alignItems:"ai",alignSelf:"as",flex:"fx",flexBasis:"fxb",flexDirection:"fxd",flexFlow:"fxf",flexGrow:"fxg",flexShrink:"fxs",flexWrap:"fxw",gap:"g",justifyContent:"jc",justifyItems:"ji",justifySelf:"js",order:"od",placeContent:"pcn",placeItems:"pit",placeSelf:"psl",rowGap:"rg",columnGap:"cg",gridArea:"ga",gridAutoColumns:"gac",gridAutoFlow:"gaf",gridAutoRows:"gar",gridColumn:"gc",gridColumnEnd:"gce",gridColumnStart:"gcs",gridRow:"gr",gridRowEnd:"gre",gridRowStart:"grs",gridTemplateAreas:"gta",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",bottom:"bot",float:"flt",inset:"ist",left:"lft",position:"pos",right:"rgt",top:"tp",zIndex:"zi",clear:"clr",contain:"ctn",cursor:"cur",display:"d",opacity:"op",overflow:"ov",overflowX:"ovx",overflowY:"ovy",pointerEvents:"pe",resize:"rsz",userSelect:"us",visibility:"vis",background:"bg",backgroundAttachment:"bga",backgroundBlendMode:"bgbm",backgroundClip:"bgcl",backgroundColor:"bgc",backgroundImage:"bgi",backgroundOrigin:"bgo",backgroundPosition:"bgp",backgroundPositionX:"bgpx",backgroundPositionY:"bgpy",backgroundRepeat:"bgr",backgroundRepeatX:"bgrx",backgroundRepeatY:"bgry",backgroundSize:"bgs",color:"c",theme:"thm",themeModifier:"thmm",border:"bd",borderBottom:"bdb",borderBottomLeftRadius:"bdblr",borderBottomRightRadius:"bdbrr",borderCollapse:"bdcl",borderColor:"bdc",borderImage:"bdi",borderImageOutset:"bdio",borderImageRepeat:"bdir",borderImageSlice:"bdis",borderImageSource:"bdisrc",borderImageWidth:"bdiw",borderLeft:"bdl",borderRadius:"bdr",borderRight:"bdrg",borderSpacing:"bdsp",borderStyle:"bdst",borderTop:"bdt",borderTopLeftRadius:"bdtlr",borderTopRightRadius:"bdtrr",borderWidth:"bdw",outline:"ol",outlineColor:"olc",outlineOffset:"olo",outlineStyle:"ols",outlineWidth:"olw",boxShadow:"bxsh",textShadow:"txsh",direction:"dir",fontDisplay:"fdi",fontFamily:"ff",fontFeatureSettings:"ffs",fontKerning:"fk",fontOpticalSizing:"fos",fontPalette:"fpl",fontSize:"fs",fontSizeAdjust:"fsa",fontSmooth:"fsm",fontStretch:"fsr",fontStyle:"fsy",fontSynthesis:"fsyn",fontVariant:"fv",fontVariationSettings:"fvs",fontWeight:"fw",hyphens:"hyp",letterSpacing:"ls",lineHeight:"lh",tabSize:"tsz",textAlign:"ta",textDecoration:"td",textDecorationColor:"tdc",textDecorationLine:"tdl",textDecorationStyle:"tds",textIndent:"ti",textOverflow:"tov",textStroke:"tsk",textTransform:"tt",unicodeBidi:"ub",verticalAlign:"va",whiteSpace:"ws",wordBreak:"wbr",wordSpacing:"wsp",wordWrap:"wwr",writingMode:"wm",captionSide:"cps",counterIncrement:"ci",counterReset:"cr",emptyCells:"ec",listStyle:"lst",listStyleImage:"lsi",listStylePosition:"lsp",listStyleType:"lsty",quotes:"qt",tableLayout:"tl",columnCount:"cc",columnFill:"cf",columnRule:"crl",columnRuleColor:"crlc",columnRuleStyle:"crls",columnRuleWidth:"crlw",columnSpan:"cspn",columnWidth:"cwi",columns:"col",backdropFilter:"bdf",boxDecorationBreak:"bxdb",clipPath:"cpth",filter:"fil",isolation:"iso",mixBlendMode:"mbm",objectFit:"obf",objectPosition:"obp",perspective:"prs",perspectiveOrigin:"prso",willChange:"wc",transform:"tf",transformOrigin:"tfo",transformStyle:"tfs",transition:"trn",transitionDelay:"trnd",transitionDuration:"trndr",transitionProperty:"trnp",transitionTimingFunction:"trntf",animation:"an",animationDelay:"and",animationDirection:"andr",animationDuration:"andur",animationFillMode:"anfm",animationIterationCount:"anic",animationName:"ann",animationPlayState:"anps",animationTimingFunction:"antf",scrollBehavior:"sb",scrollMargin:"smr",scrollMarginBottom:"smrb",scrollMarginLeft:"smrl",scrollMarginRight:"smrr",scrollMarginTop:"smrt",scrollPadding:"spd",scrollPaddingBottom:"spdb",scrollPaddingLeft:"spdl",scrollPaddingRight:"spdr",scrollPaddingTop:"spdt",scrollSnapAlign:"ssa",scrollSnapStop:"sss",scrollSnapType:"sst",breakAfter:"bka",breakBefore:"bkb",breakInside:"bki",pageBreakAfter:"pbka",pageBreakBefore:"pbkb",pageBreakInside:"pbki",accessKey:"ack",className:"cn",contentEditable:"ced",contextMenu:"cmu",draggable:"drg",hidden:"hid",id:"id",is:"is",lang:"lng",nonce:"nnc",spellCheck:"spc",tabIndex:"tbi",title:"ttl",translate:"trl",accept:"acp",acceptCharset:"accs",action:"act",autoComplete:"atc",autoFocus:"atf",capture:"cap",challenge:"chg",checked:"chk",cols:"cls",colSpan:"csn",controls:"ctl",default:"def",defer:"dfr",disabled:"dis",encType:"ect",form:"frm",formAction:"fac",formEncType:"fect",formMethod:"fme",formNoValidate:"fnv",formTarget:"ftg",high:"hgh",inputMode:"imd",kind:"knd",label:"lbl",list:"lis",loop:"lp",low:"lw",max:"mx",maxLength:"mxl",method:"mtd",min:"mn",minLength:"mnl",multiple:"mul",muted:"mut",name:"nm",open:"opn",optimum:"opt",pattern:"ptn",placeholder:"phd",readOnly:"ro",required:"req",reversed:"rev",rows:"rws",rowSpan:"rsn",selected:"sel",span:"spn",start:"srt",step:"stp",type:"typ",value:"val",download:"dl",href:"hrf",hrefLang:"hrl",ping:"png",referrerPolicy:"rfp",rel:"rl",target:"tgt",allow:"alw",allowFullScreen:"afs",allowPaymentRequest:"apr",alt:"alt",cellPadding:"cpg",cellSpacing:"csg",cite:"cit",coords:"crd",crossOrigin:"cor",dateTime:"dtm",fetchPriority:"fpr",headers:"hds",httpEquiv:"hte",integrity:"itg",isMap:"ism",keyType:"kty",loading:"ldg",manifest:"mft",media:"mda",poster:"pst",preload:"prl",radioGroup:"rdg",sandbox:"sbx",scoped:"scod",seamless:"sml",shape:"shp",sizes:"szs",src:"src",srcDoc:"srd",srcLang:"srl",srcSet:"srs",useMap:"ump",ariaActiveDescendant:"aad",ariaAtomic:"aat",ariaBusy:"abu",ariaChecked:"achk",ariaControls:"acl",ariaCurrent:"acr",ariaDescribedBy:"adb",ariaDetails:"adt",ariaDisabled:"adis",ariaDropEffect:"ade",ariaErrorMessage:"aem",ariaExpanded:"aexp",ariaGrabbed:"agr",ariaHasPopup:"ahp",ariaHidden:"ahid",ariaInvalid:"ainv",ariaLabel:"alb",ariaLabelledBy:"alby",ariaLive:"alv",ariaModal:"amod",ariaMultiSelectable:"ams",ariaOrientation:"aor",ariaOwns:"aow",ariaPosInSet:"apis",ariaPressed:"aprs",ariaReadOnly:"aro",ariaRelevant:"arl",ariaRequired:"areq",ariaSelected:"asel",ariaSetSize:"assz",ariaValueMax:"avmx",ariaValueMin:"avmn",ariaValueNow:"avn",role:"role",onInit:"@in",onRender:"@rn",onUpdate:"@up",onStateChange:"@sc",onStateUpdate:"@su",onClick:"@ck",onContextMenu:"@cm",onDblClick:"@dc",onMouseDown:"@md",onMouseEnter:"@me",onMouseLeave:"@ml",onMouseMove:"@mm",onMouseOut:"@mo",onMouseOver:"@mv",onMouseUp:"@mu",onKeyDown:"@kd",onKeyPress:"@kp",onKeyUp:"@ku",onBlur:"@bl",onFocus:"@fc",onFocusIn:"@fi",onFocusOut:"@fo",onBeforeInput:"@bi",onChange:"@cg",onFormData:"@fd",onInput:"@ip",onInvalid:"@iv",onReset:"@rs",onSearch:"@sr",onSelect:"@sl",onSubmit:"@sm",onTouchCancel:"@tc",onTouchEnd:"@te",onTouchMove:"@tm",onTouchStart:"@ts",onPointerCancel:"@pc",onPointerDown:"@pd",onPointerEnter:"@pe",onPointerLeave:"@ple",onPointerMove:"@pm",onPointerOut:"@po",onPointerOver:"@pov",onPointerUp:"@pu",onDrag:"@dg",onDragEnd:"@dge",onDragEnter:"@dgn",onDragLeave:"@dgl",onDragOver:"@dgo",onDragStart:"@dgs",onDrop:"@dp",onResize:"@rz",onScroll:"@scl",onWheel:"@wh",onCopy:"@cy",onCut:"@ct",onPaste:"@pt",onCompositionEnd:"@cpe",onCompositionStart:"@cps",onCompositionUpdate:"@cpu",onAnimationEnd:"@ae",onAnimationIteration:"@ai",onAnimationStart:"@as",onTransitionEnd:"@tre",onTransitionStart:"@trs",onAbort:"@ab",onCanPlay:"@cap",onCanPlayThrough:"@cpt",onDurationChange:"@duc",onEmptied:"@em",onEncrypted:"@enc",onEnded:"@end",onError:"@er",onLoad:"@ld",onLoadedData:"@ldd",onLoadedMetadata:"@ldm",onPause:"@pa",onPlay:"@pl",onPlaying:"@plg",onProgress:"@prg",onRateChange:"@rc",onSeeked:"@sk",onSeeking:"@skg",onStalled:"@stl",onSuspend:"@ssp",onTimeUpdate:"@tu",onVolumeChange:"@vc",onWaiting:"@wt",icon:"ico",iconText:"ict",lookup:"lkp",router:"rtr",shapeModifier:"shpm"},Dt=Object.create(null);for(let t in we)Dt[we[t]]=t;var wy=Object.create(null);for(let t in we){let e=we[t];if(wy[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${wy[e]}"`);wy[e]=t}var $t=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),Vr=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function Pe(t){return/^[A-Z]/.test(t)}function Ie(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function K0(t){if(!t||typeof t!="object")return"";let e=[];for(let r in t){let o=t[r];if(typeof o=="function"||o!==null&&typeof o=="object"&&!Array.isArray(o)||o===void 0)continue;let n=we[r]||r;if(o===!0)e.push(n);else if(o===!1)e.push("!"+n);else if(Array.isArray(o)){let s=o.map(i=>jf(i));e.push(n+":"+s.join(","))}else e.push(n+":"+jf(o))}return e.join(" ")}function jf(t){return String(t).replace(/ /g,"_")}function Ua(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Ua(r):r});let e={};for(let r in t){let o=t[r];if(Pe(r)){e[r]=Sy(o);continue}if(Ie(r)){e[r]=Sy(o);continue}let n=we[r]||r;if($t.has(r)||$t.has(n)){e[n]=o;continue}e[n]=Sy(o)}return e}function Sy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ua(e):e}):typeof t=="object"?Ua(t):t}function So(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?So(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Pe(o)){e[o]=q0(n);continue}if(Ie(o)){e[o]=q0(n);continue}let s=we[o]||o;if($t.has(o)||$t.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Vr.has(o)||Vr.has(s)){e[s]=n;continue}if(Array.isArray(n)){if(n.some(function(a){return a!==null&&typeof a=="object"})){e[s]=n.map(function(a){return a!==null&&typeof a=="object"?So(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(jf).join(","));continue}if(typeof n=="object"){e[s]=So(n);continue}n===!0?r.push(s):n===!1?r.push("!"+s):typeof n=="number"||typeof n=="string"&&(n.includes(",")||n.includes("_"))?e[s]=n:r.push(s+":"+jf(n))}return r.length&&(e.in=r.join(" ")),e}function q0(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 X0(t){if(!t||typeof t!="string")return{};let e={},r=J0(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Dt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Dt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(G0);continue}e[a]=G0(i)}return e}function J0(t){return t.trim().split(/\s+/).filter(Boolean)}function G0(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function Y0(t){return t.replace(/_/g," ")}function nO(t){if(!t||typeof t!="string")return{};let e={},r=J0(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Dt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Dt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(Y0);continue}e[a]=Y0(i)}return e}function ko(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?ko(r):r});let e={};for(let r in t){let o=t[r];if(Pe(r)){e[r]=ky(o);continue}let n=Dt[r]||r;if(Ie(r)&&n===r){e[r]=ky(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=ky(o)}return e}function ky(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?ko(e):e}):typeof t=="object"?ko(t):t}function vo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?vo(r):r});let e={};if(typeof t.in=="string"){let r=nO(t.in);for(let o in r)e[o]=r[o]}for(let r in t){if(r==="in")continue;let o=t[r];if(Pe(r)){e[r]=vy(o);continue}let n=Dt[r]||r;if(Ie(r)&&n===r){e[r]=vy(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=vy(o)}return e}function vy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?vo(e):e}):typeof t=="object"?vo(t):t}function Z0(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function sO(t){let e="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){let o=t[r+1];if(o===","||o==="_"||o==="\\"){e+=o,r+=2;continue}}t[r]==="_"?e+=" ":e+=t[r],r++}return e}function iO(t){let e=[],r="",o=0;for(;o<t.length;){if(t[o]==="\\"&&o+1<t.length){r+=t[o]+t[o+1],o+=2;continue}if(t[o]===","){e.push(r),r="",o++;continue}r+=t[o],o++}return e.push(r),e}function Q0(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(o){return o!==null&&typeof o=="object"?Co(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Pe(o)){let i=tk(n);e[o]=Q0(i)?i.in:i;continue}if(Ie(o)){let i=tk(n);e[o]=Q0(i)?i.in:i;continue}let s=we[o]||o;if($t.has(o)||$t.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Vr.has(o)||Vr.has(s)){e[s]=n;continue}if(Array.isArray(n)){if(n.some(function(a){return a!==null&&typeof a=="object"})){e[s]=n.map(function(a){return a!==null&&typeof a=="object"?Co(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(Z0).join(","));continue}if(typeof n=="object"){e[s]=Co(n);continue}if(n===!0){r.push(s);continue}if(n===!1){r.push("!"+s);continue}if(typeof n=="number"){r.push(s+":#"+n);continue}r.push(s+":"+Z0(n))}return r.length&&(e.in=r.join(" ")),e}function tk(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 ek(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):sO(t)}function Cy(t){if(!t||typeof t!="string")return{};let e={},r=t.trim().split(/\s+/).filter(Boolean);for(let o of r){if(o.startsWith("!")){let l=o.slice(1),f=Dt[l]||l;e[f]=!1;continue}let n=o.indexOf(":");if(n===-1){let l=Dt[o]||o;e[l]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s,c=iO(i);if(c.length>1){e[a]=c.map(ek);continue}e[a]=ek(i)}return e}function Eo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Eo(r):r});let e={};if(typeof t.in=="string"){let r=Cy(t.in);for(let o in r)e[o]=r[o]}for(let r in t){if(r==="in")continue;let o=t[r];if(Pe(r)){typeof o=="string"?e[r]=Cy(o):e[r]=Ey(o);continue}let n=Dt[r]||r;if(Ie(r)&&n===r){typeof o=="string"?e[r]=Cy(o):e[r]=Ey(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Ey(o)}return e}function Ey(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Eo(e):e}):typeof t=="object"?Eo(t):t}var aO={shorten:ko,stringify:vo,stringifyFurther:Eo};function cO(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(o=>e(o));let r={};for(let o in t){let n=t[o];r[o]=n&&typeof n=="object"?e(n):n}return r}var lO=["components","pages","snippets"],Va={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let o=aO[e===!0?"shorten":e];if(o){for(let n of lO)t[n]&&(t[n]=cO(t[n],o));t.app&&typeof t.app=="object"&&(t.app=o(t.app))}}};var jy={};P(jy,{LEVELS:()=>Ha,analyzePlugin:()=>Yn,attachBrowserListeners:()=>Gf,attachNetworkListeners:()=>Wa,classifyEvent:()=>$y,createAnalyzeState:()=>Yf,createBeaconSink:()=>Fy,createConsoleSink:()=>Ly,createDedupe:()=>Py,createEnrich:()=>Oy,createMemorySink:()=>My,createPipeline:()=>Hf,createRedact:()=>Vf,createRemoteSink:()=>Wf,createSample:()=>Iy,createSummarize:()=>Ry,default:()=>Yn,emitFetchEvent:()=>lk,makeEvent:()=>X,meetsLevel:()=>Bf,normalizeLevel:()=>za,resolveSinks:()=>Kf,summarizeElement:()=>Ao});var fO=0,uO=()=>`${Date.now().toString(36)}-${(fO++).toString(36)}`,X=(t,e,r={})=>({id:uO(),ts:Date.now(),type:t,level:e,...r}),dO=t=>{let e=[],r=t,o=0;for(;r&&o<32;)r.key!=null&&e.unshift(String(r.key)),r=r.parent,o++;return e.join(" > ")},Ao=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:dO(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var Gn=t=>t?.context?.analyze,pO={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"}},hO=(t,{category:e,type:r,level:o})=>n=>{let s=Gn(n);!s||!s.shouldCapture(e)||s.emit(X(r,o,{hook:t,element:Ao(n)}))},rk=t=>(e,r)=>{let o=Gn(e);!o||!o.shouldCapture("state")||o.emit(X("state","debug",{hook:t,element:Ao(e),changedKeys:r?.changedKeys||null}))},Yn={name:"analyze",error(t,e){let r=Gn(t);if(!r||r.config.enabled===!1||!r.shouldCapture("errors"))return;let o=e?.error||e?.err||(e instanceof Error?e:null);r.emit(X("error","error",{hook:e?.hook||"error",element:Ao(t),error:o,message:o?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=Gn(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(X("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=Gn(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=Gn(t);if(!e||!e.shouldCapture("updates"))return;let r=null;t.__ref?.__analyzeUpdateStart!=null&&(r=(typeof performance<"u"?performance.now():Date.now())-t.__ref.__analyzeUpdateStart,t.__ref.__analyzeUpdateStart=null),e.emit(X("update","debug",{hook:"update",element:Ao(t),durationMs:r}))},beforeStateUpdate:rk("beforeStateUpdate"),stateUpdate:rk("stateUpdate")};for(let[t,e]of Object.entries(pO))Yn[t]=hO(t,e);R();var Ha={error:0,warn:1,info:2,debug:3,trace:4};var Bf=(t,e)=>{let r=Ha[t],o=Ha[e];return r==null||o==null?!0:r<=o},za=t=>Ha[t]!=null?t:"warn";R();var Uf=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var gO=(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},mO=(t,e)=>{if(e!=="redact"){if(e==="hash"){let r=0,o=String(t);for(let n=0;n<o.length;n++)r=(r<<5)-r+o.charCodeAt(n)|0;return`#${(r>>>0).toString(36)}`}return"***"}},Ty=(t,e,r,o)=>{if(o>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>Ty(s,e,r,o+1));let n={};for(let s of Object.keys(t))if(gO(s,e)||Uf.test(s)){let a=mO(t[s],r);a!==void 0&&(n[s]=a)}else n[s]=Ty(t[s],e,r,o+1);return n},Vf=(t=[],e="mask")=>{let r=Array.isArray(t)?t:[t];return o=>{if(!o)return o;let{id:n,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...g}=o,p=Ty(g,r,e,0);return{id:n,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...p}}};var Oy=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,r=typeof navigator<"u"?navigator.userAgent:null,o=t.config.buildHash||null,n=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=v,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:n,build:o,route:i},meta:{ua:r,viewport:c}}}},Ry=()=>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},Py=(t=1e3,e=500)=>{let r=new Map;return o=>{if(!o)return o;let n=`${o.type}:${o.level}:${o.message||""}:${o.error?.message||""}`,s=r.get(n),i=o.ts||Date.now();if(s&&i-s<t)return null;if(r.set(n,i),r.size>e){let a=Math.ceil(e/10),c=0;for(let l of r.keys()){if(c++>=a)break;r.delete(l)}}return o}},Iy=t=>e=>{if(!e)return e;let r=t[e.type];return r==null||r>=1?e:Math.random()>r?null:e},ok={redact:t=>Vf(t.config.redact||[],t.config.maskStrategy),enrich:t=>Oy(t),summarize:()=>Ry(),dedupe:t=>Py(t.config.cache?.dedupeWindowMs||1e3),sample:t=>Iy(t.config.sample||{})},yO=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let r=ok[t];return r?r(e):null}return null},Hf=t=>{let e=t.config,r=Array.isArray(e.transformers)?e.transformers.slice():[],o=r.findIndex(s=>s==="redact");o>=0&&r.splice(o,1);let n=[];e.redact!==!1&&n.push(ok.redact(t));for(let s of r){let i=yO(s,t);i&&n.push(i)}return s=>{let i=s;for(let a of n){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=n.slice(n.indexOf(a)+1),f=[];for(let u of c){let d=u,h=!1;for(let g of l)if(d=g(d),d==null){h=!0;break}!h&&d!=null&&f.push(d)}return f}i=c}return i}};R();R();var zf=typeof v<"u"&&typeof v.document<"u",bO=5e3,_O=50,xO=3,wO=1500,SO=1e3,$y=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",kO=t=>{try{return JSON.stringify(t)}catch{return null}},vO=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},CO=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}},EO=()=>{if(!zf)return null;try{let t=v.document?.documentElement?.getAttribute("data-theme")||null,e=typeof v.matchMedia=="function"?v.matchMedia("(prefers-color-scheme: dark)").matches:null;return{active:t||(e?"dark":e===!1?"light":null),forced:t||null,prefers:e==null?null:e?"dark":"light"}}catch{return null}},AO=()=>{if(!zf)return null;let t=v.location,e=typeof navigator<"u"?navigator:null,r=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:v.document?.referrer||null,title:v.document?.title||null,ua:e?.userAgent||null,browser:CO(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:vO(),viewport:v.innerWidth?{w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}:null,screen:r?{w:r.width||null,h:r.height||null,availW:r.availWidth||null,availH:r.availHeight||null,colorDepth:r.colorDepth||null,orientation:r.orientation?.type||null}:null,theme:EO()}},Wf=(t={})=>{let e=t.url,r=typeof t.transport=="function"?t.transport:null,o=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!r)return()=>{};let n=t.apiKey||null,s=t.appKey||t.appId||null,i=t.tenantKey||t.tenant||null,a=t.release||null,c=t.env||null,l=t.sdk||null,f=typeof t.getAuth=="function"?t.getAuth:null,u=typeof t.getContext=="function"?t.getContext:null,d=typeof t.classify=="function"?t.classify:$y,h=typeof t.beforeSend=="function"?t.beforeSend:null,g=t.debug===!0,p=typeof t.getDebug=="function"?t.getDebug:null,m=t.batchMs!=null?t.batchMs:bO,b=t.maxBatch||_O,_=t.maxRetries!=null?t.maxRetries:xO,y=t.backoffMs||wO,x=t.queueLimit||SO,k=t.sampleRate!=null?t.sampleRate:1,E=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,T=t.sessionId||E(),$=[],D=[],I=null,z=null,V=()=>{I||!$.length||(I=setTimeout(K,m))},rt=L=>{if(z)return;let ot=y*Math.pow(2,Math.max(0,L-1));z=setTimeout(()=>{if(z=null,!D.length)return;let U=D.shift();G(U.envelope,U.attempt)},ot)},at=(L,ot=!1)=>{let U=u?Dy(u):null,Y={id:T,sentAt:Date.now()};ot&&(Y.endedAt=Date.now());let j={v:1,session:Y,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:AO(),user:U?.user||null,traits:U?.traits||null,tags:U?.tags||null,events:L};if((p?Dy(p)===!0:g)&&(j.app.debug=!0),h)try{return h(j)||null}catch{return j}return j},G=async(L,ot=1)=>{if(L)try{let U=!0;if(r){let Y=await r(L);U=Y!==!1&&Y?.ok!==!1}else U=await TO(e,L,{apiKey:n,getAuth:f});!U&&ot<_&&(D.push({envelope:L,attempt:ot+1}),rt(ot+1))}catch{ot<_&&(D.push({envelope:L,attempt:ot+1}),rt(ot+1))}},K=(L=!1,ot=!1)=>{if(I&&(clearTimeout(I),I=null),!$.length&&!ot)return;let U=$;$=[];let Y=at(U,ot);if(Y){if(L&&zf){if(typeof o=="function"&&Dy(()=>o(Y)))return;if(navigator.sendBeacon&&e){let j=kO(Y);if(j)try{navigator.sendBeacon(e,new v.Blob([j],{type:"application/json"}));return}catch{}}}G(Y)}},lt=!1,Ut=()=>{lt||(lt=!0,K(!0,!0))};zf&&(v.addEventListener("pagehide",Ut,{passive:!0}),v.addEventListener("beforeunload",Ut,{passive:!0}),v.addEventListener("visibilitychange",()=>{v.document.visibilityState==="hidden"&&K(!0)},{passive:!0}));let W=L=>{if(!L||k<1&&Math.random()>k)return;lt&&(lt=!1);let ot={...L,log_type:d(L)};$.push(ot),$.length>x&&($=$.slice(-x)),$.length>=b?K():V()},wt=L=>(K(!1,!0),T=L||E(),lt=!1,W.sessionId=T,T);return W.flush=()=>K(!1),W.endSession=Ut,W.startNewSession=wt,W.sessionId=T,W},Dy=t=>{try{return t()}catch{return null}},TO=async(t,e,{apiKey:r,getAuth:o})=>{let n={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(r&&(n["X-Analyze-Key"]=r),o)try{let s=await o();s&&(n.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:n,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var OO={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},RO="\x1B[0m",qf=typeof v<"u"&&typeof v.document<"u",Ly=(t={})=>{let e=t.minLevel||null,r=console.error.bind(console),o=console.warn.bind(console),n=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?r:s.level==="warn"?o:n,a=`[analyze:${s.type}]`;if(qf)i(a,s);else{let c=OO[s.level]||"";i(`${c}${a}${RO}`,s)}}},My=(t,e={})=>{let r=e.max||t.config.cache?.max||500,o=new Array(r),n=0,s=0,i=a=>{o[n]=a,n=(n+1)%r,s<r&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(n-s+r)%r;for(let l=0;l<s;l++)a[l]=o[(c+l)%r];return a},query:(a={})=>{let c=t.__memory.snapshot(),l=a.sinceMs?Date.now()-a.sinceMs:0;return c.filter(f=>!(!f||a.level&&f.level!==a.level||a.type&&f.type!==a.type||l&&f.ts<l))},clear:()=>{n=0,s=0}},i},Fy=(t={})=>{let e=t.url,r=t.batchMs!=null?t.batchMs:5e3,o=t.maxBatch||50;if(!e)return()=>{};let n=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!n.length)return;let c=JSON.stringify({events:n});n=[];let l=qf?new v.Blob([c],{type:"application/json"}):c;if(qf&&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(()=>{})};qf&&(v.addEventListener("pagehide",i,{passive:!0}),v.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(n.push(c),n.length>=o?i():s||(s=setTimeout(i,r)))};return a.flush=i,a},nk={console:Ly,memory:My,beacon:Fy,remote:Wf},sk=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},Kf=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],r=[];for(let o of e)if(typeof o=="function")r.push(o);else if(typeof o=="string"){let n=nk[o];if(!n)continue;r.push(o==="memory"?n(t,{}):n(o==="remote"?sk(t,{}):{}))}else if(o&&typeof o=="object"&&o.type){let n=nk[o.type];if(!n)continue;r.push(o.type==="memory"?n(t,o):n(o.type==="remote"?sk(t,o):o))}return r};R();var PO=typeof v<"u"&&typeof v.document<"u",IO=new Set(["password","hidden"]),ik=(t,e)=>{let r=0,o=null,n=null;return(...s)=>{let i=Date.now();i-r>=e?(r=i,t(...s)):(n=s,o||(o=setTimeout(()=>{r=Date.now(),o=null,n&&(t(...n),n=null)},e-(i-r))))}},Ny="__analyzeKeyPath",Xn=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[Ny])return e[Ny];let r=[],o=e,n=0,s=null;for(;o&&n<64;){if(o.getAttribute){let a=o.getAttribute("data-key");a&&(s==null&&(s=a),r.unshift(a))}o=o.parentNode,n++}let i;if(r.length)i={selector:null,key:s,path:r.join(" > "),tag:e.tagName?.toLowerCase()||null};else{let a=(e.tagName||"unknown").toLowerCase(),c=e.id?`#${e.id}`:"",l=e.className&&typeof e.className=="string"?"."+e.className.trim().split(/\s+/).slice(0,2).join("."):"";i={selector:`${a}${c}${l}`,key:null,path:null}}try{e[Ny]=i}catch{}return i},DO=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let r=0,o=String(t||"");for(let n=0;n<o.length;n++)r=(r<<5)-r+o.charCodeAt(n)|0;return`#${(r>>>0).toString(36)}`}return"***"}},$O=t=>!!(!t||t.tagName==="INPUT"&&IO.has(t.type)||Uf.test(t.name||"")||Uf.test(t.id||"")||t.dataset?.analyze==="skip"),Gf=t=>{if(!PO)return;let e=t.config.capture,r=t.config.throttle,o=t.__teardown,n=(s,i,a,c)=>{s.addEventListener(i,a,c),o.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(n(v,"error",s=>{t.emit(X("error","error",{hook:"window.onerror",message:s.message||null,error:s.error||null,source:s.filename||null,line:s.lineno||null,col:s.colno||null}))}),n(v,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(X("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){n(v,"click",i=>{t.emit(X("pointer","info",{hook:"click",target:Xn(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:ak(i)}))},{passive:!0,capture:!0}),n(v,"dblclick",i=>{t.emit(X("pointer","info",{hook:"dblclick",target:Xn(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),n(v,"contextmenu",i=>{t.emit(X("pointer","info",{hook:"contextmenu",target:Xn(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=ik(i=>{t.emit(X("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},r.pointermove);n(v,"pointermove",s,{passive:!0})}if(e.keyboard&&n(v,"keydown",s=>{t.emit(X("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:ak(s),target:Xn(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=$O(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=DO(a.value,t.config.maskStrategy)),t.emit(X("forms","info",{hook:i.type,target:Xn(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};n(v,"input",s,{passive:!0,capture:!0}),n(v,"change",s,{passive:!0,capture:!0}),n(v,"submit",i=>{t.emit(X("forms","info",{hook:"submit",target:Xn(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=ik(()=>{t.emit(X("scroll","trace",{hook:"scroll",x:v.scrollX,y:v.scrollY}))},r.scroll);n(v,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=Ls(()=>{t.emit(X("viewport","info",{hook:"resize",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))},r.resize);n(v,"resize",s,{passive:!0}),n(v,"orientationchange",()=>{t.emit(X("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),n(v.document,"visibilitychange",()=>{t.emit(X("viewport","info",{hook:"visibilitychange",hidden:v.document.hidden}))},{passive:!0}),t.emit(X("viewport","info",{hook:"initial",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(X("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(ck)}))}catch{}return i.apply(console,a)},o.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(X("performance","info",{hook:c.entryType,name:c.name,startTime:c.startTime,duration:c.duration,value:c.value!=null?c.value:null}))}),i=["largest-contentful-paint","layout-shift","longtask","paint","first-input","event"];for(let a of i)try{s.observe({type:a,buffered:!0})}catch{}o.push(()=>s.disconnect())}catch{}},ak=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),LO=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=ck(t.cause)),e},ck=t=>{if(t==null)return t;if(t instanceof Error)return LO(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};R();var MO=typeof v<"u"&&typeof v.document<"u",lk=(t,e)=>{let r=t?.analyze;if(!r||!r.shouldCapture("network"))return;let o=e.phase==="error"?"error":"info";r.emit(X("network",o,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},Wa=t=>{if(MO&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof v.fetch=="function"){let e=v.fetch.bind(v),r=function(o,n){if(n?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(o,n);let s=typeof o=="string"?o:o&&o.url||"",i=(n?.method||typeof o=="object"&&o?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(X("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(o,n).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(X("network",c.ok?"info":"warn",{hook:"fetch.success",source:"window.fetch",url:s,method:i,status:c.status,ok:c.ok,durationMs:l})),c}).catch(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;throw t.emit(X("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};v.fetch=r,t.__teardown.push(()=>{v.fetch=e})}if(typeof v.XMLHttpRequest=="function"){let e=v.XMLHttpRequest,r=e.prototype.open,o=e.prototype.send;e.prototype.open=function(n,s){return this.__analyze={method:String(n).toUpperCase(),url:String(s)},r.apply(this,arguments)},e.prototype.send=function(n){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return o.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(X("network","info",{hook:"xhr.start",source:"xhr",url:s.url,method:s.method}));let a=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i,f=this.status>=200&&this.status<400;t.emit(X("network",f?"info":"warn",{hook:"xhr.success",source:"xhr",url:s.url,method:s.method,status:this.status,ok:f,durationMs:l}))},c=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i;t.emit(X("network","error",{hook:"xhr.error",source:"xhr",url:s.url,method:s.method,status:this.status,durationMs:l}))};return this.addEventListener("loadend",a),this.addEventListener("error",c),o.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=r,e.prototype.send=o})}}};var FO={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},NO={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},jO={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},BO={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},UO=t=>{let e={...FO,...t};return e.replay&&Object.assign(e,NO),e.telemetry&&Object.assign(e,jO),e.remote&&Object.assign(e,BO),Object.assign(e,t),e},VO=64,HO=()=>{if(typeof v>"u"||!v.location)return null;try{let e=new URLSearchParams(v.location.search).get("analyze");return e||null}catch{return null}},Yf=(t={})=>{let e=t===!0?{}:{...t};e.capture=UO(e.capture||{});let r=HO();(r==="debug"||e.debug)&&(e.level="debug",e.debug=!0,e.capture={...e.capture,lifecycle:!0,state:!0,updates:!0,console:!0,network:!0}),r==="off"&&(e.enabled=!1),e.level=za(e.level||"warn"),e.cache={max:500,dedupeWindowMs:1e3,...e.cache||{}},e.throttle={pointermove:80,mousemove:80,scroll:100,resize:200,...e.throttle||{}},e.maskFormValues==null&&(e.maskFormValues=!0),e.maskStrategy||(e.maskStrategy="mask"),Array.isArray(e.sinks)||(e.sinks=["console","memory"]),Array.isArray(e.transformers)||(e.transformers=["enrich","summarize"]);let o={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},n=()=>{o.__pipeline||(o.__pipeline=Hf(o),o.__sinks=Kf(o))};return o.shouldCapture=s=>o.config.enabled===!1?!1:!!o.config.capture[s],o.emit=s=>{if(s&&o.config.enabled!==!1&&!o.__paused&&Bf(s.level,o.config.level)){if(!o.__ready){if(s.level!=="error"&&!o.config.captureDuringHydration)return;o.__preBuffer.length<VO&&o.__preBuffer.push(s);return}n(),fk(o,s)}},o.activate=s=>{if(o.context==null&&(o.context=s||null),o.__ready)return;o.__ready=!0;let i=o.__preBuffer;if(o.__preBuffer=[],i.length){n();for(let a of i)fk(o,a)}try{Gf(o)}catch(a){console.error("[analyze] browser attach error:",a)}try{Wa(o)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of o.__onActivate||[])try{a(o)}catch(c){console.error("[analyze] onActivate error:",c)}},o.pause=()=>{o.__paused=!0},o.resume=()=>{o.__paused=!1},o.setLevel=s=>{o.config.level=za(s)},o.setCapture=(s,i)=>{if(o.config.capture[s]=!!i,s==="network"&&i&&o.__ready)try{Wa(o)}catch(a){console.error("[analyze] network attach error:",a)}},o.query=s=>o.__memory?o.__memory.query(s):[],o.snapshot=()=>o.__memory?o.__memory.snapshot():[],o.emitNetwork=s=>{if(!o.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";o.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:"network",level:a,hook:`fetch.${i||"unknown"}`,...s})},o.flush=()=>{if(o.__sinks)for(let s of o.__sinks)typeof s.flush=="function"&&s.flush()},o.startNewSession=s=>{let i=s||(typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),a=Array.isArray(o.config.sinks)?o.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(o.__sinks)for(let c of o.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},o.replay=()=>({initialSnapshot:o.__initialSnapshot,events:o.snapshot()}),o.destroy=()=>{for(let s of o.__teardown)try{s()}catch{}o.__teardown=[],o.__ready=!1,o.__paused=!0},o.__onActivate=[],o.onActivate=s=>{o.__onActivate.push(s)},o},fk=(t,e)=>{let r=t.__pipeline(e);if(r==null)return;let o=Array.isArray(r)?r:[r];for(let n of o){if(typeof t.config.onEvent=="function")try{t.config.onEvent(n)}catch{}for(let s of t.__sinks)try{s(n)}catch(i){console.error("[analyze] sink error:",i)}}};var Vy={};P(Vy,{Inspect:()=>Xf,inspectPlugin:()=>Uy});R();function uk(t){return w(t)?t:O(t)?t.find(e=>w(e)):""}function By(t){if(!t)return;let e=t.__ref.__componentKey,r=t.extends&&uk(t.extends),o=t.parent&&t.parent.childExtends&&uk(t.parent.childExtends);return(e||r||o||"").split("_")[0].split(".")[0].split("+")[0]}function Jf(t){if(!t||!t.__ref)return;let{components:e,pages:r,editor:o}=t.context,n=By(t);return o&&o.onInitInspect&&!o.onInitInspect(n,t,t.state)?Jf(t.parent):n&&(e[n]||r[n])?t:Jf(t.parent)}var zO=(t,e,r)=>{let o=r.window||window;o.onkeydown=n=>{n.altKey&&n.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},o.onkeyup=n=>{t.state.preventSelect&&(!n.altKey||!n.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},Xf={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:zO,onMousemove:(t,e,r)=>{let o=t.target.ref,n=Jf(o),s=e.Inspector.state;if(!n||!r.debugging||!n.__ref)return s.update({area:!1});let i=By(n),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=n.node.getBoundingClientRect(),h={x:l,y:f,width:u,height:d};if(!s.area)return a(h);s.area.x!==h.x&&a(h)}else s.area&&s.update({area:!1})};window.requestAnimationFrame(()=>{c(),window.requestAnimationFrame(c)})},onMousedown:(t,e,r)=>{if(!r.debugging)return;let o=t.target.ref,n=Jf(o);if(!n)return;let s=By(n);if(!s)return;let i=o.context.editor;if(i&&i.onInspect)return i.onInspect(s,o,o.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return o.context.socket?.emit&&o.context.socket.emit("route",a),t.preventDefault(),t.stopPropagation(),!1},Inspector:{state:{},transition:"all, defaultBezier, X",position:"fixed",hide:(t,e)=>!(e.area&&e.parent.debugging),style:{boxShadow:"0 0 10px #3686F733, 0 0 0 3px #3686F766, 0 0 100vmax 100vmax #000A",zIndex:"9999999",borderRadius:"10px",pointerEvents:"none"},Span:{position:"absolute",margin:"A2 0",fontSize:"Z",color:"text",zIndex:"99999999",transition:"all, defaultBezier, X",textDecoration:"underline",fontWeight:"500",top:"100%",style:{boxShadow:"0 25px 10px 35px black",textShadow:"0 0 10px black"},text:"{{ focusKey }}"},onInit:({context:t})=>{let{components:e}=t;if(S(e)){let{Content:r,...o}=e;for(let n in o)Bn[n]||(o[n].__ref||(o[n].__ref={}),o[n].__ref.__componentKey||(o[n].__ref.__componentKey=n))}},onBeforeUpdate:(t,e,r)=>{let{area:o}=r,n=r.area&&r.parent.debugging,s;if(!n)s="display: none !important";else if(o){let{x:i,y:a,width:c,height:l}=o;s=`
|
|
89
89
|
display: block !important;
|
|
90
90
|
top: ${a-6}px;
|
|
91
91
|
left: ${i-6}px;
|
|
92
92
|
width: ${c+12}px;
|
|
93
93
|
height: ${l+12}px;
|
|
94
|
-
`}return e.node.style=s,e.Span.node.innerText=r.focusKey,!1}}},
|
|
95
|
-
`);for(;
|
|
96
|
-
`)}}return{text:
|
|
94
|
+
`}return e.node.style=s,e.Span.node.innerText=r.focusKey,!1}}},Uy={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(Xf):t.extends?t.extends=[t.extends,Xf]:t.extends=[Xf]}};var zy={};P(zy,{apiUrl:()=>Hy,channelByApiUrl:()=>GO,channelNames:()=>qO,channels:()=>Zt,currentChannel:()=>Hr,defaultChannel:()=>rR,deployTarget:()=>QO,isKnownChannel:()=>eR,mermaidUrl:()=>ZO,normalizeOwnerSegment:()=>oR,normalizeProjectKey:()=>sR,normalizeProjectSlug:()=>nR,parseSymboLsHost:()=>iR,previewProjectUrl:()=>JO,previewUrl:()=>gk,resolveChannel:()=>To,screenshotCdnHost:()=>mk,screenshotCdnUrl:()=>tR,setChannel:()=>KO,shellUrl:()=>XO,socketUrl:()=>YO});var Zt={channels:{local:{api:"http://localhost:8080",socket:"http://localhost:8080",shell:"http://my.localhost:1355",preview:"http://preview.localhost:1355",mermaidApex:"localhost:1355",deploy:{}},development:{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.my.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},"demo-dev":{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.demo.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-demo-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},next:{api:"https://next.api.symbols.app",socket:"https://next.api.symbols.app",shell:"https://next.my.symbols.app",preview:"https://next.preview.symbols.app",mermaidApex:"next.symbo.ls",deploy:{shellBucket:"smbls-my-next",previewWorker:"smbls-preview-next",mermaidWorker:"mermaid-next"}},test:{api:"https://test.api.symbols.app",socket:"https://test.api.symbols.app",shell:"https://test.my.symbols.app",preview:"https://test.preview.symbols.app",mermaidApex:"test.symbo.ls",deploy:{shellBucket:"smbls-my-test",previewWorker:"smbls-preview-test",mermaidWorker:"mermaid-test"}},upcoming:{api:"https://upcoming.api.symbols.app",socket:"https://upcoming.api.symbols.app",shell:"https://upcoming.my.symbols.app",preview:"https://upcoming.preview.symbols.app",mermaidApex:"upcoming.symbo.ls",deploy:{shellBucket:"smbls-my-upcoming",previewWorker:"smbls-preview-upcoming",mermaidWorker:"mermaid-upcoming"}},staging:{api:"https://staging.api.symbols.app",socket:"https://staging.api.symbols.app",shell:"https://staging.my.symbols.app",preview:"https://staging.preview.symbols.app",mermaidApex:"staging.symbo.ls",deploy:{shellBucket:"smbls-my-staging",previewWorker:"smbls-preview-staging",mermaidWorker:"mermaid-staging"}},demo:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://demo.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-demo",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}},production:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://my.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-prod",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}}},defaultChannel:"production",screenshotCdn:"screenshots.api.symbols.app"};var qO=Object.keys(Zt.channels),lr=t=>!!(t&&Zt.channels[t]),To=t=>lr(t)?Zt.channels[t]:Zt.channels[Zt.defaultChannel],KO=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=lr(t)?t:null,Jn=void 0)},Jn,qa=t=>typeof process<"u"&&process.env&&process.env[t]||null,Hr=()=>{if(Jn!==void 0)return Jn;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=qa("SYMBOLS_CHANNEL"),r=qa("NODE_ENV");return Jn=lr(t)&&t||lr(e)&&e||lr(r)&&r||Zt.defaultChannel,Jn===Zt.defaultChannel&&!lr(t)&&!lr(e)&&!lr(r)&&typeof process<"u"&&process.versions&&process.versions.node&&console.warn(`[channels] no channel configured (NODE_ENV=${r||"unset"}, __SYMBOLS_CHANNEL__ unset) \u2014 falling back to "${Zt.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),Jn},dk=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],pk=t=>{let e=dk.indexOf(t);return e===-1?dk.length:e},GO=t=>{if(!t)return null;let e=Object.keys(Zt.channels).filter(r=>Zt.channels[r].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((r,o)=>pk(r)-pk(o))[0]},Hy=(t=Hr())=>qa("SYMBOLS_API_URL")||To(t).api,YO=(t=Hr())=>qa("SYMBOLS_SOCKET_URL")||To(t).socket,XO=(t=Hr())=>To(t).shell||null,gk=(t=Hr())=>To(t).preview||null,JO=({owner:t,key:e,env:r="production"}={},o=Hr())=>{let n=gk(o);if(!n||!t||!e)return null;let s=n.match(/^(https?:\/\/)(.+)$/);if(!s)return null;let[,i,a]=s,c=`${encodeURIComponent(t)}--${encodeURIComponent(e)}`,l=`${i}${c}.${a}/`;return!r||r==="production"||r==="prod"?l:`${l}?env=${encodeURIComponent(r)}`},ZO=({owner:t,key:e,env:r="production"}={},o=Hr())=>{let n=To(o).mermaidApex;if(!n||!t||!e)return null;let i=!r||r==="production"||r==="prod"?"":`--${encodeURIComponent(r)}`,a=`${encodeURIComponent(t)}--${encodeURIComponent(e)}${i}`;return`${n.startsWith("localhost")?"http":"https"}://${a}.${n}`},QO=(t=Hr())=>To(t).deploy||{},mk=()=>qa("SYMBOLS_SCREENSHOT_CDN")||Zt.screenshotCdn,tR=({owner:t,key:e,page:r="root",componentKey:o,env:n="production",width:s}={})=>{if(!t||!e)return null;let i=o?`component/${encodeURIComponent(o)}`:encodeURIComponent(String(r||"root").replace(/^\/+/,"").replace(/\//g,"-")||"root"),a=[];n&&n!=="production"&&a.push(`env=${encodeURIComponent(n)}`),s&&a.push(`w=${Number(s)}`);let c=a.length?`?${a.join("&")}`:"";return`https://${mk()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},eR=lr,rR=Zt.defaultChannel,oR=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",nR=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",sR=(t,e={})=>{let r=String(t||"").trim();if(!r)return"";/\.symbo\.ls$/iu.test(r)&&(r=r.replace(/\.symbo\.ls$/iu,"")),r.includes("/")&&(r=r.split("/").pop());let o=typeof e.owner=="string"?e.owner.trim():"";return o&&r.startsWith(`${o}--`)?r=r.slice(o.length+2):!o&&r.includes("--")&&(r=r.slice(r.indexOf("--")+2)),r},hk={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},iR=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=hk[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?hk[u]||u:null;return{projectKey:f,owner:l,env:d||a,sysEnv:a}}}}}if(r.length>=5)return{projectKey:r[1],owner:r[2],env:r[0]};let o=r[1],n=r[0];if(n.includes("--")){let[s,i]=n.split("--",2);return!s||!i?null:{projectKey:s,owner:o,env:i}}return{projectKey:n,owner:o,env:"production"}};var Ky={};P(Ky,{BUILD_DOMQL_SYSTEM_PROMPT:()=>Ok,DEFAULT_MAX_TOKENS:()=>nu,DEFAULT_MODEL:()=>zr,DEFAULT_PROVIDER:()=>ru,DEFAULT_TEMPERATURE:()=>ou,MODEL_TIER_ALIASES:()=>qy,PROVIDER_MODELS:()=>bk,SIMONE_BASE_URL:()=>Ka,SIMONE_CHAT_PATH:()=>Zf,SIMONE_CODE_PATH:()=>Qf,SIMONE_CODE_SYMBOLS_PATH:()=>tu,SIMONE_HEALTH_PATH:()=>eu,SIMONE_TOOLS_PATH:()=>yk,WORKSPACE_SYSTEM_PROMPT:()=>Tk,buildMessages:()=>kk,chat:()=>Ga,health:()=>Sk,parseSimoneResponse:()=>Ek,resolveModel:()=>Rk,streamChat:()=>Ga,streamCode:()=>xk,streamCodeSymbols:()=>wk,toLegacyEnvelope:()=>Ak});var Ka="https://symbols-service-production.up.railway.app",Zf="/api/chat",Qf="/api/code",tu="/api/code-symbols",eu="/api/health",yk="/api/tools",ru="openai-compatible",zr="claude-sonnet-4-6",ou=.7,nu=4096,bk={"openai-compatible":["claude-sonnet-4-6","claude-opus-4-6","gpt-4o","gpt-4o-mini","deepseek-chat"],anthropic:["claude-sonnet-4-6","claude-sonnet-4-5-20250929","claude-opus-4-1-20250805","claude-haiku-4-5-20251001"],openrouter:["google/gemini-3-pro-preview"],gemini:["gemini-3-pro-preview"]};function _k(t,e){return t?t.replace(/\/$/,"")+e:e}function aR(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 Ga(t,e={},r){let{baseUrl:o=Ka,path:n=Zf,provider:s=ru,model:i=zr,temperature:a=.7,maxTokens:c=4096,effort:l,apiKeys:f,signal:u,headers:d}=e;if(!Array.isArray(t)||t.length===0)throw new TypeError("simone: messages must be a non-empty array");let h={messages:t,provider:s,model:i,temperature:a,maxTokens:c};l&&(h.effort=l),f&&(h.apiKeys=f);let g=await fetch(_k(o,n),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(h),signal:u});if(!g.ok){let x=g.statusText;try{let E=await g.text();try{let T=JSON.parse(E);x=T.error||T.detail||x}catch{x=E||x}}catch{}let k=new Error(`simone: HTTP ${g.status} \u2014 ${x}`);throw k.status=g.status,k}if(!g.body||typeof g.body.getReader!="function"){let x=await g.text();return r&&r(x),{text:x,errors:[]}}let p=g.body.getReader(),m=new TextDecoder,b=[],_=[],y="";try{for(;;){let{done:x,value:k}=await p.read();if(x)break;y+=m.decode(k,{stream:!0});let E=y.indexOf(`
|
|
95
|
+
`);for(;E!==-1;){let T=y.slice(0,E).trim();if(y=y.slice(E+1),T){let $=aR(T);if($?.done)return{text:b.join(""),errors:_};let D=$?.chunk;D?.delta&&(b.push(D.delta),r&&r(D.delta)),D?.error&&_.push(D.error)}E=y.indexOf(`
|
|
96
|
+
`)}}return{text:b.join(""),errors:_}}finally{p.cancel().catch(()=>{})}}function xk(t,e={},r){return Ga(t,{...e,path:Qf},r)}function wk(t,e={},r){return Ga(t,{...e,path:tu},r)}async function Sk(t={}){let{baseUrl:e=Ka,signal:r,headers:o}=t,n=await fetch(_k(e,eu),{method:"GET",headers:o,signal:r});if(!n.ok)throw new Error(`simone health: HTTP ${n.status}`);return n.json()}function kk({system:t,history:e=[],user:r,context:o}){let n=[];t&&n.push({role:"system",content:t});for(let s of e)!s||!s.role||typeof s.content!="string"||!s.content||n.push({role:s.role,content:s.content});if(r){let s=r;if(o!=null){let i=typeof o=="string"?o:JSON.stringify(o,null,2);s=`${s}
|
|
97
97
|
|
|
98
98
|
---
|
|
99
99
|
Context:
|
|
100
100
|
\`\`\`json
|
|
101
101
|
${i}
|
|
102
|
-
\`\`\``}n.push({role:"user",content:s})}return n}var
|
|
103
|
-
`),hy={Starter:jr,Free:jr,Pro:"claude-opus-4-6"};function U0(t){return t?hy[t]||t:jr}var V0={"@symbo.ls/signal":Au,"@symbo.ls/scratch":zh,"@symbo.ls/element":Vg,"@symbo.ls/css":Zh,"@symbo.ls/utils":fl,"@symbo.ls/state":Og,"@symbo.ls/router":_a,"@symbo.ls/polyglot":Bm,"@symbo.ls/helmet":Nm,"@symbo.ls/fetch":Qr,"@symbo.ls/capsize":Vm,"@symbo.ls/shorthand":Ym,"@symbo.ls/analyze":ay,"@symbo.ls/inspect":fy,"@symbo.ls/channels":dy,"@symbo-ls/simone-server":gy},H0=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:{}),o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in V0)o[n]||(o[n]=V0[n]);if(e)for(let n in e)o[n]||(o[n]=e[n]);return o},z0=["@symbo.ls/sdk"],W0=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!t||typeof t!="object")return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in t){let s=t[n];!s||typeof s!="object"&&typeof s!="function"||o[n]||(o[n]=s)}return o},q0=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!Array.isArray(t))return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n of t){let s=n&&n.library?n.library:n;if(!s||typeof s!="object"||s.__isStub)continue;let i=s.key||s.name||s.__libraryKey;if(typeof i!="string"||!i)continue;let a=i.includes("/")?i.slice(i.indexOf("/")+1):i;for(let c of[`@symbo-ls/${a}`,`@symbo.ls/${a}`])o[c]||(o[c]=s)}return o};R();var Y0=t=>{let e=typeof window<"u"?window:globalThis||{};e.document||(e.document={body:{}});let r=typeof document<"u"?document:e.document;t.document=t.document||r;let o=t.window;return o&&o!==e&&typeof o.URL!="function"?(typeof console<"u"&&console.warn&&!globalThis.__smblsRouterUrlWarned&&(globalThis.__smblsRouterUrlWarned=!0,console.warn("[smbls/router] context.window lacks URL, falling back to globalThis \u2014 passed-in window may be a stub (warned once; applies to every embed app this session)")),t.window=e):t.window=o||e,t.window},K0=(t="smbls")=>{let e={};for(let r in mo)Object.prototype.hasOwnProperty.call(mo,r)&&(Ne(r)?e[`smbls.${r}`]=mo[r]:e[r]=mo[r]);return e},X0=t=>t.components?{...K0(),...t.components}:K0(),J0=t=>({...wa,..._a,...kr,...t.utils,...t.snippets,...t.functions}),Z0=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var qO=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,KO=3e3,GO=(t,e,r=o=>import(o))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let o=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(o[t])return Promise.resolve(o[t]);let n=Promise.resolve().then(()=>r(e)).then(i=>(i&&!o[t]&&(o[t]=i),o[t]||null)).catch(()=>null);return new Promise(i=>{let a=setTimeout(()=>i(null),KO);n.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},G0={},Q0=async({dependencies:t,dependenciesOnDemand:e,document:r,preventCaching:o=!1,cdnProvider:n,packageManager:s,symbolsConfig:i,registerDependency:a=GO})=>{if(n||(n=xr[s]||Go(i)||"esmsh"),!t)return null;let c=!1;for(let d in t){c=!0;break}if(!c)return null;let l=gr()&&o?`?${Math.random()}`:"",f=async(d,h)=>{let g=ve(d,h,n)+l;try{await Promise.race([Xo(g,{document:r,type:"module"}),new Promise((p,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,g)}catch(p){if(console.error(`Failed to load ${d} from ${n}:`,p),n!=="symbols")try{let m=ve(d,h,"symbols")+l;await Promise.race([Xo(m,{document:r,type:"module"}),new Promise((_,b)=>setTimeout(()=>b(new Error(`Timeout fallback ${d}`)),2e4))]),console.log(`Successfully loaded ${d} from fallback (symbols.ls)`),await a(d,m)}catch(m){console.error(`Failed to load ${d} from fallback:`,m)}}},u=[];for(let d in t){let h=t[d];if(!(e&&e[d])&&!G0[d]&&(G0[d]=!0,!eo(d))){if(Yo(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}qO(d)||u.push(f(d,h))}}return u.length&&await Promise.allSettled(u),t},tk=async(t,e)=>{let r=e.window||window,o=e.cdnProvider||Go(e.symbolsConfig)||"esmsh",n=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=o)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&eo(a))return await u.require(a,c);if(!u.packages[a]){let d=gr()?`?${Math.random()}`:"";if(l&&l[a]){let h=l[a],g=ve(a,h,c)+d;try{await i.utils.loadRemoteScript(g,{window:u,document:f})}catch(p){if(console.error(`Failed to load ${a} from ${c}:`,p),c!=="symbols"){let m=ve(a,h,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let h=ve(a,"latest",c)+d;try{await i.utils.loadRemoteScript(h,{window:u,document:f})}catch(g){if(console.error(`Failed to load ${a} from ${c}:`,g),c!=="symbols"){let p=ve(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=pt(r.packages,t):r.packages=t,r.require||(e.utils.require=await n(e),r.require=e.utils.require),r.requireOnDemand||(e.utils.requireOnDemand=await s(e),r.requireOnDemand=e.utils.requireOnDemand)},YO=/\s+/g,ek=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,XO=(t,e)=>{let r="";for(let o in t){let n=t[o];typeof n=="boolean"&&n?r+=` ${o}`:typeof n=="string"?r+=` ${n}`:typeof n=="function"&&(r+=` ${ek(n,e)}`)}return r},JO=(t,e,r)=>{if(!t)return;let{key:o}=e;t===!0&&(t=e.classlist={key:o}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=XO(t,e));let n=t.replace(YO," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",n);else if(r)try{r.className=n}catch{}return n},ZO=()=>(t,e,r)=>{let o=ek(t,e);if(t){let{__ref:n}=e;n.__class.style=o}rk()(e.classlist,e,e.state,!0)},rk=()=>(t,e,r,o)=>{if(e.style&&!o)return;let{__ref:n}=e,{__class:s,__classNames:i}=n;if(!(t===null||typeof t!="object"||Array.isArray(t))){e.class&&(i.classProps=e.class),e.attr?.class&&(i.class=e.attr.class);for(let a in s){let c=s[a];if(!c){delete i[a];continue}let l;typeof c=="string"||typeof c=="number"?l=c:typeof c=="boolean"?l=e.key:l=me(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&JO(i,e,e.node)}},QO=()=>({style:ZO(),classlist:rk()}),tR=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],my=new WeakSet,yy=!1,eR=t=>!!t&&typeof t=="object",ok=(t,e)=>{let r=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,o=e.initOptions||{},n=e.registry||QO(),s=e.designSystem?nt(ut(e.designSystem),ya):ut(ya),i={};for(let p of tR)e[p]!==void 0&&(i[p]=e[p]);let a,c=eR(r),f=c&&my.has(r)&&!e.skipDesignSystemInit,u=!f&&!yy,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=E(t)||E(),a&&(a.__domDocument=r),a?.CSS_VARS){st(a);try{wt({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&wt(Ln(a.CSS_MEDIA_VARS,d))}finally{rt()}}}else if(u){let p=E();p&&(p.__domDocument=r),a=ir(s,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...vf,...i,...o}),a&&a!==p&&(a.__domDocument=r),c&&my.add(r),yy=!0}else{let p=Pi(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}st(p);try{a=ir(p,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...vf,...i,...o})}finally{rt()}c&&my.add(r),yy=!0}let h=a?.CONFIG||a,g=h?.font;if(g){st(h);try{for(let p in g){let m=g[p];if(!m?.fontFace)continue;let _=Array.isArray(m.fontFace)?m.fontFace:[m.fontFace];for(let b of _)typeof b=="string"&&b.includes("font-family")&&wt(`@font-face { ${b} }`)}}finally{rt()}}return[a,n]},nk=(t,e)=>{let r={};e.state&&nt(r,e.state),t&&t.state&&nt(r,t.state);let o=e.polyglot;if(o?.translations){let n=null;try{typeof localStorage<"u"&&(n=localStorage.getItem(o.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=n||r.lang||o.defaultLang||"en";n&&n!==r.lang&&(r.lang=n);let i=o.translations[s];if(i&&typeof i=="object")for(let c in i)r[c]=i[c];let a=new Set(o.languages||[]);for(let c in o.translations)!a.has(c)&&r[c]===void 0&&(r[c]=o.translations[c])}return r.isRootState=!0,ut(r)},sk=(t,e)=>{S(t.routes)&&S(e.pages)&&pt(t.routes,e.pages);let r=t.routes||e.pages||{};for(let o in r){if(o.charCodeAt(0)===47)continue;let n=o==="index"?"":o;r["/"+n]=r[o],delete r[o]}return r},ik=t=>{bi(t,t.sharedLibraries)};var Ua={polyglot:Aa,getLocalStateLang:Pa,getActiveLang:jn,getLang:jn,setLang:Oa,getLanguages:Ea,loadTranslations:Ta,upsertTranslation:Ra};br();var Ie=Object.create(null);Ie.open="0";Ie.close="1";Ie.ping="2";Ie.pong="3";Ie.message="4";Ie.upgrade="5";Ie.noop="6";var Va=Object.create(null);Object.keys(Ie).forEach(t=>{Va[Ie[t]]=t});var Ha={type:"error",data:"parser error"};var lk=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",fk=typeof ArrayBuffer=="function",uk=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,za=({type:t,data:e},r,o)=>lk&&e instanceof Blob?r?o(e):ak(e,o):fk&&(e instanceof ArrayBuffer||uk(e))?r?o(e):ak(new Blob([e]),o):o(Ie[t]+(e||"")),ak=(t,e)=>{let r=new FileReader;return r.onload=function(){let o=r.result.split(",")[1];e("b"+(o||""))},r.readAsDataURL(t)};function ck(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var by;function dk(t,e){if(lk&&t.data instanceof Blob)return t.data.arrayBuffer().then(ck).then(e);if(fk&&(t.data instanceof ArrayBuffer||uk(t.data)))return e(ck(t.data));za(t,!1,r=>{by||(by=new TextEncoder),e(by.encode(r))})}var pk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wa=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<pk.length;t++)Wa[pk.charCodeAt(t)]=t;var hk=t=>{let e=t.length*.75,r=t.length,o,n=0,s,i,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let l=new ArrayBuffer(e),f=new Uint8Array(l);for(o=0;o<r;o+=4)s=Wa[t.charCodeAt(o)],i=Wa[t.charCodeAt(o+1)],a=Wa[t.charCodeAt(o+2)],c=Wa[t.charCodeAt(o+3)],f[n++]=s<<2|i>>4,f[n++]=(i&15)<<4|a>>2,f[n++]=(a&3)<<6|c&63;return l};var rR=typeof ArrayBuffer=="function",qa=(t,e)=>{if(typeof t!="string")return{type:"message",data:gk(t,e)};let r=t.charAt(0);return r==="b"?{type:"message",data:oR(t.substring(1),e)}:Va[r]?t.length>1?{type:Va[r],data:t.substring(1)}:{type:Va[r]}:Ha},oR=(t,e)=>{if(rR){let r=hk(t);return gk(r,e)}else return{base64:!0,data:t}},gk=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var mk="",yk=(t,e)=>{let r=t.length,o=new Array(r),n=0;t.forEach((s,i)=>{za(s,!1,a=>{o[i]=a,++n===r&&e(o.join(mk))})})},bk=(t,e)=>{let r=t.split(mk),o=[];for(let n=0;n<r.length;n++){let s=qa(r[n],e);if(o.push(s),s.type==="error")break}return o};function _k(){return new TransformStream({transform(t,e){dk(t,r=>{let o=r.length,n;if(o<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,o);else if(o<65536){n=new Uint8Array(3);let s=new DataView(n.buffer);s.setUint8(0,126),s.setUint16(1,o)}else{n=new Uint8Array(9);let s=new DataView(n.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(o))}t.data&&typeof t.data!="string"&&(n[0]|=128),e.enqueue(n),e.enqueue(r)})}})}var _y;function Yf(t){return t.reduce((e,r)=>e+r.length,0)}function Xf(t,e){if(t[0].length===e)return t.shift();let r=new Uint8Array(e),o=0;for(let n=0;n<e;n++)r[n]=t[0][o++],o===t[0].length&&(t.shift(),o=0);return t.length&&o<t[0].length&&(t[0]=t[0].slice(o)),r}function xk(t,e){_y||(_y=new TextDecoder);let r=[],o=0,n=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(o===0){if(Yf(r)<1)break;let c=Xf(r,1);s=(c[0]&128)===128,n=c[0]&127,n<126?o=3:n===126?o=1:o=2}else if(o===1){if(Yf(r)<2)break;let c=Xf(r,2);n=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),o=3}else if(o===2){if(Yf(r)<8)break;let c=Xf(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(Ha);break}n=f*Math.pow(2,32)+l.getUint32(4),o=3}else{if(Yf(r)<n)break;let c=Xf(r,n);a.enqueue(qa(s?c:_y.decode(c),e)),o=0}if(n===0||n>t){a.enqueue(Ha);break}}}})}var xy=4;function lt(t){if(t)return nR(t)}function nR(t){for(var e in lt.prototype)t[e]=lt.prototype[e];return t}lt.prototype.on=lt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};lt.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};lt.prototype.off=lt.prototype.removeListener=lt.prototype.removeAllListeners=lt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,n=0;n<r.length;n++)if(o=r[n],o===e||o.fn===e){r.splice(n,1);break}return r.length===0&&delete this._callbacks["$"+t],this};lt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(r){r=r.slice(0);for(var o=0,n=r.length;o<n;++o)r[o].apply(this,e)}return this};lt.prototype.emitReserved=lt.prototype.emit;lt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};lt.prototype.hasListeners=function(t){return!!this.listeners(t).length};var cr=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),jt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),wk="arraybuffer";function Jf(t,...e){return e.reduce((r,o)=>(t.hasOwnProperty(o)&&(r[o]=t[o]),r),{})}var sR=jt.setTimeout,iR=jt.clearTimeout;function lr(t,e){e.useNativeTimers?(t.setTimeoutFn=sR.bind(jt),t.clearTimeoutFn=iR.bind(jt)):(t.setTimeoutFn=jt.setTimeout.bind(jt),t.clearTimeoutFn=jt.clearTimeout.bind(jt))}var aR=1.33;function Sk(t){return typeof t=="string"?cR(t):Math.ceil((t.byteLength||t.size)*aR)}function cR(t){let e=0,r=0;for(let o=0,n=t.length;o<n;o++)e=t.charCodeAt(o),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(o++,r+=4);return r}function Zf(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function kk(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function vk(t){let e={},r=t.split("&");for(let o=0,n=r.length;o<n;o++){let s=r[o].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var Qf=class extends Error{constructor(e,r,o){super(e),this.description=r,this.context=o,this.type="TransportError"}},fr=class extends lt{constructor(e){super(),this.writable=!1,lr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,o){return super.emitReserved("error",new Qf(e,r,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let r=qa(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=kk(e);return r.length?"?"+r:""}};var Ka=class extends fr{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||r()})),this.writable||(o++,this.once("drain",function(){--o||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let r=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};bk(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,yk(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]=Zf()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}};var Ck=!1;try{Ck=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Ek=Ck;function lR(){}var wy=class extends Ka{constructor(e){if(super(e),typeof location<"u"){let r=location.protocol==="https:",o=location.port;o||(o=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||o!==e.port}}doWrite(e,r){let o=this.request({method:"POST",data:e});o.on("success",r),o.on("error",(n,s)=>{this.onError("xhr post error",n,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,o)=>{this.onError("xhr poll error",r,o)}),this.pollXhr=e}},Br=class t extends lt{constructor(e,r,o){super(),this.createRequest=e,lr(this,o),this._opts=o,this._method=o.method||"GET",this._uri=r,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var e;let r=Jf(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;let o=this._xhr=this.createRequest(r);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&o.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var n;o.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=lR,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()}};Br.requestsCount=0;Br.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ak);else if(typeof addEventListener=="function"){let t="onpagehide"in jt?"pagehide":"unload";addEventListener(t,Ak,!1)}}function Ak(){for(let t in Br.requests)Br.requests.hasOwnProperty(t)&&Br.requests[t].abort()}var fR=(function(){let t=Tk({xdomain:!1});return t&&t.responseType!==null})(),Ur=class extends wy{constructor(e){super(e);let r=e&&e.forceBase64;this.supportsBinary=fR&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Br(Tk,this.uri(),e)}};function Tk(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Ek))return new XMLHttpRequest}catch{}if(!e)try{return new jt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var Ok=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",ky=class extends fr{get name(){return"websocket"}doOpen(){let e=this.uri(),r=this.opts.protocols,o=Ok?{}:Jf(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,o)}catch(n){return this.emitReserved("error",n)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){let o=e[r],n=r===e.length-1;za(o,this.supportsBinary,s=>{try{this.doWrite(o,s)}catch{}n&&cr(()=>{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]=Zf()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}},Sy=jt.WebSocket||jt.MozWebSocket,Vr=class extends ky{createSocket(e,r,o){return Ok?new Sy(e,r,o):r?new Sy(e,r):new Sy(e)}doWrite(e,r){this.ws.send(r)}};var Wn=class extends fr{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=xk(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=e.readable.pipeThrough(r).getReader(),n=_k();n.readable.pipeTo(e.writable),this._writer=n.writable.getWriter();let s=()=>{o.read().then(({done:a,value:c})=>{a||(this.onPacket(c),s())}).catch(a=>{})};s();let i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){let o=e[r],n=r===e.length-1;this._writer.write(o).then(()=>{n&&cr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var vy={websocket:Vr,webtransport:Wn,polling:Ur};var uR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,dR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function qn(t){if(t.length>8e3)throw"URI too long";let e=t,r=t.indexOf("["),o=t.indexOf("]");r!=-1&&o!=-1&&(t=t.substring(0,r)+t.substring(r,o).replace(/:/g,";")+t.substring(o,t.length));let n=uR.exec(t||""),s={},i=14;for(;i--;)s[dR[i]]=n[i]||"";return r!=-1&&o!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=pR(s,s.path),s.queryKey=hR(s,s.query),s}function pR(t,e){let r=/\/{2,9}/g,o=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&o.splice(0,1),e.slice(-1)=="/"&&o.splice(o.length-1,1),o}function hR(t,e){let r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,n,s){n&&(r[n]=s)}),r}var Cy=typeof addEventListener=="function"&&typeof removeEventListener=="function",tu=[];Cy&&addEventListener("offline",()=>{tu.forEach(t=>t())},!1);var vo=class t extends lt{constructor(e,r){if(super(),this.binaryType=wk,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){let o=qn(e);r.hostname=o.host,r.secure=o.protocol==="https"||o.protocol==="wss",r.port=o.port,o.query&&(r.query=o.query)}else r.host&&(r.hostname=qn(r.host).host);lr(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(o=>{let n=o.prototype.name;this.transports.push(n),this._transportsByName[n]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=vk(this.opts.query)),Cy&&(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"})},tu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let r=Object.assign({},this.opts.query);r.EIO=xy,r.transport=e,this.id&&(r.sid=this.id);let o=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let o=0;o<this.writeBuffer.length;o++){let n=this.writeBuffer[o].data;if(n&&(r+=Sk(n)),o>0&&r>this._maxPayload)return this.writeBuffer.slice(0,o);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,cr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,o){return this._sendPacket("message",e,r,o),this}send(e,r,o){return this._sendPacket("message",e,r,o),this}_sendPacket(e,r,o,n){if(typeof r=="function"&&(n=r,r=void 0),typeof o=="function"&&(n=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;let s={type:e,data:r,options:o};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),n&&this.once("flush",n),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},o=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():e()}):this.upgrading?o():e()),this}_onError(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Cy&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let o=tu.indexOf(this._offlineEventListener);o!==-1&&tu.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}};vo.protocol=xy;var eu=class extends vo{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let r=this.createTransport(e),o=!1;vo.priorWebsocketSuccess=!1;let n=()=>{o||(r.send([{type:"ping",data:"probe"}]),r.once("packet",u=>{if(!o)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;vo.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(f(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{let d=new Error("probe error");d.transport=r.name,this.emitReserved("upgradeError",d)}}))};function s(){o||(o=!0,f(),r.close(),r=null)}let i=u=>{let d=new Error("probe error: "+u);d.transport=r.name,s(),this.emitReserved("upgradeError",d)};function a(){i("transport closed")}function c(){i("socket closed")}function l(u){r&&u.name!==r.name&&s()}let f=()=>{r.removeListener("open",n),r.removeListener("error",i),r.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};r.once("open",n),r.once("error",i),r.once("close",a),this.once("close",c),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{o||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let r=[];for(let o=0;o<e.length;o++)~this.transports.indexOf(e[o])&&r.push(e[o]);return r}},Kn=class extends eu{constructor(e,r={}){let o=typeof e=="object"?e:r;(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(n=>vy[n]).filter(n=>!!n)),super(e,o)}};var aU=Kn.protocol;function Rk(t,e="",r){let o=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),o=qn(t)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";let s=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+s+":"+o.port+e,o.href=o.protocol+"://"+s+(r&&r.port===o.port?"":":"+o.port),o}var Iy={};P(Iy,{Decoder:()=>Ry,Encoder:()=>Oy,PacketType:()=>U,isPacketValid:()=>LR,protocol:()=>Uk});var mR=typeof ArrayBuffer=="function",yR=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Pk=Object.prototype.toString,bR=typeof Blob=="function"||typeof Blob<"u"&&Pk.call(Blob)==="[object BlobConstructor]",_R=typeof File=="function"||typeof File<"u"&&Pk.call(File)==="[object FileConstructor]";function Ya(t){return mR&&(t instanceof ArrayBuffer||yR(t))||bR&&t instanceof Blob||_R&&t instanceof File}function Ga(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,o=t.length;r<o;r++)if(Ga(t[r]))return!0;return!1}if(Ya(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Ga(t.toJSON(),!0);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Ga(t[r]))return!0;return!1}function Ik(t){let e=[],r=t.data,o=t;return o.data=Ey(r,e),o.attachments=e.length,{packet:o,buffers:e}}function Ey(t,e){if(!t)return t;if(Ya(t)){let r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){let r=new Array(t.length);for(let o=0;o<t.length;o++)r[o]=Ey(t[o],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){let r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=Ey(t[o],e));return r}return t}function Dk(t,e){return t.data=Ay(t.data,e),delete t.attachments,t}function Ay(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]=Ay(t[r],e);else if(typeof t=="object")for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Ay(t[r],e));return t}var jk=rC(Nk(),1),Ty=(0,jk.default)("socket.io-parser"),Bk=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Uk=5,U;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(U||(U={}));var Oy=class{constructor(e){this.replacer=e}encode(e){return Ty("encoding packet %j",e),(e.type===U.EVENT||e.type===U.ACK)&&Ga(e)?this.encodeAsBinary({type:e.type===U.EVENT?U.BINARY_EVENT:U.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===U.BINARY_EVENT||e.type===U.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),Ty("encoded %j as %s",e,r),r}encodeAsBinary(e){let r=Ik(e),o=this.encodeAsString(r.packet),n=r.buffers;return n.unshift(o),n}},Ry=class t extends lt{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);let o=r.type===U.BINARY_EVENT;o||r.type===U.BINARY_ACK?(r.type=o?U.EVENT:U.ACK,this.reconstructor=new Py(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Ya(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0,o={type:Number(e.charAt(0))};if(U[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===U.BINARY_EVENT||o.type===U.BINARY_ACK){let s=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);let i=e.substring(s,r);if(i!=Number(i)||e.charAt(r)!=="-")throw new Error("Illegal attachments");let a=Number(i);if(!Vk(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");o.attachments=a}if(e.charAt(r+1)==="/"){let s=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););o.nsp=e.substring(s,r)}else o.nsp="/";let n=e.charAt(r+1);if(n!==""&&Number(n)==n){let s=r+1;for(;++r;){let i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}o.id=Number(e.substring(s,r+1))}if(e.charAt(++r)){let s=this.tryParse(e.substr(r));if(t.isPayloadValid(o.type,s))o.data=s;else throw new Error("invalid payload")}return Ty("decoded %s as %j",e,o),o}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case U.CONNECT:return nu(r);case U.DISCONNECT:return r===void 0;case U.CONNECT_ERROR:return typeof r=="string"||nu(r);case U.EVENT:case U.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Bk.indexOf(r[0])===-1);case U.ACK:case U.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Py=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=Dk(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function IR(t){return typeof t=="string"}var Vk=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function DR(t){return t===void 0||Vk(t)}function nu(t){return Object.prototype.toString.call(t)==="[object Object]"}function $R(t,e){switch(t){case U.CONNECT:return e===void 0||nu(e);case U.DISCONNECT:return e===void 0;case U.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&Bk.indexOf(e[0])===-1);case U.ACK:return Array.isArray(e);case U.CONNECT_ERROR:return typeof e=="string"||nu(e);default:return!1}}function LR(t){return IR(t.nsp)&&DR(t.id)&&$R(t.type,t.data)}function se(t,e,r){return t.on(e,r),function(){t.off(e,r)}}var MR=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Jn=class extends lt{constructor(e,r,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[se(e,"open",this.onopen.bind(this)),se(e,"packet",this.onpacket.bind(this)),se(e,"error",this.onerror.bind(this)),se(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var o,n,s;if(MR.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;let i={type:U.EVENT,data:r};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){let f=this.ids++,u=r.pop();this._registerAckCallback(f,u),i.id=f}let a=(n=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||n===void 0?void 0:n.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,r){var o;let n=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(n===void 0){this.acks[e]=r;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);r.call(this,new Error("operation has timed out"))},n),i=(...a)=>{this.io.clearTimeoutFn(s),r.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((o,n)=>{let s=(i,a)=>i?n(i):o(a);s.withError=!0,r.push(s),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());let o={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((n,...s)=>(this._queue[0],n!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(n)):(this._queue.shift(),r&&r(null,...s)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:U.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(o=>String(o.id)===e)){let o=this.acks[e];delete this.acks[e],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case U.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case U.EVENT:case U.BINARY_EVENT:this.onevent(e);break;case U.ACK:case U.BINARY_ACK:this.onack(e);break;case U.DISCONNECT:this.ondisconnect();break;case U.CONNECT_ERROR:this.destroy();let o=new Error(e.data.message);o.data=e.data.data,this.emitReserved("connect_error",o);break}}onevent(e){let r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let r=this._anyListeners.slice();for(let o of r)o.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let r=this,o=!1;return function(...n){o||(o=!0,r.packet({type:U.ACK,id:e,data:n}))}}onack(e){let r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:U.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let r=this._anyListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let r=this._anyOutgoingListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let r=this._anyOutgoingListeners.slice();for(let o of r)o.apply(this,e.data)}}};function Eo(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}Eo.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};Eo.prototype.reset=function(){this.attempts=0};Eo.prototype.setMin=function(t){this.ms=t};Eo.prototype.setMax=function(t){this.max=t};Eo.prototype.setJitter=function(t){this.jitter=t};var Zn=class extends lt{constructor(e,r){var o;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,lr(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((o=r.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new Eo({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;let n=r.parser||Iy;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Kn(this.uri,this.opts);let r=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;let n=se(r,"open",function(){o.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=se(r,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{n(),s(new Error("timeout")),r.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(n),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(se(e,"ping",this.onping.bind(this)),se(e,"data",this.ondata.bind(this)),se(e,"error",this.onerror.bind(this)),se(e,"close",this.onclose.bind(this)),se(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){cr(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let o=this.nsps[e];return o?this._autoConnect&&!o.active&&o.connect():(o=new Jn(this,e,r),this.nsps[e]=o),o}_destroy(e){let r=Object.keys(this.nsps);for(let o of r)if(this.nsps[o].active)return;this._close()}_packet(e){let r=this.encoder.encode(e);for(let o=0;o<r.length;o++)this.engine.write(r[o],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let r=this.backoff.duration();this._reconnecting=!0;let o=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(n=>{n?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",n)):e.onreconnect()}))},r);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var Xa={};function Qn(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let r=Rk(t,e.path||"/socket.io"),o=r.source,n=r.id,s=r.path,i=Xa[n]&&s in Xa[n].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new Zn(o,e):(Xa[n]||(Xa[n]=new Zn(o,e)),c=Xa[n]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(Qn,{Manager:Zn,Socket:Jn,io:Qn,connect:Qn});R();var Hk=new Set(["__proto__","constructor","prototype"]),zk=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Hk.has(t[e]))return!1;return!0},FR=(t,e)=>{!t||!zk(e)||e.reduce((r,o,n,s)=>{if(r&&o in r){if(n!==s.length-1)return r[o];delete r[o]}},t)},NR=(t,e,r,o=!1)=>{!t||!zk(e)||e.reduce((n,s,i,a)=>{if(n){if(i!==a.length-1)return!n[s]&&o&&(n[s]={}),n[s];n[s]=r}},t)},Dy=(t,e)=>{let r=new Set;if(!Array.isArray(e))return r;for(let[o,n,s]of e)if(!(!Array.isArray(n)||!n.length))switch(r.add(n[0]),o){case"delete":FR(t,n);break;case"update":case"set":NR(t,n,s,!0);break;default:break}return r},Wk=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},qk=(t,e)=>{for(let r in e){if(Hk.has(r))continue;let o=e[r],n=t[r];if(o&&typeof o=="object"&&!Array.isArray(o)){if(!n||typeof n!="object"||Array.isArray(n)){r in t||(t[r]=JSON.parse(JSON.stringify(o)));continue}qk(n,o)}else r in t||(t[r]=o)}},$y=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let n={designSystem:t.__rawDesignSystem};Dy(n,e)}let r=JSON.parse(JSON.stringify(t.__rawDesignSystem)),o=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];for(let n of o){let s=n&&n.designSystem;s&&typeof s=="object"&&qk(r,s)}return r};R();var Kk=(t,e,r)=>{let o=!1;return(n={})=>{let{data:s}=n,{schema:i}=n;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(r[a]&&typeof r[a]=="object")if(a==="designSystem"){if(Wk(r,c),o){let l=$y(r);l&&ir(l)}}else Xr(r[a],c);else r[a]=c}),o=!0,i&&(r.schema=i))}},Gk=(t,e,r)=>(o={})=>{let{changes:n}=o;if(!n||!Array.isArray(n)||!n.length)return;n=t.call("deepDestringifyFunctions",n,Array.isArray(n)?[]:{});let s=n.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?n.filter(c=>!s.includes(c)):n,a=Dy(r,i);if(s.length&&a.add("designSystem"),a.has("state")&&e.update(r.state),["pages","components","snippets","functions","assets"].some(c=>a.has(c))){let{pathname:c,search:l,hash:f}=r.window.location;t.call("router",c+l+f,t.__ref.root,{},{scrollToTop:!1})}if(a.has("designSystem")){let c=$y(r,s);ir(c||r.designSystem)}};var jR={success:"green",error:"red",warning:"yellow"},Yk=(t,e,r)=>{if(t.symbols){if(!r.connected){r.notifications.connected={title:"Connected",message:"to the Symbols live server"},r.update({connected:!0});let o=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(o)},3e3)}}else if(r.connected){r.notifications.connected={title:"Disconnected",type:"error"},r.update({connected:!1});let o=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(o)},3e3)}},Xk={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:jR[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,r,o)=>{r.update({animation:"fadeInUp"})},onClick:(e,r,o)=>{delete o.notifications[r.key],r.update({animation:"fadeOutDown"}),o.onClose&&o.onClose(e,r,o)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var BR=!1,UR=()=>BR?"http://localhost:8080":"https://api.symbols.app",VR=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}},HR=async t=>{try{let e=t||UR(),r=await v.fetch(`${e}/service-token`,{method:"GET"}),o;try{let n=await r.clone().json();if(n&&typeof n.token=="string")return n.token.trim();o=await r.text()}catch{o=await r.text()}return(o||"").replace(/\s+/gu,"")||void 0}catch(e){console.error("[sync] Failed to fetch service-token",e)}},Qk=(t,e,r,o)=>{t.on("snapshot",Kk(e,r,o)),t.on("ops",Gk(e,r,o)),t.on("clients",n=>{o.editor?.verbose&&Yk(n,e,r)}),t.on("disconnect",n=>{o.editor?.verbose&&console.info("[sync] disconnected",n)})},zR=async(t,e,r,o)=>{let n=await HR(o);if(!n)return console.warn("[sync] no service token \u2014 collab disabled"),null;let s=r.key;if(!s)return console.warn("[sync] ctx.key missing \u2014 collab cannot authenticate"),null;let i=r.editor?.projectId||null,a=Qn(o,{path:"/collab-socket",transports:["websocket"],auth:{token:n,projectId:i,projectKey:s,branch:"main",live:!0,clientType:"platform"},reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return a.on("connect",()=>{r.editor?.verbose&&console.info("[sync] connected (collab)")}),Qk(a,t,e,r),a},WR=(t,e,r)=>{let o=Qn({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return o.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),Qk(o,t,e,r),o.on("reload",()=>{typeof v<"u"&&v.location&&v.location.reload()}),o},qR=async(t,e,r)=>{let{mode:o,baseUrl:n}=VR(r);return o?o==="collab"?zR(t,e,r,n):o==="runner"?WR(t,e,r):null:null},KR={onInit:qR};var tv=t=>typeof t>"u",Jk=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),Zk=t=>t?.editor?.runtime==="runner",ev=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},rv={name:"sync",beforeCreate(t,e){let r=e&&e.editor;(r&&!tv(r.liveSync)?r.liveSync:Jk(e)||Zk(e))&&(Jk(e)&&!Zk(e)&&!e?.key||ev(t,KR))}},ov={name:"notifications",beforeCreate(t,e){if(!e)return;let r=tv(e.notifications)?null:e.notifications,o=e.editor&&e.editor.verbose===!0;(r===!0||r!==!1&&o)&&ev(t,Xk)}};function X(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function ts(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 nv(){return X(this)}var GR=(t,e)=>{let r=t&&t["ModalLayer_"+e],o=r?.node||r?.__ref?.node;!o||typeof o.style?.setProperty!="function"||(o.style.setProperty("display","none","important"),o.style.setProperty("opacity","0","important"),o.style.setProperty("visibility","hidden","important"),o.style.setProperty("pointer-events","none","important"))},sv=(t,e)=>{let r=t&&t["ModalLayer_"+e],o=r?.node||r?.__ref?.node;!o||typeof o.style?.removeProperty!="function"||(o.style.removeProperty("display"),o.style.removeProperty("opacity"),o.style.removeProperty("visibility"),o.style.removeProperty("pointer-events"))};function iv(t){let e=ts(this);if(!e)return;let r=e.state?.stack||[];if(!r.length)return;let o,n,s;if(t){if(s=[],o=r.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),o.length===r.length)return;n=r.filter(i=>i.id===t)}else o=r.slice(0,-1),n=r.slice(-1),s=[r.length-1];e.state.update({stack:o});for(let i of s)GR(e,i);for(let i of n)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function av(t={}){let e=ts(this);if(!e)return console.warn("[windows] openModal: ModalRoot is not mounted on the app root. Add `ModalRoot: {}` to your shell tree and import windowsComponents into context."),null;e.__modalIdCounter=(e.__modalIdCounter||0)+1;let r=t.id||`modal_${e.__modalIdCounter}_${Date.now().toString(36)}`,o={id:r,template:t.template||"custom",title:t.title,message:t.message,icon:t.icon,confirmText:t.confirmText,cancelText:t.cancelText,okText:t.okText,confirmTheme:t.confirmTheme,placeholder:t.placeholder,defaultValue:t.defaultValue,dismissOnBackdrop:t.dismissOnBackdrop,content:t.content,width:t.width,maxWidth:t.maxWidth,maxHeight:t.maxHeight,onConfirm:t.onConfirm,onCancel:t.onCancel,onOk:t.onOk,onClose:t.onClose},n=e.state?.stack||[];if(n.length>=5)return console.warn("[windows] openModal: stack already at the 5-layer maximum, dropping the new layer. Close some modals first."),null;let s=n.length;return sv(e,s),e.state.update({stack:[...n,o]}),r}function cv(){let t=ts(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function lv(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function fv(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function uv(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var Hr={openModal:av,closeModal:iv,closeAllModals:cv,confirmDialog:lv,alertDialog:fv,promptDialog:uv,getLayer:nv};var YR=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),dv=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(YR),r=[];for(let o=0;o<e.length;o++){let n=e[o];(n.offsetParent!==null||n===document.activeElement)&&r.push(n)}return r},pv=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},hv={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 Hr)a in r.functions||(r.functions[a]=Hr[a])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let o=()=>{let a=t.state?.stack||[];if(!a.length)return;let c=a.length-1,l=a[c];t.state.update({stack:a.slice(0,-1)});let f=t["ModalLayer_"+c],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},n=a=>{let c=t.state?.stack;if(c?.length){if(a.key==="Tab"){let l=pv(t);if(!l)return;let f=dv(l);if(!f.length){a.preventDefault();let g=l.querySelector?.('[role="dialog"]')||l;try{g.focus?.()}catch{}return}let u=f[0],d=f[f.length-1],h=document.activeElement;if(!l.contains(h)){a.preventDefault();try{u.focus()}catch{}return}if(a.shiftKey&&h===u){a.preventDefault();try{d.focus()}catch{}}else if(!a.shiftKey&&h===d){a.preventDefault();try{u.focus()}catch{}}return}a.key==="Escape"&&c[c.length-1]?.dismissOnBackdrop!==!1&&(a.preventDefault(),o())}};window.addEventListener("keydown",n),t.__escHandler=n;let s=a=>{let c=t.state?.stack||[];if(a<0||a>=c.length)return;let l=c[a];t.state.update({stack:c.filter((d,h)=>h!==a)});let f=t["ModalLayer_"+a],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},i=a=>{let c=t.state?.stack||[];if(!c.length)return;let l=a.target?.closest?.('[data-key="Close"]');if(l){for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f],d=u?.node||u?.__ref?.node;if(d&&d.contains(l)){a.preventDefault(),a.stopPropagation(),s(f);return}}return}for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f];if((u?.node||u?.__ref?.node)===a.target){if(c[f]?.dismissOnBackdrop===!1)return;a.preventDefault(),a.stopPropagation(),s(f);return}}};document.addEventListener("click",i,!0),t.__clickDelegate=i},onUpdate:t=>{if(typeof window>"u")return;let e=(t.state&&t.state.stack||[]).length,r=t.__prevStackLen||0;if(e!==r)if(t.__prevStackLen=e,t.__modalOpeners=t.__modalOpeners||[],e>r)t.__modalOpeners[e]=document.activeElement&&document.activeElement!==document.body?document.activeElement:t.__modalOpeners[e]||null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{let o=pv(t);if(!o)return;let n=dv(o)[0]||o.querySelector&&o.querySelector('[role="dialog"]')||o;try{n.focus&&n.focus()}catch{}});else{let o=null;for(let n=r;n>e;n--)t.__modalOpeners[n]&&(o=o||t.__modalOpeners[n]),t.__modalOpeners[n]=null;if(o&&typeof o.focus=="function"&&o.isConnected!==!1)try{o.focus()}catch{}}},onDestroy:t=>{typeof window>"u"||(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__===t&&(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=null),t.__escHandler&&(window.removeEventListener("keydown",t.__escHandler),delete t.__escHandler),t.__clickDelegate&&(document.removeEventListener("click",t.__clickDelegate,!0),delete t.__clickDelegate))}};var gv={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",background:"black.45",backdropFilter:"blur(4px)",transitionProperty:"opacity",transitionDuration:"200ms",transitionTimingFunction:"ease",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=X(t)?.id;return e?"modal-title-"+e:null}},width:t=>X(t)?.width||"H",maxWidth:t=>X(t)?.maxWidth||"90vw",maxHeight:t=>X(t)?.maxHeight||null,onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>X(t)?.template!=="confirm"},AlertTemplate:{hide:t=>X(t)?.template!=="alert"},PromptTemplate:{hide:t=>X(t)?.template!=="prompt"},CustomTemplate:{hide:t=>X(t)?.template!=="custom"}}};var es=(t,e,r)=>X(t)?.[e]||r,XR=t=>{let e=X(t)?.icon;return e===null||e===!1},mv={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>es(t,"title","Are you sure?"),attr:{id:t=>{let e=X(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>es(t,"message","This action cannot be undone."),color:"dim"}},Icons:{hide:t=>XR(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>es(t,"icon","warning")}}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>es(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=X(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] confirm.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:t=>es(t,"confirmTheme","primary"),text:t=>es(t,"confirmText","Confirm"),onClick:(t,e,r)=>{let o=X(e);if(o?.onConfirm)try{o.onConfirm()}catch(n){console.warn("[windows] confirm.onConfirm threw:",n)}e.call("closeModal",o?.id)}}}};var su=(t,e,r)=>X(t)?.[e]||r,yv={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>su(t,"title","Notice"),attr:{id:t=>{let e=X(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>su(t,"message",""),color:"dim"}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>su(t,"icon","info")}}},ModalFooter:{flow:"x",align:"center end",OkBtn:{extends:"Button",theme:"primary",text:t=>su(t,"okText","OK"),onClick:(t,e,r)=>{let o=X(e);if(o?.onOk)try{o.onOk()}catch(n){console.warn("[windows] alert.onOk threw:",n)}e.call("closeModal",o?.id)}}}};var Ja=(t,e,r)=>X(t)?.[e]||r,bv={tag:"div",flow:"y",gap:"B",scope:{value:""},onRender:(t,e)=>{let r=X(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},onUpdate:(t,e)=>{let r=X(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>Ja(t,"title","Enter a value"),attr:{id:t=>{let e=X(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>Ja(t,"message",""),color:"dim"}}},InputRow:{extends:"Input",autofocus:!0,placeholder:t=>Ja(t,"placeholder",""),value:(t,e)=>t.parent.scope?.value||"",onInput:(t,e,r)=>{e.parent.scope.value=t.target.value},onKeydown:(t,e,r)=>{if(t.key!=="Enter")return;t.preventDefault();let o=X(e),n=e.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>Ja(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=X(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] prompt.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>Ja(t,"confirmText","OK"),onClick:(t,e,r)=>{let o=X(e),n=e.parent.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}}}};var _v={tag:"div",flow:"y",gap:"B",Title:{tag:"h2",text:t=>X(t)?.title||"",hide:t=>!X(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=X(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",onInit:t=>{let e=Q(()=>{let r=X(t),o=r?.content||null,n=r?.id||null;if(!o){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in Hr)i in s.functions||(s.functions[i]=Hr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var xv={ModalRoot:hv,ModalLayer:gv,ConfirmTemplate:mv,AlertTemplate:yv,PromptTemplate:bv,CustomTemplate:_v};var wv=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),JR=(t,e,r,o)=>{let n=wv(t,r,o),s=i=>n[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":n.bottom>=n.top?"bottom":"top"},ZR=(t,e,r,o,n)=>{let s=wv(e,o,n),i=t==="top"||t==="bottom"?r.height+8:r.width+8;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i?a:t},iu=(t,e,r)=>Math.max(e,Math.min(r,t)),rs=(t,e,r="auto")=>{if(!t)return{left:0,top:0,side:"bottom",align:"start"};let o=typeof window<"u"?window.innerWidth:1024,n=typeof window<"u"?window.innerHeight:768,s={width:Math.max(120,e?.width||0),height:Math.max(40,e?.height||0)};if(r==="center"){let d=iu((o-s.width)/2,8,Math.max(8,o-s.width-8)),h=iu((n-s.height)/2,8,Math.max(8,n-s.height-8));return{left:d,top:h,side:"center",align:"center"}}let i,a;if(r==="auto")i=JR(t,s,o,n),a="start";else{let d=r.split("-");i=d[0],a=d[1]||"start",i=ZR(i,t,s,o,n)}let c,l;i==="bottom"||i==="top"?(a==="start"?c=t.left:a==="end"?c=t.right-s.width:c=t.left+(t.width-s.width)/2,l=i==="bottom"?t.bottom+8:t.top-s.height-8):(a==="start"?l=t.top:a==="end"?l=t.bottom-s.height:l=t.top+(t.height-s.height)/2,c=i==="right"?t.right+8:t.left-s.width-8);let f=Math.max(8,o-s.width-8),u=Math.max(8,n-s.height-8);return c=iu(c,8,f),l=iu(l,8,u),{left:c,top:l,side:i,align:a}},au=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 Ao={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:"70vh",theme:"modal"},QR=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}},Ly=t=>t?.getRoot?.()?.DropdownRoot||null,tP=0,eP=()=>`dropdown_${++tP}_${Date.now().toString(36)}`;function Sv(t={}){let e=Ly(this);if(!e)return console.warn("[dropdown] openDropdown: DropdownRoot is not mounted on the app root. Add `DropdownRoot: {}` to your shell tree and import dropdown components into context."),null;let r=t.anchorEl?.node||t.anchorEl,o=t.anchorRect||QR(r);if(!o)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let n=t.id||eP(),s=t.triggerEl?.node||t.triggerEl||r||(typeof document<"u"?document.activeElement:null),i={id:n,content:t.content||null,anchor:o,placement:t.placement||Ao.placement,trigger:t.trigger||Ao.trigger,offset:t.offset??Ao.offset,minWidth:t.minWidth||Ao.minWidth,maxWidth:t.maxWidth||Ao.maxWidth,maxHeight:t.maxHeight||Ao.maxHeight,theme:t.theme||Ao.theme,background:t.background||null,round:t.round||null,onOpen:t.onOpen,onClose:t.onClose,triggerEl:s},a=e.state?.layer;if(a?.onClose)try{a.onClose(a)}catch(c){console.warn("[dropdown] prev onClose threw:",c)}if(e.state.update({layer:i}),typeof i.onOpen=="function")try{i.onOpen(i)}catch(c){console.warn("[dropdown] onOpen threw:",c)}return n}function kv(t){let e=Ly(this);if(!e)return;let r=e.state?.layer;r&&e.state.update({layer:{...r,inert:!!t}})}function Za(t){let e=Ly(this);if(!e)return;let r=e.state?.layer;if(!r)return;let o=typeof t=="string"?t:t?.id;if(o&&r.id&&o!==r.id)return;let n=r.onClose;e.state.update({layer:null});let s=r.triggerEl;if(s&&typeof s.focus=="function")try{s.focus()}catch(i){console.warn("[dropdown] focus restore threw:",i)}if(typeof n=="function")try{n(r)}catch(i){console.warn("[dropdown] onClose threw:",i)}}var rP=`
|
|
102
|
+
\`\`\``}n.push({role:"user",content:s})}return n}var Ck=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,cR=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function lR(t){let e=[];for(let r of t.matchAll(Ck))e.push({lang:(r.groups?.lang||"").toLowerCase(),code:r.groups?.code??""});return e}function fR(t){return t.replace(Ck,"").trim()}function Wy(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 vk(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&cR.has(t.type)}function Ek(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let r=lR(e),o=r.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),n=r.filter(i=>i.lang==="json"),s=fR(e);for(let i of n){let a=Wy(i.code);if(vk(a))return{kind:"asset",text:s||a.description||"",asset:a,message:a.description||s||`Generated ${a.type}: ${a.title||a.key||""}`.trim()}}if(o.length>0){let i=o[0].code,a=Wy("["+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=Wy(e);if(vk(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 Ak(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 Tk=["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(" "),Ok=["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(`
|
|
103
|
+
`),qy={Starter:zr,Free:zr,Pro:"claude-opus-4-6"};function Rk(t){return t?qy[t]||t:zr}var Pk={"@symbo.ls/signal":sd,"@symbo.ls/scratch":Sg,"@symbo.ls/element":xm,"@symbo.ls/css":Rg,"@symbo.ls/utils":yl,"@symbo.ls/state":am,"@symbo.ls/router":Aa,"@symbo.ls/polyglot":by,"@symbo.ls/helmet":my,"@symbo.ls/fetch":no,"@symbo.ls/capsize":xy,"@symbo.ls/shorthand":Ay,"@symbo.ls/analyze":jy,"@symbo.ls/inspect":Vy,"@symbo.ls/channels":zy,"@symbo-ls/simone-server":Ky},Ik=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:{}),o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in Pk)o[n]||(o[n]=Pk[n]);if(e)for(let n in e)o[n]||(o[n]=e[n]);return o},Dk=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:null);if(!r||!e||typeof e!="object")return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in e){let s=e[n];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(o,n))continue;let i=a=>(Object.defineProperty(o,n,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(o,n,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return o},$k=["@symbo.ls/sdk"],Lk=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!t||typeof t!="object")return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in t){let s=t[n];!s||typeof s!="object"&&typeof s!="function"||o[n]||(o[n]=s)}return o},Mk=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!Array.isArray(t))return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n of t){let s=n&&n.library?n.library:n;if(!s||typeof s!="object"||s.__isStub)continue;let i=s.key||s.name||s.__libraryKey;if(typeof i!="string"||!i)continue;let a=i.includes("/")?i.slice(i.indexOf("/")+1):i;for(let c of[`@symbo-ls/${a}`,`@symbo.ls/${a}`])o[c]||(o[c]=s)}return o};R();var jk=t=>{let e=typeof window<"u"?window:globalThis||{};e.document||(e.document={body:{}});let r=typeof document<"u"?document:e.document;t.document=t.document||r;let o=t.window;return o&&o!==e&&typeof o.URL!="function"?(typeof console<"u"&&console.warn&&!globalThis.__smblsRouterUrlWarned&&(globalThis.__smblsRouterUrlWarned=!0,console.warn("[smbls/router] context.window lacks URL, falling back to globalThis \u2014 passed-in window may be a stub (warned once; applies to every embed app this session)")),t.window=e):t.window=o||e,t.window},Fk=(t="smbls")=>{let e={};for(let r in wo)Object.prototype.hasOwnProperty.call(wo,r)&&(je(r)?e[`smbls.${r}`]=wo[r]:e[r]=wo[r]);return e},Bk=t=>t.components?{...Fk(),...t.components}:Fk(),Uk=t=>({...Oa,...Aa,...Ar,...t.utils,...t.snippets,...t.functions}),Vk=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var uR=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,dR=3e3,pR=(t,e,r=o=>import(o))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let o=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(o[t])return Promise.resolve(o[t]);let n=Promise.resolve().then(()=>r(e)).then(i=>(i&&!o[t]&&(o[t]=i),o[t]||null)).catch(()=>null);return new Promise(i=>{let a=setTimeout(()=>i(null),dR);n.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},Nk={},Hk=async({dependencies:t,dependenciesOnDemand:e,document:r,preventCaching:o=!1,cdnProvider:n,packageManager:s,symbolsConfig:i,registerDependency:a=pR})=>{if(n||(n=vr[s]||tn(i)||"esmsh"),!t)return null;let c=!1;for(let d in t){c=!0;break}if(!c)return null;let l=_r()&&o?`?${Math.random()}`:"",f=async(d,h)=>{let g=Ce(d,h,n)+l;try{await Promise.race([rn(g,{document:r,type:"module"}),new Promise((p,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,g)}catch(p){if(console.error(`Failed to load ${d} from ${n}:`,p),n!=="symbols")try{let m=Ce(d,h,"symbols")+l;await Promise.race([rn(m,{document:r,type:"module"}),new Promise((b,_)=>setTimeout(()=>_(new Error(`Timeout fallback ${d}`)),2e4))]),console.log(`Successfully loaded ${d} from fallback (symbols.ls)`),await a(d,m)}catch(m){console.error(`Failed to load ${d} from fallback:`,m)}}},u=[];for(let d in t){let h=t[d];if(!(e&&e[d])&&!Nk[d]&&(Nk[d]=!0,!io(d))){if(en(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}uR(d)||u.push(f(d,h))}}return u.length&&await Promise.allSettled(u),t},zk=async(t,e)=>{let r=e.window||window,o=e.cdnProvider||tn(e.symbolsConfig)||"esmsh",n=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=o)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&io(a))return await u.require(a,c);if(!u.packages[a]){let d=_r()?`?${Math.random()}`:"";if(l&&l[a]){let h=l[a],g=Ce(a,h,c)+d;try{await i.utils.loadRemoteScript(g,{window:u,document:f})}catch(p){if(console.error(`Failed to load ${a} from ${c}:`,p),c!=="symbols"){let m=Ce(a,h,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let h=Ce(a,"latest",c)+d;try{await i.utils.loadRemoteScript(h,{window:u,document:f})}catch(g){if(console.error(`Failed to load ${a} from ${c}:`,g),c!=="symbols"){let p=Ce(a,"latest","symbols")+d;await i.utils.loadRemoteScript(p,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};r.packages?r.packages=gt(r.packages,t):r.packages=t,r.require||(e.utils.require=await n(e),r.require=e.utils.require),r.requireOnDemand||(e.utils.requireOnDemand=await s(e),r.requireOnDemand=e.utils.requireOnDemand)},hR=/\s+/g,Wk=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,gR=(t,e)=>{let r="";for(let o in t){let n=t[o];typeof n=="boolean"&&n?r+=` ${o}`:typeof n=="string"?r+=` ${n}`:typeof n=="function"&&(r+=` ${Wk(n,e)}`)}return r},mR=(t,e,r)=>{if(!t)return;let{key:o}=e;t===!0&&(t=e.classlist={key:o}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=gR(t,e));let n=t.replace(hR," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",n);else if(r)try{r.className=n}catch{}return n},yR=()=>(t,e,r)=>{let o=Wk(t,e);if(t){let{__ref:n}=e;n.__class.style=o}qk()(e.classlist,e,e.state,!0)},qk=()=>(t,e,r,o)=>{if(e.style&&!o)return;let{__ref:n}=e,{__class:s,__classNames:i}=n;if(!(t===null||typeof t!="object"||Array.isArray(t))){e.class&&(i.classProps=e.class),e.attr?.class&&(i.class=e.attr.class);for(let a in s){let c=s[a];if(!c){delete i[a];continue}let l;typeof c=="string"||typeof c=="number"?l=c:typeof c=="boolean"?l=e.key:l=be(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&mR(i,e,e.node)}},bR=()=>({style:yR(),classlist:qk()}),_R=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],Gy=new WeakSet,Yy=!1,xR=t=>!!t&&typeof t=="object",Kk=(t,e)=>{let r=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,o=e.initOptions||{},n=e.registry||bR(),s=e.designSystem?st(dt(e.designSystem),Ca):dt(Ca),i={};for(let p of _R)e[p]!==void 0&&(i[p]=e[p]);let a,c=xR(r),f=c&&Gy.has(r)&&!e.skipDesignSystemInit,u=!f&&!Yy,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=C(t)||C(),a&&(a.__domDocument=r),a?.CSS_VARS){it(a);try{kt({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&kt(Vn(a.CSS_MEDIA_VARS,d))}finally{tt()}}}else if(u){let p=C();p&&(p.__domDocument=r),a=cr(s,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...$f,...i,...o}),a&&a!==p&&(a.__domDocument=r),c&&Gy.add(r),Yy=!0}else{let p=ji(t,s,{cleanBase:!0});for(let m in i)p[m]=i[m];if(p.__domDocument=r,f){let m=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=m,p.varPrefix=m}it(p);try{a=cr(p,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...$f,...i,...o})}finally{tt()}c&&Gy.add(r),Yy=!0}let h=a?.CONFIG||a,g=h?.font;if(g){it(h);try{for(let p in g){let m=g[p];if(!m?.fontFace)continue;let b=Array.isArray(m.fontFace)?m.fontFace:[m.fontFace];for(let _ of b)typeof _=="string"&&_.includes("font-family")&&kt(`@font-face { ${_} }`)}}finally{tt()}}return[a,n]},Gk=(t,e)=>{let r={};e.state&&st(r,e.state),t&&t.state&&st(r,t.state);let o=e.polyglot;if(o?.translations){let n=null;try{typeof localStorage<"u"&&(n=localStorage.getItem(o.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=n||r.lang||o.defaultLang||"en";n&&n!==r.lang&&(r.lang=n);let i=o.translations[s];if(i&&typeof i=="object")for(let c in i)r[c]=i[c];let a=new Set(o.languages||[]);for(let c in o.translations)!a.has(c)&&r[c]===void 0&&(r[c]=o.translations[c])}return r.isRootState=!0,dt(r)},Yk=(t,e)=>{S(t.routes)&&S(e.pages)&>(t.routes,e.pages);let r=t.routes||e.pages||{};for(let o in r){if(o.charCodeAt(0)===47)continue;let n=o==="index"?"":o;r["/"+n]=r[o],delete r[o]}return r},Xk=t=>{Ei(t,t.sharedLibraries)};var Ya={polyglot:La,getLocalStateLang:ja,getActiveLang:qn,getLang:qn,setLang:Fa,getLanguages:$a,loadTranslations:Ma,upsertTranslation:Na};Sr();var De=Object.create(null);De.open="0";De.close="1";De.ping="2";De.pong="3";De.message="4";De.upgrade="5";De.noop="6";var Xa=Object.create(null);Object.keys(De).forEach(t=>{Xa[De[t]]=t});var Ja={type:"error",data:"parser error"};var Qk=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",tv=typeof ArrayBuffer=="function",ev=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Za=({type:t,data:e},r,o)=>Qk&&e instanceof Blob?r?o(e):Jk(e,o):tv&&(e instanceof ArrayBuffer||ev(e))?r?o(e):Jk(new Blob([e]),o):o(De[t]+(e||"")),Jk=(t,e)=>{let r=new FileReader;return r.onload=function(){let o=r.result.split(",")[1];e("b"+(o||""))},r.readAsDataURL(t)};function Zk(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var Xy;function rv(t,e){if(Qk&&t.data instanceof Blob)return t.data.arrayBuffer().then(Zk).then(e);if(tv&&(t.data instanceof ArrayBuffer||ev(t.data)))return e(Zk(t.data));Za(t,!1,r=>{Xy||(Xy=new TextEncoder),e(Xy.encode(r))})}var ov="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qa=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<ov.length;t++)Qa[ov.charCodeAt(t)]=t;var nv=t=>{let e=t.length*.75,r=t.length,o,n=0,s,i,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let l=new ArrayBuffer(e),f=new Uint8Array(l);for(o=0;o<r;o+=4)s=Qa[t.charCodeAt(o)],i=Qa[t.charCodeAt(o+1)],a=Qa[t.charCodeAt(o+2)],c=Qa[t.charCodeAt(o+3)],f[n++]=s<<2|i>>4,f[n++]=(i&15)<<4|a>>2,f[n++]=(a&3)<<6|c&63;return l};var wR=typeof ArrayBuffer=="function",tc=(t,e)=>{if(typeof t!="string")return{type:"message",data:sv(t,e)};let r=t.charAt(0);return r==="b"?{type:"message",data:SR(t.substring(1),e)}:Xa[r]?t.length>1?{type:Xa[r],data:t.substring(1)}:{type:Xa[r]}:Ja},SR=(t,e)=>{if(wR){let r=nv(t);return sv(r,e)}else return{base64:!0,data:t}},sv=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var iv="",av=(t,e)=>{let r=t.length,o=new Array(r),n=0;t.forEach((s,i)=>{Za(s,!1,a=>{o[i]=a,++n===r&&e(o.join(iv))})})},cv=(t,e)=>{let r=t.split(iv),o=[];for(let n=0;n<r.length;n++){let s=tc(r[n],e);if(o.push(s),s.type==="error")break}return o};function lv(){return new TransformStream({transform(t,e){rv(t,r=>{let o=r.length,n;if(o<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,o);else if(o<65536){n=new Uint8Array(3);let s=new DataView(n.buffer);s.setUint8(0,126),s.setUint16(1,o)}else{n=new Uint8Array(9);let s=new DataView(n.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(o))}t.data&&typeof t.data!="string"&&(n[0]|=128),e.enqueue(n),e.enqueue(r)})}})}var Jy;function su(t){return t.reduce((e,r)=>e+r.length,0)}function iu(t,e){if(t[0].length===e)return t.shift();let r=new Uint8Array(e),o=0;for(let n=0;n<e;n++)r[n]=t[0][o++],o===t[0].length&&(t.shift(),o=0);return t.length&&o<t[0].length&&(t[0]=t[0].slice(o)),r}function fv(t,e){Jy||(Jy=new TextDecoder);let r=[],o=0,n=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(o===0){if(su(r)<1)break;let c=iu(r,1);s=(c[0]&128)===128,n=c[0]&127,n<126?o=3:n===126?o=1:o=2}else if(o===1){if(su(r)<2)break;let c=iu(r,2);n=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),o=3}else if(o===2){if(su(r)<8)break;let c=iu(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(Ja);break}n=f*Math.pow(2,32)+l.getUint32(4),o=3}else{if(su(r)<n)break;let c=iu(r,n);a.enqueue(tc(s?c:Jy.decode(c),e)),o=0}if(n===0||n>t){a.enqueue(Ja);break}}}})}var Zy=4;function ut(t){if(t)return kR(t)}function kR(t){for(var e in ut.prototype)t[e]=ut.prototype[e];return t}ut.prototype.on=ut.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};ut.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};ut.prototype.off=ut.prototype.removeListener=ut.prototype.removeAllListeners=ut.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,n=0;n<r.length;n++)if(o=r[n],o===e||o.fn===e){r.splice(n,1);break}return r.length===0&&delete this._callbacks["$"+t],this};ut.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(r){r=r.slice(0);for(var o=0,n=r.length;o<n;++o)r[o].apply(this,e)}return this};ut.prototype.emitReserved=ut.prototype.emit;ut.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};ut.prototype.hasListeners=function(t){return!!this.listeners(t).length};var fr=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),Bt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),uv="arraybuffer";function au(t,...e){return e.reduce((r,o)=>(t.hasOwnProperty(o)&&(r[o]=t[o]),r),{})}var vR=Bt.setTimeout,CR=Bt.clearTimeout;function ur(t,e){e.useNativeTimers?(t.setTimeoutFn=vR.bind(Bt),t.clearTimeoutFn=CR.bind(Bt)):(t.setTimeoutFn=Bt.setTimeout.bind(Bt),t.clearTimeoutFn=Bt.clearTimeout.bind(Bt))}var ER=1.33;function dv(t){return typeof t=="string"?AR(t):Math.ceil((t.byteLength||t.size)*ER)}function AR(t){let e=0,r=0;for(let o=0,n=t.length;o<n;o++)e=t.charCodeAt(o),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(o++,r+=4);return r}function cu(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function pv(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function hv(t){let e={},r=t.split("&");for(let o=0,n=r.length;o<n;o++){let s=r[o].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var lu=class extends Error{constructor(e,r,o){super(e),this.description=r,this.context=o,this.type="TransportError"}},dr=class extends ut{constructor(e){super(),this.writable=!1,ur(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,o){return super.emitReserved("error",new lu(e,r,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let r=tc(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=pv(e);return r.length?"?"+r:""}};var ec=class extends dr{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||r()})),this.writable||(o++,this.once("drain",function(){--o||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let r=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};cv(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,av(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]=cu()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}};var gv=!1;try{gv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var mv=gv;function TR(){}var Qy=class extends ec{constructor(e){if(super(e),typeof location<"u"){let r=location.protocol==="https:",o=location.port;o||(o=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||o!==e.port}}doWrite(e,r){let o=this.request({method:"POST",data:e});o.on("success",r),o.on("error",(n,s)=>{this.onError("xhr post error",n,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,o)=>{this.onError("xhr poll error",r,o)}),this.pollXhr=e}},Wr=class t extends ut{constructor(e,r,o){super(),this.createRequest=e,ur(this,o),this._opts=o,this._method=o.method||"GET",this._uri=r,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var e;let r=au(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;let o=this._xhr=this.createRequest(r);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&o.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var n;o.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=TR,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete t.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Wr.requestsCount=0;Wr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",yv);else if(typeof addEventListener=="function"){let t="onpagehide"in Bt?"pagehide":"unload";addEventListener(t,yv,!1)}}function yv(){for(let t in Wr.requests)Wr.requests.hasOwnProperty(t)&&Wr.requests[t].abort()}var OR=(function(){let t=bv({xdomain:!1});return t&&t.responseType!==null})(),qr=class extends Qy{constructor(e){super(e);let r=e&&e.forceBase64;this.supportsBinary=OR&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Wr(bv,this.uri(),e)}};function bv(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||mv))return new XMLHttpRequest}catch{}if(!e)try{return new Bt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var _v=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",eb=class extends dr{get name(){return"websocket"}doOpen(){let e=this.uri(),r=this.opts.protocols,o=_v?{}:au(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,o)}catch(n){return this.emitReserved("error",n)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){let o=e[r],n=r===e.length-1;Za(o,this.supportsBinary,s=>{try{this.doWrite(o,s)}catch{}n&&fr(()=>{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]=cu()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}},tb=Bt.WebSocket||Bt.MozWebSocket,Kr=class extends eb{createSocket(e,r,o){return _v?new tb(e,r,o):r?new tb(e,r):new tb(e)}doWrite(e,r){this.ws.send(r)}};var Zn=class extends dr{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=fv(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=e.readable.pipeThrough(r).getReader(),n=lv();n.readable.pipeTo(e.writable),this._writer=n.writable.getWriter();let s=()=>{o.read().then(({done:a,value:c})=>{a||(this.onPacket(c),s())}).catch(a=>{})};s();let i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){let o=e[r],n=r===e.length-1;this._writer.write(o).then(()=>{n&&fr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var rb={websocket:Kr,webtransport:Zn,polling:qr};var RR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,PR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Qn(t){if(t.length>8e3)throw"URI too long";let e=t,r=t.indexOf("["),o=t.indexOf("]");r!=-1&&o!=-1&&(t=t.substring(0,r)+t.substring(r,o).replace(/:/g,";")+t.substring(o,t.length));let n=RR.exec(t||""),s={},i=14;for(;i--;)s[PR[i]]=n[i]||"";return r!=-1&&o!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=IR(s,s.path),s.queryKey=DR(s,s.query),s}function IR(t,e){let r=/\/{2,9}/g,o=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&o.splice(0,1),e.slice(-1)=="/"&&o.splice(o.length-1,1),o}function DR(t,e){let r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,n,s){n&&(r[n]=s)}),r}var ob=typeof addEventListener=="function"&&typeof removeEventListener=="function",fu=[];ob&&addEventListener("offline",()=>{fu.forEach(t=>t())},!1);var Oo=class t extends ut{constructor(e,r){if(super(),this.binaryType=uv,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){let o=Qn(e);r.hostname=o.host,r.secure=o.protocol==="https"||o.protocol==="wss",r.port=o.port,o.query&&(r.query=o.query)}else r.host&&(r.hostname=Qn(r.host).host);ur(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(o=>{let n=o.prototype.name;this.transports.push(n),this._transportsByName[n]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=hv(this.opts.query)),ob&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},fu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let r=Object.assign({},this.opts.query);r.EIO=Zy,r.transport=e,this.id&&(r.sid=this.id);let o=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let o=0;o<this.writeBuffer.length;o++){let n=this.writeBuffer[o].data;if(n&&(r+=dv(n)),o>0&&r>this._maxPayload)return this.writeBuffer.slice(0,o);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,fr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,o){return this._sendPacket("message",e,r,o),this}send(e,r,o){return this._sendPacket("message",e,r,o),this}_sendPacket(e,r,o,n){if(typeof r=="function"&&(n=r,r=void 0),typeof o=="function"&&(n=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;let s={type:e,data:r,options:o};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),n&&this.once("flush",n),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},o=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():e()}):this.upgrading?o():e()),this}_onError(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ob&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let o=fu.indexOf(this._offlineEventListener);o!==-1&&fu.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}};Oo.protocol=Zy;var uu=class extends Oo{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let r=this.createTransport(e),o=!1;Oo.priorWebsocketSuccess=!1;let n=()=>{o||(r.send([{type:"ping",data:"probe"}]),r.once("packet",u=>{if(!o)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Oo.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(f(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{let d=new Error("probe error");d.transport=r.name,this.emitReserved("upgradeError",d)}}))};function s(){o||(o=!0,f(),r.close(),r=null)}let i=u=>{let d=new Error("probe error: "+u);d.transport=r.name,s(),this.emitReserved("upgradeError",d)};function a(){i("transport closed")}function c(){i("socket closed")}function l(u){r&&u.name!==r.name&&s()}let f=()=>{r.removeListener("open",n),r.removeListener("error",i),r.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};r.once("open",n),r.once("error",i),r.once("close",a),this.once("close",c),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{o||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let r=[];for(let o=0;o<e.length;o++)~this.transports.indexOf(e[o])&&r.push(e[o]);return r}},ts=class extends uu{constructor(e,r={}){let o=typeof e=="object",n=o?{...e}:{...r};(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(s=>rb[s]).filter(s=>!!s)),super(o?n:e,n)}};var TU=ts.protocol;function xv(t,e="",r){let o=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),o=Qn(t)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";let s=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+s+":"+o.port+e,o.href=o.protocol+"://"+s+(r&&r.port===o.port?"":":"+o.port),o}var lb={};P(lb,{Decoder:()=>ab,Encoder:()=>ib,PacketType:()=>B,isPacketValid:()=>tP,protocol:()=>Pv});var LR=typeof ArrayBuffer=="function",MR=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,wv=Object.prototype.toString,FR=typeof Blob=="function"||typeof Blob<"u"&&wv.call(Blob)==="[object BlobConstructor]",NR=typeof File=="function"||typeof File<"u"&&wv.call(File)==="[object FileConstructor]";function oc(t){return LR&&(t instanceof ArrayBuffer||MR(t))||FR&&t instanceof Blob||NR&&t instanceof File}function rc(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,o=t.length;r<o;r++)if(rc(t[r]))return!0;return!1}if(oc(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return rc(t.toJSON(),!0);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&rc(t[r]))return!0;return!1}function Sv(t){let e=[],r=t.data,o=t;return o.data=du(r,e),o.attachments=e.length,{packet:o,buffers:e}}function du(t,e,r){if(!t)return t;if(oc(t)){let o={_placeholder:!0,num:e.length};return e.push(t),o}else if(Array.isArray(t)){let o=new Array(t.length);for(let n=0;n<t.length;n++)o[n]=du(t[n],e);return o}else if(typeof t=="object"&&!(t instanceof Date)){if(t.toJSON&&typeof t.toJSON=="function"&&!r)return du(t.toJSON(),e,!0);let o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(o[n]=du(t[n],e));return o}return t}function kv(t,e){return t.data=nb(t.data,e),delete t.attachments,t}function nb(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]=nb(t[r],e);else if(typeof t=="object")for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=nb(t[r],e));return t}var Ov=wC(Tv(),1),sb=(0,Ov.default)("socket.io-parser"),Rv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Pv=5,B;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(B||(B={}));var ib=class{constructor(e){this.replacer=e}encode(e){return sb("encoding packet %j",e),(e.type===B.EVENT||e.type===B.ACK)&&rc(e)?this.encodeAsBinary({type:e.type===B.EVENT?B.BINARY_EVENT:B.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===B.BINARY_EVENT||e.type===B.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),sb("encoded %j as %s",e,r),r}encodeAsBinary(e){let r=Sv(e),o=this.encodeAsString(r.packet),n=r.buffers;return n.unshift(o),n}},ab=class t extends ut{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);let o=r.type===B.BINARY_EVENT;o||r.type===B.BINARY_ACK?(r.type=o?B.EVENT:B.ACK,this.reconstructor=new cb(r)):super.emitReserved("decoded",r)}else if(oc(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0,o={type:Number(e.charAt(0))};if(B[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===B.BINARY_EVENT||o.type===B.BINARY_ACK){let s=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);let i=e.substring(s,r);if(i!=Number(i)||e.charAt(r)!=="-")throw new Error("Illegal attachments");let a=Number(i);if(!Iv(a)||a<1)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");o.attachments=a}if(e.charAt(r+1)==="/"){let s=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););o.nsp=e.substring(s,r)}else o.nsp="/";let n=e.charAt(r+1);if(n!==""&&Number(n)==n){let s=r+1;for(;++r;){let i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}o.id=Number(e.substring(s,r+1))}if(e.charAt(++r)){let s=this.tryParse(e.substr(r));if(t.isPayloadValid(o.type,s))o.data=s;else throw new Error("invalid payload")}return sb("decoded %s as %j",e,o),o}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case B.CONNECT:return gu(r);case B.DISCONNECT:return r===void 0;case B.CONNECT_ERROR:return typeof r=="string"||gu(r);case B.EVENT:case B.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Rv.indexOf(r[0])===-1);case B.ACK:case B.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},cb=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let r=kv(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function JR(t){return typeof t=="string"}var Iv=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function ZR(t){return t===void 0||Iv(t)}function gu(t){return Object.prototype.toString.call(t)==="[object Object]"}function QR(t,e){switch(t){case B.CONNECT:return e===void 0||gu(e);case B.DISCONNECT:return e===void 0;case B.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&Rv.indexOf(e[0])===-1);case B.ACK:return Array.isArray(e);case B.CONNECT_ERROR:return typeof e=="string"||gu(e);default:return!1}}function tP(t){return JR(t.nsp)&&ZR(t.id)&&QR(t.type,t.data)}function ae(t,e,r){return t.on(e,r),function(){t.off(e,r)}}var eP=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),ns=class extends ut{constructor(e,r,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[ae(e,"open",this.onopen.bind(this)),ae(e,"packet",this.onpacket.bind(this)),ae(e,"error",this.onerror.bind(this)),ae(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var o,n,s;if(eP.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;let i={type:B.EVENT,data:r};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){let f=this.ids++,u=r.pop();this._registerAckCallback(f,u),i.id=f}let a=(n=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||n===void 0?void 0:n.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,r){var o;let n=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(n===void 0){this.acks[e]=r;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);r.call(this,new Error("operation has timed out"))},n),i=(...a)=>{this.io.clearTimeoutFn(s),r.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((o,n)=>{let s=(i,a)=>i?n(i):o(a);s.withError=!0,r.push(s),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());let o={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((n,...s)=>(this._queue[0],n!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(n)):(this._queue.shift(),r&&r(null,...s)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:B.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(o=>String(o.id)===e)){let o=this.acks[e];delete this.acks[e],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case B.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case B.EVENT:case B.BINARY_EVENT:this.onevent(e);break;case B.ACK:case B.BINARY_ACK:this.onack(e);break;case B.DISCONNECT:this.ondisconnect();break;case B.CONNECT_ERROR:this.destroy();let o=new Error(e.data.message);o.data=e.data.data,this.emitReserved("connect_error",o);break}}onevent(e){let r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let r=this._anyListeners.slice();for(let o of r)o.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let r=this,o=!1;return function(...n){o||(o=!0,r.packet({type:B.ACK,id:e,data:n}))}}onack(e){let r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:B.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let r=this._anyListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let r=this._anyOutgoingListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let r=this._anyOutgoingListeners.slice();for(let o of r)o.apply(this,e.data)}}};function Po(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}Po.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};Po.prototype.reset=function(){this.attempts=0};Po.prototype.setMin=function(t){this.ms=t};Po.prototype.setMax=function(t){this.max=t};Po.prototype.setJitter=function(t){this.jitter=t};var ss=class extends ut{constructor(e,r){var o;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,ur(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((o=r.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new Po({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;let n=r.parser||lb;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new ts(this.uri,this.opts);let r=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;let n=ae(r,"open",function(){o.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=ae(r,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{n(),s(new Error("timeout")),r.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(n),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(ae(e,"ping",this.onping.bind(this)),ae(e,"data",this.ondata.bind(this)),ae(e,"error",this.onerror.bind(this)),ae(e,"close",this.onclose.bind(this)),ae(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){fr(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let o=this.nsps[e];return o?this._autoConnect&&!o.active&&o.connect():(o=new ns(this,e,r),this.nsps[e]=o),o}_destroy(e){let r=Object.keys(this.nsps);for(let o of r)if(this.nsps[o].active)return;this._close()}_packet(e){let r=this.encoder.encode(e);for(let o=0;o<r.length;o++)this.engine.write(r[o],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let r=this.backoff.duration();this._reconnecting=!0;let o=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(n=>{n?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",n)):e.onreconnect()}))},r);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var nc={};function is(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let r=xv(t,e.path||"/socket.io"),o=r.source,n=r.id,s=r.path,i=nc[n]&&s in nc[n].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new ss(o,e):(nc[n]||(nc[n]=new ss(o,e)),c=nc[n]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(is,{Manager:ss,Socket:ns,io:is,connect:is});R();var Dv=new Set(["__proto__","constructor","prototype"]),$v=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Dv.has(t[e]))return!1;return!0},rP=(t,e)=>{!t||!$v(e)||e.reduce((r,o,n,s)=>{if(r&&o in r){if(n!==s.length-1)return r[o];delete r[o]}},t)},oP=(t,e,r,o=!1)=>{!t||!$v(e)||e.reduce((n,s,i,a)=>{if(n){if(i!==a.length-1)return!n[s]&&o&&(n[s]={}),n[s];n[s]=r}},t)},fb=(t,e)=>{let r=new Set;if(!Array.isArray(e))return r;for(let[o,n,s]of e)if(!(!Array.isArray(n)||!n.length))switch(r.add(n[0]),o){case"delete":rP(t,n);break;case"update":case"set":oP(t,n,s,!0);break;default:break}return r},Lv=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},Mv=(t,e)=>{for(let r in e){if(Dv.has(r))continue;let o=e[r],n=t[r];if(o&&typeof o=="object"&&!Array.isArray(o)){if(!n||typeof n!="object"||Array.isArray(n)){r in t||(t[r]=JSON.parse(JSON.stringify(o)));continue}Mv(n,o)}else r in t||(t[r]=o)}},ub=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let n={designSystem:t.__rawDesignSystem};fb(n,e)}let r=JSON.parse(JSON.stringify(t.__rawDesignSystem)),o=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];for(let n of o){let s=n&&n.designSystem;s&&typeof s=="object"&&Mv(r,s)}return r};R();var Fv=(t,e,r)=>{let o=!1;return(n={})=>{let{data:s}=n,{schema:i}=n;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(r[a]&&typeof r[a]=="object")if(a==="designSystem"){if(Lv(r,c),o){let l=ub(r);l&&cr(l)}}else eo(r[a],c);else r[a]=c}),o=!0,i&&(r.schema=i))}},Nv=(t,e,r)=>(o={})=>{let{changes:n}=o;if(!n||!Array.isArray(n)||!n.length)return;n=t.call("deepDestringifyFunctions",n,Array.isArray(n)?[]:{});let s=n.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?n.filter(c=>!s.includes(c)):n,a=fb(r,i);if(s.length&&a.add("designSystem"),a.has("state")&&e.update(r.state),["pages","components","snippets","functions","assets"].some(c=>a.has(c))){let{pathname:c,search:l,hash:f}=r.window.location;t.call("router",c+l+f,t.__ref.root,{},{scrollToTop:!1})}if(a.has("designSystem")){let c=ub(r,s);cr(c||r.designSystem)}};var nP={success:"green",error:"red",warning:"yellow"},jv=(t,e,r)=>{if(t.symbols){if(!r.connected){r.notifications.connected={title:"Connected",message:"to the Symbols live server"},r.update({connected:!0});let o=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(o)},3e3)}}else if(r.connected){r.notifications.connected={title:"Disconnected",type:"error"},r.update({connected:!1});let o=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(o)},3e3)}},Bv={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:nP[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,r,o)=>{r.update({animation:"fadeInUp"})},onClick:(e,r,o)=>{delete o.notifications[r.key],r.update({animation:"fadeOutDown"}),o.onClose&&o.onClose(e,r,o)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var sP=!1,iP=()=>sP?"http://localhost:8080":"https://api.symbols.app",aP=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}},cP=async t=>{try{let e=t||iP(),r=await v.fetch(`${e}/service-token`,{method:"GET"}),o;try{let n=await r.clone().json();if(n&&typeof n.token=="string")return n.token.trim();o=await r.text()}catch{o=await r.text()}return(o||"").replace(/\s+/gu,"")||void 0}catch(e){console.error("[sync] Failed to fetch service-token",e)}},Hv=(t,e,r,o)=>{t.on("snapshot",Fv(e,r,o)),t.on("ops",Nv(e,r,o)),t.on("clients",n=>{o.editor?.verbose&&jv(n,e,r)}),t.on("disconnect",n=>{o.editor?.verbose&&console.info("[sync] disconnected",n)})},lP=async(t,e,r,o)=>{let n=await cP(o);if(!n)return console.warn("[sync] no service token \u2014 collab disabled"),null;let s=r.key;if(!s)return console.warn("[sync] ctx.key missing \u2014 collab cannot authenticate"),null;let i=r.editor?.projectId||null,a=is(o,{path:"/collab-socket",transports:["websocket"],auth:{token:n,projectId:i,projectKey:s,branch:"main",live:!0,clientType:"platform"},reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return a.on("connect",()=>{r.editor?.verbose&&console.info("[sync] connected (collab)")}),Hv(a,t,e,r),a},fP=(t,e,r)=>{let o=is({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return o.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),Hv(o,t,e,r),o.on("reload",()=>{typeof v<"u"&&v.location&&v.location.reload()}),o},uP=async(t,e,r)=>{let{mode:o,baseUrl:n}=aP(r);return o?o==="collab"?lP(t,e,r,n):o==="runner"?fP(t,e,r):null:null},dP={onInit:uP};var zv=t=>typeof t>"u",Uv=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),Vv=t=>t?.editor?.runtime==="runner",Wv=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},qv={name:"sync",beforeCreate(t,e){let r=e&&e.editor;(r&&!zv(r.liveSync)?r.liveSync:Uv(e)||Vv(e))&&(Uv(e)&&!Vv(e)&&!e?.key||Wv(t,dP))}},Kv={name:"notifications",beforeCreate(t,e){if(!e)return;let r=zv(e.notifications)?null:e.notifications,o=e.editor&&e.editor.verbose===!0;(r===!0||r!==!1&&o)&&Wv(t,Bv)}};var hb={};P(hb,{AlertTemplate:()=>Au,ConfirmTemplate:()=>Cu,CustomTemplate:()=>Ou,ModalLayer:()=>vu,ModalRoot:()=>ku,PromptTemplate:()=>Tu,windowsComponents:()=>pb});var db={};P(db,{alertDialog:()=>wu,closeAllModals:()=>_u,closeModal:()=>yu,confirmDialog:()=>xu,getLayer:()=>mu,openModal:()=>bu,promptDialog:()=>Su,windowsFunctions:()=>pr});function J(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function as(t){let e=t;for(;e;){if(e.key==="ModalRoot")return e;if(e.ModalRoot&&e.ModalRoot.__ref)return e.ModalRoot;e=e.parent}let r=t?.getRoot?.();return r?.ModalRoot?r.ModalRoot:typeof globalThis<"u"&&globalThis.__SMBLS_WINDOWS_MODAL_ROOT__?.__ref?globalThis.__SMBLS_WINDOWS_MODAL_ROOT__:null}function mu(){return J(this)}var pP=(t,e)=>{let r=t&&t["ModalLayer_"+e],o=r?.node||r?.__ref?.node;!o||typeof o.style?.setProperty!="function"||(o.style.setProperty("display","none","important"),o.style.setProperty("opacity","0","important"),o.style.setProperty("visibility","hidden","important"),o.style.setProperty("pointer-events","none","important"))},Gv=(t,e)=>{let r=t&&t["ModalLayer_"+e],o=r?.node||r?.__ref?.node;!o||typeof o.style?.removeProperty!="function"||(o.style.removeProperty("display"),o.style.removeProperty("opacity"),o.style.removeProperty("visibility"),o.style.removeProperty("pointer-events"))};function yu(t){let e=as(this);if(!e)return;let r=e.state?.stack||[];if(!r.length)return;let o,n,s;if(t){if(s=[],o=r.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),o.length===r.length)return;n=r.filter(i=>i.id===t)}else o=r.slice(0,-1),n=r.slice(-1),s=[r.length-1];e.state.update({stack:o});for(let i of s)pP(e,i);for(let i of n)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function bu(t={}){let e=as(this);if(!e)return console.warn("[windows] openModal: ModalRoot is not mounted on the app root. Add `ModalRoot: {}` to your shell tree and import windowsComponents into context."),null;e.__modalIdCounter=(e.__modalIdCounter||0)+1;let r=t.id||`modal_${e.__modalIdCounter}_${Date.now().toString(36)}`,o={id:r,template:t.template||"custom",title:t.title,message:t.message,icon:t.icon,confirmText:t.confirmText,cancelText:t.cancelText,okText:t.okText,confirmTheme:t.confirmTheme,placeholder:t.placeholder,defaultValue:t.defaultValue,dismissOnBackdrop:t.dismissOnBackdrop,content:t.content,width:t.width,maxWidth:t.maxWidth,maxHeight:t.maxHeight,onConfirm:t.onConfirm,onCancel:t.onCancel,onOk:t.onOk,onClose:t.onClose},n=e.state?.stack||[];if(n.length>=5)return console.warn("[windows] openModal: stack already at the 5-layer maximum, dropping the new layer. Close some modals first."),null;let s=n.length;return Gv(e,s),e.state.update({stack:[...n,o]}),r}function _u(){let t=as(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function xu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function wu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function Su(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var pr={openModal:bu,closeModal:yu,closeAllModals:_u,confirmDialog:xu,alertDialog:wu,promptDialog:Su,getLayer:mu};var hP=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),Yv=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(hP),r=[];for(let o=0;o<e.length;o++){let n=e[o];(n.offsetParent!==null||n===document.activeElement)&&r.push(n)}return r},Xv=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},ku={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 pr)a in r.functions||(r.functions[a]=pr[a])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let o=()=>{let a=t.state?.stack||[];if(!a.length)return;let c=a.length-1,l=a[c];t.state.update({stack:a.slice(0,-1)});let f=t["ModalLayer_"+c],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},n=a=>{let c=t.state?.stack;if(c?.length){if(a.key==="Tab"){let l=Xv(t);if(!l)return;let f=Yv(l);if(!f.length){a.preventDefault();let g=l.querySelector?.('[role="dialog"]')||l;try{g.focus?.()}catch{}return}let u=f[0],d=f[f.length-1],h=document.activeElement;if(!l.contains(h)){a.preventDefault();try{u.focus()}catch{}return}if(a.shiftKey&&h===u){a.preventDefault();try{d.focus()}catch{}}else if(!a.shiftKey&&h===d){a.preventDefault();try{u.focus()}catch{}}return}a.key==="Escape"&&c[c.length-1]?.dismissOnBackdrop!==!1&&(a.preventDefault(),o())}};window.addEventListener("keydown",n),t.__escHandler=n;let s=a=>{let c=t.state?.stack||[];if(a<0||a>=c.length)return;let l=c[a];t.state.update({stack:c.filter((d,h)=>h!==a)});let f=t["ModalLayer_"+a],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},i=a=>{let c=t.state?.stack||[];if(!c.length)return;let l=a.target?.closest?.('[data-key="Close"]');if(l){for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f],d=u?.node||u?.__ref?.node;if(d&&d.contains(l)){a.preventDefault(),a.stopPropagation(),s(f);return}}return}for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f];if((u?.node||u?.__ref?.node)===a.target){if(c[f]?.dismissOnBackdrop===!1)return;a.preventDefault(),a.stopPropagation(),s(f);return}}};document.addEventListener("click",i,!0),t.__clickDelegate=i},onUpdate:t=>{if(typeof window>"u")return;let e=(t.state&&t.state.stack||[]).length,r=t.__prevStackLen||0;if(e!==r)if(t.__prevStackLen=e,t.__modalOpeners=t.__modalOpeners||[],e>r)t.__modalOpeners[e]=document.activeElement&&document.activeElement!==document.body?document.activeElement:t.__modalOpeners[e]||null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{let o=Xv(t);if(!o)return;let n=Yv(o)[0]||o.querySelector&&o.querySelector('[role="dialog"]')||o;try{n.focus&&n.focus()}catch{}});else{let o=null;for(let n=r;n>e;n--)t.__modalOpeners[n]&&(o=o||t.__modalOpeners[n]),t.__modalOpeners[n]=null;if(o&&typeof o.focus=="function"&&o.isConnected!==!1)try{o.focus()}catch{}}},onDestroy:t=>{typeof window>"u"||(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__===t&&(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=null),t.__escHandler&&(window.removeEventListener("keydown",t.__escHandler),delete t.__escHandler),t.__clickDelegate&&(document.removeEventListener("click",t.__clickDelegate,!0),delete t.__clickDelegate))}};var vu={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",background:"black.45",backdropFilter:"blur(4px)",transitionProperty:"opacity",transitionDuration:"200ms",transitionTimingFunction:"ease",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}},width:t=>J(t)?.width||"H",maxWidth:t=>J(t)?.maxWidth||"90vw",maxHeight:t=>J(t)?.maxHeight||null,onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>J(t)?.template!=="confirm"},AlertTemplate:{hide:t=>J(t)?.template!=="alert"},PromptTemplate:{hide:t=>J(t)?.template!=="prompt"},CustomTemplate:{hide:t=>J(t)?.template!=="custom"}}};var cs=(t,e,r)=>J(t)?.[e]||r,gP=t=>{let e=J(t)?.icon;return e===null||e===!1},Cu={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>cs(t,"title","Are you sure?"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>cs(t,"message","This action cannot be undone."),color:"dim"}},Icons:{hide:t=>gP(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>cs(t,"icon","warning")}}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>cs(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=J(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] confirm.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:t=>cs(t,"confirmTheme","primary"),text:t=>cs(t,"confirmText","Confirm"),onClick:(t,e,r)=>{let o=J(e);if(o?.onConfirm)try{o.onConfirm()}catch(n){console.warn("[windows] confirm.onConfirm threw:",n)}e.call("closeModal",o?.id)}}}};var Eu=(t,e,r)=>J(t)?.[e]||r,Au={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>Eu(t,"title","Notice"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>Eu(t,"message",""),color:"dim"}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>Eu(t,"icon","info")}}},ModalFooter:{flow:"x",align:"center end",OkBtn:{extends:"Button",theme:"primary",text:t=>Eu(t,"okText","OK"),onClick:(t,e,r)=>{let o=J(e);if(o?.onOk)try{o.onOk()}catch(n){console.warn("[windows] alert.onOk threw:",n)}e.call("closeModal",o?.id)}}}};var sc=(t,e,r)=>J(t)?.[e]||r,Tu={tag:"div",flow:"y",gap:"B",scope:{value:""},onRender:(t,e)=>{let r=J(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},onUpdate:(t,e)=>{let r=J(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>sc(t,"title","Enter a value"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>sc(t,"message",""),color:"dim"}}},InputRow:{extends:"Input",autofocus:!0,placeholder:t=>sc(t,"placeholder",""),value:(t,e)=>t.parent.scope?.value||"",onInput:(t,e,r)=>{e.parent.scope.value=t.target.value},onKeydown:(t,e,r)=>{if(t.key!=="Enter")return;t.preventDefault();let o=J(e),n=e.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>sc(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=J(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] prompt.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>sc(t,"confirmText","OK"),onClick:(t,e,r)=>{let o=J(e),n=e.parent.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}}}};var Ou={tag:"div",flow:"y",gap:"B",Title:{tag:"h2",text:t=>J(t)?.title||"",hide:t=>!J(t)?.title,position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0",attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",onInit:t=>{let e=Z(()=>{let r=J(t),o=r?.content||null,n=r?.id||null;if(!o){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in pr)i in s.functions||(s.functions[i]=pr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var pb={ModalRoot:ku,ModalLayer:vu,ConfirmTemplate:Cu,AlertTemplate:Au,PromptTemplate:Tu,CustomTemplate:Ou};var bb={};P(bb,{Dropdown:()=>Lu,DropdownList:()=>Mu,DropdownParent:()=>Fu,DropdownParentFocus:()=>Nu,DropdownRoot:()=>Du,DropdownSiblingFocus:()=>ju,DropdownTrigger:()=>$u,dropdownComponents:()=>yb});var Jv=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),mP=(t,e,r,o)=>{let n=Jv(t,r,o),s=i=>n[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":n.bottom>=n.top?"bottom":"top"},yP=(t,e,r,o,n)=>{let s=Jv(e,o,n),i=t==="top"||t==="bottom"?r.height+8:r.width+8;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i?a:t},Ru=(t,e,r)=>Math.max(e,Math.min(r,t)),Gr=(t,e,r="auto")=>{if(!t)return{left:0,top:0,side:"bottom",align:"start"};let o=typeof window<"u"?window.innerWidth:1024,n=typeof window<"u"?window.innerHeight:768,s={width:Math.max(120,e?.width||0),height:Math.max(40,e?.height||0)};if(r==="center"){let d=Ru((o-s.width)/2,8,Math.max(8,o-s.width-8)),h=Ru((n-s.height)/2,8,Math.max(8,n-s.height-8));return{left:d,top:h,side:"center",align:"center"}}let i,a;if(r==="auto")i=mP(t,s,o,n),a="start";else{let d=r.split("-");i=d[0],a=d[1]||"start",i=yP(i,t,s,o,n)}let c,l;i==="bottom"||i==="top"?(a==="start"?c=t.left:a==="end"?c=t.right-s.width:c=t.left+(t.width-s.width)/2,l=i==="bottom"?t.bottom+8:t.top-s.height-8):(a==="start"?l=t.top:a==="end"?l=t.bottom-s.height:l=t.top+(t.height-s.height)/2,c=i==="right"?t.right+8:t.left-s.width-8);let f=Math.max(8,o-s.width-8),u=Math.max(8,n-s.height-8);return c=Ru(c,8,f),l=Ru(l,8,u),{left:c,top:l,side:i,align:a}},ls=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 hr={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:"70vh",theme:"modal"},bP=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}},gb=t=>t?.getRoot?.()?.DropdownRoot||null,_P=0,xP=()=>`dropdown_${++_P}_${Date.now().toString(36)}`;function Pu(t={}){let e=gb(this);if(!e)return console.warn("[dropdown] openDropdown: DropdownRoot is not mounted on the app root. Add `DropdownRoot: {}` to your shell tree and import dropdown components into context."),null;let r=t.anchorEl?.node||t.anchorEl,o=t.anchorRect||bP(r);if(!o)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let n=t.id||xP(),s=t.triggerEl?.node||t.triggerEl||r||(typeof document<"u"?document.activeElement:null),i={id:n,content:t.content||null,anchor:o,placement:t.placement||hr.placement,trigger:t.trigger||hr.trigger,offset:t.offset??hr.offset,minWidth:t.minWidth||hr.minWidth,maxWidth:t.maxWidth||hr.maxWidth,maxHeight:t.maxHeight||hr.maxHeight,theme:t.theme||hr.theme,background:t.background||null,round:t.round||null,onOpen:t.onOpen,onClose:t.onClose,triggerEl:s},a=e.state?.layer;if(a?.onClose)try{a.onClose(a)}catch(c){console.warn("[dropdown] prev onClose threw:",c)}if(e.state.update({layer:i}),typeof i.onOpen=="function")try{i.onOpen(i)}catch(c){console.warn("[dropdown] onOpen threw:",c)}return n}function Iu(t){let e=gb(this);if(!e)return;let r=e.state?.layer;r&&e.state.update({layer:{...r,inert:!!t}})}function Io(t){let e=gb(this);if(!e)return;let r=e.state?.layer;if(!r)return;let o=typeof t=="string"?t:t?.id;if(o&&r.id&&o!==r.id)return;let n=r.onClose;e.state.update({layer:null});let s=r.triggerEl;if(s&&typeof s.focus=="function")try{s.focus()}catch(i){console.warn("[dropdown] focus restore threw:",i)}if(typeof n=="function")try{n(r)}catch(i){console.warn("[dropdown] onClose threw:",i)}}var wP=`
|
|
104
104
|
@keyframes smbls-dropdown-fade-in {
|
|
105
105
|
from { opacity: 0; transform: var(--smbls-dropdown-from, translateY(-6px)) scale(0.98); }
|
|
106
106
|
to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
|
|
@@ -122,7 +122,7 @@ ${i}
|
|
|
122
122
|
border-width: 0 !important;
|
|
123
123
|
padding: 0 !important;
|
|
124
124
|
}
|
|
125
|
-
`,
|
|
125
|
+
`,SP=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=wP,document.head.appendChild(t)},Zv=(t,e)=>{if(!t.node)return;let r=e?.background;if(!r){t.node.removeAttribute("data-smbls-surface");return}let o=/^[a-z][\w.+-]*$/i.test(r)?`var(--color-${r})`:r;t.node.style.setProperty("--smbls-dropdown-surface",o),t.node.setAttribute("data-smbls-surface","")},kP=t=>{t.node&&(t.node.style.animation="none",t.node.offsetWidth,t.node.style.animation="smbls-dropdown-fade-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both")},Du={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(SP(),typeof window>"u")return;let e=o=>{o.key==="Escape"&&t.state?.layer&&(o.preventDefault(),Io.call(t))};window.addEventListener("keydown",e),t.__dropdownEscHandler=e;let r=o=>{let n=t.state?.layer;if(!n)return;let s=t.node?.querySelector('[data-smbls-dropdown="panel"]');if(s&&s.contains(o.target))return;let i=n.anchor;if(i){let a=o.clientX,c=o.clientY;if(a>=i.left&&a<=i.right&&c>=i.top&&c<=i.bottom)return}Io.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 Gr(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 Gr(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":ls(Gr(e.anchor,r,e.placement).side)}},minWidth:t=>t.parent?.layer?.minWidth||"180px",maxWidth:t=>t.parent?.layer?.maxWidth||"90vw",maxHeight:t=>t.parent?.layer?.maxHeight||"70vh",overflow:"auto",overscrollBehavior:"contain",padding:"0",round:t=>t.parent?.layer?.round||"Z",theme:t=>t.parent?.layer?.theme||"modal",border:"none",borderWidth:"0",shadow:"overlay",pointerEvents:t=>{let e=t.parent?.layer;return e?e.inert?"none":"auto":"none"},opacity:t=>t.parent?.layer?"0.999":"0",onClick:t=>t.stopPropagation(),onInit:t=>{let e=Z(()=>{let r=t.parent?.layer,o=r?.content||null,n=r?.id||null;if(!o){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null}return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o)}catch(s){console.warn("[dropdown] content set failed:",s)}Zv(t,r),kP(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;Zv(t,r);let s=t.parent?.layer;if(!s?.anchor)return;let i=t.node.getBoundingClientRect(),a={width:i.width,height:i.height};t._lastSize=a;let c=Gr(s.anchor,a,s.placement);t.node.style.left=c.left+"px",t.node.style.top=c.top+"px",t.node.style.setProperty("--smbls-dropdown-from",ls(c.side))})}});t.__ref&&t.__ref.__effects?.push(e)},onRender:t=>{if(t?.node&&(t.parent?.layer?t.node.setAttribute("data-smbls-open","true"):t.node.removeAttribute("data-smbls-open")),!t?.node)return;let e=t.parent?.layer;if(!e?.anchor)return;let r=t.node.getBoundingClientRect(),o={width:r.width,height:r.height},n=t._lastSize;(!n||Math.abs(n.width-o.width)>1||Math.abs(n.height-o.height)>1)&&(t._lastSize=o);let s=Gr(e.anchor,o,e.placement);t.node.style.left=s.left+"px",t.node.style.top=s.top+"px",t.node.style.setProperty("--smbls-dropdown-from",ls(s.side))}}}};var mb=t=>{let e=t?.getRoot?.()?.DropdownRoot?.state?.layer;if(e&&t.dropdownId&&e.id===t.dropdownId){t.call("closeDropdown");return}let r={anchorEl:t,trigger:t.dropdownTrigger||"click",placement:t.dropdownPlacement||"auto",content:t.dropdownContent||null,minWidth:t.dropdownMinWidth,maxWidth:t.dropdownMaxWidth,maxHeight:t.dropdownMaxHeight,theme:t.dropdownTheme,offset:t.dropdownOffset,id:t.dropdownId,onOpen:t.onDropdownOpen,onClose:t.onDropdownClose};for(let o in r)r[o]===void 0&&delete r[o];t.call("openDropdown",r)},$u={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),mb(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&mb(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>mb(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var Lu={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"},Mu={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"}}},Fu={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},Nu={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}},Dropdown:{onClick:()=>{document.activeElement?.blur()}}},ju={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& ~ [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}}};var yb={DropdownRoot:Du,DropdownTrigger:$u,Dropdown:Lu,DropdownList:Mu,DropdownParent:Fu,DropdownParentFocus:Nu,DropdownSiblingFocus:ju};var xb={};P(xb,{DROPDOWN_DEFAULTS:()=>hr,closeDropdown:()=>Io,computePosition:()=>Gr,dropdownFunctions:()=>_b,fadeInTransform:()=>ls,openDropdown:()=>Pu,setDropdownInert:()=>Iu});var _b={openDropdown:Pu,closeDropdown:Io,setDropdownInert:Iu};var vP=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),CP=(t,e,r,o,n)=>{let s=vP(e,o,n),i=t==="top"||t==="bottom"?r.height+6:r.width+6;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i?a:t},Qv=(t,e,r)=>Math.max(e,Math.min(r,t)),Bu=(t,e,r="bottom")=>{if(!t)return{left:0,top:0,side:"bottom"};let o=typeof window<"u"?window.innerWidth:1024,n=typeof window<"u"?window.innerHeight:768,s=CP(r,t,e,o,n),i,a;return s==="bottom"||s==="top"?(i=t.left+(t.width-e.width)/2,a=s==="bottom"?t.bottom+6:t.top-e.height-6):(a=t.top+(t.height-e.height)/2,i=s==="right"?t.right+6:t.left-e.width-6),i=Qv(i,6,o-e.width-6),a=Qv(a,6,n-e.height-6),{left:i,top:a,side:s}},tC=t=>{switch(t){case"bottom":return"translateY(-4px)";case"top":return"translateY(4px)";case"left":return"translateX(4px)";case"right":return"translateX(-4px)";default:return"translateY(-4px)"}};var EP=`
|
|
126
126
|
@keyframes smbls-tooltip-fade-in {
|
|
127
127
|
from { opacity: 0; transform: var(--smbls-tooltip-from, translateY(-4px)); }
|
|
128
128
|
to { opacity: 1; transform: translate3d(0, 0, 0); }
|
|
@@ -130,4 +130,4 @@ ${i}
|
|
|
130
130
|
[data-smbls-tooltip="panel"][data-smbls-open="true"] {
|
|
131
131
|
animation: smbls-tooltip-fade-in 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
|
|
132
132
|
}
|
|
133
|
-
`,cP=()=>{if(typeof document>"u"||document.getElementById("smbls-tooltip-css"))return;let t=document.createElement("style");t.id="smbls-tooltip-css",t.textContent=aP,document.head.appendChild(t)},Mv={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},onInit:()=>{cP()},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},position:"fixed",subscribeTo:["tip"],tip:(t,e)=>e?.tip||null,left:t=>{let e=t.tip;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:200,height:32};return cu(e.anchor,r,e.placement).left+"px"},top:t=>{let e=t.tip;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:200,height:32};return cu(e.anchor,r,e.placement).top+"px"},style:t=>{let e=t.tip;if(!e?.anchor)return{};let r=t._lastSize||{width:200,height:32};return{"--smbls-tooltip-from":Lv(cu(e.anchor,r,e.placement).side)}},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||"tooltip .quaternary",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>t.tip?"1":"0",visibility:t=>t.tip?"visible":"hidden",transition:"B opacity defaultBezier, B visibility defaultBezier",onRender:t=>{if(t?.node&&(t.tip?t.node.setAttribute("data-smbls-open","true"):t.node.removeAttribute("data-smbls-open")),!t?.node)return;let e=t.node.getBoundingClientRect(),r={width:e.width,height:e.height},o=t._lastSize;if(!o||Math.abs(o.width-r.width)>1||Math.abs(o.height-r.height)>1){t._lastSize=r;let n=t.getParent?.();n?.state?.tip&&n.state.update({tip:{...n.state.tip}})}}}};var lP=t=>{t.tooltipText&&t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key})},Fv=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,lP(t)},t.tooltipDelay??250))},Nv=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))},jv={onMouseenter:(t,e)=>Fv(e),onMouseleave:(t,e)=>Nv(e),onFocus:(t,e)=>Fv(e),onBlur:(t,e)=>Nv(e)};R();var Bv={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=>mt(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)}},Uv={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)}},Vv={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,o=e||r;if(!o)return;let n=o&&o[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":n||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var Hv={TooltipRoot:Mv,TooltipTrigger:jv,Tooltip:Bv,TooltipHidden:Uv,TooltipParent:Vv};var zv={placement:"bottom",theme:"tooltip .quaternary",delay:250,hideDelay:100},fP=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},Wv=t=>t?.getRoot?.()?.TooltipRoot||null,uP=0,dP=()=>`tooltip_${++uP}_${Date.now().toString(36)}`;function qv(t={}){let e=Wv(this);if(!e)return console.warn("[tooltip] openTooltip: TooltipRoot is not mounted on the app root. Add `TooltipRoot: {}` to your shell tree and import tooltip components into context."),null;let r=t.anchorEl?.node||t.anchorEl,o=t.anchorRect||fP(r);if(!o)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let n=t.id||dP(),s={id:n,text:t.text||"",anchor:o,placement:t.placement||zv.placement,theme:t.theme||zv.theme};return e.state.update({tip:s}),n}function Kv(t){let e=Wv(this);if(!e)return;let r=e.state?.tip;if(!r)return;let o=typeof t=="string"?t:t?.id;o&&r.id&&o!==r.id||e.state.update({tip:null})}var Gv={openTooltip:qv,closeTooltip:Kv};var Yv=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),pP=(t,e)=>{let r=e?.sharedLibraries,o=Array.isArray(r)?r.map(s=>typeof s=="string"?s:s?.key||s?.name):r&&typeof r=="object"?Object.keys(r):null,n=0;return t.map(s=>{if(!Yv(s))return s;let i=n++;if(typeof s.__libraryKey=="string"&&s.__libraryKey)return s.__libraryKey;if(o&&o[i])return o[i];if(typeof s.__stubId=="string"){let a=s.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(a)return a[1]}return null}).filter(Boolean)},hP=async(t,e={})=>{let r=e.symbolsConfig,o=r?.owner&&r?.key?`${r.owner}--${r.key}`:r?.key,n=e.key=e.key||o||(w(t)?t:"smblsapp");if(e.define=e.define||Fn,e.cssPropsRegistry=bt,e.window=Y0(e),e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(g=>typeof g=="string"||Yv(g))){e.sharedLibraries=pP(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:g}=await Promise.resolve().then(()=>(R(),fl));e.sharedLibraries=await g(e.sharedLibraries,{apiBaseUrl:uy()})}q0(e.sharedLibraries),ik(e)}let[s,i]=ok(n,e);e.designSystem=s,e.registry=i,e.cases||(e.cases={}),e.shorthand&&$a.prepareContext(e);let a=nk(t,e);if(e.state=a,ri(a),e.pages=sk(t,e),e.components=X0(e),e.utils=J0(e),xr[e.packageManager]&&(e.dependencies=await Q0(e)),e.methods=Z0(e),e.routerOptions=jS(t,e),e.defaultExtends=[gf],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(h=>!h||typeof h!="object")){let h=e.plugins.filter(g=>!g||typeof g!="object");e.plugins=e.plugins.filter(g=>g&&typeof g=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${h.length} non-plugin entr${h.length===1?"y":"ies"} (${h.map(g=>JSON.stringify(g)).join(", ")}) \u2014 dropped. A published project that imports a framework plugin it does not declare ships a stub phantom here; the runtime registers polyglot/helmet/fetch/... itself from the context config, so remove the import instead.`)}e.globalScope&&S(e.globalScope)&&(e.globalScope=ks(e.globalScope));let c=(h,g)=>{let p=g?h[g]:h;if(!S(p))return;let m=ie(p);try{Object.assign(p,m)}catch(_){if(g)h[g]=m;else throw _}};c(t),c(e,"components"),c(e,"pages"),c(e,"functions"),c(e,"methods"),c(e,"snippets"),c(e,"app");let l=h=>h&&typeof h.select=="function";e.fetch?.__resolved&&!l(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!l(e.db.__resolved)&&delete e.db.__resolved;let f=h=>e.plugins.some(g=>g&&g.name===h);if(e.polyglot&&!f("polyglot")){e.plugins.push(Bn);for(let h in Ua)typeof e.functions[h]!="function"&&(e.functions[h]=Ua[h])}if(f("helmet")||e.plugins.push(Fm),e.fetch&&!f("fetch")&&e.plugins.push(yp),e.designSystem?.typography?.useCapsize!==!1&&!f("capsize")&&(e.plugins.push(Tf),e.cssPropsRegistry.useCapsize=Um),e.shorthand&&!f("shorthand")&&e.plugins.push($a),e.analyze&&!f("analyze")){let h=e.analyze===!0?{}:e.analyze;e.analyze=jf(h),e.plugins.push(Vn)}e.sync!==!1&&!f("sync")&&e.plugins.push(rv),e.inspect&&!f("inspect")&&e.plugins.push(ly),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!f("notifications")&&e.plugins.push(ov);let d=(h,g,p)=>{if(e[h]!==!1){for(let m in g)S(e.components[m])||(e.components[m]=g[m]);for(let m in p)typeof e.functions[m]!="function"&&(e.functions[m]=p[m])}};return d("windows",xv,Hr),d("dropdown",Iv,Dv),d("tooltip",Hv,Gv),e},Fy=async(t,e)=>{S(e)||(e={}),Ye(t)?(t={},e.parent=t):w(t)?(t={},e.key=t):S(t)||(t={});let r=e.window||(typeof window<"u"?window:null),o=r?.__BRENDER__,n=null;if(o){let c=e.document||(typeof document<"u"?document:null);c&&(n=Array.from(c.head.querySelectorAll("style")))}if(await hP(t,e),e.useReset!==!1){let c=e.document||(typeof document<"u"?document:null);if(c){let l=c.head.querySelector("style[data-smbls]");l||(l=c.createElement("style"),l.setAttribute("data-smbls",""),c.head.appendChild(l));let f=l.sheet;if(f){try{f.insertRule("*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }",0)}catch{}try{f.insertRule("h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }",1)}catch{}}}}if(e.app&&S(e.app))for(let c in e.app)t[c]===void 0&&(t[c]=e.app[c]);t.extends=JS(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await tk({functions:e.functions,utils:e.utils,snippets:e.snippets,...e.files},e);for(let c of e.plugins)if(typeof c.beforeCreate=="function")try{c.beforeCreate(t,e)}catch(l){console.error(`[smbls] plugin "${c.name||"?"}" beforeCreate error:`,l)}let s=e.document;if(!s||!s.createElement)return t;let i=e.parent||s.body;if(o)return gP(ee,t,i,e,r,n);let a=ee(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},gP=async(t,e,r,o,n,s)=>{let i=r.ownerDocument||document;s&&s.forEach(l=>{l.parentNode&&l.remove()});let a=[];for(let l of r.childNodes){if(l.nodeType===1){let f=l.tagName.toLowerCase();if(f==="script"||f==="link"||f==="style"||f==="svg"&&l.id)continue}a.push(l)}a.forEach(l=>l.remove()),i.querySelectorAll("[data-br]").forEach(l=>l.removeAttribute("data-br"));let c=t(e,r,o.key,{verbose:o.verbose,context:o,...o.domqlOptions});return mP(n),c},mP=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var Ny=(t,e)=>nt(t,S(e)?e:{}),yP=t=>{if(typeof document>"u")return;let e=t.themeRoot||t.document&&t.document.documentElement||document.documentElement;if(!e||typeof e.setAttribute!="function")return;let r=t.globalTheme||"auto";try{if(typeof window<"u"&&window.location){let s=new URLSearchParams(window.location.search).get("globalTheme");s&&(r=s)}}catch{}let o=t.themeStorageKey;if(r==="auto"&&o&&typeof localStorage<"u")try{let s=localStorage.getItem(o);s&&(r=s)}catch{}let n=r==="auto"?(()=>{try{return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():r;e.setAttribute("data-theme",n),t.globalTheme=r,t.themeRoot=e},bP=()=>{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}},Xv=t=>{let e=bP();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},jy=(t,e=Mr,r)=>{let o={...Mr,...Ny(e,r)};return Xv(o),yP(o),Fy(t,o).then(s=>{if($m(s,o),s.destroy=()=>ka(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Sa(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},s.onCreate&&s.onCreate(s,s.state,s.context,o),s.context?.analyze?.activate)try{s.context.analyze.activate(s.context)}catch(i){console.error("[analyze] activate error:",i)}return s}).catch(s=>{throw console.error("[smbls] create error:",s),s})},_P=(t,e=Mr,r)=>{let o=jy(t,e,r),n={...Mr,...Ny(e,r)},s=n.key;return HS(o,s,{utils:wa,...n}),o},xP=async(t,e=Mr,r)=>{let o={...Mr,...Ny(e,r)};Xv(o);let n=e.key;await VS(n,o);let s=await Fy(t,o);return $m(s,o),s.destroy=()=>ka(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Sa(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},o.onCreate&&await o.onCreate(s,s.state,s.context,o),s},wP=(t={},e=Mr,r)=>jy({deps:{isUndefined:Et},...t},nt({domqlOptions:{onlyResolveExtends:!0}},e),r);wf(ia);H0(void 0,{smbls:By});
|
|
133
|
+
`,AP=()=>{if(typeof document>"u"||document.getElementById("smbls-tooltip-css"))return;let t=document.createElement("style");t.id="smbls-tooltip-css",t.textContent=EP,document.head.appendChild(t)},eC={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},onInit:()=>{AP()},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},position:"fixed",subscribeTo:["tip"],tip:(t,e)=>e?.tip||null,left:t=>{let e=t.tip;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:200,height:32};return Bu(e.anchor,r,e.placement).left+"px"},top:t=>{let e=t.tip;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:200,height:32};return Bu(e.anchor,r,e.placement).top+"px"},style:t=>{let e=t.tip;if(!e?.anchor)return{};let r=t._lastSize||{width:200,height:32};return{"--smbls-tooltip-from":tC(Bu(e.anchor,r,e.placement).side)}},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||"tooltip .quaternary",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>t.tip?"1":"0",visibility:t=>t.tip?"visible":"hidden",transition:"B opacity defaultBezier, B visibility defaultBezier",onRender:t=>{if(t?.node&&(t.tip?t.node.setAttribute("data-smbls-open","true"):t.node.removeAttribute("data-smbls-open")),!t?.node)return;let e=t.node.getBoundingClientRect(),r={width:e.width,height:e.height},o=t._lastSize;if(!o||Math.abs(o.width-r.width)>1||Math.abs(o.height-r.height)>1){t._lastSize=r;let n=t.getParent?.();n?.state?.tip&&n.state.update({tip:{...n.state.tip}})}}}};var TP=t=>{t.tooltipText&&t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key})},rC=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,TP(t)},t.tooltipDelay??250))},oC=t=>{t._tooltipShowTimer&&(clearTimeout(t._tooltipShowTimer),t._tooltipShowTimer=null),!t._tooltipHideTimer&&(t._tooltipHideTimer=setTimeout(()=>{t._tooltipHideTimer=null,t.call("closeTooltip",t.tooltipId||t.key)},t.tooltipHideDelay??100))},nC={onMouseenter:(t,e)=>rC(e),onMouseleave:(t,e)=>oC(e),onFocus:(t,e)=>rC(e),onBlur:(t,e)=>oC(e)};R();var sC={display:"flex",theme:"dialog",background:"black",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>bt(t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},iC={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)}},aC={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,o=e||r;if(!o)return;let n=o&&o[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":n||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var cC={TooltipRoot:eC,TooltipTrigger:nC,Tooltip:sC,TooltipHidden:iC,TooltipParent:aC};var lC={placement:"bottom",theme:"tooltip .quaternary",delay:250,hideDelay:100},OP=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}},fC=t=>t?.getRoot?.()?.TooltipRoot||null,RP=0,PP=()=>`tooltip_${++RP}_${Date.now().toString(36)}`;function uC(t={}){let e=fC(this);if(!e)return console.warn("[tooltip] openTooltip: TooltipRoot is not mounted on the app root. Add `TooltipRoot: {}` to your shell tree and import tooltip components into context."),null;let r=t.anchorEl?.node||t.anchorEl,o=t.anchorRect||OP(r);if(!o)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let n=t.id||PP(),s={id:n,text:t.text||"",anchor:o,placement:t.placement||lC.placement,theme:t.theme||lC.theme};return e.state.update({tip:s}),n}function dC(t){let e=fC(this);if(!e)return;let r=e.state?.tip;if(!r)return;let o=typeof t=="string"?t:t?.id;o&&r.id&&o!==r.id||e.state.update({tip:null})}var pC={openTooltip:uC,closeTooltip:dC};var hC=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),IP=(t,e)=>{let r=e?.sharedLibraries,o=Array.isArray(r)?r.map(s=>typeof s=="string"?s:s?.key||s?.name):r&&typeof r=="object"?Object.keys(r):null,n=0;return t.map(s=>{if(!hC(s))return s;let i=n++;if(typeof s.__libraryKey=="string"&&s.__libraryKey)return s.__libraryKey;if(o&&o[i])return o[i];if(typeof s.__stubId=="string"){let a=s.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(a)return a[1]}return null}).filter(Boolean)},DP=async(t,e={})=>{let r=e.symbolsConfig,o=r?.owner&&r?.key?`${r.owner}--${r.key}`:r?.key,n=e.key=e.key||o||(w(t)?t:"smblsapp");if(e.define=e.define||zn,e.cssPropsRegistry=xt,e.window=jk(e),e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(g=>typeof g=="string"||hC(g))){e.sharedLibraries=IP(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:g}=await Promise.resolve().then(()=>(R(),yl));e.sharedLibraries=await g(e.sharedLibraries,{apiBaseUrl:Hy()})}Mk(e.sharedLibraries),Xk(e)}let[s,i]=Kk(n,e);e.designSystem=s,e.registry=i,e.cases||(e.cases={}),e.shorthand&&Va.prepareContext(e);let a=Gk(t,e);if(e.state=a,li(a),e.pages=Yk(t,e),e.components=Bk(e),e.utils=Uk(e),vr[e.packageManager]&&(e.dependencies=await Hk(e)),e.methods=Vk(e),e.routerOptions=T0(t,e),e.defaultExtends=[Cf],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(h=>!h||typeof h!="object")){let h=e.plugins.filter(g=>!g||typeof g!="object");e.plugins=e.plugins.filter(g=>g&&typeof g=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${h.length} non-plugin entr${h.length===1?"y":"ies"} (${h.map(g=>JSON.stringify(g)).join(", ")}) \u2014 dropped. A published project that imports a framework plugin it does not declare ships a stub phantom here; the runtime registers polyglot/helmet/fetch/... itself from the context config, so remove the import instead.`)}e.globalScope&&S(e.globalScope)&&(e.globalScope=Rs(e.globalScope));let c=(h,g)=>{let p=g?h[g]:h;if(!S(p))return;let m=ce(p);try{Object.assign(p,m)}catch(b){if(g)h[g]=m;else throw b}};c(t),c(e,"components"),c(e,"pages"),c(e,"functions"),c(e,"methods"),c(e,"snippets"),c(e,"app");let l=h=>h&&typeof h.select=="function";e.fetch?.__resolved&&!l(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!l(e.db.__resolved)&&delete e.db.__resolved;let f=h=>e.plugins.some(g=>g&&g.name===h);if(e.polyglot&&!f("polyglot")){e.plugins.push(Kn);for(let h in Ya)typeof e.functions[h]!="function"&&(e.functions[h]=Ya[h])}if(f("helmet")||e.plugins.push(gy),e.fetch&&!f("fetch")&&e.plugins.push(Yp),e.designSystem?.typography?.useCapsize!==!1&&!f("capsize")&&(e.plugins.push(Nf),e.cssPropsRegistry.useCapsize=_y),e.shorthand&&!f("shorthand")&&e.plugins.push(Va),e.analyze&&!f("analyze")){let h=e.analyze===!0?{}:e.analyze;e.analyze=Yf(h),e.plugins.push(Yn)}e.sync!==!1&&!f("sync")&&e.plugins.push(qv),e.inspect&&!f("inspect")&&e.plugins.push(Uy),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!f("notifications")&&e.plugins.push(Kv);let d=(h,g,p)=>{if(e[h]!==!1){for(let m in g)S(e.components[m])||(e.components[m]=g[m]);for(let m in p)typeof e.functions[m]!="function"&&(e.functions[m]=p[m])}};return d("windows",pb,pr),d("dropdown",yb,_b),d("tooltip",cC,pC),e},wb=async(t,e)=>{S(e)||(e={}),Je(t)?(t={},e.parent=t):w(t)?(t={},e.key=t):S(t)||(t={});let r=e.window||(typeof window<"u"?window:null),o=r?.__BRENDER__,n=null;if(o){let c=e.document||(typeof document<"u"?document:null);c&&(n=Array.from(c.head.querySelectorAll("style")))}if(await DP(t,e),e.useReset!==!1){let c=e.document||(typeof document<"u"?document:null);if(c){let l=c.head.querySelector("style[data-smbls]");l||(l=c.createElement("style"),l.setAttribute("data-smbls",""),c.head.appendChild(l));let f=l.sheet;if(f){try{f.insertRule("*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }",0)}catch{}try{f.insertRule("h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }",1)}catch{}}}}if(e.app&&S(e.app))for(let c in e.app)t[c]===void 0&&(t[c]=e.app[c]);t.extends=B0(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await zk({functions:e.functions,utils:e.utils,snippets:e.snippets,...e.files},e);for(let c of e.plugins)if(typeof c.beforeCreate=="function")try{c.beforeCreate(t,e)}catch(l){console.error(`[smbls] plugin "${c.name||"?"}" beforeCreate error:`,l)}let s=e.document;if(!s||!s.createElement)return t;let i=e.parent||s.body;if(o)return $P(oe,t,i,e,r,n);let a=oe(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},$P=async(t,e,r,o,n,s)=>{let i=r.ownerDocument||document;s&&s.forEach(l=>{l.parentNode&&l.remove()});let a=[];for(let l of r.childNodes){if(l.nodeType===1){let f=l.tagName.toLowerCase();if(f==="script"||f==="link"||f==="style"||f==="svg"&&l.id)continue}a.push(l)}a.forEach(l=>l.remove()),i.querySelectorAll("[data-br]").forEach(l=>l.removeAttribute("data-br"));let c=t(e,r,o.key,{verbose:o.verbose,context:o,...o.domqlOptions});return LP(n),c},LP=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var Sb=(t,e)=>st(t,S(e)?e:{}),MP=t=>{if(typeof document>"u")return;let e=t.themeRoot||t.document&&t.document.documentElement||document.documentElement;if(!e||typeof e.setAttribute!="function")return;let r=t.globalTheme||"auto";try{if(typeof window<"u"&&window.location){let s=new URLSearchParams(window.location.search).get("globalTheme");s&&(r=s)}}catch{}let o=t.themeStorageKey;if(r==="auto"&&o&&typeof localStorage<"u")try{let s=localStorage.getItem(o);s&&(r=s)}catch{}let n=r==="auto"?(()=>{try{return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():r;e.setAttribute("data-theme",n),t.globalTheme=r,t.themeRoot=e},FP=()=>{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}},gC=t=>{let e=FP();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},kb=(t,e=Ur,r)=>{let o={...Ur,...Sb(e,r)};return gC(o),MP(o),wb(t,o).then(s=>{if(dy(s,o),s.destroy=()=>Pa(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Ra(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},s.onCreate&&s.onCreate(s,s.state,s.context,o),s.context?.analyze?.activate)try{s.context.analyze.activate(s.context)}catch(i){console.error("[analyze] activate error:",i)}return s}).catch(s=>{throw console.error("[smbls] create error:",s),s})},NP=(t,e=Ur,r)=>{let o=kb(t,e,r),n={...Ur,...Sb(e,r)},s=n.key;return I0(o,s,{utils:Oa,...n}),o},jP=async(t,e=Ur,r)=>{let o={...Ur,...Sb(e,r)};gC(o);let n=e.key;await P0(n,o);let s=await wb(t,o);return dy(s,o),s.destroy=()=>Pa(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Ra(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},o.onCreate&&await o.onCreate(s,s.state,s.context,o),s},BP=(t={},e=Ur,r)=>kb({deps:{isUndefined:Tt},...t},st({domqlOptions:{onlyResolveExtends:!0}},e),r);Pf(ha);Ik(void 0,{smbls:vb});Dk(void 0,{"@symbo.ls/windows":()=>({...hb,...db}),"@symbo.ls/dropdown":()=>({...bb,...xb})});
|