smbls 3.14.20 → 3.14.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/smbls.cjs +55 -55
- package/dist/smbls.embed.iife.js +16 -0
- package/dist/smbls.esm.js +31 -31
- package/dist/smbls.iife-string.js +1 -1
- package/dist/smbls.iife.js +55 -55
- package/embed.js +91 -0
- package/package.json +10 -3
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";var SymbolsEmbed=(()=>{var Ne=Object.defineProperty;var ys=Object.getOwnPropertyDescriptor;var bs=Object.getOwnPropertyNames;var xs=Object.prototype.hasOwnProperty;var v=(t,e)=>()=>(t&&(e=t(t=0)),e);var Rt=(t,e)=>{for(var r in e)Ne(t,r,{get:e[r],enumerable:!0})},Ss=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of bs(e))!xs.call(t,o)&&o!==r&&Ne(t,o,{get:()=>e[o],enumerable:!(n=ys(e,o))||n.enumerable});return t};var _s=t=>Ss(Ne({},"__esModule",{value:!0}),t);var Q,Ot,ge=v(()=>{Q=globalThis,Ot=Q.document});var me,Ze=v(()=>{ge();me=t=>typeof Q<"u"&&(Q.Node&&t instanceof Q.Node||Q.Window&&t instanceof Q.Window||t===Q||t===document)});var R,S,ye,k,j,St,Wr,Ht=v(()=>{R=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,S=t=>typeof t=="string",ye=t=>typeof t=="number",k=t=>typeof t=="function",j=t=>Array.isArray(t),St=t=>t===null?!1:typeof t=="object",Wr=t=>t===void 0});var Gr,Xe=v(()=>{be();Gr=(t,e=[])=>t.reduce((r,n)=>Ye(r,$t(n,{exclude:e}),e),{})});function xe(t,e,r={}){let{bracketsLength:n=2}=r,o=n===3?"{{{":"{{";if(!t.includes(o))return t;let s=Os[n],i=e||this.state||{},a=this;return t.replace(s,(c,f,l,u)=>{let d=l.trim();if(u){let h=a?.context,p=h?.functions?.[u]||h?.utils?.[u]||h?.methods?.[u]||h?.snippets?.[u]||a?.[u];if(p&&typeof p=="function")try{return String(p.call(a,d)??"")}catch{return""}return""}if(f){let h=(f.match(/\.\.\//g)||[]).length,p=i;for(let b=0;b<h;b++){if(!p||!p.parent)return"";p=p.parent}if(d==="parent")return String(p.value??"");let g=qt(p,d);return String(g??"")}else{let h=qt(i,d);if(h!=null)return String(h);let p=a?.context?.polyglot;if(p?.translations){let g=i?.root?.lang||i?.lang||a?.context?.state?.lang||p.defaultLang||"en",b=p.translations[g];if(b){let y=qt(b,d);if(y!=null&&typeof y!="object")return String(y);for(let x in b){let _=b[x];if(_&&typeof _=="object"&&!Array.isArray(_)){let w=qt(_,d);if(w!=null&&typeof w!="object")return String(w)}}}let m=qt(p.translations,d);if(m!=null&&typeof m!="object")return String(m)}return""}})}var Os,qt,zr=v(()=>{Os={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},qt=(t,e)=>e.split(".").reduce((r,n)=>r?.[n],t)});var $s,Es,Ts,Hr,tr=v(()=>{$s=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"]),Es=new Set(["update","__element"]),Ts=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"]),Hr=new Set(["node","context","extends","__element","__ref",...Ts,...$s,...Es])});var qr,It,Ye,Kr,$t,be=v(()=>{ge();Ht();Xe();Ze();tr();qr=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,It=(t,e,r,n)=>{if(k(t))return e?typeof t.call!="function"?t:t.call(e,e,r||e.state,n||e.context):void 0;if(t!=null&&e?.context?.plugins&&(j(t)||R(t)&&!me(t))){let o=e.context.plugins;for(let s of o)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return It(i,e,r,n)}}return t},Ye=(t,e,r=Hr)=>Kr(t,e,r,null),Kr=(t,e,r,n)=>{if(t===e)return t;if(n){for(let s=0;s<n.length;s+=2)if(n[s]===t&&n[s+1]===e)return t}let o=r instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||qr(s)||s==="constructor"||s==="prototype"||(o?r.has(s):r.includes(s)))continue;let i=t[s],a=e[s];if(St(i)&&St(a)){let c=n||[];c.push(t,e),Kr(i,a,r,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},$t=(t,e={})=>{let{exclude:r=[],cleanUndefined:n=!1,cleanNull:o=!1,window:s,visited:i=new WeakMap,handleExtends:a=!1}=e,c=s||Q||globalThis;if(!St(t)||me(t))return t;if(i.has(t))return i.get(t);let f=j(t)?[]:{};i.set(t,f);let l=r instanceof Set?r:r.length>3?new Set(r):null;for(let u in t){if(!Object.prototype.hasOwnProperty.call(t,u)||qr(u)||u==="__proto__"||(l?l.has(u):r.includes(u)))continue;let d=t[u];if(!(n&&d===void 0)&&!(o&&d===null)){if(me(d)){f[u]=d;continue}if(a&&u==="extends"&&j(d)){f[u]=Gr(d,r);continue}if(k(d)){f[u]=d;continue}St(d)?f[u]=$t(d,{...e,visited:i}):f[u]=d}}return f}});var Qr=v(()=>{});var Jr,js,er,Zr=v(()=>{Jr="production",js=(t=Jr)=>t==="production",er=(t=Jr)=>!js(t)});var Xr=v(()=>{});var Yr=v(()=>{});var tn=v(()=>{});var xc,en=v(()=>{xc=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent)});var rn=v(()=>{});var nn=v(()=>{});var on=v(()=>{});var sn=v(()=>{});var an=v(()=>{});var cn=v(()=>{});var ln=v(()=>{});var fn=v(()=>{});var un,rr=v(()=>{un={}});var hn={};Rt(hn,{setup:()=>Rs,supabaseAdapter:()=>pn});var dn,Ps,Rs,nr,Is,pn,gn=v(()=>{"use strict";dn=new Map,Ps=(t,e,r)=>`${t}|${e}|${r?"off":"on"}`,Rs=async({url:t,key:e,projectId:r,createClient:n,auth:o,retry:s,adapter:i,...a})=>{let c=t||r&&`https://${r}.supabase.co`;if(!c||!e)throw new Error("@symbo.ls/fetch supabase: url (or projectId) and key are required");n||(n=(await import("@supabase/supabase-js")).createClient),o===!1&&(a.auth={autoRefreshToken:!1,persistSession:!1,detectSessionInUrl:!1});let f=Ps(c,e,o===!1),l=dn.get(f);return l||(l=await n(c,e,a),l?.auth&&dn.set(f,l)),!l||!l.auth?null:pn(l)},nr=(t,e)=>{if(!e)return t;for(let r in e){let n=e[r];if(n===null)t=t.is(r,null);else if(Array.isArray(n))t=t.in(r,n);else if(typeof n=="object")for(let o in n)o==="gt"?t=t.gt(r,n[o]):o==="gte"?t=t.gte(r,n[o]):o==="lt"?t=t.lt(r,n[o]):o==="lte"?t=t.lte(r,n[o]):o==="neq"?t=t.neq(r,n[o]):o==="like"?t=t.like(r,n[o]):o==="ilike"?t=t.ilike(r,n[o]):o==="in"?t=t.in(r,n[o]):o==="is"?t=t.is(r,n[o]):o==="contains"?t=t.contains(r,n[o]):o==="containedBy"?t=t.containedBy(r,n[o]):o==="textSearch"&&(t=t.textSearch(r,n[o]));else t=t.eq(r,n)}return t},Is=(t,{limit:e,offset:r,order:n,single:o}={})=>{if(n)if(Array.isArray(n))for(let s of n){let i=typeof s=="string"?s:s.by;t=t.order(i,{ascending:s.asc!==!1})}else{let s=typeof n=="string"?n:n.by;t=t.order(s,{ascending:n.asc!==!1})}return e&&(t=t.limit(e)),r&&(t=t.range(r,r+(e||20)-1)),o&&(t=t.single()),t},pn=t=>({name:"supabase",client:t,getSession:async()=>{let{data:e}=await t.auth.getSession();return e?.session||null},getUser:async()=>{let{data:e}=await t.auth.getUser();return e?.user||null},signIn:e=>e.provider?t.auth.signInWithOAuth({provider:e.provider}):e.token?t.auth.signInWithIdToken(e):t.auth.signInWithPassword(e),signUp:e=>t.auth.signUp(e),signOut:()=>t.auth.signOut(),onAuthStateChange:e=>{let{data:{subscription:r}}=t.auth.onAuthStateChange((n,o)=>e(n,o));return()=>r.unsubscribe()},select:async({from:e,schema:r,select:n,params:o,headers:s,...i})=>{let c=(r?t.schema(r):t).from(e).select(n||"*");if(c=nr(c,o),c=Is(c,i),s)try{for(let f in s)c.setHeader?c=c.setHeader(f,s[f]):t.rest&&(t.rest.headers[f]=s[f])}catch(f){console.warn("[supabase] setHeader failed:",f.message)}return c},rpc:({from:e,params:r})=>t.rpc(e,r),insert:({from:e,schema:r,data:n,select:o})=>(r?t.schema(r):t).from(e).insert(n).select(o||"*"),update:({from:e,schema:r,data:n,params:o,select:s})=>{let a=(r?t.schema(r):t).from(e).update(n);return a=nr(a,o),a.select(s||"*")},upsert:({from:e,schema:r,data:n,select:o})=>(r?t.schema(r):t).from(e).upsert(n).select(o||"*"),delete:({from:e,params:r})=>{let n=t.from(e).delete();return n=nr(n,r),n},subscribe:({from:e,params:r,on:n},o)=>{let s=n||"*",i=t.channel(`db-${e}-${Date.now()}`).on("postgres_changes",{event:s,schema:"public",table:e,...r?.id?{filter:`id=eq.${r.id}`}:{}},a=>o(a.new,a.old,a)).subscribe();return()=>t.removeChannel(i)},upload:({bucket:e,path:r,file:n,options:o})=>t.storage.from(e).upload(r,n,o),download:({bucket:e,path:r})=>t.storage.from(e).download(r),getPublicUrl:({bucket:e,path:r})=>t.storage.from(e).getPublicUrl(r)})});var yn={};Rt(yn,{restAdapter:()=>mn,setup:()=>Ds});var Fs,_t,Ds,mn,bn=v(()=>{"use strict";Fs=(t,e,r)=>{let n=e&&!e.startsWith("/")?"/":"",o=new URL(`${t}${n}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},_t=async(t,e)=>{let r=await globalThis.fetch(t,e),n=r.headers.get("content-type"),o=n&&n.includes("json")?await r.json():await r.text();return{data:o,error:r.ok?null:o?.message||o?.error||r.statusText,status:r.status}},Ds=async({url:t,headers:e,auth:r,fetchOptions:n})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return mn(t,e,r,n)},mn=(t,e={},r,n={})=>{let o=r?.token||null,s=l=>{let u={...e,...l};return o&&(u.Authorization=`Bearer ${o}`),u},i=l=>({...s(l),"Content-Type":"application/json"}),a=l=>({...n,...l}),c=(l,u)=>{let d=u||t;if(l&&(l.startsWith("http://")||l.startsWith("https://")))return l;let h=l&&!l.startsWith("/")?"/":"";return`${d}${h}${l||""}`};return{name:"rest",setToken:l=>{o=l},getSession:async()=>{if(!r?.sessionUrl)return o?{token:o}:null;let l=await _t(c(r.sessionUrl,r.baseUrl),a({headers:s()}));return l.error?null:l.data},signIn:async l=>{if(!r?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let u=await _t(c(r.signInUrl,r.baseUrl),a({method:"POST",headers:i(),body:JSON.stringify(l)}));return u.data?.token&&(o=u.data.token),u},signOut:async()=>(r?.signOutUrl&&await _t(c(r.signOutUrl,r.baseUrl),a({method:"POST",headers:s()})),o=null,{error:null}),select:({from:l,params:u,select:d,limit:h,offset:p,order:g,single:b,headers:m,baseUrl:y})=>{let x={...u};return d&&(x.select=d),h&&(x.limit=h),p&&(x.offset=p),b&&(x.single=!0),g&&(typeof g=="string"?x.order=g:Array.isArray(g)?x.order=g.map(_=>`${_.by}:${_.asc===!1?"desc":"asc"}`).join(","):g.by&&(x.order=`${g.by}:${g.asc===!1?"desc":"asc"}`)),_t(Fs(y||t,l||"",x),a({headers:s(m)}))},rpc:({from:l,params:u,headers:d,baseUrl:h})=>_t(c(`rpc/${l}`,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),insert:({from:l,data:u,headers:d,baseUrl:h})=>_t(c(l,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),update:({from:l,data:u,params:d,method:h,headers:p,baseUrl:g})=>{let b=d?.id||u?.id,m=b?`${l}/${b}`:l;return _t(c(m,g),a({method:h||"PATCH",headers:i(p),body:JSON.stringify(u)}))},delete:({from:l,params:u,headers:d,baseUrl:h})=>{let p=u?.id,g=p?`${l}/${p}`:l;return _t(c(g,h),a({method:"DELETE",headers:s(d)}))}}}});var Sn={};Rt(Sn,{localAdapter:()=>xn,setup:()=>Ls});var or,Ms,Ls,xn,_n=v(()=>{"use strict";or=(t,e)=>{if(!e)return!0;for(let r in e){let n=e[r];if(n===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(n)){if(!n.includes(t[r]))return!1}else if(typeof n=="object"){for(let o in n)if(o==="gt"&&!(t[r]>n[o])||o==="gte"&&!(t[r]>=n[o])||o==="lt"&&!(t[r]<n[o])||o==="lte"&&!(t[r]<=n[o])||o==="neq"&&t[r]===n[o]||o==="like"&&!String(t[r]).includes(n[o]))return!1}else if(t[r]!==n)return!1}return!0},Ms=(t,{order:e,limit:r,offset:n,single:o})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,a=e.asc!==!1;s.sort((c,f)=>c[i]<f[i]?a?-1:1:c[i]>f[i]?a?1:-1:0)}return n&&(s=s.slice(n)),r&&(s=s.slice(0,r)),o?{data:s[0]||null,error:null}:{data:s,error:null}},Ls=async({data:t,...e})=>xn(t,e),xn=(t={},e={})=>{let r={},n={},o=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=l=>{if(!r[l])if(o)try{let u=localStorage.getItem(s+l);r[l]=u?JSON.parse(u):t[l]||[]}catch{r[l]=t[l]||[]}else r[l]=t[l]||[];return r[l]},a=l=>{if(o)try{localStorage.setItem(s+l,JSON.stringify(r[l]))}catch{}},c=(l,u,d,h)=>{let p=n[l];if(p)for(let g of p)g(d,h,{event:u,table:l})},f=Date.now();return{name:"local",store:r,select:async({from:l,params:u,...d})=>{let p=i(l).filter(g=>or(g,u));return Ms(p,d)},insert:async({from:l,data:u})=>{let d=i(l),p=(Array.isArray(u)?u:[u]).map(g=>{let b={id:g.id||++f,...g};return d.push(b),b});a(l);for(let g of p)c(l,"INSERT",g,null);return{data:Array.isArray(u)?p:p[0],error:null}},update:async({from:l,data:u,params:d})=>{let h=i(l),p=[];for(let g=0;g<h.length;g++)if(or(h[g],d)){let b={...h[g]};Object.assign(h[g],u),p.push(h[g]),c(l,"UPDATE",h[g],b)}return a(l),{data:p,error:null}},delete:async({from:l,params:u})=>{let d=i(l),h=[];for(let p=d.length-1;p>=0;p--)or(d[p],u)&&(h.push(d[p]),d.splice(p,1),c(l,"DELETE",null,h[h.length-1]));return a(l),{data:h,error:null}},subscribe:({from:l,on:u},d)=>{n[l]||(n[l]=[]);let h=(p,g,b)=>{u&&u!=="*"&&u!==b.event||d(p,g,b)};return n[l].push(h),()=>{let p=n[l].indexOf(h);p>-1&&n[l].splice(p,1)}}}}});var te={};Rt(te,{createAdapter:()=>Bs,default:()=>Xs,executeFetch:()=>lr,fetchPlugin:()=>Zs,initAdapterAuth:()=>ve,parseDuration:()=>Qt,queryClient:()=>Js,registerAdapter:()=>Vs,resolveDb:()=>An});var Ns,Se,kn,Vs,Bs,An,Qt,H,On,Kt,Us,Yt,Jt,Zt,_e,ar,we,Ws,wn,sr,$n,En,Ft,vn,Gs,Cn,zs,Ce,Tn,ve,cr,tt,it,Xt,Et,ut,wt,Hs,qs,Ks,ir,Qs,lr,Js,Zs,Xs,ee=v(()=>{"use strict";D();Ns=["select","rpc","insert","update","delete","subscribe"],Se=Symbol.for("@symbo.ls/fetch:BUILTIN_ADAPTERS"),kn=(()=>{if(typeof globalThis<"u"&&globalThis[Se])return globalThis[Se];let t={supabase:()=>Promise.resolve().then(()=>(gn(),hn)),rest:()=>Promise.resolve().then(()=>(bn(),yn)),local:()=>Promise.resolve().then(()=>(_n(),Sn))};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Se,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Se]}catch{}return t})(),Vs=(t,e)=>{kn[t]=e},Bs=t=>{let e={};for(let r of Ns)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},An=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,n=typeof e=="string"?e:typeof t=="string"?t:null;if(!n)return null;let o=kn[n];if(!o)throw new Error(`Unknown db adapter: "${n}". Use registerAdapter() for adapters with optional deps.`);return(await o()).setup(r)},Qt=t=>{if(!t)return 0;if(typeof t=="number")return t;let e=t.match(/^(\d+)(ms|s|m|h)$/);if(!e)return 0;let r=parseInt(e[1]),n=e[2];return n==="ms"?r:n==="s"?r*1e3:n==="m"?r*6e4:n==="h"?r*36e5:0},H=new Map,On=new Map,Kt=new Map,Us=(t,e)=>{if(t.cache?.key)return t.cache.key;let r=zs(t.params),n=`${t.from}:${t.method}:${JSON.stringify(r||"")}`;return e?`${n}:${e}`:n},Yt=t=>H.get(t)||null,Jt=(t,e,r)=>{let n=H.get(t),o={data:e,error:r,time:Date.now(),stale:!1};H.set(t,o);let s=On.get(t);if(s)for(let i of s)k(i)&&i(o);return o},Zt=t=>{if(t){let e=H.get(t);e&&(e.stale=!0);return}for(let[,e]of H)e.stale=!0},_e=t=>{if(t){H.delete(t);return}H.clear()},ar=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)}:S(t)?{staleTime:Qt(t),gcTime:3e5}:{staleTime:Qt(t.stale||t.staleTime)||6e4,gcTime:Qt(t.gc||t.gcTime||t.expire)||3e5,key:t.key},we=null,Ws=()=>{we||(we=setInterval(()=>{let t=Date.now();for(let[e,r]of H){let n=On.get(e);!(n&&n.size>0)&&t-r.time>(r.gcTime||3e5)&&H.delete(e)}},3e4),we.unref&&we.unref())};Ws();wn=3,sr=t=>Math.min(1e3*2**t,3e4),$n=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:wn,delay:sr}:typeof e=="number"?{count:e,delay:sr}:{count:e.count??wn,delay:k(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:sr}},En=async(t,e)=>{let{count:r,delay:n}=e,o;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(o=i.error,s<r){let a=k(n)?n(s,o):n;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(o=i,s<r){let a=k(n)?n(s,i):n;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:o}},Ft={focus:new Set,online:new Set},vn=!1,Gs=()=>{if(vn||typeof window>"u")return;vn=!0;let t=()=>{for(let r of Ft.focus)r()},e=()=>{for(let r of Ft.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},Cn=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(S(t))return{from:t,method:"select",query:!0,on:"create"};if(R(t)){let n={...t};return n.from=n.from||r.__state||e.key,n.method=n.method||"select",n.on=n.on||"create",n.query===void 0&&(n.query=!0),n}return null},zs=t=>(!t||k(t),t),Ce=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},Tn=(t,e,r)=>{let n;if(!t)n=void 0;else if(k(t))n=t(e,e.state);else{n={};for(let o in t){let s=t[o];n[o]=k(s)?s(e,e.state):s}}return n},ve=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(n,o)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:n,session:o,loading:!1}})};try{let n=await t.getSession();r(n?.user||null,n)}catch(n){console.warn("[fetch] Failed to restore auth session:",n.message)}t.onAuthStateChange&&t.onAuthStateChange((n,o)=>{r(o?.user||null,o)})},cr=async(t,e)=>{if(k(t.select))return t.auth!==!1&&await ve(t,e),t;if(t.__resolved)return t.auth!==!1&&await ve(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=An(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 ve(r,e),r):null},tt=(t,e,...r)=>{let n=k(t[e])?t[e]:null;n&&n.call(t,...r,t,t.state,t.context)},it=(t,e,r,...n)=>{let o=t&&k(t[r])?t[r]:null;o&&o.call(e,...n,e,e.state,e.context)},Xt=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let o=new FormData(r);for(let[s,i]of o.entries())e[s]=i;return e}let n=r.querySelectorAll("input, textarea, select");for(let o=0;o<n.length;o++){let s=n[o],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},Et=(t,e,r,n={})=>{let o=r&&r.startsWith("~/"),s=o&&t.state?.root||t.state;if(s?.update)if(o){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&i in e?s.update(e,{preventFetch:!0,...n}):s.update({[i]:e},{preventFetch:!0,...n})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...n})}},ut=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},wt=async(t,e,r,n={})=>{let o=r?.fetch;if(!o||!e||!e.__ref||t.enabled===!1||k(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||k(t.skip)&&t.skip(e,e.state))return;let s=await cr(o,r);if(!s||!e.__ref)return;let i=e.__ref,{from:a,method:c,query:f,params:l,cache:u,transform:d,single:h,auth:p,fields:g,as:b,limit:m,offset:y,order:x,headers:_,baseUrl:w,page:C,cursor:V,getNextPageParam:ct,getPreviousPageParam:B,infinite:I,placeholderData:lt,initialData:U,select:P,keepPreviousData:ht}=t,ot=S(P)?P:void 0;if(f&&k(e.getQuery)){let T=e.getQuery(s.name||"paths");T&&(ot=T.select||T.length&&T.join(",")||ot)}let ft=Tn(l,e,r),st=ar(u),fe=$n(t),De=Ce(e,r),gs=De?`:${De}`:"",M=st?u?.key||`${a}:${c}:${JSON.stringify(ft||"")}${I?":infinite":""}${C?":p"+JSON.stringify(C):""}${gs}`:null;if(!i.__fetchInitialized&&M&&(i.__fetchInitialized=!0,U!==void 0)){let T=k(U)?U():U;Jt(M,T,null)}if((c==="select"||c==="rpc")&&M&&st){let T=Yt(M);if(T&&!T.error){let E=Date.now()-T.time,F=T.stale||E>(st.staleTime||0),O=T.data;if(k(P)&&(O=P(O,e,e.state)),d&&(O=d(O,e,e.state)),Et(e,O,b),!F){ut(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(lt!==void 0){let E=k(lt)?lt(e,e.state):lt;E!==void 0&&Et(e,E,b)}}if(M&&Kt.has(M)&&!n.force){let T=Kt.get(M);try{let E=await Promise.race([T,new Promise((F,O)=>setTimeout(()=>O("DEDUP_TIMEOUT"),15e3))]);if(E?.data!==void 0){let F=E.data;k(P)&&(F=P(F,e,e.state)),d&&(F=d(F,e,e.state)),Et(e,F,b),tt(e,"onFetchComplete",F),it(t,e,"onFetchComplete",F)}}catch{}return}let ms=!Yt(M)?.data;ut(e,{isFetching:!0,isLoading:ms,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),tt(e,"onFetchStart"),it(t,e,"onFetchStart");let gt=r?.analyze?.emitNetwork,Me=gt?typeof performance<"u"?performance.now():Date.now():0;gt&>({phase:"start",mode:"query",from:a,method:c,cacheKey:M,lang:De});let Lr=En(async()=>{if(p!==!1&&s.auth!==!1&&s.getSession){let O=await s.getSession();if(p===!0&&!O){let z={message:"Not authenticated"};return ut(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:z,status:"error",fetchStatus:"idle"}),tt(e,"onFetchError",z),it(t,e,"onFetchError",z),{data:null,error:z}}}let T=s[c];if(!k(T))return{data:null,error:{message:`Method "${c}" not found on adapter`}};let E={from:a,select:ot,params:ft,single:h,limit:m,offset:y,order:x,headers:_,baseUrl:w},F=Ce(e,r);if(F&&(E.headers={...E.headers,"Accept-Language":F}),C!==void 0){if(R(C))C.offset!==void 0&&(E.offset=C.offset),C.limit!==void 0&&(E.limit=C.limit),C.cursor!==void 0&&(E.params={...E.params,cursor:C.cursor});else if(typeof C=="number"){let O=t.pageSize||m||20;E.offset=(C-1)*O,E.limit=O}}if(V!==void 0&&(E.params={...E.params,cursor:V}),c==="insert"||c==="update"||c==="upsert"){let O;if(g===!0||t.on==="submit")O=Xt(e);else if(j(g)){let z=Xt(e);O={};for(let Le of g)O[Le]=z[Le]}else e.state?.parse?O=e.state.parse():R(e.state)&&(O={...e.state});d&&(O=d(O,e,e.state)),E.data=O}if(c==="rpc"){let O=ft;if(t.on==="submit"){let z=Xt(e);O=t.transformParams?t.transformParams(z,e,e.state):z}E.params=O}if(c==="subscribe"){let O=s.subscribe({from:a,params:ft,on:t.subscribeOn},(z,Le,La)=>{Et(e,z,b),tt(e,"onFetchComplete",z),it(t,e,"onFetchComplete",z)});return i.__unsubscribe=O,{data:null,error:null,subscribed:!0}}return T(E)},fe);M&&Kt.set(M,Lr);try{let T=await Lr;if(T?.subscribed)return;let{data:E,error:F}=T||{};if(F){M&&Jt(M,null,F),ut(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:F,status:"error",fetchStatus:"idle"}),tt(e,"onFetchError",F),it(t,e,"onFetchError",F),gt&>({phase:"error",mode:"query",from:a,method:c,cacheKey:M,error:F.message||F,durationMs:(typeof performance<"u"?performance.now():Date.now())-Me});return}if(E!==void 0){if((c==="select"||c==="rpc")&&M){let z=Jt(M,E,null);z.gcTime=st?.gcTime||3e5}let O=E;I&&j(E)&&(i.__pages||(i.__pages=[]),n.direction==="previous"?i.__pages.unshift(E):i.__pages.push(E),O=i.__pages.flat(),ct&&(i.__nextPageParam=ct(E,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),B&&(i.__prevPageParam=B(E,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),k(P)&&(O=P(O,e,e.state)),d&&(O=d(O,e,e.state)),(!ht||O!==void 0)&&Et(e,O,b),ut(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),tt(e,"onFetchComplete",O),it(t,e,"onFetchComplete",O),gt&>({phase:"success",mode:"query",ok:!0,from:a,method:c,cacheKey:M,durationMs:(typeof performance<"u"?performance.now():Date.now())-Me})}}catch(T){ut(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:T,status:"error",fetchStatus:"idle"}),tt(e,"onFetchError",T),it(t,e,"onFetchError",T),gt&>({phase:"error",mode:"query",from:a,method:c,cacheKey:M,error:T.message||String(T),durationMs:(typeof performance<"u"?performance.now():Date.now())-Me})}finally{M&&Kt.delete(M)}},Hs=(t,e,r)=>{let n=t.on,o=e.__ref;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||wt;if(n==="submit"){let i=c=>{c.preventDefault(),s(t,e,r)},a=e.node;a&&(a.addEventListener("submit",i),o.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(n==="click"){let i=()=>s(t,e,r),a=e.node;a&&(a.addEventListener("click",i),o.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else n==="stateChange"&&(o.__fetchOnStateChange=()=>s(t,e,r))},qs=(t,e,r)=>{let n=e.__ref;n.__fetchCleanups||(n.__fetchCleanups=[]),Gs();let o=t.refetchInterval;if(o){let s=typeof o=="number"?o:Qt(o);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&wt(t,e,r,{force:!0})},s);n.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=Ce(e,r),a=Us(t,i),c=Yt(a),f=ar(t.cache);(!c||c.stale||Date.now()-c.time>(f?.staleTime||0))&&wt(t,e,r,{force:!0})};Ft.focus.add(s),n.__fetchCleanups.push(()=>Ft.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>wt(t,e,r,{force:!0});Ft.online.add(s),n.__fetchCleanups.push(()=>Ft.online.delete(s))}},Ks=(t,e,r)=>{if(!e.optimistic)return null;let n=t.__ref,o=e.as,s=t.state?.parse?t.state.parse():R(t.state)?{...t.state}:t.state;n.__optimisticSnapshot=s;let i=k(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&Et(t,i,o),s},ir=(t,e)=>{let r=t.__ref,n=r.__optimisticSnapshot;n!==void 0&&(Et(t,n,e.as),delete r.__optimisticSnapshot)},Qs=async(t,e,r)=>{let n=r?.fetch;if(!n)return;let o=await cr(n,r);if(!o)return;let s=e.__ref,{method:i,from:a,fields:c,transform:f,as:l,on:u,auth:d,headers:h,baseUrl:p,invalidates:g,optimistic:b,onMutate:m,onSuccess:y,onError:x,onSettled:_}=t,w;if(c===!0||u==="submit")w=Xt(e);else if(j(c)){let B=Xt(e);w={};for(let I of c)w[I]=B[I]}else e.state?.parse?w=e.state.parse():R(e.state)&&(w={...e.state});f&&(w=f(w,e,e.state)),k(m)&&m(w,e,e.state);let C=b?Ks(e,t,w):null;s.__fetching=!0,ut(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),tt(e,"onFetchStart"),it(t,e,"onFetchStart");let V=r?.analyze?.emitNetwork,ct=V?typeof performance<"u"?performance.now():Date.now():0;V&&V({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&o.auth!==!1&&o.getSession){let ft=await o.getSession();if(d===!0&&!ft){C!==void 0&&ir(e,t);let st={message:"Not authenticated"};tt(e,"onFetchError",st),it(t,e,"onFetchError",st);return}}let B=o[i];if(!k(B))return;let I={from:a,data:w,headers:h,baseUrl:p};t.params&&(I.params=Tn(t.params,e,r));let lt=Ce(e,r);lt&&(I.headers={...I.headers,"Accept-Language":lt});let U=$n(t),P=await En(()=>B(I),U),{data:ht,error:ot}=P||{};if(ot){C!==void 0&&ir(e,t),ut(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:ot,status:"error",fetchStatus:"idle"}),tt(e,"onFetchError",ot),k(x)&&x(ot,w,e),k(_)&&_(null,ot,w,e),V&&V({phase:"error",mode:"mutation",from:a,method:i,error:ot.message||String(ot),durationMs:(typeof performance<"u"?performance.now():Date.now())-ct});return}if(delete s.__optimisticSnapshot,ht!==void 0){let ft=l?{[l]:ht}:ht;e.state?.update&&e.state.update(ft,{preventFetch:!0})}if(ut(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),tt(e,"onFetchComplete",ht),it(t,e,"onFetchComplete",ht),k(y)&&y(ht,w,e),k(_)&&_(ht,null,w,e),V&&V({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-ct}),g){let ft=j(g)?g:[g];for(let st of ft)if(st===!0||st==="*")for(let[fe]of H)fe.startsWith(a+":")&&Zt(fe);else Zt(st)}}catch(B){C!==void 0&&ir(e,t),ut(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:B,status:"error",fetchStatus:"idle"}),tt(e,"onFetchError",B),it(t,e,"onFetchError",B),k(x)&&x(B,w,e),k(_)&&_(null,B,w,e),V&&V({phase:"error",mode:"mutation",from:a,method:i,error:B.message||String(B),durationMs:(typeof performance<"u"?performance.now():Date.now())-ct})}finally{s.__fetching=!1}},lr=(t,e,r,n)=>{if(!t||!n?.fetch)return;let s=It(t,e);if(!s)return;let i=j(s)?s.map(c=>Cn(It(c,e),e)).filter(Boolean):[Cn(s,e)].filter(Boolean);for(let c of i){let f=c.method==="insert"||c.method==="update"||c.method==="upsert"||c.method==="delete",l=f?Qs:wt;c.on==="create"?l(c,e,n):Promise.resolve().then(()=>{Hs({...c,__runner:l},e,n)}),!f&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&qs(c,e,n)}let a=e.__ref;a.refetch=c=>{for(let f of i)wt(f,e,n,{force:!0,...c})},a.fetchNextPage=()=>{let c=i[0];if(!c||!c.infinite)return;let f=a.__nextPageParam;if(f==null)return;let l={...c,cursor:f};wt(l,e,n,{direction:"next",force:!0})},a.fetchPreviousPage=()=>{let c=i[0];if(!c||!c.infinite)return;let f=a.__prevPageParam;if(f==null)return;let l={...c,cursor:f};wt(l,e,n,{direction:"previous",force:!0})}},Js={invalidateQueries:t=>{if(!t){Zt();return}if(S(t))for(let[e]of H)(e.startsWith(t)||e.includes(t))&&Zt(e);else if(j(t)){let e=t.join(":");for(let[r]of H)r.includes(e)&&Zt(r)}},removeQueries:t=>{if(!t){_e();return}if(S(t))for(let[e]of H)(e.startsWith(t)||e.includes(t))&&_e(e)},getQueryData:t=>Yt(t)?.data??void 0,setQueryData:(t,e)=>{let r=Yt(t),n=k(e)?e(r?.data):e;Jt(t,n,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let n=await cr(r,e);if(!n)return;let o=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=n[t.method||"select"];if(!k(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=Jt(o,i.data,null);a.gcTime=ar(t.cache)?.gcTime||3e5}return i},getCache:()=>H,clear:()=>_e(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of H)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||_e(r))}},Zs={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||Kt.clear(),lr(e,t,t.state,t.context))}},Xs=lr});function Rn(t){let e=this,{__ref:r}=e,n=[].concat(t),o=r.root[n[0]];if(!n||!n.length)return console.log(n,"on",e.key,"is undefined");for(;o.key===n[0]&&(n.shift(),!!n.length);)if(o=o[n[0]],!o)return;return o}function In(){return this.getRef("__children").map(t=>this[t])}function Fn(){return this.getRef().path}function Dn(t){let e=null,r=n=>n.__element&&n.root?.isRootState;if(!this)e=jn();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let n=this.state&&r(this.state),o=k(this.state)&&this.parent.state&&r(this.parent.state);(n||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=jn()),t?e?.[t]:e}function Mn(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function Ln(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function Nn(t){let e=this.getRoot()?.context;return t?e[t]:e}function Vn(t){let e=this.context;return t?e[t]:e}function ur(...t){if(Dt!=="test"&&Dt!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(n=>console.log(`%c${n}:
|
|
2
|
+
`,"font-weight: bold",e[n])):(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 Bn(...t){(Dt==="test"||Dt==="development")&&console.warn(...t)}function Un(...t){if(Dt==="test"||Dt==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&ur.call(this),new Error(...t)}}function Wn(){let t=this,{key:e,parent:r}=t,{__children:n}=r.__ref,o=n.indexOf(e),s=n[o+1];return r[s]}function Gn(t){let e=t||this,{key:r,parent:n}=e,{__children:o}=n.__ref;if(!o)return;let s=o.indexOf(r);return n[o[s-1]]}function zn(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let r=e.data.varCaches,n={},o;for(let s in t)t[s]!==r[s]&&(o=!0,n[s]=t[s]);return{changed:s=>{if(!o)return;let i=s(n,$t(r));for(let a in n)r[a]=n[a];return i},timeout:(s,i)=>{if(!o)return;let a=setTimeout(()=>{s(n),clearTimeout(a)},i)}}}async function Hn(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(ee(),te));await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(ee(),te));await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(ee(),te)).then(({resolveDb:o})=>o(e));e.__resolving=r;let n=await r;if(e.__resolved=n,t.context.fetch=n,delete e.__resolving,n.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(ee(),te));await o(n,t.context)}return n}function qn(t){let e=this,r=t||un.useStateQuery||e.context?.useStateQuery;if(!r)return null;let n={};if(fr(e,n),r===!0)return n;let o=ai[r];return o?o(n):n}var Dt,Ys,jn,fr,ti,Kn,ei,ri,ni,oi,si,ii,ai,Qn=v(()=>{Ht();be();rr();Dt="production";Ys=null,jn=()=>Ys||null;fr=(t,e)=>{let r=t.__ref;if(!r)return;let n=r.__state;n&&typeof n=="string"&&ti(e,n);let o=r.__children;if(o)for(let a=0;a<o.length;a++){let c=t[o[a]];c&&c.__ref&&fr(c,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&fr(i,e)},ti=(t,e)=>{let r=e.replaceAll("../","").replaceAll("~/","").split("/"),n=t;for(let o=0;o<r.length;o++){let s=r[o];o===r.length-1?n[s]||(n[s]=!0):(n[s]===!0&&(n[s]={}),n[s]||(n[s]={}),n=n[s])}},Kn=(t,e=0)=>{let r=" ".repeat(e),n=Object.entries(t);return n.length?n.map(([o,s])=>s===!0?`${r}${o}`:`${r}${o} {
|
|
3
|
+
${Kn(s,e+1)}
|
|
4
|
+
${r}}`).join(`
|
|
5
|
+
`):""},ei=t=>`{
|
|
6
|
+
${Kn(t,1)}
|
|
7
|
+
}`,ri=t=>{let e={fields:{},include:[]},r=(n,o)=>{let s=[];for(let i in n)if(n[i]===!0)s.push(i);else{let a=o?`${o}.${i}`:i;e.include.push(a),r(n[i],a)}s.length&&(e.fields[o||"_root"]=s)};return r(t,""),e},ni=t=>{let e=s=>{let i=[],a=[];for(let c in s)if(s[c]===!0)i.push(c);else{let f=e(s[c]),l=[];f.select&&l.push(`$select=${f.select}`),f.expand&&l.push(`$expand=${f.expand}`),a.push(l.length?`${c}(${l.join(";")})`:c)}return{select:i.length?i.join(","):"",expand:a.length?a.join(","):""}},{select:r,expand:n}=e(t),o=[];return r&&o.push(`$select=${r}`),n&&o.push(`$expand=${n}`),o.join("&")},oi=(t,e)=>{let r=[],n=[],o=new Set,s=(l,u,d)=>{o.add(u),d&&n.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let h in l)l[h]===!0?r.push(`${u}.${h}`):s(l[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=[...o][0]||"_root",c=r.length?r.join(", "):"*",f=n.length?`
|
|
8
|
+
`+n.join(`
|
|
9
|
+
`):"";return`SELECT ${c}
|
|
10
|
+
FROM ${a}${f}`},si=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;n[s]===!0?e.push(i):r(n[s],i)}};return r(t,""),e},ii=t=>{let e=n=>{let o=[];for(let s in n)n[s]===!0?o.push(s):o.push(`${s}(${e(n[s])})`);return o.join(", ")},r=Object.keys(t);return r.length===1&&t[r[0]]!==!0?{from:r[0],select:e(t[r[0]])}:{from:null,select:e(t)}},ai={graphql:ei,"json-api":ri,odata:ni,sql:oi,supabase:ii,paths:si}});var Jn=v(()=>{});var Zn=v(()=>{});var Xn=v(()=>{});var Yn=v(()=>{});var to=v(()=>{});var eo=v(()=>{});var ro=v(()=>{});var no=v(()=>{});var oo=v(()=>{});var so=v(()=>{});var io=v(()=>{});var ao=v(()=>{});var co,lo,fo,uo=v(()=>{Ht();co=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,"")),lo=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),fo=t=>{if(j(t))return t;if(S(t))return t.split(" ");if(R(t))return Object.values(t);if(ye(t))return[t]}});var po=v(()=>{});var ho=v(()=>{});var D=v(()=>{Qr();Zr();Ht();be();Xr();Xe();Ze();Yr();tn();zr();ge();en();rn();on();sn();nn();an();cn();tr();ln();Qn();rr();Jn();fn();Zn();Xn();Yn();to();eo();ro();no();oo();so();io();ao();uo();po();ho()});var Da={};Rt(Da,{FACTORY:()=>Ee,REGISTRY:()=>q,applyExtends:()=>ie,batch:()=>yt,create:()=>nt,createEffect:()=>L,createElement:()=>Ia,createSignal:()=>mt,createStore:()=>X,getActiveConfig:()=>$,getObserver:()=>Ut,mount:()=>Fa,popConfig:()=>J,pushConfig:()=>et,registerEvent:()=>se,setObserver:()=>Ue});var xt=null,ue=0,de=[],Ut=()=>xt,Ue=t=>{xt=t};function mt(t){let e=new Set;function r(){return xt&&(e.add(xt),xt._sources.add(s)),t}function n(i){i!==t&&(t=i,Cs(e))}function o(){return t}let s={get:r,set:n,peek:o,_subscribers:e,_type:"signal"};return s}var Ve=new Set,Be=!1;function L(t,e){let r=e?.depth??0,n={_sources:new Set,_type:"effect",_depth:r,_disposed:!1,_subscribers:new Set,_execute(){if(n._disposed)return;Nr(n);let o=xt;xt=n;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{xt=o}},_notify(){n._disposed||(ue>0?de.push(n):Vr(n))},dispose(){n._disposed=!0,Nr(n)}};return n._execute(),n}function yt(t){ue++;try{t()}finally{ue--,ue===0&&vs()}}function Vr(t){Ve.add(t),Be||(Be=!0,queueMicrotask(ws))}function ws(){Be=!1;let t=Array.from(Ve).sort((e,r)=>e._depth-r._depth);Ve=new Set;for(let e=0;e<t.length;e++){let r=t[e];r._disposed||r._execute()}}function vs(){for(let t=0;t<de.length;t++)Vr(de[t]);de.length=0}function Cs(t){let e=Array.from(t);for(let r=0;r<e.length;r++)e[r]._notify()}function Nr(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var pe=Symbol("store"),ks=Symbol("signals"),We=t=>!t||typeof t!="object"||Array.isArray(t)||t[pe]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName;function X(t,e,r){r===void 0&&(r=0);let n={},o={},s=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let m in t){let y=t[m];r<s&&y&&typeof y=="object"&&!We(y)?(o[m]=y,n[m]=mt(X(y,e,r+1))):(o[m]=y,n[m]=mt(y))}let i=new Proxy(o,{get(m,y){if(y===pe)return!0;if(y===ks)return n;if(y==="__raw")return m;if(y==="update")return a;if(y==="parse")return f;if(y==="clean")return l;if(y==="keys")return u;if(y==="values")return d;if(y==="replace")return h;if(y==="add")return p;if(y==="remove")return g;if(y==="destroy")return b;if(y==="quietUpdate")return c;if(y==="__element")return m.__element;if(y==="parent")return m.parent;if(y==="root")return m.root;if(Object.prototype.hasOwnProperty.call(n,y))return n[y].get();if(m[y]!==void 0)return m[y];if(y!=="root"&&m.root&&m.root!==i)return m.root[y];if(typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&Ut()!=null)return n[y]=mt(void 0),n[y].get()},set(m,y,x){return y==="__element"||y==="parent"||y==="root"?(m[y]=x,!0):(Object.prototype.hasOwnProperty.call(n,y)?(m[y]=x,x&&typeof x=="object"&&!We(x)?n[y].set(X(x,e,r+1)):n[y].set(x)):(m[y]=x,x&&typeof x=="object"&&!We(x)?n[y]=mt(X(x,e,r+1)):n[y]=mt(x)),!0)},has(m,y){return y in n||y in m},ownKeys(m){return Object.keys(n)},getOwnPropertyDescriptor(m,y){return y in n?{enumerable:!0,configurable:!0,value:n[y].peek()}:Object.getOwnPropertyDescriptor(m,y)},deleteProperty(m,y){return n[y]&&(n[y].set(void 0),delete n[y]),delete m[y],!0}});function a(m,y){yt(()=>{for(let _ in m)i[_]=m[_]});let x=o.__element;return x&&x.onUpdate&&!y?.quiet&&x.onUpdate(x,i,x.context),i}function c(m){return a(m,{quiet:!0})}function f(m){if(m||(m=new Set),m.has(i))return"[Circular]";m.add(i);let y={};for(let x in n){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let _=n[x].peek();_&&_[pe]?y[x]=_.parse(m):y[x]=_}return y}function l(){return yt(()=>{for(let m in n)delete i[m]}),i}function u(){return Object.keys(n)}function d(){return Object.keys(n).map(m=>n[m].peek())}function h(m){return yt(()=>{for(let y in n)y in m||delete i[y];for(let y in m)i[y]=m[y]}),i}function p(m,y){return i[m]=y,i}function g(m){return delete i[m],i}function b(){l(),o.__element=null,o.parent=null}return i}function Y(t){return t&&t[pe]===!0}var Ge="http://www.w3.org/2000/svg",qe=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"]),As=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 ze(t){return As.has(t)||qe.has(t)}function Ke(t){return qe.has(t)}function Wt(t){let{tag:e,key:r}=t;if(typeof e=="function"&&(e=e(t)),e===!0&&(e=r),typeof e=="string"&&ze(e))return e;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),ze(o)&&!n.has(o)?o:"div"}var Br={};function He(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(Ke(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===Ge)return r.createElementNS(Ge,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Gt(t){let e=t.tag=Wt(t),n=Ke(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Ge)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=Br[n];if(s||(s=Br[n]=He(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?He(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var q=new Set(["extends","children","content","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","__name","__ref","__hash","__text","parent","node"]);var zt=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","error","beforeRemove","remove"]),Ur=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Qe=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","scroll","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var Je=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",he=["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"];D();var go=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];if(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&&Ot&&Q){let e=Ot.body.appendChild(Ot.createElement("fictum")),r="rgb(1, 2, 3)";if(e.style.color=r,e.style.color!==r){Ot.body.removeChild(e);return}if(e.style.color=t,e.style.color===r||e.style.color==="")return Ot.body.removeChild(e),[0,0,0,0];t=Q.getComputedStyle(e).color,Ot.body.removeChild(e)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(e=>+e)):[0,0,0,0]};var ci=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,n,o]};var li=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1);var fi=(t,e,r)=>{let n=Math.max(t,e,r),o=n-Math.min(t,e,r),s=1-Math.abs(n+n-o-1),i=o&&(n==t?(e-r)/o:n==e?2+(r-t)/o:4+(t-e)/o);return[60*(i<0?i+6:i),s?o/s:0,(n+n-o)/2]},ui=(t,e,r,n=e*Math.min(r,1-r),o=(s,i=(s+t/30)%12)=>r-n*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],di=(t,e)=>{let r=parseInt(t,16),n=(r>>16)+e;n>255?n=255:n<0&&(n=0);let o=(r>>8&255)+e;o>255?o=255:o<0&&(o=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|o<<8|n<<16)+16777216).toString(16).slice(1)};var W=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Tt=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,pi=/^([a-zA-Z]\w*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,re=t=>{if(!S(t))return null;if(Tt.test(t))return{passthrough:t};if(W(t))return{cssVar:t};let e=t.match(pi);if(!e)return null;let[,r,n,o]=e,s=n!==void 0?`0.${n}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:r,alpha:s,tone:i}},Mt=t=>S(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),ke=t=>{let e=[],r="",n=0;for(let o of t){if(o==="("?n+=1:o===")"&&n>0&&(n-=1),o===","&&n===0){e.push(r),r="";continue}r+=o}return(r.length||!e.length)&&e.push(r),e},mo=(t,e)=>{S(t)&&t.includes("rgb")&&(t=go(t).join(", ")),S(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),ye(e)&&(e+="");let r=li(t),n=e.slice(0,1);if(n==="-"||n==="+"){let o=di(r,parseFloat(e));return ci(o).join(", ")}else{let[o,s,i]=t,a=fi(o,s,i),[c,f,l]=a;return ui(c,f,parseFloat(e)/100*255)}};var dr=(t,e)=>{if(t[e])return t[e].value;if(t.default)return t[t.default].value;let r=Object.keys(t)[0];return r&&t[r]&&t[r].value};D();D();D();var Ae={};Rt(Ae,{animation:()=>Ii,breakpoints:()=>Pi,class:()=>Vi,color:()=>vi,devices:()=>Ri,document:()=>ji,font:()=>mi,fontFace:()=>xi,fontFamily:()=>yi,fontFamilyTypes:()=>bi,gradient:()=>Ci,grid:()=>Ni,icons:()=>Oi,media:()=>Si,reset:()=>Bi,semanticIcons:()=>$i,sequence:()=>jt,shadow:()=>Ai,spacing:()=>wi,svg:()=>Fi,svgData:()=>Di,templates:()=>Mi,theme:()=>ki,timing:()=>Ti,typography:()=>pr,unit:()=>hi,vars:()=>Ui});var jt={"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 hi={default:"em"};var gi={browserDefault:16,base:16,type:"font-size",ratio:jt["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},pr=gi;var mi={};var yi={},bi={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},xi={};var Si={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var _i={base:pr.base,type:"spacing",ratio:jt.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},wi=_i;var vi={},Ci={};var ki={};var Ai={};var Oi={},$i={};var Ei={default:150,base:150,type:"timing",ratio:jt["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Ti=Ei;var ji={};var Pi={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Ri={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 Ii={};var Fi={},Di={};var Mi={};var Li={},Ni=Li;var Vi={};var Bi={},Ui={};var yo={},bo={},Oe=Ae,$e={},xo=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Oe){let e=t.toLowerCase();$e[e]=Oe[t];let r=xo(e);r!==e&&($e[r]=Oe[t]),e!==t&&($e[t]=Oe[t])}var hr={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:yo,cssMediaVars:bo,CSS_VARS:yo,CSS_MEDIA_VARS:bo,_scratchConfig:!0,...$e},Tf=$t(hr),Ee={active:"0",0:hr};var ne=[],et=t=>{t&&t._scratchConfig&&ne.push(t)},J=()=>{ne.pop()},$=t=>ne.length?ne[ne.length-1]:Ee[t||Ee.active]||hr;var Te={"-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"},So=(t,e)=>{let{key:r,variable:n,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:n},e.scales[r]=s;let c=_o.has(e.unit)?"rem":e.unit;e.vars[n]=s+c},Lt=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},_o=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Wi=(t,e)=>{let{base:r,type:n,unit:o}=e,s=_o.has(o)?"rem":o,i=(Je(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(n&&n.replace(".","-")),f=`${c}-ratio`;if(t>0){let l=Te[t-1];return`calc(var(${c}-${l}) * var(${f}))`}if(t<0){let l=Te[t+1],u=Math.abs(t),d=Math.pow(wo,2*u),h=Te[u];return h?`max(calc(var(${c}-${l}) / var(${f})), calc(var(${c}-${h}) / ${d.toFixed(4)}))`:`calc(var(${c}-${l}) / var(${f}))`}},Gi=(t,e,r,n)=>{let{type:o}=n,i=t===2&&e.length===2?t+1:t,f=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${f+i}))`},zi=(t,e)=>{let n=(t*e-t)/1.618,o=t*e-n,s=t+n,i=(o+s)/2;return[o,i,s]};var Hi=(t,e)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:a}=t,f=~~(o*s)-~~o,l,[u,d,h]=zi(o,s);f>16?l=[u,d,h]:l=[u,h],l.forEach((p,g)=>{let b=~~(p/n*1e3)/1e3,m=i+(g+1),y=a+(g+1)/10,x=Gi(g+1,l,i,e),_={key:r+(g+1),variable:m,value:p,scaling:b,scalingVariable:x,index:y};So(_,e)})},wo=1.618,qi=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let n=Math.abs(t),o=e*Math.pow(r,t),s=e*Math.pow(r,n)/Math.pow(wo,2*n);return Math.max(o,s)},je=t=>{let{type:e,base:r,ratio:n,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let f=0;f<=i;f++){let l=o[1]-f,u=Te[l],d=qi(l,r,n),h=~~(d/r*100)/100,p=c+u,g=Wi(l,t),b={key:u,variable:p,value:d,base:r,scaling:h,scalingVariable:g,ratio:n,index:l};So(b,t),s&&Hi(b,t)}return t};var vo=(t="A",e)=>{let r=$(),{unit:n}=r;if(S(t)&&W(t))return`var(${t})`;let{sequence:o,unit:s=n.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(he.some(x=>t.includes(x))||!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+"-":""}${lo(e.type.replace(".","-"))}-`,h=t.toUpperCase(),p=h.slice(0,1)==="-"?"-":"",g=p?h.slice(1):h,b="";g.includes("_")&&(b="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let m=x=>a.test(x)?`var(${d}${x}${b})`:x;if(g.includes("+")){let[x,_]=g.split("+"),w=`${m(x)} + ${m(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}else if(g.includes("*")){let[x,_]=g.split("*"),w=`${m(x)} * ${m(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}else if(g.includes("-")){let[x,_]=g.split("-"),w=`${m(x)} - ${m(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}if(!o[g]&&g.length===2&&(r.verbose&&console.warn(g,"- value is not found because `subSequence` is set to false"),g=g.slice(0,1)),i||r.useVariable){let x=`var(${d}${g}${b})`;return p?`calc(${x} * -1)`:x}let y=o?o[g]:null;return y?s==="ms"||s==="s"?p+y.val+s:p+y.scaling+s:console.warn("can't find",o,g)},Ki=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let n=/(\s*[+\-*/,]\s*)/;return t.split(n).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:vo(i,e)}).join("")},Pt=(t,e,r,n)=>{if(typeof t!="string")return $().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!n&&t.includes("(")){let s=Lt(t);n=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Ki(t,r):t=vo(t,r),{[e]:n?`${n}(${t})`:t}};D();var Hf=er();var Qi="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",qf=new RegExp(`<(${Qi})\\b([^>]*?)\\s*/>`,"g");D();var dt=(t,e,r)=>{let n=r||$();if(!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(W(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(j(t))[o,s,i]=t;else{let u=re(t);if(!u){let{color:d,gradient:h}=n,p=h[t]||d[t];return p?n.useVariable?`var(${p.var})`:p.value:t}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=n,f=a[o]||c[o];if(!f)return n.verbose&&console.warn("Can't find color ",o),t;e&&(f[e]?f=f[e]:n.verbose&&console.warn(t," - does not have ",e));let l=f.rgb;return l?(i&&!f[i]&&(l=mo(l,i),f[i]={rgb:l,var:`${f.var}-${i}`}),f[i]&&(l=f[i].rgb),s?`rgba(${l}, ${s})`:i?`rgba(${l}, 1)`:n.useVariable?`var(${f.var})`:`rgb(${l})`):n.useVariable?`var(${f.var})`:f.value},rt=(t,e,r)=>{let n=r||$();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(W(t))return`var(${t})`;let o;if(j(t))o=t[0];else{let f=re(t);if(!f)return t;if(f.passthrough)return f.passthrough;if(f.cssVar)return`var(${f.cssVar})`;o=f.name}let{color:s,gradient:i}=n,a=s[o]||i[o],c=R(a);if(c&&a.value)return dt(t,`@${e}`,r);if(c){if(n.useVariable&&a.var)return`var(${a.var})`;if(e)return dt(t,`@${e}`,r);{let f={};for(let l in a){if(l.charCodeAt(0)!==64)continue;let u=n.media[l.slice(1)];if(!u)continue;let d="@media "+(u==="print"?`${u}`:`screen and ${u}`);f[d]=dt(t,l,r)}return f}}else return n.verbose&&console.warn("Can't find color",t),t};D();var gr=t=>{let e=$(),r={};for(let n in t){let o=n.slice(0,1);if(St(t[n])){if(o==="@")continue;o===":"?r[`&${n}`]=gr(t[n]):o==="."&&(r[`&${n}`]=gr(t[n]))}else r[n]=t[n]}return r},ko=(t,e)=>{let r=e.shift();return t[r]?ko(t[r],e):t},Co=(t,e)=>j(e)?ko(t,e):S(e)&&t[e]?t[e]:t;var oe=(t,e)=>{let r=$();if(S(t)&&W(t)&&(t=oe(t.slice(2))),!t||!S(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[n,...o]=j(t)?t:t.split(" "),s=r.theme[n];return s&&o.length?s=Co(s,o):s&&e&&(s=Co(s,e)),gr(s)};var Ao=(t,e)=>{let r=$(),{fontFamily:n}=r;return dr(e||n,t)};var $o=t=>{let e=$(),{typography:r}=e;return Pt(t,"fontSize",r)};D();D();var Eo=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n};var Xi=t=>{let e=$(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:je(t)},G=(t,e="padding",r,n)=>{let o=Xi(r);if(S(t)&&!n&&t.includes("(")){let i=Lt(t);n=i[0],t=i[1]}let s=n?[t]:fo(t);if(j(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=(f,l)=>Pt(s[l],e+f+i,o,n);return a[s.length].map((f,l)=>c(f,l))}return Pt(t,e,o,n)}},Nt=(t,e,r,n)=>{let o=$(),{spacing:s}=o,i=r||t[e];if(!n&&S(i)&&i.includes("(")){let a=Lt(i);n=a[0],i=a[1]}if(t.spacingRatio){let a=applyCustomSequence(t);return G(i,e,a,n)}return G(i,e,s,n)},To=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),o=he.some(i=>t.includes(i));return n||o?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};D();var jo=(t,e)=>{let r=$();if(e||(e=r.globalTheme),!S(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(W(t))return`var(${t})`;let[n]=j(t)?t:t.split(" "),s=r.shadow[n],i=R(s);if(!s)return r.verbose&&console.warn("Can't find color ",n),t;if(e){if(s[e])return s[e].value;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){let f=r.media[c.slice(1)],l="@media "+(f==="print"?`${f}`:`screen and ${f}`);a[l]=s.value}return a}return r.verbose&&console.warn("Can't find color",t),t};D();var bt=t=>{let e=$(),{timing:r}=e;return r[t]||r[co(t)]||t},pt=(t,e="timing")=>{let r=$(),{timing:n}=r;return Pt(t,e,n)};D();var ta=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),ea=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),ra=t=>ta.has(t),vt=t=>{let e=t+"";if(Tt.test(e))return e;let r=e.trim();return r==="none"||r==="0"||r==="initial"||r==="inherit"||r==="unset"?e:e.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(W(o))return`var(${o})`;if(ra(o)||/^\d/.test(o)||o==="0")return o;let s=dt(o);if(Mt(s))return s;let i=G(o,"border");return i&&i.border?i.border:o}).join(" ")},Po=t=>Tt.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(W(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=dt(e);return Mt(r)?r:e}).join(" "),Ro=(t,e)=>jo(t,e),mr=(t,e)=>Tt.test(t)?t:ke(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(W(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let o=dt(n);if(Mt(o)){let i=rt(n,e);return R(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em")return n;let s=G(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", "),yr=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let n=t.slice(0,r+1),o=t.slice(r+1,t.lastIndexOf(")")),s=")",a=ke(o).map(c=>(c=c.trim(),c.split(/\s+/).map(l=>{if(!l||/^\d/.test(l)||l==="0"||ea.has(l)||l==="transparent"||Tt.test(l))return l;let u=dt(l);return Mt(u)?u:l}).join(" ")));return n+a.join(", ")+s},Io=(t,e)=>{let r=$();return t.split(", ").map(n=>W(n)?`var(${n})`:n.includes("url")?n:n.includes("gradient")?yr(n,e):r.gradient[t]?{backgroundImage:rt(t,e||r.globalTheme)}:n.includes("/")||n.startsWith("http")||n.includes(".")&&!re(n)?`url(${n})`:n).join(" ")},Fo=t=>S(t)&&t.split(" ").map(e=>G(e,"gap").gap).join(" "),na=t=>{let e=t.split(" ");return e.length?e.map(r=>W(r)?`var(${r})`:r.length<3||r.includes("ms")?pt(r).timing||r:bt(r)?bt(r):r).join(" "):t},br=(t,e,r)=>{if(S(t))return t.split(",").map(n=>pt(n).timing||n).join(",")},Do=t=>{let e=t.split(",");if(e.length)return e.map(na).join(",")};function N(t,e,r={},n={}){let o=It.call(this,e||r[t]);if(o==null)return;let s;if(S(o)){if(o.includes("(")){let c=Lt(o);s=c[0],o=c[1]}let i=r.scaleBoxSize,a=Eo(t);!i&&a&&!n.ratio&&(o=To(o))}return n.ratio?Nt(r,t,o,s):G(o,t,void 0,s)}var A=(t,e=null,r)=>N(t,e,r,{ratio:!0}),xr=(t,e,r)=>{if(S(t))return{borderRadius:t.split(" ").map((n,o)=>Nt(e,r,n)[r]).join(" ")}};var Sr=new WeakMap,oa={passive:!0},sa={passive:!0,capture:!0},_r=(t,e)=>Ur.has(t)?e?sa:oa:e||!1;function Lo(t){let e=Sr.get(t);return e||(e={handlers:new Map,installed:new Set},Sr.set(t,e)),e}function ia(t,e){let r=Lo(e);if(r.installed.has(t))return;r.installed.add(t);let n=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",o=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(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},_r(t,n))}function No(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=Lo(n);ia(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function Vo(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=Sr.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function Mo(t){return Qe.has(t)&&!zt.has(t)}function se(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=o?.designSystem,i=a=>{s&&et(s);try{let c=r.call(e,a,e,e.state,o);if(c&&typeof c.then=="function"){c.catch(f=>{e.error=f,console.error("[DOMQL] Async event error:",f)}).finally(()=>{s&&J()});return}}catch(c){if(e.error=c,console.error("[DOMQL] Event error:",c),o?.strictMode)throw c}s&&J()};if(Mo(t)){let a=o?.rootNode||n.ownerDocument?.documentElement;No(t,n,i,a)}else n.addEventListener(t,i,_r(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(Mo(t)){let a=o?.rootNode||n.ownerDocument?.documentElement;Vo(t,n,a)}else n.removeEventListener(t,i,_r(t,!1))})}function Bo(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 ie(t,e,r){let n=Bo(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let a=Uo(n[i],s);a&&a!==e&&Wo(t,a,r,new Set([e]))}}function Uo(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(o=>o.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function Wo(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=Bo(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=Uo(o[a],i);c&&Wo(t,c,r,n)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=Go(t[s],i):t[s]=i}}function Go(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Go(o,s):r[n]=s}return r}var ae=(t,e,...r)=>{let n=e?.context?.plugins;if(!n)return!1;let o=!1;for(let s of n)typeof s[t]=="function"&&(s[t](e,...r),o=!0);return o};function wr(t={},e={}){let r=this,n=r.__ref;if(n){if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&r.onBeforeUpdate(r,r.state,r.context,e)===!1)return r;if(yt(()=>{if(t.state&&Y(r.state)&&r.state.update(t.state),t.text!==void 0&&(r.text=t.text,!n.__exec.text&&r.node&&(r.tag==="string"?r.node.nodeValue=t.text??"":r.node.textContent=t.text??"")),t.html!==void 0&&(r.html=t.html,!n.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!n.__exec.style)for(let o in t.style){let s=t.style[o];if(s==null)continue;let i=o.replace(/[A-Z]/g,c=>"-"+c.toLowerCase()),a=String(s).replace(/\s*!important\s*$/,"");r.node.style.setProperty(i,a,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let o in t.attr){let s=t.attr[o];s==null||s===!1?r.node.removeAttribute(o):typeof s!="function"&&typeof s!="object"&&r.node.setAttribute(o,s===!0?"":s)}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let o in t.data)r.node.dataset[o]=t.data[o];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let o in t){if(q.has(o)||o==="state")continue;let s=t[o],i=r[o];if(i&&i.__ref&&typeof i.update=="function")i.update(s,e);else if(typeof s=="object"&&s!==null){let a=o.charCodeAt(0);a>=65&&a<=90&&nt(s,r,o,e)}else o!=="text"&&o!=="html"&&o!=="style"&&o!=="attr"&&o!=="data"&&(r[o]=s)}}),r.node&&n.__conditionalRunners)for(let o of n.__conditionalRunners)o();return ae("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}}function vr(t){if(!t)return;let e=t.__ref;if(e){try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(r){console.error("[smbls] onBeforeRemove error:",r)}if(e.__effects){for(let r=0;r<e.__effects.length;r++)e.__effects[r].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let r=0;r<e.__eventCleanup.length;r++)e.__eventCleanup[r]();e.__eventCleanup.length=0}if(e.__children){for(let r=0;r<e.__children.length;r++){let n=e.__children[r],o=t[n];o&&o.__ref&&vr(o)}e.__children.length=0}if(t.node?.parentNode&&t.node.remove(),t.state?.destroy&&t.state.__element===t&&t.state.destroy(),t.parent?.__ref?.__children){let r=t.parent.__ref.__children.indexOf(t.key);r!==-1&&t.parent.__ref.__children.splice(r,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(r){console.error("[smbls] onRemove error:",r)}t.node=null,t.parent=null,t.__ref=null}}function Cr(){vr(this)}D();var ce=new Map,aa=null,zo=null;function Qo(){try{let t=$();if(t?.document)return t.document}catch{}return typeof document<"u"?document:null}var ca={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 Pe(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Re(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 la(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Re(e)}function Ho(t,e,r){let n=(r?r+"":"")+t+":"+e,o=ce.get(n),s=o?null:Pe(t);if(!o){let a=ca[t]||Re(t),c=la(e);o=r?`_${r}_${a}-${c}`:`_${a}-${c}`,ce.set(n,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=`.${o}{${s||Pe(t)}:${e}}`;return Ct(i),o}var qo=new WeakMap;function Ct(t,e){let r=fa(e);if(!r)return;let n=qo.get(r);if(n||(n=new Set,qo.set(r,n)),!n.has(t)){n.add(t);try{r.insertRule(t,r.cssRules.length)}catch{}}}var Ko=new WeakMap;function fa(t){let e=t||Qo();if(!e||!e.head)return null;let r=Ko.get(e);if(r&&r.ownerNode&&r.ownerNode.parentNode===e.head)return r;let n=e.head.querySelector("style[data-smbls]");n||(n=e.createElement("style"),n.setAttribute("data-smbls",""),e.head.appendChild(n));let o=n.sheet;return Ko.set(e,o),aa=o,o}var ua=8;function Ar(t,e,r){if(!t||typeof t!="object")return"";let n=null,o=0,s=[];for(let i in t){let a=t[i];a==null||a===!1||a===""||(typeof a=="object"?s.push(da(i,a,r)):zo?(n||(n=[]),n.push(i,String(a)),o++):s.push(Ho(i,String(a),r)))}if(n&&o>=ua){let i=n.join("\0"),a=zo(i),c=a.indexOf("\0"),f=a.substring(0,c),l=a.substring(c+1);if(l){let u=l.split(`
|
|
11
|
+
`);for(let d=0;d<u.length;d++)u[d]&&Ct(u[d])}if(s.length>0)s.push(f);else return f}else if(n)for(let i=0;i<n.length;i+=2)s.push(Ho(n[i],n[i+1],r));return s.join(" ")}var kr=new Map;function da(t,e,r){let n=(r?r+"":"")+t+JSON.stringify(e),o=ce.get(n);if(o){let d=kr.get(o);if(d)for(let h=0;h<d.length;h++)Ct(d[h]);return o}o=r?`_${r}_c${Re(n)}`:`_c${Re(n)}`;let s="",i=[],a=d=>typeof d=="string"&&(d.indexOf("{")!==-1||d.indexOf("}")!==-1),c=(d,h)=>{let p="";for(let g in h){let b=h[g];if(b!=null)if(typeof b=="object")c([...d,g],b);else{if(a(b))continue;p+=`${Pe(g)}:${b};`}}p&&(d.length===0?s+=p:i.push({chain:d,body:p}))};c([],e);let f=d=>{if(!d.length)return`.${o}`;let h=d[0].split(",").map(p=>p.trim()).map(p=>p.includes("&")?p.replace(/&/g,`.${o}`):p.startsWith(":")?`.${o}${p}`:`.${o} ${p}`);for(let p=1;p<d.length;p++){let g=d[p].split(",").map(m=>m.trim()),b=[];for(let m of h)for(let y of g)y.includes("&")?b.push(y.replace(/&/g,m)):y.startsWith(":")?b.push(m+y):b.push(m+" "+y);h=b}return h.join(", ")},l=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(s){let d=`${t}{.${o}{${s}}}`;l.push(d),Ct(d)}for(let d of i){let h=f(d.chain),p=`${t}{${h}{${d.body}}}`;l.push(p),Ct(p)}return kr.set(o,l),ce.set(n,o),o}let u=f([t]);if(s){let d=`${u}{${s}}`;l.push(d),Ct(d)}for(let d of i){let p=`${f([t,...d.chain])}{${d.body}}`;l.push(p),Ct(p)}return kr.set(o,l),ce.set(n,o),o}function Ie(t,e){let r="";for(let n in e){let o="";for(let s in e[n])o+=`${Pe(s)}:${e[n][s]};`;r+=`${n}{${o}}`}return Ct(`@keyframes ${t}{${r}}`),t}var pa=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],ha=["none","forwards","backwards","both"],ga=["normal","reverse","alternate","alternate-reverse"],ma=["running","paused"],ya=t=>/^[\d.]+m?s$/.test(t),ba=0,Or=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(R(t)){let o=`smbls-anim-${ba++}`;return{animationName:Ie(o,t)}}let n=r&&r[t];return R(n)?Ie(t,n):t},xa=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=t.split(/\s+/),o=null,s=[],i=null,a=null,c=null,f=null,l=null;for(let u of n)r&&r[u]?o=u:ya(u)?s.push(u):pa.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):ga.includes(u)?c=u:ha.includes(u)?f=u:ma.includes(u)?l=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:f,playState:l}},Jo={animation:(t,e)=>{if(S(t)&&t.includes(" ")){let r=xa(t,e);return{animationName:Or(r.name||t,e),animationDuration:r.durations[0]||pt(e.animationDuration||"A").timing,animationDelay:r.durations[1]||pt(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||bt(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||"both",animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:Or(t,e),animationDuration:pt(e.animationDuration||"A").timing,animationDelay:pt(e.animationDelay||"0s").timing,animationTimingFunction:bt(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||"both",animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:Or(t,e)}),animationDuration:t=>({animationDuration:pt(t).timing}),animationDelay:t=>({animationDelay:pt(t).timing}),animationTimingFunction:t=>({animationTimingFunction:bt(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};D();var Zo={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>A("height",t,e),width:(t,e)=>A("width",t,e),boxSizing:t=>Wr(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...N("height",e),...N("width",r||e)}},inlineSize:(t,e)=>A("inlineSize",t,e),blockSize:(t,e)=>A("blockSize",t,e),minWidth:(t,e)=>A("minWidth",t,e),maxWidth:(t,e)=>A("maxWidth",t,e),widthRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...N("minWidth",e),...N("maxWidth",r||e)}},minHeight:(t,e)=>A("minHeight",t,e),maxHeight:(t,e)=>A("maxHeight",t,e),heightRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...N("minHeight",e),...N("maxHeight",r||e)}},size:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...A("inlineSize",e),...A("blockSize",r||e)}},minBlockSize:(t,e)=>A("minBlockSize",t,e),minInlineSize:(t,e)=>A("minInlineSize",t,e),maxBlockSize:(t,e)=>A("maxBlockSize",t,e),maxInlineSize:(t,e)=>A("maxInlineSize",t,e),minSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...N("minInlineSize",e),...N("minBlockSize",r||e)}},maxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...N("maxInlineSize",e),...N("maxBlockSize",r||e)}},borderWidth:(t,e)=>A("borderWidth",t,e),padding:(t,e)=>A("padding",t,e),scrollPadding:(t,e)=>A("scrollPadding",t,e),paddingInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...N("paddingInlineStart",e),...N("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...N("paddingBlockStart",e),...N("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>A("paddingBlockStart",t,e),paddingBottom:(t,e)=>A("paddingBlockEnd",t,e),paddingLeft:(t,e)=>A("paddingInlineStart",t,e),paddingRight:(t,e)=>A("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>A("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>A("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>A("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>A("paddingInlineEnd",t,e),margin:(t,e)=>A("margin",t,e),marginInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...N("marginInlineStart",e),...N("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!S(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{...N("marginBlockStart",r),...N("marginBlockEnd",n||r)}},marginTop:(t,e)=>A("marginBlockStart",t,e),marginBottom:(t,e)=>A("marginBlockEnd",t,e),marginLeft:(t,e)=>A("marginInlineStart",t,e),marginRight:(t,e)=>A("marginInlineEnd",t,e),marginInlineStart:(t,e)=>A("marginInlineStart",t,e),marginInlineEnd:(t,e)=>A("marginInlineEnd",t,e),marginBlockStart:(t,e)=>A("marginBlockStart",t,e),marginBlockEnd:(t,e)=>A("marginBlockEnd",t,e),gap:t=>({gap:Fo(t)}),columnGap:(t,e)=>Nt(e,"columnGap",t),rowGap:(t,e)=>Nt(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>xr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>xr(t??e.round,e,"borderRadius")};var Xo={fontSize:t=>$o(t)||t,fontFamily:t=>({fontFamily:Ao(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t})};var Yo={overflow:t=>({overflow:t,scrollBehavior:"smooth"}),cursor:(t,e,r,n)=>{if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=n.files&&n.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var ts={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>G(r,"k").k).join(" ")}},left:t=>G(t,"left"),top:t=>G(t,"top"),right:t=>G(t,"right"),bottom:t=>G(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>G(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=>G(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};D();var at=({context:t,state:e})=>{let r=e?.root?.globalTheme||t.designSystem?.globalTheme;return r==="auto"?null:r},es={theme:(t,e)=>{if(t)return e.themeModifier?oe(t,`@${e.themeModifier}`):oe(t)},color:(t,e)=>{let r=at(e);if(t)return{color:rt(t,r)}},background:(t,e)=>{let r=at(e);if(t)return S(t)&&t.includes("gradient")?{background:yr(t,r)}:{background:rt(t,r)}},backgroundColor:(t,e)=>{let r=at(e);if(t)return{backgroundColor:rt(t,r)}},backgroundImage:(t,e,r,n)=>{let o=at(e);if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=s.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return{backgroundImage:Io(t,o)}},textStroke:t=>({WebkitTextStroke:Po(t)}),outline:t=>({outline:vt(t)}),outlineOffset:(t,e)=>A("outlineOffset",t,e),border:t=>({border:vt(t)}),borderColor:(t,e)=>{let r=at(e);if(t)return{borderColor:rt(t,r)}},borderTopColor:(t,e)=>{let r=at(e);if(t)return{borderTopColor:rt(t,r)}},borderBottomColor:(t,e)=>{let r=at(e);if(t)return{borderBottomColor:rt(t,r)}},borderLeftColor:(t,e)=>{let r=at(e);if(t)return{borderLeftColor:rt(t,r)}},borderRightColor:(t,e)=>{let r=at(e);if(t)return{borderRightColor:rt(t,r)}},borderLeft:t=>({borderLeft:vt(t)}),borderTop:t=>({borderTop:vt(t)}),borderRight:t=>({borderRight:vt(t)}),borderBottom:t=>({borderBottom:vt(t)}),shadow:(t,e)=>{let r=at(e);if(t)return{boxShadow:Ro(t,r)}},boxShadow:(t,e)=>{if(!S(t))return;let[r,n]=t.split("!importan"),o=at(e),s=n?" !important":"";return{boxShadow:mr(r.trim(),o)+s}},textShadow:(t,{context:e})=>({textShadow:mr(t,e.designSystem.globalTheme)}),columnRule:t=>({columnRule:vt(t)})};var rs={transition:t=>({transition:Do(t)}),transitionDuration:t=>({transitionDuration:br(t)}),transitionDelay:t=>({transitionDelay:br(t)}),transitionTimingFunction:t=>({transitionTimingFunction:bt(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};D();var ns={flow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};var os={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 K={...Jo,...Zo,...Xo,...Yo,...ts,...es,...rs,...ns,...os};var Z=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","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","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","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"]);D();function as(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:o||null,args:r})}function Sa(...t){return as(this,"warn",t),Bn.apply(this,t)}function _a(...t){return as(this,"error",t),Un.apply(this,t)}var ss={update:wr,remove:Cr,getDB:Hn,getQuery:qn,getRootData:Ln,getChildren:In,getPath:Fn,nextElement:Wn,previousElement:Gn,verbose:ur,warn:Sa,error:_a,variables:zn,spotByPath:Rn,set(t,e){if(this.removeContent(),t!=null){let r=this.context?.__create;r&&r(t,this,"content",e)}},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),e(o,r,n,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let n=this[r];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;let o=n.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let o=this[n];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:Mn,getRootState:Dn,getRootContext:Nn,getContext:Vn,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){e[o]=n[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(e[n]=this[n].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(t,...e){let r=this.context,n=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof n=="function")return n.call(this,...e)},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)}},is=new WeakMap;function wa(t){if(!t)return ss;let e=is.get(t);if(e)return e;e=Object.create(ss);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return is.set(t,e),e}function $r(t){let e=wa(t.context);Object.setPrototypeOf(t,e)}D();var va=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},kt=(t,e)=>{if(Y(e)){let o=e.__raw||e;e.toggle||Object.defineProperty(o,"toggle",{value:function(s,i={}){e[s]=!e[s]},enumerable:!1,configurable:!0}),e.set||Object.defineProperty(o,"set",{value:function(s,i={}){return e.clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.update(s,i),e},enumerable:!1,configurable:!0}),Object.defineProperty(o,"setByPath",{value:function(s,i,a={}){let c=s.split("."),f=e;for(let l=0;l<c.length-1;l++)f[c[l]]===void 0&&(f[c[l]]={}),f=f[c[l]];return f[c[c.length-1]]=i,e},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"getByPath",{value: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},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"removeByPath",{value:function(s,i={}){let a=s.split("."),c=e;for(let f=0;f<a.length-1;f++){if(c==null)return e;c=c[a[f]]}return c&&delete c[a[a.length-1]],e},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"reset",{value:function(s={}){let i=e.parse();return e.set(i,s)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"apply",{value:function(s,i={}){if(typeof s=="function"){let a=s(e);return e.update(a,i)}},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"applyFunction",{value:function(s,i={}){if(typeof s=="function")return s(e),e.update(e.parse(),i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"rootUpdate",{value:function(s,i={}){let a=e;for(;a?.parent&&Y(a.parent);)a=a.parent;return a.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"parentUpdate",{value:function(s,i={}){if(e.parent)return e.parent.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"quietReplace",{value:function(s,i={}){return e.replace(s,{quiet:!0,...i})},enumerable:!1,configurable:!0,writable:!0}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e;for(;s?.parent&&Y(s.parent);)s=s.parent;return s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},n={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;r();for(let s in o)e[s]=o[s];return e},replace(o){return e.set(o)},clean(){return r(),e}};for(let o in n)typeof e[o]!="function"&&va(e,o,n[o])};D();var Er={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"]};var Ca=t=>t.startsWith("aria")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"aria-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):t.startsWith("data")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"data-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):null,le=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Ca(e)||Er.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Er,t)?Er[t].includes(e):!1;var Fe=(t,e)=>{let r=t.call("exec",e,t);if(r)return S(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},cs=(t,e)=>{let r=(t.preSrc||"")+(Fe(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=t;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},ls={src:t=>cs(t,t.src),href:t=>Fe(t,t.href),action:t=>Fe(t,t.action),poster:t=>cs(t,t.poster),data:t=>Fe(t,t.data)},fs=t=>{let e=t.tag||"div",r={};for(let n in ls)if(t[n]!==void 0&&le(e,n)){let o=ls[n](t);o!==void 0&&(r[n]=o)}return r};var ka=1;function Bt(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function Aa(t){return t.charAt(2).toLowerCase()+t.slice(3)}function Oa(t){return t.toLowerCase()}function Pr(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Pr(o,s):r[n]=s}return r}function nt(t,e,r,n={},o){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||`_${ka++}`,s.parent=e||null,s.context=t.context||e?.context||n.context||{},s.context.__create||(s.context.__create=nt);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]};if(r&&!t.extends&&!t.extend){let g=r.indexOf("_");if(g>0){let b=r.substring(0,g),m=s.context?.components;m&&(m[b]||m["smbls."+b])&&(t={extends:b,...t})}}ie(s,t,n);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let g in t){if(g==="parent"||g==="node"||g==="__ref"||g==="extends"||g==="context"||g==="props")continue;let b=t[g],m=s[g],y=m&&b&&typeof m=="object"&&typeof b=="object"&&!Array.isArray(m)&&!Array.isArray(b)&&typeof m!="function"&&typeof b!="function";y&&g.charCodeAt(0)>=65&&g.charCodeAt(0)<=90?s[g]=Pr(m,b):y&&a.has(g)?s[g]={...m,...b}:s[g]=b}function f(g){for(let b in g){let m=g[b],y=s[b],x=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";x&&b.charCodeAt(0)>=65&&b.charCodeAt(0)<=90?s[b]=Pr(y,m):x&&a.has(b)?s[b]={...y,...m}:s[b]=m}}c&&f(c),t.props&&typeof t.props=="object"&&f(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 l=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?Object.create(d):null);if(t.scope!==void 0||l){let g=h?Object.create(h):{};l&&Object.assign(g,l),t.scope!==void 0&&Object.assign(g,t.scope),s.scope=g}else h&&(s.scope=Object.create(h));if(t.if!==void 0&&(s.if=t.if),$r(s),$a(s,e,t),s.if!=null){let g=typeof s.if=="function"?s.if(s,s.state,s.context):s.if;i.__if=!!g}if(i.__if)typeof t.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof t.if=="function"&&Rr(s,{if:t.if}),s;s.tag||(s.tag=Wt(s)),At("Init",s,n);let p=s.node=Gt(s);if(!p)return s;At("AttachNode",s,n),p.setAttribute&&s.key&&p.setAttribute("data-key",s.key),p.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&p.setAttribute("data-smbls-app",s.context.key),s.id&&p.setAttribute&&(p.id=s.id),Rr(s,t),Ir(s),ds(s),ps(s,n);try{hs(s,n)}catch(g){if(typeof console<"u"&&console.error){let b=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${b}:`,g?.message||g,g?.stack?`
|
|
12
|
+
`+g.stack.split(`
|
|
13
|
+
`).slice(0,6).join(`
|
|
14
|
+
`):"")}}if(Mr(s,e,o),e&&(e[s.key]=s,e.__ref?.__children&&(e.__ref.__children.includes(s.key)||e.__ref.__children.push(s.key))),typeof s.html=="function"&&s.node&&!s.node.innerHTML)try{let g=s.html(s,s.state,s.context);g!=null&&typeof g!="function"&&(s.node.innerHTML=g)}catch{}if(At("Create",s,n),At("Complete",s,n),At("Render",s,n),At("RenderRouter",s,n),typeof s.onFrame=="function"){let g=s.onFrame,b=s.context?.designSystem,m=()=>{if(s.node){if(s.node.isConnected){b&&et(b);try{g(s,s.state,s.context)}catch(y){console.error("[DOMQL] onFrame error:",y)}finally{b&&J()}}requestAnimationFrame(m)}};requestAnimationFrame(m)}return s}function $a(t,e,r){let n=!e,o=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=n&&o&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!Y(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,kt(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},f=t.context?.polyglot;if(f?.translations){let l=a.lang||f.defaultLang||"en",u=f.translations[l];if(u&&typeof u=="object")for(let h in u)c[h]===void 0&&(c[h]=u[h]);let d=new Set(f.languages||[]);for(let h in f.translations)!d.has(h)&&c[h]===void 0&&(c[h]=f.translations[h])}t.state=Y(c)?c:X(c),t.state.__element=t,t.state.root=t.state,kt(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),kt(t,t.state);return}if(typeof i=="string"){if(t.state=us(i,e),t.state&&typeof t.state=="object"&&!Y(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}kt(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=X(a||{})}else t.state=X({...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,kt(t,t.state)}function Tr(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function us(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?Tr(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?Tr(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=Tr(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let n=e.context?.polyglot;if(n?.translations){let o=e.state?.root?.lang||n.defaultLang||"en",s=n.translations[o];if(s?.[t]!==void 0)return s[t];if(n.translations[t]!==void 0)return n.translations[t]}return{}}function Ea(t){let e=t.__ref,r=t.tag||"div",n=t.context?.designSystem,o=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||q.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Bt(a)||K[a]||Z&&Z.has(a)||le(r,a)||o.push({prop:a,fn:t[a]})}for(let i=0;i<o.length;i++){let{prop:a,fn:c}=o[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){n&&et(n);try{return c(t,t.state,t.context)}catch{return}finally{n&&J()}},set(f){delete e.__exec[a],Object.defineProperty(t,a,{value:f,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function Rr(t,e){let r=t.__ref;if(Ea(t),typeof t.text=="function"){let o=t.text,s=L(()=>{try{let i=o(t,t.state,t.context);t.node&&i!=null&&typeof i!="function"&&typeof i!="object"&&(typeof i=="string"&&i.includes("{{")&&(i=xe.call(t,i,t.state)),t.tag==="string"?t.node.nodeValue=i:t.node.textContent=i)}catch{}},{depth:r.path.length});r.__effects.push(s),r.__exec.text=o}else if(typeof t.text=="string"&&t.text.includes("{{")){let o=t.text,s=L(()=>{let i=xe.call(t,o,t.state);i!=null&&(t.text=i),t.node&&(t.tag==="string"?t.node.nodeValue=i??"":t.node.textContent=i??"")},{depth:r.path.length});r.__effects.push(s),r.__exec.text=o}for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&typeof t[o]=="function"&&!q.has(o)&&!Bt(o)&&!r.__exec[o]){if(K[o]){let s=t[o],i=o,a=L(()=>{let c=t.context?.designSystem;c&&et(c);try{let f=s(t,t.state,t.context),l=K[i](f,t,t.state,t.context);l&&t.node?Vt(t.node,l):t.node&&(i==="show"||i==="hide")&&(t.node.style.display="")}finally{c&&J()}},{depth:r.path.length});r.__effects.push(a),r.__exec[o]=s}else if(Z&&Z.has(o)){let s=t[o],i=o,a=L(()=>{let c=t.context?.designSystem;c&&et(c);try{let f=s(t,t.state,t.context);t.node&&(f!=null?Vt(t.node,{[i]:f}):t.node.style[i]="")}finally{c&&J()}},{depth:r.path.length});r.__effects.push(a),r.__exec[o]=s}}if(typeof e.html=="function"){let o=e.html,s=L(()=>{let i=o(t,t.state,t.context);t.node&&i!=null&&typeof i!="function"&&(t.node.innerHTML=i)},{depth:r.path.length});r.__effects.push(s),r.__exec.html=o}if(typeof e.value=="function"){let o=e.value,s=L(()=>{try{let i=o(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let a=i==null?"":String(i);if(t.node.value===a)return;let c=typeof document<"u"&&document.activeElement===t.node,f=c&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,l=c&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=a,c&&f!=null&&l!=null)try{t.node.setSelectionRange(f,l)}catch{}}catch{}},{depth:r.path.length});r.__effects.push(s),r.__exec.value=o}if(typeof e.style=="function"){let o=e.style,s=L(()=>{let i=o(t,t.state,t.context);Vt(t.node,i)},{depth:r.path.length});r.__effects.push(s),r.__exec.style=o}else if(t.style&&typeof t.style=="object")for(let o in t.style){let s=t.style[o];if(typeof s!="function")continue;let i=L(()=>{try{let a=s(t,t.state,t.context);t.node&&Vt(t.node,{[o]:a})}catch{}},{depth:r.path.length});r.__effects.push(i)}if(t.attr&&typeof t.attr=="object"){for(let o in t.attr)if(typeof t.attr[o]=="function"){let s=t.attr[o],i=o,a=L(()=>{try{let c=s(t,t.state,t.context);t.node?.setAttribute&&(c==null||c===!1?t.node.removeAttribute(i):typeof c!="function"&&typeof c!="object"&&t.node.setAttribute(i,c===!0?"":c))}catch{}},{depth:r.path.length});r.__effects.push(a)}}if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s!="function")continue;let i="aria-"+o.replace(/[A-Z]/g,c=>"-"+c.toLowerCase()),a=L(()=>{try{let c=s(t,t.state,t.context);if(!t.node?.setAttribute)return;c==null||c===!1?t.node.removeAttribute(i):typeof c!="function"&&typeof c!="object"&&t.node.setAttribute(i,c===!0?"":c)}catch{}},{depth:r.path.length});r.__effects.push(a)}if(t.data&&typeof t.data=="object")for(let o in t.data){let s=t.data[o];if(typeof s!="function")continue;let a="data-"+o.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),c=L(()=>{try{let f=s(t,t.state,t.context);if(!t.node?.setAttribute)return;f==null||f===!1?t.node.removeAttribute(a):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(a,f===!0?"":f)}catch{}},{depth:r.path.length});r.__effects.push(c)}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 o in n){let s=n[o];if(typeof s!="function")continue;let i=L(()=>{try{let a=s(t,t.state,t.context);if(!t.node?.classList)return;typeof a=="string"?t.node.classList.add(a):a?t.node.classList.add(o):t.node.classList.remove(o)}catch{}},{depth:r.path.length});r.__effects.push(i)}if(typeof e.if=="function"){let o=e.if,s=L(()=>{let i=o(t,t.state,t.context),a=r.__if;if(r.__if=!!i,a&&!r.__if&&t.node)t.node.remove();else if(!a&&r.__if)if(r.__ifInitialized){t.node||(t.node=Gt(t));let c=t.parent,f=c?.node;if(f&&t.node){let l=null,u=Object.keys(c),d=u.indexOf(t.key);for(let h=d+1;h<u.length;h++){let p=c[u[h]];if(p?.node?.parentNode===f){l=p.node;break}}l?f.insertBefore(t.node,l):f.appendChild(t.node)}else Mr(t,t.parent);Ir(t)}else{if(r.__ifInitialized=!0,t.tag||(t.tag=Wt(t)),At("Init",t,{}),t.node||(t.node=Gt(t)),!t.node)return;At("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id);let c=e.if;delete e.if;try{Rr(t,e)}finally{e.if=c}Ir(t),ds(t),ps(t,{}),hs(t,{}),Mr(t,t.parent)}},{depth:r.path.length});r.__effects.push(s)}for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||q.has(o)||typeof t[o]!="function")continue;let s=o.charCodeAt(0);if(s>=65&&s<=90||Bt(o))continue;let i=t[o];r.__exec[o]=i;let a=t.tag||"div";if(le(a,o)&&!K[o]&&!(Z&&Z.has(o))){let c=o,f=L(()=>{try{let l=i(t,t.state,t.context);t.node?.setAttribute&&(l==null||l===!1?t.node.removeAttribute(c):typeof l!="function"&&typeof l!="object"&&(c==="src"&&"src"in t.node?t.node.src=l:t.node.setAttribute(c,l===!0?"":l)))}catch{}},{depth:r.path.length});r.__effects.push(f)}}Pa(t)}function Ir(t){let{node:e}=t;if(e){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?e.nodeValue=t.text:e.textContent=t.text:typeof t.text=="number"&&(e.textContent=t.text),Ra(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"&&Vt(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let n=t.attr[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.setAttribute&&e.setAttribute(r,n===!0?"":n)}if(t.data&&typeof t.data=="object")for(let r in t.data){let n=t.data[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.dataset&&(e.dataset[r]=n===!0?"":n)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(n=>n&&e.classList.add(n));else if(typeof r=="object")for(let n in r){let o=typeof r[n]=="function"?r[n](t,t.state,t.context):r[n];o&&e.classList.add(typeof o=="string"?o:n)}}}}function Vt(t,e){if(!t||!e||!t.style)return;let r=null;for(let n in e){let o=e[n];if(o!=null){if(n.charAt(0)==="&"&&typeof o=="object"){r||(r={}),r[n]=o;continue}try{let s=String(o),i=n.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),f=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,f,c?"important":"")}catch{}}}r&&ja(t,r)}var Ta=0;function ja(t,e){let r=`_ds${Ta++}`;t.classList.add(r);let n=t.ownerDocument,o=n.querySelector("style[data-smbls-scoped]");o||(o=n.createElement("style"),o.setAttribute("data-smbls-scoped",""),n.head.appendChild(o));let s="";for(let i in e){let a="."+r,c=i.replace(/&/g,a).split(",").map(l=>{let u=l.trim();return u.includes(a)?u:a+u}).join(", "),f=e[i];if(typeof f=="object"){let l="",u="";for(let d in f){let h=f[d];if(typeof h=="object"){let p=d.includes("&")?c.split(", ").map(b=>d.replace(/&/g,b)).join(", "):c.split(", ").map(b=>`${b} ${d}`).join(", "),g="";for(let b in h)g+=`${b.replace(/[A-Z]/g,m=>"-"+m.toLowerCase())}: ${h[b]};`;u+=`${p} { ${g} }
|
|
15
|
+
`}else l+=`${d.replace(/[A-Z]/g,p=>"-"+p.toLowerCase())}: ${h};`}l&&(s+=`${c} { ${l} }
|
|
16
|
+
`),u&&(s+=u)}}s&&(o.textContent+=s)}function Pa(t){let e=t.__ref;e.__conditionalRunners=[];for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let n=r.charAt(0);if(n!=="."&&n!=="!")continue;let o=r.slice(1);if(!o)continue;let s=t[r];if(!s||typeof s!="object")continue;let i=n==="!",a={lastMatch:!1,appliedKeys:null},c=()=>{if(!t.node)return;let l,u=t[o];if(u===void 0)if(t.state&&o in t.state)l=t.state[o];else{let p=t.context?.cases?.[o];if(p===void 0)return;l=typeof p=="function"?p.call(t,t):p}else typeof u=="function"?l=u(t,t.state,t.context):l=u;let d=i?!l:!!l;if(d===a.lastMatch)return;a.lastMatch=d;let h=t.context?.designSystem;h&&et(h);try{if(d){let p={};for(let b in s){if(!Object.prototype.hasOwnProperty.call(s,b))continue;let m=typeof s[b]=="function"?s[b](t,t.state,t.context):s[b];if(m!=null)if(K[b]){let y=K[b](m,t,t.state,t.context);if(y){let x=Array.isArray(y)?y:[y];for(let _ of x)_&&Object.assign(p,_)}}else Z&&Z.has(b)&&(p[b]=m)}let g=Object.keys(p);g.length?(Vt(t.node,p),a.appliedKeys=g):a.appliedKeys=null}else if(a.appliedKeys){for(let p of a.appliedKeys)t.node.style[p]="";a.appliedKeys=null}}finally{h&&J()}};e.__conditionalRunners.push(c);let f=L(c,{depth:e.path.length});e.__effects.push(f)}}var jr=new WeakSet;function Ra(t){let{node:e}=t;if(!e)return;if(jr.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}jr.add(t);let r=t.context?.designSystem;r&&et(r);try{let n={},o=!1;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||typeof t[s]=="function"||q.has(s))continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!Bt(s)){if(K[s]){let a=t[s],c=K[s](a,t,t.state,t.context);if(c){if(Array.isArray(c))for(let f of c)f&&Object.assign(n,f);else Object.assign(n,c);o=!0}}else if(Z&&Z.has(s)){let a=t[s];a!=null&&typeof a!="object"&&(n[s]=a,o=!0)}else if(s.charCodeAt(0)===45){let a=t[s];a!=null&&typeof a!="object"&&(n[s]=a,o=!0)}else if(s.charAt(0)==="&"){let a=t[s];a&&typeof a=="object"&&(n[s]=a,o=!0)}else if(s.charAt(0)==="@"||s.charAt(0)===":"){let a=t[s];if(a&&typeof a=="object"){let c={};for(let f in a){let l=a[f];if(typeof l=="function"&&(l=l(t,t.state,t.context)),!(l==null||typeof l=="function"))if(K[f]){let u=K[f](l,t,t.state,t.context);if(u)if(Array.isArray(u))for(let d of u)d&&Object.assign(c,d);else Object.assign(c,u)}else c[f]=l}if(Object.keys(c).length){if(s.length>1&&s.charAt(0)==="@"&&!s.startsWith("@media")&&!s.startsWith("@keyframes")&&!s.startsWith("@supports")&&(s==="@dark"||s==="@light"||!t.context?.designSystem?.media?.[s.slice(1)])){let l={};for(let d in c){let h=c[d];l[d]=typeof h=="string"&&!h.includes("!important")?h+" !important":h}let u=s.slice(1);n[`[data-theme="${u}"] &`]=l}else{let l=s;if(s.charAt(0)==="@"&&!s.startsWith("@media")&&!s.startsWith("@keyframes")){let d=s.slice(1),h=t.context?.designSystem?.media?.[d]||t.context?.designSystem?.media?.[d];h&&(l=`@media ${h}`)}let u={};for(let d in c){let h=c[d];if(h&&typeof h=="object"&&!Array.isArray(h)){let p={};for(let b in h)if(K[b]){let m=K[b](h[b],t,t.state,t.context);if(m)if(Array.isArray(m))for(let y of m)y&&Object.assign(p,y);else Object.assign(p,m)}else p[b]=h[b];let g=d.startsWith(":")?"":" ";if(l.includes(",")){let b=l.split(",").map(m=>`${m.trim()}${g}${d}`).join(", ");n[b]=p}else n[`${l}${g}${d}`]=p}else u[d]=h}Object.keys(u).length&&(n[l]=u)}o=!0}o=!0}}}}if(o){n.display&&String(n.display).includes("!important")&&(e.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);let s=Ar(n,null,t.context?.cssPrefix);s&&e.classList&&s.split(" ").forEach(a=>a&&e.classList.add(a));let i=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(i!=null){let a=n.display;if(a&&a!==i)if(i==="none"){let c=[];for(let f of e.classList)f.startsWith("_d-")&&f!=="_d-none"&&c.push(f);for(let f of c)e.classList.remove(f);e.classList.add("_d-none")}else e.style.display=t.display}}}finally{r&&J(),jr.delete(t)}}function ds(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s=="function"||typeof s=="object"||s==null||s===!1)continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,s===!0?"":s)}let r=fs(t);for(let o in r){let s=r[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(o,s===!0?"":s)}let n=t.tag||"div";for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||q.has(o)||o==="on"||r[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!Bt(o)&&!(K[o]||Z&&Z.has(o))&&le(n,o)){let i=t[o];if(i==null||i===!1||(typeof i=="string"&&i.includes("{{")&&(i=xe(i,t,t.state,t.context),t[o]=i),i==null||i===!1||typeof i=="function"||typeof i=="object"))continue;e.setAttribute(o,i===!0?"":i)}}}function ps(t,e){for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||!Bt(r))continue;let n=t[r];if(typeof n=="string"&&/^[A-Za-z_$][\w$]*$/.test(n)){let s=n;n=function(a){return t.call(s,a)}}if(typeof n!="function")continue;let o=Aa(r);zt.has(o)||se(Oa(o),t,n)}}function Fr(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Fr(o,s):r[n]=s}return r}function Dr(t,e,r){if(!e||!t.node)return;let n=t.childExtends;if(Array.isArray(e)){let s=(t.context?.document||globalThis.document)?.createDocumentFragment();if(!s)return;let i=t.childProps,a=t.childrenAs;for(let c=0;c<e.length;c++){let f=e[c],l=f;(typeof f=="string"||typeof f=="number")&&(f={text:f});let u=i;if(typeof i=="function")try{u=i(t,f)}catch{u=null}if(a==="state"){let p=l;(typeof l=="string"||typeof l=="number")&&(p={value:l,text:l}),f=u?{...u,state:p}:{state:p}}else u&&(f=Fr(u,f));if(n&&!f.ignoreChildExtends)if(f.extends){let p=Array.isArray(f.extends)?f.extends:[f.extends],g=Array.isArray(n)?n:[n];f={...f,extends:[...g,...p]}}else f={extends:n,...f};let d=f?.key||`${c}`,h=nt(f,t,d,r);h?.node&&s.appendChild(h.node)}t.node.appendChild(s);return}if(typeof e=="string"){let o=us(e,t);if(Array.isArray(o)){Dr(t,o,r);return}}if(typeof e=="object")for(let o in e){if(q.has(o))continue;let s=e[o];if(!(s==null||s===!1)){if((typeof s=="string"||typeof s=="number")&&(s={text:s}),t.childProps&&(s=Fr(t.childProps,s)),n&&!s.ignoreChildExtends)if(s.extends){let i=Array.isArray(s.extends)?s.extends:[s.extends],a=Array.isArray(n)?n:[n];s={...s,extends:[...a,...i]}}else s={extends:n,...s};nt(s,t,o,r)}}}function hs(t,e){let{children:r,content:n}=t,o=t.childExtends;if(typeof r=="function"){let i=r;r=i(t,t.state,t.context),t.children=r;let a=t.__ref,c=!1,f=L(()=>{let l=i(t,t.state,t.context);if(!c){c=!0;return}if(l===t.children)return;if(t.children=l,Array.isArray(l)&&t.childrenAs==="state"){let h=t.childProps,p=[],g=new Map;for(let _=0;_<l.length;_++){let w=l[_],C=h;if(typeof h=="function")try{C=h(t,w)}catch{C=null}let V=C&&C.key||w&&w.key||`${_}`;p.push(V),g.set(V,{rawChild:w,childProps:C})}let b=new Set(p);for(let _=a.__children.length-1;_>=0;_--){let w=a.__children[_];if(!b.has(w)){let C=t[w];C?.remove&&C.remove(),delete t[w],a.__children.splice(_,1)}}let m=t.childExtends,x=(t.context?.document||globalThis.document)?.createDocumentFragment();for(let _ of p){let w=g.get(_),C=w.rawChild,V=t[_];if(V&&V.state){if(C&&typeof C=="object"){let U=V.state;if(typeof U.replace=="function")U.replace(C);else if(typeof U.update=="function"){for(let P in U)if(!(P==="__element"||P==="root"||P==="parent"||P==="update")&&!Object.prototype.hasOwnProperty.call(C,P))try{U[P]=void 0}catch{}U.update(C)}else for(let P in C)U[P]=C[P]}continue}let ct=C;(typeof C=="string"||typeof C=="number")&&(ct={value:C,text:C});let B=w.childProps,I=B?{...B,state:ct}:{state:ct};if(m&&!I.ignoreChildExtends)if(I.extends){let U=Array.isArray(I.extends)?I.extends:[I.extends],P=Array.isArray(m)?m:[m];I={...I,extends:[...P,...U]}}else I={extends:m,...I};let lt=nt(I,t,_,e);lt?.node&&x&&x.appendChild(lt.node)}x&&x.childNodes.length&&t.node&&t.node.appendChild(x),a.__children=p;return}for(let h of[...a.__children]){let p=t[h];p?.remove&&p.remove(),delete t[h]}a.__children=[],Dr(t,l,e)},{depth:a.path.length});a.__effects.push(f)}if(Dr(t,r||n,e),r||n)return;let s=t.context?.components||{};{let i=Object.keys(t);for(let a=0;a<i.length;a++){let c=i[a];if(!c.endsWith("Extends")||typeof t[c]!="string")continue;let f=c.slice(0,-7);if(!f||f.charCodeAt(0)<65||f.charCodeAt(0)>90)continue;let l={extends:t[c]};delete t[c];for(let u=a+1;u<i.length;u++){let d=i[u],h=d.charCodeAt(0);if(h>=65&&h<=90||q.has(d)||typeof t[d]=="function"&&(d.startsWith("on")||d.startsWith(".")))break;let p=t[d];p!==void 0&&(l[d]=p,delete t[d])}t[f]&&typeof t[f]=="object"?t[f]={...l,...t[f]}:t[f]=l}}for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||q.has(i)||typeof t[i]!="object"||t[i]===null)continue;let a=i.charCodeAt(0);if(a<65||a>90)continue;let c=t[i];if(!c.__ref){if(!c.extends&&!c.extend){let f=s[i]||s[`smbls.${i}`];f&&(c={extends:f,...c})}if(t.childProps&&(c={...t.childProps,...c}),o&&!c.ignoreChildExtends)if(c.extends){let f=Array.isArray(c.extends)?c.extends:[c.extends],l=Array.isArray(o)?o:[o];c={...c,extends:[...l,...f]}}else c={extends:o,...c};nt(c,t,i,e)}}}function Mr(t,e,r){let{node:n}=t;if(!n)return;let o=e?.node||(e?.nodeType?e:null);if(o)if(r?.position==="before"&&r.node)o.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let s=r.node.nextSibling;s?o.insertBefore(n,s):o.appendChild(n)}else o.appendChild(n)}function At(t,e,r){let n=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&ae(n,e,r);let o="on"+t,s=e[o];if(typeof s=="function"){let i=e.context?.designSystem;i&&et(i);try{if(s(e,e.state,e.context,r)===!1)return!1}catch(a){if(e.context?.plugins?.length&&ae("error",e,{hook:o,error:a})||console.error(`[DOMQL] Lifecycle "${o}" error:`,a),e.context?.strictMode)throw a}finally{i&&J()}}return!0}var Ia=nt;var Fa=(t,e,r={})=>{if(!t||typeof t!="object")throw new Error("[SymbolsEmbed.mount] rootDef must be an object");if(!e||typeof e!="object"||!e.appendChild)throw new Error("[SymbolsEmbed.mount] host must be a DOM element");let n=r.state?X(r.state):void 0;return nt(t,e,"Root",{state:n,context:r.context||{}})};return _s(Da);})();
|