@luna_ui/luna 0.6.0 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -1079,11 +1079,11 @@ function getMbtTemplates(projectName) {
1079
1079
  {
1080
1080
  path: "vite.config.ts",
1081
1081
  content: `import { defineConfig } from "vite";
1082
- import { moonbitPlugin } from "vite-plugin-moonbit";
1082
+ import { moonbit } from "vite-plugin-moonbit";
1083
1083
 
1084
1084
  export default defineConfig({
1085
1085
  plugins: [
1086
- moonbitPlugin({
1086
+ moonbit({
1087
1087
  watch: true,
1088
1088
  showLogs: true,
1089
1089
  }),
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{$ as ee,A as te,B as e,C as t,Ct as n,D as r,Dt as i,E as a,Et as o,F as s,G as c,H as l,I as u,J as d,K as f,L as p,M as m,N as h,O as g,Ot as _,P as v,Q as y,R as b,S as x,St as S,T as C,Tt as w,U as T,V as E,W as D,X as O,Y as k,Z as A,_ as j,_t as M,a as N,at as P,b as F,bt as I,c as L,ct as R,d as z,dt as B,et as V,f as H,ft as U,g as W,gt as G,h as K,ht as q,i as J,it as Y,j as X,k as Z,kt as Q,l as ne,lt as $,m as re,mt as ie,n as ae,nt as oe,o as se,ot as ce,p as le,pt as ue,q as de,r as fe,rt as pe,s as me,st as he,t as ge,tt as _e,u as ve,ut as ye,v as be,vt as xe,w as Se,wt as Ce,x as we,xt as Te,y as Ee,yt as De,z as Oe}from"./src-DviLMStS.js";import{C as ke,D as Ae,E as je,S as Me,T as Ne,_ as Pe,a as Fe,b as Ie,c as Le,d as Re,f as ze,g as Be,h as Ve,i as He,l as Ue,m as We,n as Ge,o as Ke,p as qe,r as Je,s as Ye,t as Xe,u as Ze,v as Qe,w as $e,x as et,y as tt}from"./event-utils-C_M2XBNj.js";export{ge as For,ae as Fragment,fe as Index,J as Match,N as Portal,se as Provider,me as Show,L as Switch,x as batch,t as batchEnd,Se as batchStart,C as combine,a as createContext,ne as createDeferred,ve as createEffect,r as createElement,g as createElementNs,z as createMemo,H as createRenderEffect,le as createResource,Z as createRoot,te as createRouter,re as createSignal,K as createStore,W as debounced,X as effect,m as events,h as forEach,v as fragment,s as get,Xe as getButton,Ge as getClientPos,Je as getClosest,He as getDataAttr,Fe as getDataId,Ke as getDataset,Ye as getDroppedFiles,Le as getKey,Ue as getMovement,Ze as getOffsetPos,u as getOwner,Re as getPagePos,ze as getSelectedIndex,qe as getTargetChecked,We as getTargetValue,Ve as getTextData,Be as getWheelDelta,Pe as hasCmdOrCtrl,Qe as hasModifier,p as hasOwner,tt as isComposing,Ie as isEnterKey,et as isEscapeKey,Me as isPrimaryButton,ke as isSecondaryButton,b as jsx,Oe as jsxs,e as map,$e as matchesSelector,E as mathmlNs,j as mergeProps,l as mount,be as on,T as onCleanup,D as onMount,c as peek,f as portalToBody,de as portalToElementWithShadow,d as portalToSelector,k as portalWithShadow,Ne as preventDefault,Ee as produce,O as provide,F as reconcile,y as render,A as renderEffect,ee as resourceError,V as resourceGet,_e as resourceIsFailure,oe as resourceIsPending,pe as resourceIsSuccess,Y as resourcePeek,P as resourceRefetch,ce as resourceValue,he as routePage,R as routePageFull,$ as routePageTitled,ye as routerGetBase,B as routerGetMatch,U as routerGetPath,ue as routerNavigate,ie as routerReplace,q as runUntracked,q as untrack,G as runWithOwner,M as set,xe as show,we as splitProps,De as stateError,I as stateIsFailure,Te as stateIsPending,S as stateIsSuccess,n as stateValue,je as stopEvent,Ae as stopPropagation,Ce as subscribe,w as svgNs,o as text,i as textDyn,_ as update,Q as useContext};
1
+ import{$ as ee,A as te,B as e,C as t,Ct as n,D as r,Dt as i,E as a,Et as o,F as s,G as c,H as l,I as u,J as d,K as f,L as p,M as m,N as h,O as g,Ot as _,P as v,Q as y,R as b,S as x,St as S,T as C,Tt as w,U as T,V as E,W as D,X as O,Y as k,Z as A,_ as j,_t as M,a as N,at as P,b as F,bt as I,c as L,ct as R,d as z,dt as B,et as V,f as H,ft as U,g as W,gt as G,h as K,ht as q,i as J,it as Y,j as X,k as Z,kt as Q,l as ne,lt as $,m as re,mt as ie,n as ae,nt as oe,o as se,ot as ce,p as le,pt as ue,q as de,r as fe,rt as pe,s as me,st as he,t as ge,tt as _e,u as ve,ut as ye,v as be,vt as xe,w as Se,wt as Ce,x as we,xt as Te,y as Ee,yt as De,z as Oe}from"./src-BbjOW18q.js";import{C as ke,D as Ae,E as je,S as Me,T as Ne,_ as Pe,a as Fe,b as Ie,c as Le,d as Re,f as ze,g as Be,h as Ve,i as He,l as Ue,m as We,n as Ge,o as Ke,p as qe,r as Je,s as Ye,t as Xe,u as Ze,v as Qe,w as $e,x as et,y as tt}from"./event-utils-C_M2XBNj.js";export{ge as For,ae as Fragment,fe as Index,J as Match,N as Portal,se as Provider,me as Show,L as Switch,x as batch,t as batchEnd,Se as batchStart,C as combine,a as createContext,ne as createDeferred,ve as createEffect,r as createElement,g as createElementNs,z as createMemo,H as createRenderEffect,le as createResource,Z as createRoot,te as createRouter,re as createSignal,K as createStore,W as debounced,X as effect,m as events,h as forEach,v as fragment,s as get,Xe as getButton,Ge as getClientPos,Je as getClosest,He as getDataAttr,Fe as getDataId,Ke as getDataset,Ye as getDroppedFiles,Le as getKey,Ue as getMovement,Ze as getOffsetPos,u as getOwner,Re as getPagePos,ze as getSelectedIndex,qe as getTargetChecked,We as getTargetValue,Ve as getTextData,Be as getWheelDelta,Pe as hasCmdOrCtrl,Qe as hasModifier,p as hasOwner,tt as isComposing,Ie as isEnterKey,et as isEscapeKey,Me as isPrimaryButton,ke as isSecondaryButton,b as jsx,Oe as jsxs,e as map,$e as matchesSelector,E as mathmlNs,j as mergeProps,l as mount,be as on,T as onCleanup,D as onMount,c as peek,f as portalToBody,de as portalToElementWithShadow,d as portalToSelector,k as portalWithShadow,Ne as preventDefault,Ee as produce,O as provide,F as reconcile,y as render,A as renderEffect,ee as resourceError,V as resourceGet,_e as resourceIsFailure,oe as resourceIsPending,pe as resourceIsSuccess,Y as resourcePeek,P as resourceRefetch,ce as resourceValue,he as routePage,R as routePageFull,$ as routePageTitled,ye as routerGetBase,B as routerGetMatch,U as routerGetPath,ue as routerNavigate,ie as routerReplace,q as runUntracked,q as untrack,G as runWithOwner,M as set,xe as show,we as splitProps,De as stateError,I as stateIsFailure,Te as stateIsPending,S as stateIsSuccess,n as stateValue,je as stopEvent,Ae as stopPropagation,Ce as subscribe,w as svgNs,o as text,i as textDyn,_ as update,Q as useContext};
@@ -1 +1 @@
1
- import"./src-DviLMStS.js";import{Fragment as e,jsx as t,jsxDEV as n,jsxs as r}from"./jsx-runtime.js";export{e as Fragment,t as jsx,n as jsxDEV,r as jsxs};
1
+ import"./src-BbjOW18q.js";import{Fragment as e,jsx as t,jsxDEV as n,jsxs as r}from"./jsx-runtime.js";export{e as Fragment,t as jsx,n as jsxDEV,r as jsxs};
@@ -1 +1 @@
1
- import{D as e,Dt as t,Et as n,n as r}from"./src-DviLMStS.js";function i(e){return typeof e==`string`?e:typeof e!=`object`||!e?``:Object.entries(e).map(([e,t])=>`${e.replace(/([A-Z])/g,`-$1`).toLowerCase()}: ${t}`).join(`; `)}function a(e){if(!e)return[];let t=[];for(let[n,r]of Object.entries(e)){if(n===`children`)continue;let e=n,a;if(n===`className`&&(e=`class`),n===`dangerouslySetInnerHTML`){if(typeof r==`function`){let e=r;a={$tag:1,_0:()=>e().__html}}else if(r&&typeof r==`object`&&`__html`in r)a={$tag:0,_0:r.__html};else continue;t.push({_0:`__innerHTML`,_1:a});continue}if(n===`style`){if(typeof r==`function`){let e=r;a={$tag:1,_0:()=>i(e())}}else a={$tag:0,_0:i(r)};t.push({_0:e,_1:a});continue}if(n===`ref`&&typeof r==`function`){e=`__ref`,a={$tag:2,_0:r},t.push({_0:e,_1:a});continue}if(n.startsWith(`on`)&&typeof r==`function`){e=n.slice(2).toLowerCase(),a={$tag:2,_0:r},t.push({_0:e,_1:a});continue}a=typeof r==`function`?{$tag:1,_0:r}:{$tag:0,_0:String(r)},t.push({_0:e,_1:a})}return t}function o(e){if(!e)return[];let r;return r=Array.isArray(e)?e:[e],r.flat().map(e=>typeof e==`string`?n(e):typeof e==`number`?n(String(e)):typeof e==`function`&&e.length===0?t(()=>String(e())):e).filter(Boolean)}function s(t,n){let{children:r,...i}=n||{};if(typeof t==`function`)return t({...i,children:r});if(typeof t==`string`)return e(t,a(i),o(r));throw Error(`Invalid JSX type: ${t}`)}const c=s;function l({children:e}){return r(o(e))}const u=s;export{l as Fragment,s as jsx,u as jsxDEV,c as jsxs};
1
+ import{D as e,Dt as t,Et as n,n as r}from"./src-BbjOW18q.js";function i(e){return typeof e==`string`?e:typeof e!=`object`||!e?``:Object.entries(e).map(([e,t])=>`${e.replace(/([A-Z])/g,`-$1`).toLowerCase()}: ${t}`).join(`; `)}function a(e){if(!e)return[];let t=[];for(let[n,r]of Object.entries(e)){if(n===`children`)continue;let e=n,a;if(n===`className`&&(e=`class`),n===`dangerouslySetInnerHTML`){if(typeof r==`function`){let e=r;a={$tag:1,_0:()=>e().__html}}else if(r&&typeof r==`object`&&`__html`in r)a={$tag:0,_0:r.__html};else continue;t.push({_0:`__innerHTML`,_1:a});continue}if(n===`style`){if(typeof r==`function`){let e=r;a={$tag:1,_0:()=>i(e())}}else a={$tag:0,_0:i(r)};t.push({_0:e,_1:a});continue}if(n===`ref`&&typeof r==`function`){e=`__ref`,a={$tag:2,_0:r},t.push({_0:e,_1:a});continue}if(n.startsWith(`on`)&&typeof r==`function`){e=n.slice(2).toLowerCase(),a={$tag:2,_0:r},t.push({_0:e,_1:a});continue}a=typeof r==`function`?{$tag:1,_0:r}:{$tag:0,_0:String(r)},t.push({_0:e,_1:a})}return t}function o(e){if(!e)return[];let r;return r=Array.isArray(e)?e:[e],r.flat().map(e=>typeof e==`string`?n(e):typeof e==`number`?n(String(e)):typeof e==`function`&&e.length===0?t(()=>String(e())):e).filter(Boolean)}function s(t,n){let{children:r,...i}=n||{};if(typeof t==`function`)return t({...i,children:r});if(typeof t==`string`)return e(t,a(i),o(r));throw Error(`Invalid JSX type: ${t}`)}const c=s;function l({children:e}){return r(o(e))}const u=s;export{l as Fragment,s as jsx,u as jsxDEV,c as jsxs};
@@ -0,0 +1 @@
1
+ const e={$tag:0};function t(e){this._0=e}t.prototype.$tag=1;var n=class extends Error{};function r(){throw new n}function i(e,t){if(t<0||t>=e.length)throw Error(`Index out of bounds`)}function a(e){this._0=e}a.prototype.$tag=0;function o(e){this._0=e}o.prototype.$tag=1;const s={$tag:1},c={$tag:0},l=(e,t)=>e.toString(t);function u(e,t){let n=Array(e);return n.fill(t),n}const d=(e,t)=>{e.push(t)},f=e=>e.slice(0),p=(e,t)=>{e.length=t},m=e=>e.pop(),h=(e,t,n)=>e.splice(t,n),g=(e,t)=>e[t],_=(e,t,n)=>e[t](...n),v=e=>e==null,y=(e,t,n)=>{e[t]=n},ee=()=>null,te=()=>({}),ne=e=>Object.fromEntries(e.map(e=>[e._0,e._1])),re={$tag:0};function b(e){this._0=e}b.prototype.$tag=1;const ie={$tag:0};function ae(e){this._0=e}ae.prototype.$tag=1;const oe={$tag:0};function se(e){this._0=e}se.prototype.$tag=1;const ce=(e,t)=>setTimeout(e,t),le=e=>clearTimeout(e),x=()=>document,ue=(e,t)=>e.createElement(t),de=(e,t,n)=>e.createElementNS(t,n),fe=(e,t)=>e.createTextNode(t),pe={$tag:0};function me(e){this._0=e}me.prototype.$tag=1;const he=e=>queueMicrotask(e),ge={$tag:0};function _e(e){this._0=e}_e.prototype.$tag=1;function ve(e){this._0=e}ve.prototype.$tag=2;const S={$tag:0};function ye(e){this._0=e}ye.prototype.$tag=1;function be(e){this._0=e}be.prototype.$tag=0;function xe(e){this._0=e}xe.prototype.$tag=1;function C(e){this._0=e}C.prototype.$tag=2;function Se(e){this._0=e}Se.prototype.$tag=3;const Ce=(e,t)=>document.createElementNS(e,t),we=(e,t,n)=>e.addEventListener(t,n),Te=(e,t)=>e===t,Ee=(e,t,n)=>{if(typeof e.moveBefore==`function`)try{return e.moveBefore(t,n),t}catch{return e.insertBefore(t,n)}else return e.insertBefore(t,n)},De=(e,t)=>{if(typeof e.moveBefore==`function`)try{return e.moveBefore(t,null),t}catch{return e.insertBefore(t,null)}else return e.insertBefore(t,null)},Oe=(e,t)=>e.nextSibling===t,ke=(e,t)=>{try{t.parentNode===e?e.removeChild(t):t.parentNode&&t.parentNode.removeChild(t)}catch{}},Ae={$tag:0};function je(e){this._0=e}je.prototype.$tag=1;function Me(e){this._0=e}Me.prototype.$tag=0;function Ne(e){this._0=e}Ne.prototype.$tag=1;function Pe(e){this._0=e}Pe.prototype.$tag=2;const Fe=()=>window.location.pathname,Ie=()=>window.location.search,Le=e=>window.history.pushState(null,``,e),Re=e=>window.history.replaceState(null,``,e),ze=e=>window.addEventListener(`popstate`,()=>e()),Be=e=>queueMicrotask(e);function Ve(e,t,n,r){this._0=e,this._1=t,this._2=n,this._3=r}Ve.prototype.$tag=0;function He(e,t,n){this._0=e,this._1=t,this._2=n}He.prototype.$tag=1;function Ue(e,t){this._0=e,this._1=t}Ue.prototype.$tag=2;function We(e,t){this._0=e,this._1=t}We.prototype.$tag=3;const Ge=()=>void 0,Ke={method_0:yt,method_1:bt,method_2:Et,method_3:ct},w={current_owner:void 0,current_cleanups:e,batch_depth:0},qe=[],Je=[],T=Dn(void 0),E=R(0),D=R(0),Ye=$t(1024,void 0),O=R(0),Xe=R(0),k=En(e),Ze=R(0),Qe=R(0);function $e(e){return r()}function et(e){return r()}function tt(e){return r()}function nt(e){return r()}function rt(e,t){return $e(`${e}\n at ${xt(t)}\n`)}function it(e,t){return et(`${e}\n at ${xt(t)}\n`)}function at(e,t){return tt(`${e}\n at ${xt(t)}\n`)}function ot(e,t){return nt(`${e}\n at ${xt(t)}\n`)}function st(e){return{val:``}}function ct(e,t){let n=e;n.val=`${n.val}${String.fromCodePoint(t)}`}function lt(e,t){return(((Math.imul(e-55296|0,1024)|0)+t|0)-56320|0)+65536|0}function A(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function ut(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function dt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function ft(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function pt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function mt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function ht(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function gt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function j(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function _t(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function vt(e){let t={str:e,start:0,end:e.length},n=t.str,i=t.start,a=i+(t.end-t.start|0)|0,o=i,s=-1,c=-1,l=-1,u=-1,d=-1,f=-1,p=-1,m=-1,h=-1,g=-1,_=-1,v=-1,y=-1,ee=-1,te=-1;_L:{let e;_L$2:if(o<a){let t=o,r=n.charCodeAt(t);if(o=o+1|0,r<65){if(r<64)break _L;for(;;)if(m=o,o<a){_L$3:{let t=o,r=n.charCodeAt(t);if(o=o+1|0,r<55296){if(r<58||r>58)break _L$3;if(o<a){_L$4:{let t=o,r=n.charCodeAt(t);if(o=o+1|0,r<56319){if(r<55296)break _L$4;e=7;break _L$2}else if(r>56319){if(r<65536)break _L$4;break _L}else{e=8;break _L$2}}e=0;break _L$2}else break _L}else if(r>56318)if(r<57344)if(o<a){let e=o,t=n.charCodeAt(e);if(o=o+1|0,t<56320||t>57343)break _L;continue}else break _L;else if(r>65535)break _L;else break _L$3;else if(o<a){let e=o,t=n.charCodeAt(e);if(o=o+1|0,t<56320||t>65535)break _L;continue}else break _L}continue}else break _L}else break _L}else break _L;let t=e;_L$3:for(;;){let e=t;_L$4:{_L$5:switch(e){case 3:if(_=g,g=h,h=o,o<a){_L$6:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296)if(r<58){if(r<48)break _L$6;if(h=o,ee=y,y=o,v=o,o<a){_L$7:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<59)if(r<46){if(r<45)break _L$7;break _L$4}else if(r>47)if(r<58){t=6;continue _L$3}else{t=3;continue _L$3}else break _L$7;else if(r>55295)if(r<57344)if(r<56319){t=7;continue _L$3}else{t=8;continue _L$3}else if(r>65535)break _L;else break _L$7;else break _L$7}t=0;continue _L$3}else break _L}else if(r>58)break _L$6;else{t=1;continue _L$3}else if(r>56318)if(r<57344){t=8;continue _L$3}else if(r>65535)break _L;else break _L$6;else{t=7;continue _L$3}}t=0;continue _L$3}else break _L;case 2:if(h=o,y=o,o<a){_L$6:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296)if(r<58){if(r<48)break _L$6;t=2;continue _L$3}else if(r>58)break _L$6;else{t=3;continue _L$3}else if(r>56318)if(r<57344){t=8;continue _L$3}else if(r>65535)break _L;else break _L$6;else{t=7;continue _L$3}}t=0;continue _L$3}else break _L;case 0:if(h=o,o<a){_L$6:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296){if(r<58||r>58)break _L$6;t=1;continue _L$3}else if(r>56318)if(r<57344){t=8;continue _L$3}else if(r>65535)break _L;else break _L$6;else{t=7;continue _L$3}}t=0;continue _L$3}else break _L;case 8:if(o<a){let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<56320||r>57343)break _L;t=0;continue _L$3}else break _L;case 4:if(h=o,te=o,o<a){_L$6:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296)if(r<58){if(r<48)break _L$6;t=4;continue _L$3}else if(r>58)break _L$6;else if(_=g,g=h,h=o,o<a){_L$7:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296)if(r<58){if(r<48)break _L$7;if(h=o,ee=y,y=o,o<a){_L$8:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296)if(r<58){if(r<48)break _L$8;t=5;continue _L$3}else if(r>58)break _L$8;else{t=3;continue _L$3}else if(r>56318)if(r<57344){t=8;continue _L$3}else if(r>65535)break _L;else break _L$8;else{t=7;continue _L$3}}t=0;continue _L$3}else break _L$5}else if(r>58)break _L$7;else{t=1;continue _L$3}else if(r>56318)if(r<57344){t=8;continue _L$3}else if(r>65535)break _L;else break _L$7;else{t=7;continue _L$3}}t=0;continue _L$3}else break _L;else if(r>56318)if(r<57344){t=8;continue _L$3}else if(r>65535)break _L;else break _L$6;else{t=7;continue _L$3}}t=0;continue _L$3}else break _L;case 5:if(h=o,y=o,o<a){_L$6:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296)if(r<58){if(r<48)break _L$6;t=5;continue _L$3}else if(r>58)break _L$6;else{t=3;continue _L$3}else if(r>56318)if(r<57344){t=8;continue _L$3}else if(r>65535)break _L;else break _L$6;else{t=7;continue _L$3}}t=0;continue _L$3}else break _L$5;case 6:if(h=o,y=o,v=o,o<a){_L$6:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<59)if(r<46){if(r<45)break _L$6;break _L$4}else if(r>47)if(r<58){t=6;continue _L$3}else{t=3;continue _L$3}else break _L$6;else if(r>55295)if(r<57344)if(r<56319){t=7;continue _L$3}else{t=8;continue _L$3}else if(r>65535)break _L;else break _L$6;else break _L$6}t=0;continue _L$3}else break _L;case 7:if(o<a){let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<56320||r>65535)break _L;t=0;continue _L$3}else break _L;case 1:if(g=h,h=o,o<a){_L$6:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296)if(r<58){if(r<48)break _L$6;t=2;continue _L$3}else if(r>58)break _L$6;else{t=1;continue _L$3}else if(r>56318)if(r<57344){t=8;continue _L$3}else if(r>65535)break _L;else break _L$6;else{t=7;continue _L$3}}t=0;continue _L$3}else break _L;default:break _L}h=_,y=ee,l=m,u=h,d=y,f=v,p=te,s=0,c=o;break _L}if(g=_,h=o,y=ee,o<a){_L$5:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296)if(r<58){if(r<48)break _L$5;t=4;continue}else if(r>58)break _L$5;else{t=1;continue}else if(r>56318)if(r<57344){t=8;continue}else if(r>65535)break _L;else break _L$5;else{t=7;continue}}t=0;continue}else break _L}}if(s===0){let e;_L$2:{_L$3:{let t=N(n,u+1|0,d);if(t.$tag===1)e=t._0;else{t._0;break _L$3}break _L$2}e=r()}let t;_L$3:{_L$4:{let e=N(n,d+1|0,f);if(e.$tag===1)t=e._0;else{e._0;break _L$4}break _L$3}t=r()}let a;_L$4:{_L$5:{let e=N(n,i+1|0,l);if(e.$tag===1)a=e._0;else{e._0;break _L$5}break _L$4}a=r()}let o;_L$5:{_L$6:{let e=N(n,l+1|0,u);if(e.$tag===1)o=e._0;else{e._0;break _L$6}break _L$5}o=r()}let s;_L$6:{_L$7:{let e=N(n,f+1|0,p);if(e.$tag===1)s=e._0;else{e._0;break _L$7}break _L$6}s=r()}let m;_L$7:{_L$8:{let e=N(n,p+1|0,c);if(e.$tag===1)m=e._0;else{e._0;break _L$8}break _L$7}m=r()}return{pkg:a,filename:o,start_line:e,start_column:t,end_line:s,end_column:m}}else return r()}function yt(e,t){let n=e;n.val=`${n.val}${t}`}function M(e,t,n){let r=e.length,i;if(n===void 0)i=r;else{let e=n;i=e<0?r+e|0:e}let l=t<0?r+t|0:t;if(l>=0&&l<=i&&i<=r){let t;if(l<r){let n=e.charCodeAt(l);t=56320<=n&&n<=57343}else t=!1;if(t)return new a(c);let n;if(i<r){let t=e.charCodeAt(i);n=56320<=t&&t<=57343}else n=!1;return n?new a(c):new o({str:e,start:l,end:i})}else return new a(s)}function N(e,t,n){let r;return r=t===void 0?0:t,M(e,r,n)}function bt(e,t,n,i){let a;_L:{_L$2:{let e=M(t,n,n+i|0);if(e.$tag===1)a=e._0;else{e._0;break _L$2}break _L}a=r()}Et(e,a)}function xt(e){let t=st(0);return an(e,{self:t,method_table:Ke}),t.val}function St(e){let t=st(0);return Zt(e,{self:t,method_table:Ke}),t.val}function Ct(e,t){return l(e,t)}function wt(e){return e.str.substring(e.start,e.end)}function Tt(e){let t=st(Math.imul(e.end-e.start|0,4)|0),n=e.end-e.start|0,r=0;for(;;){let i=r;if(i<n){let n=e.buf[e.start+i|0];ct(t,n),r=i+1|0;continue}else break}return t.val}function Et(e,t){let n=e;n.val=`${n.val}${wt(t)}`}function Dt(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let a=u(256,r),o=r-1|0,s=0;for(;;){let e=s;if(e<o){let n=t.str,o=t.start+e|0,c=n.charCodeAt(o)&255;i(a,c),a[c]=(r-1|0)-e|0,s=e+1|0;continue}else break}let c=0;for(;;){let o=c;if(o<=(n-r|0)){let n=r-1|0,s=0;for(;;){let r=s;if(r<=n){let n=o+r|0,i=e.str,a=e.start+n|0,c=i.charCodeAt(a),l=t.str,u=t.start+r|0;if(c!==l.charCodeAt(u))break;s=r+1|0;continue}else return o}let l=(o+r|0)-1|0,u=e.str,d=e.start+l|0,f=u.charCodeAt(d)&255;i(a,f),c=o+a[f]|0;continue}else break}return}else return;else return 0}function Ot(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let i=t.str,a=t.start+0|0,o=i.charCodeAt(a),s=n-r|0,c=0;for(;c<=s;){for(;;){let t;if(c<=s){let n=c,r=e.str,i=e.start+n|0;t=r.charCodeAt(i)!==o}else t=!1;if(t){c=c+1|0;continue}else break}if(c<=s){let n=1;for(;;){let i=n;if(i<r){let r=c+i|0,a=e.str,o=e.start+r|0,s=a.charCodeAt(o),l=t.str,u=t.start+i|0;if(s!==l.charCodeAt(u))break;n=i+1|0;continue}else return c}c=c+1|0}}return}else return;else return 0}function kt(e,t){return(t.end-t.start|0)<=4?Ot(e,t):Dt(e,t)}function At(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let a=u(256,r),o=r-1|0;for(;;){let e=o;if(e>0){let n=t.str,r=t.start+e|0,s=n.charCodeAt(r)&255;i(a,s),a[s]=e,o=e-1|0;continue}else break}let s=n-r|0;for(;;){let n=s;if(n>=0){let o=0;for(;;){let i=o;if(i<r){let r=n+i|0,a=e.str,s=e.start+r|0,c=a.charCodeAt(s),l=t.str,u=t.start+i|0;if(c!==l.charCodeAt(u))break;o=i+1|0;continue}else return n}let c=e.str,l=e.start+n|0,u=c.charCodeAt(l)&255;i(a,u),s=n-a[u]|0;continue}else break}return}else return;else return n}function jt(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let i=t.str,a=t.start+0|0,o=i.charCodeAt(a),s=n-r|0;for(;s>=0;){for(;;){let t;if(s>=0){let n=s,r=e.str,i=e.start+n|0;t=r.charCodeAt(i)!==o}else t=!1;if(t){s=s-1|0;continue}else break}if(s>=0){let n=1;for(;;){let i=n;if(i<r){let r=s+i|0,a=e.str,o=e.start+r|0,c=a.charCodeAt(o),l=t.str,u=t.start+i|0;if(c!==l.charCodeAt(u))break;n=i+1|0;continue}else return s}s=s-1|0}}return}else return;else return n}function Mt(e,t){return(t.end-t.start|0)<=4?jt(e,t):At(e,t)}function Nt(e,t){let n=Mt(e,t);return n===void 0?!1:n===((e.end-e.start|0)-(t.end-t.start|0)|0)}function Pt(e,t){return Nt({str:e,start:0,end:e.length},t)}function Ft(e,t){let n=kt(e,t);return n===void 0?!1:n===0}function P(e,t){return Ft({str:e,start:0,end:e.length},t)}function It(e){return[]}function F(e,t){d(e,t)}function Lt(e,t){d(e,t)}function Rt(e,t){d(e,t)}function zt(e,t){d(e,t)}function Bt(e,t){d(e,t)}function Vt(e,t){d(e,t)}function Ht(e,t){d(e,t)}function Ut(e,t){d(e,t)}function Wt(e,t){d(e,t)}function I(e,t){d(e,t)}function Gt(e,t){d(e,t)}function Kt(e,t){d(e,t)}function qt(e){return e()}function Jt(e){let t=e.length,n={val:0};return()=>{if(n.val<t){let r=n.val,i=e.charCodeAt(r);if(55296<=i&&i<=56319&&(n.val+1|0)<t){let t=n.val+1|0,r=e.charCodeAt(t);if(56320<=r&&r<=57343){let e=lt(i,r);return n.val=n.val+2|0,e}}return n.val=n.val+1|0,i}else return-1}}function Yt(e){return String.fromCodePoint(e)}function Xt(e){let t=Jt(e),n=It(e.length);for(;;){let e=qt(t);if(e===-1)break;{let t=e,r=n;Kt(r,t),n=r;continue}}return n}function Zt(e,t){t.method_table.method_0(t.self,Ct(e,10))}function Qt(e,t){let n=Array(e),r=0;for(;;){let i=r;if(i<e){n[i]=t,r=i+1|0;continue}else break}return n}function $t(e,t){let n=Array(e),r=0;for(;;){let i=r;if(i<e){n[i]=t,r=i+1|0;continue}else break}return n}function en(e,t,n){let a=e.length;if(t>=0&&t<a){i(e,t),e[t]=n;return}else{r();return}}function tn(e,t,n){let a=e.length;if(t>=0&&t<a){i(e,t),e[t]=n;return}else{r();return}}function nn(e,t,n){let a=e.length;if(t>=0&&t<a){i(e,t),e[t]=n;return}else{r();return}}function rn(e,t){let n=e.pkg,i=n.str,a=n.start,o=a+(n.end-n.start|0)|0,s=a,c=-1,l=-1,u=-1,d=-1,f;_L:{_L$2:{_L$3:for(;;)if(s<o)_L$4:{_L$5:{let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<55296){if(t<47||t>47)break _L$5;_L$6:for(;;)if(d=s,s<o){_L$7:{let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<55296){if(t<47||t>47)break _L$7;for(;;)if(s<o){_L$8:{let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<56319){if(t<55296)break _L$8;if(s<o){let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<56320||t>65535)break _L$2;continue}else break _L$2}else if(t>56319){if(t<65536)break _L$8;break _L$2}else if(s<o){let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<56320||t>57343)break _L$2;continue}else break _L$2}continue}else{u=d,c=0,l=s;break _L$2}}else if(t>56318)if(t<57344)if(s<o){let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<56320||t>57343)break _L$2;continue}else break _L$2;else if(t>65535)break _L$2;else break _L$7;else if(s<o){let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<56320||t>65535)break _L$2;continue}else break _L$2}continue}else break _L$2}else if(t>56318)if(t<57344)if(s<o){let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<56320||t>57343)break _L$2;continue}else break _L$2;else if(t>65535)break _L$2;else break _L$5;else if(s<o){let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<56320||t>65535)break _L$2;continue}else break _L$2;break _L$4}continue}else break _L$2;break _L}if(c===0){let e;_L$3:{_L$4:{let t=N(i,u+1|0,l);if(t.$tag===1)e=t._0;else{t._0;break _L$4}break _L$3}e=r()}let t;_L$4:{_L$5:{let e=N(i,a,u);if(e.$tag===1)t=e._0;else{e._0;break _L$5}break _L$4}t=r()}f={_0:t,_1:e}}else f={_0:n,_1:void 0}}let p=f._0,m=f._1;if(m!==void 0){let e=m;t.method_table.method_2(t.self,e),t.method_table.method_3(t.self,47)}t.method_table.method_2(t.self,e.filename),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.start_line),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.start_column),t.method_table.method_3(t.self,45),t.method_table.method_2(t.self,e.end_line),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.end_column),t.method_table.method_3(t.self,64),t.method_table.method_2(t.self,p)}function an(e,t){rn(vt(e),t)}function on(e,t,n){let r=e.length,i;if(n===void 0)i=r;else{let e=n;i=e<0?r+e|0:e}let a=t<0?r+t|0:t;return a>=0&&a<=i&&i<=r?{buf:e,start:a,end:i}:ot(`View index out of bounds`,`@moonbitlang/core/builtin:arrayview.mbt:251:5-251:38`)}function sn(e,t){p(e,t)}function cn(e,t){p(e,t)}function ln(e,t){p(e,t)}function un(e,t){p(e,t)}function dn(e){return m(e)}function fn(e){return m(e)}function pn(e){if(e.length!==0)return dn(e)}function mn(e){return e.length===0?-1:fn(e)}function hn(e,t){if(t>=0&&t<e.length){i(e,t);let n=e[t];return h(e,t,1),n}else return it(`index out of bounds: the len is from 0 to ${St(e.length)} but the index is ${St(t)}`,`@moonbitlang/core/builtin:arraycore_js.mbt:251:5-253:6`)}function gn(e,t){if(t>=0&&t<e.length){i(e,t);let n=e[t];return h(e,t,1),n}else return at(`index out of bounds: the len is from 0 to ${St(e.length)} but the index is ${St(t)}`,`@moonbitlang/core/builtin:arraycore_js.mbt:251:5-253:6`)}function _n(e){return f(e)}function L(e){sn(e,0)}function vn(e){cn(e,0)}function yn(e){un(e,0)}function bn(e){return{val:e}}function xn(e){return{val:e}}function Sn(e){return{val:e}}function Cn(e){return{val:e}}function wn(e){return{val:e}}function R(e){return{val:e}}function Tn(e){return{val:e}}function En(e){return{val:e}}function Dn(e){return{val:e}}function On(e){return{val:e}}function kn(e){return v(e)?re:new b(e)}function An(e){return v(e)?ie:new ae(e)}function jn(e){return v(e)?oe:new se(e)}function Mn(e,t,n){return{mode:e,delegatesFocus:t,slotAssignment:n}}function Nn(e,t){return _(e,`attachShadow`,[ne([{_0:`mode`,_1:t.mode},{_0:`delegatesFocus`,_1:t.delegatesFocus},{_0:`slotAssignment`,_1:t.slotAssignment}])])}function Pn(e){return g(e,`nodeType`)}function Fn(e){return kn(g(e,`parentNode`))}function In(e){return kn(g(e,`firstChild`))}function z(e,t){return _(e,`appendChild`,[t])}function Ln(e,t){return _(e,`removeChild`,[t])}function Rn(e,t,n){if(n.$tag===1){let r=n._0;return _(e,`insertBefore`,[t,r])}else return _(e,`insertBefore`,[t,ee()])}function zn(e,t){y(e,`textContent`,t)}function Bn(e,t){y(e,`className`,t)}function Vn(e,t,n){_(e,`setAttribute`,[t,n])}function Hn(e,t){_(e,`removeAttribute`,[t])}function Un(e,t){return An(_(e,`querySelector`,[t]))}function Wn(e){return jn(g(e,`body`))}function Gn(e){return _(e,`createDocumentFragment`,[])}function Kn(e,t){return _(e,`createComment`,[t])}function qn(e){return e.$tag===0}function Jn(e){return e.$tag===1}function Yn(e){return e.$tag===2}function Xn(e){if(e.$tag===1){let t=e._0;return new me(t)}else return pe}function Zn(e){if(e.$tag===2)return e._0}function B(e,t){e.value=t}function V(e){switch(e){case 0:return 0;case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;default:return 32}}function H(e){let t=e.deps_tail,n;for(n=t===void 0?e.deps:t.next_dep;;){let t=n;if(t===void 0)return;n=Qn(t,e)}}function Qn(e,t){let n=e.dep,r=e.prev_dep,i=e.next_dep,a=e.next_sub,o=e.prev_sub;if(i===void 0)t.deps_tail=r;else{let e=i;e.prev_dep=r}if(r===void 0)t.deps=i;else{let e=r;e.next_dep=i}if(a===void 0)n.subs_tail=o;else{let e=a;e.prev_sub=o}if(o===void 0)n.subs=a,a===void 0&&$n(n);else{let e=o;e.next_sub=a}return i}function $n(e){if((e.flags.value&V(1))===0){er(e);return}else if(e.deps_tail===void 0)return;else{e.deps_tail=void 0,B(e.flags,V(1)|V(16)),H(e);return}}function er(e){e.deps_tail=void 0,B(e.flags,V(0)),H(e);let t=e.subs;if(t!==void 0){let e=t;Qn(e,e.sub);return}}function tr(e){e.deps_tail=void 0,B(e.flags,V(0)),e.effect_callback=void 0,H(e);let t=e.subs;if(t!==void 0){let e=t;Qn(e,e.sub);return}}function nr(e){let t=e.length-1|0;for(;;){let n=t;if(n>=0){A(e,n)(),t=n-1|0;continue}else break}L(e)}function U(){E.val=E.val+1|0}function W(e,t,n){let r=t.deps_tail;if(r!==void 0&&r.dep===e)return;let i;if(i=r===void 0?t.deps:r.next_dep,i!==void 0){let r=i;if(r.dep===e){r.version=n,t.deps_tail=r;return}}let a=e.subs_tail;if(a!==void 0){let e=a;if(e.version===n&&e.sub===t)return}let o={version:n,dep:e,sub:t,prev_sub:e.subs_tail,next_sub:void 0,prev_dep:r,next_dep:i};if(t.deps_tail=o,i!==void 0){let e=i;e.prev_dep=o}if(r===void 0)t.deps=o;else{let e=r;e.next_dep=o}let s=o.prev_sub;if(s===void 0)e.subs=o;else{let e=s;e.next_sub=o}e.subs_tail=o}function G(e){let t=T.val;return T.val=e,t}function rr(e){return{value:e}}function K(e){return{deps:void 0,deps_tail:void 0,subs:void 0,subs_tail:void 0,flags:rr(e),last_modified_cycle:0,effect_callback:void 0}}function ir(e){let n=[],r=K(V(2)|V(4));r.effect_callback=()=>{let i=r.flags.value,a=V(16),o=V(32);if((i&a)!==0||(i&o)!==0){U(),r.deps_tail=void 0,B(r.flags,V(2)|V(4)),nr(n);let i=G(r),a=k.val;k.val=new t(n),e(),k.val=a,G(i);let o=r.flags.value;B(r.flags,o&(V(4)^-1)),H(r);return}else{B(r.flags,V(2));return}};let i=G(r);i===void 0||W(r,i,0);let a=k.val;k.val=new t(n),e(),k.val=a,G(i);let o=r.flags.value;return B(r.flags,o&(V(4)^-1)),()=>{nr(n),tr(r)}}function ar(e){let t=w.current_owner;t!==void 0&&F(t.disposers,e)}function or(e){let t=w.current_cleanups;return w.current_cleanups=e,t}function sr(e,n){let r=or(new t(e));n(),w.current_cleanups=r}function q(e){let t=[],n=ir(()=>{let n=t.length-1|0;for(;;){let e=n;if(e>=0){A(t,e)(),n=e-1|0;continue}else break}L(t),sr(t,e)}),r=()=>{let e=t.length-1|0;for(;;){let n=e;if(n>=0){A(t,n)(),e=n-1|0;continue}else break}L(t),n()};return ar(r),r}function cr(e,t){e.value&=V(t)^-1}function lr(e){let t=e.effect_callback;if(t!==void 0){let n=t,r=!1,i=Je.length,a=0;for(;;){let t=a;if(t<i){if(Je[t]===e){r=!0;break}a=t+1|0;continue}else break}if(r)return;F(qe,n),Ut(Je,e),cr(e.flags,2);return}}function J(e){let t=e;for(;;){let e=t;if(e===void 0)return;{let n=e,r=n.sub,i=r.flags.value,a=V(32),o=V(16),s=V(2),c=V(4);(i&(a|o))===a&&(B(r.flags,i|o),(i&(s|c))===s&&lr(r)),t=n.next_sub;continue}}}function ur(e){if((e.node.flags.value&V(16))!==0){if(e.current_value!==e.pending_value){e.current_value=e.pending_value;let t=e.node.subs;t===void 0||J(t)}B(e.node.flags,V(1))}let t=T.val;for(;;){let n=t;if(n===void 0)break;{let r=n;if((r.flags.value&(V(1)|V(2)))!==0){W(e.node,r,E.val);break}let i=r.subs,a;a=i===void 0?void 0:i.sub,t=a;continue}}return e.current_value}function dr(e){if((e.node.flags.value&V(16))!==0){if(e.current_value!==e.pending_value){e.current_value=e.pending_value;let t=e.node.subs;t===void 0||J(t)}B(e.node.flags,V(1))}let t=T.val;for(;;){let n=t;if(n===void 0)break;{let r=n;if((r.flags.value&(V(1)|V(2)))!==0){W(e.node,r,E.val);break}let i=r.subs,a;a=i===void 0?void 0:i.sub,t=a;continue}}return e.current_value}function fr(e){if((e.node.flags.value&V(16))!==0){if(e.current_value!==e.pending_value){e.current_value=e.pending_value;let t=e.node.subs;t===void 0||J(t)}B(e.node.flags,V(1))}let t=T.val;for(;;){let n=t;if(n===void 0)break;{let r=n;if((r.flags.value&(V(1)|V(2)))!==0){W(e.node,r,E.val);break}let i=r.subs,a;a=i===void 0?void 0:i.sub,t=a;continue}}return e.current_value}function pr(e){if((e.node.flags.value&V(16))!==0){if(e.current_value!==e.pending_value){e.current_value=e.pending_value;let t=e.node.subs;t===void 0||J(t)}B(e.node.flags,V(1))}let t=T.val;for(;;){let n=t;if(n===void 0)break;{let r=n;if((r.flags.value&(V(1)|V(2)))!==0){W(e.node,r,E.val);break}let i=r.subs,a;a=i===void 0?void 0:i.sub,t=a;continue}}return e.current_value}function Y(e){return ur(e.inner)}function mr(e){return dr(e.inner)}function hr(e){return fr(e.inner)}function gr(e){return pr(e.inner)}function _r(){D.val=D.val+1|0}function vr(e,t,n){let r=e,i=V(16),a=V(1);for(;;){let e=r;if(e===void 0)break;{let o=e,s=o.dep,c=s.flags.value;if((t.flags.value&i)!==0)return!0;if((c&(a|i))===(a|i)&&n(s)){let e=s.subs;if(e!==void 0){let t=e;t.next_sub===void 0||J(t)}return!0}r=o.next_dep;continue}}return!1}function yr(e){let t=e.node.flags.value,n=V(16),r=V(32),i=e.node.deps,a;if(a=i===void 0?!1:vr(i,e.node,e=>!1),(t&n)!==0||(t&r)!==0&&a){U(),e.node.deps_tail=void 0,B(e.node.flags,V(2)|V(4));let t=G(e.node),n=e.run_fn;n(),G(t);let r=e.node.flags.value;B(e.node.flags,r&(V(4)^-1)),H(e.node);return}else{B(e.node.flags,V(2));return}}function br(){for(;O.val<Xe.val;){let e=pt(Ye,O.val);if(e===void 0)O.val=O.val+1|0;else{let t=e;en(Ye,O.val,void 0),O.val=O.val+1|0,yr(t)}}for(O.val=0,Xe.val=0;;)if(qe.length>0){let e=hn(qe,0);gn(Je,0),e();continue}else return}function xr(){if(D.val=D.val-1|0,D.val===0){br();return}else return}function Sr(e,t){let n=t.deps_tail;for(;;){let t=n;if(t===void 0)break;{let r=t;if(r===e)return!0;n=r.prev_dep;continue}}return!1}function Cr(e){let t=Tn(e),n=Tn(e.next_sub),r=[],i=!0;for(;;)if(i){let e=t.val;if(e===void 0)if(r.length>0){let e=pn(r);if(e===void 0)i=!1;else{let r=e._0;t.val=r;let i;i=r===void 0?void 0:r.next_sub,n.val=i}}else i=!1;else{let i=e,a=i.sub,o=a.flags.value,s=V(1),c=V(2),l=V(4),u=V(8),d=V(16),f=V(32),p=o,m=!1,h=!1;if((o&(l|u|d|f))===0?(p=o|f,B(a.flags,p)):(o&(l|u))===0?p=V(0):(o&l)===0?(p=o&(u^-1)|f,B(a.flags,p)):(o&(d|f))===0&&Sr(i,a)?(p=o|u|f,B(a.flags,p),p&=s):p=V(0),(p&c)!==0&&(m=!0),(p&s)!==0&&(h=!0),m&&lr(a),h){let e=a.subs;if(e===void 0){t.val=n.val;let e=t.val;e===void 0?n.val=void 0:n.val=e.next_sub}else{let i=e;i.next_sub===void 0||(Ht(r,{_0:n.val,_1:void 0}),n.val=i.next_sub),t.val=i}}else{t.val=n.val;let e=t.val;e===void 0?n.val=void 0:n.val=e.next_sub}}continue}else return}function wr(e){return{node:K(V(1)),current_value:e,pending_value:e}}function Tr(e){return{node:K(V(1)),current_value:e,pending_value:e}}function Er(e){return{node:K(V(1)),current_value:e,pending_value:e}}function Dr(e){return{node:K(V(1)),current_value:e,pending_value:e}}function Or(e){return{inner:wr(e)}}function kr(e){return{inner:Tr(e)}}function Ar(e){return{inner:Er(e)}}function jr(e){return{inner:Dr(e)}}function Mr(e){return Or(e)}function Nr(e){return kr(e)}function Pr(e){return Ar(e)}function Fr(e){return jr(e)}function Ir(e,t){if(e.pending_value!==t){e.pending_value=t,U(),e.node.last_modified_cycle=E.val,B(e.node.flags,V(1)|V(16));let n=e.node.subs;if(n===void 0)return;if(Cr(n),D.val===0){br();return}else return}else return}function Lr(e,t){if(e.pending_value!==t){e.pending_value=t,U(),e.node.last_modified_cycle=E.val,B(e.node.flags,V(1)|V(16));let n=e.node.subs;if(n===void 0)return;if(Cr(n),D.val===0){br();return}else return}else return}function Rr(e,t){if(e.pending_value!==t){e.pending_value=t,U(),e.node.last_modified_cycle=E.val,B(e.node.flags,V(1)|V(16));let n=e.node.subs;if(n===void 0)return;if(Cr(n),D.val===0){br();return}else return}else return}function zr(e,t){if(e.pending_value!==t){e.pending_value=t,U(),e.node.last_modified_cycle=E.val,B(e.node.flags,V(1)|V(16));let n=e.node.subs;if(n===void 0)return;if(Cr(n),D.val===0){br();return}else return}else return}function Br(e,t){Ir(e.inner,t)}function X(e,t){Lr(e.inner,t)}function Vr(e,t){Rr(e.inner,t)}function Hr(e,t){zr(e.inner,t)}function Ur(e){let t=bn(!0),n=xn(void 0),r=[],i=()=>{let t=r.length-1|0;for(;;){let e=t;if(e>=0){A(r,e)(),t=e-1|0;continue}else break}L(r),sr(r,e)};he(()=>{if(t.val){n.val=ir(i);return}else return});let a=()=>{t.val=!1;let e=r.length-1|0;for(;;){let t=e;if(t>=0){A(r,t)(),e=t-1|0;continue}else break}L(r);let i=n.val;i!==void 0&&i()};return ar(a),a}function Wr(e){return(e.node.flags.value&V(16))===0?e.current_value:e.pending_value}function Gr(e){return(e.node.flags.value&V(16))===0?e.current_value:e.pending_value}function Kr(e){return Wr(e.inner)}function Z(e){return Gr(e.inner)}function qr(e,t){Ir(e,t(ur(e)))}function Jr(e,t){qr(e.inner,t)}function Yr(e){return{node:K(V(0)),value:pe,getter:e}}function Xr(e){let t=V(16),n=V(32),r=V(1),i=e.deps;for(;;){let e=i;if(e===void 0)break;{let a=e,o=a.dep,s=o.flags.value;if((s&r)!==0&&(o.last_modified_cycle>a.version||(s&(t|n))!==0))return!0;i=a.next_dep;continue}}return!1}function Zr(e){U(),e.node.deps_tail=void 0,B(e.node.flags,V(1)|V(4));let t=G(e.node),n=e.value,r=e.getter,i=r();e.value=new me(i),G(t);let a=e.node.flags.value;return B(e.node.flags,a&(V(4)^-1)),H(e.node),n.$tag===1?n._0!==i:!0}function Qr(e){let t=e.node.flags.value,n=V(16),r=V(32),i=V(1),a=V(4),o=(t&n)!==0,s=(t&r)!==0,c=s?Xr(e.node):!1;if(o||c){if(Zr(e)){let t=e.node.subs;t===void 0||J(t)}}else if(s)B(e.node.flags,t&(r^-1));else if(t===V(0)){B(e.node.flags,i|a);let t=G(e.node),n=e.getter;e.value=new me(n()),G(t);let r=e.node.flags.value;B(e.node.flags,r&(a^-1))}let l=T.val;if(l!==void 0){let t=l;W(e.node,t,E.val)}let u=e.value;return u.$tag===1?u._0:rt(`Computed value not initialized`,`@mizchi/signals:computed.mbt:54:13-54:52`)}function $r(e){let t=Yr(e);return()=>Qr(t)}function ei(){w.batch_depth=w.batch_depth-1|0,xr()}function ti(){w.batch_depth=w.batch_depth+1|0,_r()}function ni(e){ti();let t=e();return ei(),t}function ri(e,t){let n=bn(!0);return q(()=>{let r=Y(e);if(n.val){n.val=!1;return}else{t(r);return}})}function ii(e){let t=Qe.val;return Qe.val=t+1|0,{id:t,default_value:()=>e,providers:[]}}function ai(e,t){let n=t;for(;;){let t=n;if(t===void 0)return!1;{let r=t;if(r.id===e)return!r.disposed;n=r.parent;continue}}}function oi(e,t){let n=e.providers.length-1|0;for(;;){let r=n;if(r>=0){let i=ft(e.providers,r),a=i._0,o=i._1;if(ai(a,t))return o;n=r-1|0;continue}else break}}function si(e,t){let n=w.current_owner;w.current_owner=e;let r=t();return w.current_owner=n,r}function ci(e,t){let n=w.current_owner;w.current_owner=e,t(),w.current_owner=n}function li(e,t){let n=w.current_owner;w.current_owner=e;let r=t();return w.current_owner=n,r}function ui(e,t){let n=w.current_owner;w.current_owner=e;let r=t();return w.current_owner=n,r}function di(e,t){let n=w.current_owner;w.current_owner=e;let r=t();return w.current_owner=n,r}function fi(e){if(e.disposed)return;e.disposed=!0;let t=e.children.length-1|0;for(;;){let n=t;if(n>=0){fi(dt(e.children,n)),t=n-1|0;continue}else break}let n=e.disposers.length-1|0;for(;;){let t=n;if(t>=0){A(e.disposers,t)(),n=t-1|0;continue}else break}let r=e.cleanups.length-1|0;for(;;){let t=r;if(t>=0){A(e.cleanups,t)(),r=t-1|0;continue}else break}vn(e.children),L(e.disposers),L(e.cleanups);let i=e.parent;if(i!==void 0){let t=i.children,n=t.length,r=0,a=0;for(;;){let i=r,o=a;if(i<n){let n=t[i];if(n.id!==e.id){t[o]=n,r=i+1|0,a=o+1|0;continue}r=i+1|0;continue}else{cn(t,o);return}}}}function pi(){let e=Ze.val;return Ze.val=e+1|0,e}function mi(e){let t={id:pi(),parent:e,children:[],cleanups:[],disposers:[],disposed:!1};return e===void 0||zt(e.children,t),t}function hi(e){let t=mi(w.current_owner),n=()=>{fi(t)};return si(t,()=>e(n))}function gi(e,t,n){let r=w.current_owner,i=mi(r),a=i.id;return Bt(e.providers,{_0:a,_1:()=>t}),F(i.cleanups,()=>{let t=e.providers,n=t.length,r=0,i=0;for(;;){let e=r,o=i;if(e<n){let n=t[e];if(n._0!==a){t[o]=n,r=e+1|0,i=o+1|0;continue}r=e+1|0;continue}else{ln(t,o);return}}}),si(i,n)}function _i(e,t,n){return w.current_owner===void 0?hi(r=>gi(e,t,n)):gi(e,t,n)}function vi(e){let t=w.current_owner,n=oi(e,t);if(n===void 0){let t=e.default_value;return t()}else return n()}function yi(e){let t=G(void 0),n=e();return G(t),n}function bi(e){let t=G(void 0);e(),G(t)}function xi(e){let t=G(void 0),n=e();return G(t),n}function Si(e){let t=G(void 0),n=e();return G(t),n}function Ci(e){let t=G(void 0),n=e();return G(t),n}function wi(e){let t=G(void 0),n=e();return G(t),n}function Ti(e){let t=w.current_cleanups;if(t.$tag===1){let n=t._0;F(n,e);return}else{let t=w.current_owner;if(t===void 0)return;F(t.cleanups,e);return}}function Ei(e){let t=mi(w.current_owner);return{_0:ui(t,e),_1:()=>{fi(t)}}}function Di(e){let t=w.current_owner;t!==void 0&&F(t.cleanups,e)}function Oi(e,t){return e===void 0?t():li(e,t)}function ki(e,t){return e===void 0?t():di(e,t)}function Ai(e,t){return $r(()=>t(Y(e)))}function ji(e,t,n){return $r(()=>n(Y(e),Y(t)))}function Mi(e){return gr(e.state)}function Ni(e){return Z(e.state)}function Pi(e){return qn(Z(e.state))}function Fi(e){return Jn(Z(e.state))}function Ii(e){return Yn(Z(e.state))}function Li(e){return Xn(Z(e.state))}function Ri(e){return Zn(Z(e.state))}function zi(e){let t=e.refetch_;t()}function Bi(e){let t=Nr(ge),n=e=>{X(t,new _e(e))},r=e=>{X(t,new ve(e))},i=()=>{X(t,ge),e(n,r)};return i(),{state:t,refetch_:i}}function Vi(){let e=Nr(ge);return{_0:{state:e,refetch_:()=>{X(e,ge)}},_1:t=>{X(e,new _e(t))},_2:t=>{X(e,new ve(t))}}}function Hi(e,t){let n=[],r=Xt(e),i=[],a=r.length,o=0;for(;;){let e=o;if(e<a){let a=r[e];a===t?(I(n,Tt({buf:i,start:0,end:i.length})),yn(i)):Kt(i,a),o=e+1|0;continue}else break}return I(n,Tt({buf:i,start:0,end:i.length})),n}function Ui(e){if(e!==``){let t=[],n=Hi(e,38),r=n.length,i=0;for(;;){let e=i;if(e<r){let r=n[e],a=Hi(r,61);if(a.length===2)Gt(t,{_0:j(a,0),_1:j(a,1)});else{let e;e=a.length===1?j(a,0)!==``:!1,e&&Gt(t,{_0:j(a,0),_1:``})}i=e+1|0;continue}else break}return t}else return[]}function Wi(e){let t=Xt(e),n=-1,r=t.length,i=0;for(;;){let e=i;if(e<r){if(t[e]===63){n=e;break}i=e+1|0;continue}else break}return n===-1?{_0:e,_1:[]}:{_0:Tt(on(t,0,n)),_1:Ui(Tt(on(t,n+1|0,void 0)))}}function Gi(e){return P(e,{str:`[`,start:0,end:1})&&Pt(e,{str:`]`,start:0,end:1})&&!P(e,{str:`[...`,start:0,end:4})&&!P(e,{str:`[[...`,start:0,end:5})}function Ki(e){if(e.length===0)return``;let t=st(0),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];i>0&&yt(t,`/`),yt(t,n),r=i+1|0;continue}else break}return t.val}function qi(e){let t=Hi(e,47),n=[],r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];r!==``&&I(n,r),i=e+1|0;continue}else break}return n}function Ji(e,t){let n=Yt(t);return P(e,{str:n,start:0,end:n.length})}function Yi(e,t){let n=qi(t.pattern),r=qi(e),i=t.catch_all;if(i===void 0){if(n.length!==r.length)return S;let e=[],i=0,a=n.length,o=0;for(;;){let s=o;if(s<a){let a=n[s],c=j(r,s);if(Ji(a,58)||Gi(a))if(i<t.param_names.length)Gt(e,{_0:j(t.param_names,i),_1:c}),i=i+1|0;else return S;else if(a!==c)return S;o=s+1|0;continue}else break}return new ye(e)}else{let e=i,a=n.length-1|0,o=r.length;if(e.optional){if(o<a)return S}else if(o<=a)return S;let s=[],c=0,l=0;for(;;){let e=l;if(e<a){let i=j(n,e),a=j(r,e);if(Ji(i,58)||Gi(i))if(c<t.param_names.length)Gt(s,{_0:j(t.param_names,c),_1:a}),c=c+1|0;else return S;else if(i!==a)return S;l=e+1|0;continue}else break}let u=[],d=a;for(;;){let e=d;if(e<o){I(u,j(r,e)),d=e+1|0;continue}else break}let f=Ki(u);return Gt(s,{_0:e.name,_1:f}),new ye(s)}}function Xi(e,t){let n=Wi(e),r=n._0,i=n._1,a=t.length,o=0;for(;;){let e=o;if(e<a){let n=t[e],a=Yi(r,n);if(a.$tag===1)return{route:n,params:a._0,query:i,path:r};o=e+1|0;continue}else break}}function Zi(e){if(e===``||e===`/`)return`/`;let t=Xt(e),n=[],r=!1,i=t.length,a=0;for(;;){let e=a;if(e<i){let i=t[e];i===47?(r||Kt(n,i),r=!0):(Kt(n,i),r=!1),a=e+1|0;continue}else break}let o=n.length;return o>1&&_t(n,o-1|0)===47&&mn(n),Tt({buf:n,start:0,end:n.length})}function Qi(e){let t=[],n=Hi(e,47),r=n.length,i=0;for(;;){let e=i;if(e<r){_L:{let r=n[e];if(P(r,{str:`:`,start:0,end:1})&&r.length>1){let e;_L$2:{_L$3:{let t=M(r,1,void 0),n;if(t.$tag===1)n=t._0;else{t._0;break _L$3}e=wt(n);break _L$2}break _L}I(t,e)}else if(P(r,{str:`[`,start:0,end:1})&&!P(r,{str:`[...`,start:0,end:4})&&!P(r,{str:`[[...`,start:0,end:5})&&Pt(r,{str:`]`,start:0,end:1})&&r.length>2){let e;_L$2:{_L$3:{let t=M(r,1,r.length-1|0),n;if(t.$tag===1)n=t._0;else{t._0;break _L$3}e=wt(n);break _L$2}break _L}I(t,e)}break _L}i=e+1|0;continue}else break}return t}function $i(e){let t=Hi(e,47);if(t.length===0)return;let n=j(t,t.length-1|0);if(P(n,{str:`[[...`,start:0,end:5})&&Pt(n,{str:`]]`,start:0,end:2})&&n.length>7){let e;_L:{_L$2:{let t=M(n,5,n.length-2|0),r;if(t.$tag===1)r=t._0;else{t._0;break _L$2}e=wt(r);break _L}return}return{name:e,optional:!0}}if(P(n,{str:`[...`,start:0,end:4})&&Pt(n,{str:`]`,start:0,end:1})&&n.length>5){let e;_L:{_L$2:{let t=M(n,4,n.length-1|0),r;if(t.$tag===1)r=t._0;else{t._0;break _L$2}e=wt(r);break _L}return}return{name:e,optional:!1}}}function ea(e,t,n,r){let i=e.length,a=0;for(;;){let o=a;if(o<i){let i=e[o];switch(i.$tag){case 0:{let e=i,a=e._0,o=e._1,s=e._2,c=e._3,l=Zi(`${t}${a}`),u=Qi(l),d=$i(l);Wt(r,{pattern:l,param_names:u,component:o,layouts:_n(n),kind:0,title:s,meta:c,catch_all:d});break}case 2:{let e=i,n=e._0,a=e._1,o=Zi(`${t}${n}`);Wt(r,{pattern:o,param_names:Qi(o),component:a,layouts:[],kind:1,title:``,meta:[],catch_all:$i(o)});break}case 3:{let e=i,n=e._0,a=e._1,o=Zi(`${t}${n}`);Wt(r,{pattern:o,param_names:Qi(o),component:a,layouts:[],kind:2,title:``,meta:[],catch_all:$i(o)});break}default:{let e=i,a=e._0,o=e._1,s=e._2,c=Zi(`${t}${a}`),l=_n(n);I(l,s),ea(o,c,l,r)}}a=o+1|0;continue}else return}}function ta(e,t){let n=[];return ea(e,t,[],n),n}function na(e){let t=fe(x(),e());return q(()=>{zn(t,e())}),new xe(t)}function ra(e,t,n){if(t===`className`||t===`class`){Bn(e,n);return}else if(t===`__innerHTML`){y(e,`innerHTML`,n);return}else if(t===`value`){y(e,`value`,n);return}else if(t===`checked`){y(e,`checked`,n===`true`);return}else if(t===`disabled`)if(n===`true`){Vn(e,`disabled`,``);return}else{Hn(e,`disabled`);return}else{Vn(e,t,n);return}}function ia(e,t){Vn(e,`style`,t)}function aa(e,t,n){switch(n.$tag){case 0:{let r=n._0;if(t===`style`){ia(e,r);return}else{ra(e,t,r);return}}case 1:{let r=n._0;q(()=>{let n=r();if(t===`style`){ia(e,n);return}else{ra(e,t,n);return}});return}default:{let r=n._0;if(t===`__ref`){r(e);return}else{we(e,t,r);return}}}}function oa(e){return{inner:e}}function Q(e){switch(e.$tag){case 0:return e._0.inner;case 1:return e._0;case 2:return e._0;default:return e._0}}function sa(e,t,n,r){let i=Ce(e,t),a=n.length,o=0;for(;;){let e=o;if(e<a){let t=n[e],r=t._0,a=t._1;aa(i,r,a),o=e+1|0;continue}else break}let s=r.length,c=0;for(;;){let e=c;if(e<s){let t=r[e];z(i,Q(t)),c=e+1|0;continue}else break}return new be(oa(i))}function ca(e,t,n){let r=ue(x(),e),i=t.length,a=0;for(;;){let e=a;if(e<i){let n=t[e],i=n._0,o=n._1;aa(r,i,o),a=e+1|0;continue}else break}let o=n.length,s=0;for(;;){let e=s;if(e<o){let t=n[e];z(r,Q(t)),s=e+1|0;continue}else break}return new be(oa(r))}function la(e,t){z(e,Q(t))}function ua(e){zn(e,``)}function da(e,t){ua(e),la(e,t)}function fa(e){if(Pn(e)===11){let t=[];for(;;){let n=In(e);if(n.$tag===1){let r=n._0;Vt(t,r),Ln(e,r);continue}else break}return t}else return[e]}function pa(e){switch(e.length){case 0:return new C(Gn(x()));case 1:return ut(e,0);default:{let t=Gn(x()),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];z(t,Q(n)),r=i+1|0;continue}else break}return new C(t)}}}function ma(e){let t=e._2,n=e._1,r=e._0;return ki(n,()=>{let e=Ei(()=>t()),n=e._0;return r.val=e._1,fa(Q(n))})}function ha(e,t){let n=Kn(x(),`show`),r=w.current_owner,i=xn(void 0),a={_0:i,_1:r,_2:t},o=Ci(()=>e())?wi(()=>ma(a)):[],s=Cn(o),c=bn(!0);if(q(()=>{let t=e(),r=s.val.length>0;if(c.val){c.val=!1;return}if(t===!0)if(r===!1){let e=Fn(n);if(e.$tag===1){let t=e._0,r=wi(()=>ma(a)),i=r.length,o=0;for(;;){let e=o;if(e<i){let i=r[e];Rn(t,i,new b(n)),o=e+1|0;continue}else break}s.val=r;return}else return}else return;else if(r===!0){let e=i.val;e===void 0||(e(),i.val=void 0);let t=s.val,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e],i=Fn(n);if(i.$tag===1){let e=i._0;Ln(e,n)}r=e+1|0;continue}else break}s.val=[];return}else return}),o.length>0){let e=[],t=o.length,r=0;for(;;){let n=r;if(n<t){let t=o[n];Rt(e,new C(t)),r=n+1|0;continue}else break}return Rt(e,new C(n)),pa(e)}else return new C(n)}function ga(e,t){return Te(e,t)}function _a(e,t){let n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];if(ga(n.item,t))return i;r=i+1|0;continue}else break}return-1}function va(e,t,n){if(n.$tag===1){let r=n._0;return Ee(e,t,r)}else return De(e,t)}function ya(e,t,n,r,i){let a=n.length;if(a===0){let n=t.length,r=0;for(;;){let i=r;if(i<n){let n=t[i],a=n.dispose;a(),ke(e,n.dom),r=i+1|0;continue}else break}return[]}let o=[],s=0;for(;;){let e=s;if(e<a){Lt(o,{item:mt(n,0),dom:i,dispose:()=>{}}),s=e+1|0;continue}else break}let c=Qt(t.length,!1),l=On(i),u=a-1|0;for(;;){let i=u;if(i>=0){let a=mt(n,i),s=_a(t,a);if(s>=0){let n=ht(t,s);tn(c,s,!0),Oe(n.dom,l.val)||va(e,n.dom,new b(l.val)),l.val=n.dom,nn(o,i,n)}else{let t=r(a,i),n=t._0,s=t._1;Rn(e,n,new b(l.val)),l.val=n,nn(o,i,{item:a,dom:n,dispose:s})}u=i-1|0;continue}else break}let d=t.length,f=0;for(;;){let n=f;if(n<d){let r=t[n];if(!gt(c,n)){let t=r.dispose;t(),ke(e,r.dom)}f=n+1|0;continue}else break}return o}function ba(e,t,n,r){let i=Fn(t);if(i.$tag===1){let a=i._0;e.val=ya(a,e.val,n,r,t);return}else return}function xa(e,t,n){return{item:e,dom:t,dispose:n}}function Sa(e,t){let n=x(),r=Kn(n,`for`),i=Sn([]),a=bn(!0),o=w.current_owner,s=(e,n)=>Oi(o,()=>{let r=Ei(()=>t(e,n)),i=r._0,a=r._1;return{_0:Q(i),_1:a}}),c=Gn(n),l=xi(()=>e()),u=l.length,d=0;for(;;){let e=d;if(e<u){let t=l[e],n=Si(()=>s(t,e)),r=n._0,a=n._1;Lt(i.val,xa(t,r,a)),z(c,r),d=e+1|0;continue}else break}return z(c,r),q(()=>{let t=e();if(a.val){a.val=!1;return}bi(()=>{ba(i,r,t,s)})}),new C(c)}function Ca(){return te()}function wa(e){return new xe(fe(x(),e))}function Ta(e){return new C(e)}function Ea(e,t){let n=Or(Kr(e)),r=wn(Ae),i=bn(!0);return q(()=>{let a=Y(e);if(i.val){i.val=!1;return}else{let e=r.val;if(e.$tag===1){let t=e._0;le(t)}r.val=new je(ce(()=>{Br(n,a)},t));return}}),n}function Da(e){return wa(e)}function Oa(e){return na(e)}function ka(e,t,n){return ca(e,t,n)}function Aa(e,t,n){return ca(e,t,n)}function ja(e){switch(e.$tag){case 0:return e._0;case 1:return e._0;default:return e._0}}function Ma(){return{mount:ie,use_shadow:!1,is_svg:!1}}function Na(e){return{mount:new ae(e),use_shadow:!1,is_svg:!1}}function Pa(){return{mount:ie,use_shadow:!0,is_svg:!1}}function Fa(e,t){let n=x(),r=e.mount,i;if(r.$tag===1)i=r._0;else{let e=Wn(n);i=e.$tag===1?e._0:ue(n,`div`)}let a=e.is_svg?de(n,`http://www.w3.org/2000/svg`,`g`):ue(n,`div`),o;e.use_shadow?(z(Nn(i,Mn(`open`,!1,`named`)),a),o=a):(z(i,a),o=a);let s=[],c=t.length,l=0;for(;;){let e=l;if(e<c){let n=t[e],r=ja(n);z(o,r),Vt(s,r),l=e+1|0;continue}else break}return Ti(()=>{let e=s.length,t=0;for(;;){let n=t;if(n<e){let e=s[n],r=Fn(e);if(r.$tag===1){let t=r._0;Ln(t,e)}t=n+1|0;continue}else break}let n=Fn(a);if(n.$tag===1){let e=n._0;Ln(e,a);return}else return}),new Pe(Kn(n,`portal`))}function Ia(e){return Fa(Ma(),e)}function La(e,t){let n=Un(x(),e),r;if(n.$tag===1){let e=n._0;r=Na(e)}else r=Ma();return Fa(r,t)}function Ra(e){return Fa(Pa(),e)}function za(e,t){return Fa({mount:new ae(e),use_shadow:!0,is_svg:!1},t)}function Ba(){let e=Fe(),t=Ie();return t===``?e:`${e}${t}`}function Va(e,t){Vr(e.current_path,t),Hr(e.current_match,Xi(t,e.routes))}function Ha(e){Va(e,Ba())}function Ua(e,t){let n={routes:e,base:t,current_path:Pr(``),current_match:Fr(void 0)};return ze(()=>{Ha(n)}),Ha(n),n}function Wa(e,t){return Ua(ta(e,t),t)}function Ga(e,t){Le(t),Va(e,t)}function Ka(e,t){Re(t),Va(e,t)}function qa(e){return mr(e.current_path)}function Ja(e){return hr(e.current_match)}function Ya(e){return Mr(e)}function Xa(e){return Y(e)}function Za(e,t){Br(e,t)}function Qa(e,t){Jr(e,t)}function $a(e){return Kr(e)}function eo(e,t){return ri(e,t)}function to(e,t){return Ai(e,t)}function no(e){return $r(e)}function ro(e,t,n){return ji(e,t,n)}function io(e){return Ur(e)}function ao(e){return q(e)}function oo(){ti()}function so(){ei()}function co(e){return yi(e)}function lo(e){return ni(e)}function uo(e){Ti(e)}function fo(e){return hi(e)}function po(){let e=w.current_owner;if(e!==void 0)return e}function mo(e,t){return si(e,t)}function ho(){return w.current_owner!==void 0}function go(e){let t=w.current_owner;Be(()=>{if(t===void 0){bi(e);return}else{ci(t,()=>{bi(()=>{let t=[];sr(t,e);let n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];Di(n),r=e+1|0;continue}else return}})});return}})}function _o(e,t){return Sa(e,t)}function vo(e){return Da(e)}function yo(e){return Oa(e)}function bo(e,t){da(e,t)}function xo(e,t){la(e,t)}function So(e,t){return ha(e,t)}function Co(e,t,n){return ka(e,t,n)}function wo(e,t,n){return Aa(e,t,n)}function $(e){return pa(e)}function To(e,t,n){return ca(e,t,n)}function Eo(e,t,n,r){return sa(e,t,n,r)}function Do(){return`http://www.w3.org/2000/svg`}function Oo(){return`http://www.w3.org/1998/Math/MathML`}function ko(){return Ca()}function Ao(e,t){return Ea(e,t)}function jo(e,t){return new Ve(e,t,``,[])}function Mo(e,t,n){return new Ve(e,t,n,[])}function No(e,t,n,r){return new Ve(e,t,n,r)}function Po(e,t){return Wa(e,t)}function Fo(e,t){let n;return n=t===void 0?``:t,Po(e,n)}function Io(e,t){Ga(e,t)}function Lo(e,t){Ka(e,t)}function Ro(e){return qa(e)}function zo(e){return Ja(e)}function Bo(e){return e.base}function Vo(e){return ii(e)}function Ho(e,t,n){return _i(e,t,n)}function Uo(e){return vi(e)}function Wo(e){return Bi(e)}function Go(){let e=Vi();return{_0:e._0,_1:e._1,_2:e._2}}function Ko(e){return Mi(e)}function qo(e){return Ni(e)}function Jo(e){zi(e)}function Yo(e){return Pi(e)}function Xo(e){return Fi(e)}function Zo(e){return Ii(e)}function Qo(e){let t=Li(e);return t.$tag===1?t._0:Ge()}function $o(e){let t=Ri(e);return t===void 0?``:t}function es(e){return qn(e)}function ts(e){return Jn(e)}function ns(e){return Yn(e)}function rs(e){let t=Xn(e);return t.$tag===1?t._0:Ge()}function is(e){let t=Zn(e);return t===void 0?``:t}function as(e){return new Pe(Q(e))}function os(e){return Ta(ja(e))}function ss(e){let t=Array(e.length),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];t[i]=as(n),r=i+1|0;continue}else break}return os(Ia(t))}function cs(e,t){let n=Array(t.length),r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];n[e]=as(r),i=e+1|0;continue}else break}return os(La(e,n))}function ls(e){let t=Array(e.length),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];t[i]=as(n),r=i+1|0;continue}else break}return os(Ra(t))}function us(e,t){let n=Array(t.length),r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];n[e]=as(r),i=e+1|0;continue}else break}return os(za(e,n))}function ds(e){let t=Ya(e);return[()=>Xa(t),e=>{typeof e==`function`?Qa(t,e):Za(t,e)}]}function fs(e){return io(e)}function ps(e){return ao(e)}function ms(e){return no(e)}function hs(e,t,n={}){let{defer:r=!1}=n,i=Array.isArray(e),a,o,s=!0;return n=>{let c=i?e.map(e=>e()):e();if(r&&s){s=!1,a=c;return}let l=t(c,a,n??o);return a=c,o=l,s=!1,l}}function gs(...e){let t={};for(let n of e)if(n)for(let e of Object.keys(n)){let r=n[e];if(e.startsWith(`on`)&&typeof r==`function`){let n=t[e];typeof n==`function`?t[e]=(...e)=>{n(...e),r(...e)}:t[e]=r}else if(e===`ref`&&typeof r==`function`){let n=t[e];typeof n==`function`?t[e]=e=>{n(e),r(e)}:t[e]=r}else if(e===`class`||e===`className`){let n=t[e];n?t[e]=`${n} ${r}`:t[e]=r}else e===`style`&&typeof r==`object`&&typeof t[e]==`object`?t[e]={...t[e],...r}:t[e]=r}return t}function _s(e,...t){let n=[],r={...e};for(let e of t){let t={};for(let n of e)n in r&&(t[n]=r[n],delete r[n]);n.push(t)}return n.push(r),n}function vs(e){let t=Wo(e),n=()=>rs(Ko(t));return Object.defineProperties(n,{loading:{get:()=>Yo(t)},error:{get:()=>$o(t)},state:{get:()=>Yo(t)?`pending`:Xo(t)?`ready`:Zo(t)?`errored`:`unresolved`},latest:{get:()=>qo(t)}}),[n,{refetch:()=>Jo(t)}]}function ys(){let e=Go(),t=e._0,n=e._1,r=e._2,i=()=>rs(Ko(t));return Object.defineProperties(i,{loading:{get:()=>Yo(t)},error:{get:()=>$o(t)}}),[i,n,r]}function bs(e,t){let[n]=e,r=Ya(n()),i=Ao(r,t);return[()=>Xa(i),e=>Za(r,e)]}function xs(e,...t){if(typeof e==`function`){let n=e(...t);return Array.isArray(n)?$(n):n}return Array.isArray(e)?$(e):e}function Ss(e){if(Array.isArray(e))return $(e);let{children:t}=e||{};return $(t?Array.isArray(t)?t:[t]:[])}function Cs(e){let{each:t,fallback:n,children:r}=e;return t?_o(typeof t==`function`?t:()=>t,(e,t)=>r(e,()=>t)):n??null}function ws(e){let{when:t,children:n}=e,r=typeof t==`function`?t:()=>t,i=()=>r();return So(()=>!!r(),()=>xs(n,i))}function Ts(e){let{each:t,fallback:n,children:r}=e;if(!t)return n??null;let i=typeof t==`function`?t:()=>t;return i().length===0&&n?n:_o(i,(e,t)=>r(()=>i()[t],t))}function Es(e){let{context:t,value:n,children:r}=e;return Ho(t,n,r)}function Ds(e){let{fallback:t,children:n}=e,r;r=n?Array.isArray(n)?n.flat():[n]:[];let i=r.filter(e=>e&&e.__isMatch);if(i.length===0)return t??null;let a=ms(()=>{for(let e=0;e<i.length;e++)if(i[e].when())return e;return-1}),o=[];for(let e=0;e<i.length;e++){let t=i[e],n=e;o.push(So(()=>a()===n,t.children))}return t&&o.push(So(()=>a()===-1,()=>xs(t))),$(o)}function Os(e){let{when:t,children:n}=e,r=typeof t==`function`?t:()=>t,i=()=>r();return{__isMatch:!0,when:()=>!!r(),condition:r,children:()=>xs(n,i)}}function ks(e){let{mount:t,useShadow:n=!1,children:r}=e,i=[r()];if(n){if(typeof t==`string`){let e=document.querySelector(t);if(e)return us(e,i)}else if(t)return us(t,i);return ls(i)}return typeof t==`string`?cs(t,i):ss(i)}function As(e){let t=new Map,n=structuredClone(e);function r(e){let r=e.join(`.`);if(!t.has(r)){let a=i(n,e);t.set(r,Ya(a))}return t.get(r)}function i(e,t){let n=e;for(let e of t){if(n==null)return;n=n[e]}return n}function a(e,t,n){if(t.length===0)return;let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(r[n]==null){let i=t[e+1];r[n]=typeof i==`number`||/^\d+$/.test(i)?[]:{}}r=r[n]}r[t[t.length-1]]=n}function o(e){let r=e.join(`.`);oo();try{for(let[e,a]of t.entries())(e===r||e.startsWith(r+`.`))&&Za(a,i(n,e.split(`.`)))}finally{so()}}function s(e,t=[]){return typeof e!=`object`||!e?e:new Proxy(e,{get(e,n){if(typeof n==`symbol`)return e[n];let i=[...t,n];Xa(r(i));let a=e[n];return typeof a==`object`&&a?s(a,i):a},set(e,n,r){let i=[...t,n];return e[n]=r,o(i),!0}})}function c(...e){if(e.length===0)return;let r=[],s=0;for(;s<e.length-1&&typeof e[s]==`string`;)r.push(e[s]),s++;let c=e[s];if(r.length===0&&typeof c==`object`&&c){Object.assign(n,c);for(let[e,r]of t.entries())Za(r,i(n,e.split(`.`)));return}let l=i(n,r),u;u=typeof c==`function`?c(l):Array.isArray(c)?c:typeof c==`object`&&c&&typeof l==`object`&&l&&!Array.isArray(l)?{...l,...c}:c,a(n,r,u),o(r)}return[s(n),c]}function js(e){return t=>{let n=structuredClone(t);return e(n),n}}function Ms(e){return()=>e}export{$o as $,Fo as A,to as B,so as C,rs as Ct,To as D,yo as Dt,Vo as E,vo as Et,Xa as F,$a as G,xo as H,po as I,cs as J,ss as K,ho as L,ko as M,_o as N,Eo as O,Qa as Ot,$ as P,bo as Q,Co as R,lo as S,ts as St,ro as T,Do as Tt,uo as U,Oo as V,go as W,Ho as X,ls as Y,ao as Z,gs as _,Za as _t,ks as a,Jo as at,Ms as b,ns as bt,Ds as c,No as ct,ms as d,zo as dt,Ko as et,ps as f,Ro as ft,bs as g,mo as gt,As as h,co as ht,Os as i,qo as it,io as j,fo as k,Uo as kt,ys as l,Mo as lt,ds as m,Lo as mt,Ss as n,Yo as nt,Es as o,Qo as ot,vs as p,Io as pt,us as q,Ts as r,Xo as rt,ws as s,jo as st,Cs as t,Zo as tt,fs as u,Bo as ut,hs as v,So as vt,oo as w,eo as wt,_s as x,es as xt,js as y,is as yt,wo as z};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luna_ui/luna",
3
- "version": "0.6.0",
3
+ "version": "0.7.3",
4
4
  "description": "Fine-grained reactive UI library for Moonbit/JS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1 +0,0 @@
1
- const e={$tag:0};function t(e){this._0=e}t.prototype.$tag=1;var n=class extends Error{};function r(){throw new n}function i(e,t){if(t<0||t>=e.length)throw Error(`Index out of bounds`)}function a(e){this._0=e}a.prototype.$tag=0;function o(e){this._0=e}o.prototype.$tag=1;const s={$tag:1},c={$tag:0},l=(e,t)=>e.toString(t);function u(e,t){let n=Array(e);return n.fill(t),n}const d=(e,t)=>{e.push(t)},f=e=>e.slice(0),p=(e,t)=>{e.length=t},m=e=>e.pop(),h=(e,t,n)=>e.splice(t,n),g=(e,t)=>e[t],_=(e,t,n)=>e[t](...n),v=e=>e==null,y=(e,t,n)=>{e[t]=n},ee=()=>null,te=()=>({}),ne=e=>Object.fromEntries(e.map(e=>[e._0,e._1])),re={$tag:0};function ie(e){this._0=e}ie.prototype.$tag=1;const ae={$tag:0};function oe(e){this._0=e}oe.prototype.$tag=1;const se={$tag:0};function ce(e){this._0=e}ce.prototype.$tag=1;const le=(e,t)=>setTimeout(e,t),ue=e=>clearTimeout(e),b=()=>document,de=(e,t)=>e.createElement(t),fe=(e,t,n)=>e.createElementNS(t,n),pe=(e,t)=>e.createTextNode(t),me=e=>queueMicrotask(e),he={$tag:0};function ge(e){this._0=e}ge.prototype.$tag=1;const _e={$tag:0};function ve(e){this._0=e}ve.prototype.$tag=1;function ye(e){this._0=e}ye.prototype.$tag=2;const x={$tag:0};function be(e){this._0=e}be.prototype.$tag=1;const xe=()=>window.location.pathname,Se=()=>window.location.search,Ce=e=>window.history.pushState(null,``,e),we=e=>window.history.replaceState(null,``,e),Te=e=>window.addEventListener(`popstate`,()=>e());function Ee(e){this._0=e}Ee.prototype.$tag=0;function De(e){this._0=e}De.prototype.$tag=1;function S(e){this._0=e}S.prototype.$tag=2;function Oe(e){this._0=e}Oe.prototype.$tag=3;const ke=(e,t)=>document.createElementNS(e,t),Ae=(e,t,n)=>e.addEventListener(t,n),je=(e,t)=>e===t,Me=(e,t,n)=>{if(typeof e.moveBefore==`function`)try{return e.moveBefore(t,n),t}catch{return e.insertBefore(t,n)}else return e.insertBefore(t,n)},Ne=(e,t)=>{if(typeof e.moveBefore==`function`)try{return e.moveBefore(t,null),t}catch{return e.insertBefore(t,null)}else return e.insertBefore(t,null)},Pe=(e,t)=>e.nextSibling===t,Fe=(e,t)=>{try{t.parentNode===e?e.removeChild(t):t.parentNode&&t.parentNode.removeChild(t)}catch{}},Ie={$tag:0};function Le(e){this._0=e}Le.prototype.$tag=1;function Re(e){this._0=e}Re.prototype.$tag=0;function ze(e){this._0=e}ze.prototype.$tag=1;function Be(e){this._0=e}Be.prototype.$tag=2;const Ve=e=>queueMicrotask(e);function He(e,t,n,r){this._0=e,this._1=t,this._2=n,this._3=r}He.prototype.$tag=0;function Ue(e,t,n){this._0=e,this._1=t,this._2=n}Ue.prototype.$tag=1;function We(e,t){this._0=e,this._1=t}We.prototype.$tag=2;function Ge(e,t){this._0=e,this._1=t}Ge.prototype.$tag=3;const Ke=()=>void 0,qe={method_0:wt,method_1:Tt,method_2:kt,method_3:pt},C={current_subscriber:void 0,current_owner:void 0,current_cleanups:e,batch_depth:0,pending_effects:[],pending_ids:[]},Je=[],Ye=[],w=In(void 0),T=B(0),E=B(0),Xe=B(0),Ze=sn(1024,void 0),D=B(0),Qe=B(0),O=Fn(e),$e=B(0);function et(e){return r()}function tt(e){return r()}function nt(e){return r()}function rt(e){return r()}function it(e){return r()}function at(e){return r()}function ot(e,t){return et(`${e}\n at ${N(t)}\n`)}function st(e,t){return tt(`${e}\n at ${N(t)}\n`)}function ct(e,t){return nt(`${e}\n at ${N(t)}\n`)}function lt(e,t){return rt(`${e}\n at ${N(t)}\n`)}function ut(e,t){return it(`${e}\n at ${N(t)}\n`)}function dt(e,t){return at(`${e}\n at ${N(t)}\n`)}function ft(e){return{val:``}}function pt(e,t){let n=e;n.val=`${n.val}${String.fromCodePoint(t)}`}function mt(e,t){return(((Math.imul(e-55296|0,1024)|0)+t|0)-56320|0)+65536|0}function k(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function ht(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function gt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function _t(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function vt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function yt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function bt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function xt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function A(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function St(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function Ct(e){let t={str:e,start:0,end:e.length},n=t.str,i=t.start,a=i+(t.end-t.start|0)|0,o=i,s=-1,c=-1,l=-1,u=-1,d=-1,f=-1,p=-1,m=-1,h=-1,g=-1,_=-1,v=-1,y=-1,ee=-1,te=-1;_L:{let e;_L$2:if(o<a){let t=o,r=n.charCodeAt(t);if(o=o+1|0,r<65){if(r<64)break _L;for(;;)if(m=o,o<a){_L$3:{let t=o,r=n.charCodeAt(t);if(o=o+1|0,r<55296){if(r<58||r>58)break _L$3;if(o<a){_L$4:{let t=o,r=n.charCodeAt(t);if(o=o+1|0,r<56319){if(r<55296)break _L$4;e=7;break _L$2}else if(r>56319){if(r<65536)break _L$4;break _L}else{e=8;break _L$2}}e=0;break _L$2}else break _L}else if(r>56318)if(r<57344)if(o<a){let e=o,t=n.charCodeAt(e);if(o=o+1|0,t<56320||t>57343)break _L;continue}else break _L;else if(r>65535)break _L;else break _L$3;else if(o<a){let e=o,t=n.charCodeAt(e);if(o=o+1|0,t<56320||t>65535)break _L;continue}else break _L}continue}else break _L}else break _L}else break _L;let t=e;_L$3:for(;;){let e=t;_L$4:{_L$5:switch(e){case 3:if(_=g,g=h,h=o,o<a){_L$6:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296)if(r<58){if(r<48)break _L$6;if(h=o,ee=y,y=o,v=o,o<a){_L$7:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<59)if(r<46){if(r<45)break _L$7;break _L$4}else if(r>47)if(r<58){t=6;continue _L$3}else{t=3;continue _L$3}else break _L$7;else if(r>55295)if(r<57344)if(r<56319){t=7;continue _L$3}else{t=8;continue _L$3}else if(r>65535)break _L;else break _L$7;else break _L$7}t=0;continue _L$3}else break _L}else if(r>58)break _L$6;else{t=1;continue _L$3}else if(r>56318)if(r<57344){t=8;continue _L$3}else if(r>65535)break _L;else break _L$6;else{t=7;continue _L$3}}t=0;continue _L$3}else break _L;case 2:if(h=o,y=o,o<a){_L$6:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296)if(r<58){if(r<48)break _L$6;t=2;continue _L$3}else if(r>58)break _L$6;else{t=3;continue _L$3}else if(r>56318)if(r<57344){t=8;continue _L$3}else if(r>65535)break _L;else break _L$6;else{t=7;continue _L$3}}t=0;continue _L$3}else break _L;case 0:if(h=o,o<a){_L$6:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296){if(r<58||r>58)break _L$6;t=1;continue _L$3}else if(r>56318)if(r<57344){t=8;continue _L$3}else if(r>65535)break _L;else break _L$6;else{t=7;continue _L$3}}t=0;continue _L$3}else break _L;case 8:if(o<a){let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<56320||r>57343)break _L;t=0;continue _L$3}else break _L;case 4:if(h=o,te=o,o<a){_L$6:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296)if(r<58){if(r<48)break _L$6;t=4;continue _L$3}else if(r>58)break _L$6;else if(_=g,g=h,h=o,o<a){_L$7:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296)if(r<58){if(r<48)break _L$7;if(h=o,ee=y,y=o,o<a){_L$8:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296)if(r<58){if(r<48)break _L$8;t=5;continue _L$3}else if(r>58)break _L$8;else{t=3;continue _L$3}else if(r>56318)if(r<57344){t=8;continue _L$3}else if(r>65535)break _L;else break _L$8;else{t=7;continue _L$3}}t=0;continue _L$3}else break _L$5}else if(r>58)break _L$7;else{t=1;continue _L$3}else if(r>56318)if(r<57344){t=8;continue _L$3}else if(r>65535)break _L;else break _L$7;else{t=7;continue _L$3}}t=0;continue _L$3}else break _L;else if(r>56318)if(r<57344){t=8;continue _L$3}else if(r>65535)break _L;else break _L$6;else{t=7;continue _L$3}}t=0;continue _L$3}else break _L;case 5:if(h=o,y=o,o<a){_L$6:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296)if(r<58){if(r<48)break _L$6;t=5;continue _L$3}else if(r>58)break _L$6;else{t=3;continue _L$3}else if(r>56318)if(r<57344){t=8;continue _L$3}else if(r>65535)break _L;else break _L$6;else{t=7;continue _L$3}}t=0;continue _L$3}else break _L$5;case 6:if(h=o,y=o,v=o,o<a){_L$6:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<59)if(r<46){if(r<45)break _L$6;break _L$4}else if(r>47)if(r<58){t=6;continue _L$3}else{t=3;continue _L$3}else break _L$6;else if(r>55295)if(r<57344)if(r<56319){t=7;continue _L$3}else{t=8;continue _L$3}else if(r>65535)break _L;else break _L$6;else break _L$6}t=0;continue _L$3}else break _L;case 7:if(o<a){let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<56320||r>65535)break _L;t=0;continue _L$3}else break _L;case 1:if(g=h,h=o,o<a){_L$6:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296)if(r<58){if(r<48)break _L$6;t=2;continue _L$3}else if(r>58)break _L$6;else{t=1;continue _L$3}else if(r>56318)if(r<57344){t=8;continue _L$3}else if(r>65535)break _L;else break _L$6;else{t=7;continue _L$3}}t=0;continue _L$3}else break _L;default:break _L}h=_,y=ee,l=m,u=h,d=y,f=v,p=te,s=0,c=o;break _L}if(g=_,h=o,y=ee,o<a){_L$5:{let e=o,r=n.charCodeAt(e);if(o=o+1|0,r<55296)if(r<58){if(r<48)break _L$5;t=4;continue}else if(r>58)break _L$5;else{t=1;continue}else if(r>56318)if(r<57344){t=8;continue}else if(r>65535)break _L;else break _L$5;else{t=7;continue}}t=0;continue}else break _L}}if(s===0){let e;_L$2:{_L$3:{let t=M(n,u+1|0,d);if(t.$tag===1)e=t._0;else{t._0;break _L$3}break _L$2}e=r()}let t;_L$3:{_L$4:{let e=M(n,d+1|0,f);if(e.$tag===1)t=e._0;else{e._0;break _L$4}break _L$3}t=r()}let a;_L$4:{_L$5:{let e=M(n,i+1|0,l);if(e.$tag===1)a=e._0;else{e._0;break _L$5}break _L$4}a=r()}let o;_L$5:{_L$6:{let e=M(n,l+1|0,u);if(e.$tag===1)o=e._0;else{e._0;break _L$6}break _L$5}o=r()}let s;_L$6:{_L$7:{let e=M(n,f+1|0,p);if(e.$tag===1)s=e._0;else{e._0;break _L$7}break _L$6}s=r()}let m;_L$7:{_L$8:{let e=M(n,p+1|0,c);if(e.$tag===1)m=e._0;else{e._0;break _L$8}break _L$7}m=r()}return{pkg:a,filename:o,start_line:e,start_column:t,end_line:s,end_column:m}}else return r()}function wt(e,t){let n=e;n.val=`${n.val}${t}`}function j(e,t,n){let r=e.length,i;if(n===void 0)i=r;else{let e=n;i=e<0?r+e|0:e}let l=t<0?r+t|0:t;if(l>=0&&l<=i&&i<=r){let t;if(l<r){let n=e.charCodeAt(l);t=56320<=n&&n<=57343}else t=!1;if(t)return new a(c);let n;if(i<r){let t=e.charCodeAt(i);n=56320<=t&&t<=57343}else n=!1;return n?new a(c):new o({str:e,start:l,end:i})}else return new a(s)}function M(e,t,n){let r;return r=t===void 0?0:t,j(e,r,n)}function Tt(e,t,n,i){let a;_L:{_L$2:{let e=j(t,n,n+i|0);if(e.$tag===1)a=e._0;else{e._0;break _L$2}break _L}a=r()}kt(e,a)}function N(e){let t=ft(0);return fn(e,{self:t,method_table:qe}),t.val}function P(e){let t=ft(0);return nn(e,{self:t,method_table:qe}),t.val}function Et(e,t){return l(e,t)}function Dt(e){return e.str.substring(e.start,e.end)}function Ot(e){let t=ft(Math.imul(e.end-e.start|0,4)|0),n=e.end-e.start|0,r=0;for(;;){let i=r;if(i<n){let n=e.buf[e.start+i|0];pt(t,n),r=i+1|0;continue}else break}return t.val}function kt(e,t){let n=e;n.val=`${n.val}${Dt(t)}`}function At(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let a=u(256,r),o=r-1|0,s=0;for(;;){let e=s;if(e<o){let n=t.str,o=t.start+e|0,c=n.charCodeAt(o)&255;i(a,c),a[c]=(r-1|0)-e|0,s=e+1|0;continue}else break}let c=0;for(;;){let o=c;if(o<=(n-r|0)){let n=r-1|0,s=0;for(;;){let r=s;if(r<=n){let n=o+r|0,i=e.str,a=e.start+n|0,c=i.charCodeAt(a),l=t.str,u=t.start+r|0;if(c!==l.charCodeAt(u))break;s=r+1|0;continue}else return o}let l=(o+r|0)-1|0,u=e.str,d=e.start+l|0,f=u.charCodeAt(d)&255;i(a,f),c=o+a[f]|0;continue}else break}return}else return;else return 0}function jt(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let i=t.str,a=t.start+0|0,o=i.charCodeAt(a),s=n-r|0,c=0;for(;c<=s;){for(;;){let t;if(c<=s){let n=c,r=e.str,i=e.start+n|0;t=r.charCodeAt(i)!==o}else t=!1;if(t){c=c+1|0;continue}else break}if(c<=s){let n=1;for(;;){let i=n;if(i<r){let r=c+i|0,a=e.str,o=e.start+r|0,s=a.charCodeAt(o),l=t.str,u=t.start+i|0;if(s!==l.charCodeAt(u))break;n=i+1|0;continue}else return c}c=c+1|0}}return}else return;else return 0}function Mt(e,t){return(t.end-t.start|0)<=4?jt(e,t):At(e,t)}function Nt(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let a=u(256,r),o=r-1|0;for(;;){let e=o;if(e>0){let n=t.str,r=t.start+e|0,s=n.charCodeAt(r)&255;i(a,s),a[s]=e,o=e-1|0;continue}else break}let s=n-r|0;for(;;){let n=s;if(n>=0){let o=0;for(;;){let i=o;if(i<r){let r=n+i|0,a=e.str,s=e.start+r|0,c=a.charCodeAt(s),l=t.str,u=t.start+i|0;if(c!==l.charCodeAt(u))break;o=i+1|0;continue}else return n}let c=e.str,l=e.start+n|0,u=c.charCodeAt(l)&255;i(a,u),s=n-a[u]|0;continue}else break}return}else return;else return n}function Pt(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let i=t.str,a=t.start+0|0,o=i.charCodeAt(a),s=n-r|0;for(;s>=0;){for(;;){let t;if(s>=0){let n=s,r=e.str,i=e.start+n|0;t=r.charCodeAt(i)!==o}else t=!1;if(t){s=s-1|0;continue}else break}if(s>=0){let n=1;for(;;){let i=n;if(i<r){let r=s+i|0,a=e.str,o=e.start+r|0,c=a.charCodeAt(o),l=t.str,u=t.start+i|0;if(c!==l.charCodeAt(u))break;n=i+1|0;continue}else return s}s=s-1|0}}return}else return;else return n}function Ft(e,t){return(t.end-t.start|0)<=4?Pt(e,t):Nt(e,t)}function It(e,t){let n=Ft(e,t);return n===void 0?!1:n===((e.end-e.start|0)-(t.end-t.start|0)|0)}function Lt(e,t){return It({str:e,start:0,end:e.length},t)}function Rt(e,t){let n=Mt(e,t);return n===void 0?!1:n===0}function F(e,t){return Rt({str:e,start:0,end:e.length},t)}function zt(e){return[]}function I(e,t){d(e,t)}function L(e,t){d(e,t)}function Bt(e,t){d(e,t)}function Vt(e,t){d(e,t)}function Ht(e,t){d(e,t)}function Ut(e,t){d(e,t)}function Wt(e,t){d(e,t)}function Gt(e,t){d(e,t)}function Kt(e,t){d(e,t)}function qt(e,t){d(e,t)}function Jt(e,t){d(e,t)}function R(e,t){d(e,t)}function Yt(e,t){d(e,t)}function Xt(e,t){d(e,t)}function Zt(e){return e()}function Qt(e){return e()}function $t(e){let t=e.length,n={val:0};return()=>{if(n.val<t){let r=n.val,i=e.charCodeAt(r);if(55296<=i&&i<=56319&&(n.val+1|0)<t){let t=n.val+1|0,r=e.charCodeAt(t);if(56320<=r&&r<=57343){let e=mt(i,r);return n.val=n.val+2|0,e}}return n.val=n.val+1|0,i}else return-1}}function en(e){return String.fromCodePoint(e)}function tn(e){let t=$t(e),n=zt(e.length);for(;;){let e=Qt(t);if(e===-1)break;{let t=e,r=n;Xt(r,t),n=r;continue}}return n}function nn(e,t){t.method_table.method_0(t.self,Et(e,10))}function rn(e){let t={val:0};return()=>{if(t.val<(e.end-e.start|0)){let n=e.buf[e.start+t.val|0];return t.val=t.val+1|0,n}else return}}function an(e){return rn({buf:e,start:0,end:e.length})}function on(e,t){let n=Array(e),r=0;for(;;){let i=r;if(i<e){n[i]=t,r=i+1|0;continue}else break}return n}function sn(e,t){let n=Array(e),r=0;for(;;){let i=r;if(i<e){n[i]=t,r=i+1|0;continue}else break}return n}function cn(e,t,n){let a=e.length;if(t>=0&&t<a){i(e,t),e[t]=n;return}else{r();return}}function ln(e,t,n){let a=e.length;if(t>=0&&t<a){i(e,t),e[t]=n;return}else{r();return}}function un(e,t,n){let a=e.length;if(t>=0&&t<a){i(e,t),e[t]=n;return}else{r();return}}function dn(e,t){let n=e.pkg,i=n.str,a=n.start,o=a+(n.end-n.start|0)|0,s=a,c=-1,l=-1,u=-1,d=-1,f;_L:{_L$2:{_L$3:for(;;)if(s<o)_L$4:{_L$5:{let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<55296){if(t<47||t>47)break _L$5;_L$6:for(;;)if(d=s,s<o){_L$7:{let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<55296){if(t<47||t>47)break _L$7;for(;;)if(s<o){_L$8:{let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<56319){if(t<55296)break _L$8;if(s<o){let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<56320||t>65535)break _L$2;continue}else break _L$2}else if(t>56319){if(t<65536)break _L$8;break _L$2}else if(s<o){let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<56320||t>57343)break _L$2;continue}else break _L$2}continue}else{u=d,c=0,l=s;break _L$2}}else if(t>56318)if(t<57344)if(s<o){let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<56320||t>57343)break _L$2;continue}else break _L$2;else if(t>65535)break _L$2;else break _L$7;else if(s<o){let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<56320||t>65535)break _L$2;continue}else break _L$2}continue}else break _L$2}else if(t>56318)if(t<57344)if(s<o){let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<56320||t>57343)break _L$2;continue}else break _L$2;else if(t>65535)break _L$2;else break _L$5;else if(s<o){let e=s,t=i.charCodeAt(e);if(s=s+1|0,t<56320||t>65535)break _L$2;continue}else break _L$2;break _L$4}continue}else break _L$2;break _L}if(c===0){let e;_L$3:{_L$4:{let t=M(i,u+1|0,l);if(t.$tag===1)e=t._0;else{t._0;break _L$4}break _L$3}e=r()}let t;_L$4:{_L$5:{let e=M(i,a,u);if(e.$tag===1)t=e._0;else{e._0;break _L$5}break _L$4}t=r()}f={_0:t,_1:e}}else f={_0:n,_1:void 0}}let p=f._0,m=f._1;if(m!==void 0){let e=m;t.method_table.method_2(t.self,e),t.method_table.method_3(t.self,47)}t.method_table.method_2(t.self,e.filename),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.start_line),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.start_column),t.method_table.method_3(t.self,45),t.method_table.method_2(t.self,e.end_line),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.end_column),t.method_table.method_3(t.self,64),t.method_table.method_2(t.self,p)}function fn(e,t){dn(Ct(e),t)}function pn(e,t,n){let r=e.length,i;if(n===void 0)i=r;else{let e=n;i=e<0?r+e|0:e}let a=t<0?r+t|0:t;return a>=0&&a<=i&&i<=r?{buf:e,start:a,end:i}:dt(`View index out of bounds`,`@moonbitlang/core/builtin:arrayview.mbt:251:5-251:38`)}function mn(e,t){p(e,t)}function hn(e,t){p(e,t)}function gn(e,t){p(e,t)}function _n(e,t){p(e,t)}function vn(e,t){p(e,t)}function yn(e){return m(e)}function bn(e){return m(e)}function xn(e){if(e.length!==0)return yn(e)}function Sn(e){return e.length===0?-1:bn(e)}function Cn(e,t){if(t>=0&&t<e.length){i(e,t);let n=e[t];return h(e,t,1),n}else return st(`index out of bounds: the len is from 0 to ${P(e.length)} but the index is ${P(t)}`,`@moonbitlang/core/builtin:arraycore_js.mbt:251:5-253:6`)}function wn(e,t){if(t>=0&&t<e.length){i(e,t);let n=e[t];return h(e,t,1),n}else return ct(`index out of bounds: the len is from 0 to ${P(e.length)} but the index is ${P(t)}`,`@moonbitlang/core/builtin:arraycore_js.mbt:251:5-253:6`)}function Tn(e,t){if(t>=0&&t<e.length){i(e,t);let n=e[t];return h(e,t,1),n}else return lt(`index out of bounds: the len is from 0 to ${P(e.length)} but the index is ${P(t)}`,`@moonbitlang/core/builtin:arraycore_js.mbt:251:5-253:6`)}function En(e,t){if(t>=0&&t<e.length){i(e,t);let n=e[t];return h(e,t,1),n}else return ut(`index out of bounds: the len is from 0 to ${P(e.length)} but the index is ${P(t)}`,`@moonbitlang/core/builtin:arraycore_js.mbt:251:5-253:6`)}function Dn(e){return f(e)}function z(e){mn(e,0)}function On(e){gn(e,0)}function kn(e){vn(e,0)}function An(e){return{val:e}}function jn(e){return{val:e}}function Mn(e){return{val:e}}function Nn(e){return{val:e}}function Pn(e){return{val:e}}function B(e){return{val:e}}function V(e){return{val:e}}function Fn(e){return{val:e}}function In(e){return{val:e}}function Ln(e){return{val:e}}function Rn(e){return v(e)?re:new ie(e)}function zn(e){return v(e)?ae:new oe(e)}function Bn(e){return v(e)?se:new ce(e)}function Vn(e,t,n){return{mode:e,delegatesFocus:t,slotAssignment:n}}function Hn(e,t){return _(e,`attachShadow`,[ne([{_0:`mode`,_1:t.mode},{_0:`delegatesFocus`,_1:t.delegatesFocus},{_0:`slotAssignment`,_1:t.slotAssignment}])])}function Un(e){return g(e,`nodeType`)}function Wn(e){return Rn(g(e,`parentNode`))}function Gn(e){return Rn(g(e,`firstChild`))}function H(e,t){return _(e,`appendChild`,[t])}function Kn(e,t){return _(e,`removeChild`,[t])}function qn(e,t,n){if(n.$tag===1){let r=n._0;return _(e,`insertBefore`,[t,r])}else return _(e,`insertBefore`,[t,ee()])}function Jn(e,t){y(e,`textContent`,t)}function Yn(e,t){y(e,`className`,t)}function Xn(e,t,n){_(e,`setAttribute`,[t,n])}function Zn(e,t){_(e,`removeAttribute`,[t])}function Qn(e,t){return zn(_(e,`querySelector`,[t]))}function $n(e){return Bn(g(e,`body`))}function er(e){return _(e,`createDocumentFragment`,[])}function tr(e,t){return _(e,`createComment`,[t])}function U(e,t){e.value=t}function W(e){switch(e){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 4;case 4:return 8;case 5:return 16;default:return 32}}function G(e){let t=e.deps_tail,n;n=t===void 0?e.deps:t.next_dep;let r=V(n);for(;;)if(r.val!==void 0){let t=r.val;t===void 0||(r.val=nr(t,e));continue}else return}function nr(e,t){let n=e.dep,r=e.prev_dep,i=e.next_dep,a=e.next_sub,o=e.prev_sub;if(i===void 0)t.deps_tail=r;else{let e=i;e.prev_dep=r}if(r===void 0)t.deps=i;else{let e=r;e.next_dep=i}if(a===void 0)n.subs_tail=o;else{let e=a;e.prev_sub=o}if(o===void 0)n.subs=a,a===void 0&&rr(n);else{let e=o;e.next_sub=a}return i}function rr(e){if((e.flags.value&W(1))===0){ir(e);return}else if(e.deps_tail===void 0)return;else{e.deps_tail=void 0,U(e.flags,W(1)|W(5)),G(e);return}}function ir(e){e.deps_tail=void 0,U(e.flags,W(0)),G(e);let t=e.subs;if(t!==void 0){let e=t;nr(e,e.sub);return}}function ar(e){e.deps_tail=void 0,U(e.flags,W(0)),e.effect_callback=void 0,G(e);let t=e.subs;if(t!==void 0){let e=t;nr(e,e.sub);return}}function or(e){let t=e.length-1|0;for(;;){let n=t;if(n>=0){k(e,n)(),t=n-1|0;continue}else break}z(e)}function K(){T.val=T.val+1|0}function q(e,t,n){let r=t.deps_tail;if(r!==void 0&&r.dep===e)return;let i;if(i=r===void 0?t.deps:r.next_dep,i!==void 0){let r=i;if(r.dep===e){r.version=n,t.deps_tail=r;return}}let a=e.subs_tail;if(a!==void 0){let e=a;if(e.version===n&&e.sub===t)return}let o={version:n,dep:e,sub:t,prev_sub:e.subs_tail,next_sub:void 0,prev_dep:r,next_dep:i};if(t.deps_tail=o,i!==void 0){let e=i;e.prev_dep=o}if(r===void 0)t.deps=o;else{let e=r;e.next_dep=o}let s=o.prev_sub;if(s===void 0)e.subs=o;else{let e=s;e.next_sub=o}e.subs_tail=o}function J(e){let t=w.val;return w.val=e,t}function sr(e){return{value:e}}function Y(e){return{deps:void 0,deps_tail:void 0,subs:void 0,subs_tail:void 0,flags:sr(e),last_modified_cycle:0,effect_callback:void 0}}function cr(e){let n=[],r=Y(W(2)|W(3));r.effect_callback=()=>{let i=r.flags.value,a=W(5),o=W(6);if((i&a)!==0||(i&o)!==0){K(),r.deps_tail=void 0,U(r.flags,W(2)|W(3)),or(n);let i=J(r),a=O.val;O.val=new t(n),e(),O.val=a,J(i);let o=r.flags.value;U(r.flags,o&(W(3)^-1)),G(r);return}else{U(r.flags,W(2));return}};let i=J(r);i===void 0||q(r,i,0);let a=O.val;O.val=new t(n),e(),O.val=a,J(i);let o=r.flags.value;return U(r.flags,o&(W(3)^-1)),()=>{or(n),ar(r)}}function lr(e){let t=C.current_owner;t!==void 0&&I(t.disposers,e)}function ur(e){let t=C.current_cleanups;return C.current_cleanups=e,t}function dr(e,n){let r=ur(new t(e));n(),C.current_cleanups=r}function fr(e){let t=[],n=cr(()=>{let n=t.length-1|0;for(;;){let e=n;if(e>=0){k(t,e)(),n=e-1|0;continue}else break}z(t),dr(t,e)}),r=()=>{let e=t.length-1|0;for(;;){let n=e;if(n>=0){k(t,n)(),e=n-1|0;continue}else break}z(t),n()};return lr(r),r}function pr(e,t){e.value&=W(t)^-1}function mr(e){let t=e.effect_callback;if(t!==void 0){let n=t,r=!1,i=Ye.length,a=0;for(;;){let t=a;if(t<i){if(Ye[t]===e){r=!0;break}a=t+1|0;continue}else break}if(r)return;I(Je,n),qt(Ye,e),pr(e.flags,2);return}}function X(e){let t=V(e);for(;;)if(t.val!==void 0){let e=t.val;if(e!==void 0){let n=e,r=n.sub,i=r.flags.value,a=W(6),o=W(5),s=W(2),c=W(3);(i&(a|o))===a&&(U(r.flags,i|o),(i&(s|c))===s&&mr(r)),t.val=n.next_sub}continue}else return}function hr(e){if((e.node.flags.value&W(5))!==0){if(e.current_value!==e.pending_value){e.current_value=e.pending_value;let t=e.node.subs;t===void 0||X(t)}U(e.node.flags,W(1))}let t=w.val;for(;t!==void 0;){let n=t;if(n!==void 0){let r=n;if((r.flags.value&(W(1)|W(2)))!==0){q(e.node,r,T.val);break}let i=r.subs,a;a=i===void 0?void 0:i.sub,t=a}}return e.current_value}function gr(e){if((e.node.flags.value&W(5))!==0){if(e.current_value!==e.pending_value){e.current_value=e.pending_value;let t=e.node.subs;t===void 0||X(t)}U(e.node.flags,W(1))}let t=w.val;for(;t!==void 0;){let n=t;if(n!==void 0){let r=n;if((r.flags.value&(W(1)|W(2)))!==0){q(e.node,r,T.val);break}let i=r.subs,a;a=i===void 0?void 0:i.sub,t=a}}return e.current_value}function _r(e){if((e.node.flags.value&W(5))!==0){if(e.current_value!==e.pending_value){e.current_value=e.pending_value;let t=e.node.subs;t===void 0||X(t)}U(e.node.flags,W(1))}let t=w.val;for(;t!==void 0;){let n=t;if(n!==void 0){let r=n;if((r.flags.value&(W(1)|W(2)))!==0){q(e.node,r,T.val);break}let i=r.subs,a;a=i===void 0?void 0:i.sub,t=a}}return e.current_value}function vr(e){if((e.node.flags.value&W(5))!==0){if(e.current_value!==e.pending_value){e.current_value=e.pending_value;let t=e.node.subs;t===void 0||X(t)}U(e.node.flags,W(1))}let t=w.val;for(;t!==void 0;){let n=t;if(n!==void 0){let r=n;if((r.flags.value&(W(1)|W(2)))!==0){q(e.node,r,T.val);break}let i=r.subs,a;a=i===void 0?void 0:i.sub,t=a}}return e.current_value}function yr(e){let t=C.current_subscriber;if(t!==void 0){let n=t,r=an(e.legacy_subscribers),i;for(;;){let e=Zt(r);if(e===void 0){i=!1;break}else{if(e.id===n.id){i=!0;break}continue}}i||L(e.legacy_subscribers,n)}return hr(e.inner)}function br(e){let t=C.current_subscriber;if(t!==void 0){let n=t,r=an(e.legacy_subscribers),i;for(;;){let e=Zt(r);if(e===void 0){i=!1;break}else{if(e.id===n.id){i=!0;break}continue}}i||L(e.legacy_subscribers,n)}return gr(e.inner)}function xr(e){let t=C.current_subscriber;if(t!==void 0){let n=t,r=an(e.legacy_subscribers),i;for(;;){let e=Zt(r);if(e===void 0){i=!1;break}else{if(e.id===n.id){i=!0;break}continue}}i||L(e.legacy_subscribers,n)}return _r(e.inner)}function Sr(e){let t=C.current_subscriber;if(t!==void 0){let n=t,r=an(e.legacy_subscribers),i;for(;;){let e=Zt(r);if(e===void 0){i=!1;break}else{if(e.id===n.id){i=!0;break}continue}}i||L(e.legacy_subscribers,n)}return vr(e.inner)}function Cr(e){return{node:Y(W(1)),current_value:e,pending_value:e}}function wr(e){return{node:Y(W(1)),current_value:e,pending_value:e}}function Tr(e){return{node:Y(W(1)),current_value:e,pending_value:e}}function Er(e){return{node:Y(W(1)),current_value:e,pending_value:e}}function Dr(e){return{inner:Cr(e),legacy_subscribers:[]}}function Or(e){return{inner:wr(e),legacy_subscribers:[]}}function kr(e){return{inner:Tr(e),legacy_subscribers:[]}}function Ar(e){return{inner:Er(e),legacy_subscribers:[]}}function jr(e){return Dr(e)}function Mr(e){return Or(e)}function Nr(e){return kr(e)}function Pr(e){return Ar(e)}function Fr(e,t,n){let r=V(e),i=W(5),a=W(1);for(;r.val!==void 0;){let e=r.val;if(e!==void 0){let o=e,s=o.dep,c=s.flags.value;if((t.flags.value&i)!==0)return!0;if((c&(a|i))===(a|i)&&n(s)){let e=s.subs;if(e!==void 0){let t=e;t.next_sub===void 0||X(t)}return!0}r.val=o.next_dep}}return!1}function Ir(e){let t=e.node.flags.value,n=W(5),r=W(6),i=e.node.deps,a;if(a=i===void 0?!1:Fr(i,e.node,e=>!1),(t&n)!==0||(t&r)!==0&&a){K(),e.node.deps_tail=void 0,U(e.node.flags,W(2)|W(3));let t=J(e.node),n=e.run_fn;n(),J(t);let r=e.node.flags.value;U(e.node.flags,r&(W(3)^-1)),G(e.node);return}else{U(e.node.flags,W(2));return}}function Lr(){for(;D.val<Xe.val;){let e=vt(Ze,D.val);if(e===void 0)D.val=D.val+1|0;else{let t=e;cn(Ze,D.val,void 0),D.val=D.val+1|0,Ir(t)}}for(D.val=0,Xe.val=0;;)if(Je.length>0){let e=Tn(Je,0);En(Ye,0),e();continue}else return}function Rr(e,t){let n=V(t.deps_tail);for(;n.val!==void 0;){let t=n.val;if(t!==void 0){let r=t;if(r===e)return!0;n.val=r.prev_dep}}return!1}function zr(e){let t=V(e),n=V(e.next_sub),r=[],i=!0;for(;;)if(i){let e=t.val;if(e===void 0)if(r.length>0){let e=xn(r);if(e===void 0)i=!1;else{let r=e._0;t.val=r;let i;i=r===void 0?void 0:r.next_sub,n.val=i}}else i=!1;else{let i=e,a=i.sub,o=a.flags.value,s=W(1),c=W(2),l=W(3),u=W(4),d=W(5),f=W(6),p=o,m=!1,h=!1;if((o&(l|u|d|f))===0?(p=o|f,U(a.flags,p)):(o&(l|u))===0?p=W(0):(o&l)===0?(p=o&(u^-1)|f,U(a.flags,p)):(o&(d|f))===0&&Rr(i,a)?(p=o|u|f,U(a.flags,p),p&=s):p=W(0),(p&c)!==0&&(m=!0),(p&s)!==0&&(h=!0),m&&mr(a),h){let e=a.subs;if(e===void 0){t.val=n.val;let e=t.val;e===void 0?n.val=void 0:n.val=e.next_sub}else{let i=e;i.next_sub===void 0||(Gt(r,{_0:n.val,_1:void 0}),n.val=i.next_sub),t.val=i}}else{t.val=n.val;let e=t.val;e===void 0?n.val=void 0:n.val=e.next_sub}}continue}else return}function Br(e,t){if(e.pending_value!==t){e.pending_value=t,K(),e.node.last_modified_cycle=T.val,U(e.node.flags,W(1)|W(5));let n=e.node.subs;if(n===void 0)return;if(zr(n),E.val===0){Lr();return}else return}else return}function Vr(e,t){if(e.pending_value!==t){e.pending_value=t,K(),e.node.last_modified_cycle=T.val,U(e.node.flags,W(1)|W(5));let n=e.node.subs;if(n===void 0)return;if(zr(n),E.val===0){Lr();return}else return}else return}function Hr(e,t){if(e.pending_value!==t){e.pending_value=t,K(),e.node.last_modified_cycle=T.val,U(e.node.flags,W(1)|W(5));let n=e.node.subs;if(n===void 0)return;if(zr(n),E.val===0){Lr();return}else return}else return}function Ur(e,t){if(e.pending_value!==t){e.pending_value=t,K(),e.node.last_modified_cycle=T.val,U(e.node.flags,W(1)|W(5));let n=e.node.subs;if(n===void 0)return;if(zr(n),E.val===0){Lr();return}else return}else return}function Wr(e){let t=C.pending_ids,n=t.length,r=0;for(;;){let i=r;if(i<n){if(t[i]===e)return!0;r=i+1|0;continue}else break}return!1}function Gr(e){if(C.batch_depth>0){if(Wr(e.id))return;Kt(C.pending_ids,e.id),L(C.pending_effects,e);return}else{let t=e.run;t();return}}function Kr(e){let t=e.legacy_subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];Gr(n),r=e+1|0;continue}else return}}function qr(e){let t=e.legacy_subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];Gr(n),r=e+1|0;continue}else return}}function Jr(e){let t=e.legacy_subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];Gr(n),r=e+1|0;continue}else return}}function Yr(e){let t=e.legacy_subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];Gr(n),r=e+1|0;continue}else return}}function Xr(e,t){Br(e.inner,t),Kr(e)}function Z(e,t){Vr(e.inner,t),qr(e)}function Zr(e,t){Hr(e.inner,t),Jr(e)}function Qr(e,t){Ur(e.inner,t),Yr(e)}function $r(e){let t=An(!0),n=jn(void 0),r=[],i=()=>{let t=r.length-1|0;for(;;){let e=t;if(e>=0){k(r,e)(),t=e-1|0;continue}else break}z(r),dr(r,e)};me(()=>{if(t.val){n.val=cr(i);return}else return});let a=()=>{t.val=!1;let e=r.length-1|0;for(;;){let t=e;if(t>=0){k(r,t)(),e=t-1|0;continue}else break}z(r);let i=n.val;i!==void 0&&i()};return lr(a),a}function ei(e){return(e.node.flags.value&W(5))===0?e.current_value:e.pending_value}function ti(e){return(e.node.flags.value&W(5))===0?e.current_value:e.pending_value}function ni(e){return ei(e.inner)}function Q(e){return ti(e.inner)}function ri(e,t){Br(e,t(hr(e)))}function ii(e,t){ri(e.inner,t),Kr(e)}function ai(e){return{node:Y(W(0)),value:he,getter:e}}function oi(e){let t=W(5),n=W(6),r=W(1),i=V(e.deps);for(;i.val!==void 0;){let e=i.val;if(e!==void 0){let a=e,o=a.dep,s=o.flags.value;if((s&r)!==0&&(o.last_modified_cycle>a.version||(s&(t|n))!==0))return!0;i.val=a.next_dep}}return!1}function si(e){K(),e.node.deps_tail=void 0,U(e.node.flags,W(1)|W(3));let t=J(e.node),n=e.value,r=e.getter,i=r();e.value=new ge(i),J(t);let a=e.node.flags.value;return U(e.node.flags,a&(W(3)^-1)),G(e.node),n.$tag===1?n._0!==i:!0}function ci(e){let t=e.node.flags.value,n=W(5),r=W(6),i=W(1),a=W(3),o=(t&n)!==0,s=(t&r)!==0,c=s?oi(e.node):!1;if(o||c){if(si(e)){let t=e.node.subs;t===void 0||X(t)}}else if(s)U(e.node.flags,t&(r^-1));else if(t===W(0)){U(e.node.flags,i|a);let t=J(e.node),n=e.getter;e.value=new ge(n()),J(t);let r=e.node.flags.value;U(e.node.flags,r&(a^-1))}let l=w.val;if(l!==void 0){let t=l;q(e.node,t,T.val)}let u=e.value;return u.$tag===1?u._0:ot(`Computed value not initialized`,`@mizchi/luna/signal:core_computed.mbt:58:13-58:52`)}function li(e){let t=ai(e);return()=>ci(t)}function ui(e,t){let n=e.legacy_subscribers,r=n.length,i=0,a=0;for(;;){let e=i,o=a;if(e<r){let r=n[e];if(r.id!==t){n[o]=r,i=e+1|0,a=o+1|0;continue}i=e+1|0;continue}else{hn(n,o);return}}}function di(){let e=Qe.val;return Qe.val=e+1|0,e}function fi(e,t){let n=di(),r=An(!0),i={id:n,run:()=>{if(r.val){t(ni(e));return}else return}};return L(e.legacy_subscribers,i),()=>{r.val=!1,ui(e,n)}}function pi(e){return e.$tag===0}function mi(e){return e.$tag===1}function hi(e){return e.$tag===2}function gi(e){if(e.$tag===1){let t=e._0;return new ge(t)}else return he}function _i(e){if(e.$tag===2)return e._0}function vi(e){return Sr(e.state)}function yi(e){return Q(e.state)}function bi(e){return pi(Q(e.state))}function xi(e){return mi(Q(e.state))}function Si(e){return hi(Q(e.state))}function Ci(e){return gi(Q(e.state))}function wi(e){return _i(Q(e.state))}function Ti(e){let t=e.refetch_;t()}function Ei(e){let t=Mr(_e),n=e=>{Z(t,new ve(e))},r=e=>{Z(t,new ye(e))},i=()=>{Z(t,_e),e(n,r)};return i(),{state:t,refetch_:i}}function Di(){let e=Mr(_e);return{_0:{state:e,refetch_:()=>{Z(e,_e)}},_1:t=>{Z(e,new ve(t))},_2:t=>{Z(e,new ye(t))}}}function Oi(e){let t=$e.val;return $e.val=t+1|0,{id:t,default_value:()=>e,providers:[]}}function ki(e,t){let n=t;for(;;){let t=n;if(t===void 0)return!1;{let r=t;if(r.id===e)return!r.disposed;n=r.parent;continue}}}function Ai(e,t){let n=e.providers.length-1|0;for(;;){let r=n;if(r>=0){let i=_t(e.providers,r),a=i._0,o=i._1;if(ki(a,t))return o;n=r-1|0;continue}else break}}function ji(e,t){let n=C.current_owner;C.current_owner=e;let r=t();return C.current_owner=n,r}function Mi(e,t){let n=C.current_owner;C.current_owner=e,t(),C.current_owner=n}function Ni(e,t){let n=C.current_owner;C.current_owner=e;let r=t();return C.current_owner=n,r}function Pi(e,t){let n=C.current_owner;C.current_owner=e;let r=t();return C.current_owner=n,r}function Fi(e,t){let n=C.current_owner;C.current_owner=e;let r=t();return C.current_owner=n,r}function Ii(e){if(e.disposed)return;e.disposed=!0;let t=e.children.length-1|0;for(;;){let n=t;if(n>=0){Ii(gt(e.children,n)),t=n-1|0;continue}else break}let n=e.disposers.length-1|0;for(;;){let t=n;if(t>=0){k(e.disposers,t)(),n=t-1|0;continue}else break}let r=e.cleanups.length-1|0;for(;;){let t=r;if(t>=0){k(e.cleanups,t)(),r=t-1|0;continue}else break}On(e.children),z(e.disposers),z(e.cleanups);let i=e.parent;if(i!==void 0){let t=i.children,n=t.length,r=0,a=0;for(;;){let i=r,o=a;if(i<n){let n=t[i];if(n.id!==e.id){t[o]=n,r=i+1|0,a=o+1|0;continue}r=i+1|0;continue}else{gn(t,o);return}}}}function Li(e){let t={id:di(),parent:e,children:[],cleanups:[],disposers:[],disposed:!1};return e===void 0||Ht(e.children,t),t}function Ri(e){let t=Li(C.current_owner),n=()=>{Ii(t)};return ji(t,()=>e(n))}function zi(e,t,n){let r=C.current_owner,i=Li(r),a=i.id;return Ut(e.providers,{_0:a,_1:()=>t}),I(i.cleanups,()=>{let t=e.providers,n=t.length,r=0,i=0;for(;;){let e=r,o=i;if(e<n){let n=t[e];if(n._0!==a){t[o]=n,r=e+1|0,i=o+1|0;continue}r=e+1|0;continue}else{_n(t,o);return}}}),ji(i,n)}function Bi(e,t,n){return C.current_owner===void 0?Ri(r=>zi(e,t,n)):zi(e,t,n)}function Vi(e){let t=C.current_owner,n=Ai(e,t);if(n===void 0){let t=e.default_value;return t()}else return n()}function Hi(e){let t=C.current_subscriber;C.current_subscriber=void 0;let n=J(void 0),r=e();return J(n),C.current_subscriber=t,r}function Ui(e){let t=C.current_subscriber;C.current_subscriber=void 0;let n=J(void 0);e(),J(n),C.current_subscriber=t}function Wi(e){let t=C.current_subscriber;C.current_subscriber=void 0;let n=J(void 0),r=e();return J(n),C.current_subscriber=t,r}function Gi(e){let t=C.current_subscriber;C.current_subscriber=void 0;let n=J(void 0),r=e();return J(n),C.current_subscriber=t,r}function Ki(e){let t=C.current_subscriber;C.current_subscriber=void 0;let n=J(void 0),r=e();return J(n),C.current_subscriber=t,r}function qi(e){let t=C.current_subscriber;C.current_subscriber=void 0;let n=J(void 0),r=e();return J(n),C.current_subscriber=t,r}function Ji(){E.val=E.val+1|0}function Yi(){if(E.val=E.val-1|0,E.val===0){Lr();return}else return}function Xi(){C.batch_depth=C.batch_depth+1|0,Ji()}function Zi(){for(;;)if(C.pending_effects.length>0){let e=Cn(C.pending_effects,0);wn(C.pending_ids,0);let t=e.run;t();continue}else return}function Qi(){if(C.batch_depth=C.batch_depth-1|0,Yi(),C.batch_depth===0){Zi();return}else return}function $i(e){Xi();let t=e();return Qi(),t}function ea(e){let t=C.current_cleanups;if(t.$tag===1){let n=t._0;I(n,e);return}else{let t=C.current_owner;if(t===void 0)return;I(t.cleanups,e);return}}function ta(e){let t=Li(C.current_owner);return{_0:Pi(t,e),_1:()=>{Ii(t)}}}function na(e,t){return e===void 0?t():Ni(e,t)}function ra(e,t){return e===void 0?t():Fi(e,t)}function ia(e,t){return li(()=>t(yr(e)))}function aa(e,t,n){return li(()=>n(yr(e),yr(t)))}function oa(e,t){let n=[],r=tn(e),i=[],a=r.length,o=0;for(;;){let e=o;if(e<a){let a=r[e];a===t?(R(n,Ot({buf:i,start:0,end:i.length})),kn(i)):Xt(i,a),o=e+1|0;continue}else break}return R(n,Ot({buf:i,start:0,end:i.length})),n}function sa(e){if(e!==``){let t=[],n=oa(e,38),r=n.length,i=0;for(;;){let e=i;if(e<r){let r=n[e],a=oa(r,61);if(a.length===2)Yt(t,{_0:A(a,0),_1:A(a,1)});else{let e;e=a.length===1?A(a,0)!==``:!1,e&&Yt(t,{_0:A(a,0),_1:``})}i=e+1|0;continue}else break}return t}else return[]}function ca(e){let t=tn(e),n=-1,r=t.length,i=0;for(;;){let e=i;if(e<r){if(t[e]===63){n=e;break}i=e+1|0;continue}else break}return n===-1?{_0:e,_1:[]}:{_0:Ot(pn(t,0,n)),_1:sa(Ot(pn(t,n+1|0,void 0)))}}function la(e){return F(e,{str:`[`,start:0,end:1})&&Lt(e,{str:`]`,start:0,end:1})&&!F(e,{str:`[...`,start:0,end:4})&&!F(e,{str:`[[...`,start:0,end:5})}function ua(e){if(e.length===0)return``;let t=ft(0),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];i>0&&wt(t,`/`),wt(t,n),r=i+1|0;continue}else break}return t.val}function da(e){let t=oa(e,47),n=[],r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];r!==``&&R(n,r),i=e+1|0;continue}else break}return n}function fa(e,t){let n=en(t);return F(e,{str:n,start:0,end:n.length})}function pa(e,t){let n=da(t.pattern),r=da(e),i=t.catch_all;if(i===void 0){if(n.length!==r.length)return x;let e=[],i=0,a=n.length,o=0;for(;;){let s=o;if(s<a){let a=n[s],c=A(r,s);if(fa(a,58)||la(a))if(i<t.param_names.length)Yt(e,{_0:A(t.param_names,i),_1:c}),i=i+1|0;else return x;else if(a!==c)return x;o=s+1|0;continue}else break}return new be(e)}else{let e=i,a=n.length-1|0,o=r.length;if(e.optional){if(o<a)return x}else if(o<=a)return x;let s=[],c=0,l=0;for(;;){let e=l;if(e<a){let i=A(n,e),a=A(r,e);if(fa(i,58)||la(i))if(c<t.param_names.length)Yt(s,{_0:A(t.param_names,c),_1:a}),c=c+1|0;else return x;else if(i!==a)return x;l=e+1|0;continue}else break}let u=[],d=a;for(;;){let e=d;if(e<o){R(u,A(r,e)),d=e+1|0;continue}else break}let f=ua(u);return Yt(s,{_0:e.name,_1:f}),new be(s)}}function ma(e,t){let n=ca(e),r=n._0,i=n._1,a=t.length,o=0;for(;;){let e=o;if(e<a){let n=t[e],a=pa(r,n);if(a.$tag===1)return{route:n,params:a._0,query:i,path:r};o=e+1|0;continue}else break}}function ha(e){if(e===``||e===`/`)return`/`;let t=tn(e),n=[],r=!1,i=t.length,a=0;for(;;){let e=a;if(e<i){let i=t[e];i===47?(r||Xt(n,i),r=!0):(Xt(n,i),r=!1),a=e+1|0;continue}else break}let o=n.length;return o>1&&St(n,o-1|0)===47&&Sn(n),Ot({buf:n,start:0,end:n.length})}function ga(e){let t=[],n=oa(e,47),r=n.length,i=0;for(;;){let e=i;if(e<r){_L:{let r=n[e];if(F(r,{str:`:`,start:0,end:1})&&r.length>1){let e;_L$2:{_L$3:{let t=j(r,1,void 0),n;if(t.$tag===1)n=t._0;else{t._0;break _L$3}e=Dt(n);break _L$2}break _L}R(t,e)}else if(F(r,{str:`[`,start:0,end:1})&&!F(r,{str:`[...`,start:0,end:4})&&!F(r,{str:`[[...`,start:0,end:5})&&Lt(r,{str:`]`,start:0,end:1})&&r.length>2){let e;_L$2:{_L$3:{let t=j(r,1,r.length-1|0),n;if(t.$tag===1)n=t._0;else{t._0;break _L$3}e=Dt(n);break _L$2}break _L}R(t,e)}break _L}i=e+1|0;continue}else break}return t}function _a(e){let t=oa(e,47);if(t.length===0)return;let n=A(t,t.length-1|0);if(F(n,{str:`[[...`,start:0,end:5})&&Lt(n,{str:`]]`,start:0,end:2})&&n.length>7){let e;_L:{_L$2:{let t=j(n,5,n.length-2|0),r;if(t.$tag===1)r=t._0;else{t._0;break _L$2}e=Dt(r);break _L}return}return{name:e,optional:!0}}if(F(n,{str:`[...`,start:0,end:4})&&Lt(n,{str:`]`,start:0,end:1})&&n.length>5){let e;_L:{_L$2:{let t=j(n,4,n.length-1|0),r;if(t.$tag===1)r=t._0;else{t._0;break _L$2}e=Dt(r);break _L}return}return{name:e,optional:!1}}}function va(e,t,n,r){let i=e.length,a=0;for(;;){let o=a;if(o<i){let i=e[o];switch(i.$tag){case 0:{let e=i,a=e._0,o=e._1,s=e._2,c=e._3,l=ha(`${t}${a}`),u=ga(l),d=_a(l);Jt(r,{pattern:l,param_names:u,component:o,layouts:Dn(n),kind:0,title:s,meta:c,catch_all:d});break}case 2:{let e=i,n=e._0,a=e._1,o=ha(`${t}${n}`);Jt(r,{pattern:o,param_names:ga(o),component:a,layouts:[],kind:1,title:``,meta:[],catch_all:_a(o)});break}case 3:{let e=i,n=e._0,a=e._1,o=ha(`${t}${n}`);Jt(r,{pattern:o,param_names:ga(o),component:a,layouts:[],kind:2,title:``,meta:[],catch_all:_a(o)});break}default:{let e=i,a=e._0,o=e._1,s=e._2,c=ha(`${t}${a}`),l=Dn(n);R(l,s),va(o,c,l,r)}}a=o+1|0;continue}else return}}function ya(e,t){let n=[];return va(e,t,[],n),n}function ba(){let e=xe(),t=Se();return t===``?e:`${e}${t}`}function xa(e){let t=ba();Zr(e.current_path,t),Qr(e.current_match,ma(t,e.routes))}function Sa(e,t){let n=ya(e,t),r=ba(),i=ma(r,n),a={routes:n,base:t,current_path:Nr(r),current_match:Pr(i)};return Te(()=>{xa(a)}),a}function Ca(e,t){Zr(e.current_path,t),Qr(e.current_match,ma(t,e.routes))}function wa(e,t){Ce(t),Ca(e,t)}function Ta(e,t){we(t),Ca(e,t)}function Ea(e){return br(e.current_path)}function Da(e){return xr(e.current_match)}function Oa(e){let t=pe(b(),e());return fr(()=>{Jn(t,e())}),new De(t)}function ka(e,t,n){if(t===`className`||t===`class`){Yn(e,n);return}else if(t===`__innerHTML`){y(e,`innerHTML`,n);return}else if(t===`value`){y(e,`value`,n);return}else if(t===`checked`){y(e,`checked`,n===`true`);return}else if(t===`disabled`)if(n===`true`){Xn(e,`disabled`,``);return}else{Zn(e,`disabled`);return}else{Xn(e,t,n);return}}function Aa(e,t){Xn(e,`style`,t)}function ja(e,t,n){switch(n.$tag){case 0:{let r=n._0;if(t===`style`){Aa(e,r);return}else{ka(e,t,r);return}}case 1:{let r=n._0;fr(()=>{let n=r();if(t===`style`){Aa(e,n);return}else{ka(e,t,n);return}});return}default:{let r=n._0;if(t===`__ref`){r(e);return}else{Ae(e,t,r);return}}}}function Ma(e){return{inner:e}}function $(e){switch(e.$tag){case 0:return e._0.inner;case 1:return e._0;case 2:return e._0;default:return e._0}}function Na(e,t,n,r){let i=ke(e,t),a=n.length,o=0;for(;;){let e=o;if(e<a){let t=n[e],r=t._0,a=t._1;ja(i,r,a),o=e+1|0;continue}else break}let s=r.length,c=0;for(;;){let e=c;if(e<s){let t=r[e];H(i,$(t)),c=e+1|0;continue}else break}return new Ee(Ma(i))}function Pa(e,t,n){let r=de(b(),e),i=t.length,a=0;for(;;){let e=a;if(e<i){let n=t[e],i=n._0,o=n._1;ja(r,i,o),a=e+1|0;continue}else break}let o=n.length,s=0;for(;;){let e=s;if(e<o){let t=n[e];H(r,$(t)),s=e+1|0;continue}else break}return new Ee(Ma(r))}function Fa(e,t){H(e,$(t))}function Ia(e){Jn(e,``)}function La(e,t){Ia(e),Fa(e,t)}function Ra(e){if(Un(e)===11){let t=[];for(;;){let n=Gn(e);if(n.$tag===1){let r=n._0;Wt(t,r),Kn(e,r);continue}else break}return t}else return[e]}function za(e){switch(e.length){case 0:return new S(er(b()));case 1:return ht(e,0);default:{let t=er(b()),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];H(t,$(n)),r=i+1|0;continue}else break}return new S(t)}}}function Ba(e){let t=e._2,n=e._1,r=e._0;return ra(r,()=>{let e=ta(()=>t()),r=e._0;return n.val=e._1,Ra($(r))})}function Va(e,t){let n=tr(b(),`show`),r=C.current_owner,i=jn(void 0),a={_0:r,_1:i,_2:t},o=Ki(()=>e())?qi(()=>Ba(a)):[],s=Nn(o),c=An(!0);if(fr(()=>{let t=e(),r=s.val.length>0;if(c.val){c.val=!1;return}if(t===!0)if(r===!1){let e=Wn(n);if(e.$tag===1){let t=e._0,r=qi(()=>Ba(a)),i=r.length,o=0;for(;;){let e=o;if(e<i){let i=r[e];qn(t,i,new ie(n)),o=e+1|0;continue}else break}s.val=r;return}else return}else return;else if(r===!0){let e=i.val;e===void 0||(e(),i.val=void 0);let t=s.val,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e],i=Wn(n);if(i.$tag===1){let e=i._0;Kn(e,n)}r=e+1|0;continue}else break}s.val=[];return}else return}),o.length>0){let e=[],t=o.length,r=0;for(;;){let n=r;if(n<t){let t=o[n];Vt(e,new S(t)),r=n+1|0;continue}else break}return Vt(e,new S(n)),za(e)}else return new S(n)}function Ha(e,t){return je(e,t)}function Ua(e,t){let n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];if(Ha(n.item,t))return i;r=i+1|0;continue}else break}return-1}function Wa(e,t,n){if(n.$tag===1){let r=n._0;return Me(e,t,r)}else return Ne(e,t)}function Ga(e,t,n,r,i){let a=n.length;if(a===0){let n=t.length,r=0;for(;;){let i=r;if(i<n){let n=t[i],a=n.dispose;a(),Fe(e,n.dom),r=i+1|0;continue}else break}return[]}let o=[],s=0;for(;;){let e=s;if(e<a){Bt(o,{item:yt(n,0),dom:i,dispose:()=>{}}),s=e+1|0;continue}else break}let c=on(t.length,!1),l=Ln(i),u=a-1|0;for(;;){let i=u;if(i>=0){let a=yt(n,i),s=Ua(t,a);if(s>=0){let n=bt(t,s);ln(c,s,!0),Pe(n.dom,l.val)||Wa(e,n.dom,new ie(l.val)),l.val=n.dom,un(o,i,n)}else{let t=r(a,i),n=t._0,s=t._1;qn(e,n,new ie(l.val)),l.val=n,un(o,i,{item:a,dom:n,dispose:s})}u=i-1|0;continue}else break}let d=t.length,f=0;for(;;){let n=f;if(n<d){let r=t[n];if(!xt(c,n)){let t=r.dispose;t(),Fe(e,r.dom)}f=n+1|0;continue}else break}return o}function Ka(e,t,n,r){let i=Wn(t);if(i.$tag===1){let a=i._0;e.val=Ga(a,e.val,n,r,t);return}else return}function qa(e,t,n){return{item:e,dom:t,dispose:n}}function Ja(e,t){let n=b(),r=tr(n,`for`),i=Mn([]),a=An(!0),o=C.current_owner,s=(e,n)=>na(o,()=>{let r=ta(()=>t(e,n)),i=r._0,a=r._1;return{_0:$(i),_1:a}}),c=er(n),l=Wi(()=>e()),u=l.length,d=0;for(;;){let e=d;if(e<u){let t=l[e],n=Gi(()=>s(t,e)),r=n._0,a=n._1;Bt(i.val,qa(t,r,a)),H(c,r),d=e+1|0;continue}else break}return H(c,r),fr(()=>{let t=e();if(a.val){a.val=!1;return}Ui(()=>{Ka(i,r,t,s)})}),new S(c)}function Ya(e){return new De(pe(b(),e))}function Xa(e){return new S(e)}function Za(){return te()}function Qa(e){return Ya(e)}function $a(e){return Oa(e)}function eo(e,t,n){return Pa(e,t,n)}function to(e,t,n){return Pa(e,t,n)}function no(e,t){let n=Dr(ni(e)),r=Pn(Ie);return fi(e,e=>{let i=r.val;if(i.$tag===1){let e=i._0;ue(e)}r.val=new Le(le(()=>{Xr(n,e)},t))}),n}function ro(e){switch(e.$tag){case 0:return e._0;case 1:return e._0;default:return e._0}}function io(){return{mount:ae,use_shadow:!1,is_svg:!1}}function ao(e){return{mount:new oe(e),use_shadow:!1,is_svg:!1}}function oo(){return{mount:ae,use_shadow:!0,is_svg:!1}}function so(e,t){let n=b(),r=e.mount,i;if(r.$tag===1)i=r._0;else{let e=$n(n);i=e.$tag===1?e._0:de(n,`div`)}let a=e.is_svg?fe(n,`http://www.w3.org/2000/svg`,`g`):de(n,`div`),o;e.use_shadow?(H(Hn(i,Vn(`open`,!1,`named`)),a),o=a):(H(i,a),o=a);let s=[],c=t.length,l=0;for(;;){let e=l;if(e<c){let n=t[e],r=ro(n);H(o,r),Wt(s,r),l=e+1|0;continue}else break}return ea(()=>{let e=s.length,t=0;for(;;){let n=t;if(n<e){let e=s[n],r=Wn(e);if(r.$tag===1){let t=r._0;Kn(t,e)}t=n+1|0;continue}else break}let n=Wn(a);if(n.$tag===1){let e=n._0;Kn(e,a);return}else return}),new Be(tr(n,`portal`))}function co(e){return so(io(),e)}function lo(e,t){let n=Qn(b(),e),r;if(n.$tag===1){let e=n._0;r=ao(e)}else r=io();return so(r,t)}function uo(e){return so(oo(),e)}function fo(e,t){return so({mount:new oe(e),use_shadow:!0,is_svg:!1},t)}function po(e){return jr(e)}function mo(e){return yr(e)}function ho(e,t){Xr(e,t)}function go(e,t){ii(e,t)}function _o(e){return ni(e)}function vo(e,t){return fi(e,t)}function yo(e,t){return ia(e,t)}function bo(e){return li(e)}function xo(e,t,n){return aa(e,t,n)}function So(e){return $r(e)}function Co(e){return fr(e)}function wo(){Xi()}function To(){Qi()}function Eo(e){return Hi(e)}function Do(e){return $i(e)}function Oo(e){ea(e)}function ko(e){return Ri(e)}function Ao(){let e=C.current_owner;if(e!==void 0)return e}function jo(e,t){return ji(e,t)}function Mo(){return C.current_owner!==void 0}function No(e){let t=C.current_owner;Ve(()=>{if(t===void 0){Ui(e);return}else{let n=t;Mi(n,()=>{Ui(()=>{let t=[];dr(t,e);let r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];I(n.cleanups,r),i=e+1|0;continue}else return}})});return}})}function Po(e,t){return Ja(e,t)}function Fo(e){return Qa(e)}function Io(e){return $a(e)}function Lo(e,t){La(e,t)}function Ro(e,t){Fa(e,t)}function zo(e,t){return Va(e,t)}function Bo(e,t,n){return eo(e,t,n)}function Vo(e,t,n){return to(e,t,n)}function Ho(e){return za(e)}function Uo(e,t,n){return Pa(e,t,n)}function Wo(e,t,n,r){return Na(e,t,n,r)}function Go(){return`http://www.w3.org/2000/svg`}function Ko(){return`http://www.w3.org/1998/Math/MathML`}function qo(){return Za()}function Jo(e,t){return no(e,t)}function Yo(e,t){return new He(e,t,``,[])}function Xo(e,t,n){return new He(e,t,n,[])}function Zo(e,t,n,r){return new He(e,t,n,r)}function Qo(e,t){return Sa(e,t)}function $o(e,t){let n;return n=t===void 0?``:t,Qo(e,n)}function es(e,t){wa(e,t)}function ts(e,t){Ta(e,t)}function ns(e){return Ea(e)}function rs(e){return Da(e)}function is(e){return e.base}function as(e){return Oi(e)}function os(e,t,n){return Bi(e,t,n)}function ss(e){return Vi(e)}function cs(e){return Ei(e)}function ls(){let e=Di();return{_0:e._0,_1:e._1,_2:e._2}}function us(e){return vi(e)}function ds(e){return yi(e)}function fs(e){Ti(e)}function ps(e){return bi(e)}function ms(e){return xi(e)}function hs(e){return Si(e)}function gs(e){let t=Ci(e);return t.$tag===1?t._0:Ke()}function _s(e){let t=wi(e);return t===void 0?``:t}function vs(e){return pi(e)}function ys(e){return mi(e)}function bs(e){return hi(e)}function xs(e){let t=gi(e);return t.$tag===1?t._0:Ke()}function Ss(e){let t=_i(e);return t===void 0?``:t}function Cs(e){return new Be($(e))}function ws(e){return Xa(ro(e))}function Ts(e){let t=Array(e.length),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];t[i]=Cs(n),r=i+1|0;continue}else break}return ws(co(t))}function Es(e,t){let n=Array(t.length),r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];n[e]=Cs(r),i=e+1|0;continue}else break}return ws(lo(e,n))}function Ds(e){let t=Array(e.length),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];t[i]=Cs(n),r=i+1|0;continue}else break}return ws(uo(t))}function Os(e,t){let n=Array(t.length),r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];n[e]=Cs(r),i=e+1|0;continue}else break}return ws(fo(e,n))}function ks(e){let t=po(e);return[()=>mo(t),e=>{typeof e==`function`?go(t,e):ho(t,e)}]}function As(e){return So(e)}function js(e){return Co(e)}function Ms(e){return bo(e)}function Ns(e,t,n={}){let{defer:r=!1}=n,i=Array.isArray(e),a,o,s=!0;return n=>{let c=i?e.map(e=>e()):e();if(r&&s){s=!1,a=c;return}let l=t(c,a,n??o);return a=c,o=l,s=!1,l}}function Ps(...e){let t={};for(let n of e)if(n)for(let e of Object.keys(n)){let r=n[e];if(e.startsWith(`on`)&&typeof r==`function`){let n=t[e];typeof n==`function`?t[e]=(...e)=>{n(...e),r(...e)}:t[e]=r}else if(e===`ref`&&typeof r==`function`){let n=t[e];typeof n==`function`?t[e]=e=>{n(e),r(e)}:t[e]=r}else if(e===`class`||e===`className`){let n=t[e];n?t[e]=`${n} ${r}`:t[e]=r}else e===`style`&&typeof r==`object`&&typeof t[e]==`object`?t[e]={...t[e],...r}:t[e]=r}return t}function Fs(e,...t){let n=[],r={...e};for(let e of t){let t={};for(let n of e)n in r&&(t[n]=r[n],delete r[n]);n.push(t)}return n.push(r),n}function Is(e){let t=cs(e),n=()=>xs(us(t));return Object.defineProperties(n,{loading:{get:()=>ps(t)},error:{get:()=>_s(t)},state:{get:()=>ps(t)?`pending`:ms(t)?`ready`:hs(t)?`errored`:`unresolved`},latest:{get:()=>ds(t)}}),[n,{refetch:()=>fs(t)}]}function Ls(){let e=ls(),t=e._0,n=e._1,r=e._2,i=()=>xs(us(t));return Object.defineProperties(i,{loading:{get:()=>ps(t)},error:{get:()=>_s(t)}}),[i,n,r]}function Rs(e,t){let[n]=e,r=po(n()),i=Jo(r,t);return[()=>mo(i),e=>ho(r,e)]}function zs(e,...t){if(typeof e==`function`){let n=e(...t);return Array.isArray(n)?Ho(n):n}return Array.isArray(e)?Ho(e):e}function Bs(e){if(Array.isArray(e))return Ho(e);let{children:t}=e||{};return Ho(t?Array.isArray(t)?t:[t]:[])}function Vs(e){let{each:t,fallback:n,children:r}=e;return t?Po(typeof t==`function`?t:()=>t,(e,t)=>r(e,()=>t)):n??null}function Hs(e){let{when:t,children:n}=e,r=typeof t==`function`?t:()=>t,i=()=>r();return zo(()=>!!r(),()=>zs(n,i))}function Us(e){let{each:t,fallback:n,children:r}=e;if(!t)return n??null;let i=typeof t==`function`?t:()=>t;return i().length===0&&n?n:Po(i,(e,t)=>r(()=>i()[t],t))}function Ws(e){let{context:t,value:n,children:r}=e;return os(t,n,r)}function Gs(e){let{fallback:t,children:n}=e,r;r=n?Array.isArray(n)?n.flat():[n]:[];let i=r.filter(e=>e&&e.__isMatch);if(i.length===0)return t??null;let a=Ms(()=>{for(let e=0;e<i.length;e++)if(i[e].when())return e;return-1}),o=[];for(let e=0;e<i.length;e++){let t=i[e],n=e;o.push(zo(()=>a()===n,t.children))}return t&&o.push(zo(()=>a()===-1,()=>zs(t))),Ho(o)}function Ks(e){let{when:t,children:n}=e,r=typeof t==`function`?t:()=>t,i=()=>r();return{__isMatch:!0,when:()=>!!r(),condition:r,children:()=>zs(n,i)}}function qs(e){let{mount:t,useShadow:n=!1,children:r}=e,i=[r()];if(n){if(typeof t==`string`){let e=document.querySelector(t);if(e)return Os(e,i)}else if(t)return Os(t,i);return Ds(i)}return typeof t==`string`?Es(t,i):Ts(i)}function Js(e){let t=new Map,n=structuredClone(e);function r(e){let r=e.join(`.`);if(!t.has(r)){let a=i(n,e);t.set(r,po(a))}return t.get(r)}function i(e,t){let n=e;for(let e of t){if(n==null)return;n=n[e]}return n}function a(e,t,n){if(t.length===0)return;let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(r[n]==null){let i=t[e+1];r[n]=typeof i==`number`||/^\d+$/.test(i)?[]:{}}r=r[n]}r[t[t.length-1]]=n}function o(e){let r=e.join(`.`);wo();try{for(let[e,a]of t.entries())(e===r||e.startsWith(r+`.`))&&ho(a,i(n,e.split(`.`)))}finally{To()}}function s(e,t=[]){return typeof e!=`object`||!e?e:new Proxy(e,{get(e,n){if(typeof n==`symbol`)return e[n];let i=[...t,n];mo(r(i));let a=e[n];return typeof a==`object`&&a?s(a,i):a},set(e,n,r){let i=[...t,n];return e[n]=r,o(i),!0}})}function c(...e){if(e.length===0)return;let r=[],s=0;for(;s<e.length-1&&typeof e[s]==`string`;)r.push(e[s]),s++;let c=e[s];if(r.length===0&&typeof c==`object`&&c){Object.assign(n,c);for(let[e,r]of t.entries())ho(r,i(n,e.split(`.`)));return}let l=i(n,r),u;u=typeof c==`function`?c(l):Array.isArray(c)?c:typeof c==`object`&&c&&typeof l==`object`&&l&&!Array.isArray(l)?{...l,...c}:c,a(n,r,u),o(r)}return[s(n),c]}function Ys(e){return t=>{let n=structuredClone(t);return e(n),n}}function Xs(e){return()=>e}export{_s as $,$o as A,yo as B,To as C,xs as Ct,Uo as D,Io as Dt,as as E,Fo as Et,mo as F,_o as G,Ro as H,Ao as I,Es as J,Ts as K,Mo as L,qo as M,Po as N,Wo as O,go as Ot,Ho as P,Lo as Q,Bo as R,Do as S,ys as St,xo as T,Go as Tt,Oo as U,Ko as V,No as W,os as X,Ds as Y,Co as Z,Ps as _,ho as _t,qs as a,fs as at,Xs as b,bs as bt,Gs as c,Zo as ct,Ms as d,rs as dt,us as et,js as f,ns as ft,Rs as g,jo as gt,Js as h,Eo as ht,Ks as i,ds as it,So as j,ko as k,ss as kt,Ls as l,Xo as lt,ks as m,ts as mt,Bs as n,ps as nt,Ws as o,gs as ot,Is as p,es as pt,Os as q,Us as r,ms as rt,Hs as s,Yo as st,Vs as t,hs as tt,As as u,is as ut,Ns as v,zo as vt,wo as w,vo as wt,Fs as x,vs as xt,Ys as y,Ss as yt,Vo as z};