smbls 3.14.49 → 3.14.50

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