From 02647fb51cf4e06a915944b971d05c972355afe0 Mon Sep 17 00:00:00 2001 From: FineArchs Date: Sun, 5 Nov 2023 15:44:37 +0000 Subject: [PATCH] deploy: 015322deb93c2f115e3535668f5ba1818d3cb357 --- assets/index-ac3346d6.js | 91 +++++++++++++++++++ assets/index-b465af9a.js | 67 -------------- ...{index-c17f16ea.css => index-d80a0f28.css} | 2 +- index.html | 4 +- 4 files changed, 94 insertions(+), 70 deletions(-) create mode 100644 assets/index-ac3346d6.js delete mode 100644 assets/index-b465af9a.js rename assets/{index-c17f16ea.css => index-d80a0f28.css} (57%) diff --git a/assets/index-ac3346d6.js b/assets/index-ac3346d6.js new file mode 100644 index 0000000..9a5980f --- /dev/null +++ b/assets/index-ac3346d6.js @@ -0,0 +1,91 @@ +var Td=Object.defineProperty;var jd=(t,r,e)=>r in t?Td(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e;var be=(t,r,e)=>(jd(t,typeof r!="symbol"?r+"":r,e),e);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))n(c);new MutationObserver(c=>{for(const g of c)if(g.type==="childList")for(const $ of g.addedNodes)$.tagName==="LINK"&&$.rel==="modulepreload"&&n($)}).observe(document,{childList:!0,subtree:!0});function e(c){const g={};return c.integrity&&(g.integrity=c.integrity),c.referrerPolicy&&(g.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?g.credentials="include":c.crossOrigin==="anonymous"?g.credentials="omit":g.credentials="same-origin",g}function n(c){if(c.ep)return;c.ep=!0;const g=e(c);fetch(c.href,g)}})();function Rh(t,r){const e=Object.create(null),n=t.split(",");for(let c=0;c!!e[c.toLowerCase()]:c=>!!e[c]}const pr={},Su=[],qn=()=>{},Rd=()=>!1,Dd=/^on[^a-z]/,ic=t=>Dd.test(t),Dh=t=>t.startsWith("onUpdate:"),Lr=Object.assign,Lh=(t,r)=>{const e=t.indexOf(r);e>-1&&t.splice(e,1)},Ld=Object.prototype.hasOwnProperty,_t=(t,r)=>Ld.call(t,r),Qe=Array.isArray,Fu=t=>oc(t)==="[object Map]",eg=t=>oc(t)==="[object Set]",ht=t=>typeof t=="function",jr=t=>typeof t=="string",lc=t=>typeof t=="symbol",hr=t=>t!==null&&typeof t=="object",tg=t=>(hr(t)||ht(t))&&ht(t.then)&&ht(t.catch),rg=Object.prototype.toString,oc=t=>rg.call(t),Bd=t=>oc(t).slice(8,-1),sg=t=>oc(t)==="[object Object]",Bh=t=>jr(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Ff=Rh(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),uc=t=>{const r=Object.create(null);return e=>r[e]||(r[e]=t(e))},Hd=/-(\w)/g,Vu=uc(t=>t.replace(Hd,(r,e)=>e?e.toUpperCase():"")),Ud=/\B([A-Z])/g,Gu=uc(t=>t.replace(Ud,"-$1").toLowerCase()),ng=uc(t=>t.charAt(0).toUpperCase()+t.slice(1)),Cc=uc(t=>t?`on${ng(t)}`:""),uu=(t,r)=>!Object.is(t,r),kc=(t,r)=>{for(let e=0;e{Object.defineProperty(t,r,{configurable:!0,enumerable:!1,value:e})},qd=t=>{const r=parseFloat(t);return isNaN(r)?t:r},zd=t=>{const r=jr(t)?Number(t):NaN;return isNaN(r)?t:r};let Ip;const Zc=()=>Ip||(Ip=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Hh(t){if(Qe(t)){const r={};for(let e=0;e{if(e){const n=e.split(Wd);n.length>1&&(r[n[0].trim()]=n[1].trim())}}),r}function Tr(t){let r="";if(jr(t))r=t;else if(Qe(t))for(let e=0;ejr(t)?t:t==null?"":Qe(t)||hr(t)&&(t.toString===rg||!ht(t.toString))?JSON.stringify(t,ig,2):String(t),ig=(t,r)=>r&&r.__v_isRef?ig(t,r.value):Fu(r)?{[`Map(${r.size})`]:[...r.entries()].reduce((e,[n,c])=>(e[`${n} =>`]=c,e),{})}:eg(r)?{[`Set(${r.size})`]:[...r.values()]}:hr(r)&&!Qe(r)&&!sg(r)?String(r):r;let Bn;class Zd{constructor(r=!1){this.detached=r,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Bn,!r&&Bn&&(this.index=(Bn.scopes||(Bn.scopes=[])).push(this)-1)}get active(){return this._active}run(r){if(this._active){const e=Bn;try{return Bn=this,r()}finally{Bn=e}}}on(){Bn=this}off(){Bn=this.parent}stop(r){if(this._active){let e,n;for(e=0,n=this.effects.length;e{const r=new Set(t);return r.w=0,r.n=0,r},lg=t=>(t.w&Pi)>0,og=t=>(t.n&Pi)>0,e0=({deps:t})=>{if(t.length)for(let r=0;r{const{deps:r}=t;if(r.length){let e=0;for(let n=0;n{(C==="length"||!lc(C)&&C>=m)&&x.push(A)})}else switch(e!==void 0&&x.push($.get(e)),r){case"add":Qe(t)?Bh(e)&&x.push($.get("length")):(x.push($.get(eu)),Fu(t)&&x.push($.get(eh)));break;case"delete":Qe(t)||(x.push($.get(eu)),Fu(t)&&x.push($.get(eh)));break;case"set":Fu(t)&&x.push($.get(eu));break}if(x.length===1)x[0]&&th(x[0]);else{const m=[];for(const A of x)A&&m.push(...A);th(Uh(m))}}function th(t,r){const e=Qe(t)?t:[...t];for(const n of e)n.computed&&jp(n);for(const n of e)n.computed||jp(n)}function jp(t,r){(t!==Hn||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const r0=Rh("__proto__,__v_isRef,__isVue"),cg=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(lc)),Rp=s0();function s0(){const t={};return["includes","indexOf","lastIndexOf"].forEach(r=>{t[r]=function(...e){const n=St(this);for(let g=0,$=this.length;g<$;g++)Ss(n,"get",g+"");const c=n[r](...e);return c===-1||c===!1?n[r](...e.map(St)):c}}),["push","pop","shift","unshift","splice"].forEach(r=>{t[r]=function(...e){Zu();const n=St(this)[r].apply(this,e);return Qu(),n}}),t}function n0(t){const r=St(this);return Ss(r,"has",t),r.hasOwnProperty(t)}class hg{constructor(r=!1,e=!1){this._isReadonly=r,this._shallow=e}get(r,e,n){const c=this._isReadonly,g=this._shallow;if(e==="__v_isReactive")return!c;if(e==="__v_isReadonly")return c;if(e==="__v_isShallow")return g;if(e==="__v_raw"&&n===(c?g?y0:dg:g?gg:vg).get(r))return r;const $=Qe(r);if(!c){if($&&_t(Rp,e))return Reflect.get(Rp,e,n);if(e==="hasOwnProperty")return n0}const x=Reflect.get(r,e,n);return(lc(e)?cg.has(e):r0(e))||(c||Ss(r,"get",e),g)?x:us(x)?$&&Bh(e)?x:x.value:hr(x)?c?yg(x):Wh(x):x}}class pg extends hg{constructor(r=!1){super(!1,r)}set(r,e,n,c){let g=r[e];if(Wu(g)&&us(g)&&!us(n))return!1;if(!this._shallow&&(!Gf(n)&&!Wu(n)&&(g=St(g),n=St(n)),!Qe(r)&&us(g)&&!us(n)))return g.value=n,!0;const $=Qe(r)&&Bh(e)?Number(e)t,fc=t=>Reflect.getPrototypeOf(t);function wf(t,r,e=!1,n=!1){t=t.__v_raw;const c=St(t),g=St(r);e||(uu(r,g)&&Ss(c,"get",r),Ss(c,"get",g));const{has:$}=fc(c),x=n?zh:e?Jh:of;if($.call(c,r))return x(t.get(r));if($.call(c,g))return x(t.get(g));t!==c&&t.get(r)}function mf(t,r=!1){const e=this.__v_raw,n=St(e),c=St(t);return r||(uu(t,c)&&Ss(n,"has",t),Ss(n,"has",c)),t===c?e.has(t):e.has(t)||e.has(c)}function xf(t,r=!1){return t=t.__v_raw,!r&&Ss(St(t),"iterate",eu),Reflect.get(t,"size",t)}function Dp(t){t=St(t);const r=St(this);return fc(r).has.call(r,t)||(r.add(t),ti(r,"add",t,t)),this}function Lp(t,r){r=St(r);const e=St(this),{has:n,get:c}=fc(e);let g=n.call(e,t);g||(t=St(t),g=n.call(e,t));const $=c.call(e,t);return e.set(t,r),g?uu(r,$)&&ti(e,"set",t,r):ti(e,"add",t,r),this}function Bp(t){const r=St(this),{has:e,get:n}=fc(r);let c=e.call(r,t);c||(t=St(t),c=e.call(r,t)),n&&n.call(r,t);const g=r.delete(t);return c&&ti(r,"delete",t,void 0),g}function Hp(){const t=St(this),r=t.size!==0,e=t.clear();return r&&ti(t,"clear",void 0,void 0),e}function $f(t,r){return function(n,c){const g=this,$=g.__v_raw,x=St($),m=r?zh:t?Jh:of;return!t&&Ss(x,"iterate",eu),$.forEach((A,C)=>n.call(c,m(A),m(C),g))}}function bf(t,r,e){return function(...n){const c=this.__v_raw,g=St(c),$=Fu(g),x=t==="entries"||t===Symbol.iterator&&$,m=t==="keys"&&$,A=c[t](...n),C=e?zh:r?Jh:of;return!r&&Ss(g,"iterate",m?eh:eu),{next(){const{value:P,done:S}=A.next();return S?{value:P,done:S}:{value:x?[C(P[0]),C(P[1])]:C(P),done:S}},[Symbol.iterator](){return this}}}}function ui(t){return function(...r){return t==="delete"?!1:this}}function u0(){const t={get(g){return wf(this,g)},get size(){return xf(this)},has:mf,add:Dp,set:Lp,delete:Bp,clear:Hp,forEach:$f(!1,!1)},r={get(g){return wf(this,g,!1,!0)},get size(){return xf(this)},has:mf,add:Dp,set:Lp,delete:Bp,clear:Hp,forEach:$f(!1,!0)},e={get(g){return wf(this,g,!0)},get size(){return xf(this,!0)},has(g){return mf.call(this,g,!0)},add:ui("add"),set:ui("set"),delete:ui("delete"),clear:ui("clear"),forEach:$f(!0,!1)},n={get(g){return wf(this,g,!0,!0)},get size(){return xf(this,!0)},has(g){return mf.call(this,g,!0)},add:ui("add"),set:ui("set"),delete:ui("delete"),clear:ui("clear"),forEach:$f(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(g=>{t[g]=bf(g,!1,!1),e[g]=bf(g,!0,!1),r[g]=bf(g,!1,!0),n[g]=bf(g,!0,!0)}),[t,e,r,n]}const[f0,c0,h0,p0]=u0();function Vh(t,r){const e=r?t?p0:h0:t?c0:f0;return(n,c,g)=>c==="__v_isReactive"?!t:c==="__v_isReadonly"?t:c==="__v_raw"?n:Reflect.get(_t(e,c)&&c in n?e:n,c,g)}const v0={get:Vh(!1,!1)},g0={get:Vh(!1,!0)},d0={get:Vh(!0,!1)},vg=new WeakMap,gg=new WeakMap,dg=new WeakMap,y0=new WeakMap;function w0(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function m0(t){return t.__v_skip||!Object.isExtensible(t)?0:w0(Bd(t))}function Wh(t){return Wu(t)?t:Kh(t,!1,i0,v0,vg)}function x0(t){return Kh(t,!1,o0,g0,gg)}function yg(t){return Kh(t,!0,l0,d0,dg)}function Kh(t,r,e,n,c){if(!hr(t)||t.__v_raw&&!(r&&t.__v_isReactive))return t;const g=c.get(t);if(g)return g;const $=m0(t);if($===0)return t;const x=new Proxy(t,$===2?n:e);return c.set(t,x),x}function Ou(t){return Wu(t)?Ou(t.__v_raw):!!(t&&t.__v_isReactive)}function Wu(t){return!!(t&&t.__v_isReadonly)}function Gf(t){return!!(t&&t.__v_isShallow)}function wg(t){return Ou(t)||Wu(t)}function St(t){const r=t&&t.__v_raw;return r?St(r):t}function mg(t){return Xf(t,"__v_skip",!0),t}const of=t=>hr(t)?Wh(t):t,Jh=t=>hr(t)?yg(t):t;function xg(t){_i&&Hn&&(t=St(t),fg(t.dep||(t.dep=Uh())))}function $g(t,r){t=St(t);const e=t.dep;e&&th(e)}function us(t){return!!(t&&t.__v_isRef===!0)}function wr(t){return $0(t,!1)}function $0(t,r){return us(t)?t:new b0(t,r)}class b0{constructor(r,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?r:St(r),this._value=e?r:of(r)}get value(){return xg(this),this._value}set value(r){const e=this.__v_isShallow||Gf(r)||Wu(r);r=e?r:St(r),uu(r,this._rawValue)&&(this._rawValue=r,this._value=e?r:of(r),$g(this))}}function Mi(t){return us(t)?t.value:t}const A0={get:(t,r,e)=>Mi(Reflect.get(t,r,e)),set:(t,r,e,n)=>{const c=t[r];return us(c)&&!us(e)?(c.value=e,!0):Reflect.set(t,r,e,n)}};function bg(t){return Ou(t)?t:new Proxy(t,A0)}class _0{constructor(r,e,n,c){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new qh(r,()=>{this._dirty||(this._dirty=!0,$g(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!c,this.__v_isReadonly=n}get value(){const r=St(this);return xg(r),(r._dirty||!r._cacheable)&&(r._dirty=!1,r._value=r.effect.run()),r._value}set value(r){this._setter(r)}}function C0(t,r,e=!1){let n,c;const g=ht(t);return g?(n=t,c=qn):(n=t.get,c=t.set),new _0(n,c,g||!c,e)}function Ci(t,r,e,n){let c;try{c=n?t(...n):t()}catch(g){cc(g,r,e)}return c}function wn(t,r,e,n){if(ht(t)){const g=Ci(t,r,e,n);return g&&tg(g)&&g.catch($=>{cc($,r,e)}),g}const c=[];for(let g=0;g>>1,c=os[n],g=ff(c);gJn&&os.splice(r,1)}function S0(t){Qe(t)?Nu.push(...t):(!Ga||!Ga.includes(t,t.allowRecurse?Wo+1:Wo))&&Nu.push(t),_g()}function Up(t,r=uf?Jn+1:0){for(;rff(e)-ff(n)),Wo=0;Wot.id==null?1/0:t.id,F0=(t,r)=>{const e=ff(t)-ff(r);if(e===0){if(t.pre&&!r.pre)return-1;if(r.pre&&!t.pre)return 1}return e};function kg(t){rh=!1,uf=!0,os.sort(F0);const r=qn;try{for(Jn=0;Jnjr(I)?I.trim():I)),P&&(c=e.map(qd))}let x,m=n[x=Cc(r)]||n[x=Cc(Vu(r))];!m&&g&&(m=n[x=Cc(Gu(r))]),m&&wn(m,t,6,c);const A=n[x+"Once"];if(A){if(!t.emitted)t.emitted={};else if(t.emitted[x])return;t.emitted[x]=!0,wn(A,t,6,c)}}function Pg(t,r,e=!1){const n=r.emitsCache,c=n.get(t);if(c!==void 0)return c;const g=t.emits;let $={},x=!1;if(!ht(t)){const m=A=>{const C=Pg(A,r,!0);C&&(x=!0,Lr($,C))};!e&&r.mixins.length&&r.mixins.forEach(m),t.extends&&m(t.extends),t.mixins&&t.mixins.forEach(m)}return!g&&!x?(hr(t)&&n.set(t,null),null):(Qe(g)?g.forEach(m=>$[m]=null):Lr($,g),hr(t)&&n.set(t,$),$)}function hc(t,r){return!t||!ic(r)?!1:(r=r.slice(2).replace(/Once$/,""),_t(t,r[0].toLowerCase()+r.slice(1))||_t(t,Gu(r))||_t(t,r))}let ks=null,pc=null;function Zf(t){const r=ks;return ks=t,pc=t&&t.type.__scopeId||null,r}function vf(t){pc=t}function gf(){pc=null}function ot(t,r=ks,e){if(!r||t._n)return t;const n=(...c)=>{n._d&&Yp(-1);const g=Zf(r);let $;try{$=t(...c)}finally{Zf(g),n._d&&Yp(1)}return $};return n._n=!0,n._c=!0,n._d=!0,n}function Pc(t){const{type:r,vnode:e,proxy:n,withProxy:c,props:g,propsOptions:[$],slots:x,attrs:m,emit:A,render:C,renderCache:P,data:S,setupState:I,ctx:G,inheritAttrs:ee}=t;let re,ge;const q=Zf(t);try{if(e.shapeFlag&4){const L=c||n;re=Kn(C.call(L,L,P,g,I,S,G)),ge=m}else{const L=r;re=Kn(L.length>1?L(g,{attrs:m,slots:x,emit:A}):L(g,null)),ge=r.props?m:N0(m)}}catch(L){nf.length=0,cc(L,t,1),re=nt(mn)}let U=re;if(ge&&ee!==!1){const L=Object.keys(ge),{shapeFlag:H}=U;L.length&&H&7&&($&&L.some(Dh)&&(ge=I0(ge,$)),U=Ei(U,ge))}return e.dirs&&(U=Ei(U),U.dirs=U.dirs?U.dirs.concat(e.dirs):e.dirs),e.transition&&(U.transition=e.transition),re=U,Zf(q),re}const N0=t=>{let r;for(const e in t)(e==="class"||e==="style"||ic(e))&&((r||(r={}))[e]=t[e]);return r},I0=(t,r)=>{const e={};for(const n in t)(!Dh(n)||!(n.slice(9)in r))&&(e[n]=t[n]);return e};function T0(t,r,e){const{props:n,children:c,component:g}=t,{props:$,children:x,patchFlag:m}=r,A=g.emitsOptions;if(r.dirs||r.transition)return!0;if(e&&m>=0){if(m&1024)return!0;if(m&16)return n?qp(n,$,A):!!$;if(m&8){const C=r.dynamicProps;for(let P=0;Pt.__isSuspense;function D0(t,r){r&&r.pendingBranch?Qe(t)?r.effects.push(...t):r.effects.push(t):S0(t)}const Af={};function ri(t,r,e){return Eg(t,r,e)}function Eg(t,r,{immediate:e,deep:n,flush:c,onTrack:g,onTrigger:$}=pr){var x;const m=Yd()===((x=es)==null?void 0:x.scope)?es:null;let A,C=!1,P=!1;if(us(t)?(A=()=>t.value,C=Gf(t)):Ou(t)?(A=()=>t,n=!0):Qe(t)?(P=!0,C=t.some(L=>Ou(L)||Gf(L)),A=()=>t.map(L=>{if(us(L))return L.value;if(Ou(L))return Mu(L);if(ht(L))return Ci(L,m,2)})):ht(t)?r?A=()=>Ci(t,m,2):A=()=>{if(!(m&&m.isUnmounted))return S&&S(),wn(t,m,3,[I])}:A=qn,r&&n){const L=A;A=()=>Mu(L())}let S,I=L=>{S=q.onStop=()=>{Ci(L,m,4)}},G;if(hf)if(I=qn,r?e&&wn(r,m,3,[A(),P?[]:void 0,I]):A(),c==="sync"){const L=Iy();G=L.__watcherHandles||(L.__watcherHandles=[])}else return qn;let ee=P?new Array(t.length).fill(Af):Af;const re=()=>{if(q.active)if(r){const L=q.run();(n||C||(P?L.some((H,W)=>uu(H,ee[W])):uu(L,ee)))&&(S&&S(),wn(r,m,3,[L,ee===Af?void 0:P&&ee[0]===Af?[]:ee,I]),ee=L)}else q.run()};re.allowRecurse=!!r;let ge;c==="sync"?ge=re:c==="post"?ge=()=>Ms(re,m&&m.suspense):(re.pre=!0,m&&(re.id=m.uid),ge=()=>Gh(re));const q=new qh(A,ge);r?e?re():ee=q.run():c==="post"?Ms(q.run.bind(q),m&&m.suspense):q.run();const U=()=>{q.stop(),m&&m.scope&&Lh(m.scope.effects,q)};return G&&G.push(U),U}function L0(t,r,e){const n=this.proxy,c=jr(t)?t.includes(".")?Mg(n,t):()=>n[t]:t.bind(n,n);let g;ht(r)?g=r:(g=r.handler,e=r);const $=es;Ku(this);const x=Eg(c,g.bind(n),e);return $?Ku($):tu(),x}function Mg(t,r){const e=r.split(".");return()=>{let n=t;for(let c=0;c{Mu(e,r)});else if(sg(t))for(const e in t)Mu(t[e],r);return t}function Uo(t,r,e,n){const c=t.dirs,g=r&&r.dirs;for(let $=0;${t.isMounted=!0}),Tg(()=>{t.isUnmounting=!0}),t}const hn=[Function,Array],Sg={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:hn,onEnter:hn,onAfterEnter:hn,onEnterCancelled:hn,onBeforeLeave:hn,onLeave:hn,onAfterLeave:hn,onLeaveCancelled:hn,onBeforeAppear:hn,onAppear:hn,onAfterAppear:hn,onAppearCancelled:hn},H0={name:"BaseTransition",props:Sg,setup(t,{slots:r}){const e=ky(),n=B0();let c;return()=>{const g=r.default&&Og(r.default(),!0);if(!g||!g.length)return;let $=g[0];if(g.length>1){for(const ee of g)if(ee.type!==mn){$=ee;break}}const x=St(t),{mode:m}=x;if(n.isLeaving)return Ec($);const A=zp($);if(!A)return Ec($);const C=sh(A,x,n,e);nh(A,C);const P=e.subTree,S=P&&zp(P);let I=!1;const{getTransitionKey:G}=A.type;if(G){const ee=G();c===void 0?c=ee:ee!==c&&(c=ee,I=!0)}if(S&&S.type!==mn&&(!Ko(A,S)||I)){const ee=sh(S,x,n,e);if(nh(S,ee),m==="out-in")return n.isLeaving=!0,ee.afterLeave=()=>{n.isLeaving=!1,e.update.active!==!1&&e.update()},Ec($);m==="in-out"&&A.type!==mn&&(ee.delayLeave=(re,ge,q)=>{const U=Fg(n,S);U[String(S.key)]=S,re[di]=()=>{ge(),re[di]=void 0,delete C.delayedLeave},C.delayedLeave=q})}return $}}},U0=H0;function Fg(t,r){const{leavingVNodes:e}=t;let n=e.get(r.type);return n||(n=Object.create(null),e.set(r.type,n)),n}function sh(t,r,e,n){const{appear:c,mode:g,persisted:$=!1,onBeforeEnter:x,onEnter:m,onAfterEnter:A,onEnterCancelled:C,onBeforeLeave:P,onLeave:S,onAfterLeave:I,onLeaveCancelled:G,onBeforeAppear:ee,onAppear:re,onAfterAppear:ge,onAppearCancelled:q}=r,U=String(t.key),L=Fg(e,t),H=(J,Y)=>{J&&wn(J,n,9,Y)},W=(J,Y)=>{const ue=Y[1];H(J,Y),Qe(J)?J.every(de=>de.length<=1)&&ue():J.length<=1&&ue()},V={mode:g,persisted:$,beforeEnter(J){let Y=x;if(!e.isMounted)if(c)Y=ee||x;else return;J[di]&&J[di](!0);const ue=L[U];ue&&Ko(t,ue)&&ue.el[di]&&ue.el[di](),H(Y,[J])},enter(J){let Y=m,ue=A,de=C;if(!e.isMounted)if(c)Y=re||m,ue=ge||A,de=q||C;else return;let le=!1;const Ie=J[_f]=ze=>{le||(le=!0,ze?H(de,[J]):H(ue,[J]),V.delayedLeave&&V.delayedLeave(),J[_f]=void 0)};Y?W(Y,[J,Ie]):Ie()},leave(J,Y){const ue=String(t.key);if(J[_f]&&J[_f](!0),e.isUnmounting)return Y();H(P,[J]);let de=!1;const le=J[di]=Ie=>{de||(de=!0,Y(),Ie?H(G,[J]):H(I,[J]),J[di]=void 0,L[ue]===t&&delete L[ue])};L[ue]=t,S?W(S,[J,le]):le()},clone(J){return sh(J,r,e,n)}};return V}function Ec(t){if(vc(t))return t=Ei(t),t.children=null,t}function zp(t){return vc(t)?t.children?t.children[0]:void 0:t}function nh(t,r){t.shapeFlag&6&&t.component?nh(t.component.subTree,r):t.shapeFlag&128?(t.ssContent.transition=r.clone(t.ssContent),t.ssFallback.transition=r.clone(t.ssFallback)):t.transition=r}function Og(t,r=!1,e){let n=[],c=0;for(let g=0;g1)for(let g=0;gLr({name:t.name},r,{setup:t}))():t}const rf=t=>!!t.type.__asyncLoader,vc=t=>t.type.__isKeepAlive;function q0(t,r){Ng(t,"a",r)}function z0(t,r){Ng(t,"da",r)}function Ng(t,r,e=es){const n=t.__wdc||(t.__wdc=()=>{let c=e;for(;c;){if(c.isDeactivated)return;c=c.parent}return t()});if(gc(r,n,e),e){let c=e.parent;for(;c&&c.parent;)vc(c.parent.vnode)&&V0(n,r,e,c),c=c.parent}}function V0(t,r,e,n){const c=gc(r,t,n,!0);jg(()=>{Lh(n[r],c)},e)}function gc(t,r,e=es,n=!1){if(e){const c=e[t]||(e[t]=[]),g=r.__weh||(r.__weh=(...$)=>{if(e.isUnmounted)return;Zu(),Ku(e);const x=wn(r,e,t,$);return tu(),Qu(),x});return n?c.unshift(g):c.push(g),g}}const ni=t=>(r,e=es)=>(!hf||t==="sp")&&gc(t,(...n)=>r(...n),e),W0=ni("bm"),Ig=ni("m"),K0=ni("bu"),J0=ni("u"),Tg=ni("bum"),jg=ni("um"),X0=ni("sp"),G0=ni("rtg"),Z0=ni("rtc");function Q0(t,r=es){gc("ec",t,r)}const Y0=Symbol.for("v-ndc");function fu(t,r,e,n){let c;const g=e&&e[n];if(Qe(t)||jr(t)){c=new Array(t.length);for(let $=0,x=t.length;$r($,x,void 0,g&&g[x]));else{const $=Object.keys(t);c=new Array($.length);for(let x=0,m=$.length;xec(r)?!(r.type===mn||r.type===Ir&&!Rg(r.children)):!0)?t:null}const ah=t=>t?Jg(t)?tp(t)||t.proxy:ah(t.parent):null,sf=Lr(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>ah(t.parent),$root:t=>ah(t.root),$emit:t=>t.emit,$options:t=>Zh(t),$forceUpdate:t=>t.f||(t.f=()=>Gh(t.update)),$nextTick:t=>t.n||(t.n=P0.bind(t.proxy)),$watch:t=>L0.bind(t)}),Mc=(t,r)=>t!==pr&&!t.__isScriptSetup&&_t(t,r),ey={get({_:t},r){const{ctx:e,setupState:n,data:c,props:g,accessCache:$,type:x,appContext:m}=t;let A;if(r[0]!=="$"){const I=$[r];if(I!==void 0)switch(I){case 1:return n[r];case 2:return c[r];case 4:return e[r];case 3:return g[r]}else{if(Mc(n,r))return $[r]=1,n[r];if(c!==pr&&_t(c,r))return $[r]=2,c[r];if((A=t.propsOptions[0])&&_t(A,r))return $[r]=3,g[r];if(e!==pr&&_t(e,r))return $[r]=4,e[r];ih&&($[r]=0)}}const C=sf[r];let P,S;if(C)return r==="$attrs"&&Ss(t,"get",r),C(t);if((P=x.__cssModules)&&(P=P[r]))return P;if(e!==pr&&_t(e,r))return $[r]=4,e[r];if(S=m.config.globalProperties,_t(S,r))return S[r]},set({_:t},r,e){const{data:n,setupState:c,ctx:g}=t;return Mc(c,r)?(c[r]=e,!0):n!==pr&&_t(n,r)?(n[r]=e,!0):_t(t.props,r)||r[0]==="$"&&r.slice(1)in t?!1:(g[r]=e,!0)},has({_:{data:t,setupState:r,accessCache:e,ctx:n,appContext:c,propsOptions:g}},$){let x;return!!e[$]||t!==pr&&_t(t,$)||Mc(r,$)||(x=g[0])&&_t(x,$)||_t(n,$)||_t(sf,$)||_t(c.config.globalProperties,$)},defineProperty(t,r,e){return e.get!=null?t._.accessCache[r]=0:_t(e,"value")&&this.set(t,r,e.value,null),Reflect.defineProperty(t,r,e)}};function Vp(t){return Qe(t)?t.reduce((r,e)=>(r[e]=null,r),{}):t}let ih=!0;function ty(t){const r=Zh(t),e=t.proxy,n=t.ctx;ih=!1,r.beforeCreate&&Wp(r.beforeCreate,t,"bc");const{data:c,computed:g,methods:$,watch:x,provide:m,inject:A,created:C,beforeMount:P,mounted:S,beforeUpdate:I,updated:G,activated:ee,deactivated:re,beforeDestroy:ge,beforeUnmount:q,destroyed:U,unmounted:L,render:H,renderTracked:W,renderTriggered:V,errorCaptured:J,serverPrefetch:Y,expose:ue,inheritAttrs:de,components:le,directives:Ie,filters:ze}=r;if(A&&ry(A,n,null),$)for(const ft in $){const je=$[ft];ht(je)&&(n[ft]=je.bind(e))}if(c){const ft=c.call(e,e);hr(ft)&&(t.data=Wh(ft))}if(ih=!0,g)for(const ft in g){const je=g[ft],ut=ht(je)?je.bind(e,e):ht(je.get)?je.get.bind(e,e):qn,jt=!ht(je)&&ht(je.set)?je.set.bind(e):qn,Rt=Oy({get:ut,set:jt});Object.defineProperty(n,ft,{enumerable:!0,configurable:!0,get:()=>Rt.value,set:Ye=>Rt.value=Ye})}if(x)for(const ft in x)Dg(x[ft],n,e,ft);if(m){const ft=ht(m)?m.call(e):m;Reflect.ownKeys(ft).forEach(je=>{oy(je,ft[je])})}C&&Wp(C,t,"c");function Ke(ft,je){Qe(je)?je.forEach(ut=>ft(ut.bind(e))):je&&ft(je.bind(e))}if(Ke(W0,P),Ke(Ig,S),Ke(K0,I),Ke(J0,G),Ke(q0,ee),Ke(z0,re),Ke(Q0,J),Ke(Z0,W),Ke(G0,V),Ke(Tg,q),Ke(jg,L),Ke(X0,Y),Qe(ue))if(ue.length){const ft=t.exposed||(t.exposed={});ue.forEach(je=>{Object.defineProperty(ft,je,{get:()=>e[je],set:ut=>e[je]=ut})})}else t.exposed||(t.exposed={});H&&t.render===qn&&(t.render=H),de!=null&&(t.inheritAttrs=de),le&&(t.components=le),Ie&&(t.directives=Ie)}function ry(t,r,e=qn){Qe(t)&&(t=lh(t));for(const n in t){const c=t[n];let g;hr(c)?"default"in c?g=Nf(c.from||n,c.default,!0):g=Nf(c.from||n):g=Nf(c),us(g)?Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get:()=>g.value,set:$=>g.value=$}):r[n]=g}}function Wp(t,r,e){wn(Qe(t)?t.map(n=>n.bind(r.proxy)):t.bind(r.proxy),r,e)}function Dg(t,r,e,n){const c=n.includes(".")?Mg(e,n):()=>e[n];if(jr(t)){const g=r[t];ht(g)&&ri(c,g)}else if(ht(t))ri(c,t.bind(e));else if(hr(t))if(Qe(t))t.forEach(g=>Dg(g,r,e,n));else{const g=ht(t.handler)?t.handler.bind(e):r[t.handler];ht(g)&&ri(c,g,t)}}function Zh(t){const r=t.type,{mixins:e,extends:n}=r,{mixins:c,optionsCache:g,config:{optionMergeStrategies:$}}=t.appContext,x=g.get(r);let m;return x?m=x:!c.length&&!e&&!n?m=r:(m={},c.length&&c.forEach(A=>Qf(m,A,$,!0)),Qf(m,r,$)),hr(r)&&g.set(r,m),m}function Qf(t,r,e,n=!1){const{mixins:c,extends:g}=r;g&&Qf(t,g,e,!0),c&&c.forEach($=>Qf(t,$,e,!0));for(const $ in r)if(!(n&&$==="expose")){const x=sy[$]||e&&e[$];t[$]=x?x(t[$],r[$]):r[$]}return t}const sy={data:Kp,props:Jp,emits:Jp,methods:tf,computed:tf,beforeCreate:xs,created:xs,beforeMount:xs,mounted:xs,beforeUpdate:xs,updated:xs,beforeDestroy:xs,beforeUnmount:xs,destroyed:xs,unmounted:xs,activated:xs,deactivated:xs,errorCaptured:xs,serverPrefetch:xs,components:tf,directives:tf,watch:ay,provide:Kp,inject:ny};function Kp(t,r){return r?t?function(){return Lr(ht(t)?t.call(this,this):t,ht(r)?r.call(this,this):r)}:r:t}function ny(t,r){return tf(lh(t),lh(r))}function lh(t){if(Qe(t)){const r={};for(let e=0;e1)return e&&ht(r)?r.call(n&&n.proxy):r}}function uy(t,r,e,n=!1){const c={},g={};Xf(g,yc,1),t.propsDefaults=Object.create(null),Bg(t,r,c,g);for(const $ in t.propsOptions[0])$ in c||(c[$]=void 0);e?t.props=n?c:x0(c):t.type.props?t.props=c:t.props=g,t.attrs=g}function fy(t,r,e,n){const{props:c,attrs:g,vnode:{patchFlag:$}}=t,x=St(c),[m]=t.propsOptions;let A=!1;if((n||$>0)&&!($&16)){if($&8){const C=t.vnode.dynamicProps;for(let P=0;P{m=!0;const[S,I]=Hg(P,r,!0);Lr($,S),I&&x.push(...I)};!e&&r.mixins.length&&r.mixins.forEach(C),t.extends&&C(t.extends),t.mixins&&t.mixins.forEach(C)}if(!g&&!m)return hr(t)&&n.set(t,Su),Su;if(Qe(g))for(let C=0;C-1,I[1]=ee<0||G-1||_t(I,"default"))&&x.push(P)}}}const A=[$,x];return hr(t)&&n.set(t,A),A}function Xp(t){return t[0]!=="$"}function Gp(t){const r=t&&t.toString().match(/^\s*(function|class) (\w+)/);return r?r[2]:t===null?"null":""}function Zp(t,r){return Gp(t)===Gp(r)}function Qp(t,r){return Qe(r)?r.findIndex(e=>Zp(e,t)):ht(r)&&Zp(r,t)?0:-1}const Ug=t=>t[0]==="_"||t==="$stable",Qh=t=>Qe(t)?t.map(Kn):[Kn(t)],cy=(t,r,e)=>{if(r._n)return r;const n=ot((...c)=>Qh(r(...c)),e);return n._c=!1,n},qg=(t,r,e)=>{const n=t._ctx;for(const c in t){if(Ug(c))continue;const g=t[c];if(ht(g))r[c]=cy(c,g,n);else if(g!=null){const $=Qh(g);r[c]=()=>$}}},zg=(t,r)=>{const e=Qh(r);t.slots.default=()=>e},hy=(t,r)=>{if(t.vnode.shapeFlag&32){const e=r._;e?(t.slots=St(r),Xf(r,"_",e)):qg(r,t.slots={})}else t.slots={},r&&zg(t,r);Xf(t.slots,yc,1)},py=(t,r,e)=>{const{vnode:n,slots:c}=t;let g=!0,$=pr;if(n.shapeFlag&32){const x=r._;x?e&&x===1?g=!1:(Lr(c,r),!e&&x===1&&delete c._):(g=!r.$stable,qg(r,c)),$=r}else r&&(zg(t,r),$={default:1});if(g)for(const x in c)!Ug(x)&&$[x]==null&&delete c[x]};function uh(t,r,e,n,c=!1){if(Qe(t)){t.forEach((S,I)=>uh(S,r&&(Qe(r)?r[I]:r),e,n,c));return}if(rf(n)&&!c)return;const g=n.shapeFlag&4?tp(n.component)||n.component.proxy:n.el,$=c?null:g,{i:x,r:m}=t,A=r&&r.r,C=x.refs===pr?x.refs={}:x.refs,P=x.setupState;if(A!=null&&A!==m&&(jr(A)?(C[A]=null,_t(P,A)&&(P[A]=null)):us(A)&&(A.value=null)),ht(m))Ci(m,x,12,[$,C]);else{const S=jr(m),I=us(m);if(S||I){const G=()=>{if(t.f){const ee=S?_t(P,m)?P[m]:C[m]:m.value;c?Qe(ee)&&Lh(ee,g):Qe(ee)?ee.includes(g)||ee.push(g):S?(C[m]=[g],_t(P,m)&&(P[m]=C[m])):(m.value=[g],t.k&&(C[t.k]=m.value))}else S?(C[m]=$,_t(P,m)&&(P[m]=$)):I&&(m.value=$,t.k&&(C[t.k]=$))};$?(G.id=-1,Ms(G,e)):G()}}}const Ms=D0;function vy(t){return gy(t)}function gy(t,r){const e=Zc();e.__VUE__=!0;const{insert:n,remove:c,patchProp:g,createElement:$,createText:x,createComment:m,setText:A,setElementText:C,parentNode:P,nextSibling:S,setScopeId:I=qn,insertStaticContent:G}=t,ee=(z,Z,se,ve=null,ye=null,oe=null,Ne=!1,me=null,$e=!!Z.dynamicChildren)=>{if(z===Z)return;z&&!Ko(z,Z)&&(ve=br(z),Ye(z,ye,oe,!0),z=null),Z.patchFlag===-2&&($e=!1,Z.dynamicChildren=null);const{type:he,ref:Le,shapeFlag:Re}=Z;switch(he){case dc:re(z,Z,se,ve);break;case mn:ge(z,Z,se,ve);break;case Sc:z==null&&q(Z,se,ve,Ne);break;case Ir:le(z,Z,se,ve,ye,oe,Ne,me,$e);break;default:Re&1?H(z,Z,se,ve,ye,oe,Ne,me,$e):Re&6?Ie(z,Z,se,ve,ye,oe,Ne,me,$e):(Re&64||Re&128)&&he.process(z,Z,se,ve,ye,oe,Ne,me,$e,Or)}Le!=null&&ye&&uh(Le,z&&z.ref,oe,Z||z,!Z)},re=(z,Z,se,ve)=>{if(z==null)n(Z.el=x(Z.children),se,ve);else{const ye=Z.el=z.el;Z.children!==z.children&&A(ye,Z.children)}},ge=(z,Z,se,ve)=>{z==null?n(Z.el=m(Z.children||""),se,ve):Z.el=z.el},q=(z,Z,se,ve)=>{[z.el,z.anchor]=G(z.children,Z,se,ve,z.el,z.anchor)},U=({el:z,anchor:Z},se,ve)=>{let ye;for(;z&&z!==Z;)ye=S(z),n(z,se,ve),z=ye;n(Z,se,ve)},L=({el:z,anchor:Z})=>{let se;for(;z&&z!==Z;)se=S(z),c(z),z=se;c(Z)},H=(z,Z,se,ve,ye,oe,Ne,me,$e)=>{Ne=Ne||Z.type==="svg",z==null?W(Z,se,ve,ye,oe,Ne,me,$e):Y(z,Z,ye,oe,Ne,me,$e)},W=(z,Z,se,ve,ye,oe,Ne,me)=>{let $e,he;const{type:Le,props:Re,shapeFlag:He,transition:We,dirs:Ze}=z;if($e=z.el=$(z.type,oe,Re&&Re.is,Re),He&8?C($e,z.children):He&16&&J(z.children,$e,null,ve,ye,oe&&Le!=="foreignObject",Ne,me),Ze&&Uo(z,null,ve,"created"),V($e,z,z.scopeId,Ne,ve),Re){for(const it in Re)it!=="value"&&!Ff(it)&&g($e,it,null,Re[it],oe,z.children,ve,ye,Ft);"value"in Re&&g($e,"value",null,Re.value),(he=Re.onVnodeBeforeMount)&&zn(he,ve,z)}Ze&&Uo(z,null,ve,"beforeMount");const at=dy(ye,We);at&&We.beforeEnter($e),n($e,Z,se),((he=Re&&Re.onVnodeMounted)||at||Ze)&&Ms(()=>{he&&zn(he,ve,z),at&&We.enter($e),Ze&&Uo(z,null,ve,"mounted")},ye)},V=(z,Z,se,ve,ye)=>{if(se&&I(z,se),ve)for(let oe=0;oe{for(let he=$e;he{const me=Z.el=z.el;let{patchFlag:$e,dynamicChildren:he,dirs:Le}=Z;$e|=z.patchFlag&16;const Re=z.props||pr,He=Z.props||pr;let We;se&&qo(se,!1),(We=He.onVnodeBeforeUpdate)&&zn(We,se,Z,z),Le&&Uo(Z,z,se,"beforeUpdate"),se&&qo(se,!0);const Ze=ye&&Z.type!=="foreignObject";if(he?ue(z.dynamicChildren,he,me,se,ve,Ze,oe):Ne||je(z,Z,me,null,se,ve,Ze,oe,!1),$e>0){if($e&16)de(me,Z,Re,He,se,ve,ye);else if($e&2&&Re.class!==He.class&&g(me,"class",null,He.class,ye),$e&4&&g(me,"style",Re.style,He.style,ye),$e&8){const at=Z.dynamicProps;for(let it=0;it{We&&zn(We,se,Z,z),Le&&Uo(Z,z,se,"updated")},ve)},ue=(z,Z,se,ve,ye,oe,Ne)=>{for(let me=0;me{if(se!==ve){if(se!==pr)for(const me in se)!Ff(me)&&!(me in ve)&&g(z,me,se[me],null,Ne,Z.children,ye,oe,Ft);for(const me in ve){if(Ff(me))continue;const $e=ve[me],he=se[me];$e!==he&&me!=="value"&&g(z,me,he,$e,Ne,Z.children,ye,oe,Ft)}"value"in ve&&g(z,"value",se.value,ve.value)}},le=(z,Z,se,ve,ye,oe,Ne,me,$e)=>{const he=Z.el=z?z.el:x(""),Le=Z.anchor=z?z.anchor:x("");let{patchFlag:Re,dynamicChildren:He,slotScopeIds:We}=Z;We&&(me=me?me.concat(We):We),z==null?(n(he,se,ve),n(Le,se,ve),J(Z.children,se,Le,ye,oe,Ne,me,$e)):Re>0&&Re&64&&He&&z.dynamicChildren?(ue(z.dynamicChildren,He,se,ye,oe,Ne,me),(Z.key!=null||ye&&Z===ye.subTree)&&Vg(z,Z,!0)):je(z,Z,se,Le,ye,oe,Ne,me,$e)},Ie=(z,Z,se,ve,ye,oe,Ne,me,$e)=>{Z.slotScopeIds=me,z==null?Z.shapeFlag&512?ye.ctx.activate(Z,se,ve,Ne,$e):ze(Z,se,ve,ye,oe,Ne,$e):mt(z,Z,$e)},ze=(z,Z,se,ve,ye,oe,Ne)=>{const me=z.component=Cy(z,ve,ye);if(vc(z)&&(me.ctx.renderer=Or),Py(me),me.asyncDep){if(ye&&ye.registerDep(me,Ke),!z.el){const $e=me.subTree=nt(mn);ge(null,$e,Z,se)}return}Ke(me,z,Z,se,ye,oe,Ne)},mt=(z,Z,se)=>{const ve=Z.component=z.component;if(T0(z,Z,se))if(ve.asyncDep&&!ve.asyncResolved){ft(ve,Z,se);return}else ve.next=Z,M0(ve.update),ve.update();else Z.el=z.el,ve.vnode=Z},Ke=(z,Z,se,ve,ye,oe,Ne)=>{const me=()=>{if(z.isMounted){let{next:Le,bu:Re,u:He,parent:We,vnode:Ze}=z,at=Le,it;qo(z,!1),Le?(Le.el=Ze.el,ft(z,Le,Ne)):Le=Ze,Re&&kc(Re),(it=Le.props&&Le.props.onVnodeBeforeUpdate)&&zn(it,We,Le,Ze),qo(z,!0);const bt=Pc(z),Kt=z.subTree;z.subTree=bt,ee(Kt,bt,P(Kt.el),br(Kt),z,ye,oe),Le.el=bt.el,at===null&&j0(z,bt.el),He&&Ms(He,ye),(it=Le.props&&Le.props.onVnodeUpdated)&&Ms(()=>zn(it,We,Le,Ze),ye)}else{let Le;const{el:Re,props:He}=Z,{bm:We,m:Ze,parent:at}=z,it=rf(Z);if(qo(z,!1),We&&kc(We),!it&&(Le=He&&He.onVnodeBeforeMount)&&zn(Le,at,Z),qo(z,!0),Re&&Dt){const bt=()=>{z.subTree=Pc(z),Dt(Re,z.subTree,z,ye,null)};it?Z.type.__asyncLoader().then(()=>!z.isUnmounted&&bt()):bt()}else{const bt=z.subTree=Pc(z);ee(null,bt,se,ve,z,ye,oe),Z.el=bt.el}if(Ze&&Ms(Ze,ye),!it&&(Le=He&&He.onVnodeMounted)){const bt=Z;Ms(()=>zn(Le,at,bt),ye)}(Z.shapeFlag&256||at&&rf(at.vnode)&&at.vnode.shapeFlag&256)&&z.a&&Ms(z.a,ye),z.isMounted=!0,Z=se=ve=null}},$e=z.effect=new qh(me,()=>Gh(he),z.scope),he=z.update=()=>$e.run();he.id=z.uid,qo(z,!0),he()},ft=(z,Z,se)=>{Z.component=z;const ve=z.vnode.props;z.vnode=Z,z.next=null,fy(z,Z.props,ve,se),py(z,Z.children,se),Zu(),Up(),Qu()},je=(z,Z,se,ve,ye,oe,Ne,me,$e=!1)=>{const he=z&&z.children,Le=z?z.shapeFlag:0,Re=Z.children,{patchFlag:He,shapeFlag:We}=Z;if(He>0){if(He&128){jt(he,Re,se,ve,ye,oe,Ne,me,$e);return}else if(He&256){ut(he,Re,se,ve,ye,oe,Ne,me,$e);return}}We&8?(Le&16&&Ft(he,ye,oe),Re!==he&&C(se,Re)):Le&16?We&16?jt(he,Re,se,ve,ye,oe,Ne,me,$e):Ft(he,ye,oe,!0):(Le&8&&C(se,""),We&16&&J(Re,se,ve,ye,oe,Ne,me,$e))},ut=(z,Z,se,ve,ye,oe,Ne,me,$e)=>{z=z||Su,Z=Z||Su;const he=z.length,Le=Z.length,Re=Math.min(he,Le);let He;for(He=0;HeLe?Ft(z,ye,oe,!0,!1,Re):J(Z,se,ve,ye,oe,Ne,me,$e,Re)},jt=(z,Z,se,ve,ye,oe,Ne,me,$e)=>{let he=0;const Le=Z.length;let Re=z.length-1,He=Le-1;for(;he<=Re&&he<=He;){const We=z[he],Ze=Z[he]=$e?yi(Z[he]):Kn(Z[he]);if(Ko(We,Ze))ee(We,Ze,se,null,ye,oe,Ne,me,$e);else break;he++}for(;he<=Re&&he<=He;){const We=z[Re],Ze=Z[He]=$e?yi(Z[He]):Kn(Z[He]);if(Ko(We,Ze))ee(We,Ze,se,null,ye,oe,Ne,me,$e);else break;Re--,He--}if(he>Re){if(he<=He){const We=He+1,Ze=WeHe)for(;he<=Re;)Ye(z[he],ye,oe,!0),he++;else{const We=he,Ze=he,at=new Map;for(he=Ze;he<=He;he++){const Lt=Z[he]=$e?yi(Z[he]):Kn(Z[he]);Lt.key!=null&&at.set(Lt.key,he)}let it,bt=0;const Kt=He-Ze+1;let Ct=!1,sr=0;const Ns=new Array(Kt);for(he=0;he=Kt){Ye(Lt,ye,oe,!0);continue}let vt;if(Lt.key!=null)vt=at.get(Lt.key);else for(it=Ze;it<=He;it++)if(Ns[it-Ze]===0&&Ko(Lt,Z[it])){vt=it;break}vt===void 0?Ye(Lt,ye,oe,!0):(Ns[vt-Ze]=he+1,vt>=sr?sr=vt:Ct=!0,ee(Lt,Z[vt],se,null,ye,oe,Ne,me,$e),bt++)}const rs=Ct?yy(Ns):Su;for(it=rs.length-1,he=Kt-1;he>=0;he--){const Lt=Ze+he,vt=Z[Lt],qt=Lt+1{const{el:oe,type:Ne,transition:me,children:$e,shapeFlag:he}=z;if(he&6){Rt(z.component.subTree,Z,se,ve);return}if(he&128){z.suspense.move(Z,se,ve);return}if(he&64){Ne.move(z,Z,se,Or);return}if(Ne===Ir){n(oe,Z,se);for(let Re=0;Re<$e.length;Re++)Rt($e[Re],Z,se,ve);n(z.anchor,Z,se);return}if(Ne===Sc){U(z,Z,se);return}if(ve!==2&&he&1&&me)if(ve===0)me.beforeEnter(oe),n(oe,Z,se),Ms(()=>me.enter(oe),ye);else{const{leave:Re,delayLeave:He,afterLeave:We}=me,Ze=()=>n(oe,Z,se),at=()=>{Re(oe,()=>{Ze(),We&&We()})};He?He(oe,Ze,at):at()}else n(oe,Z,se)},Ye=(z,Z,se,ve=!1,ye=!1)=>{const{type:oe,props:Ne,ref:me,children:$e,dynamicChildren:he,shapeFlag:Le,patchFlag:Re,dirs:He}=z;if(me!=null&&uh(me,null,se,z,!0),Le&256){Z.ctx.deactivate(z);return}const We=Le&1&&He,Ze=!rf(z);let at;if(Ze&&(at=Ne&&Ne.onVnodeBeforeUnmount)&&zn(at,Z,z),Le&6)Ar(z.component,se,ve);else{if(Le&128){z.suspense.unmount(se,ve);return}We&&Uo(z,null,Z,"beforeUnmount"),Le&64?z.type.remove(z,Z,se,ye,Or,ve):he&&(oe!==Ir||Re>0&&Re&64)?Ft(he,Z,se,!1,!0):(oe===Ir&&Re&384||!ye&&Le&16)&&Ft($e,Z,se),ve&&Br(z)}(Ze&&(at=Ne&&Ne.onVnodeUnmounted)||We)&&Ms(()=>{at&&zn(at,Z,z),We&&Uo(z,null,Z,"unmounted")},se)},Br=z=>{const{type:Z,el:se,anchor:ve,transition:ye}=z;if(Z===Ir){Wt(se,ve);return}if(Z===Sc){L(z);return}const oe=()=>{c(se),ye&&!ye.persisted&&ye.afterLeave&&ye.afterLeave()};if(z.shapeFlag&1&&ye&&!ye.persisted){const{leave:Ne,delayLeave:me}=ye,$e=()=>Ne(se,oe);me?me(z.el,oe,$e):$e()}else oe()},Wt=(z,Z)=>{let se;for(;z!==Z;)se=S(z),c(z),z=se;c(Z)},Ar=(z,Z,se)=>{const{bum:ve,scope:ye,update:oe,subTree:Ne,um:me}=z;ve&&kc(ve),ye.stop(),oe&&(oe.active=!1,Ye(Ne,z,Z,se)),me&&Ms(me,Z),Ms(()=>{z.isUnmounted=!0},Z),Z&&Z.pendingBranch&&!Z.isUnmounted&&z.asyncDep&&!z.asyncResolved&&z.suspenseId===Z.pendingId&&(Z.deps--,Z.deps===0&&Z.resolve())},Ft=(z,Z,se,ve=!1,ye=!1,oe=0)=>{for(let Ne=oe;Nez.shapeFlag&6?br(z.component.subTree):z.shapeFlag&128?z.suspense.next():S(z.anchor||z.el),Hr=(z,Z,se)=>{z==null?Z._vnode&&Ye(Z._vnode,null,null,!0):ee(Z._vnode||null,z,Z,null,null,null,se),Up(),Cg(),Z._vnode=z},Or={p:ee,um:Ye,m:Rt,r:Br,mt:ze,mc:J,pc:je,pbc:ue,n:br,o:t};let Rr,Dt;return r&&([Rr,Dt]=r(Or)),{render:Hr,hydrate:Rr,createApp:ly(Hr,Rr)}}function qo({effect:t,update:r},e){t.allowRecurse=r.allowRecurse=e}function dy(t,r){return(!t||t&&!t.pendingBranch)&&r&&!r.persisted}function Vg(t,r,e=!1){const n=t.children,c=r.children;if(Qe(n)&&Qe(c))for(let g=0;g>1,t[e[x]]0&&(r[n]=e[g-1]),e[g]=n)}}for(g=e.length,$=e[g-1];g-- >0;)e[g]=$,$=r[$];return e}const wy=t=>t.__isTeleport,Ir=Symbol.for("v-fgt"),dc=Symbol.for("v-txt"),mn=Symbol.for("v-cmt"),Sc=Symbol.for("v-stc"),nf=[];let Un=null;function wt(t=!1){nf.push(Un=t?null:[])}function my(){nf.pop(),Un=nf[nf.length-1]||null}let cf=1;function Yp(t){cf+=t}function Wg(t){return t.dynamicChildren=cf>0?Un||Su:null,my(),cf>0&&Un&&Un.push(t),t}function Ut(t,r,e,n,c,g){return Wg(Mt(t,r,e,n,c,g,!0))}function wi(t,r,e,n,c){return Wg(nt(t,r,e,n,c,!0))}function ec(t){return t?t.__v_isVNode===!0:!1}function Ko(t,r){return t.type===r.type&&t.key===r.key}const yc="__vInternal",Kg=({key:t})=>t??null,If=({ref:t,ref_key:r,ref_for:e})=>(typeof t=="number"&&(t=""+t),t!=null?jr(t)||us(t)||ht(t)?{i:ks,r:t,k:r,f:!!e}:t:null);function Mt(t,r=null,e=null,n=0,c=null,g=t===Ir?0:1,$=!1,x=!1){const m={__v_isVNode:!0,__v_skip:!0,type:t,props:r,key:r&&Kg(r),ref:r&&If(r),scopeId:pc,slotScopeIds:null,children:e,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:g,patchFlag:n,dynamicProps:c,dynamicChildren:null,appContext:null,ctx:ks};return x?(Yh(m,e),g&128&&t.normalize(m)):e&&(m.shapeFlag|=jr(e)?8:16),cf>0&&!$&&Un&&(m.patchFlag>0||g&6)&&m.patchFlag!==32&&Un.push(m),m}const nt=xy;function xy(t,r=null,e=null,n=0,c=null,g=!1){if((!t||t===Y0)&&(t=mn),ec(t)){const x=Ei(t,r,!0);return e&&Yh(x,e),cf>0&&!g&&Un&&(x.shapeFlag&6?Un[Un.indexOf(t)]=x:Un.push(x)),x.patchFlag|=-2,x}if(Fy(t)&&(t=t.__vccOpts),r){r=$y(r);let{class:x,style:m}=r;x&&!jr(x)&&(r.class=Tr(x)),hr(m)&&(wg(m)&&!Qe(m)&&(m=Lr({},m)),r.style=Hh(m))}const $=jr(t)?1:R0(t)?128:wy(t)?64:hr(t)?4:ht(t)?2:0;return Mt(t,r,e,n,c,$,g,!0)}function $y(t){return t?wg(t)||yc in t?Lr({},t):t:null}function Ei(t,r,e=!1){const{props:n,ref:c,patchFlag:g,children:$}=t,x=r?by(n||{},r):n;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:x,key:x&&Kg(x),ref:r&&r.ref?e&&c?Qe(c)?c.concat(If(r)):[c,If(r)]:If(r):c,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:$,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:r&&t.type!==Ir?g===-1?16:g|16:g,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Ei(t.ssContent),ssFallback:t.ssFallback&&Ei(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function It(t=" ",r=0){return nt(dc,null,t,r)}function Xn(t="",r=!1){return r?(wt(),wi(mn,null,t)):nt(mn,null,t)}function Kn(t){return t==null||typeof t=="boolean"?nt(mn):Qe(t)?nt(Ir,null,t.slice()):typeof t=="object"?yi(t):nt(dc,null,String(t))}function yi(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Ei(t)}function Yh(t,r){let e=0;const{shapeFlag:n}=t;if(r==null)r=null;else if(Qe(r))e=16;else if(typeof r=="object")if(n&65){const c=r.default;c&&(c._c&&(c._d=!1),Yh(t,c()),c._c&&(c._d=!0));return}else{e=32;const c=r._;!c&&!(yc in r)?r._ctx=ks:c===3&&ks&&(ks.slots._===1?r._=1:(r._=2,t.patchFlag|=1024))}else ht(r)?(r={default:r,_ctx:ks},e=32):(r=String(r),n&64?(e=16,r=[It(r)]):e=8);t.children=r,t.shapeFlag|=e}function by(...t){const r={};for(let e=0;ees||ks;let ep,_u,ev="__VUE_INSTANCE_SETTERS__";(_u=Zc()[ev])||(_u=Zc()[ev]=[]),_u.push(t=>es=t),ep=t=>{_u.length>1?_u.forEach(r=>r(t)):_u[0](t)};const Ku=t=>{ep(t),t.scope.on()},tu=()=>{es&&es.scope.off(),ep(null)};function Jg(t){return t.vnode.shapeFlag&4}let hf=!1;function Py(t,r=!1){hf=r;const{props:e,children:n}=t.vnode,c=Jg(t);uy(t,e,c,r),hy(t,n);const g=c?Ey(t,r):void 0;return hf=!1,g}function Ey(t,r){const e=t.type;t.accessCache=Object.create(null),t.proxy=mg(new Proxy(t.ctx,ey));const{setup:n}=e;if(n){const c=t.setupContext=n.length>1?Sy(t):null;Ku(t),Zu();const g=Ci(n,t,0,[t.props,c]);if(Qu(),tu(),tg(g)){if(g.then(tu,tu),r)return g.then($=>{tv(t,$,r)}).catch($=>{cc($,t,0)});t.asyncDep=g}else tv(t,g,r)}else Xg(t,r)}function tv(t,r,e){ht(r)?t.type.__ssrInlineRender?t.ssrRender=r:t.render=r:hr(r)&&(t.setupState=bg(r)),Xg(t,e)}let rv;function Xg(t,r,e){const n=t.type;if(!t.render){if(!r&&rv&&!n.render){const c=n.template||Zh(t).template;if(c){const{isCustomElement:g,compilerOptions:$}=t.appContext.config,{delimiters:x,compilerOptions:m}=n,A=Lr(Lr({isCustomElement:g,delimiters:x},$),m);n.render=rv(c,A)}}t.render=n.render||qn}{Ku(t),Zu();try{ty(t)}finally{Qu(),tu()}}}function My(t){return t.attrsProxy||(t.attrsProxy=new Proxy(t.attrs,{get(r,e){return Ss(t,"get","$attrs"),r[e]}}))}function Sy(t){const r=e=>{t.exposed=e||{}};return{get attrs(){return My(t)},slots:t.slots,emit:t.emit,expose:r}}function tp(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(bg(mg(t.exposed)),{get(r,e){if(e in r)return r[e];if(e in sf)return sf[e](t)},has(r,e){return e in r||e in sf}}))}function Fy(t){return ht(t)&&"__vccOpts"in t}const Oy=(t,r)=>C0(t,r,hf);function hi(t,r,e){const n=arguments.length;return n===2?hr(r)&&!Qe(r)?ec(r)?nt(t,null,[r]):nt(t,r):nt(t,null,r):(n>3?e=Array.prototype.slice.call(arguments,2):n===3&&ec(e)&&(e=[e]),nt(t,r,e))}const Ny=Symbol.for("v-scx"),Iy=()=>Nf(Ny),Ty="3.3.7",jy="http://www.w3.org/2000/svg",Jo=typeof document<"u"?document:null,sv=Jo&&Jo.createElement("template"),Ry={insert:(t,r,e)=>{r.insertBefore(t,e||null)},remove:t=>{const r=t.parentNode;r&&r.removeChild(t)},createElement:(t,r,e,n)=>{const c=r?Jo.createElementNS(jy,t):Jo.createElement(t,e?{is:e}:void 0);return t==="select"&&n&&n.multiple!=null&&c.setAttribute("multiple",n.multiple),c},createText:t=>Jo.createTextNode(t),createComment:t=>Jo.createComment(t),setText:(t,r)=>{t.nodeValue=r},setElementText:(t,r)=>{t.textContent=r},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Jo.querySelector(t),setScopeId(t,r){t.setAttribute(r,"")},insertStaticContent(t,r,e,n,c,g){const $=e?e.previousSibling:r.lastChild;if(c&&(c===g||c.nextSibling))for(;r.insertBefore(c.cloneNode(!0),e),!(c===g||!(c=c.nextSibling)););else{sv.innerHTML=n?`${t}`:t;const x=sv.content;if(n){const m=x.firstChild;for(;m.firstChild;)x.appendChild(m.firstChild);x.removeChild(m)}r.insertBefore(x,e)}return[$?$.nextSibling:r.firstChild,e?e.previousSibling:r.lastChild]}},fi="transition",Yu="animation",pf=Symbol("_vtc"),rp=(t,{slots:r})=>hi(U0,Dy(t),r);rp.displayName="Transition";const Gg={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};rp.props=Lr({},Sg,Gg);const zo=(t,r=[])=>{Qe(t)?t.forEach(e=>e(...r)):t&&t(...r)},nv=t=>t?Qe(t)?t.some(r=>r.length>1):t.length>1:!1;function Dy(t){const r={};for(const le in t)le in Gg||(r[le]=t[le]);if(t.css===!1)return r;const{name:e="v",type:n,duration:c,enterFromClass:g=`${e}-enter-from`,enterActiveClass:$=`${e}-enter-active`,enterToClass:x=`${e}-enter-to`,appearFromClass:m=g,appearActiveClass:A=$,appearToClass:C=x,leaveFromClass:P=`${e}-leave-from`,leaveActiveClass:S=`${e}-leave-active`,leaveToClass:I=`${e}-leave-to`}=t,G=Ly(c),ee=G&&G[0],re=G&&G[1],{onBeforeEnter:ge,onEnter:q,onEnterCancelled:U,onLeave:L,onLeaveCancelled:H,onBeforeAppear:W=ge,onAppear:V=q,onAppearCancelled:J=U}=r,Y=(le,Ie,ze)=>{Vo(le,Ie?C:x),Vo(le,Ie?A:$),ze&&ze()},ue=(le,Ie)=>{le._isLeaving=!1,Vo(le,P),Vo(le,I),Vo(le,S),Ie&&Ie()},de=le=>(Ie,ze)=>{const mt=le?V:q,Ke=()=>Y(Ie,le,ze);zo(mt,[Ie,Ke]),av(()=>{Vo(Ie,le?m:g),ci(Ie,le?C:x),nv(mt)||iv(Ie,n,ee,Ke)})};return Lr(r,{onBeforeEnter(le){zo(ge,[le]),ci(le,g),ci(le,$)},onBeforeAppear(le){zo(W,[le]),ci(le,m),ci(le,A)},onEnter:de(!1),onAppear:de(!0),onLeave(le,Ie){le._isLeaving=!0;const ze=()=>ue(le,Ie);ci(le,P),Uy(),ci(le,S),av(()=>{le._isLeaving&&(Vo(le,P),ci(le,I),nv(L)||iv(le,n,re,ze))}),zo(L,[le,ze])},onEnterCancelled(le){Y(le,!1),zo(U,[le])},onAppearCancelled(le){Y(le,!0),zo(J,[le])},onLeaveCancelled(le){ue(le),zo(H,[le])}})}function Ly(t){if(t==null)return null;if(hr(t))return[Fc(t.enter),Fc(t.leave)];{const r=Fc(t);return[r,r]}}function Fc(t){return zd(t)}function ci(t,r){r.split(/\s+/).forEach(e=>e&&t.classList.add(e)),(t[pf]||(t[pf]=new Set)).add(r)}function Vo(t,r){r.split(/\s+/).forEach(n=>n&&t.classList.remove(n));const e=t[pf];e&&(e.delete(r),e.size||(t[pf]=void 0))}function av(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let By=0;function iv(t,r,e,n){const c=t._endId=++By,g=()=>{c===t._endId&&n()};if(e)return setTimeout(g,e);const{type:$,timeout:x,propCount:m}=Hy(t,r);if(!$)return n();const A=$+"end";let C=0;const P=()=>{t.removeEventListener(A,S),g()},S=I=>{I.target===t&&++C>=m&&P()};setTimeout(()=>{C(e[G]||"").split(", "),c=n(`${fi}Delay`),g=n(`${fi}Duration`),$=lv(c,g),x=n(`${Yu}Delay`),m=n(`${Yu}Duration`),A=lv(x,m);let C=null,P=0,S=0;r===fi?$>0&&(C=fi,P=$,S=g.length):r===Yu?A>0&&(C=Yu,P=A,S=m.length):(P=Math.max($,A),C=P>0?$>A?fi:Yu:null,S=C?C===fi?g.length:m.length:0);const I=C===fi&&/\b(transform|all)(,|$)/.test(n(`${fi}Property`).toString());return{type:C,timeout:P,propCount:S,hasTransform:I}}function lv(t,r){for(;t.lengthov(e)+ov(t[n])))}function ov(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Uy(){return document.body.offsetHeight}function qy(t,r,e){const n=t[pf];n&&(r=(r?[r,...n]:[...n]).join(" ")),r==null?t.removeAttribute("class"):e?t.setAttribute("class",r):t.className=r}const zy=Symbol("_vod");function Vy(t,r,e){const n=t.style,c=jr(e);if(e&&!c){if(r&&!jr(r))for(const g in r)e[g]==null&&fh(n,g,"");for(const g in e)fh(n,g,e[g])}else{const g=n.display;c?r!==e&&(n.cssText=e):r&&t.removeAttribute("style"),zy in t&&(n.display=g)}}const uv=/\s*!important$/;function fh(t,r,e){if(Qe(e))e.forEach(n=>fh(t,r,n));else if(e==null&&(e=""),r.startsWith("--"))t.setProperty(r,e);else{const n=Wy(t,r);uv.test(e)?t.setProperty(Gu(n),e.replace(uv,""),"important"):t[n]=e}}const fv=["Webkit","Moz","ms"],Oc={};function Wy(t,r){const e=Oc[r];if(e)return e;let n=Vu(r);if(n!=="filter"&&n in t)return Oc[r]=n;n=ng(n);for(let c=0;cNc||(Yy.then(()=>Nc=0),Nc=Date.now());function tw(t,r){const e=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=e.attached)return;wn(rw(n,e.value),r,5,[n])};return e.value=t,e.attached=ew(),e}function rw(t,r){if(Qe(r)){const e=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{e.call(t),t._stopped=!0},r.map(n=>c=>!c._stopped&&n&&n(c))}else return r}const vv=/^on[a-z]/,sw=(t,r,e,n,c=!1,g,$,x,m)=>{r==="class"?qy(t,n,c):r==="style"?Vy(t,e,n):ic(r)?Dh(r)||Zy(t,r,e,n,$):(r[0]==="."?(r=r.slice(1),!0):r[0]==="^"?(r=r.slice(1),!1):nw(t,r,n,c))?Jy(t,r,n,g,$,x,m):(r==="true-value"?t._trueValue=n:r==="false-value"&&(t._falseValue=n),Ky(t,r,n,c))};function nw(t,r,e,n){return n?!!(r==="innerHTML"||r==="textContent"||r in t&&vv.test(r)&&ht(e)):r==="spellcheck"||r==="draggable"||r==="translate"||r==="form"||r==="list"&&t.tagName==="INPUT"||r==="type"&&t.tagName==="TEXTAREA"||vv.test(r)&&jr(e)?!1:r in t}const aw=Lr({patchProp:sw},Ry);let gv;function iw(){return gv||(gv=vy(aw))}const lw=(...t)=>{const r=iw().createApp(...t),{mount:e}=r;return r.mount=n=>{const c=ow(n);if(!c)return;const g=r._component;!ht(g)&&!g.render&&!g.template&&(g.template=c.innerHTML),c.innerHTML="";const $=e(c,!1,c instanceof SVGElement);return c instanceof Element&&(c.removeAttribute("v-cloak"),c.setAttribute("data-v-app","")),$},r};function ow(t){return jr(t)?document.querySelector(t):t}const uw={key:0},fw=["onClick"],cw={key:1},hw=["onClick"],pw=si({__name:"MenuButton",props:{options:{}},emits:["select"],setup(t,{emit:r}){const e=wr(!1),n=r;return(c,g)=>(wt(),Ut("div",{class:Tr(c.$style.wrapper)},[Mt("button",{onClick:g[0]||(g[0]=$=>e.value=!e.value)},[Of(c.$slots,"default")]),nt(rp,null,{default:ot(()=>[e.value?(wt(),Ut("div",{key:0,class:Tr(c.$style.menu)},[c.options instanceof Array?(wt(),Ut("div",uw,[(wt(!0),Ut(Ir,null,fu(c.options,$=>(wt(),Ut("div",{class:Tr(c.$style.opt),onClick:x=>{e.value=!1,n("select",$)}},Dr($),11,fw))),256))])):(wt(),Ut("div",cw,[(wt(!0),Ut(Ir,null,fu(Object.keys(c.options),$=>(wt(),Ut("div",{class:Tr(c.$style.opt),onClick:x=>{e.value=!1,n("select",$)}},Dr(c.options[$]),11,hw))),256))]))],2)):Xn("",!0)]),_:1})],2))}}),vw="_wrapper_k2i3y_2",gw="_menu_k2i3y_5",dw="_opt_k2i3y_12",yw={wrapper:vw,menu:gw,opt:dw},ai=(t,r)=>{const e=t.__vccOpts||t;for(const[n,c]of r)e[n]=c;return e},ww={$style:yw},Zg=ai(pw,[["__cssModules",ww]]);function vr(t,r,e){let n=e.value;return{configurable:!0,get(){const c=n.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,value:c}),c},set(c){n=c}}}let Ju=class Qg extends Error{constructor(e,n){super(e);be(this,"name","AiScript");be(this,"info");be(this,"loc");this.info=n,Error.captureStackTrace&&Error.captureStackTrace(this,Qg)}},dv=class extends Ju{constructor(e){super(e.message??`${e}`,e);be(this,"name","Internal")}},yt=class extends Ju{constructor(e,n,c){super(`${e} (Line ${n.line}, Column ${n.column})`,c);be(this,"loc");be(this,"name","Syntax");this.loc=n}};class yv extends Ju{constructor(e,n,c){super(`${e} (Line ${n.line}, Column ${n.column})`,c);be(this,"loc");be(this,"name","Namespace");this.loc=n}}let er=class extends Ju{constructor(e,n){super(e,n);be(this,"name","Runtime")}},mw=class extends er{constructor(r,e){super(r,e)}};var Si=globalThis&&globalThis.__decorate||function(t,r,e,n){var c=arguments.length,g=c<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(t,r,e,n);else for(var x=t.length-1;x>=0;x--)($=t[x])&&(g=(c<3?$(g):c>3?$(r,e,g):$(r,e))||g);return c>3&&g&&Object.defineProperty(r,e,g),g};let ii=class Yg{constructor(r=[],e,n){be(this,"parent");be(this,"layerdStates");be(this,"name");be(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=n||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const n=[r,...this.layerdStates];return new Yg(n,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const n=e.get(r).value;return this.log("read",{var:r,val:n}),n}throw new er(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}exists(r){for(const e of this.layerdStates)if(e.has(r))return this.log("exists",{var:r}),!0;return this.log("not exists",{var:r}),!1}getAll(){const r=this.layerdStates.reduce((e,n)=>[...e,...n],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const n=this.layerdStates[0];if(n.has(r))throw new er(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(r,e),this.parent==null&&this.onUpdated(r,e.value)}assign(r,e){let n=1;for(const c of this.layerdStates){if(c.has(r)){const g=c.get(r);if(!g.isMutable)throw new er(`Cannot assign to an immutable variable ${r}.`);g.value=e,this.log("assign",{var:r,val:e}),n===this.layerdStates.length&&this.onUpdated(r,e);return}n++}throw new er(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}};Si([vr],ii.prototype,"log",null);Si([vr],ii.prototype,"onUpdated",null);Si([vr],ii.prototype,"createChildScope",null);Si([vr],ii.prototype,"get",null);Si([vr],ii.prototype,"exists",null);Si([vr],ii.prototype,"getAll",null);Si([vr],ii.prototype,"add",null);Si([vr],ii.prototype,"assign",null);let Cf;const xw=new Uint8Array(16);function $w(){if(!Cf&&(Cf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cf(xw)}const Xr=[];for(let t=0;t<256;++t)Xr.push((t+256).toString(16).slice(1));function bw(t,r=0){return Xr[t[r+0]]+Xr[t[r+1]]+Xr[t[r+2]]+Xr[t[r+3]]+"-"+Xr[t[r+4]]+Xr[t[r+5]]+"-"+Xr[t[r+6]]+Xr[t[r+7]]+"-"+Xr[t[r+8]]+Xr[t[r+9]]+"-"+Xr[t[r+10]]+Xr[t[r+11]]+Xr[t[r+12]]+Xr[t[r+13]]+Xr[t[r+14]]+Xr[t[r+15]]}const Aw=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),wv={randomUUID:Aw};function _w(t,r,e){if(wv.randomUUID&&!r&&!t)return wv.randomUUID();t=t||{};const n=t.random||(t.rng||$w)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){e=e||0;for(let c=0;c<16;++c)r[e+c]=n[c];return r}return bw(n)}var Tt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sp(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Cw(t){if(t.__esModule)return t;var r=t.default;if(typeof r=="function"){var e=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};e.prototype=r.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var c=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,c.get?c:{enumerable:!0,get:function(){return t[n]}})}),e}var np={exports:{}};np.exports;(function(t){(function(r,e,n){function c(m){var A=this,C=x();A.next=function(){var P=2091639*A.s0+A.c*23283064365386963e-26;return A.s0=A.s1,A.s1=A.s2,A.s2=P-(A.c=P|0)},A.c=1,A.s0=C(" "),A.s1=C(" "),A.s2=C(" "),A.s0-=C(m),A.s0<0&&(A.s0+=1),A.s1-=C(m),A.s1<0&&(A.s1+=1),A.s2-=C(m),A.s2<0&&(A.s2+=1),C=null}function g(m,A){return A.c=m.c,A.s0=m.s0,A.s1=m.s1,A.s2=m.s2,A}function $(m,A){var C=new c(m),P=A&&A.state,S=C.next;return S.int32=function(){return C.next()*4294967296|0},S.double=function(){return S()+(S()*2097152|0)*11102230246251565e-32},S.quick=S,P&&(typeof P=="object"&&g(P,C),S.state=function(){return g(C,{})}),S}function x(){var m=4022871197,A=function(C){C=String(C);for(var P=0;P>>0,S-=m,S*=m,m=S>>>0,S-=m,m+=S*4294967296}return(m>>>0)*23283064365386963e-26};return A}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.alea=$})(Tt,t,!1)})(np);var kw=np.exports,ap={exports:{}};ap.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.x=0,m.y=0,m.z=0,m.w=0,m.next=function(){var P=m.x^m.x<<11;return m.x=m.y,m.y=m.z,m.z=m.w,m.w^=m.w>>>19^P^P>>>8},x===(x|0)?m.x=x:A+=x;for(var C=0;C>>0)/4294967296};return P.double=function(){do var S=A.next()>>>11,I=(A.next()>>>0)/4294967296,G=(S+I)/(1<<21);while(G===0);return G},P.int32=A.next,P.quick=P,C&&(typeof C=="object"&&g(C,A),P.state=function(){return g(A,{})}),P}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xor128=$})(Tt,t,!1)})(ap);var Pw=ap.exports,ip={exports:{}};ip.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.next=function(){var P=m.x^m.x>>>2;return m.x=m.y,m.y=m.z,m.z=m.w,m.w=m.v,(m.d=m.d+362437|0)+(m.v=m.v^m.v<<4^(P^P<<1))|0},m.x=0,m.y=0,m.z=0,m.w=0,m.v=0,x===(x|0)?m.x=x:A+=x;for(var C=0;C>>4),m.next()}function g(x,m){return m.x=x.x,m.y=x.y,m.z=x.z,m.w=x.w,m.v=x.v,m.d=x.d,m}function $(x,m){var A=new c(x),C=m&&m.state,P=function(){return(A.next()>>>0)/4294967296};return P.double=function(){do var S=A.next()>>>11,I=(A.next()>>>0)/4294967296,G=(S+I)/(1<<21);while(G===0);return G},P.int32=A.next,P.quick=P,C&&(typeof C=="object"&&g(C,A),P.state=function(){return g(A,{})}),P}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xorwow=$})(Tt,t,!1)})(ip);var Ew=ip.exports,lp={exports:{}};lp.exports;(function(t){(function(r,e,n){function c(x){var m=this;m.next=function(){var C=m.x,P=m.i,S,I;return S=C[P],S^=S>>>7,I=S^S<<24,S=C[P+1&7],I^=S^S>>>10,S=C[P+3&7],I^=S^S>>>3,S=C[P+4&7],I^=S^S<<7,S=C[P+7&7],S=S^S<<13,I^=S^S<<9,C[P]=I,m.i=P+1&7,I};function A(C,P){var S,I=[];if(P===(P|0))I[0]=P;else for(P=""+P,S=0;S0;--S)C.next()}A(m,x)}function g(x,m){return m.x=x.x.slice(),m.i=x.i,m}function $(x,m){x==null&&(x=+new Date);var A=new c(x),C=m&&m.state,P=function(){return(A.next()>>>0)/4294967296};return P.double=function(){do var S=A.next()>>>11,I=(A.next()>>>0)/4294967296,G=(S+I)/(1<<21);while(G===0);return G},P.int32=A.next,P.quick=P,C&&(C.x&&g(C,A),P.state=function(){return g(A,{})}),P}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xorshift7=$})(Tt,t,!1)})(lp);var Mw=lp.exports,op={exports:{}};op.exports;(function(t){(function(r,e,n){function c(x){var m=this;m.next=function(){var C=m.w,P=m.X,S=m.i,I,G;return m.w=C=C+1640531527|0,G=P[S+34&127],I=P[S=S+1&127],G^=G<<13,I^=I<<17,G^=G>>>15,I^=I>>>12,G=P[S]=G^I,m.i=S,G+(C^C>>>16)|0};function A(C,P){var S,I,G,ee,re,ge=[],q=128;for(P===(P|0)?(I=P,P=null):(P=P+"\0",I=0,q=Math.max(q,P.length)),G=0,ee=-32;ee>>15,I^=I<<4,I^=I>>>13,ee>=0&&(re=re+1640531527|0,S=ge[ee&127]^=I+re,G=S==0?G+1:0);for(G>=128&&(ge[(P&&P.length||0)&127]=-1),G=127,ee=4*128;ee>0;--ee)I=ge[G+34&127],S=ge[G=G+1&127],I^=I<<13,S^=S<<17,I^=I>>>15,S^=S>>>12,ge[G]=I^S;C.w=re,C.X=ge,C.i=G}A(m,x)}function g(x,m){return m.i=x.i,m.w=x.w,m.X=x.X.slice(),m}function $(x,m){x==null&&(x=+new Date);var A=new c(x),C=m&&m.state,P=function(){return(A.next()>>>0)/4294967296};return P.double=function(){do var S=A.next()>>>11,I=(A.next()>>>0)/4294967296,G=(S+I)/(1<<21);while(G===0);return G},P.int32=A.next,P.quick=P,C&&(C.X&&g(C,A),P.state=function(){return g(A,{})}),P}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xor4096=$})(Tt,t,!1)})(op);var Sw=op.exports,up={exports:{}};up.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.next=function(){var P=m.b,S=m.c,I=m.d,G=m.a;return P=P<<25^P>>>7^S,S=S-I|0,I=I<<24^I>>>8^G,G=G-P|0,m.b=P=P<<20^P>>>12^S,m.c=S=S-I|0,m.d=I<<16^S>>>16^G,m.a=G-P|0},m.a=0,m.b=0,m.c=-1640531527,m.d=1367130551,x===Math.floor(x)?(m.a=x/4294967296|0,m.b=x|0):A+=x;for(var C=0;C>>0)/4294967296};return P.double=function(){do var S=A.next()>>>11,I=(A.next()>>>0)/4294967296,G=(S+I)/(1<<21);while(G===0);return G},P.int32=A.next,P.quick=P,C&&(typeof C=="object"&&g(C,A),P.state=function(){return g(A,{})}),P}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.tychei=$})(Tt,t,!1)})(up);var Fw=up.exports,ed={exports:{}};const Ow={},Nw=Object.freeze(Object.defineProperty({__proto__:null,default:Ow},Symbol.toStringTag,{value:"Module"})),fp=Cw(Nw);(function(t){(function(r,e,n){var c=256,g=6,$=52,x="random",m=n.pow(c,g),A=n.pow(2,$),C=A*2,P=c-1,S;function I(L,H,W){var V=[];H=H==!0?{entropy:!0}:H||{};var J=ge(re(H.entropy?[L,U(e)]:L??q(),3),V),Y=new G(V),ue=function(){for(var de=Y.g(g),le=m,Ie=0;de=C;)de/=2,le/=2,Ie>>>=1;return(de+Ie)/le};return ue.int32=function(){return Y.g(4)|0},ue.quick=function(){return Y.g(4)/4294967296},ue.double=ue,ge(U(Y.S),e),(H.pass||W||function(de,le,Ie,ze){return ze&&(ze.S&&ee(ze,Y),de.state=function(){return ee(Y,{})}),Ie?(n[x]=de,le):de})(ue,J,"global"in H?H.global:this==n,H.state)}function G(L){var H,W=L.length,V=this,J=0,Y=V.i=V.j=0,ue=V.S=[];for(W||(L=[W++]);J({type:"num",value:t}),Zt=t=>({type:"str",value:t}),ru=t=>({type:"bool",value:t}),tc=t=>({type:"obj",value:t}),ss=t=>({type:"arr",value:t}),qw=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),fe=t=>({type:"fn",native:t}),zw=t=>({type:"return",value:t}),Vw=()=>({type:"break",value:null}),Ww=()=>({type:"continue",value:null}),Kw=t=>t.type==="return"?t.value:t,ch=(t,r)=>({type:"error",value:t,info:r});function nn(t){if(t==null)throw new er("Expect anything, but got nothing.")}function $s(t){if(t==null)throw new er("Expect boolean, but got nothing.");if(t.type!=="bool")throw new er(`Expect boolean, but got ${t.type}.`)}function mi(t){if(t==null)throw new er("Expect function, but got nothing.");if(t.type!=="fn")throw new er(`Expect function, but got ${t.type}.`)}function Mr(t){if(t==null)throw new er("Expect string, but got nothing.");if(t.type!=="str")throw new er(`Expect string, but got ${t.type}.`)}function _e(t){if(t==null)throw new er("Expect number, but got nothing.");if(t.type!=="num")throw new er(`Expect number, but got ${t.type}.`)}function Vn(t){if(t==null)throw new er("Expect object, but got nothing.");if(t.type!=="obj")throw new er(`Expect object, but got ${t.type}.`)}function rc(t){if(t==null)throw new er("Expect array, but got nothing.");if(t.type!=="arr")throw new er(`Expect array, but got ${t.type}.`)}function Ic(t){return t.type==="obj"}function mv(t){return t.type==="arr"}function hh(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function ph(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(n=>ph(n,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function vh(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>vh(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,n]of t.value.entries())r[e]=vh(n);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function gh(t){if(t===null)return kt;if(typeof t=="boolean")return ru(t);if(typeof t=="string")return Zt(t);if(typeof t=="number")return Me(t);if(Array.isArray(t))return ss(t.map(r=>gh(r)));if(typeof t=="object"){const r=new Map;for(const[e,n]of Object.entries(t))r.set(e,gh(n));return tc(r)}return kt}function Iu(t,r=!1,e=new Set){if((t.type==="arr"||t.type==="obj")&&e.has(t.value))return"...";if(r&&t.type==="str")return'"'+t.value.replace(/["\\\r\n]/g,n=>`\\${n}`)+'"';if(t.type==="str")return t.value;if(t.type==="num")return t.value.toString();if(t.type==="arr"){e.add(t.value);const n=[];for(const c of t.value)n.push(Iu(c,!0,e));return"[ "+n.join(", ")+" ]"}if(t.type==="obj"){e.add(t.value);const n=[];for(const[c,g]of t.value)n.push(`${c}: ${Iu(g,!0,e)}`);return"{ "+n.join(", ")+" }"}return t.type==="bool"?t.value.toString():t.type==="null"?"null":t.type==="fn"?`@( ${(t.args??[]).join(", ")} ) { ... }`:"?"}const Jw={help:Zt("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":Zt("0.16.0"),"Core:ai":Zt("kawaii"),"Core:not":fe(([t])=>($s(t),t.value?Ys:pn)),"Core:eq":fe(([t,r])=>(nn(t),nn(r),hh(t,r)?pn:Ys)),"Core:neq":fe(([t,r])=>(nn(t),nn(r),hh(t,r)?Ys:pn)),"Core:and":fe(([t,r])=>($s(t),t.value?($s(r),r.value?pn:Ys):Ys)),"Core:or":fe(([t,r])=>($s(t),t.value?pn:($s(r),r.value?pn:Ys))),"Core:add":fe(([t,r])=>(_e(t),_e(r),Me(t.value+r.value))),"Core:sub":fe(([t,r])=>(_e(t),_e(r),Me(t.value-r.value))),"Core:mul":fe(([t,r])=>(_e(t),_e(r),Me(t.value*r.value))),"Core:pow":fe(([t,r])=>{_e(t),_e(r);const e=t.value**r.value;if(isNaN(e))throw new er("Invalid operation.");return Me(e)}),"Core:div":fe(([t,r])=>{_e(t),_e(r);const e=t.value/r.value;if(isNaN(e))throw new er("Invalid operation.");return Me(e)}),"Core:mod":fe(([t,r])=>(_e(t),_e(r),Me(t.value%r.value))),"Core:gt":fe(([t,r])=>(_e(t),_e(r),t.value>r.value?pn:Ys)),"Core:lt":fe(([t,r])=>(_e(t),_e(r),t.value(_e(t),_e(r),t.value>=r.value?pn:Ys)),"Core:lteq":fe(([t,r])=>(_e(t),_e(r),t.value<=r.value?pn:Ys)),"Core:type":fe(([t])=>(nn(t),Zt(t.type))),"Core:to_str":fe(([t])=>(nn(t),Zt(Iu(t)))),"Core:range":fe(([t,r])=>(_e(t),_e(r),t.valueMe(n+t.value))):t.value>r.value?ss(Array.from({length:t.value-r.value+1},(e,n)=>Me(t.value-n))):ss([t]))),"Core:sleep":fe(async([t])=>(_e(t),await new Promise(r=>setTimeout(r,t.value)),kt)),"Util:uuid":fe(()=>Zt(_w())),"Json:stringify":fe(([t])=>(nn(t),Zt(JSON.stringify(vh(t))))),"Json:parse":fe(([t])=>{Mr(t);try{return gh(JSON.parse(t.value))}catch{return ch("not_json")}}),"Json:parsable":fe(([t])=>{Mr(t);try{JSON.parse(t.value)}catch{return ru(!1)}return ru(!0)}),"Date:now":fe(()=>Me(Date.now())),"Date:year":fe(([t])=>(t&&_e(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":fe(([t])=>(t&&_e(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":fe(([t])=>(t&&_e(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":fe(([t])=>(t&&_e(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":fe(([t])=>(t&&_e(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":fe(([t])=>(t&&_e(t),Me(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":fe(([t])=>(Mr(t),Me(new Date(t.value).getTime()))),"Math:Infinity":Me(1/0),"Math:E":Me(Math.E),"Math:LN2":Me(Math.LN2),"Math:LN10":Me(Math.LN10),"Math:LOG2E":Me(Math.LOG2E),"Math:LOG10E":Me(Math.LOG10E),"Math:PI":Me(Math.PI),"Math:SQRT1_2":Me(Math.SQRT1_2),"Math:SQRT2":Me(Math.SQRT2),"Math:abs":fe(([t])=>(_e(t),Me(Math.abs(t.value)))),"Math:acos":fe(([t])=>(_e(t),Me(Math.acos(t.value)))),"Math:acosh":fe(([t])=>(_e(t),Me(Math.acosh(t.value)))),"Math:asin":fe(([t])=>(_e(t),Me(Math.asin(t.value)))),"Math:asinh":fe(([t])=>(_e(t),Me(Math.asinh(t.value)))),"Math:atan":fe(([t])=>(_e(t),Me(Math.atan(t.value)))),"Math:atanh":fe(([t])=>(_e(t),Me(Math.atanh(t.value)))),"Math:atan2":fe(([t,r])=>(_e(t),_e(r),Me(Math.atan2(t.value,r.value)))),"Math:cbrt":fe(([t])=>(_e(t),Me(Math.cbrt(t.value)))),"Math:ceil":fe(([t])=>(_e(t),Me(Math.ceil(t.value)))),"Math:clz32":fe(([t])=>(_e(t),Me(Math.clz32(t.value)))),"Math:cos":fe(([t])=>(_e(t),Me(Math.cos(t.value)))),"Math:cosh":fe(([t])=>(_e(t),Me(Math.cosh(t.value)))),"Math:exp":fe(([t])=>(_e(t),Me(Math.exp(t.value)))),"Math:expm1":fe(([t])=>(_e(t),Me(Math.expm1(t.value)))),"Math:floor":fe(([t])=>(_e(t),Me(Math.floor(t.value)))),"Math:fround":fe(([t])=>(_e(t),Me(Math.fround(t.value)))),"Math:hypot":fe(([t])=>{rc(t);const r=[];for(const e of t.value)_e(e),r.push(e.value);return Me(Math.hypot(...r))}),"Math:imul":fe(([t,r])=>(_e(t),_e(r),Me(Math.imul(t.value,r.value)))),"Math:log":fe(([t])=>(_e(t),Me(Math.log(t.value)))),"Math:log1p":fe(([t])=>(_e(t),Me(Math.log1p(t.value)))),"Math:log10":fe(([t])=>(_e(t),Me(Math.log10(t.value)))),"Math:log2":fe(([t])=>(_e(t),Me(Math.log2(t.value)))),"Math:max":fe(([t,r])=>(_e(t),_e(r),Me(Math.max(t.value,r.value)))),"Math:min":fe(([t,r])=>(_e(t),_e(r),Me(Math.min(t.value,r.value)))),"Math:pow":fe(([t,r])=>(_e(t),_e(r),Me(Math.pow(t.value,r.value)))),"Math:round":fe(([t])=>(_e(t),Me(Math.round(t.value)))),"Math:sign":fe(([t])=>(_e(t),Me(Math.sign(t.value)))),"Math:sin":fe(([t])=>(_e(t),Me(Math.sin(t.value)))),"Math:sinh":fe(([t])=>(_e(t),Me(Math.sinh(t.value)))),"Math:sqrt":fe(([t])=>{_e(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new er("Invalid operation.");return Me(r)}),"Math:tan":fe(([t])=>(_e(t),Me(Math.tan(t.value)))),"Math:tanh":fe(([t])=>(_e(t),Me(Math.tanh(t.value)))),"Math:trunc":fe(([t])=>(_e(t),Me(Math.trunc(t.value)))),"Math:rnd":fe(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?Me(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):Me(Math.random())),"Math:gen_rng":fe(([t])=>{if(nn(t),t.type!=="num"&&t.type!=="str")return kt;const r=Uw(t.value.toString());return fe(([e,n])=>e&&e.type==="num"&&n&&n.type==="num"?Me(Math.floor(r()*(Math.floor(n.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):Me(r()))}),"Num:to_hex":fe(([t])=>(_e(t),Zt(t.value.toString(16)))),"Num:from_hex":fe(([t])=>(Mr(t),Me(parseInt(t.value,16)))),"Str:lf":Zt(` +`),"Str:lt":fe(([t,r])=>(Mr(t),Mr(r),t.value(Mr(t),Mr(r),t.value>r.value?Me(-1):t.value===r.value?Me(0):Me(1))),"Str:from_codepoint":fe(([t])=>(_e(t),Zt(String.fromCodePoint(t.value)))),"Obj:keys":fe(([t])=>(Vn(t),ss(Array.from(t.value.keys()).map(r=>Zt(r))))),"Obj:vals":fe(([t])=>(Vn(t),ss(Array.from(t.value.values())))),"Obj:kvs":fe(([t])=>(Vn(t),ss(Array.from(t.value.entries()).map(([r,e])=>ss([Zt(r),e]))))),"Obj:get":fe(([t,r])=>(Vn(t),Mr(r),t.value.get(r.value)??kt)),"Obj:set":fe(([t,r,e])=>(Vn(t),Mr(r),nn(e),t.value.set(r.value,e),kt)),"Obj:has":fe(([t,r])=>(Vn(t),Mr(r),ru(t.value.has(r.value)))),"Obj:copy":fe(([t])=>(Vn(t),tc(new Map(t.value)))),"Obj:merge":fe(([t,r])=>(Vn(t),Vn(r),tc(new Map([...t.value,...r.value])))),"Error:create":fe(([t,r])=>(Mr(t),ch(t.value,r))),"Async:interval":fe(async([t,r,e],n)=>{_e(t),mi(r),e&&($s(e),e.value&&n.call(r,[]));const c=setInterval(()=>{n.topCall(r,[])},t.value),g=()=>{clearInterval(c)};return n.registerAbortHandler(g),fe(([],$)=>{clearInterval(c),$.unregisterAbortHandler(g)})}),"Async:timeout":fe(async([t,r],e)=>{_e(t),mi(r);const n=setTimeout(()=>{e.topCall(r,[])},t.value),c=()=>{clearTimeout(n)};return e.registerAbortHandler(c),fe(([],g)=>{clearTimeout(n),g.unregisterAbortHandler(c)})})};var yu={},Xw=()=>{const t="\\ud800-\\udfff",r="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",c="\\u1ab0-\\u1aff",g="\\u1dc0-\\u1dff",$=r+e+n+c+g,x="\\ufe0e\\ufe0f",m="\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93",A=`[${t}]`,C=`[${$}]`,P="\\ud83c[\\udffb-\\udfff]",S=`(?:${C}|${P})`,I=`[^${t}]`,G="(?:\\uD83C[\\uDDE6-\\uDDFF]){2}",ee="[\\ud800-\\udbff][\\udc00-\\udfff]",re="\\u200d",ge="(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)",q=`[${m}]`,U=`${S}?`,L=`[${x}]?`,H=`(?:${re}(?:${[I,G,ee].join("|")})${L+U})*`,W=L+U+H,J=`(?:${[`${I}${C}?`,C,G,ee,A,q].join("|")})`;return new RegExp(`${ge}|${P}(?=${P})|${J+W}`,"g")},Gw=Tt&&Tt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(yu,"__esModule",{value:!0});var wc=Gw(Xw);function dh(t){if(typeof t!="string")throw new Error("A string is expected as input");return t.match(wc.default())||[]}var xv=yu.toArray=dh;function cp(t){if(typeof t!="string")throw new Error("Input must be a string");var r=t.match(wc.default());return r===null?0:r.length}var Zw=yu.length=cp;function td(t,r,e){if(r===void 0&&(r=0),typeof t!="string")throw new Error("Input must be a string");(typeof r!="number"||r<0)&&(r=0),typeof e=="number"&&e<0&&(e=0);var n=t.match(wc.default());return n?n.slice(r,e).join(""):""}var Qw=yu.substring=td;function Yw(t,r,e){if(r===void 0&&(r=0),typeof t!="string")throw new Error("Input must be a string");var n=cp(t);if(typeof r!="number"&&(r=parseInt(r,10)),r>=n)return"";r<0&&(r+=n);var c;typeof e>"u"?c=n:(typeof e!="number"&&(e=parseInt(e,10)),c=e>=0?e+r:r);var g=t.match(wc.default());return g?g.slice(r,c).join(""):""}yu.substr=Yw;function em(t,r,e,n){if(r===void 0&&(r=16),e===void 0&&(e="#"),n===void 0&&(n="right"),typeof t!="string"||typeof r!="number")throw new Error("Invalid arguments specified");if(["left","right"].indexOf(n)===-1)throw new Error("Pad position should be either left or right");typeof e!="string"&&(e=String(e));var c=cp(t);if(c>r)return td(t,0,r);if(c=n.length)return r===""?n.length:-1;if(r==="")return e;var c=dh(r),g=!1,$;for($=e;$fe(async(r,e)=>Zt(t.value.toString()))},str:{to_num:t=>fe(async(r,e)=>{const n=parseInt(t.value,10);return isNaN(n)?kt:Me(n)}),len:t=>Me(Zw(t.value)),replace:t=>fe(async([r,e],n)=>(Mr(r),Mr(e),Zt(t.value.split(r.value).join(e.value)))),index_of:t=>fe(async([r],e)=>(Mr(r),Me(rm(t.value,r.value)))),incl:t=>fe(async([r],e)=>(Mr(r),t.value.includes(r.value)?pn:Ys)),trim:t=>fe(async(r,e)=>Zt(t.value.trim())),upper:t=>fe(async(r,e)=>Zt(t.value.toUpperCase())),lower:t=>fe(async(r,e)=>Zt(t.value.toLowerCase())),split:t=>fe(async([r],e)=>(r&&Mr(r),ss(r?t.value.split(r?r.value:"").map(n=>Zt(n)):xv(t.value).map(n=>Zt(n))))),slice:t=>fe(async([r,e],n)=>(_e(r),_e(e),Zt(Qw(t.value,r.value,e.value)))),pick:t=>fe(async([r],e)=>{_e(r);const c=xv(t.value)[r.value];return c?Zt(c):kt}),codepoint_at:t=>fe(([r],e)=>{_e(r);const n=t.value.charCodeAt(r.value);return Number.isNaN(n)?kt:Me(n)})},arr:{len:t=>Me(t.value.length),push:t=>fe(async([r],e)=>(nn(r),t.value.push(r),t)),unshift:t=>fe(async([r],e)=>(nn(r),t.value.unshift(r),t)),pop:t=>fe(async(r,e)=>t.value.pop()??kt),shift:t=>fe(async(r,e)=>t.value.shift()??kt),concat:t=>fe(async([r],e)=>(rc(r),ss(t.value.concat(r.value)))),slice:t=>fe(async([r,e],n)=>(_e(r),_e(e),ss(t.value.slice(r.value,e.value)))),join:t=>fe(async([r],e)=>(r&&Mr(r),Zt(t.value.map(n=>n.type==="str"?n.value:"").join(r?r.value:"")))),map:t=>fe(async([r],e)=>{mi(r);const n=t.value.map(async(c,g)=>await e.call(r,[c,Me(g)]));return ss(await Promise.all(n))}),filter:t=>fe(async([r],e)=>{mi(r);const n=[];for(let c=0;cfe(async([r,e],n)=>{mi(r);const c=e!=null;let g=c?e:t.value[0];for(let $=c?0:1;$fe(async([r],e)=>{mi(r);for(let n=0;nfe(async([r],e)=>(nn(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?Ys:(c=>c.value.map(g=>g.type==="str"||g.type==="num"||g.type==="bool"?g.value:g.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?pn:Ys)),reverse:t=>fe(async(r,e)=>(t.value.reverse(),kt)),copy:t=>fe(async(r,e)=>ss([...t.value])),sort:t=>fe(async([r],e)=>{const n=async(g,$)=>{if(g.length<=1)return g;const x=Math.floor(g.length/2),m=await n(g.slice(0,x),$),A=await n(g.slice(x),$);return c(m,A,$)},c=async(g,$,x)=>{const m=[];let A=0,C=0;for(;AZt(t.value),info:t=>t.info??kt}};function sm(t,r){if(Object.hasOwn($v,t.type)){const e=$v[t.type];if(Object.hasOwn(e,r))return e[r](t);throw new er(`No such prop (${r}) in ${t.type}.`)}else throw new er(`Cannot read prop of ${t.type}. (reading ${r})`)}const nm={mut(t){return{isMutable:!0,value:t}},const(t){return{isMutable:!1,value:t}}};var fs=globalThis&&globalThis.__decorate||function(t,r,e,n){var c=arguments.length,g=c<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(t,r,e,n);else for(var x=t.length-1;x>=0;x--)($=t[x])&&(g=(c<3?$(g):c>3?$(r,e,g):$(r,e))||g);return c>3&&g&&Object.defineProperty(r,e,g),g};const rd=300,am=rd-1;let ts=class{constructor(r,e={}){be(this,"opts");be(this,"stepCount",0);be(this,"stop",!1);be(this,"scope");be(this,"abortHandlers",[]);be(this,"vars",{});this.opts=e;const n={print:fe(([c])=>{nn(c),this.opts.out&&this.opts.out(c)}),readline:fe(async c=>{const g=c[0];if(Mr(g),this.opts.in==null)return kt;const $=await this.opts.in(g.value);return Zt($)})};this.vars=Object.fromEntries(Object.entries({...r,...Jw,...n}).map(([c,g])=>[c,nm.const(g)])),this.scope=new ii([new Map(Object.entries(this.vars))]),this.scope.opts.log=(c,g)=>{switch(c){case"add":this.log("var:add",g);break;case"read":this.log("var:read",g);break;case"write":this.log("var:write",g);break}}}async exec(r){if(!(r==null||r.length===0))try{await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}catch(e){this.handleError(e)}}async execFn(r,e){return await this._fn(r,e).catch(n=>(this.handleError(n),ch("func_failed")))}execFnSimple(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(c){switch(c.type){case"arr":return c.value.map(g=>e(g));case"bool":return c.value;case"null":return null;case"num":return c.value;case"obj":{const g={};for(const[$,x]of c.value.entries())g[$]=e(x);return g}case"str":return c.value;default:return}}const n=new Map;for(const c of r)switch(c.type){case"meta":{n.set(c.name,e(c.value));break}}return n}handleError(r){if(this.opts.err)this.stop||(this.abort(),r instanceof Ju?this.opts.err(r):this.opts.err(new dv(r)));else throw r}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const n of r.members)switch(n.type){case"def":{if(n.mut)throw new yv('No "var" in namespace declaration: '+n.name,n.loc);const c={isMutable:n.mut,value:await this._eval(n.expr,e)};e.add(n.name,c),this.scope.add(r.name+":"+n.name,c);break}case"ns":break;default:{const g=n;throw new yv("invalid ns member type: "+g.type,g.loc)}}}async _fn(r,e){if(r.native)return r.native(e,{call:this.execFnSimple,topCall:this.execFn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??kt;{const n=new Map;for(let g=0;g<(r.args??[]).length;g++)n.set(r.args[g],{isMutable:!0,value:e[g]});const c=r.scope.createChildScope(n);return Kw(await this._run(r.statements,c))}}_eval(r,e){return this.__eval(r,e).catch(n=>{if(n.loc)throw n;{const c=n instanceof Ju?n:new dv(n);throw c.loc=r.loc,c.message=`${c.message} (Line ${r.loc.line}, Column ${r.loc.column})`,c}})}async __eval(r,e){if(this.stop)return kt;if(this.stepCount%rd===am&&await new Promise(n=>setTimeout(n,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new er("max step exceeded");switch(r.type){case"call":{const n=await this._eval(r.target,e);mi(n);const c=await Promise.all(r.args.map(g=>this._eval(g,e)));return this._fn(n,c)}case"if":{const n=await this._eval(r.cond,e);if($s(n),n.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const c of r.elseif){const g=await this._eval(c.cond,e);if($s(g),g.value)return this._eval(c.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return kt}case"match":{const n=await this._eval(r.about,e);for(const c of r.qs){const g=await this._eval(c.q,e);if(hh(n,g))return await this._eval(c.a,e)}return r.default?await this._eval(r.default,e):kt}case"loop":{for(;;){const n=await this._run(r.statements,e.createChildScope());if(n.type==="break")break;if(n.type==="return")return n}return kt}case"for":{if(r.times){const n=await this._eval(r.times,e);_e(n);for(let c=0;c0){const c=[];for(const g of r.attr)c.push({name:g.name,value:await this._eval(g.value,e)});n.attr=c}return e.add(r.name,{isMutable:r.mut,value:n}),kt}case"identifier":return e.get(r.name);case"assign":{const n=await this._eval(r.expr,e);return await this.assign(e,r.dest,n),kt}case"addAssign":{const n=await this._eval(r.dest,e);_e(n);const c=await this._eval(r.expr,e);return _e(c),await this.assign(e,r.dest,Me(n.value+c.value)),kt}case"subAssign":{const n=await this._eval(r.dest,e);_e(n);const c=await this._eval(r.expr,e);return _e(c),await this.assign(e,r.dest,Me(n.value-c.value)),kt}case"null":return kt;case"bool":return ru(r.value);case"num":return Me(r.value);case"str":return Zt(r.value);case"arr":return ss(await Promise.all(r.value.map(n=>this._eval(n,e))));case"obj":{const n=new Map;for(const c of r.value.keys())n.set(c,await this._eval(r.value.get(c),e));return tc(n)}case"prop":{const n=await this._eval(r.target,e);return Ic(n)?n.value.has(r.name)?n.value.get(r.name):kt:sm(n,r.name)}case"index":{const n=await this._eval(r.target,e),c=await this._eval(r.index,e);if(mv(n)){_e(c);const g=n.value[c.value];if(g===void 0)throw new mw(`Index out of range. index: ${c.value} max: ${n.value.length-1}`);return g}else{if(Ic(n))return Mr(c),n.value.has(c.value)?n.value.get(c.value):kt;throw new er(`Cannot read prop (${Iu(c)}) of ${n.type}.`)}}case"not":{const n=await this._eval(r.expr,e);return $s(n),ru(!n.value)}case"fn":return qw(r.args.map(n=>n.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"exists":return ru(e.exists(r.identifier.name));case"tmpl":{let n="";for(const c of r.tmpl)if(typeof c=="string")n+=c;else{const g=await this._eval(c,e);n+=Iu(g)}return Zt(n)}case"return":{const n=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:n}),zw(n)}case"break":return this.log("block:break",{scope:e.name}),Vw();case"continue":return this.log("block:continue",{scope:e.name}),Ww();case"ns":return kt;case"meta":return kt;case"and":{const n=await this._eval(r.left,e);if($s(n),n.value){const c=await this._eval(r.right,e);return $s(c),c}else return n}case"or":{const n=await this._eval(r.left,e);if($s(n),n.value)return n;{const c=await this._eval(r.right,e);return $s(c),c}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let n=kt;for(let c=0;ce!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,n){if(e.type==="identifier")r.assign(e.name,n);else if(e.type==="index"){const c=await this._eval(e.target,r),g=await this._eval(e.index,r);if(mv(c))_e(g),c.value[g.value]=n;else if(Ic(c))Mr(g),c.value.set(g.value,n);else throw new er(`Cannot read prop (${Iu(g)}) of ${c.type}.`)}else if(e.type==="prop"){const c=await this._eval(e.target,r);Vn(c),c.value.set(e.name,n)}else throw new er("The left-hand side of an assignment expression must be a variable or a property/index access.")}};fs([vr],ts.prototype,"exec",null);fs([vr],ts.prototype,"execFn",null);fs([vr],ts.prototype,"execFnSimple",null);fs([vr],ts.prototype,"handleError",null);fs([vr],ts.prototype,"log",null);fs([vr],ts.prototype,"collectNs",null);fs([vr],ts.prototype,"collectNsMember",null);fs([vr],ts.prototype,"_fn",null);fs([vr],ts.prototype,"_eval",null);fs([vr],ts.prototype,"__eval",null);fs([vr],ts.prototype,"_run",null);fs([vr],ts.prototype,"registerAbortHandler",null);fs([vr],ts.prototype,"unregisterAbortHandler",null);fs([vr],ts.prototype,"abort",null);fs([vr],ts.prototype,"assign",null);fs([vr],ts,"collectMetadata",null);class im{constructor(r,e){be(this,"pages");be(this,"firstPageIndex");be(this,"lastPageIndex");be(this,"pageIndex");be(this,"address");be(this,"_char");be(this,"line");be(this,"column");this.pages=new Map,this.pages.set(0,r),this.firstPageIndex=0,this.lastPageIndex=0,this.pageIndex=0,this.address=0,this.line=(e==null?void 0:e.line)??0,this.column=(e==null?void 0:e.column)??0,this.moveNext()}get eof(){return this.endOfPage&&this.isLastPage}get char(){if(this.eof)throw new Error("end of stream");return this._char}getPos(){return{line:this.line+1,column:this.column+1}}next(){!this.eof&&this._char===` +`?(this.line++,this.column=0):this.column++,this.incAddr(),this.moveNext()}prev(){this.decAddr(),this.movePrev()}get isFirstPage(){return this.pageIndex<=this.firstPageIndex}get isLastPage(){return this.pageIndex>=this.lastPageIndex}get endOfPage(){const r=this.pages.get(this.pageIndex);return this.address>=r.length}moveNext(){for(this.loadChar();;){if(!this.eof&&this._char==="\r"){this.incAddr(),this.loadChar();continue}break}}incAddr(){this.endOfPage?this.isLastPage||(this.pageIndex++,this.address=0):this.address++}movePrev(){for(this.loadChar();;){if(!this.eof&&this._char==="\r"){this.decAddr(),this.loadChar();continue}break}}decAddr(){this.address>0?this.address--:this.isFirstPage||(this.pageIndex--,this.address=this.pages.get(this.pageIndex).length-1)}loadChar(){this.eof?this._char=void 0:this._char=this.pages.get(this.pageIndex)[this.address]}}var j;(function(t){t[t.EOF=0]="EOF",t[t.NewLine=1]="NewLine",t[t.Identifier=2]="Identifier",t[t.NumberLiteral=3]="NumberLiteral",t[t.StringLiteral=4]="StringLiteral",t[t.Template=5]="Template",t[t.TemplateStringElement=6]="TemplateStringElement",t[t.TemplateExprElement=7]="TemplateExprElement",t[t.NullKeyword=8]="NullKeyword",t[t.TrueKeyword=9]="TrueKeyword",t[t.FalseKeyword=10]="FalseKeyword",t[t.EachKeyword=11]="EachKeyword",t[t.ForKeyword=12]="ForKeyword",t[t.LoopKeyword=13]="LoopKeyword",t[t.BreakKeyword=14]="BreakKeyword",t[t.ContinueKeyword=15]="ContinueKeyword",t[t.MatchKeyword=16]="MatchKeyword",t[t.CaseKeyword=17]="CaseKeyword",t[t.DefaultKeyword=18]="DefaultKeyword",t[t.IfKeyword=19]="IfKeyword",t[t.ElifKeyword=20]="ElifKeyword",t[t.ElseKeyword=21]="ElseKeyword",t[t.ReturnKeyword=22]="ReturnKeyword",t[t.EvalKeyword=23]="EvalKeyword",t[t.VarKeyword=24]="VarKeyword",t[t.LetKeyword=25]="LetKeyword",t[t.ExistsKeyword=26]="ExistsKeyword",t[t.Not=27]="Not",t[t.NotEq=28]="NotEq",t[t.OpenSharpBracket=29]="OpenSharpBracket",t[t.Sharp3=30]="Sharp3",t[t.Percent=31]="Percent",t[t.And2=32]="And2",t[t.OpenParen=33]="OpenParen",t[t.CloseParen=34]="CloseParen",t[t.Asterisk=35]="Asterisk",t[t.Plus=36]="Plus",t[t.PlusEq=37]="PlusEq",t[t.Comma=38]="Comma",t[t.Minus=39]="Minus",t[t.MinusEq=40]="MinusEq",t[t.Dot=41]="Dot",t[t.Slash=42]="Slash",t[t.Colon=43]="Colon",t[t.Colon2=44]="Colon2",t[t.SemiColon=45]="SemiColon",t[t.Lt=46]="Lt",t[t.LtEq=47]="LtEq",t[t.Out=48]="Out",t[t.Eq=49]="Eq",t[t.Eq2=50]="Eq2",t[t.Arrow=51]="Arrow",t[t.Gt=52]="Gt",t[t.GtEq=53]="GtEq",t[t.At=54]="At",t[t.OpenBracket=55]="OpenBracket",t[t.BackSlash=56]="BackSlash",t[t.CloseBracket=57]="CloseBracket",t[t.Hat=58]="Hat",t[t.OpenBrace=59]="OpenBrace",t[t.Or2=60]="Or2",t[t.CloseBrace=61]="CloseBrace"})(j||(j={}));class lm{constructor(r,e,n=!1,c,g){be(this,"kind");be(this,"loc");be(this,"hasLeftSpacing");be(this,"value");be(this,"children");this.kind=r,this.loc=e,this.hasLeftSpacing=n,this.value=c,this.children=g}}function Be(t,r,e){return new lm(t,r,e==null?void 0:e.hasLeftSpacing,e==null?void 0:e.value,e==null?void 0:e.children)}const bv=[" "," "],om=["\r",` +`],Av=/^[0-9]$/,um=/^[A-Za-z0-9_]$/;class fm{constructor(r){be(this,"stream");be(this,"_tokens",[]);typeof r=="string"?this.stream=new im(r):this.stream=r,this._tokens.push(this.readToken())}get token(){return this._tokens[0]}get kind(){return this.token.kind}next(){this._tokens[0].kind!==j.EOF&&(this._tokens.shift(),this._tokens.length===0&&this._tokens.push(this.readToken()))}lookahead(r){for(;this._tokens.length<=r;)this._tokens.push(this.readToken());return this._tokens[r]}expect(r){if(this.kind!==r)throw new yt(`unexpected token: ${j[this.kind]}`,this.token.loc)}nextWith(r){this.expect(r),this.next()}readToken(){let r,e=!1;for(;;){if(this.stream.eof){r=Be(j.EOF,this.stream.getPos(),{hasLeftSpacing:e});break}if(bv.includes(this.stream.char)){this.stream.next(),e=!0;continue}const n=this.stream.getPos();if(om.includes(this.stream.char))return this.stream.next(),r=Be(j.NewLine,n,{hasLeftSpacing:e}),r;switch(this.stream.char){case"!":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Be(j.NotEq,n,{hasLeftSpacing:e})):r=Be(j.Not,n,{hasLeftSpacing:e});break}case'"':case"'":{r=this.readStringLiteral(e);break}case"#":{if(this.stream.next(),!this.stream.eof&&this.stream.char==="#")this.stream.next(),!this.stream.eof&&this.stream.char==="#"&&(this.stream.next(),r=Be(j.Sharp3,n,{hasLeftSpacing:e}));else if(!this.stream.eof&&this.stream.char==="[")this.stream.next(),r=Be(j.OpenSharpBracket,n,{hasLeftSpacing:e});else throw new yt('invalid character: "#"',n);break}case"%":{this.stream.next(),r=Be(j.Percent,n,{hasLeftSpacing:e});break}case"&":{this.stream.next(),!this.stream.eof&&this.stream.char==="&"&&(this.stream.next(),r=Be(j.And2,n,{hasLeftSpacing:e}));break}case"(":{this.stream.next(),r=Be(j.OpenParen,n,{hasLeftSpacing:e});break}case")":{this.stream.next(),r=Be(j.CloseParen,n,{hasLeftSpacing:e});break}case"*":{this.stream.next(),r=Be(j.Asterisk,n,{hasLeftSpacing:e});break}case"+":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Be(j.PlusEq,n,{hasLeftSpacing:e})):r=Be(j.Plus,n,{hasLeftSpacing:e});break}case",":{this.stream.next(),r=Be(j.Comma,n,{hasLeftSpacing:e});break}case"-":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Be(j.MinusEq,n,{hasLeftSpacing:e})):r=Be(j.Minus,n,{hasLeftSpacing:e});break}case".":{this.stream.next(),r=Be(j.Dot,n,{hasLeftSpacing:e});break}case"/":{if(this.stream.next(),!this.stream.eof&&this.stream.char==="*"){this.stream.next(),this.skipCommentRange();continue}else if(!this.stream.eof&&this.stream.char==="/"){this.stream.next(),this.skipCommentLine();continue}else r=Be(j.Slash,n,{hasLeftSpacing:e});break}case":":{this.stream.next(),!this.stream.eof&&this.stream.char===":"?(this.stream.next(),r=Be(j.Colon2,n,{hasLeftSpacing:e})):r=Be(j.Colon,n,{hasLeftSpacing:e});break}case";":{this.stream.next(),r=Be(j.SemiColon,n,{hasLeftSpacing:e});break}case"<":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Be(j.LtEq,n,{hasLeftSpacing:e})):!this.stream.eof&&this.stream.char===":"?(this.stream.next(),r=Be(j.Out,n,{hasLeftSpacing:e})):r=Be(j.Lt,n,{hasLeftSpacing:e});break}case"=":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Be(j.Eq2,n,{hasLeftSpacing:e})):!this.stream.eof&&this.stream.char===">"?(this.stream.next(),r=Be(j.Arrow,n,{hasLeftSpacing:e})):r=Be(j.Eq,n,{hasLeftSpacing:e});break}case">":{this.stream.next(),!this.stream.eof&&this.stream.char==="="?(this.stream.next(),r=Be(j.GtEq,n,{hasLeftSpacing:e})):r=Be(j.Gt,n,{hasLeftSpacing:e});break}case"@":{this.stream.next(),r=Be(j.At,n,{hasLeftSpacing:e});break}case"[":{this.stream.next(),r=Be(j.OpenBracket,n,{hasLeftSpacing:e});break}case"\\":{this.stream.next(),r=Be(j.BackSlash,n,{hasLeftSpacing:e});break}case"]":{this.stream.next(),r=Be(j.CloseBracket,n,{hasLeftSpacing:e});break}case"^":{this.stream.next(),r=Be(j.Hat,n,{hasLeftSpacing:e});break}case"`":{r=this.readTemplate(e);break}case"{":{this.stream.next(),r=Be(j.OpenBrace,n,{hasLeftSpacing:e});break}case"|":{this.stream.next(),!this.stream.eof&&this.stream.char==="|"&&(this.stream.next(),r=Be(j.Or2,n,{hasLeftSpacing:e}));break}case"}":{this.stream.next(),r=Be(j.CloseBrace,n,{hasLeftSpacing:e});break}}if(r==null){const c=this.tryReadDigits(e);if(c){r=c;break}const g=this.tryReadWord(e);if(g){r=g;break}throw new yt(`invalid character: "${this.stream.char}"`,n)}break}return r}tryReadWord(r){let e="";const n=this.stream.getPos();for(;!this.stream.eof&&um.test(this.stream.char);)e+=this.stream.char,this.stream.next();if(e.length!==0)switch(e){case"null":return Be(j.NullKeyword,n,{hasLeftSpacing:r});case"true":return Be(j.TrueKeyword,n,{hasLeftSpacing:r});case"false":return Be(j.FalseKeyword,n,{hasLeftSpacing:r});case"each":return Be(j.EachKeyword,n,{hasLeftSpacing:r});case"for":return Be(j.ForKeyword,n,{hasLeftSpacing:r});case"loop":return Be(j.LoopKeyword,n,{hasLeftSpacing:r});case"break":return Be(j.BreakKeyword,n,{hasLeftSpacing:r});case"continue":return Be(j.ContinueKeyword,n,{hasLeftSpacing:r});case"match":return Be(j.MatchKeyword,n,{hasLeftSpacing:r});case"case":return Be(j.CaseKeyword,n,{hasLeftSpacing:r});case"default":return Be(j.DefaultKeyword,n,{hasLeftSpacing:r});case"if":return Be(j.IfKeyword,n,{hasLeftSpacing:r});case"elif":return Be(j.ElifKeyword,n,{hasLeftSpacing:r});case"else":return Be(j.ElseKeyword,n,{hasLeftSpacing:r});case"return":return Be(j.ReturnKeyword,n,{hasLeftSpacing:r});case"eval":return Be(j.EvalKeyword,n,{hasLeftSpacing:r});case"var":return Be(j.VarKeyword,n,{hasLeftSpacing:r});case"let":return Be(j.LetKeyword,n,{hasLeftSpacing:r});case"exists":return Be(j.ExistsKeyword,n,{hasLeftSpacing:r});default:return Be(j.Identifier,n,{hasLeftSpacing:r,value:e})}}tryReadDigits(r){let e="",n="";const c=this.stream.getPos();for(;!this.stream.eof&&Av.test(this.stream.char);)e+=this.stream.char,this.stream.next();if(e.length===0)return;if(!this.stream.eof&&this.stream.char==="."){for(this.stream.next();!this.stream.eof&&Av.test(this.stream.char);)n+=this.stream.char,this.stream.next();if(n.length===0)throw new yt("digit expected",c)}let g;return n.length>0?g=e+"."+n:g=e,Be(j.NumberLiteral,c,{hasLeftSpacing:r,value:g})}readStringLiteral(r){let e="";const n=this.stream.char;let c="string";const g=this.stream.getPos();for(this.stream.next();c!=="finish";)switch(c){case"string":{if(this.stream.eof)throw new yt("unexpected EOF",g);if(this.stream.char==="\\"){this.stream.next(),c="escape";break}if(this.stream.char===n){this.stream.next(),c="finish";break}e+=this.stream.char,this.stream.next();break}case"escape":{if(this.stream.eof)throw new yt("unexpected EOF",g);e+=this.stream.char,this.stream.next(),c="string";break}}return Be(j.StringLiteral,g,{hasLeftSpacing:r,value:e})}readTemplate(r){const e=[];let n="",c=[],g="string";const $=this.stream.getPos();let x=$;for(this.stream.next();g!=="finish";)switch(g){case"string":{if(this.stream.eof)throw new yt("unexpected EOF",$);if(this.stream.char==="\\"){this.stream.next(),g="escape";break}if(this.stream.char==="`"){this.stream.next(),n.length>0&&e.push(Be(j.TemplateStringElement,x,{hasLeftSpacing:r,value:n})),g="finish";break}if(this.stream.char==="{"){this.stream.next(),n.length>0&&(e.push(Be(j.TemplateStringElement,x,{hasLeftSpacing:r,value:n})),n=""),x=this.stream.getPos(),g="expr";break}n+=this.stream.char,this.stream.next();break}case"escape":{if(this.stream.eof)throw new yt("unexpected EOF",$);n+=this.stream.char,this.stream.next(),g="string";break}case"expr":{if(this.stream.eof)throw new yt("unexpected EOF",$);if(bv.includes(this.stream.char)){this.stream.next();continue}if(this.stream.char==="}"){this.stream.next(),e.push(Be(j.TemplateExprElement,x,{hasLeftSpacing:r,children:c})),c=[],x=this.stream.getPos(),g="string";break}const m=this.readToken();c.push(m);break}}return Be(j.Template,$,{hasLeftSpacing:r,children:e})}skipCommentLine(){for(;!this.stream.eof;){if(this.stream.char===` +`){this.stream.next();break}this.stream.next()}}skipCommentRange(){for(;!this.stream.eof;){if(this.stream.char==="*"){if(this.stream.next(),this.stream.char==="/"){this.stream.next();break}continue}this.stream.next()}}}function et(t,r,e){const n={type:t};for(const c of Object.keys(r))r[c]!==void 0&&(n[c]=r[c]);return n.loc=e,n}function Qs(t,r,e){return et("call",{target:et("identifier",{name:t},e),args:r},e)}function sd(t){const r=[];for(t.nextWith(j.OpenParen),t.kind===j.NewLine&&t.next();t.kind!==j.CloseParen;){t.expect(j.Identifier);const e=t.token.value;t.next();let n;switch(t.kind===j.Colon&&(t.next(),n=cu(t)),r.push({name:e,argType:n}),t.kind){case j.NewLine:{t.next();break}case j.Comma:{t.next(),t.kind===j.NewLine&&t.next();break}case j.CloseParen:break;default:throw new yt("separator expected",t.token.loc)}}return t.nextWith(j.CloseParen),r}function df(t){for(t.nextWith(j.OpenBrace);t.kind===j.NewLine;)t.next();const r=[];for(;t.kind!==j.CloseBrace;)switch(r.push(mc(t)),t.kind){case j.NewLine:case j.SemiColon:{for(;[j.NewLine,j.SemiColon].includes(t.kind);)t.next();break}case j.CloseBrace:break;default:throw new yt("Multiple statements cannot be placed on a single line.",t.token.loc)}return t.nextWith(j.CloseBrace),r}function cu(t){return t.kind===j.At?cm(t):hm(t)}function cm(t){const r=t.token.loc;t.nextWith(j.At),t.nextWith(j.OpenParen);const e=[];for(;t.kind!==j.CloseParen;){if(e.length>0)switch(t.kind){case j.Comma:{t.next();break}default:throw new yt("separator expected",t.token.loc)}const c=cu(t);e.push(c)}t.nextWith(j.CloseParen),t.nextWith(j.Arrow);const n=cu(t);return et("fnTypeSource",{args:e,result:n},r)}function hm(t){const r=t.token.loc;t.expect(j.Identifier);const e=t.token.value;t.next();let n=null;return t.kind===j.Lt&&(t.next(),n=cu(t),t.nextWith(j.Gt)),et("namedTypeSource",{name:e,inner:n},r)}class pm{constructor(r){be(this,"source");be(this,"index");be(this,"_token");this.source=r,this.index=0,this.load()}get eof(){return this.index>=this.source.length}get token(){return this.eof?Be(j.EOF,{line:-1,column:-1}):this._token}get kind(){return this.token.kind}next(){this.eof||this.index++,this.load()}lookahead(r){return this.index+r0)if(t.kind===j.Colon){if(t.token.hasLeftSpacing)throw new yt("Cannot use spaces in a reference.",t.token.loc);if(t.next(),t.token.hasLeftSpacing)throw new yt("Cannot use spaces in a reference.",t.token.loc)}else break;t.expect(j.Identifier),e.push(t.token.value),t.next()}return et("identifier",{name:e.join(":")},r)}function Am(t,r){const e=t.token.loc;t.nextWith(j.OpenBrace),t.kind===j.NewLine&&t.next();const n=new Map;for(;t.kind!==j.CloseBrace;){t.expect(j.Identifier);const c=t.token.value;t.next(),t.nextWith(j.Colon);const g=mr(t,r);switch(n.set(c,g),t.kind){case j.NewLine:{t.next();break}case j.Comma:{t.next(),t.kind===j.NewLine&&t.next();break}case j.CloseBrace:break;default:throw new yt("separator expected",t.token.loc)}}return t.nextWith(j.CloseBrace),et("obj",{value:n},e)}function _m(t,r){const e=t.token.loc;t.nextWith(j.OpenBracket),t.kind===j.NewLine&&t.next();const n=[];for(;t.kind!==j.CloseBracket;)switch(n.push(mr(t,r)),t.kind){case j.NewLine:{t.next();break}case j.Comma:{t.next(),t.kind===j.NewLine&&t.next();break}case j.CloseBracket:break;default:throw new yt("separator expected",t.token.loc)}return t.nextWith(j.CloseBracket),et("arr",{value:n},e)}function hp(t,r){let e;const n=t.kind,c=Tc.find(g=>g.opKind==="prefix"&&g.kind===n);for(c!=null?e=vm(t,c.bp):e=nd(t,!1);;){t.kind===j.BackSlash&&(t.next(),t.nextWith(j.NewLine));const g=t.kind,$=Tc.find(m=>m.opKind==="postfix"&&m.kind===g);if($!=null){if($.bpm.opKind==="infix"&&m.kind===g);if(x!=null){if(x.lbp`}else return t.name;case"fnTypeSource":{const r=t.args.map(n=>Tf(n)).join(", "),e=Tf(t.result);return`@(${r}) { ${e} }`}}}function Tu(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return _v(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=Tu(t.inner):r=_v("any"),Dm(t.name,[r])}}throw new yt(`Unknown type: '${Tf(t)}'`,t.loc)}else{const r=t.args.map(e=>Tu(e));return Lm(r,Tu(t.result))}}function Bm(t){switch(t.type){case"def":{t.varType!=null&&Tu(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&Tu(r.argType);t.retType!=null&&Tu(t.retType);break}}return t}function Hm(t){for(const r of t)dt(r,Bm);return t}var Za;let Um=(Za=class{constructor(){be(this,"plugins");this.plugins={validate:[Rm,Hm],transform:[]}}static parse(r){return Za.instance==null&&(Za.instance=new Za),Za.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;const n=new fm(r);e=Im(n);for(const c of this.plugins.validate)e=c(e);for(const c of this.plugins.transform)e=c(e);return e}},be(Za,"instance"),Za);const Cv="next",qm={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { + <: if (i % 15 == 0) "FizzBuzz" + elif (i % 3 == 0) "Fizz" + elif (i % 5 == 0) "Buzz" + else i + }`};function af(){return af=Object.assign||function(t){for(var r=1;r";return r},lineNumbersCount:function(){var r=this.codeData.split(/\r\n|\n/).length;return r}},mounted:function(){this._recordCurrentState(),this.styleLineNumbers()},methods:{setLineNumbersHeight:function(){this.lineNumbersHeight=getComputedStyle(this.$refs.pre).height},styleLineNumbers:function(){if(!(!this.lineNumbers||!this.autoStyleLineNumbers)){var r=this.$refs.pre,e=this.$el.querySelector(".prism-editor__line-numbers"),n=window.getComputedStyle(r);this.$nextTick(function(){var c="border-top-left-radius",g="border-bottom-left-radius";if(e){e.style[c]=n[c],e.style[g]=n[g],r.style[c]="0",r.style[g]="0";var $=["background-color","margin-top","padding-top","font-family","font-size","line-height"];$.forEach(function(x){e.style[x]=n[x]}),e.style["margin-bottom"]="-"+n["padding-top"]}})}},_recordCurrentState:function(){var r=this.$refs.textarea;if(r){var e=r.value,n=r.selectionStart,c=r.selectionEnd;this._recordChange({value:e,selectionStart:n,selectionEnd:c})}},_getLines:function(r,e){return r.substring(0,e).split(` +`)},_applyEdits:function(r){var e=this.$refs.textarea,n=this.history.stack[this.history.offset];n&&e&&(this.history.stack[this.history.offset]=af({},n,{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd})),this._recordChange(r),this._updateInput(r)},_recordChange:function(r,e){e===void 0&&(e=!1);var n=this.history,c=n.stack,g=n.offset;if(c.length&&g>-1){this.history.stack=c.slice(0,g+1);var $=this.history.stack.length;if($>Sv){var x=$-Sv;this.history.stack=c.slice(x,$),this.history.offset=Math.max(this.history.offset-x,0)}}var m=Date.now();if(e){var A=this.history.stack[this.history.offset];if(A&&m-A.timestamp=P&&Ie<=S&&le.startsWith(A)?le.substring(A.length):le}).join(` +`);if($!==I){var G=C[P];this._applyEdits({value:I,selectionStart:G.startsWith(A)?x-A.length:x,selectionEnd:m-($.length-I.length)})}}else if(x!==m){var ee=this._getLines($,x),re=ee.length-1,ge=this._getLines($,m).length-1,q=ee[re];this._applyEdits({value:$.split(` +`).map(function(le,Ie){return Ie>=re&&Ie<=ge?A+le:le}).join(` +`),selectionStart:/\S/.test(q)?x+A.length:x,selectionEnd:m+A.length*(ge-re+1)})}else{var U=x+A.length;this._applyEdits({value:$.substring(0,x)+A+$.substring(m),selectionStart:U,selectionEnd:U})}else if(r.keyCode===Wm){var L=x!==m,H=$.substring(0,x);if(H.endsWith(A)&&!L){r.preventDefault();var W=x-A.length;this._applyEdits({value:$.substring(0,x-A.length)+$.substring(m),selectionStart:W,selectionEnd:W})}}else if(r.keyCode===zm){if(x===m){var V=this._getLines($,x).pop(),J=V==null?void 0:V.match(/^\s+/);if(J&&J[0]){r.preventDefault();var Y=` +`+J[0],ue=x+Y.length;this._applyEdits({value:$.substring(0,x)+Y+$.substring(m),selectionStart:ue,selectionEnd:ue})}}}else if(r.keyCode===kv||r.keyCode===Pv||r.keyCode===Ev||r.keyCode===Mv){var de;r.keyCode===kv&&r.shiftKey?de=["(",")"]:r.keyCode===Pv?r.shiftKey?de=["{","}"]:de=["[","]"]:r.keyCode===Ev?r.shiftKey?de=['"','"']:de=["'","'"]:r.keyCode===Mv&&!r.shiftKey&&(de=["`","`"]),x!==m&&de&&(r.preventDefault(),this._applyEdits({value:$.substring(0,x)+de[0]+$.substring(x,m)+de[1]+$.substring(m),selectionStart:x,selectionEnd:m+2}))}else(jc?r.metaKey&&r.keyCode===kf:r.ctrlKey&&r.keyCode===kf)&&!r.shiftKey&&!r.altKey?(r.preventDefault(),this._undoEdit()):(jc?r.metaKey&&r.keyCode===kf&&r.shiftKey:Zm?r.ctrlKey&&r.keyCode===Km:r.ctrlKey&&r.keyCode===kf&&r.shiftKey)&&!r.altKey?(r.preventDefault(),this._redoEdit()):r.keyCode===Jm&&r.ctrlKey&&(!jc||r.shiftKey)&&(r.preventDefault(),this.capture=!this.capture)}}},render:function(){var r=this,e=hi("div",{class:"prism-editor__line-width-calc",style:"height: 0px; visibility: hidden; pointer-events: none;"},"999"),n=hi("div",{class:"prism-editor__line-numbers",style:{"min-height":this.lineNumbersHeight},"aria-hidden":"true"},[e,Array.from(Array(this.lineNumbersCount).keys()).map(function(x,m){return hi("div",{class:"prism-editor__line-number token comment"},""+ ++m)})]),c=hi("textarea",{ref:"textarea",onInput:this.handleChange,onKeydown:this.handleKeyDown,onClick:function(m){r.$emit("click",m)},onKeyup:function(m){r.$emit("keyup",m)},onFocus:function(m){r.$emit("focus",m)},onBlur:function(m){r.$emit("blur",m)},class:{"prism-editor__textarea":!0,"prism-editor__textarea--empty":this.isEmpty},spellCheck:"false",autocapitalize:"off",autocomplete:"off",autocorrect:"off","data-gramm":"false",placeholder:this.placeholder,"data-testid":"textarea",readonly:this.readonly,value:this.codeData}),g=hi("pre",{ref:"pre",class:"prism-editor__editor","data-testid":"preview",innerHTML:this.content}),$=hi("div",{class:"prism-editor__container"},[c,g]);return hi("div",{class:"prism-editor-wrapper"},[this.lineNumbers&&n,$])}});var Ym={exports:{}};(function(t){var r=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */var e=function(n){var c=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,g=0,$={},x={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function q(U){return U instanceof m?new m(U.type,q(U.content),U.alias):Array.isArray(U)?U.map(q):U.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(H){var q=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(H.stack)||[])[1];if(q){var U=document.getElementsByTagName("script");for(var L in U)if(U[L].src==q)return U[L]}return null}},isActive:function(q,U,L){for(var H="no-"+U;q;){var W=q.classList;if(W.contains(U))return!0;if(W.contains(H))return!1;q=q.parentElement}return!!L}},languages:{plain:$,plaintext:$,text:$,txt:$,extend:function(q,U){var L=x.util.clone(x.languages[q]);for(var H in U)L[H]=U[H];return L},insertBefore:function(q,U,L,H){H=H||x.languages;var W=H[q],V={};for(var J in W)if(W.hasOwnProperty(J)){if(J==U)for(var Y in L)L.hasOwnProperty(Y)&&(V[Y]=L[Y]);L.hasOwnProperty(J)||(V[J]=W[J])}var ue=H[q];return H[q]=V,x.languages.DFS(x.languages,function(de,le){le===ue&&de!=q&&(this[de]=V)}),V},DFS:function q(U,L,H,W){W=W||{};var V=x.util.objId;for(var J in U)if(U.hasOwnProperty(J)){L.call(U,J,U[J],H||J);var Y=U[J],ue=x.util.type(Y);ue==="Object"&&!W[V(Y)]?(W[V(Y)]=!0,q(Y,L,null,W)):ue==="Array"&&!W[V(Y)]&&(W[V(Y)]=!0,q(Y,L,J,W))}}},plugins:{},highlightAll:function(q,U){x.highlightAllUnder(document,q,U)},highlightAllUnder:function(q,U,L){var H={callback:L,container:q,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};x.hooks.run("before-highlightall",H),H.elements=Array.prototype.slice.apply(H.container.querySelectorAll(H.selector)),x.hooks.run("before-all-elements-highlight",H);for(var W=0,V;V=H.elements[W++];)x.highlightElement(V,U===!0,H.callback)},highlightElement:function(q,U,L){var H=x.util.getLanguage(q),W=x.languages[H];x.util.setLanguage(q,H);var V=q.parentElement;V&&V.nodeName.toLowerCase()==="pre"&&x.util.setLanguage(V,H);var J=q.textContent,Y={element:q,language:H,grammar:W,code:J};function ue(le){Y.highlightedCode=le,x.hooks.run("before-insert",Y),Y.element.innerHTML=Y.highlightedCode,x.hooks.run("after-highlight",Y),x.hooks.run("complete",Y),L&&L.call(Y.element)}if(x.hooks.run("before-sanity-check",Y),V=Y.element.parentElement,V&&V.nodeName.toLowerCase()==="pre"&&!V.hasAttribute("tabindex")&&V.setAttribute("tabindex","0"),!Y.code){x.hooks.run("complete",Y),L&&L.call(Y.element);return}if(x.hooks.run("before-highlight",Y),!Y.grammar){ue(x.util.encode(Y.code));return}if(U&&n.Worker){var de=new Worker(x.filename);de.onmessage=function(le){ue(le.data)},de.postMessage(JSON.stringify({language:Y.language,code:Y.code,immediateClose:!0}))}else ue(x.highlight(Y.code,Y.grammar,Y.language))},highlight:function(q,U,L){var H={code:q,grammar:U,language:L};if(x.hooks.run("before-tokenize",H),!H.grammar)throw new Error('The language "'+H.language+'" has no grammar.');return H.tokens=x.tokenize(H.code,H.grammar),x.hooks.run("after-tokenize",H),m.stringify(x.util.encode(H.tokens),H.language)},tokenize:function(q,U){var L=U.rest;if(L){for(var H in L)U[H]=L[H];delete U.rest}var W=new P;return S(W,W.head,q),C(q,W,U,W.head,0),G(W)},hooks:{all:{},add:function(q,U){var L=x.hooks.all;L[q]=L[q]||[],L[q].push(U)},run:function(q,U){var L=x.hooks.all[q];if(!(!L||!L.length))for(var H=0,W;W=L[H++];)W(U)}},Token:m};n.Prism=x;function m(q,U,L,H){this.type=q,this.content=U,this.alias=L,this.length=(H||"").length|0}m.stringify=function q(U,L){if(typeof U=="string")return U;if(Array.isArray(U)){var H="";return U.forEach(function(ue){H+=q(ue,L)}),H}var W={type:U.type,content:q(U.content,L),tag:"span",classes:["token",U.type],attributes:{},language:L},V=U.alias;V&&(Array.isArray(V)?Array.prototype.push.apply(W.classes,V):W.classes.push(V)),x.hooks.run("wrap",W);var J="";for(var Y in W.attributes)J+=" "+Y+'="'+(W.attributes[Y]||"").replace(/"/g,""")+'"';return"<"+W.tag+' class="'+W.classes.join(" ")+'"'+J+">"+W.content+""};function A(q,U,L,H){q.lastIndex=U;var W=q.exec(L);if(W&&H&&W[1]){var V=W[1].length;W.index+=V,W[0]=W[0].slice(V)}return W}function C(q,U,L,H,W,V){for(var J in L)if(!(!L.hasOwnProperty(J)||!L[J])){var Y=L[J];Y=Array.isArray(Y)?Y:[Y];for(var ue=0;ue=V.reach);ut+=je.value.length,je=je.next){var jt=je.value;if(U.length>q.length)return;if(!(jt instanceof m)){var Rt=1,Ye;if(ze){if(Ye=A(ft,ut,q,Ie),!Ye||Ye.index>=q.length)break;var Ft=Ye.index,Br=Ye.index+Ye[0].length,Wt=ut;for(Wt+=je.value.length;Ft>=Wt;)je=je.next,Wt+=je.value.length;if(Wt-=je.value.length,ut=Wt,je.value instanceof m)continue;for(var Ar=je;Ar!==U.tail&&(WtV.reach&&(V.reach=Rr);var Dt=je.prev;Hr&&(Dt=S(U,Dt,Hr),ut+=Hr.length),I(U,Dt,Rt);var z=new m(J,le?x.tokenize(br,le):br,mt,br);if(je=S(U,Dt,z),Or&&S(U,je,Or),Rt>1){var Z={cause:J+","+ue,reach:Rr};C(q,U,L,je.prev,ut,Z),V&&Z.reach>V.reach&&(V.reach=Z.reach)}}}}}}function P(){var q={value:null,prev:null,next:null},U={value:null,prev:q,next:null};q.next=U,this.head=q,this.tail=U,this.length=0}function S(q,U,L){var H=U.next,W={value:L,prev:U,next:H};return U.next=W,H.prev=W,q.length++,W}function I(q,U,L){for(var H=U.next,W=0;W/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(c,g){var $={};$["language-"+g]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[g]},$.cdata=/^$/i;var x={"included-cdata":{pattern://i,inside:$}};x["language-"+g]={pattern:/[\s\S]+/,inside:e.languages[g]};var m={};m[c]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return c}),"i"),lookbehind:!0,greedy:!0,inside:x},e.languages.insertBefore("markup","cdata",m)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(n,c){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[c,"language-"+c],inside:e.languages[c]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml,function(n){var c=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+c.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+c.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+c.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+c.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:c,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var g=n.languages.markup;g&&(g.tag.addInlined("style","css"),g.tag.addAttribute("style","css"))}(e),e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript,function(){if(typeof e>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n="Loading…",c=function(ee,re){return"✖ Error "+ee+" while fetching file: "+re},g="✖ Error: File does not exist or is empty",$={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},x="data-src-status",m="loading",A="loaded",C="failed",P="pre[data-src]:not(["+x+'="'+A+'"]):not(['+x+'="'+m+'"])';function S(ee,re,ge){var q=new XMLHttpRequest;q.open("GET",ee,!0),q.onreadystatechange=function(){q.readyState==4&&(q.status<400&&q.responseText?re(q.responseText):q.status>=400?ge(c(q.status,q.statusText)):ge(g))},q.send(null)}function I(ee){var re=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(ee||"");if(re){var ge=Number(re[1]),q=re[2],U=re[3];return q?U?[ge,Number(U)]:[ge,void 0]:[ge,ge]}}e.hooks.add("before-highlightall",function(ee){ee.selector+=", "+P}),e.hooks.add("before-sanity-check",function(ee){var re=ee.element;if(re.matches(P)){ee.code="",re.setAttribute(x,m);var ge=re.appendChild(document.createElement("CODE"));ge.textContent=n;var q=re.getAttribute("data-src"),U=ee.language;if(U==="none"){var L=(/\.(\w+)$/.exec(q)||[,"none"])[1];U=$[L]||L}e.util.setLanguage(ge,U),e.util.setLanguage(re,U);var H=e.plugins.autoloader;H&&H.loadLanguages(U),S(q,function(W){re.setAttribute(x,A);var V=I(re.getAttribute("data-range"));if(V){var J=W.split(/\r\n?|\n/g),Y=V[0],ue=V[1]==null?J.length:V[1];Y<0&&(Y+=J.length),Y=Math.max(0,Math.min(Y-1,J.length)),ue<0&&(ue+=J.length),ue=Math.max(0,Math.min(ue,J.length)),W=J.slice(Y,ue).join(` +`),re.hasAttribute("data-start")||re.setAttribute("data-start",String(Y+1))}ge.textContent=W,e.highlightElement(ge)},function(W){re.setAttribute(x,C),ge.textContent=W})}}),e.plugins.fileHighlight={highlight:function(re){for(var ge=(re||document).querySelectorAll(P),q=0,U;U=ge[q++];)e.highlightElement(U)}};var G=!1;e.fileHighlight=function(){G||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),G=!0),e.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Ym);var ud={exports:{}};(function(t){var r=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */var e=function(n){var c=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,g=0,$={},x={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function q(U){return U instanceof m?new m(U.type,q(U.content),U.alias):Array.isArray(U)?U.map(q):U.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(H){var q=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(H.stack)||[])[1];if(q){var U=document.getElementsByTagName("script");for(var L in U)if(U[L].src==q)return U[L]}return null}},isActive:function(q,U,L){for(var H="no-"+U;q;){var W=q.classList;if(W.contains(U))return!0;if(W.contains(H))return!1;q=q.parentElement}return!!L}},languages:{plain:$,plaintext:$,text:$,txt:$,extend:function(q,U){var L=x.util.clone(x.languages[q]);for(var H in U)L[H]=U[H];return L},insertBefore:function(q,U,L,H){H=H||x.languages;var W=H[q],V={};for(var J in W)if(W.hasOwnProperty(J)){if(J==U)for(var Y in L)L.hasOwnProperty(Y)&&(V[Y]=L[Y]);L.hasOwnProperty(J)||(V[J]=W[J])}var ue=H[q];return H[q]=V,x.languages.DFS(x.languages,function(de,le){le===ue&&de!=q&&(this[de]=V)}),V},DFS:function q(U,L,H,W){W=W||{};var V=x.util.objId;for(var J in U)if(U.hasOwnProperty(J)){L.call(U,J,U[J],H||J);var Y=U[J],ue=x.util.type(Y);ue==="Object"&&!W[V(Y)]?(W[V(Y)]=!0,q(Y,L,null,W)):ue==="Array"&&!W[V(Y)]&&(W[V(Y)]=!0,q(Y,L,J,W))}}},plugins:{},highlightAll:function(q,U){x.highlightAllUnder(document,q,U)},highlightAllUnder:function(q,U,L){var H={callback:L,container:q,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};x.hooks.run("before-highlightall",H),H.elements=Array.prototype.slice.apply(H.container.querySelectorAll(H.selector)),x.hooks.run("before-all-elements-highlight",H);for(var W=0,V;V=H.elements[W++];)x.highlightElement(V,U===!0,H.callback)},highlightElement:function(q,U,L){var H=x.util.getLanguage(q),W=x.languages[H];x.util.setLanguage(q,H);var V=q.parentElement;V&&V.nodeName.toLowerCase()==="pre"&&x.util.setLanguage(V,H);var J=q.textContent,Y={element:q,language:H,grammar:W,code:J};function ue(le){Y.highlightedCode=le,x.hooks.run("before-insert",Y),Y.element.innerHTML=Y.highlightedCode,x.hooks.run("after-highlight",Y),x.hooks.run("complete",Y),L&&L.call(Y.element)}if(x.hooks.run("before-sanity-check",Y),V=Y.element.parentElement,V&&V.nodeName.toLowerCase()==="pre"&&!V.hasAttribute("tabindex")&&V.setAttribute("tabindex","0"),!Y.code){x.hooks.run("complete",Y),L&&L.call(Y.element);return}if(x.hooks.run("before-highlight",Y),!Y.grammar){ue(x.util.encode(Y.code));return}if(U&&n.Worker){var de=new Worker(x.filename);de.onmessage=function(le){ue(le.data)},de.postMessage(JSON.stringify({language:Y.language,code:Y.code,immediateClose:!0}))}else ue(x.highlight(Y.code,Y.grammar,Y.language))},highlight:function(q,U,L){var H={code:q,grammar:U,language:L};if(x.hooks.run("before-tokenize",H),!H.grammar)throw new Error('The language "'+H.language+'" has no grammar.');return H.tokens=x.tokenize(H.code,H.grammar),x.hooks.run("after-tokenize",H),m.stringify(x.util.encode(H.tokens),H.language)},tokenize:function(q,U){var L=U.rest;if(L){for(var H in L)U[H]=L[H];delete U.rest}var W=new P;return S(W,W.head,q),C(q,W,U,W.head,0),G(W)},hooks:{all:{},add:function(q,U){var L=x.hooks.all;L[q]=L[q]||[],L[q].push(U)},run:function(q,U){var L=x.hooks.all[q];if(!(!L||!L.length))for(var H=0,W;W=L[H++];)W(U)}},Token:m};n.Prism=x;function m(q,U,L,H){this.type=q,this.content=U,this.alias=L,this.length=(H||"").length|0}m.stringify=function q(U,L){if(typeof U=="string")return U;if(Array.isArray(U)){var H="";return U.forEach(function(ue){H+=q(ue,L)}),H}var W={type:U.type,content:q(U.content,L),tag:"span",classes:["token",U.type],attributes:{},language:L},V=U.alias;V&&(Array.isArray(V)?Array.prototype.push.apply(W.classes,V):W.classes.push(V)),x.hooks.run("wrap",W);var J="";for(var Y in W.attributes)J+=" "+Y+'="'+(W.attributes[Y]||"").replace(/"/g,""")+'"';return"<"+W.tag+' class="'+W.classes.join(" ")+'"'+J+">"+W.content+""};function A(q,U,L,H){q.lastIndex=U;var W=q.exec(L);if(W&&H&&W[1]){var V=W[1].length;W.index+=V,W[0]=W[0].slice(V)}return W}function C(q,U,L,H,W,V){for(var J in L)if(!(!L.hasOwnProperty(J)||!L[J])){var Y=L[J];Y=Array.isArray(Y)?Y:[Y];for(var ue=0;ue=V.reach);ut+=je.value.length,je=je.next){var jt=je.value;if(U.length>q.length)return;if(!(jt instanceof m)){var Rt=1,Ye;if(ze){if(Ye=A(ft,ut,q,Ie),!Ye||Ye.index>=q.length)break;var Ft=Ye.index,Br=Ye.index+Ye[0].length,Wt=ut;for(Wt+=je.value.length;Ft>=Wt;)je=je.next,Wt+=je.value.length;if(Wt-=je.value.length,ut=Wt,je.value instanceof m)continue;for(var Ar=je;Ar!==U.tail&&(WtV.reach&&(V.reach=Rr);var Dt=je.prev;Hr&&(Dt=S(U,Dt,Hr),ut+=Hr.length),I(U,Dt,Rt);var z=new m(J,le?x.tokenize(br,le):br,mt,br);if(je=S(U,Dt,z),Or&&S(U,je,Or),Rt>1){var Z={cause:J+","+ue,reach:Rr};C(q,U,L,je.prev,ut,Z),V&&Z.reach>V.reach&&(V.reach=Z.reach)}}}}}}function P(){var q={value:null,prev:null,next:null},U={value:null,prev:q,next:null};q.next=U,this.head=q,this.tail=U,this.length=0}function S(q,U,L){var H=U.next,W={value:L,prev:U,next:H};return U.next=W,H.prev=W,q.length++,W}function I(q,U,L){for(var H=U.next,W=0;W]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;const ex={computed:{hasHeader(){return!!this.$slots.header},hasFooter(){return!!this.$slots.footer}}},tx="_container_157we_2",rx="_header_157we_9",sx="_main_157we_14",nx="_footer_157we_19",ax={container:tx,header:rx,main:sx,footer:nx};function ix(t,r,e,n,c,g){return wt(),Ut("div",{class:Tr(t.$style.container)},[g.hasHeader?(wt(),Ut("header",{key:0,class:Tr(t.$style.header)},[Of(t.$slots,"header")],2)):Xn("",!0),Mt("main",{class:Tr(t.$style.main)},[Of(t.$slots,"default")],2),g.hasFooter?(wt(),Ut("footer",{key:1,class:Tr(t.$style.footer)},[Of(t.$slots,"footer")],2)):Xn("",!0)],2)}const lx={$style:ax},Fr=ai(ex,[["render",ix],["__cssModules",lx]]),ox=si({__name:"Editor",props:{modelValue:{},samples:{},parseError:{}},emits:["run","update:modelValue"],setup(t,{emit:r}){const e=t,n=r,c=wr(e.modelValue);ri(c,()=>{n("update:modelValue",c.value)},{immediate:!0});function g(x){c.value=e.samples[x]}const $=x=>Fv.highlight(x,Fv.languages.js,"javascript");return(x,m)=>(wt(),wi(Fr,null,{header:ot(()=>[It(" Input "),e.samples?(wt(),Ut("div",{key:0,class:Tr(x.$style.actions)},[nt(Zg,{options:Object.keys(e.samples),onSelect:g},{default:ot(()=>[It("Samples")]),_:1},8,["options"])],2)):Xn("",!0)]),footer:ot(()=>[e.parseError?(wt(),Ut("span",{key:0,class:Tr(x.$style.parseError)},Dr(e.parseError),3)):Xn("",!0),Mt("div",{class:Tr(x.$style.actions)},[Mt("button",{onClick:m[1]||(m[1]=A=>n("run"))},"RUN")],2)]),default:ot(()=>[nt(Mi(Qm),{class:Tr(x.$style.code),modelValue:c.value,"onUpdate:modelValue":m[0]||(m[0]=A=>c.value=A),highlight:$,"line-numbers":!1},null,8,["class","modelValue"])]),_:1}))}}),ux="_code_kvmon_2",fx="_parseError_kvmon_6",cx="_actions_kvmon_9",hx={code:ux,parseError:fx,actions:cx},px={$style:hx},yf=ai(ox,[["__cssModules",px]]),vx=t=>(vf("data-v-b7034ed2"),t=t(),gf(),t),gx={id:"root"},dx={id:"grid1"},yx={class:"type"},wx={id:"grid2"},mx=vx(()=>Mt("header",null,null,-1)),xx=si({__name:"index",setup(t){const r=wr(window.localStorage.getItem(Cv)??'<: "Hello, AiScript!"'),e=wr(null),n=wr([]),c=wr(null);ri(r,()=>{window.localStorage.setItem(Cv,r.value);try{e.value=Um.parse(r.value),c.value=null}catch(x){const m=x;c.value=m.message,console.error("info"in m?m.info:m);return}},{immediate:!0});let g=null;const $=async()=>{n.value=[],g==null||g.abort(),g=new ts({},{in:x=>new Promise(m=>{const A=window.prompt(x);m(A??"")}),out:x=>{n.value.push({id:Math.random(),type:x.type,text:ph(x,!0),print:!0})},err:x=>{window.alert(x.toString())},log:(x,m)=>{switch(x){case"end":n.value.push({id:Math.random(),text:ph(m.val,!0),print:!1});break}}});try{await g.exec(e.value)}catch(x){console.error(x),window.alert("Internal Error: "+x)}};return(x,m)=>(wt(),Ut("div",gx,[Mt("div",dx,[nt(yf,{modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=A=>r.value=A),samples:Mi(qm),parseError:c.value,onRun:$},null,8,["modelValue","samples","parseError"]),nt(Fr,{id:"logs"},{header:ot(()=>[It("Output")]),default:ot(()=>[(wt(!0),Ut(Ir,null,fu(n.value,A=>(wt(),Ut("div",{class:Tr(["log",[{print:A.print},A.type]]),key:A.id},[Mt("span",yx,Dr(A.type),1),It(" "+Dr(A.text),1)],2))),128))]),_:1})]),Mt("div",wx,[nt(Fr,{id:"ast"},{header:ot(()=>[It("AST")]),default:ot(()=>[Mt("pre",null,Dr(JSON.stringify(e.value,null," ")),1)]),_:1}),nt(Fr,{id:"bin"},{header:ot(()=>[It("Bytecode")]),default:ot(()=>[mx]),_:1}),nt(Fr,{id:"debugger"},{header:ot(()=>[It("Debugger")]),_:1})])]))}});const $x=ai(xx,[["__scopeId","data-v-b7034ed2"]]);function xr(t,r,e){let n=e.value;return{configurable:!0,get(){const c=n.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,value:c}),c},set(c){n=c}}}let xc=class fd extends Error{constructor(e,n){super(e);be(this,"name","AiScript");be(this,"info");this.info=n,Error.captureStackTrace&&Error.captureStackTrace(this,fd)}},bx=class extends xc{constructor(e){super(e.message??`${e}`,e);be(this,"name","Internal")}},hu=class extends xc{constructor(e,n){super(e,n);be(this,"name","Syntax")}},tr=class extends xc{constructor(e,n){super(e,n);be(this,"name","Runtime")}},Ax=class extends tr{constructor(r,e){super(r,e)}};var Fi=globalThis&&globalThis.__decorate||function(t,r,e,n){var c=arguments.length,g=c<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(t,r,e,n);else for(var x=t.length-1;x>=0;x--)($=t[x])&&(g=(c<3?$(g):c>3?$(r,e,g):$(r,e))||g);return c>3&&g&&Object.defineProperty(r,e,g),g};let li=class cd{constructor(r=[],e,n){be(this,"parent");be(this,"layerdStates");be(this,"name");be(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=n||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const n=[r,...this.layerdStates];return new cd(n,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const n=e.get(r).value;return this.log("read",{var:r,val:n}),n}throw new tr(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}exists(r){for(const e of this.layerdStates)if(e.has(r))return this.log("exists",{var:r}),!0;return this.log("not exists",{var:r}),!1}getAll(){const r=this.layerdStates.reduce((e,n)=>[...e,...n],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const n=this.layerdStates[0];if(n.has(r))throw new tr(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(r,e),this.parent==null&&this.onUpdated(r,e.value)}assign(r,e){let n=1;for(const c of this.layerdStates){if(c.has(r)){const g=c.get(r);if(!g.isMutable)throw new tr(`Cannot assign to an immutable variable ${r}.`);g.value=e,this.log("assign",{var:r,val:e}),n===this.layerdStates.length&&this.onUpdated(r,e);return}n++}throw new tr(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}};Fi([xr],li.prototype,"log",null);Fi([xr],li.prototype,"onUpdated",null);Fi([xr],li.prototype,"createChildScope",null);Fi([xr],li.prototype,"get",null);Fi([xr],li.prototype,"exists",null);Fi([xr],li.prototype,"getAll",null);Fi([xr],li.prototype,"add",null);Fi([xr],li.prototype,"assign",null);let Pf;const _x=new Uint8Array(16);function Cx(){if(!Pf&&(Pf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Pf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Pf(_x)}const Gr=[];for(let t=0;t<256;++t)Gr.push((t+256).toString(16).slice(1));function kx(t,r=0){return Gr[t[r+0]]+Gr[t[r+1]]+Gr[t[r+2]]+Gr[t[r+3]]+"-"+Gr[t[r+4]]+Gr[t[r+5]]+"-"+Gr[t[r+6]]+Gr[t[r+7]]+"-"+Gr[t[r+8]]+Gr[t[r+9]]+"-"+Gr[t[r+10]]+Gr[t[r+11]]+Gr[t[r+12]]+Gr[t[r+13]]+Gr[t[r+14]]+Gr[t[r+15]]}const Px=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ov={randomUUID:Px};function Ex(t,r,e){if(Ov.randomUUID&&!r&&!t)return Ov.randomUUID();t=t||{};const n=t.random||(t.rng||Cx)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){e=e||0;for(let c=0;c<16;++c)r[e+c]=n[c];return r}return kx(n)}var pp={exports:{}};pp.exports;(function(t){(function(r,e,n){function c(m){var A=this,C=x();A.next=function(){var P=2091639*A.s0+A.c*23283064365386963e-26;return A.s0=A.s1,A.s1=A.s2,A.s2=P-(A.c=P|0)},A.c=1,A.s0=C(" "),A.s1=C(" "),A.s2=C(" "),A.s0-=C(m),A.s0<0&&(A.s0+=1),A.s1-=C(m),A.s1<0&&(A.s1+=1),A.s2-=C(m),A.s2<0&&(A.s2+=1),C=null}function g(m,A){return A.c=m.c,A.s0=m.s0,A.s1=m.s1,A.s2=m.s2,A}function $(m,A){var C=new c(m),P=A&&A.state,S=C.next;return S.int32=function(){return C.next()*4294967296|0},S.double=function(){return S()+(S()*2097152|0)*11102230246251565e-32},S.quick=S,P&&(typeof P=="object"&&g(P,C),S.state=function(){return g(C,{})}),S}function x(){var m=4022871197,A=function(C){C=String(C);for(var P=0;P>>0,S-=m,S*=m,m=S>>>0,S-=m,m+=S*4294967296}return(m>>>0)*23283064365386963e-26};return A}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.alea=$})(Tt,t,!1)})(pp);var Mx=pp.exports,vp={exports:{}};vp.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.x=0,m.y=0,m.z=0,m.w=0,m.next=function(){var P=m.x^m.x<<11;return m.x=m.y,m.y=m.z,m.z=m.w,m.w^=m.w>>>19^P^P>>>8},x===(x|0)?m.x=x:A+=x;for(var C=0;C>>0)/4294967296};return P.double=function(){do var S=A.next()>>>11,I=(A.next()>>>0)/4294967296,G=(S+I)/(1<<21);while(G===0);return G},P.int32=A.next,P.quick=P,C&&(typeof C=="object"&&g(C,A),P.state=function(){return g(A,{})}),P}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xor128=$})(Tt,t,!1)})(vp);var Sx=vp.exports,gp={exports:{}};gp.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.next=function(){var P=m.x^m.x>>>2;return m.x=m.y,m.y=m.z,m.z=m.w,m.w=m.v,(m.d=m.d+362437|0)+(m.v=m.v^m.v<<4^(P^P<<1))|0},m.x=0,m.y=0,m.z=0,m.w=0,m.v=0,x===(x|0)?m.x=x:A+=x;for(var C=0;C>>4),m.next()}function g(x,m){return m.x=x.x,m.y=x.y,m.z=x.z,m.w=x.w,m.v=x.v,m.d=x.d,m}function $(x,m){var A=new c(x),C=m&&m.state,P=function(){return(A.next()>>>0)/4294967296};return P.double=function(){do var S=A.next()>>>11,I=(A.next()>>>0)/4294967296,G=(S+I)/(1<<21);while(G===0);return G},P.int32=A.next,P.quick=P,C&&(typeof C=="object"&&g(C,A),P.state=function(){return g(A,{})}),P}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xorwow=$})(Tt,t,!1)})(gp);var Fx=gp.exports,dp={exports:{}};dp.exports;(function(t){(function(r,e,n){function c(x){var m=this;m.next=function(){var C=m.x,P=m.i,S,I;return S=C[P],S^=S>>>7,I=S^S<<24,S=C[P+1&7],I^=S^S>>>10,S=C[P+3&7],I^=S^S>>>3,S=C[P+4&7],I^=S^S<<7,S=C[P+7&7],S=S^S<<13,I^=S^S<<9,C[P]=I,m.i=P+1&7,I};function A(C,P){var S,I=[];if(P===(P|0))I[0]=P;else for(P=""+P,S=0;S0;--S)C.next()}A(m,x)}function g(x,m){return m.x=x.x.slice(),m.i=x.i,m}function $(x,m){x==null&&(x=+new Date);var A=new c(x),C=m&&m.state,P=function(){return(A.next()>>>0)/4294967296};return P.double=function(){do var S=A.next()>>>11,I=(A.next()>>>0)/4294967296,G=(S+I)/(1<<21);while(G===0);return G},P.int32=A.next,P.quick=P,C&&(C.x&&g(C,A),P.state=function(){return g(A,{})}),P}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xorshift7=$})(Tt,t,!1)})(dp);var Ox=dp.exports,yp={exports:{}};yp.exports;(function(t){(function(r,e,n){function c(x){var m=this;m.next=function(){var C=m.w,P=m.X,S=m.i,I,G;return m.w=C=C+1640531527|0,G=P[S+34&127],I=P[S=S+1&127],G^=G<<13,I^=I<<17,G^=G>>>15,I^=I>>>12,G=P[S]=G^I,m.i=S,G+(C^C>>>16)|0};function A(C,P){var S,I,G,ee,re,ge=[],q=128;for(P===(P|0)?(I=P,P=null):(P=P+"\0",I=0,q=Math.max(q,P.length)),G=0,ee=-32;ee>>15,I^=I<<4,I^=I>>>13,ee>=0&&(re=re+1640531527|0,S=ge[ee&127]^=I+re,G=S==0?G+1:0);for(G>=128&&(ge[(P&&P.length||0)&127]=-1),G=127,ee=4*128;ee>0;--ee)I=ge[G+34&127],S=ge[G=G+1&127],I^=I<<13,S^=S<<17,I^=I>>>15,S^=S>>>12,ge[G]=I^S;C.w=re,C.X=ge,C.i=G}A(m,x)}function g(x,m){return m.i=x.i,m.w=x.w,m.X=x.X.slice(),m}function $(x,m){x==null&&(x=+new Date);var A=new c(x),C=m&&m.state,P=function(){return(A.next()>>>0)/4294967296};return P.double=function(){do var S=A.next()>>>11,I=(A.next()>>>0)/4294967296,G=(S+I)/(1<<21);while(G===0);return G},P.int32=A.next,P.quick=P,C&&(C.X&&g(C,A),P.state=function(){return g(A,{})}),P}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xor4096=$})(Tt,t,!1)})(yp);var Nx=yp.exports,wp={exports:{}};wp.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.next=function(){var P=m.b,S=m.c,I=m.d,G=m.a;return P=P<<25^P>>>7^S,S=S-I|0,I=I<<24^I>>>8^G,G=G-P|0,m.b=P=P<<20^P>>>12^S,m.c=S=S-I|0,m.d=I<<16^S>>>16^G,m.a=G-P|0},m.a=0,m.b=0,m.c=-1640531527,m.d=1367130551,x===Math.floor(x)?(m.a=x/4294967296|0,m.b=x|0):A+=x;for(var C=0;C>>0)/4294967296};return P.double=function(){do var S=A.next()>>>11,I=(A.next()>>>0)/4294967296,G=(S+I)/(1<<21);while(G===0);return G},P.int32=A.next,P.quick=P,C&&(typeof C=="object"&&g(C,A),P.state=function(){return g(A,{})}),P}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.tychei=$})(Tt,t,!1)})(wp);var Ix=wp.exports,hd={exports:{}};(function(t){(function(r,e,n){var c=256,g=6,$=52,x="random",m=n.pow(c,g),A=n.pow(2,$),C=A*2,P=c-1,S;function I(L,H,W){var V=[];H=H==!0?{entropy:!0}:H||{};var J=ge(re(H.entropy?[L,U(e)]:L??q(),3),V),Y=new G(V),ue=function(){for(var de=Y.g(g),le=m,Ie=0;de=C;)de/=2,le/=2,Ie>>>=1;return(de+Ie)/le};return ue.int32=function(){return Y.g(4)|0},ue.quick=function(){return Y.g(4)/4294967296},ue.double=ue,ge(U(Y.S),e),(H.pass||W||function(de,le,Ie,ze){return ze&&(ze.S&&ee(ze,Y),de.state=function(){return ee(Y,{})}),Ie?(n[x]=de,le):de})(ue,J,"global"in H?H.global:this==n,H.state)}function G(L){var H,W=L.length,V=this,J=0,Y=V.i=V.j=0,ue=V.S=[];for(W||(L=[W++]);J({type:"num",value:t}),Qt=t=>({type:"str",value:t}),su=t=>({type:"bool",value:t}),sc=t=>({type:"obj",value:t}),ns=t=>({type:"arr",value:t}),zx=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),ce=t=>({type:"fn",native:t}),Vx=t=>({type:"return",value:t}),Wx=()=>({type:"break",value:null}),Kx=()=>({type:"continue",value:null}),Jx=t=>t.type==="return"?t.value:t,yh=(t,r)=>({type:"error",value:t,info:r});function an(t){if(t==null)throw new tr("Expect anything, but got nothing.")}function bs(t){if(t==null)throw new tr("Expect boolean, but got nothing.");if(t.type!=="bool")throw new tr(`Expect boolean, but got ${t.type}.`)}function xi(t){if(t==null)throw new tr("Expect function, but got nothing.");if(t.type!=="fn")throw new tr(`Expect function, but got ${t.type}.`)}function Sr(t){if(t==null)throw new tr("Expect string, but got nothing.");if(t.type!=="str")throw new tr(`Expect string, but got ${t.type}.`)}function Ce(t){if(t==null)throw new tr("Expect number, but got nothing.");if(t.type!=="num")throw new tr(`Expect number, but got ${t.type}.`)}function Wn(t){if(t==null)throw new tr("Expect object, but got nothing.");if(t.type!=="obj")throw new tr(`Expect object, but got ${t.type}.`)}function nc(t){if(t==null)throw new tr("Expect array, but got nothing.");if(t.type!=="arr")throw new tr(`Expect array, but got ${t.type}.`)}function Rc(t){return t.type==="obj"}function Nv(t){return t.type==="arr"}function wh(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function mh(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(n=>mh(n,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function xh(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>xh(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,n]of t.value.entries())r[e]=xh(n);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function $h(t){if(t===null)return Pt;if(typeof t=="boolean")return su(t);if(typeof t=="string")return Qt(t);if(typeof t=="number")return Se(t);if(Array.isArray(t))return ns(t.map(r=>$h(r)));if(typeof t=="object"){const r=new Map;for(const[e,n]of Object.entries(t))r.set(e,$h(n));return sc(r)}return Pt}function ju(t,r=!1,e=new Set){if((t.type==="arr"||t.type==="obj")&&e.has(t.value))return"...";if(r&&t.type==="str")return'"'+t.value.replace(/["\\\r\n]/g,n=>`\\${n}`)+'"';if(t.type==="str")return t.value;if(t.type==="num")return t.value.toString();if(t.type==="arr"){e.add(t.value);const n=[];for(const c of t.value)n.push(ju(c,!0,e));return"[ "+n.join(", ")+" ]"}if(t.type==="obj"){e.add(t.value);const n=[];for(const[c,g]of t.value)n.push(`${c}: ${ju(g,!0,e)}`);return"{ "+n.join(", ")+" }"}return t.type==="bool"?t.value.toString():t.type==="null"?"null":t.type==="fn"?`@( ${(t.args??[]).join(", ")} ) { ... }`:"?"}const Xx={help:Qt("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":Qt("0.16.0"),"Core:ai":Qt("kawaii"),"Core:not":ce(([t])=>(bs(t),t.value?en:vn)),"Core:eq":ce(([t,r])=>(an(t),an(r),wh(t,r)?vn:en)),"Core:neq":ce(([t,r])=>(an(t),an(r),wh(t,r)?en:vn)),"Core:and":ce(([t,r])=>(bs(t),t.value?(bs(r),r.value?vn:en):en)),"Core:or":ce(([t,r])=>(bs(t),t.value?vn:(bs(r),r.value?vn:en))),"Core:add":ce(([t,r])=>(Ce(t),Ce(r),Se(t.value+r.value))),"Core:sub":ce(([t,r])=>(Ce(t),Ce(r),Se(t.value-r.value))),"Core:mul":ce(([t,r])=>(Ce(t),Ce(r),Se(t.value*r.value))),"Core:pow":ce(([t,r])=>{Ce(t),Ce(r);const e=t.value**r.value;if(isNaN(e))throw new tr("Invalid operation.");return Se(e)}),"Core:div":ce(([t,r])=>{Ce(t),Ce(r);const e=t.value/r.value;if(isNaN(e))throw new tr("Invalid operation.");return Se(e)}),"Core:mod":ce(([t,r])=>(Ce(t),Ce(r),Se(t.value%r.value))),"Core:gt":ce(([t,r])=>(Ce(t),Ce(r),t.value>r.value?vn:en)),"Core:lt":ce(([t,r])=>(Ce(t),Ce(r),t.value(Ce(t),Ce(r),t.value>=r.value?vn:en)),"Core:lteq":ce(([t,r])=>(Ce(t),Ce(r),t.value<=r.value?vn:en)),"Core:type":ce(([t])=>(an(t),Qt(t.type))),"Core:to_str":ce(([t])=>(an(t),Qt(ju(t)))),"Core:range":ce(([t,r])=>(Ce(t),Ce(r),t.valueSe(n+t.value))):t.value>r.value?ns(Array.from({length:t.value-r.value+1},(e,n)=>Se(t.value-n))):ns([t]))),"Core:sleep":ce(async([t])=>(Ce(t),await new Promise(r=>setTimeout(r,t.value)),Pt)),"Util:uuid":ce(()=>Qt(Ex())),"Json:stringify":ce(([t])=>(an(t),Qt(JSON.stringify(xh(t))))),"Json:parse":ce(([t])=>{Sr(t);try{return $h(JSON.parse(t.value))}catch{return yh("not_json")}}),"Json:parsable":ce(([t])=>{Sr(t);try{JSON.parse(t.value)}catch{return su(!1)}return su(!0)}),"Date:now":ce(()=>Se(Date.now())),"Date:year":ce(([t])=>(t&&Ce(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":ce(([t])=>(t&&Ce(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":ce(([t])=>(t&&Ce(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":ce(([t])=>(t&&Ce(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":ce(([t])=>(t&&Ce(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":ce(([t])=>(t&&Ce(t),Se(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":ce(([t])=>(Sr(t),Se(new Date(t.value).getTime()))),"Math:Infinity":Se(1/0),"Math:E":Se(Math.E),"Math:LN2":Se(Math.LN2),"Math:LN10":Se(Math.LN10),"Math:LOG2E":Se(Math.LOG2E),"Math:LOG10E":Se(Math.LOG10E),"Math:PI":Se(Math.PI),"Math:SQRT1_2":Se(Math.SQRT1_2),"Math:SQRT2":Se(Math.SQRT2),"Math:abs":ce(([t])=>(Ce(t),Se(Math.abs(t.value)))),"Math:acos":ce(([t])=>(Ce(t),Se(Math.acos(t.value)))),"Math:acosh":ce(([t])=>(Ce(t),Se(Math.acosh(t.value)))),"Math:asin":ce(([t])=>(Ce(t),Se(Math.asin(t.value)))),"Math:asinh":ce(([t])=>(Ce(t),Se(Math.asinh(t.value)))),"Math:atan":ce(([t])=>(Ce(t),Se(Math.atan(t.value)))),"Math:atanh":ce(([t])=>(Ce(t),Se(Math.atanh(t.value)))),"Math:atan2":ce(([t,r])=>(Ce(t),Ce(r),Se(Math.atan2(t.value,r.value)))),"Math:cbrt":ce(([t])=>(Ce(t),Se(Math.cbrt(t.value)))),"Math:ceil":ce(([t])=>(Ce(t),Se(Math.ceil(t.value)))),"Math:clz32":ce(([t])=>(Ce(t),Se(Math.clz32(t.value)))),"Math:cos":ce(([t])=>(Ce(t),Se(Math.cos(t.value)))),"Math:cosh":ce(([t])=>(Ce(t),Se(Math.cosh(t.value)))),"Math:exp":ce(([t])=>(Ce(t),Se(Math.exp(t.value)))),"Math:expm1":ce(([t])=>(Ce(t),Se(Math.expm1(t.value)))),"Math:floor":ce(([t])=>(Ce(t),Se(Math.floor(t.value)))),"Math:fround":ce(([t])=>(Ce(t),Se(Math.fround(t.value)))),"Math:hypot":ce(([t])=>{nc(t);const r=[];for(const e of t.value)Ce(e),r.push(e.value);return Se(Math.hypot(...r))}),"Math:imul":ce(([t,r])=>(Ce(t),Ce(r),Se(Math.imul(t.value,r.value)))),"Math:log":ce(([t])=>(Ce(t),Se(Math.log(t.value)))),"Math:log1p":ce(([t])=>(Ce(t),Se(Math.log1p(t.value)))),"Math:log10":ce(([t])=>(Ce(t),Se(Math.log10(t.value)))),"Math:log2":ce(([t])=>(Ce(t),Se(Math.log2(t.value)))),"Math:max":ce(([t,r])=>(Ce(t),Ce(r),Se(Math.max(t.value,r.value)))),"Math:min":ce(([t,r])=>(Ce(t),Ce(r),Se(Math.min(t.value,r.value)))),"Math:pow":ce(([t,r])=>(Ce(t),Ce(r),Se(Math.pow(t.value,r.value)))),"Math:round":ce(([t])=>(Ce(t),Se(Math.round(t.value)))),"Math:sign":ce(([t])=>(Ce(t),Se(Math.sign(t.value)))),"Math:sin":ce(([t])=>(Ce(t),Se(Math.sin(t.value)))),"Math:sinh":ce(([t])=>(Ce(t),Se(Math.sinh(t.value)))),"Math:sqrt":ce(([t])=>{Ce(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new tr("Invalid operation.");return Se(r)}),"Math:tan":ce(([t])=>(Ce(t),Se(Math.tan(t.value)))),"Math:tanh":ce(([t])=>(Ce(t),Se(Math.tanh(t.value)))),"Math:trunc":ce(([t])=>(Ce(t),Se(Math.trunc(t.value)))),"Math:rnd":ce(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?Se(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):Se(Math.random())),"Math:gen_rng":ce(([t])=>{if(an(t),t.type!=="num"&&t.type!=="str")return Pt;const r=qx(t.value.toString());return ce(([e,n])=>e&&e.type==="num"&&n&&n.type==="num"?Se(Math.floor(r()*(Math.floor(n.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):Se(r()))}),"Num:to_hex":ce(([t])=>(Ce(t),Qt(t.value.toString(16)))),"Num:from_hex":ce(([t])=>(Sr(t),Se(parseInt(t.value,16)))),"Str:lf":Qt(` +`),"Str:lt":ce(([t,r])=>(Sr(t),Sr(r),t.value(Sr(t),Sr(r),t.value>r.value?Se(-1):t.value===r.value?Se(0):Se(1))),"Str:from_codepoint":ce(([t])=>(Ce(t),Qt(String.fromCodePoint(t.value)))),"Obj:keys":ce(([t])=>(Wn(t),ns(Array.from(t.value.keys()).map(r=>Qt(r))))),"Obj:vals":ce(([t])=>(Wn(t),ns(Array.from(t.value.values())))),"Obj:kvs":ce(([t])=>(Wn(t),ns(Array.from(t.value.entries()).map(([r,e])=>ns([Qt(r),e]))))),"Obj:get":ce(([t,r])=>(Wn(t),Sr(r),t.value.get(r.value)??Pt)),"Obj:set":ce(([t,r,e])=>(Wn(t),Sr(r),an(e),t.value.set(r.value,e),Pt)),"Obj:has":ce(([t,r])=>(Wn(t),Sr(r),su(t.value.has(r.value)))),"Obj:copy":ce(([t])=>(Wn(t),sc(new Map(t.value)))),"Obj:merge":ce(([t,r])=>(Wn(t),Wn(r),sc(new Map([...t.value,...r.value])))),"Error:create":ce(([t,r])=>(Sr(t),yh(t.value,r))),"Async:interval":ce(async([t,r,e],n)=>{Ce(t),xi(r),e&&(bs(e),e.value&&n.call(r,[]));const c=setInterval(()=>{n.topCall(r,[])},t.value),g=()=>{clearInterval(c)};return n.registerAbortHandler(g),ce(([],$)=>{clearInterval(c),$.unregisterAbortHandler(g)})}),"Async:timeout":ce(async([t,r],e)=>{Ce(t),xi(r);const n=setTimeout(()=>{e.topCall(r,[])},t.value),c=()=>{clearTimeout(n)};return e.registerAbortHandler(c),ce(([],g)=>{clearTimeout(n),g.unregisterAbortHandler(c)})})};var mu={},Gx=()=>{const t="\\ud800-\\udfff",r="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",c="\\u1ab0-\\u1aff",g="\\u1dc0-\\u1dff",$=r+e+n+c+g,x="\\ufe0e\\ufe0f",m="\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93",A=`[${t}]`,C=`[${$}]`,P="\\ud83c[\\udffb-\\udfff]",S=`(?:${C}|${P})`,I=`[^${t}]`,G="(?:\\uD83C[\\uDDE6-\\uDDFF]){2}",ee="[\\ud800-\\udbff][\\udc00-\\udfff]",re="\\u200d",ge="(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)",q=`[${m}]`,U=`${S}?`,L=`[${x}]?`,H=`(?:${re}(?:${[I,G,ee].join("|")})${L+U})*`,W=L+U+H,J=`(?:${[`${I}${C}?`,C,G,ee,A,q].join("|")})`;return new RegExp(`${ge}|${P}(?=${P})|${J+W}`,"g")},Zx=Tt&&Tt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mu,"__esModule",{value:!0});var $c=Zx(Gx);function bh(t){if(typeof t!="string")throw new Error("A string is expected as input");return t.match($c.default())||[]}var Iv=mu.toArray=bh;function mp(t){if(typeof t!="string")throw new Error("Input must be a string");var r=t.match($c.default());return r===null?0:r.length}var Qx=mu.length=mp;function pd(t,r,e){if(r===void 0&&(r=0),typeof t!="string")throw new Error("Input must be a string");(typeof r!="number"||r<0)&&(r=0),typeof e=="number"&&e<0&&(e=0);var n=t.match($c.default());return n?n.slice(r,e).join(""):""}var Yx=mu.substring=pd;function e$(t,r,e){if(r===void 0&&(r=0),typeof t!="string")throw new Error("Input must be a string");var n=mp(t);if(typeof r!="number"&&(r=parseInt(r,10)),r>=n)return"";r<0&&(r+=n);var c;typeof e>"u"?c=n:(typeof e!="number"&&(e=parseInt(e,10)),c=e>=0?e+r:r);var g=t.match($c.default());return g?g.slice(r,c).join(""):""}mu.substr=e$;function t$(t,r,e,n){if(r===void 0&&(r=16),e===void 0&&(e="#"),n===void 0&&(n="right"),typeof t!="string"||typeof r!="number")throw new Error("Invalid arguments specified");if(["left","right"].indexOf(n)===-1)throw new Error("Pad position should be either left or right");typeof e!="string"&&(e=String(e));var c=mp(t);if(c>r)return pd(t,0,r);if(c=n.length)return r===""?n.length:-1;if(r==="")return e;var c=bh(r),g=!1,$;for($=e;$ce(async(r,e)=>Qt(t.value.toString()))},str:{to_num:t=>ce(async(r,e)=>{const n=parseInt(t.value,10);return isNaN(n)?Pt:Se(n)}),len:t=>Se(Qx(t.value)),replace:t=>ce(async([r,e],n)=>(Sr(r),Sr(e),Qt(t.value.split(r.value).join(e.value)))),index_of:t=>ce(async([r],e)=>(Sr(r),Se(s$(t.value,r.value)))),incl:t=>ce(async([r],e)=>(Sr(r),t.value.includes(r.value)?vn:en)),trim:t=>ce(async(r,e)=>Qt(t.value.trim())),upper:t=>ce(async(r,e)=>Qt(t.value.toUpperCase())),lower:t=>ce(async(r,e)=>Qt(t.value.toLowerCase())),split:t=>ce(async([r],e)=>(r&&Sr(r),ns(r?t.value.split(r?r.value:"").map(n=>Qt(n)):Iv(t.value).map(n=>Qt(n))))),slice:t=>ce(async([r,e],n)=>(Ce(r),Ce(e),Qt(Yx(t.value,r.value,e.value)))),pick:t=>ce(async([r],e)=>{Ce(r);const c=Iv(t.value)[r.value];return c?Qt(c):Pt}),codepoint_at:t=>ce(([r],e)=>{Ce(r);const n=t.value.charCodeAt(r.value);return Number.isNaN(n)?Pt:Se(n)})},arr:{len:t=>Se(t.value.length),push:t=>ce(async([r],e)=>(an(r),t.value.push(r),t)),unshift:t=>ce(async([r],e)=>(an(r),t.value.unshift(r),t)),pop:t=>ce(async(r,e)=>t.value.pop()??Pt),shift:t=>ce(async(r,e)=>t.value.shift()??Pt),concat:t=>ce(async([r],e)=>(nc(r),ns(t.value.concat(r.value)))),slice:t=>ce(async([r,e],n)=>(Ce(r),Ce(e),ns(t.value.slice(r.value,e.value)))),join:t=>ce(async([r],e)=>(r&&Sr(r),Qt(t.value.map(n=>n.type==="str"?n.value:"").join(r?r.value:"")))),map:t=>ce(async([r],e)=>{xi(r);const n=t.value.map(async(c,g)=>await e.call(r,[c,Se(g)]));return ns(await Promise.all(n))}),filter:t=>ce(async([r],e)=>{xi(r);const n=[];for(let c=0;cce(async([r,e],n)=>{xi(r);const c=e!=null;let g=c?e:t.value[0];for(let $=c?0:1;$ce(async([r],e)=>{xi(r);for(let n=0;nce(async([r],e)=>(an(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?en:(c=>c.value.map(g=>g.type==="str"||g.type==="num"||g.type==="bool"?g.value:g.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?vn:en)),reverse:t=>ce(async(r,e)=>(t.value.reverse(),Pt)),copy:t=>ce(async(r,e)=>ns([...t.value])),sort:t=>ce(async([r],e)=>{const n=async(g,$)=>{if(g.length<=1)return g;const x=Math.floor(g.length/2),m=await n(g.slice(0,x),$),A=await n(g.slice(x),$);return c(m,A,$)},c=async(g,$,x)=>{const m=[];let A=0,C=0;for(;AQt(t.value),info:t=>t.info??Pt}};function n$(t,r){if(Object.hasOwn(Tv,t.type)){const e=Tv[t.type];if(Object.hasOwn(e,r))return e[r](t);throw new tr(`No such prop (${r}) in ${t.type}.`)}else throw new tr(`Cannot read prop of ${t.type}. (reading ${r})`)}const a$={mut(t){return{isMutable:!0,value:t}},const(t){return{isMutable:!1,value:t}}};var Ps=globalThis&&globalThis.__decorate||function(t,r,e,n){var c=arguments.length,g=c<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(t,r,e,n);else for(var x=t.length-1;x>=0;x--)($=t[x])&&(g=(c<3?$(g):c>3?$(r,e,g):$(r,e))||g);return c>3&&g&&Object.defineProperty(r,e,g),g};const vd=300,i$=vd-1;let cs=class{constructor(r,e={}){be(this,"opts");be(this,"stepCount",0);be(this,"stop",!1);be(this,"scope");be(this,"abortHandlers",[]);be(this,"vars",{});this.opts=e;const n={print:ce(([c])=>{an(c),this.opts.out&&this.opts.out(c)}),readline:ce(async c=>{const g=c[0];if(Sr(g),this.opts.in==null)return Pt;const $=await this.opts.in(g.value);return Qt($)})};this.vars=Object.fromEntries(Object.entries({...r,...Xx,...n}).map(([c,g])=>[c,a$.const(g)])),this.scope=new li([new Map(Object.entries(this.vars))]),this.scope.opts.log=(c,g)=>{switch(c){case"add":this.log("var:add",g);break;case"read":this.log("var:read",g);break;case"write":this.log("var:write",g);break}}}async exec(r){if(!(r==null||r.length===0))try{await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}catch(e){this.handleError(e)}}async execFn(r,e){return await this._fn(r,e).catch(n=>(this.handleError(n),yh("func_failed")))}execFnSimple(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(c){switch(c.type){case"arr":return c.value.map(g=>e(g));case"bool":return c.value;case"null":return null;case"num":return c.value;case"obj":{const g={};for(const[$,x]of c.value.entries())g[$]=e(x);return g}case"str":return c.value;default:return}}const n=new Map;for(const c of r)switch(c.type){case"meta":{n.set(c.name,e(c.value));break}}return n}handleError(r){if(this.opts.err)this.stop||(this.abort(),r instanceof xc?this.opts.err(r):this.opts.err(new bx(r)));else throw r}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const n of r.members)switch(n.type){case"def":{if(n.mut)throw new Error("Namespaces cannot include mutable variable: "+n.name);const c={isMutable:n.mut,value:await this._eval(n.expr,e)};e.add(n.name,c),this.scope.add(r.name+":"+n.name,c);break}case"ns":break;default:throw new Error("invalid ns member type: "+n.type)}}async _fn(r,e){if(r.native)return r.native(e,{call:this.execFnSimple,topCall:this.execFn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??Pt;{const n=new Map;for(let g=0;g<(r.args??[]).length;g++)n.set(r.args[g],{isMutable:!0,value:e[g]});const c=r.scope.createChildScope(n);return Jx(await this._run(r.statements,c))}}async _eval(r,e){if(this.stop)return Pt;if(this.stepCount%vd===i$&&await new Promise(n=>setTimeout(n,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new tr("max step exceeded");switch(r.type){case"call":{const n=await this._eval(r.target,e);xi(n);const c=await Promise.all(r.args.map(g=>this._eval(g,e)));return this._fn(n,c)}case"if":{const n=await this._eval(r.cond,e);if(bs(n),n.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const c of r.elseif){const g=await this._eval(c.cond,e);if(bs(g),g.value)return this._eval(c.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return Pt}case"match":{const n=await this._eval(r.about,e);for(const c of r.qs){const g=await this._eval(c.q,e);if(wh(n,g))return await this._eval(c.a,e)}return r.default?await this._eval(r.default,e):Pt}case"loop":{for(;;){const n=await this._run(r.statements,e.createChildScope());if(n.type==="break")break;if(n.type==="return")return n}return Pt}case"for":{if(r.times){const n=await this._eval(r.times,e);Ce(n);for(let c=0;c0){const c=[];for(const g of r.attr)c.push({name:g.name,value:await this._eval(g.value,e)});n.attr=c}return e.add(r.name,{isMutable:r.mut,value:n}),Pt}case"identifier":return e.get(r.name);case"assign":{const n=await this._eval(r.expr,e);return await this.assign(e,r.dest,n),Pt}case"addAssign":{const n=await this._eval(r.dest,e);Ce(n);const c=await this._eval(r.expr,e);return Ce(c),await this.assign(e,r.dest,Se(n.value+c.value)),Pt}case"subAssign":{const n=await this._eval(r.dest,e);Ce(n);const c=await this._eval(r.expr,e);return Ce(c),await this.assign(e,r.dest,Se(n.value-c.value)),Pt}case"null":return Pt;case"bool":return su(r.value);case"num":return Se(r.value);case"str":return Qt(r.value);case"arr":return ns(await Promise.all(r.value.map(n=>this._eval(n,e))));case"obj":{const n=new Map;for(const c of r.value.keys())n.set(c,await this._eval(r.value.get(c),e));return sc(n)}case"prop":{const n=await this._eval(r.target,e);return Rc(n)?n.value.has(r.name)?n.value.get(r.name):Pt:n$(n,r.name)}case"index":{const n=await this._eval(r.target,e),c=await this._eval(r.index,e);if(Nv(n)){Ce(c);const g=n.value[c.value];if(g===void 0)throw new Ax(`Index out of range. index: ${c.value} max: ${n.value.length-1}`);return g}else{if(Rc(n))return Sr(c),n.value.has(c.value)?n.value.get(c.value):Pt;throw new tr(`Cannot read prop (${ju(c)}) of ${n.type}.`)}}case"not":{const n=await this._eval(r.expr,e);return bs(n),su(!n.value)}case"fn":return zx(r.args.map(n=>n.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"exists":return su(e.exists(r.identifier.name));case"tmpl":{let n="";for(const c of r.tmpl)if(typeof c=="string")n+=c;else{const g=await this._eval(c,e);n+=ju(g)}return Qt(n)}case"return":{const n=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:n}),Vx(n)}case"break":return this.log("block:break",{scope:e.name}),Wx();case"continue":return this.log("block:continue",{scope:e.name}),Kx();case"ns":return Pt;case"meta":return Pt;case"and":{const n=await this._eval(r.left,e);if(bs(n),n.value){const c=await this._eval(r.right,e);return bs(c),c}else return n}case"or":{const n=await this._eval(r.left,e);if(bs(n),n.value)return n;{const c=await this._eval(r.right,e);return bs(c),c}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let n=Pt;for(let c=0;ce!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,n){if(e.type==="identifier")r.assign(e.name,n);else if(e.type==="index"){const c=await this._eval(e.target,r),g=await this._eval(e.index,r);if(Nv(c))Ce(g),c.value[g.value]=n;else if(Rc(c))Sr(g),c.value.set(g.value,n);else throw new tr(`Cannot read prop (${ju(g)}) of ${c.type}.`)}else if(e.type==="prop"){const c=await this._eval(e.target,r);Wn(c),c.value.set(e.name,n)}else throw new tr("The left-hand side of an assignment expression must be a variable or a property/index access.")}};Ps([xr],cs.prototype,"exec",null);Ps([xr],cs.prototype,"execFn",null);Ps([xr],cs.prototype,"execFnSimple",null);Ps([xr],cs.prototype,"handleError",null);Ps([xr],cs.prototype,"log",null);Ps([xr],cs.prototype,"collectNs",null);Ps([xr],cs.prototype,"collectNsMember",null);Ps([xr],cs.prototype,"_fn",null);Ps([xr],cs.prototype,"_eval",null);Ps([xr],cs.prototype,"_run",null);Ps([xr],cs.prototype,"registerAbortHandler",null);Ps([xr],cs.prototype,"unregisterAbortHandler",null);Ps([xr],cs.prototype,"abort",null);Ps([xr],cs.prototype,"assign",null);Ps([xr],cs,"collectMetadata",null);function l$(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function nu(t,r,e,n){var c=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(c,nu.prototype),c.expected=r,c.found=e,c.location=n,c.name="SyntaxError",c}l$(nu,Error);function Dc(t,r,e){return e=e||" ",t.length>r?t:(r-=t.length,e+=e.repeat(r),t+e.slice(0,r))}nu.prototype.format=function(t){var r="Error: "+this.message;if(this.location){var e=null,n;for(n=0;n `+$+` +`+m+` | +`+g.line+" | "+A+` +`+m+" | "+Dc("",c.column-1," ")+Dc("",P,"^")}else r+=` + at `+$}return r};nu.buildMessage=function(t,r){var e={literal:function(A){return'"'+c(A.text)+'"'},class:function(A){var C=A.parts.map(function(P){return Array.isArray(P)?g(P[0])+"-"+g(P[1]):g(P)});return"["+(A.inverted?"^":"")+C.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(A){return A.description}};function n(A){return A.charCodeAt(0).toString(16).toUpperCase()}function c(A){return A.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+n(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+n(C)})}function g(A){return A.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+n(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+n(C)})}function $(A){return e[A.type](A)}function x(A){var C=A.map($),P,S;if(C.sort(),C.length>0){for(P=1,S=1;P=",Ye="<",Br=">",Wt="+",Ar="-",Ft="*",br="^",Hr="/",Or="%",Rr="!",Dt="[",z=".",Z="if",se="elif",ve="else",ye="match",oe="=>",Ne="eval",me="exists",$e="`",he='"',Le="'",Re='\\"',He="\\'",We="true",Ze="false",at="null",it=";",bt="@",Kt="@(",Ct=`\r +`,sr=/^[A-Z0-9_:]/i,Ns=/^[^`{]/,rs=/^[{}`]/,Lt=/^[+\-]/,vt=/^[1-9]/,qt=/^[0-9]/,Zn=/^[A-Z_]/i,Qn=/^[A-Z0-9_]/i,Ii=/^[\r\n]/,Ti=/^[ \t\r\n]/,or=/^[ \t]/,ur=Js(),ji=ae("//",!1),xn=ae("/*",!1),_r=ae("*/",!1),Ot=ae("(",!1),Cr=ae(")",!1),fr=ae("::",!1),tt=ae("{",!1),Jt=ae("}",!1),zr=ae("###",!1),xt=ae("let",!1),$t=ae(":",!1),ps=ae("=",!1),Ri=ae("var",!1),Di=ae("<:",!1),Is=ae("#[",!1),vs=ae("]",!1),At=ae("each",!1),gt=ae(",",!1),Ts=ae("for",!1),gr=ae("return",!1),dr=Bt([["A","Z"],["0","9"],"_",":"],!1,!0),Li=ae("loop",!1),Bi=ae("break",!1),Hi=ae("continue",!1),Ui=ae("+=",!1),Yn=ae("-=",!1),ea=ae("\\",!1),qi=ae("||",!1),zi=ae("&&",!1),Vi=ae("==",!1),Wi=ae("!=",!1),Ki=ae("<=",!1),ta=ae(">=",!1),$n=ae("<",!1),ra=ae(">",!1),Ji=ae("+",!1),sa=ae("-",!1),na=ae("*",!1),Xi=ae("^",!1),Gi=ae("/",!1),Zi=ae("%",!1),bn=ae("!",!1),gs=ae("[",!1),An=ae(".",!1),Qi=ae("if",!1),Yi=ae("elif",!1),el=ae("else",!1),js=ae("match",!1),Rs=ae("=>",!1),Ds=ae("eval",!1),tl=ae("exists",!1),Ls=ae("`",!1),Bs=Bt(["`","{"],!0,!1),Hs=Bt(["{","}","`"],!1,!1),Us=ae('"',!1),qs=ae("'",!1),zs=ae('\\"',!1),aa=ae("\\'",!1),Nt=Bt(["+","-"],!1,!1),ia=Bt([["1","9"]],!1,!1),cr=Bt([["0","9"]],!1,!1),rl=ae("true",!1),Vs=ae("false",!1),sl=ae("null",!1),ds=ae(";",!1),nl=ae("@",!1),_n=ae("@(",!1),al=Bt([["A","Z"],"_"],!1,!0),la=Bt([["A","Z"],["0","9"],"_"],!1,!0),il=ae(`\r +`,!1),ll=Bt(["\r",` +`],!1,!1),ol=Bt([" "," ","\r",` +`],!1,!1),ul=Bt([" "," "],!1,!1),fl=function(s){return s.join("")},cl=function(){return te()},hl=function(){return te()},pl=function(){return""},oa=function(){return""},vl=function(s){return s??[]},Cn=function(s,o){return o},gl=function(s,o){return[s,...o]},kn=function(s,o){return o},dl=function(s,o){return[s,...o]},ua=function(s,o){return o},yl=function(s,o){return[s,...o]},wl=function(s){return s},ml=function(s,o){return h("ns",{name:s,members:o})},xl=function(s,o){return h("meta",{name:s,value:o})},$l=function(s){return h("meta",{name:null,value:s})},bl=function(s,o,p){return h("def",{name:s,varType:o,expr:p,mut:!1,attr:[]})},Al=function(s,o,p){return h("def",{name:s,varType:o,expr:p,mut:!0,attr:[]})},_l=function(s){return h("identifier",{name:"print",chain:[h("callChain",{args:[s]})]})},Cl=function(s,o){return h("attr",{name:s,value:o??h("bool",{value:!0})})},kl=function(s,o,p){return h("each",{var:s,items:o,for:p})},Pl=function(s,o,p){return h("each",{var:s,items:o,for:p})},El=function(s,o){return o},Ml=function(s,o,p,u){return h("for",{var:s,from:o??h("num",{value:0}),to:p,for:u})},Sl=function(s,o){return o},Fl=function(s,o,p,u){return h("for",{var:s,from:o??h("num",{value:0}),to:p,for:u})},Ol=function(s,o){return h("for",{times:s,for:o})},Nl=function(s,o){return h("for",{times:s,for:o})},Il=function(s){return h("return",{expr:s})},Tl=function(s){return h("loop",{statements:s})},jl=function(){return h("break",{})},fa=function(){return h("continue",{})},Rl=function(s,o,p){return o==="+="?h("addAssign",{dest:s,expr:p}):o==="-="?h("subAssign",{dest:s,expr:p}):h("assign",{dest:s,expr:p})},ca=function(s,o,p){return{op:o,term:p}},Dl=function(s,o){return h("infix",{operands:[s,...o.map(p=>p.term)],operators:o.map(p=>p.op)})},Ll=function(){return te()},Bl=function(s){return h("not",{expr:s})},ha=function(s,o){return s.chain?{...s,chain:[...s.chain,...o]}:{...s,chain:o}},Hl=function(s){return h("callChain",{args:s??[]})},pa=function(s,o){return o},Ul=function(s,o){return[s,...o]},ql=function(s){return h("indexChain",{index:s})},zl=function(s){return h("propChain",{name:s})},Vl=function(s,o,p,u){return h("if",{cond:s,then:o,elseif:p??[],else:u})},Wl=function(s,o){return[s,...o]},va=function(s,o){return{cond:s,then:o}},Kl=function(s){return s},ga=function(s,o,p){return{q:o,a:p}},Jl=function(s,o,p){return h("match",{about:s,qs:o??[],default:p})},Xl=function(s){return h("block",{statements:s})},Gl=function(s){return h("exists",{identifier:s})},da=function(s){return h("identifier",{name:s})},Zl=function(s){return h("tmpl",{tmpl:s})},ya=function(s){return s.join("")},wa=function(s){return s},Ql=function(s){return h("str",{value:s.join("")})},ma=function(s){return s},Yl=function(s){return h("str",{value:s.join("")})},eo=function(){return'"'},to=function(){return"'"},ro=function(){return h("num",{value:parseFloat(te())})},so=function(){return h("num",{value:parseFloat(te())})},no=function(){return h("num",{value:parseInt(te(),10)})},ao=function(){return h("num",{value:parseInt(te(),10)})},xa=function(){return h("bool",{value:!0})},io=function(){return h("bool",{value:!1})},$a=function(){return h("null",{})},ba=function(s,o){return{k:s,v:o}},lo=function(s){const o=new Map;for(const p of s)o.set(p.k,p.v);return h("obj",{value:o})},Aa=function(s){return s},oo=function(s){return h("arr",{value:s})},uo=function(s,o){return{name:s,argType:o}},_a=function(s,o){return[s,...o]},fo=function(s,o,p,u,d,v){return(s.length>0||p.length>0)&&wo("Cannot use spaces before or after the function name."),h("def",{name:o,expr:h("fn",{args:u??[],retType:d},v??[]),mut:!1,attr:[]})},Ca=function(s,o,p){return h("fn",{args:s??[],retType:o},p??[])},ka=function(s){return s},co=function(s){return h("arr",{value:s})},Pa=function(s,o){return{k:s,v:o}},ho=function(s){const o=new Map;for(const p of s)o.set(p.k,p.v);return h("obj",{value:o})},po=function(s,o){return h("fnTypeSource",{args:s??[],result:o})},vo=function(s,o){return[s,...o]},go=function(s,o){return h("namedTypeSource",{name:s,inner:o})},yo=function(s){return h("namedTypeSource",{name:s,inner:null})},i=function(){return te()},X=function(){return te()},Ws=function(s){return h("block",{statements:s??[]})},a=0,K=0,E=[{line:1,column:1}],T=0,Vr=[],k=0,R={},Ks;if("startRule"in r){if(!(r.startRule in c))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');g=c[r.startRule]}function te(){return t.substring(K,a)}function Xt(){return Xs(K,a)}function wo(s,o){throw o=o!==void 0?o:Xs(K,a),Ma(s,o)}function ae(s,o){return{type:"literal",text:s,ignoreCase:o}}function Bt(s,o,p){return{type:"class",parts:s,inverted:o,ignoreCase:p}}function Js(){return{type:"any"}}function N(){return{type:"end"}}function Ea(s){var o=E[s],p;if(o)return o;for(p=s-1;!E[p];)p--;for(o=E[p],o={line:o.line,column:o.column};pT&&(T=a,Vr=[]),Vr.push(s))}function Ma(s,o){return new nu(s,null,null,o)}function mo(s,o,p){return new nu(nu.buildMessage(s,o),s,o,p)}function Sa(){var s,o,p,u=a*77+0,d=R[u];if(d)return a=d.nextPos,d.result;for(s=a,o=[],p=Fa();p!==e;)o.push(p),p=Fa();return K=s,o=fl(o),s=o,R[u]={nextPos:a,result:s},s}function Fa(){var s,o,p=a*77+1,u=R[p];return u?(a=u.nextPos,u.result):(s=a,o=Zs(),o!==e&&(K=s,o=cl()),s=o,s===e&&(s=a,o=In(),o!==e&&(K=s,o=hl()),s=o,s===e&&(s=xo(),s===e&&(t.length>a?(s=t.charAt(a),a++):(s=e,k===0&&O(ur))))),R[p]={nextPos:a,result:s},s)}function xo(){var s,o,p,u,d,v,b=a*77+2,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.substr(a,2)===$?(o=$,a+=2):(o=e,k===0&&O(ji)),o!==e){for(p=[],u=a,d=a,k++,v=l(),k--,v===e?d=void 0:(a=d,d=e),d!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,k===0&&O(ur)),v!==e?(d=[d,v],u=d):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,d=a,k++,v=l(),k--,v===e?d=void 0:(a=d,d=e),d!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,k===0&&O(ur)),v!==e?(d=[d,v],u=d):(a=u,u=e)):(a=u,u=e);K=s,s=pl()}else a=s,s=e;if(s===e)if(s=a,t.substr(a,2)===x?(o=x,a+=2):(o=e,k===0&&O(xn)),o!==e){for(p=[],u=a,d=a,k++,t.substr(a,2)===m?(v=m,a+=2):(v=e,k===0&&O(_r)),k--,v===e?d=void 0:(a=d,d=e),d!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,k===0&&O(ur)),v!==e?(d=[d,v],u=d):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,d=a,k++,t.substr(a,2)===m?(v=m,a+=2):(v=e,k===0&&O(_r)),k--,v===e?d=void 0:(a=d,d=e),d!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,k===0&&O(ur)),v!==e?(d=[d,v],u=d):(a=u,u=e)):(a=u,u=e);t.substr(a,2)===m?(u=m,a+=2):(u=e,k===0&&O(_r)),u!==e?(K=s,s=oa()):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function ys(){var s,o,p,u,d,v=a*77+3,b=R[v];if(b)return a=b.nextPos,b.result;for(s=a,o=[],p=f();p!==e;)o.push(p),p=f();for(p=Pn(),p===e&&(p=null),u=[],d=f();d!==e;)u.push(d),d=f();return K=s,s=vl(p),R[v]={nextPos:a,result:s},s}function Pn(){var s,o,p,u,d,v,b,w,M=a*77+4,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=De(),o!==e){for(p=[],u=a,d=[],v=y();v!==e;)d.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=De(),w!==e?(K=u,u=Cn(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,d=[],v=y();v!==e;)d.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=De(),w!==e?(K=u,u=Cn(o,w)):(a=u,u=e)}else a=u,u=e}K=s,s=gl(o,p)}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function En(){var s,o,p,u,d,v,b,w,M=a*77+5,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=Wr(),o!==e){for(p=[],u=a,d=[],v=y();v!==e;)d.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Wr(),w!==e?(K=u,u=kn(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,d=[],v=y();v!==e;)d.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Wr(),w!==e?(K=u,u=kn(o,w)):(a=u,u=e)}else a=u,u=e}K=s,s=dl(o,p)}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function yr(){var s,o,p,u,d,v,b,w,M=a*77+6,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=Kr(),o!==e){for(p=[],u=a,d=[],v=y();v!==e;)d.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Kr(),w!==e?(K=u,u=ua(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,d=[],v=y();v!==e;)d.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Kr(),w!==e?(K=u,u=ua(o,w)):(a=u,u=e)}else a=u,u=e}K=s,s=yl(o,p)}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function De(){var s,o=a*77+7,p=R[o];return p?(a=p.nextPos,p.result):(s=Na(),s===e&&(s=$o(),s===e&&(s=Kr())),R[o]={nextPos:a,result:s},s)}function Wr(){var s,o=a*77+8,p=R[o];return p?(a=p.nextPos,p.result):(s=Ia(),s===e&&(s=Gt(),s===e&&(s=Na())),R[o]={nextPos:a,result:s},s)}function Kr(){var s,o=a*77+9,p=R[o];return p?(a=p.nextPos,p.result):(s=Ia(),s===e&&(s=Gt(),s===e&&(s=bo(),s===e&&(s=ko(),s===e&&(s=Ao(),s===e&&(s=_o(),s===e&&(s=Co(),s===e&&(s=Po(),s===e&&(s=Eo(),s===e&&(s=Pr(),s===e&&(s=Ta(),s===e&&(s=Te()))))))))))),R[o]={nextPos:a,result:s},s)}function Te(){var s,o=a*77+10,p=R[o];return p?(a=p.nextPos,p.result):(s=Mo(),s===e&&(s=ws()),R[o]={nextPos:a,result:s},s)}function ws(){var s,o=a*77+11,p=R[o];return p?(a=p.nextPos,p.result):(s=Oo(),s===e&&(s=Do(),s===e&&(s=ja(),s===e&&(s=Oa()))),R[o]={nextPos:a,result:s},s)}function Oa(){var s,o,p,u,d,v,b=a*77+12,w=R[b];if(w)return a=w.nextPos,w.result;if(s=Da(),s===e&&(s=La(),s===e&&(s=Ba(),s===e&&(s=Zs(),s===e&&(s=In(),s===e&&(s=za(),s===e&&(s=Wa(),s===e&&(s=Rn(),s===e&&(s=Ka(),s===e&&(s=Ro(),s===e&&(s=So(),s===e&&(s=Ha(),s===e))))))))))))if(s=a,t.charCodeAt(a)===40?(o=A,a++):(o=e,k===0&&O(Ot)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=Te(),u!==e){for(d=[],v=f();v!==e;)d.push(v),v=f();t.charCodeAt(a)===41?(v=C,a++):(v=e,k===0&&O(Cr)),v!==e?(K=s,s=wl(u)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function kr(){var s,o=a*77+13,p=R[o];return p?(a=p.nextPos,p.result):(s=za(),s===e&&(s=In(),s===e&&(s=Wa(),s===e&&(s=Lo(),s===e&&(s=Bo(),s===e&&(s=Rn()))))),R[o]={nextPos:a,result:s},s)}function Na(){var s,o,p,u,d,v,b,w,M,F,D=a*77+14,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.substr(a,2)===P?(o=P,a+=2):(o=e,k===0&&O(fr)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=qe(),u!==e){if(d=[],v=f(),v!==e)for(;v!==e;)d.push(v),v=f();else d=e;if(d!==e)if(t.charCodeAt(a)===123?(v=S,a++):(v=e,k===0&&O(tt)),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(w=En(),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();t.charCodeAt(a)===125?(F=I,a++):(F=e,k===0&&O(Jt)),F!==e?(K=s,s=ml(u,w)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function $o(){var s,o,p,u,d,v,b=a*77+15,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.substr(a,3)===G?(o=G,a+=3):(o=e,k===0&&O(zr)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=qe(),u!==e){for(d=[],v=f();v!==e;)d.push(v),v=f();v=kr(),v!==e?(K=s,s=xl(u,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===G?(o=G,a+=3):(o=e,k===0&&O(zr)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();u=kr(),u!==e?(K=s,s=$l(u)):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Ia(){var s,o,p,u,d,v,b,w,M,F=a*77+16,D=R[F];if(D)return a=D.nextPos,D.result;if(s=a,t.substr(a,3)===ee?(o=ee,a+=3):(o=e,k===0&&O(xt)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=qe(),u!==e){for(d=a,v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===58?(b=re,a++):(b=e,k===0&&O($t)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();M=Ue(),M!==e?d=M:(a=d,d=e)}else a=d,d=e;for(d===e&&(d=null),v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===61?(b=ge,a++):(b=e,k===0&&O(ps)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();M=Te(),M!==e?(K=s,s=bl(u,d,M)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===q?(o=q,a+=3):(o=e,k===0&&O(Ri)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=qe(),u!==e){for(d=a,v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===58?(b=re,a++):(b=e,k===0&&O($t)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();M=Ue(),M!==e?d=M:(a=d,d=e)}else a=d,d=e;for(d===e&&(d=null),v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===61?(b=ge,a++):(b=e,k===0&&O(ps)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();M=Te(),M!==e?(K=s,s=Al(u,d,M)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return R[F]={nextPos:a,result:s},s}function bo(){var s,o,p,u,d=a*77+17,v=R[d];if(v)return a=v.nextPos,v.result;if(s=a,t.substr(a,2)===U?(o=U,a+=2):(o=e,k===0&&O(Di)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();u=Te(),u!==e?(K=s,s=_l(u)):(a=s,s=e)}else a=s,s=e;return R[d]={nextPos:a,result:s},s}function Ao(){var s,o,p,u,d,v,b,w=a*77+18,M=R[w];if(M)return a=M.nextPos,M.result;if(s=a,t.substr(a,2)===L?(o=L,a+=2):(o=e,k===0&&O(Is)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=qe(),u!==e){for(d=a,v=[],b=f();b!==e;)v.push(b),b=f();for(b=kr(),b!==e?d=b:(a=d,d=e),d===e&&(d=null),v=[],b=f();b!==e;)v.push(b),b=f();t.charCodeAt(a)===93?(b=H,a++):(b=e,k===0&&O(vs)),b!==e?(K=s,s=Cl(u,d)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return R[w]={nextPos:a,result:s},s}function _o(){var s,o,p,u,d,v,b,w,M,F,D,B,Q,xe,ne=a*77+19,Xe=R[ne];if(Xe)return a=Xe.nextPos,Xe.result;if(s=a,t.substr(a,4)===W?(o=W,a+=4):(o=e,k===0&&O(At)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=A,a++):(u=e,k===0&&O(Ot)),u!==e)if(t.substr(a,3)===ee?(d=ee,a+=3):(d=e,k===0&&O(xt)),d!==e){if(v=[],b=f(),b!==e)for(;b!==e;)v.push(b),b=f();else v=e;if(v!==e)if(b=qe(),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();for(t.charCodeAt(a)===44?(M=V,a++):(M=e,k===0&&O(gt)),M===e&&(M=null),F=[],D=f();D!==e;)F.push(D),D=f();if(D=Te(),D!==e)if(t.charCodeAt(a)===41?(B=C,a++):(B=e,k===0&&O(Cr)),B!==e){for(Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();xe=Ae(),xe!==e?(K=s,s=kl(b,D,xe)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,4)===W?(o=W,a+=4):(o=e,k===0&&O(At)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(t.substr(a,3)===ee?(u=ee,a+=3):(u=e,k===0&&O(xt)),u!==e){if(d=[],v=f(),v!==e)for(;v!==e;)d.push(v),v=f();else d=e;if(d!==e)if(v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,k===0&&O(gt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();if(F=Te(),F!==e){if(D=[],B=f(),B!==e)for(;B!==e;)D.push(B),B=f();else D=e;D!==e?(B=Ae(),B!==e?(K=s,s=Pl(v,F,B)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return R[ne]={nextPos:a,result:s},s}function Co(){var s,o,p,u,d,v,b,w,M,F,D,B,Q,xe,ne,Xe=a*77+20,Ge=R[Xe];if(Ge)return a=Ge.nextPos,Ge.result;if(s=a,t.substr(a,3)===J?(o=J,a+=3):(o=e,k===0&&O(Ts)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=A,a++):(u=e,k===0&&O(Ot)),u!==e)if(t.substr(a,3)===ee?(d=ee,a+=3):(d=e,k===0&&O(xt)),d!==e){if(v=[],b=f(),b!==e)for(;b!==e;)v.push(b),b=f();else v=e;if(v!==e)if(b=qe(),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();if(M=a,t.charCodeAt(a)===61?(F=ge,a++):(F=e,k===0&&O(ps)),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();B=Te(),B!==e?(K=M,M=El(b,B)):(a=M,M=e)}else a=M,M=e;for(M===e&&(M=null),t.charCodeAt(a)===44?(F=V,a++):(F=e,k===0&&O(gt)),F===e&&(F=null),D=[],B=f();B!==e;)D.push(B),B=f();if(B=Te(),B!==e)if(t.charCodeAt(a)===41?(Q=C,a++):(Q=e,k===0&&O(Cr)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();ne=Ae(),ne!==e?(K=s,s=Ml(b,M,B,ne)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,t.substr(a,3)===J?(o=J,a+=3):(o=e,k===0&&O(Ts)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(t.substr(a,3)===ee?(u=ee,a+=3):(u=e,k===0&&O(xt)),u!==e){if(d=[],v=f(),v!==e)for(;v!==e;)d.push(v),v=f();else d=e;if(d!==e)if(v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(w=a,t.charCodeAt(a)===61?(M=ge,a++):(M=e,k===0&&O(ps)),M!==e){for(F=[],D=f();D!==e;)F.push(D),D=f();D=Te(),D!==e?(K=w,w=Sl(v,D)):(a=w,w=e)}else a=w,w=e;for(w===e&&(w=null),t.charCodeAt(a)===44?(M=V,a++):(M=e,k===0&&O(gt)),M===e&&(M=null),F=[],D=f();D!==e;)F.push(D),D=f();if(D=Te(),D!==e){if(B=[],Q=f(),Q!==e)for(;Q!==e;)B.push(Q),Q=f();else B=e;B!==e?(Q=Ae(),Q!==e?(K=s,s=Fl(v,w,D,Q)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,t.substr(a,3)===J?(o=J,a+=3):(o=e,k===0&&O(Ts)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=A,a++):(u=e,k===0&&O(Ot)),u!==e)if(d=Te(),d!==e)if(t.charCodeAt(a)===41?(v=C,a++):(v=e,k===0&&O(Cr)),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Ae(),w!==e?(K=s,s=Ol(d,w)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===J?(o=J,a+=3):(o=e,k===0&&O(Ts)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Te(),u!==e){if(d=[],v=f(),v!==e)for(;v!==e;)d.push(v),v=f();else d=e;d!==e?(v=Ae(),v!==e?(K=s,s=Nl(u,v)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e}}return R[Xe]={nextPos:a,result:s},s}function ko(){var s,o,p,u,d,v=a*77+21,b=R[v];if(b)return a=b.nextPos,b.result;if(s=a,t.substr(a,6)===Y?(o=Y,a+=6):(o=e,k===0&&O(gr)),o!==e)if(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],d=f();d!==e;)u.push(d),d=f();d=Te(),d!==e?(K=s,s=Il(d)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return R[v]={nextPos:a,result:s},s}function Po(){var s,o,p,u,d,v,b,w,M=a*77+22,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,t.substr(a,4)===ue?(o=ue,a+=4):(o=e,k===0&&O(Li)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===123?(u=S,a++):(u=e,k===0&&O(tt)),u!==e){for(d=[],v=f();v!==e;)d.push(v),v=f();if(v=yr(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();t.charCodeAt(a)===125?(w=I,a++):(w=e,k===0&&O(Jt)),w!==e?(K=s,s=Tl(v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function Eo(){var s,o,p,u,d=a*77+23,v=R[d];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,5)===de?(o=de,a+=5):(o=e,k===0&&O(Bi)),o!==e?(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=jl()):(a=s,s=e)):(a=s,s=e),R[d]={nextPos:a,result:s},s)}function Pr(){var s,o,p,u,d=a*77+24,v=R[d];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,8)===le?(o=le,a+=8):(o=e,k===0&&O(Hi)),o!==e?(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=fa()):(a=s,s=e)):(a=s,s=e),R[d]={nextPos:a,result:s},s)}function Ta(){var s,o,p,u,d,v,b=a*77+25,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Te(),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.substr(a,2)===Ie?(u=Ie,a+=2):(u=e,k===0&&O(Ui)),u===e&&(t.substr(a,2)===ze?(u=ze,a+=2):(u=e,k===0&&O(Yn)),u===e&&(t.charCodeAt(a)===61?(u=ge,a++):(u=e,k===0&&O(ps)))),u!==e){for(d=[],v=f();v!==e;)d.push(v),v=f();v=Te(),v!==e?(K=s,s=Rl(o,u,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Mo(){var s,o,p,u,d,v,b,w,M=a*77+26,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=ws(),o!==e){for(p=[],u=a,d=[],v=Er();v!==e;)d.push(v),v=Er();if(v=Mn(),v!==e){for(b=[],w=Er();w!==e;)b.push(w),w=Er();w=ws(),w!==e?(K=u,u=ca(o,v,w)):(a=u,u=e)}else a=u,u=e;if(u!==e)for(;u!==e;){for(p.push(u),u=a,d=[],v=Er();v!==e;)d.push(v),v=Er();if(v=Mn(),v!==e){for(b=[],w=Er();w!==e;)b.push(w),w=Er();w=ws(),w!==e?(K=u,u=ca(o,v,w)):(a=u,u=e)}else a=u,u=e}else p=e;p!==e?(K=s,s=Dl(o,p)):(a=s,s=e)}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function Er(){var s,o,p,u=a*77+27,d=R[u];return d?(a=d.nextPos,d.result):(s=a,t.charCodeAt(a)===92?(o=mt,a++):(o=e,k===0&&O(ea)),o!==e?(p=ie(),p!==e?(o=[o,p],s=o):(a=s,s=e)):(a=s,s=e),s===e&&(s=y()),R[u]={nextPos:a,result:s},s)}function Mn(){var s,o,p=a*77+28,u=R[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===Ke?(o=Ke,a+=2):(o=e,k===0&&O(qi)),o===e&&(t.substr(a,2)===ft?(o=ft,a+=2):(o=e,k===0&&O(zi)),o===e&&(t.substr(a,2)===je?(o=je,a+=2):(o=e,k===0&&O(Vi)),o===e&&(t.substr(a,2)===ut?(o=ut,a+=2):(o=e,k===0&&O(Wi)),o===e&&(t.substr(a,2)===jt?(o=jt,a+=2):(o=e,k===0&&O(Ki)),o===e&&(t.substr(a,2)===Rt?(o=Rt,a+=2):(o=e,k===0&&O(ta)),o===e&&(t.charCodeAt(a)===60?(o=Ye,a++):(o=e,k===0&&O($n)),o===e&&(t.charCodeAt(a)===62?(o=Br,a++):(o=e,k===0&&O(ra)),o===e&&(t.charCodeAt(a)===43?(o=Wt,a++):(o=e,k===0&&O(Ji)),o===e&&(t.charCodeAt(a)===45?(o=Ar,a++):(o=e,k===0&&O(sa)),o===e&&(t.charCodeAt(a)===42?(o=Ft,a++):(o=e,k===0&&O(na)),o===e&&(t.charCodeAt(a)===94?(o=br,a++):(o=e,k===0&&O(Xi)),o===e&&(t.charCodeAt(a)===47?(o=Hr,a++):(o=e,k===0&&O(Gi)),o===e&&(t.charCodeAt(a)===37?(o=Or,a++):(o=e,k===0&&O(Zi))))))))))))))),o!==e&&(K=s,o=Ll()),s=o,R[p]={nextPos:a,result:s},s)}function So(){var s,o,p,u=a*77+29,d=R[u];return d?(a=d.nextPos,d.result):(s=a,t.charCodeAt(a)===33?(o=Rr,a++):(o=e,k===0&&O(bn)),o!==e?(p=Te(),p!==e?(K=s,s=Bl(p)):(a=s,s=e)):(a=s,s=e),R[u]={nextPos:a,result:s},s)}function ja(){var s,o,p,u,d=a*77+30,v=R[d];if(v)return a=v.nextPos,v.result;if(s=a,o=Oa(),o!==e){if(p=[],u=Sn(),u===e&&(u=Ra(),u===e&&(u=Gs())),u!==e)for(;u!==e;)p.push(u),u=Sn(),u===e&&(u=Ra(),u===e&&(u=Gs()));else p=e;p!==e?(K=s,s=ha(o,p)):(a=s,s=e)}else a=s,s=e;return R[d]={nextPos:a,result:s},s}function Sn(){var s,o,p,u,d,v,b=a*77+31,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===40?(o=A,a++):(o=e,k===0&&O(Ot)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=Fo(),u===e&&(u=null),d=[],v=f();v!==e;)d.push(v),v=f();t.charCodeAt(a)===41?(v=C,a++):(v=e,k===0&&O(Cr)),v!==e?(K=s,s=Hl(u)):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Fo(){var s,o,p,u,d,v,b=a*77+32,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Te(),o!==e){for(p=[],u=a,d=_(),d!==e?(v=Te(),v!==e?(K=u,u=pa(o,v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,d=_(),d!==e?(v=Te(),v!==e?(K=u,u=pa(o,v)):(a=u,u=e)):(a=u,u=e);K=s,s=Ul(o,p)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Ra(){var s,o,p,u,d,v,b=a*77+33,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===91?(o=Dt,a++):(o=e,k===0&&O(gs)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=Te(),u!==e){for(d=[],v=f();v!==e;)d.push(v),v=f();t.charCodeAt(a)===93?(v=H,a++):(v=e,k===0&&O(vs)),v!==e?(K=s,s=ql(u)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Gs(){var s,o,p,u=a*77+34,d=R[u];return d?(a=d.nextPos,d.result):(s=a,t.charCodeAt(a)===46?(o=z,a++):(o=e,k===0&&O(An)),o!==e?(p=qe(),p!==e?(K=s,s=zl(p)):(a=s,s=e)):(a=s,s=e),R[u]={nextPos:a,result:s},s)}function Oo(){var s,o,p,u,d,v,b,w,M,F,D=a*77+35,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.substr(a,2)===Z?(o=Z,a+=2):(o=e,k===0&&O(Qi)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Te(),u!==e){if(d=[],v=f(),v!==e)for(;v!==e;)d.push(v),v=f();else d=e;if(d!==e)if(v=Ae(),v!==e){if(b=a,w=[],M=f(),M!==e)for(;M!==e;)w.push(M),M=f();else w=e;if(w!==e?(M=No(),M!==e?b=M:(a=b,b=e)):(a=b,b=e),b===e&&(b=null),w=a,M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;M!==e?(F=Io(),F!==e?w=F:(a=w,w=e)):(a=w,w=e),w===e&&(w=null),K=s,s=Vl(u,v,b,w)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function No(){var s,o,p,u,d,v,b=a*77+36,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Fn(),o!==e){for(p=[],u=a,d=[],v=f();v!==e;)d.push(v),v=f();for(v=Fn(),v!==e?u=v:(a=u,u=e);u!==e;){for(p.push(u),u=a,d=[],v=f();v!==e;)d.push(v),v=f();v=Fn(),v!==e?u=v:(a=u,u=e)}K=s,s=Wl(o,p)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Fn(){var s,o,p,u,d,v,b,w=a*77+37,M=R[w];if(M)return a=M.nextPos,M.result;if(s=a,t.substr(a,4)===se?(o=se,a+=4):(o=e,k===0&&O(Yi)),o!==e)if(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],d=f();d!==e;)u.push(d),d=f();if(d=Te(),d!==e){for(v=[],b=f();b!==e;)v.push(b),b=f();b=Ae(),b!==e?(K=s,s=va(d,b)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e;return R[w]={nextPos:a,result:s},s}function Io(){var s,o,p,u,d,v=a*77+38,b=R[v];if(b)return a=b.nextPos,b.result;if(s=a,t.substr(a,4)===ve?(o=ve,a+=4):(o=e,k===0&&O(el)),o!==e)if(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],d=f();d!==e;)u.push(d),d=f();d=Ae(),d!==e?(K=s,s=Kl(d)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return R[v]={nextPos:a,result:s},s}function Da(){var s,o,p,u,d,v,b,w,M,F,D,B,Q,xe,ne,Xe,Ge,Ln=a*77+39,ms=R[Ln];if(ms)return a=ms.nextPos,ms.result;if(s=a,t.substr(a,5)===ye?(o=ye,a+=5):(o=e,k===0&&O(js)),o!==e)if(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],d=f();d!==e;)u.push(d),d=f();if(d=Te(),d!==e){for(v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===123?(b=S,a++):(b=e,k===0&&O(tt)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();if(M=[],F=a,D=Te(),D!==e){for(B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.substr(a,2)===oe?(Q=oe,a+=2):(Q=e,k===0&&O(Rs)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();if(ne=Ae(),ne!==e){for(Xe=[],Ge=f();Ge!==e;)Xe.push(Ge),Ge=f();K=F,F=ga(d,D,ne)}else a=F,F=e}else a=F,F=e}else a=F,F=e;if(F!==e)for(;F!==e;)if(M.push(F),F=a,D=Te(),D!==e){for(B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.substr(a,2)===oe?(Q=oe,a+=2):(Q=e,k===0&&O(Rs)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();if(ne=Ae(),ne!==e){for(Xe=[],Ge=f();Ge!==e;)Xe.push(Ge),Ge=f();K=F,F=ga(d,D,ne)}else a=F,F=e}else a=F,F=e}else a=F,F=e;else M=e;if(M!==e){if(F=a,t.charCodeAt(a)===42?(D=Ft,a++):(D=e,k===0&&O(na)),D!==e){for(B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.substr(a,2)===oe?(Q=oe,a+=2):(Q=e,k===0&&O(Rs)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();if(ne=Ae(),ne!==e){for(Xe=[],Ge=f();Ge!==e;)Xe.push(Ge),Ge=f();F=ne}else a=F,F=e}else a=F,F=e}else a=F,F=e;for(F===e&&(F=null),D=[],B=f();B!==e;)D.push(B),B=f();t.charCodeAt(a)===125?(B=I,a++):(B=e,k===0&&O(Jt)),B!==e?(K=s,s=Jl(d,M,F)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e;else a=s,s=e;return R[Ln]={nextPos:a,result:s},s}function La(){var s,o,p,u,d,v,b,w,M=a*77+40,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,t.substr(a,4)===Ne?(o=Ne,a+=4):(o=e,k===0&&O(Ds)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===123?(u=S,a++):(u=e,k===0&&O(tt)),u!==e){for(d=[],v=f();v!==e;)d.push(v),v=f();if(v=yr(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();t.charCodeAt(a)===125?(w=I,a++):(w=e,k===0&&O(Jt)),w!==e?(K=s,s=Xl(v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function Ba(){var s,o,p,u,d=a*77+41,v=R[d];if(v)return a=v.nextPos,v.result;if(s=a,t.substr(a,6)===me?(o=me,a+=6):(o=e,k===0&&O(tl)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;p!==e?(u=Ha(),u!==e?(K=s,s=Gl(u)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e;return R[d]={nextPos:a,result:s},s}function Ha(){var s,o,p=a*77+42,u=R[p];return u?(a=u.nextPos,u.result):(s=a,o=Xa(),o!==e&&(K=s,o=da(o)),s=o,R[p]={nextPos:a,result:s},s)}function Zs(){var s,o,p,u,d,v,b=a*77+43,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===96?(o=$e,a++):(o=e,k===0&&O(Ls)),o!==e){for(p=[],u=a,d=a,k++,t.charCodeAt(a)===96?(v=$e,a++):(v=e,k===0&&O(Ls)),k--,v===e?d=void 0:(a=d,d=e),d!==e?(v=On(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,d=a,k++,t.charCodeAt(a)===96?(v=$e,a++):(v=e,k===0&&O(Ls)),k--,v===e?d=void 0:(a=d,d=e),d!==e?(v=On(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===96?(u=$e,a++):(u=e,k===0&&O(Ls)),u!==e?(K=s,s=Zl(p)):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function On(){var s,o,p,u,d,v,b=a*77+44,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===123?(o=S,a++):(o=e,k===0&&O(tt)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=Te(),u!==e){for(d=[],v=y();v!==e;)d.push(v),v=y();t.charCodeAt(a)===125?(v=I,a++):(v=e,k===0&&O(Jt)),v!==e?s=u:(a=s,s=e)}else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,o=[],p=Nn(),p!==e)for(;p!==e;)o.push(p),p=Nn();else o=e;o!==e&&(K=s,o=ya(o)),s=o}return R[b]={nextPos:a,result:s},s}function Nn(){var s,o=a*77+45,p=R[o];return p?(a=p.nextPos,p.result):(s=Ua(),s===e&&(Ns.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,k===0&&O(Bs))),R[o]={nextPos:a,result:s},s)}function Ua(){var s,o,p,u=a*77+46,d=R[u];return d?(a=d.nextPos,d.result):(s=a,t.charCodeAt(a)===92?(o=mt,a++):(o=e,k===0&&O(ea)),o!==e?(rs.test(t.charAt(a))?(p=t.charAt(a),a++):(p=e,k===0&&O(Hs)),p!==e?s=p:(a=s,s=e)):(a=s,s=e),R[u]={nextPos:a,result:s},s)}function In(){var s,o,p,u,d,v,b=a*77+47,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===34?(o=he,a++):(o=e,k===0&&O(Us)),o!==e){for(p=[],u=a,d=a,k++,t.charCodeAt(a)===34?(v=he,a++):(v=e,k===0&&O(Us)),k--,v===e?d=void 0:(a=d,d=e),d!==e?(v=qa(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,k===0&&O(ur))),v!==e?(K=u,u=wa(v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,d=a,k++,t.charCodeAt(a)===34?(v=he,a++):(v=e,k===0&&O(Us)),k--,v===e?d=void 0:(a=d,d=e),d!==e?(v=qa(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,k===0&&O(ur))),v!==e?(K=u,u=wa(v)):(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===34?(u=he,a++):(u=e,k===0&&O(Us)),u!==e?(K=s,s=Ql(p)):(a=s,s=e)}else a=s,s=e;if(s===e)if(s=a,t.charCodeAt(a)===39?(o=Le,a++):(o=e,k===0&&O(qs)),o!==e){for(p=[],u=a,d=a,k++,t.charCodeAt(a)===39?(v=Le,a++):(v=e,k===0&&O(qs)),k--,v===e?d=void 0:(a=d,d=e),d!==e?(v=Tn(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,k===0&&O(ur))),v!==e?(K=u,u=ma(v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,d=a,k++,t.charCodeAt(a)===39?(v=Le,a++):(v=e,k===0&&O(qs)),k--,v===e?d=void 0:(a=d,d=e),d!==e?(v=Tn(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,k===0&&O(ur))),v!==e?(K=u,u=ma(v)):(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===39?(u=Le,a++):(u=e,k===0&&O(qs)),u!==e?(K=s,s=Yl(p)):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function qa(){var s,o,p=a*77+48,u=R[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===Re?(o=Re,a+=2):(o=e,k===0&&O(zs)),o!==e&&(K=s,o=eo()),s=o,R[p]={nextPos:a,result:s},s)}function Tn(){var s,o,p=a*77+49,u=R[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===He?(o=He,a+=2):(o=e,k===0&&O(aa)),o!==e&&(K=s,o=to()),s=o,R[p]={nextPos:a,result:s},s)}function za(){var s,o=a*77+50,p=R[o];return p?(a=p.nextPos,p.result):(s=To(),s===e&&(s=Va()),R[o]={nextPos:a,result:s},s)}function To(){var s,o,p,u,d,v,b=a*77+51,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,Lt.test(t.charAt(a))?(t.charAt(a),a++):k===0&&O(Nt),vt.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,k===0&&O(ia)),o!==e){if(p=[],qt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(cr)),u!==e)for(;u!==e;)p.push(u),qt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(cr));else p=e;if(p!==e)if(t.charCodeAt(a)===46?(u=z,a++):(u=e,k===0&&O(An)),u!==e){if(d=[],qt.test(t.charAt(a))?(v=t.charAt(a),a++):(v=e,k===0&&O(cr)),v!==e)for(;v!==e;)d.push(v),qt.test(t.charAt(a))?(v=t.charAt(a),a++):(v=e,k===0&&O(cr));else d=e;d!==e?(K=s,s=ro()):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,Lt.test(t.charAt(a))?(t.charAt(a),a++):k===0&&O(Nt),qt.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,k===0&&O(cr)),o!==e)if(t.charCodeAt(a)===46?(p=z,a++):(p=e,k===0&&O(An)),p!==e){if(u=[],qt.test(t.charAt(a))?(d=t.charAt(a),a++):(d=e,k===0&&O(cr)),d!==e)for(;d!==e;)u.push(d),qt.test(t.charAt(a))?(d=t.charAt(a),a++):(d=e,k===0&&O(cr));else u=e;u!==e?(K=s,s=so()):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Va(){var s,o,p,u,d=a*77+52,v=R[d];if(v)return a=v.nextPos,v.result;if(s=a,Lt.test(t.charAt(a))?(t.charAt(a),a++):k===0&&O(Nt),vt.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,k===0&&O(ia)),o!==e){if(p=[],qt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(cr)),u!==e)for(;u!==e;)p.push(u),qt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(cr));else p=e;p!==e?(K=s,s=no()):(a=s,s=e)}else a=s,s=e;return s===e&&(s=a,Lt.test(t.charAt(a))?(t.charAt(a),a++):k===0&&O(Nt),qt.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,k===0&&O(cr)),o!==e?(K=s,s=ao()):(a=s,s=e)),R[d]={nextPos:a,result:s},s}function Wa(){var s,o=a*77+53,p=R[o];return p?(a=p.nextPos,p.result):(s=jo(),s===e&&(s=jn()),R[o]={nextPos:a,result:s},s)}function jo(){var s,o,p,u,d=a*77+54,v=R[d];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,4)===We?(o=We,a+=4):(o=e,k===0&&O(rl)),o!==e?(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=xa()):(a=s,s=e)):(a=s,s=e),R[d]={nextPos:a,result:s},s)}function jn(){var s,o,p,u,d=a*77+55,v=R[d];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,5)===Ze?(o=Ze,a+=5):(o=e,k===0&&O(Vs)),o!==e?(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=io()):(a=s,s=e)):(a=s,s=e),R[d]={nextPos:a,result:s},s)}function Rn(){var s,o,p,u,d=a*77+56,v=R[d];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,4)===at?(o=at,a+=4):(o=e,k===0&&O(sl)),o!==e?(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=$a()):(a=s,s=e)):(a=s,s=e),R[d]={nextPos:a,result:s},s)}function Ka(){var s,o,p,u,d,v,b,w,M,F,D,B,Q,xe,ne=a*77+57,Xe=R[ne];if(Xe)return a=Xe.nextPos,Xe.result;if(s=a,t.charCodeAt(a)===123?(o=S,a++):(o=e,k===0&&O(tt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],d=a,v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.charCodeAt(a)===58?(w=re,a++):(w=e,k===0&&O($t)),w!==e){if(M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;if(M!==e)if(F=Te(),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();for(t.charCodeAt(a)===44?(B=V,a++):(B=e,k===0&&O(gt)),B===e&&(t.charCodeAt(a)===59?(B=it,a++):(B=e,k===0&&O(ds))),B===e&&(B=null),Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();K=d,d=ba(v,F)}else a=d,d=e;else a=d,d=e}else a=d,d=e}else a=d,d=e;for(;d!==e;)if(u.push(d),d=a,v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.charCodeAt(a)===58?(w=re,a++):(w=e,k===0&&O($t)),w!==e){if(M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;if(M!==e)if(F=Te(),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();for(t.charCodeAt(a)===44?(B=V,a++):(B=e,k===0&&O(gt)),B===e&&(t.charCodeAt(a)===59?(B=it,a++):(B=e,k===0&&O(ds))),B===e&&(B=null),Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();K=d,d=ba(v,F)}else a=d,d=e;else a=d,d=e}else a=d,d=e}else a=d,d=e;t.charCodeAt(a)===125?(d=I,a++):(d=e,k===0&&O(Jt)),d!==e?(K=s,s=lo(u)):(a=s,s=e)}else a=s,s=e;return R[ne]={nextPos:a,result:s},s}function Ro(){var s,o,p,u,d,v,b,w,M,F,D=a*77+58,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.charCodeAt(a)===91?(o=Dt,a++):(o=e,k===0&&O(gs)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],d=a,v=Te(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,k===0&&O(gt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();K=d,d=Aa(v)}else a=d,d=e;for(;d!==e;)if(u.push(d),d=a,v=Te(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,k===0&&O(gt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();K=d,d=Aa(v)}else a=d,d=e;for(d=[],v=f();v!==e;)d.push(v),v=f();t.charCodeAt(a)===93?(v=H,a++):(v=e,k===0&&O(vs)),v!==e?(K=s,s=oo(u)):(a=s,s=e)}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function Dn(){var s,o,p,u,d,v,b,w=a*77+59,M=R[w];if(M)return a=M.nextPos,M.result;if(s=a,o=qe(),o!==e){for(p=a,u=[],d=f();d!==e;)u.push(d),d=f();if(t.charCodeAt(a)===58?(d=re,a++):(d=e,k===0&&O($t)),d!==e){for(v=[],b=f();b!==e;)v.push(b),b=f();b=Ue(),b!==e?p=b:(a=p,p=e)}else a=p,p=e;p===e&&(p=null),K=s,s=uo(o,p)}else a=s,s=e;return R[w]={nextPos:a,result:s},s}function Ja(){var s,o,p,u,d,v,b=a*77+60,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Dn(),o!==e){for(p=[],u=a,d=_(),d!==e?(v=Dn(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,d=_(),d!==e?(v=Dn(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);K=s,s=_a(o,p)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Gt(){var s,o,p,u,d,v,b,w,M,F,D,B,Q,xe,ne,Xe,Ge,Ln=a*77+61,ms=R[Ln];if(ms)return a=ms.nextPos,ms.result;if(s=a,t.charCodeAt(a)===64?(o=bt,a++):(o=e,k===0&&O(nl)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=qe(),u!==e){for(d=[],v=y();v!==e;)d.push(v),v=y();if(t.charCodeAt(a)===40?(v=A,a++):(v=e,k===0&&O(Ot)),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(w=Ja(),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();if(t.charCodeAt(a)===41?(F=C,a++):(F=e,k===0&&O(Cr)),F!==e){for(D=a,B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.charCodeAt(a)===58?(Q=re,a++):(Q=e,k===0&&O($t)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();ne=Ue(),ne!==e?D=ne:(a=D,D=e)}else a=D,D=e;for(D===e&&(D=null),B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.charCodeAt(a)===123?(Q=S,a++):(Q=e,k===0&&O(tt)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();for(ne=yr(),ne===e&&(ne=null),Xe=[],Ge=f();Ge!==e;)Xe.push(Ge),Ge=f();t.charCodeAt(a)===125?(Ge=I,a++):(Ge=e,k===0&&O(Jt)),Ge!==e?(K=s,s=fo(p,u,d,w,D,ne)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[Ln]={nextPos:a,result:s},s}function Do(){var s,o,p,u,d,v,b,w,M,F,D,B,Q,xe=a*77+62,ne=R[xe];if(ne)return a=ne.nextPos,ne.result;if(s=a,t.substr(a,2)===Kt?(o=Kt,a+=2):(o=e,k===0&&O(_n)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=Ja(),u===e&&(u=null),d=[],v=f();v!==e;)d.push(v),v=f();if(t.charCodeAt(a)===41?(v=C,a++):(v=e,k===0&&O(Cr)),v!==e){for(b=a,w=[],M=f();M!==e;)w.push(M),M=f();if(t.charCodeAt(a)===58?(M=re,a++):(M=e,k===0&&O($t)),M!==e){for(F=[],D=f();D!==e;)F.push(D),D=f();D=Ue(),D!==e?b=D:(a=b,b=e)}else a=b,b=e;for(b===e&&(b=null),w=[],M=f();M!==e;)w.push(M),M=f();if(t.charCodeAt(a)===123?(M=S,a++):(M=e,k===0&&O(tt)),M!==e){for(F=[],D=f();D!==e;)F.push(D),D=f();for(D=yr(),D===e&&(D=null),B=[],Q=f();Q!==e;)B.push(Q),Q=f();t.charCodeAt(a)===125?(Q=I,a++):(Q=e,k===0&&O(Jt)),Q!==e?(K=s,s=Ca(u,b,D)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[xe]={nextPos:a,result:s},s}function Lo(){var s,o,p,u,d,v,b,w,M,F,D=a*77+63,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.charCodeAt(a)===91?(o=Dt,a++):(o=e,k===0&&O(gs)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],d=a,v=kr(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,k===0&&O(gt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();K=d,d=ka(v)}else a=d,d=e;for(;d!==e;)if(u.push(d),d=a,v=kr(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,k===0&&O(gt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();K=d,d=ka(v)}else a=d,d=e;for(d=[],v=f();v!==e;)d.push(v),v=f();t.charCodeAt(a)===93?(v=H,a++):(v=e,k===0&&O(vs)),v!==e?(K=s,s=co(u)):(a=s,s=e)}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function Bo(){var s,o,p,u,d,v,b,w,M,F,D,B,Q,xe,ne=a*77+64,Xe=R[ne];if(Xe)return a=Xe.nextPos,Xe.result;if(s=a,t.charCodeAt(a)===123?(o=S,a++):(o=e,k===0&&O(tt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],d=a,v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.charCodeAt(a)===58?(w=re,a++):(w=e,k===0&&O($t)),w!==e){if(M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;if(M!==e)if(F=kr(),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();for(t.charCodeAt(a)===44?(B=V,a++):(B=e,k===0&&O(gt)),B===e&&(t.charCodeAt(a)===59?(B=it,a++):(B=e,k===0&&O(ds))),B===e&&(B=null),Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();K=d,d=Pa(v,F)}else a=d,d=e;else a=d,d=e}else a=d,d=e}else a=d,d=e;for(;d!==e;)if(u.push(d),d=a,v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.charCodeAt(a)===58?(w=re,a++):(w=e,k===0&&O($t)),w!==e){if(M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;if(M!==e)if(F=kr(),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();for(t.charCodeAt(a)===44?(B=V,a++):(B=e,k===0&&O(gt)),B===e&&(t.charCodeAt(a)===59?(B=it,a++):(B=e,k===0&&O(ds))),B===e&&(B=null),Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();K=d,d=Pa(v,F)}else a=d,d=e;else a=d,d=e}else a=d,d=e}else a=d,d=e;t.charCodeAt(a)===125?(d=I,a++):(d=e,k===0&&O(Jt)),d!==e?(K=s,s=ho(u)):(a=s,s=e)}else a=s,s=e;return R[ne]={nextPos:a,result:s},s}function Ue(){var s,o=a*77+65,p=R[o];return p?(a=p.nextPos,p.result):(s=Ho(),s===e&&(s=Ht()),R[o]={nextPos:a,result:s},s)}function Ho(){var s,o,p,u,d,v,b,w,M,F,D=a*77+66,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.substr(a,2)===Kt?(o=Kt,a+=2):(o=e,k===0&&O(_n)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=Jr(),u===e&&(u=null),d=[],v=f();v!==e;)d.push(v),v=f();if(t.charCodeAt(a)===41?(v=C,a++):(v=e,k===0&&O(Cr)),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.substr(a,2)===oe?(w=oe,a+=2):(w=e,k===0&&O(Rs)),w!==e){for(M=[],F=f();F!==e;)M.push(F),F=f();F=Ue(),F!==e?(K=s,s=po(u,F)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function Jr(){var s,o,p,u,d,v,b=a*77+67,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Ue(),o!==e){for(p=[],u=a,d=_(),d!==e?(v=Ue(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,d=_(),d!==e?(v=Ue(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);K=s,s=vo(o,p)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Ht(){var s,o,p,u,d,v,b,w,M=a*77+68,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=qe(),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(t.charCodeAt(a)===60?(u=Ye,a++):(u=e,k===0&&O($n)),u!==e){for(d=[],v=y();v!==e;)d.push(v),v=y();if(v=Ue(),v!==e){for(b=[],w=y();w!==e;)b.push(w),w=y();t.charCodeAt(a)===62?(w=Br,a++):(w=e,k===0&&O(ra)),w!==e?(K=s,s=go(o,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return s===e&&(s=a,o=qe(),o!==e&&(K=s,o=yo(o)),s=o),R[M]={nextPos:a,result:s},s}function qe(){var s,o,p,u,d=a*77+69,v=R[d];if(v)return a=v.nextPos,v.result;if(s=a,Zn.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,k===0&&O(al)),o!==e){for(p=[],Qn.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(la));u!==e;)p.push(u),Qn.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(la));K=s,s=i()}else a=s,s=e;return R[d]={nextPos:a,result:s},s}function Xa(){var s,o,p,u,d,v,b=a*77+70,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=qe(),o!==e){for(p=[],u=a,t.charCodeAt(a)===58?(d=re,a++):(d=e,k===0&&O($t)),d!==e?(v=qe(),v!==e?(d=[d,v],u=d):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,t.charCodeAt(a)===58?(d=re,a++):(d=e,k===0&&O($t)),d!==e?(v=qe(),v!==e?(d=[d,v],u=d):(a=u,u=e)):(a=u,u=e);K=s,s=X()}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function _(){var s,o,p,u,d,v=a*77+71,b=R[v];if(b)return a=b.nextPos,b.result;for(s=a,o=[],p=f();p!==e;)o.push(p),p=f();if(t.charCodeAt(a)===44?(p=V,a++):(p=e,k===0&&O(gt)),p!==e){for(u=[],d=f();d!==e;)u.push(d),d=f();o=[o,p,u],s=o}else a=s,s=e;if(s===e)if(s=[],o=f(),o!==e)for(;o!==e;)s.push(o),o=f();else s=e;return R[v]={nextPos:a,result:s},s}function Ae(){var s,o,p,u,d,v,b=a*77+72,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===123?(o=S,a++):(o=e,k===0&&O(tt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=yr(),u===e&&(u=null),d=[],v=f();v!==e;)d.push(v),v=f();t.charCodeAt(a)===125?(v=I,a++):(v=e,k===0&&O(Jt)),v!==e?(K=s,s=Ws(u)):(a=s,s=e)}else a=s,s=e;return s===e&&(s=Kr()),R[b]={nextPos:a,result:s},s}function ie(){var s,o=a*77+73,p=R[o];return p?(a=p.nextPos,p.result):(t.substr(a,2)===Ct?(s=Ct,a+=2):(s=e,k===0&&O(il)),s===e&&(Ii.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,k===0&&O(ll))),R[o]={nextPos:a,result:s},s)}function l(){var s,o,p=a*77+74,u=R[p];return u?(a=u.nextPos,u.result):(s=a,k++,t.length>a?(o=t.charAt(a),a++):(o=e,k===0&&O(ur)),k--,o===e?s=void 0:(a=s,s=e),s===e&&(s=ie()),R[p]={nextPos:a,result:s},s)}function f(){var s,o=a*77+75,p=R[o];return p?(a=p.nextPos,p.result):(Ti.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,k===0&&O(ol)),R[o]={nextPos:a,result:s},s)}function y(){var s,o=a*77+76,p=R[o];return p?(a=p.nextPos,p.result):(or.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,k===0&&O(ul)),R[o]={nextPos:a,result:s},s)}function h(s,o,p){const u={type:s};o.children=p;for(const v of Object.keys(o))o[v]!==void 0&&(u[v]=o[v]);const d=Xt();return u.loc={start:d.start.offset,end:d.end.offset-1},u}if(Ks=g(),Ks!==e&&a===t.length)return Ks;throw Ks!==e&&a`}else return t.name;case"fnTypeSource":{const r=t.args.map(n=>jf(n)).join(", "),e=jf(t.result);return`@(${r}) { ${e} }`}}}function Ru(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return Rv(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=Ru(t.inner):r=Rv("any"),g$(t.name,[r])}}throw new hu(`Unknown type: '${jf(t)}'`)}else{const r=t.args.map(e=>Ru(e));return d$(r,Ru(t.result))}}function y$(t){switch(t.type){case"def":{t.varType!=null&&Ru(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&Ru(r.argType);t.retType!=null&&Ru(t.retType);break}}return t}function w$(t){for(const r of t)rt(r,y$);return t}function Rf(t){const r=[],e=[];for(const n of t)if(n.type==="attr")e.push(n);else if(n.type==="def")n.attr==null&&(n.attr=[]),n.attr.push(...e),e.splice(0,e.length),n.expr.type==="fn"&&(n.expr.children=Rf(n.expr.children)),r.push(n);else{if(e.length>0)throw new hu("invalid attribute.");switch(n.type){case"fn":{n.children=Rf(n.children);break}case"block":{n.statements=Rf(n.statements);break}}r.push(n)}if(e.length>0)throw new hu("invalid attribute.");return r}function m$(t){if(u$(t)&&gd(t)&&t.chain!=null){const{chain:r,...e}=t;let n=e;for(const c of r)switch(c.type){case"callChain":{n=f$(n,c.args,c.loc);break}case"indexChain":{n=c$(n,c.index,c.loc);break}case"propChain":{n=h$(n,c.name,c.loc);break}}return n}return t}function x$(t){for(let r=0;r":{func:"Core:gt",priority:4},"<=":{func:"Core:lteq",priority:4},">=":{func:"Core:gteq",priority:4},"&&":{mapFn:t=>({type:"and",left:Go(t.left),right:Go(t.right)}),priority:3},"||":{mapFn:t=>({type:"or",left:Go(t.left),right:Go(t.right)}),priority:3}};function b$(t){const r=t.operators.map(n=>{const c=$$[n];if(c==null)throw new hu(`No such operator: ${n}.`);return c});let e=Df(t.operands[0],t.operands[1],r[0]);for(let n=0;ne.type==="infix"?b$(e):e);return t}var Qa;let _$=(Qa=class{constructor(){be(this,"plugins");this.plugins={validate:[v$,w$],transform:[Rf,x$,A$]}}static parse(r){return Qa.instance==null&&(Qa.instance=new Qa),Qa.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;try{const n=jv(r,{startRule:"Preprocess"});e=jv(n,{startRule:"Main"})}catch(n){throw n.location?n.expected?new hu(`Parsing error. (Line ${n.location.start.line}:${n.location.start.column})`,n):new hu(`${n.message} (Line ${n.location.start.line}:${n.location.start.column})`,n):n}for(const n of this.plugins.validate)e=n(e);for(const n of this.plugins.transform)e=n(e);return e}},be(Qa,"instance"),Qa);const Dv="develop",C$={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { + <: if (i % 15 == 0) "FizzBuzz" + elif (i % 3 == 0) "Fizz" + elif (i % 5 == 0) "Buzz" + else i + }`},k$=t=>(vf("data-v-064d6b25"),t=t(),gf(),t),P$={id:"root"},E$={id:"grid1"},M$={class:"type"},S$={id:"grid2"},F$=k$(()=>Mt("header",null,null,-1)),O$=si({__name:"index",setup(t){const r=wr(window.localStorage.getItem(Dv)??'<: "Hello, AiScript!"'),e=wr(null),n=wr([]),c=wr(null);ri(r,()=>{window.localStorage.setItem(Dv,r.value);try{e.value=_$.parse(r.value),c.value=null}catch(x){const m=x;c.value=m.message,console.error("info"in m?m.info:m);return}},{immediate:!0});let g=null;const $=async()=>{n.value=[],g==null||g.abort(),g=new cs({},{in:x=>new Promise(m=>{const A=window.prompt(x);m(A??"")}),out:x=>{n.value.push({id:Math.random(),type:x.type,text:mh(x,!0),print:!0})},err:x=>{window.alert(x.toString())},log:(x,m)=>{switch(x){case"end":n.value.push({id:Math.random(),text:mh(m.val,!0),print:!1});break}}});try{await g.exec(e.value)}catch(x){console.error(x),window.alert("Internal Error: "+x)}};return(x,m)=>(wt(),Ut("div",P$,[Mt("div",E$,[nt(yf,{modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=A=>r.value=A),samples:Mi(C$),parseError:c.value,onRun:$},null,8,["modelValue","samples","parseError"]),nt(Fr,{id:"logs"},{header:ot(()=>[It("Output")]),default:ot(()=>[(wt(!0),Ut(Ir,null,fu(n.value,A=>(wt(),Ut("div",{class:Tr(["log",[{print:A.print},A.type]]),key:A.id},[Mt("span",M$,Dr(A.type),1),It(" "+Dr(A.text),1)],2))),128))]),_:1})]),Mt("div",S$,[nt(Fr,{id:"ast"},{header:ot(()=>[It("AST")]),default:ot(()=>[Mt("pre",null,Dr(JSON.stringify(e.value,null," ")),1)]),_:1}),nt(Fr,{id:"bin"},{header:ot(()=>[It("Bytecode")]),default:ot(()=>[F$]),_:1}),nt(Fr,{id:"debugger"},{header:ot(()=>[It("Debugger")]),_:1})])]))}});const N$=ai(O$,[["__scopeId","data-v-064d6b25"]]);function $r(t,r,e){let n=e.value;return{configurable:!0,get(){const c=n.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,value:c}),c},set(c){n=c}}}let bc=class yd extends Error{constructor(e,n){super(e);be(this,"info");this.info=n,Error.captureStackTrace&&Error.captureStackTrace(this,yd)}};class I$ extends bc{constructor(r){super(`Internal Error. ${r}`,r)}}class pu extends bc{constructor(r,e){super(r,e)}}class rr extends bc{constructor(r,e){super(r,e)}}class T$ extends rr{constructor(r,e){super(r,e)}}var Oi=globalThis&&globalThis.__decorate||function(t,r,e,n){var c=arguments.length,g=c<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(t,r,e,n);else for(var x=t.length-1;x>=0;x--)($=t[x])&&(g=(c<3?$(g):c>3?$(r,e,g):$(r,e))||g);return c>3&&g&&Object.defineProperty(r,e,g),g};let oi=class wd{constructor(r=[],e,n){be(this,"parent");be(this,"layerdStates");be(this,"name");be(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=n||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const n=[r,...this.layerdStates];return new wd(n,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const n=e.get(r).value;return this.log("read",{var:r,val:n}),n}throw new rr(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}exists(r){for(const e of this.layerdStates)if(e.has(r))return this.log("exists",{var:r}),!0;return this.log("not exists",{var:r}),!1}getAll(){const r=this.layerdStates.reduce((e,n)=>[...e,...n],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const n=this.layerdStates[0];if(n.has(r))throw new rr(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(r,e),this.parent==null&&this.onUpdated(r,e.value)}assign(r,e){let n=1;for(const c of this.layerdStates){if(c.has(r)){const g=c.get(r);if(!g.isMutable)throw new rr(`Cannot assign to an immutable variable ${r}.`);g.value=e,this.log("assign",{var:r,val:e}),n===this.layerdStates.length&&this.onUpdated(r,e);return}n++}throw new rr(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}};Oi([$r],oi.prototype,"log",null);Oi([$r],oi.prototype,"onUpdated",null);Oi([$r],oi.prototype,"createChildScope",null);Oi([$r],oi.prototype,"get",null);Oi([$r],oi.prototype,"exists",null);Oi([$r],oi.prototype,"getAll",null);Oi([$r],oi.prototype,"add",null);Oi([$r],oi.prototype,"assign",null);let Ef;const j$=new Uint8Array(16);function R$(){if(!Ef&&(Ef=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ef))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ef(j$)}const Zr=[];for(let t=0;t<256;++t)Zr.push((t+256).toString(16).slice(1));function D$(t,r=0){return Zr[t[r+0]]+Zr[t[r+1]]+Zr[t[r+2]]+Zr[t[r+3]]+"-"+Zr[t[r+4]]+Zr[t[r+5]]+"-"+Zr[t[r+6]]+Zr[t[r+7]]+"-"+Zr[t[r+8]]+Zr[t[r+9]]+"-"+Zr[t[r+10]]+Zr[t[r+11]]+Zr[t[r+12]]+Zr[t[r+13]]+Zr[t[r+14]]+Zr[t[r+15]]}const L$=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Lv={randomUUID:L$};function B$(t,r,e){if(Lv.randomUUID&&!r&&!t)return Lv.randomUUID();t=t||{};const n=t.random||(t.rng||R$)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){e=e||0;for(let c=0;c<16;++c)r[e+c]=n[c];return r}return D$(n)}var xp={exports:{}};xp.exports;(function(t){(function(r,e,n){function c(m){var A=this,C=x();A.next=function(){var P=2091639*A.s0+A.c*23283064365386963e-26;return A.s0=A.s1,A.s1=A.s2,A.s2=P-(A.c=P|0)},A.c=1,A.s0=C(" "),A.s1=C(" "),A.s2=C(" "),A.s0-=C(m),A.s0<0&&(A.s0+=1),A.s1-=C(m),A.s1<0&&(A.s1+=1),A.s2-=C(m),A.s2<0&&(A.s2+=1),C=null}function g(m,A){return A.c=m.c,A.s0=m.s0,A.s1=m.s1,A.s2=m.s2,A}function $(m,A){var C=new c(m),P=A&&A.state,S=C.next;return S.int32=function(){return C.next()*4294967296|0},S.double=function(){return S()+(S()*2097152|0)*11102230246251565e-32},S.quick=S,P&&(typeof P=="object"&&g(P,C),S.state=function(){return g(C,{})}),S}function x(){var m=4022871197,A=function(C){C=String(C);for(var P=0;P>>0,S-=m,S*=m,m=S>>>0,S-=m,m+=S*4294967296}return(m>>>0)*23283064365386963e-26};return A}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.alea=$})(Tt,t,!1)})(xp);var H$=xp.exports,$p={exports:{}};$p.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.x=0,m.y=0,m.z=0,m.w=0,m.next=function(){var P=m.x^m.x<<11;return m.x=m.y,m.y=m.z,m.z=m.w,m.w^=m.w>>>19^P^P>>>8},x===(x|0)?m.x=x:A+=x;for(var C=0;C>>0)/4294967296};return P.double=function(){do var S=A.next()>>>11,I=(A.next()>>>0)/4294967296,G=(S+I)/(1<<21);while(G===0);return G},P.int32=A.next,P.quick=P,C&&(typeof C=="object"&&g(C,A),P.state=function(){return g(A,{})}),P}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xor128=$})(Tt,t,!1)})($p);var U$=$p.exports,bp={exports:{}};bp.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.next=function(){var P=m.x^m.x>>>2;return m.x=m.y,m.y=m.z,m.z=m.w,m.w=m.v,(m.d=m.d+362437|0)+(m.v=m.v^m.v<<4^(P^P<<1))|0},m.x=0,m.y=0,m.z=0,m.w=0,m.v=0,x===(x|0)?m.x=x:A+=x;for(var C=0;C>>4),m.next()}function g(x,m){return m.x=x.x,m.y=x.y,m.z=x.z,m.w=x.w,m.v=x.v,m.d=x.d,m}function $(x,m){var A=new c(x),C=m&&m.state,P=function(){return(A.next()>>>0)/4294967296};return P.double=function(){do var S=A.next()>>>11,I=(A.next()>>>0)/4294967296,G=(S+I)/(1<<21);while(G===0);return G},P.int32=A.next,P.quick=P,C&&(typeof C=="object"&&g(C,A),P.state=function(){return g(A,{})}),P}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xorwow=$})(Tt,t,!1)})(bp);var q$=bp.exports,Ap={exports:{}};Ap.exports;(function(t){(function(r,e,n){function c(x){var m=this;m.next=function(){var C=m.x,P=m.i,S,I;return S=C[P],S^=S>>>7,I=S^S<<24,S=C[P+1&7],I^=S^S>>>10,S=C[P+3&7],I^=S^S>>>3,S=C[P+4&7],I^=S^S<<7,S=C[P+7&7],S=S^S<<13,I^=S^S<<9,C[P]=I,m.i=P+1&7,I};function A(C,P){var S,I=[];if(P===(P|0))I[0]=P;else for(P=""+P,S=0;S0;--S)C.next()}A(m,x)}function g(x,m){return m.x=x.x.slice(),m.i=x.i,m}function $(x,m){x==null&&(x=+new Date);var A=new c(x),C=m&&m.state,P=function(){return(A.next()>>>0)/4294967296};return P.double=function(){do var S=A.next()>>>11,I=(A.next()>>>0)/4294967296,G=(S+I)/(1<<21);while(G===0);return G},P.int32=A.next,P.quick=P,C&&(C.x&&g(C,A),P.state=function(){return g(A,{})}),P}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xorshift7=$})(Tt,t,!1)})(Ap);var z$=Ap.exports,_p={exports:{}};_p.exports;(function(t){(function(r,e,n){function c(x){var m=this;m.next=function(){var C=m.w,P=m.X,S=m.i,I,G;return m.w=C=C+1640531527|0,G=P[S+34&127],I=P[S=S+1&127],G^=G<<13,I^=I<<17,G^=G>>>15,I^=I>>>12,G=P[S]=G^I,m.i=S,G+(C^C>>>16)|0};function A(C,P){var S,I,G,ee,re,ge=[],q=128;for(P===(P|0)?(I=P,P=null):(P=P+"\0",I=0,q=Math.max(q,P.length)),G=0,ee=-32;ee>>15,I^=I<<4,I^=I>>>13,ee>=0&&(re=re+1640531527|0,S=ge[ee&127]^=I+re,G=S==0?G+1:0);for(G>=128&&(ge[(P&&P.length||0)&127]=-1),G=127,ee=4*128;ee>0;--ee)I=ge[G+34&127],S=ge[G=G+1&127],I^=I<<13,S^=S<<17,I^=I>>>15,S^=S>>>12,ge[G]=I^S;C.w=re,C.X=ge,C.i=G}A(m,x)}function g(x,m){return m.i=x.i,m.w=x.w,m.X=x.X.slice(),m}function $(x,m){x==null&&(x=+new Date);var A=new c(x),C=m&&m.state,P=function(){return(A.next()>>>0)/4294967296};return P.double=function(){do var S=A.next()>>>11,I=(A.next()>>>0)/4294967296,G=(S+I)/(1<<21);while(G===0);return G},P.int32=A.next,P.quick=P,C&&(C.X&&g(C,A),P.state=function(){return g(A,{})}),P}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.xor4096=$})(Tt,t,!1)})(_p);var V$=_p.exports,Cp={exports:{}};Cp.exports;(function(t){(function(r,e,n){function c(x){var m=this,A="";m.next=function(){var P=m.b,S=m.c,I=m.d,G=m.a;return P=P<<25^P>>>7^S,S=S-I|0,I=I<<24^I>>>8^G,G=G-P|0,m.b=P=P<<20^P>>>12^S,m.c=S=S-I|0,m.d=I<<16^S>>>16^G,m.a=G-P|0},m.a=0,m.b=0,m.c=-1640531527,m.d=1367130551,x===Math.floor(x)?(m.a=x/4294967296|0,m.b=x|0):A+=x;for(var C=0;C>>0)/4294967296};return P.double=function(){do var S=A.next()>>>11,I=(A.next()>>>0)/4294967296,G=(S+I)/(1<<21);while(G===0);return G},P.int32=A.next,P.quick=P,C&&(typeof C=="object"&&g(C,A),P.state=function(){return g(A,{})}),P}e&&e.exports?e.exports=$:n&&n.amd?n(function(){return $}):this.tychei=$})(Tt,t,!1)})(Cp);var W$=Cp.exports,md={exports:{}};(function(t){(function(r,e,n){var c=256,g=6,$=52,x="random",m=n.pow(c,g),A=n.pow(2,$),C=A*2,P=c-1,S;function I(L,H,W){var V=[];H=H==!0?{entropy:!0}:H||{};var J=ge(re(H.entropy?[L,U(e)]:L??q(),3),V),Y=new G(V),ue=function(){for(var de=Y.g(g),le=m,Ie=0;de=C;)de/=2,le/=2,Ie>>>=1;return(de+Ie)/le};return ue.int32=function(){return Y.g(4)|0},ue.quick=function(){return Y.g(4)/4294967296},ue.double=ue,ge(U(Y.S),e),(H.pass||W||function(de,le,Ie,ze){return ze&&(ze.S&&ee(ze,Y),de.state=function(){return ee(Y,{})}),Ie?(n[x]=de,le):de})(ue,J,"global"in H?H.global:this==n,H.state)}function G(L){var H,W=L.length,V=this,J=0,Y=V.i=V.j=0,ue=V.S=[];for(W||(L=[W++]);J({type:"num",value:t}),Yt=t=>({type:"str",value:t}),au=t=>({type:"bool",value:t}),Pp=t=>({type:"obj",value:t}),as=t=>({type:"arr",value:t}),tb=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),pe=t=>({type:"fn",native:t}),rb=t=>({type:"return",value:t}),sb=()=>({type:"break",value:null}),nb=()=>({type:"continue",value:null}),ab=t=>t.type==="return"?t.value:t,xd=(t,r)=>({type:"error",value:t,info:r});function ln(t){if(t==null)throw new rr("Expect anything, but got nothing.")}function As(t){if(t==null)throw new rr("Expect boolean, but got nothing.");if(t.type!=="bool")throw new rr(`Expect boolean, but got ${t.type}.`)}function $i(t){if(t==null)throw new rr("Expect function, but got nothing.");if(t.type!=="fn")throw new rr(`Expect function, but got ${t.type}.`)}function Nr(t){if(t==null)throw new rr("Expect string, but got nothing.");if(t.type!=="str")throw new rr(`Expect string, but got ${t.type}.`)}function ke(t){if(t==null)throw new rr("Expect number, but got nothing.");if(t.type!=="num")throw new rr(`Expect number, but got ${t.type}.`)}function pi(t){if(t==null)throw new rr("Expect object, but got nothing.");if(t.type!=="obj")throw new rr(`Expect object, but got ${t.type}.`)}function ac(t){if(t==null)throw new rr("Expect array, but got nothing.");if(t.type!=="arr")throw new rr(`Expect array, but got ${t.type}.`)}function Hc(t){return t.type==="obj"}function Bv(t){return t.type==="arr"}function Ah(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function _h(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(n=>_h(n,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function Ch(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>Ch(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,n]of t.value.entries())r[e]=Ch(n);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function kh(t){if(t===null)return Et;if(typeof t=="boolean")return au(t);if(typeof t=="string")return Yt(t);if(typeof t=="number")return Fe(t);if(Array.isArray(t))return as(t.map(r=>kh(r)));if(typeof t=="object"){const r=new Map;for(const[e,n]of Object.entries(t))r.set(e,kh(n));return Pp(r)}return Et}function Du(t,r=!1,e=new Set){if((t.type==="arr"||t.type==="obj")&&e.has(t.value))return"...";if(r&&t.type==="str")return'"'+t.value.replace(/["\\\r\n]/g,n=>`\\${n}`)+'"';if(t.type==="str")return t.value;if(t.type==="num")return t.value.toString();if(t.type==="arr"){e.add(t.value);const n=[];for(const c of t.value)n.push(Du(c,!0,e));return"[ "+n.join(", ")+" ]"}if(t.type==="obj"){e.add(t.value);const n=[];for(const[c,g]of t.value)n.push(`${c}: ${Du(g,!0,e)}`);return"{ "+n.join(", ")+" }"}return t.type==="bool"?t.value.toString():t.type==="null"?"null":t.type==="fn"?`@( ${(t.args??[]).join(", ")} ) { ... }`:"?"}const ib={help:Yt("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":Yt("0.16.0"),"Core:ai":Yt("kawaii"),"Core:not":pe(([t])=>(As(t),t.value?tn:gn)),"Core:eq":pe(([t,r])=>(ln(t),ln(r),Ah(t,r)?gn:tn)),"Core:neq":pe(([t,r])=>(ln(t),ln(r),Ah(t,r)?tn:gn)),"Core:and":pe(([t,r])=>(As(t),t.value?(As(r),r.value?gn:tn):tn)),"Core:or":pe(([t,r])=>(As(t),t.value?gn:(As(r),r.value?gn:tn))),"Core:add":pe(([t,r])=>(ke(t),ke(r),Fe(t.value+r.value))),"Core:sub":pe(([t,r])=>(ke(t),ke(r),Fe(t.value-r.value))),"Core:mul":pe(([t,r])=>(ke(t),ke(r),Fe(t.value*r.value))),"Core:pow":pe(([t,r])=>{ke(t),ke(r);const e=t.value**r.value;if(isNaN(e))throw new rr("Invalid operation.");return Fe(e)}),"Core:div":pe(([t,r])=>{ke(t),ke(r);const e=t.value/r.value;if(isNaN(e))throw new rr("Invalid operation.");return Fe(e)}),"Core:mod":pe(([t,r])=>(ke(t),ke(r),Fe(t.value%r.value))),"Core:gt":pe(([t,r])=>(ke(t),ke(r),t.value>r.value?gn:tn)),"Core:lt":pe(([t,r])=>(ke(t),ke(r),t.value(ke(t),ke(r),t.value>=r.value?gn:tn)),"Core:lteq":pe(([t,r])=>(ke(t),ke(r),t.value<=r.value?gn:tn)),"Core:type":pe(([t])=>(ln(t),Yt(t.type))),"Core:to_str":pe(([t])=>(ln(t),Yt(Du(t)))),"Core:range":pe(([t,r])=>(ke(t),ke(r),t.valueFe(n+t.value))):t.value>r.value?as(Array.from({length:t.value-r.value+1},(e,n)=>Fe(t.value-n))):as([t]))),"Core:sleep":pe(async([t])=>(ke(t),await new Promise(r=>setTimeout(r,t.value)),Et)),"Util:uuid":pe(()=>Yt(B$())),"Json:stringify":pe(([t])=>(ln(t),Yt(JSON.stringify(Ch(t))))),"Json:parse":pe(([t])=>{Nr(t);try{return kh(JSON.parse(t.value))}catch{return xd("not_json")}}),"Json:parsable":pe(([t])=>{Nr(t);try{JSON.parse(t.value)}catch{return au(!1)}return au(!0)}),"Date:now":pe(()=>Fe(Date.now())),"Date:year":pe(([t])=>(t&&ke(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":pe(([t])=>(t&&ke(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":pe(([t])=>(t&&ke(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":pe(([t])=>(t&&ke(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":pe(([t])=>(t&&ke(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":pe(([t])=>(t&&ke(t),Fe(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":pe(([t])=>(Nr(t),Fe(new Date(t.value).getTime()))),"Math:Infinity":Fe(1/0),"Math:E":Fe(Math.E),"Math:LN2":Fe(Math.LN2),"Math:LN10":Fe(Math.LN10),"Math:LOG2E":Fe(Math.LOG2E),"Math:LOG10E":Fe(Math.LOG10E),"Math:PI":Fe(Math.PI),"Math:SQRT1_2":Fe(Math.SQRT1_2),"Math:SQRT2":Fe(Math.SQRT2),"Math:abs":pe(([t])=>(ke(t),Fe(Math.abs(t.value)))),"Math:acos":pe(([t])=>(ke(t),Fe(Math.acos(t.value)))),"Math:acosh":pe(([t])=>(ke(t),Fe(Math.acosh(t.value)))),"Math:asin":pe(([t])=>(ke(t),Fe(Math.asin(t.value)))),"Math:asinh":pe(([t])=>(ke(t),Fe(Math.asinh(t.value)))),"Math:atan":pe(([t])=>(ke(t),Fe(Math.atan(t.value)))),"Math:atanh":pe(([t])=>(ke(t),Fe(Math.atanh(t.value)))),"Math:atan2":pe(([t,r])=>(ke(t),ke(r),Fe(Math.atan2(t.value,r.value)))),"Math:cbrt":pe(([t])=>(ke(t),Fe(Math.cbrt(t.value)))),"Math:ceil":pe(([t])=>(ke(t),Fe(Math.ceil(t.value)))),"Math:clz32":pe(([t])=>(ke(t),Fe(Math.clz32(t.value)))),"Math:cos":pe(([t])=>(ke(t),Fe(Math.cos(t.value)))),"Math:cosh":pe(([t])=>(ke(t),Fe(Math.cosh(t.value)))),"Math:exp":pe(([t])=>(ke(t),Fe(Math.exp(t.value)))),"Math:expm1":pe(([t])=>(ke(t),Fe(Math.expm1(t.value)))),"Math:floor":pe(([t])=>(ke(t),Fe(Math.floor(t.value)))),"Math:fround":pe(([t])=>(ke(t),Fe(Math.fround(t.value)))),"Math:hypot":pe(([t])=>{ac(t);const r=[];for(const e of t.value)ke(e),r.push(e.value);return Fe(Math.hypot(...r))}),"Math:imul":pe(([t,r])=>(ke(t),ke(r),Fe(Math.imul(t.value,r.value)))),"Math:log":pe(([t])=>(ke(t),Fe(Math.log(t.value)))),"Math:log1p":pe(([t])=>(ke(t),Fe(Math.log1p(t.value)))),"Math:log10":pe(([t])=>(ke(t),Fe(Math.log10(t.value)))),"Math:log2":pe(([t])=>(ke(t),Fe(Math.log2(t.value)))),"Math:max":pe(([t,r])=>(ke(t),ke(r),Fe(Math.max(t.value,r.value)))),"Math:min":pe(([t,r])=>(ke(t),ke(r),Fe(Math.min(t.value,r.value)))),"Math:pow":pe(([t,r])=>(ke(t),ke(r),Fe(Math.pow(t.value,r.value)))),"Math:round":pe(([t])=>(ke(t),Fe(Math.round(t.value)))),"Math:sign":pe(([t])=>(ke(t),Fe(Math.sign(t.value)))),"Math:sin":pe(([t])=>(ke(t),Fe(Math.sin(t.value)))),"Math:sinh":pe(([t])=>(ke(t),Fe(Math.sinh(t.value)))),"Math:sqrt":pe(([t])=>{ke(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new rr("Invalid operation.");return Fe(r)}),"Math:tan":pe(([t])=>(ke(t),Fe(Math.tan(t.value)))),"Math:tanh":pe(([t])=>(ke(t),Fe(Math.tanh(t.value)))),"Math:trunc":pe(([t])=>(ke(t),Fe(Math.trunc(t.value)))),"Math:rnd":pe(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?Fe(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):Fe(Math.random())),"Math:gen_rng":pe(([t])=>{if(ln(t),t.type!=="num"&&t.type!=="str")return Et;const r=kp(t.value.toString());return pe(([e,n])=>e&&e.type==="num"&&n&&n.type==="num"?Fe(Math.floor(r()*(Math.floor(n.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):Fe(r()))}),"Num:to_hex":pe(([t])=>(ke(t),Yt(t.value.toString(16)))),"Num:from_hex":pe(([t])=>(Nr(t),Fe(parseInt(t.value,16)))),"Str:lf":Yt(` +`),"Str:lt":pe(([t,r])=>(Nr(t),Nr(r),t.value(Nr(t),Nr(r),t.value>r.value?Fe(-1):t.value===r.value?Fe(0):Fe(1))),"Str:from_codepoint":pe(([t])=>(ke(t),Yt(String.fromCodePoint(t.value)))),"Obj:keys":pe(([t])=>(pi(t),as(Array.from(t.value.keys()).map(r=>Yt(r))))),"Obj:vals":pe(([t])=>(pi(t),as(Array.from(t.value.values())))),"Obj:kvs":pe(([t])=>(pi(t),as(Array.from(t.value.entries()).map(([r,e])=>as([Yt(r),e]))))),"Obj:get":pe(([t,r])=>(pi(t),Nr(r),t.value.get(r.value)??Et)),"Obj:set":pe(([t,r,e])=>(pi(t),Nr(r),ln(e),t.value.set(r.value,e),Et)),"Obj:has":pe(([t,r])=>(pi(t),Nr(r),au(t.value.has(r.value)))),"Obj:copy":pe(([t])=>(pi(t),Pp(new Map(t.value)))),"Async:interval":pe(async([t,r,e],n)=>{ke(t),$i(r),e&&(As(e),e.value&&n.call(r,[]));const c=setInterval(()=>{n.topCall(r,[])},t.value),g=()=>{clearInterval(c)};return n.registerAbortHandler(g),pe(([],$)=>{clearInterval(c),$.unregisterAbortHandler(g)})}),"Async:timeout":pe(async([t,r],e)=>{ke(t),$i(r);const n=setTimeout(()=>{e.topCall(r,[])},t.value),c=()=>{clearTimeout(n)};return e.registerAbortHandler(c),pe(([],g)=>{clearTimeout(n),g.unregisterAbortHandler(c)})})};var $u={},lb=()=>{const t="\\ud800-\\udfff",r="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",c="\\u1ab0-\\u1aff",g="\\u1dc0-\\u1dff",$=r+e+n+c+g,x="\\ufe0e\\ufe0f",m="\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93",A=`[${t}]`,C=`[${$}]`,P="\\ud83c[\\udffb-\\udfff]",S=`(?:${C}|${P})`,I=`[^${t}]`,G="(?:\\uD83C[\\uDDE6-\\uDDFF]){2}",ee="[\\ud800-\\udbff][\\udc00-\\udfff]",re="\\u200d",ge="(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)",q=`[${m}]`,U=`${S}?`,L=`[${x}]?`,H=`(?:${re}(?:${[I,G,ee].join("|")})${L+U})*`,W=L+U+H,J=`(?:${[`${I}${C}?`,C,G,ee,A,q].join("|")})`;return new RegExp(`${ge}|${P}(?=${P})|${J+W}`,"g")},ob=Tt&&Tt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($u,"__esModule",{value:!0});var Ac=ob(lb);function Ph(t){if(typeof t!="string")throw new Error("A string is expected as input");return t.match(Ac.default())||[]}var Xu=$u.toArray=Ph;function Ep(t){if(typeof t!="string")throw new Error("Input must be a string");var r=t.match(Ac.default());return r===null?0:r.length}var Mp=$u.length=Ep;function $d(t,r,e){if(r===void 0&&(r=0),typeof t!="string")throw new Error("Input must be a string");(typeof r!="number"||r<0)&&(r=0),typeof e=="number"&&e<0&&(e=0);var n=t.match(Ac.default());return n?n.slice(r,e).join(""):""}var Sp=$u.substring=$d;function ub(t,r,e){if(r===void 0&&(r=0),typeof t!="string")throw new Error("Input must be a string");var n=Ep(t);if(typeof r!="number"&&(r=parseInt(r,10)),r>=n)return"";r<0&&(r+=n);var c;typeof e>"u"?c=n:(typeof e!="number"&&(e=parseInt(e,10)),c=e>=0?e+r:r);var g=t.match(Ac.default());return g?g.slice(r,c).join(""):""}$u.substr=ub;function fb(t,r,e,n){if(r===void 0&&(r=16),e===void 0&&(e="#"),n===void 0&&(n="right"),typeof t!="string"||typeof r!="number")throw new Error("Invalid arguments specified");if(["left","right"].indexOf(n)===-1)throw new Error("Pad position should be either left or right");typeof e!="string"&&(e=String(e));var c=Ep(t);if(c>r)return $d(t,0,r);if(c=n.length)return r===""?n.length:-1;if(r==="")return e;var c=Ph(r),g=!1,$;for($=e;$pe(async(r,e)=>Yt(t.value.toString()))},str:{to_num:t=>pe(async(r,e)=>{const n=parseInt(t.value,10);return isNaN(n)?Et:Fe(n)}),len:t=>Fe(Mp(t.value)),replace:t=>pe(async([r,e],n)=>(Nr(r),Nr(e),Yt(t.value.split(r.value).join(e.value)))),index_of:t=>pe(async([r],e)=>(Nr(r),Fe(Fp(t.value,r.value)))),incl:t=>pe(async([r],e)=>(Nr(r),t.value.includes(r.value)?gn:tn)),trim:t=>pe(async(r,e)=>Yt(t.value.trim())),upper:t=>pe(async(r,e)=>Yt(t.value.toUpperCase())),lower:t=>pe(async(r,e)=>Yt(t.value.toLowerCase())),split:t=>pe(async([r],e)=>(r&&Nr(r),as(r?t.value.split(r?r.value:"").map(n=>Yt(n)):Xu(t.value).map(n=>Yt(n))))),slice:t=>pe(async([r,e],n)=>(ke(r),ke(e),Yt(Sp(t.value,r.value,e.value)))),pick:t=>pe(async([r],e)=>{ke(r);const c=Xu(t.value)[r.value];return c?Yt(c):Et}),codepoint_at:t=>pe(([r],e)=>{ke(r);const n=t.value.charCodeAt(r.value);return Number.isNaN(n)?Et:Fe(n)})},arr:{len:t=>Fe(t.value.length),push:t=>pe(async([r],e)=>(ln(r),t.value.push(r),t)),unshift:t=>pe(async([r],e)=>(ln(r),t.value.unshift(r),t)),pop:t=>pe(async(r,e)=>t.value.pop()??Et),shift:t=>pe(async(r,e)=>t.value.shift()??Et),concat:t=>pe(async([r],e)=>(ac(r),as(t.value.concat(r.value)))),slice:t=>pe(async([r,e],n)=>(ke(r),ke(e),as(t.value.slice(r.value,e.value)))),join:t=>pe(async([r],e)=>(r&&Nr(r),Yt(t.value.map(n=>n.type==="str"?n.value:"").join(r?r.value:"")))),map:t=>pe(async([r],e)=>{$i(r);const n=t.value.map(async(c,g)=>await e.call(r,[c,Fe(g)]));return as(await Promise.all(n))}),filter:t=>pe(async([r],e)=>{$i(r);const n=[];for(let c=0;cpe(async([r,e],n)=>{$i(r);const c=e!=null;let g=c?e:t.value[0];for(let $=c?0:1;$pe(async([r],e)=>{$i(r);for(let n=0;npe(async([r],e)=>(ln(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?tn:(c=>c.value.map(g=>g.type==="str"||g.type==="num"||g.type==="bool"?g.value:g.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?gn:tn)),reverse:t=>pe(async(r,e)=>(t.value.reverse(),Et)),copy:t=>pe(async(r,e)=>as([...t.value])),sort:t=>pe(async([r],e)=>{const n=async(g,$)=>{if(g.length<=1)return g;const x=Math.floor(g.length/2),m=await n(g.slice(0,x),$),A=await n(g.slice(x),$);return c(m,A,$)},c=async(g,$,x)=>{const m=[];let A=0,C=0;for(;AYt(t.value),info:t=>t.info??Et}};function hb(t,r){if(Object.hasOwn(Hv,t.type)){const e=Hv[t.type];if(Object.hasOwn(e,r))return e[r](t);throw new rr(`No such prop (${r}) in ${t.type}.`)}else throw new rr(`Cannot read prop of ${t.type}. (reading ${r})`)}const pb={mut(t){return{isMutable:!0,value:t}},const(t){return{isMutable:!1,value:t}}};var Es=globalThis&&globalThis.__decorate||function(t,r,e,n){var c=arguments.length,g=c<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(t,r,e,n);else for(var x=t.length-1;x>=0;x--)($=t[x])&&(g=(c<3?$(g):c>3?$(r,e,g):$(r,e))||g);return c>3&&g&&Object.defineProperty(r,e,g),g};const bd=300,vb=bd-1;let hs=class{constructor(r,e={}){be(this,"opts");be(this,"stepCount",0);be(this,"stop",!1);be(this,"scope");be(this,"abortHandlers",[]);be(this,"vars",{});this.opts=e;const n={print:pe(([c])=>{ln(c),this.opts.out&&this.opts.out(c)}),readline:pe(async c=>{const g=c[0];if(Nr(g),this.opts.in==null)return Et;const $=await this.opts.in(g.value);return Yt($)})};this.vars=Object.fromEntries(Object.entries({...r,...ib,...n}).map(([c,g])=>[c,pb.const(g)])),this.scope=new oi([new Map(Object.entries(this.vars))]),this.scope.opts.log=(c,g)=>{switch(c){case"add":this.log("var:add",g);break;case"read":this.log("var:read",g);break;case"write":this.log("var:write",g);break}}}async exec(r){if(!(r==null||r.length===0))try{await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}catch(e){this.handleError(e)}}async execFn(r,e){return await this._fn(r,e).catch(n=>(this.handleError(n),xd("func_failed")))}execFnSimple(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(c){switch(c.type){case"arr":return c.value.map(g=>e(g));case"bool":return c.value;case"null":return null;case"num":return c.value;case"obj":{const g={};for(const[$,x]of c.value.entries())g[$]=e(x);return g}case"str":return c.value;default:return}}const n=new Map;for(const c of r)switch(c.type){case"meta":{n.set(c.name,e(c.value));break}}return n}handleError(r){if(this.opts.err)this.stop||(this.abort(),r instanceof bc?this.opts.err(r):this.opts.err(new I$(r)));else throw r}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const n of r.members)switch(n.type){case"def":{if(n.mut)throw new Error("Namespaces cannot include mutable variable: "+n.name);const c={isMutable:n.mut,value:await this._eval(n.expr,e)};e.add(n.name,c),this.scope.add(r.name+":"+n.name,c);break}case"ns":break;default:throw new Error("invalid ns member type: "+n.type)}}async _fn(r,e){if(r.native)return r.native(e,{call:this.execFnSimple,topCall:this.execFn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??Et;{const n=new Map;for(let g=0;g<(r.args??[]).length;g++)n.set(r.args[g],{isMutable:!0,value:e[g]});const c=r.scope.createChildScope(n);return ab(await this._run(r.statements,c))}}async _eval(r,e){if(this.stop)return Et;if(this.stepCount%bd===vb&&await new Promise(n=>setTimeout(n,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new rr("max step exceeded");switch(r.type){case"call":{const n=await this._eval(r.target,e);$i(n);const c=await Promise.all(r.args.map(g=>this._eval(g,e)));return this._fn(n,c)}case"if":{const n=await this._eval(r.cond,e);if(As(n),n.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const c of r.elseif){const g=await this._eval(c.cond,e);if(As(g),g.value)return this._eval(c.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return Et}case"match":{const n=await this._eval(r.about,e);for(const c of r.qs){const g=await this._eval(c.q,e);if(Ah(n,g))return await this._eval(c.a,e)}return r.default?await this._eval(r.default,e):Et}case"loop":{for(;;){const n=await this._run(r.statements,e.createChildScope());if(n.type==="break")break;if(n.type==="return")return n}return Et}case"for":{if(r.times){const n=await this._eval(r.times,e);ke(n);for(let c=0;c0){const c=[];for(const g of r.attr)c.push({name:g.name,value:await this._eval(g.value,e)});n.attr=c}return e.add(r.name,{isMutable:r.mut,value:n}),Et}case"identifier":return e.get(r.name);case"assign":{const n=await this._eval(r.expr,e);return await this.assign(e,r.dest,n),Et}case"addAssign":{const n=await this._eval(r.dest,e);ke(n);const c=await this._eval(r.expr,e);return ke(c),await this.assign(e,r.dest,Fe(n.value+c.value)),Et}case"subAssign":{const n=await this._eval(r.dest,e);ke(n);const c=await this._eval(r.expr,e);return ke(c),await this.assign(e,r.dest,Fe(n.value-c.value)),Et}case"null":return Et;case"bool":return au(r.value);case"num":return Fe(r.value);case"str":return Yt(r.value);case"arr":return as(await Promise.all(r.value.map(n=>this._eval(n,e))));case"obj":{const n=new Map;for(const c of r.value.keys())n.set(c,await this._eval(r.value.get(c),e));return Pp(n)}case"prop":{const n=await this._eval(r.target,e);return Hc(n)?n.value.has(r.name)?n.value.get(r.name):Et:hb(n,r.name)}case"index":{const n=await this._eval(r.target,e),c=await this._eval(r.index,e);if(Bv(n)){ke(c);const g=n.value[c.value];if(g===void 0)throw new T$(`Index out of range. index: ${c.value} max: ${n.value.length-1}`);return g}else{if(Hc(n))return Nr(c),n.value.has(c.value)?n.value.get(c.value):Et;throw new rr(`Cannot read prop (${Du(c)}) of ${n.type}.`)}}case"not":{const n=await this._eval(r.expr,e);return As(n),au(!n.value)}case"fn":return tb(r.args.map(n=>n.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"exists":return au(e.exists(r.identifier.name));case"tmpl":{let n="";for(const c of r.tmpl)if(typeof c=="string")n+=c;else{const g=await this._eval(c,e);n+=Du(g)}return Yt(n)}case"return":{const n=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:n}),rb(n)}case"break":return this.log("block:break",{scope:e.name}),sb();case"continue":return this.log("block:continue",{scope:e.name}),nb();case"ns":return Et;case"meta":return Et;case"and":{const n=await this._eval(r.left,e);if(As(n),n.value){const c=await this._eval(r.right,e);return As(c),c}else return n}case"or":{const n=await this._eval(r.left,e);if(As(n),n.value)return n;{const c=await this._eval(r.right,e);return As(c),c}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let n=Et;for(let c=0;ce!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,n){if(e.type==="identifier")r.assign(e.name,n);else if(e.type==="index"){const c=await this._eval(e.target,r),g=await this._eval(e.index,r);if(Bv(c))ke(g),c.value[g.value]=n;else if(Hc(c))Nr(g),c.value.set(g.value,n);else throw new rr(`Cannot read prop (${Du(g)}) of ${c.type}.`)}else if(e.type==="prop"){const c=await this._eval(e.target,r);pi(c),c.value.set(e.name,n)}else throw new rr("The left-hand side of an assignment expression must be a variable or a property/index access.")}};Es([$r],hs.prototype,"exec",null);Es([$r],hs.prototype,"execFn",null);Es([$r],hs.prototype,"execFnSimple",null);Es([$r],hs.prototype,"handleError",null);Es([$r],hs.prototype,"log",null);Es([$r],hs.prototype,"collectNs",null);Es([$r],hs.prototype,"collectNsMember",null);Es([$r],hs.prototype,"_fn",null);Es([$r],hs.prototype,"_eval",null);Es([$r],hs.prototype,"_run",null);Es([$r],hs.prototype,"registerAbortHandler",null);Es([$r],hs.prototype,"unregisterAbortHandler",null);Es([$r],hs.prototype,"abort",null);Es([$r],hs.prototype,"assign",null);Es([$r],hs,"collectMetadata",null);function gb(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function iu(t,r,e,n){var c=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(c,iu.prototype),c.expected=r,c.found=e,c.location=n,c.name="SyntaxError",c}gb(iu,Error);function Uc(t,r,e){return e=e||" ",t.length>r?t:(r-=t.length,e+=e.repeat(r),t+e.slice(0,r))}iu.prototype.format=function(t){var r="Error: "+this.message;if(this.location){var e=null,n;for(n=0;n `+$+` +`+m+` | +`+g.line+" | "+A+` +`+m+" | "+Uc("",c.column-1," ")+Uc("",P,"^")}else r+=` + at `+$}return r};iu.buildMessage=function(t,r){var e={literal:function(A){return'"'+c(A.text)+'"'},class:function(A){var C=A.parts.map(function(P){return Array.isArray(P)?g(P[0])+"-"+g(P[1]):g(P)});return"["+(A.inverted?"^":"")+C.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(A){return A.description}};function n(A){return A.charCodeAt(0).toString(16).toUpperCase()}function c(A){return A.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+n(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+n(C)})}function g(A){return A.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+n(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+n(C)})}function $(A){return e[A.type](A)}function x(A){var C=A.map($),P,S;if(C.sort(),C.length>0){for(P=1,S=1;P=",Ye="<",Br=">",Wt="+",Ar="-",Ft="*",br="^",Hr="/",Or="%",Rr="!",Dt="[",z=".",Z="if",se="elif",ve="else",ye="match",oe="=>",Ne="eval",me="exists",$e="`",he='"',Le="'",Re='\\"',He="\\'",We="true",Ze="false",at="null",it=";",bt="@",Kt="@(",Ct=`\r +`,sr=/^[A-Z0-9_:]/i,Ns=/^[^`{]/,rs=/^[{}`]/,Lt=/^[+\-]/,vt=/^[1-9]/,qt=/^[0-9]/,Zn=/^[A-Z_]/i,Qn=/^[A-Z0-9_]/i,Ii=/^[\r\n]/,Ti=/^[ \t\r\n]/,or=/^[ \t]/,ur=Js(),ji=ae("//",!1),xn=ae("/*",!1),_r=ae("*/",!1),Ot=ae("(",!1),Cr=ae(")",!1),fr=ae("::",!1),tt=ae("{",!1),Jt=ae("}",!1),zr=ae("###",!1),xt=ae("let",!1),$t=ae(":",!1),ps=ae("=",!1),Ri=ae("var",!1),Di=ae("<:",!1),Is=ae("#[",!1),vs=ae("]",!1),At=ae("each",!1),gt=ae(",",!1),Ts=ae("for",!1),gr=ae("return",!1),dr=Bt([["A","Z"],["0","9"],"_",":"],!1,!0),Li=ae("loop",!1),Bi=ae("break",!1),Hi=ae("continue",!1),Ui=ae("+=",!1),Yn=ae("-=",!1),ea=ae("\\",!1),qi=ae("||",!1),zi=ae("&&",!1),Vi=ae("==",!1),Wi=ae("!=",!1),Ki=ae("<=",!1),ta=ae(">=",!1),$n=ae("<",!1),ra=ae(">",!1),Ji=ae("+",!1),sa=ae("-",!1),na=ae("*",!1),Xi=ae("^",!1),Gi=ae("/",!1),Zi=ae("%",!1),bn=ae("!",!1),gs=ae("[",!1),An=ae(".",!1),Qi=ae("if",!1),Yi=ae("elif",!1),el=ae("else",!1),js=ae("match",!1),Rs=ae("=>",!1),Ds=ae("eval",!1),tl=ae("exists",!1),Ls=ae("`",!1),Bs=Bt(["`","{"],!0,!1),Hs=Bt(["{","}","`"],!1,!1),Us=ae('"',!1),qs=ae("'",!1),zs=ae('\\"',!1),aa=ae("\\'",!1),Nt=Bt(["+","-"],!1,!1),ia=Bt([["1","9"]],!1,!1),cr=Bt([["0","9"]],!1,!1),rl=ae("true",!1),Vs=ae("false",!1),sl=ae("null",!1),ds=ae(";",!1),nl=ae("@",!1),_n=ae("@(",!1),al=Bt([["A","Z"],"_"],!1,!0),la=Bt([["A","Z"],["0","9"],"_"],!1,!0),il=ae(`\r +`,!1),ll=Bt(["\r",` +`],!1,!1),ol=Bt([" "," ","\r",` +`],!1,!1),ul=Bt([" "," "],!1,!1),fl=function(s){return s.join("")},cl=function(){return te()},hl=function(){return te()},pl=function(){return""},oa=function(){return""},vl=function(s){return s??[]},Cn=function(s,o){return o},gl=function(s,o){return[s,...o]},kn=function(s,o){return o},dl=function(s,o){return[s,...o]},ua=function(s,o){return o},yl=function(s,o){return[s,...o]},wl=function(s){return s},ml=function(s,o){return h("ns",{name:s,members:o})},xl=function(s,o){return h("meta",{name:s,value:o})},$l=function(s){return h("meta",{name:null,value:s})},bl=function(s,o,p){return h("def",{name:s,varType:o,expr:p,mut:!1,attr:[]})},Al=function(s,o,p){return h("def",{name:s,varType:o,expr:p,mut:!0,attr:[]})},_l=function(s){return h("identifier",{name:"print",chain:[h("callChain",{args:[s]})]})},Cl=function(s,o){return h("attr",{name:s,value:o??h("bool",{value:!0})})},kl=function(s,o,p){return h("each",{var:s,items:o,for:p})},Pl=function(s,o,p){return h("each",{var:s,items:o,for:p})},El=function(s,o){return o},Ml=function(s,o,p,u){return h("for",{var:s,from:o??h("num",{value:0}),to:p,for:u})},Sl=function(s,o){return o},Fl=function(s,o,p,u){return h("for",{var:s,from:o??h("num",{value:0}),to:p,for:u})},Ol=function(s,o){return h("for",{times:s,for:o})},Nl=function(s,o){return h("for",{times:s,for:o})},Il=function(s){return h("return",{expr:s})},Tl=function(s){return h("loop",{statements:s})},jl=function(){return h("break",{})},fa=function(){return h("continue",{})},Rl=function(s,o,p){return o==="+="?h("addAssign",{dest:s,expr:p}):o==="-="?h("subAssign",{dest:s,expr:p}):h("assign",{dest:s,expr:p})},ca=function(s,o,p){return{op:o,term:p}},Dl=function(s,o){return h("infix",{operands:[s,...o.map(p=>p.term)],operators:o.map(p=>p.op)})},Ll=function(){return te()},Bl=function(s){return h("not",{expr:s})},ha=function(s,o){return{...s,chain:o}},Hl=function(s){return h("callChain",{args:s??[]})},pa=function(s,o){return o},Ul=function(s,o){return[s,...o]},ql=function(s){return h("indexChain",{index:s})},zl=function(s){return h("propChain",{name:s})},Vl=function(s,o,p,u){return h("if",{cond:s,then:o,elseif:p??[],else:u})},Wl=function(s,o){return[s,...o]},va=function(s,o){return{cond:s,then:o}},Kl=function(s){return s},ga=function(s,o,p){return{q:o,a:p}},Jl=function(s,o,p){return h("match",{about:s,qs:o??[],default:p})},Xl=function(s){return h("block",{statements:s})},Gl=function(s){return h("exists",{identifier:s})},da=function(s){return h("identifier",{name:s})},Zl=function(s){return h("tmpl",{tmpl:s})},ya=function(s){return s.join("")},wa=function(s){return s},Ql=function(s){return h("str",{value:s.join("")})},ma=function(s){return s},Yl=function(s){return h("str",{value:s.join("")})},eo=function(){return'"'},to=function(){return"'"},ro=function(){return h("num",{value:parseFloat(te())})},so=function(){return h("num",{value:parseFloat(te())})},no=function(){return h("num",{value:parseInt(te(),10)})},ao=function(){return h("num",{value:parseInt(te(),10)})},xa=function(){return h("bool",{value:!0})},io=function(){return h("bool",{value:!1})},$a=function(){return h("null",{})},ba=function(s,o){return{k:s,v:o}},lo=function(s){const o=new Map;for(const p of s)o.set(p.k,p.v);return h("obj",{value:o})},Aa=function(s){return s},oo=function(s){return h("arr",{value:s})},uo=function(s,o){return{name:s,argType:o}},_a=function(s,o){return[s,...o]},fo=function(s,o,p,u,d,v){return(s.length>0||p.length>0)&&wo("Cannot use spaces before or after the function name."),h("def",{name:o,expr:h("fn",{args:u??[],retType:d},v??[]),mut:!1,attr:[]})},Ca=function(s,o,p){return h("fn",{args:s??[],retType:o},p??[])},ka=function(s){return s},co=function(s){return h("arr",{value:s})},Pa=function(s,o){return{k:s,v:o}},ho=function(s){const o=new Map;for(const p of s)o.set(p.k,p.v);return h("obj",{value:o})},po=function(s,o){return h("fnTypeSource",{args:s??[],result:o})},vo=function(s,o){return[s,...o]},go=function(s,o){return h("namedTypeSource",{name:s,inner:o})},yo=function(s){return h("namedTypeSource",{name:s,inner:null})},i=function(){return te()},X=function(){return te()},Ws=function(s){return h("block",{statements:s??[]})},a=0,K=0,E=[{line:1,column:1}],T=0,Vr=[],k=0,R={},Ks;if("startRule"in r){if(!(r.startRule in c))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');g=c[r.startRule]}function te(){return t.substring(K,a)}function Xt(){return Xs(K,a)}function wo(s,o){throw o=o!==void 0?o:Xs(K,a),Ma(s,o)}function ae(s,o){return{type:"literal",text:s,ignoreCase:o}}function Bt(s,o,p){return{type:"class",parts:s,inverted:o,ignoreCase:p}}function Js(){return{type:"any"}}function N(){return{type:"end"}}function Ea(s){var o=E[s],p;if(o)return o;for(p=s-1;!E[p];)p--;for(o=E[p],o={line:o.line,column:o.column};pT&&(T=a,Vr=[]),Vr.push(s))}function Ma(s,o){return new iu(s,null,null,o)}function mo(s,o,p){return new iu(iu.buildMessage(s,o),s,o,p)}function Sa(){var s,o,p,u=a*77+0,d=R[u];if(d)return a=d.nextPos,d.result;for(s=a,o=[],p=Fa();p!==e;)o.push(p),p=Fa();return K=s,o=fl(o),s=o,R[u]={nextPos:a,result:s},s}function Fa(){var s,o,p=a*77+1,u=R[p];return u?(a=u.nextPos,u.result):(s=a,o=Zs(),o!==e&&(K=s,o=cl()),s=o,s===e&&(s=a,o=In(),o!==e&&(K=s,o=hl()),s=o,s===e&&(s=xo(),s===e&&(t.length>a?(s=t.charAt(a),a++):(s=e,k===0&&O(ur))))),R[p]={nextPos:a,result:s},s)}function xo(){var s,o,p,u,d,v,b=a*77+2,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.substr(a,2)===$?(o=$,a+=2):(o=e,k===0&&O(ji)),o!==e){for(p=[],u=a,d=a,k++,v=l(),k--,v===e?d=void 0:(a=d,d=e),d!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,k===0&&O(ur)),v!==e?(d=[d,v],u=d):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,d=a,k++,v=l(),k--,v===e?d=void 0:(a=d,d=e),d!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,k===0&&O(ur)),v!==e?(d=[d,v],u=d):(a=u,u=e)):(a=u,u=e);K=s,s=pl()}else a=s,s=e;if(s===e)if(s=a,t.substr(a,2)===x?(o=x,a+=2):(o=e,k===0&&O(xn)),o!==e){for(p=[],u=a,d=a,k++,t.substr(a,2)===m?(v=m,a+=2):(v=e,k===0&&O(_r)),k--,v===e?d=void 0:(a=d,d=e),d!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,k===0&&O(ur)),v!==e?(d=[d,v],u=d):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,d=a,k++,t.substr(a,2)===m?(v=m,a+=2):(v=e,k===0&&O(_r)),k--,v===e?d=void 0:(a=d,d=e),d!==e?(t.length>a?(v=t.charAt(a),a++):(v=e,k===0&&O(ur)),v!==e?(d=[d,v],u=d):(a=u,u=e)):(a=u,u=e);t.substr(a,2)===m?(u=m,a+=2):(u=e,k===0&&O(_r)),u!==e?(K=s,s=oa()):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function ys(){var s,o,p,u,d,v=a*77+3,b=R[v];if(b)return a=b.nextPos,b.result;for(s=a,o=[],p=f();p!==e;)o.push(p),p=f();for(p=Pn(),p===e&&(p=null),u=[],d=f();d!==e;)u.push(d),d=f();return K=s,s=vl(p),R[v]={nextPos:a,result:s},s}function Pn(){var s,o,p,u,d,v,b,w,M=a*77+4,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=De(),o!==e){for(p=[],u=a,d=[],v=y();v!==e;)d.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=De(),w!==e?(K=u,u=Cn(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,d=[],v=y();v!==e;)d.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=De(),w!==e?(K=u,u=Cn(o,w)):(a=u,u=e)}else a=u,u=e}K=s,s=gl(o,p)}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function En(){var s,o,p,u,d,v,b,w,M=a*77+5,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=Wr(),o!==e){for(p=[],u=a,d=[],v=y();v!==e;)d.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Wr(),w!==e?(K=u,u=kn(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,d=[],v=y();v!==e;)d.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Wr(),w!==e?(K=u,u=kn(o,w)):(a=u,u=e)}else a=u,u=e}K=s,s=dl(o,p)}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function yr(){var s,o,p,u,d,v,b,w,M=a*77+6,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=Kr(),o!==e){for(p=[],u=a,d=[],v=y();v!==e;)d.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Kr(),w!==e?(K=u,u=ua(o,w)):(a=u,u=e)}else a=u,u=e;for(;u!==e;){for(p.push(u),u=a,d=[],v=y();v!==e;)d.push(v),v=y();if(v=ie(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Kr(),w!==e?(K=u,u=ua(o,w)):(a=u,u=e)}else a=u,u=e}K=s,s=yl(o,p)}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function De(){var s,o=a*77+7,p=R[o];return p?(a=p.nextPos,p.result):(s=Na(),s===e&&(s=$o(),s===e&&(s=Kr())),R[o]={nextPos:a,result:s},s)}function Wr(){var s,o=a*77+8,p=R[o];return p?(a=p.nextPos,p.result):(s=Ia(),s===e&&(s=Gt(),s===e&&(s=Na())),R[o]={nextPos:a,result:s},s)}function Kr(){var s,o=a*77+9,p=R[o];return p?(a=p.nextPos,p.result):(s=Ia(),s===e&&(s=Gt(),s===e&&(s=bo(),s===e&&(s=ko(),s===e&&(s=Ao(),s===e&&(s=_o(),s===e&&(s=Co(),s===e&&(s=Po(),s===e&&(s=Eo(),s===e&&(s=Pr(),s===e&&(s=Ta(),s===e&&(s=Te()))))))))))),R[o]={nextPos:a,result:s},s)}function Te(){var s,o=a*77+10,p=R[o];return p?(a=p.nextPos,p.result):(s=Mo(),s===e&&(s=ws()),R[o]={nextPos:a,result:s},s)}function ws(){var s,o=a*77+11,p=R[o];return p?(a=p.nextPos,p.result):(s=Oo(),s===e&&(s=Do(),s===e&&(s=ja(),s===e&&(s=Oa()))),R[o]={nextPos:a,result:s},s)}function Oa(){var s,o,p,u,d,v,b=a*77+12,w=R[b];if(w)return a=w.nextPos,w.result;if(s=Da(),s===e&&(s=La(),s===e&&(s=Ba(),s===e&&(s=Zs(),s===e&&(s=In(),s===e&&(s=za(),s===e&&(s=Wa(),s===e&&(s=Rn(),s===e&&(s=Ka(),s===e&&(s=Ro(),s===e&&(s=So(),s===e&&(s=Ha(),s===e))))))))))))if(s=a,t.charCodeAt(a)===40?(o=A,a++):(o=e,k===0&&O(Ot)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=Te(),u!==e){for(d=[],v=f();v!==e;)d.push(v),v=f();t.charCodeAt(a)===41?(v=C,a++):(v=e,k===0&&O(Cr)),v!==e?(K=s,s=wl(u)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function kr(){var s,o=a*77+13,p=R[o];return p?(a=p.nextPos,p.result):(s=za(),s===e&&(s=In(),s===e&&(s=Wa(),s===e&&(s=Lo(),s===e&&(s=Bo(),s===e&&(s=Rn()))))),R[o]={nextPos:a,result:s},s)}function Na(){var s,o,p,u,d,v,b,w,M,F,D=a*77+14,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.substr(a,2)===P?(o=P,a+=2):(o=e,k===0&&O(fr)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=qe(),u!==e){if(d=[],v=f(),v!==e)for(;v!==e;)d.push(v),v=f();else d=e;if(d!==e)if(t.charCodeAt(a)===123?(v=S,a++):(v=e,k===0&&O(tt)),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(w=En(),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();t.charCodeAt(a)===125?(F=I,a++):(F=e,k===0&&O(Jt)),F!==e?(K=s,s=ml(u,w)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function $o(){var s,o,p,u,d,v,b=a*77+15,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.substr(a,3)===G?(o=G,a+=3):(o=e,k===0&&O(zr)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=qe(),u!==e){for(d=[],v=f();v!==e;)d.push(v),v=f();v=kr(),v!==e?(K=s,s=xl(u,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===G?(o=G,a+=3):(o=e,k===0&&O(zr)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();u=kr(),u!==e?(K=s,s=$l(u)):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Ia(){var s,o,p,u,d,v,b,w,M,F=a*77+16,D=R[F];if(D)return a=D.nextPos,D.result;if(s=a,t.substr(a,3)===ee?(o=ee,a+=3):(o=e,k===0&&O(xt)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=qe(),u!==e){for(d=a,v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===58?(b=re,a++):(b=e,k===0&&O($t)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();M=Ue(),M!==e?d=M:(a=d,d=e)}else a=d,d=e;for(d===e&&(d=null),v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===61?(b=ge,a++):(b=e,k===0&&O(ps)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();M=Te(),M!==e?(K=s,s=bl(u,d,M)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===q?(o=q,a+=3):(o=e,k===0&&O(Ri)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=qe(),u!==e){for(d=a,v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===58?(b=re,a++):(b=e,k===0&&O($t)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();M=Ue(),M!==e?d=M:(a=d,d=e)}else a=d,d=e;for(d===e&&(d=null),v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===61?(b=ge,a++):(b=e,k===0&&O(ps)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();M=Te(),M!==e?(K=s,s=Al(u,d,M)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return R[F]={nextPos:a,result:s},s}function bo(){var s,o,p,u,d=a*77+17,v=R[d];if(v)return a=v.nextPos,v.result;if(s=a,t.substr(a,2)===U?(o=U,a+=2):(o=e,k===0&&O(Di)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();u=Te(),u!==e?(K=s,s=_l(u)):(a=s,s=e)}else a=s,s=e;return R[d]={nextPos:a,result:s},s}function Ao(){var s,o,p,u,d,v,b,w=a*77+18,M=R[w];if(M)return a=M.nextPos,M.result;if(s=a,t.substr(a,2)===L?(o=L,a+=2):(o=e,k===0&&O(Is)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=qe(),u!==e){for(d=a,v=[],b=f();b!==e;)v.push(b),b=f();for(b=kr(),b!==e?d=b:(a=d,d=e),d===e&&(d=null),v=[],b=f();b!==e;)v.push(b),b=f();t.charCodeAt(a)===93?(b=H,a++):(b=e,k===0&&O(vs)),b!==e?(K=s,s=Cl(u,d)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return R[w]={nextPos:a,result:s},s}function _o(){var s,o,p,u,d,v,b,w,M,F,D,B,Q,xe,ne=a*77+19,Xe=R[ne];if(Xe)return a=Xe.nextPos,Xe.result;if(s=a,t.substr(a,4)===W?(o=W,a+=4):(o=e,k===0&&O(At)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=A,a++):(u=e,k===0&&O(Ot)),u!==e)if(t.substr(a,3)===ee?(d=ee,a+=3):(d=e,k===0&&O(xt)),d!==e){if(v=[],b=f(),b!==e)for(;b!==e;)v.push(b),b=f();else v=e;if(v!==e)if(b=qe(),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();for(t.charCodeAt(a)===44?(M=V,a++):(M=e,k===0&&O(gt)),M===e&&(M=null),F=[],D=f();D!==e;)F.push(D),D=f();if(D=Te(),D!==e)if(t.charCodeAt(a)===41?(B=C,a++):(B=e,k===0&&O(Cr)),B!==e){for(Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();xe=Ae(),xe!==e?(K=s,s=kl(b,D,xe)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,4)===W?(o=W,a+=4):(o=e,k===0&&O(At)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(t.substr(a,3)===ee?(u=ee,a+=3):(u=e,k===0&&O(xt)),u!==e){if(d=[],v=f(),v!==e)for(;v!==e;)d.push(v),v=f();else d=e;if(d!==e)if(v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,k===0&&O(gt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();if(F=Te(),F!==e){if(D=[],B=f(),B!==e)for(;B!==e;)D.push(B),B=f();else D=e;D!==e?(B=Ae(),B!==e?(K=s,s=Pl(v,F,B)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return R[ne]={nextPos:a,result:s},s}function Co(){var s,o,p,u,d,v,b,w,M,F,D,B,Q,xe,ne,Xe=a*77+20,Ge=R[Xe];if(Ge)return a=Ge.nextPos,Ge.result;if(s=a,t.substr(a,3)===J?(o=J,a+=3):(o=e,k===0&&O(Ts)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=A,a++):(u=e,k===0&&O(Ot)),u!==e)if(t.substr(a,3)===ee?(d=ee,a+=3):(d=e,k===0&&O(xt)),d!==e){if(v=[],b=f(),b!==e)for(;b!==e;)v.push(b),b=f();else v=e;if(v!==e)if(b=qe(),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();if(M=a,t.charCodeAt(a)===61?(F=ge,a++):(F=e,k===0&&O(ps)),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();B=Te(),B!==e?(K=M,M=El(b,B)):(a=M,M=e)}else a=M,M=e;for(M===e&&(M=null),t.charCodeAt(a)===44?(F=V,a++):(F=e,k===0&&O(gt)),F===e&&(F=null),D=[],B=f();B!==e;)D.push(B),B=f();if(B=Te(),B!==e)if(t.charCodeAt(a)===41?(Q=C,a++):(Q=e,k===0&&O(Cr)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();ne=Ae(),ne!==e?(K=s,s=Ml(b,M,B,ne)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,t.substr(a,3)===J?(o=J,a+=3):(o=e,k===0&&O(Ts)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(t.substr(a,3)===ee?(u=ee,a+=3):(u=e,k===0&&O(xt)),u!==e){if(d=[],v=f(),v!==e)for(;v!==e;)d.push(v),v=f();else d=e;if(d!==e)if(v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(w=a,t.charCodeAt(a)===61?(M=ge,a++):(M=e,k===0&&O(ps)),M!==e){for(F=[],D=f();D!==e;)F.push(D),D=f();D=Te(),D!==e?(K=w,w=Sl(v,D)):(a=w,w=e)}else a=w,w=e;for(w===e&&(w=null),t.charCodeAt(a)===44?(M=V,a++):(M=e,k===0&&O(gt)),M===e&&(M=null),F=[],D=f();D!==e;)F.push(D),D=f();if(D=Te(),D!==e){if(B=[],Q=f(),Q!==e)for(;Q!==e;)B.push(Q),Q=f();else B=e;B!==e?(Q=Ae(),Q!==e?(K=s,s=Fl(v,w,D,Q)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,t.substr(a,3)===J?(o=J,a+=3):(o=e,k===0&&O(Ts)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===40?(u=A,a++):(u=e,k===0&&O(Ot)),u!==e)if(d=Te(),d!==e)if(t.charCodeAt(a)===41?(v=C,a++):(v=e,k===0&&O(Cr)),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();w=Ae(),w!==e?(K=s,s=Ol(d,w)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,t.substr(a,3)===J?(o=J,a+=3):(o=e,k===0&&O(Ts)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Te(),u!==e){if(d=[],v=f(),v!==e)for(;v!==e;)d.push(v),v=f();else d=e;d!==e?(v=Ae(),v!==e?(K=s,s=Nl(u,v)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e}}return R[Xe]={nextPos:a,result:s},s}function ko(){var s,o,p,u,d,v=a*77+21,b=R[v];if(b)return a=b.nextPos,b.result;if(s=a,t.substr(a,6)===Y?(o=Y,a+=6):(o=e,k===0&&O(gr)),o!==e)if(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],d=f();d!==e;)u.push(d),d=f();d=Te(),d!==e?(K=s,s=Il(d)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return R[v]={nextPos:a,result:s},s}function Po(){var s,o,p,u,d,v,b,w,M=a*77+22,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,t.substr(a,4)===ue?(o=ue,a+=4):(o=e,k===0&&O(Li)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===123?(u=S,a++):(u=e,k===0&&O(tt)),u!==e){for(d=[],v=f();v!==e;)d.push(v),v=f();if(v=yr(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();t.charCodeAt(a)===125?(w=I,a++):(w=e,k===0&&O(Jt)),w!==e?(K=s,s=Tl(v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function Eo(){var s,o,p,u,d=a*77+23,v=R[d];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,5)===de?(o=de,a+=5):(o=e,k===0&&O(Bi)),o!==e?(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=jl()):(a=s,s=e)):(a=s,s=e),R[d]={nextPos:a,result:s},s)}function Pr(){var s,o,p,u,d=a*77+24,v=R[d];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,8)===le?(o=le,a+=8):(o=e,k===0&&O(Hi)),o!==e?(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=fa()):(a=s,s=e)):(a=s,s=e),R[d]={nextPos:a,result:s},s)}function Ta(){var s,o,p,u,d,v,b=a*77+25,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Te(),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.substr(a,2)===Ie?(u=Ie,a+=2):(u=e,k===0&&O(Ui)),u===e&&(t.substr(a,2)===ze?(u=ze,a+=2):(u=e,k===0&&O(Yn)),u===e&&(t.charCodeAt(a)===61?(u=ge,a++):(u=e,k===0&&O(ps)))),u!==e){for(d=[],v=f();v!==e;)d.push(v),v=f();v=Te(),v!==e?(K=s,s=Rl(o,u,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Mo(){var s,o,p,u,d,v,b,w,M=a*77+26,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=ws(),o!==e){for(p=[],u=a,d=[],v=Er();v!==e;)d.push(v),v=Er();if(v=Mn(),v!==e){for(b=[],w=Er();w!==e;)b.push(w),w=Er();w=ws(),w!==e?(K=u,u=ca(o,v,w)):(a=u,u=e)}else a=u,u=e;if(u!==e)for(;u!==e;){for(p.push(u),u=a,d=[],v=Er();v!==e;)d.push(v),v=Er();if(v=Mn(),v!==e){for(b=[],w=Er();w!==e;)b.push(w),w=Er();w=ws(),w!==e?(K=u,u=ca(o,v,w)):(a=u,u=e)}else a=u,u=e}else p=e;p!==e?(K=s,s=Dl(o,p)):(a=s,s=e)}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function Er(){var s,o,p,u=a*77+27,d=R[u];return d?(a=d.nextPos,d.result):(s=a,t.charCodeAt(a)===92?(o=mt,a++):(o=e,k===0&&O(ea)),o!==e?(p=ie(),p!==e?(o=[o,p],s=o):(a=s,s=e)):(a=s,s=e),s===e&&(s=y()),R[u]={nextPos:a,result:s},s)}function Mn(){var s,o,p=a*77+28,u=R[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===Ke?(o=Ke,a+=2):(o=e,k===0&&O(qi)),o===e&&(t.substr(a,2)===ft?(o=ft,a+=2):(o=e,k===0&&O(zi)),o===e&&(t.substr(a,2)===je?(o=je,a+=2):(o=e,k===0&&O(Vi)),o===e&&(t.substr(a,2)===ut?(o=ut,a+=2):(o=e,k===0&&O(Wi)),o===e&&(t.substr(a,2)===jt?(o=jt,a+=2):(o=e,k===0&&O(Ki)),o===e&&(t.substr(a,2)===Rt?(o=Rt,a+=2):(o=e,k===0&&O(ta)),o===e&&(t.charCodeAt(a)===60?(o=Ye,a++):(o=e,k===0&&O($n)),o===e&&(t.charCodeAt(a)===62?(o=Br,a++):(o=e,k===0&&O(ra)),o===e&&(t.charCodeAt(a)===43?(o=Wt,a++):(o=e,k===0&&O(Ji)),o===e&&(t.charCodeAt(a)===45?(o=Ar,a++):(o=e,k===0&&O(sa)),o===e&&(t.charCodeAt(a)===42?(o=Ft,a++):(o=e,k===0&&O(na)),o===e&&(t.charCodeAt(a)===94?(o=br,a++):(o=e,k===0&&O(Xi)),o===e&&(t.charCodeAt(a)===47?(o=Hr,a++):(o=e,k===0&&O(Gi)),o===e&&(t.charCodeAt(a)===37?(o=Or,a++):(o=e,k===0&&O(Zi))))))))))))))),o!==e&&(K=s,o=Ll()),s=o,R[p]={nextPos:a,result:s},s)}function So(){var s,o,p,u=a*77+29,d=R[u];return d?(a=d.nextPos,d.result):(s=a,t.charCodeAt(a)===33?(o=Rr,a++):(o=e,k===0&&O(bn)),o!==e?(p=Te(),p!==e?(K=s,s=Bl(p)):(a=s,s=e)):(a=s,s=e),R[u]={nextPos:a,result:s},s)}function ja(){var s,o,p,u,d=a*77+30,v=R[d];if(v)return a=v.nextPos,v.result;if(s=a,o=Oa(),o!==e){if(p=[],u=Sn(),u===e&&(u=Ra(),u===e&&(u=Gs())),u!==e)for(;u!==e;)p.push(u),u=Sn(),u===e&&(u=Ra(),u===e&&(u=Gs()));else p=e;p!==e?(K=s,s=ha(o,p)):(a=s,s=e)}else a=s,s=e;return R[d]={nextPos:a,result:s},s}function Sn(){var s,o,p,u,d,v,b=a*77+31,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===40?(o=A,a++):(o=e,k===0&&O(Ot)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=Fo(),u===e&&(u=null),d=[],v=f();v!==e;)d.push(v),v=f();t.charCodeAt(a)===41?(v=C,a++):(v=e,k===0&&O(Cr)),v!==e?(K=s,s=Hl(u)):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Fo(){var s,o,p,u,d,v,b=a*77+32,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Te(),o!==e){for(p=[],u=a,d=_(),d!==e?(v=Te(),v!==e?(K=u,u=pa(o,v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,d=_(),d!==e?(v=Te(),v!==e?(K=u,u=pa(o,v)):(a=u,u=e)):(a=u,u=e);K=s,s=Ul(o,p)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Ra(){var s,o,p,u,d,v,b=a*77+33,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===91?(o=Dt,a++):(o=e,k===0&&O(gs)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=Te(),u!==e){for(d=[],v=f();v!==e;)d.push(v),v=f();t.charCodeAt(a)===93?(v=H,a++):(v=e,k===0&&O(vs)),v!==e?(K=s,s=ql(u)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Gs(){var s,o,p,u=a*77+34,d=R[u];return d?(a=d.nextPos,d.result):(s=a,t.charCodeAt(a)===46?(o=z,a++):(o=e,k===0&&O(An)),o!==e?(p=qe(),p!==e?(K=s,s=zl(p)):(a=s,s=e)):(a=s,s=e),R[u]={nextPos:a,result:s},s)}function Oo(){var s,o,p,u,d,v,b,w,M,F,D=a*77+35,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.substr(a,2)===Z?(o=Z,a+=2):(o=e,k===0&&O(Qi)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;if(p!==e)if(u=Te(),u!==e){if(d=[],v=f(),v!==e)for(;v!==e;)d.push(v),v=f();else d=e;if(d!==e)if(v=Ae(),v!==e){if(b=a,w=[],M=f(),M!==e)for(;M!==e;)w.push(M),M=f();else w=e;if(w!==e?(M=No(),M!==e?b=M:(a=b,b=e)):(a=b,b=e),b===e&&(b=null),w=a,M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;M!==e?(F=Io(),F!==e?w=F:(a=w,w=e)):(a=w,w=e),w===e&&(w=null),K=s,s=Vl(u,v,b,w)}else a=s,s=e;else a=s,s=e}else a=s,s=e;else a=s,s=e}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function No(){var s,o,p,u,d,v,b=a*77+36,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Fn(),o!==e){for(p=[],u=a,d=[],v=f();v!==e;)d.push(v),v=f();for(v=Fn(),v!==e?u=v:(a=u,u=e);u!==e;){for(p.push(u),u=a,d=[],v=f();v!==e;)d.push(v),v=f();v=Fn(),v!==e?u=v:(a=u,u=e)}K=s,s=Wl(o,p)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Fn(){var s,o,p,u,d,v,b,w=a*77+37,M=R[w];if(M)return a=M.nextPos,M.result;if(s=a,t.substr(a,4)===se?(o=se,a+=4):(o=e,k===0&&O(Yi)),o!==e)if(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],d=f();d!==e;)u.push(d),d=f();if(d=Te(),d!==e){for(v=[],b=f();b!==e;)v.push(b),b=f();b=Ae(),b!==e?(K=s,s=va(d,b)):(a=s,s=e)}else a=s,s=e}else a=s,s=e;else a=s,s=e;return R[w]={nextPos:a,result:s},s}function Io(){var s,o,p,u,d,v=a*77+38,b=R[v];if(b)return a=b.nextPos,b.result;if(s=a,t.substr(a,4)===ve?(o=ve,a+=4):(o=e,k===0&&O(el)),o!==e)if(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],d=f();d!==e;)u.push(d),d=f();d=Ae(),d!==e?(K=s,s=Kl(d)):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return R[v]={nextPos:a,result:s},s}function Da(){var s,o,p,u,d,v,b,w,M,F,D,B,Q,xe,ne,Xe,Ge,Ln=a*77+39,ms=R[Ln];if(ms)return a=ms.nextPos,ms.result;if(s=a,t.substr(a,5)===ye?(o=ye,a+=5):(o=e,k===0&&O(js)),o!==e)if(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e){for(u=[],d=f();d!==e;)u.push(d),d=f();if(d=Te(),d!==e){for(v=[],b=f();b!==e;)v.push(b),b=f();if(t.charCodeAt(a)===123?(b=S,a++):(b=e,k===0&&O(tt)),b!==e){for(w=[],M=f();M!==e;)w.push(M),M=f();if(M=[],F=a,D=Te(),D!==e){for(B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.substr(a,2)===oe?(Q=oe,a+=2):(Q=e,k===0&&O(Rs)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();if(ne=Ae(),ne!==e){for(Xe=[],Ge=f();Ge!==e;)Xe.push(Ge),Ge=f();K=F,F=ga(d,D,ne)}else a=F,F=e}else a=F,F=e}else a=F,F=e;if(F!==e)for(;F!==e;)if(M.push(F),F=a,D=Te(),D!==e){for(B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.substr(a,2)===oe?(Q=oe,a+=2):(Q=e,k===0&&O(Rs)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();if(ne=Ae(),ne!==e){for(Xe=[],Ge=f();Ge!==e;)Xe.push(Ge),Ge=f();K=F,F=ga(d,D,ne)}else a=F,F=e}else a=F,F=e}else a=F,F=e;else M=e;if(M!==e){if(F=a,t.charCodeAt(a)===42?(D=Ft,a++):(D=e,k===0&&O(na)),D!==e){for(B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.substr(a,2)===oe?(Q=oe,a+=2):(Q=e,k===0&&O(Rs)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();if(ne=Ae(),ne!==e){for(Xe=[],Ge=f();Ge!==e;)Xe.push(Ge),Ge=f();F=ne}else a=F,F=e}else a=F,F=e}else a=F,F=e;for(F===e&&(F=null),D=[],B=f();B!==e;)D.push(B),B=f();t.charCodeAt(a)===125?(B=I,a++):(B=e,k===0&&O(Jt)),B!==e?(K=s,s=Jl(d,M,F)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e;else a=s,s=e;return R[Ln]={nextPos:a,result:s},s}function La(){var s,o,p,u,d,v,b,w,M=a*77+40,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,t.substr(a,4)===Ne?(o=Ne,a+=4):(o=e,k===0&&O(Ds)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(t.charCodeAt(a)===123?(u=S,a++):(u=e,k===0&&O(tt)),u!==e){for(d=[],v=f();v!==e;)d.push(v),v=f();if(v=yr(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();t.charCodeAt(a)===125?(w=I,a++):(w=e,k===0&&O(Jt)),w!==e?(K=s,s=Xl(v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[M]={nextPos:a,result:s},s}function Ba(){var s,o,p,u,d=a*77+41,v=R[d];if(v)return a=v.nextPos,v.result;if(s=a,t.substr(a,6)===me?(o=me,a+=6):(o=e,k===0&&O(tl)),o!==e){if(p=[],u=f(),u!==e)for(;u!==e;)p.push(u),u=f();else p=e;p!==e?(u=Ha(),u!==e?(K=s,s=Gl(u)):(a=s,s=e)):(a=s,s=e)}else a=s,s=e;return R[d]={nextPos:a,result:s},s}function Ha(){var s,o,p=a*77+42,u=R[p];return u?(a=u.nextPos,u.result):(s=a,o=Xa(),o!==e&&(K=s,o=da(o)),s=o,R[p]={nextPos:a,result:s},s)}function Zs(){var s,o,p,u,d,v,b=a*77+43,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===96?(o=$e,a++):(o=e,k===0&&O(Ls)),o!==e){for(p=[],u=a,d=a,k++,t.charCodeAt(a)===96?(v=$e,a++):(v=e,k===0&&O(Ls)),k--,v===e?d=void 0:(a=d,d=e),d!==e?(v=On(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,d=a,k++,t.charCodeAt(a)===96?(v=$e,a++):(v=e,k===0&&O(Ls)),k--,v===e?d=void 0:(a=d,d=e),d!==e?(v=On(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===96?(u=$e,a++):(u=e,k===0&&O(Ls)),u!==e?(K=s,s=Zl(p)):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function On(){var s,o,p,u,d,v,b=a*77+44,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===123?(o=S,a++):(o=e,k===0&&O(tt)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=Te(),u!==e){for(d=[],v=y();v!==e;)d.push(v),v=y();t.charCodeAt(a)===125?(v=I,a++):(v=e,k===0&&O(Jt)),v!==e?s=u:(a=s,s=e)}else a=s,s=e}else a=s,s=e;if(s===e){if(s=a,o=[],p=Nn(),p!==e)for(;p!==e;)o.push(p),p=Nn();else o=e;o!==e&&(K=s,o=ya(o)),s=o}return R[b]={nextPos:a,result:s},s}function Nn(){var s,o=a*77+45,p=R[o];return p?(a=p.nextPos,p.result):(s=Ua(),s===e&&(Ns.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,k===0&&O(Bs))),R[o]={nextPos:a,result:s},s)}function Ua(){var s,o,p,u=a*77+46,d=R[u];return d?(a=d.nextPos,d.result):(s=a,t.charCodeAt(a)===92?(o=mt,a++):(o=e,k===0&&O(ea)),o!==e?(rs.test(t.charAt(a))?(p=t.charAt(a),a++):(p=e,k===0&&O(Hs)),p!==e?s=p:(a=s,s=e)):(a=s,s=e),R[u]={nextPos:a,result:s},s)}function In(){var s,o,p,u,d,v,b=a*77+47,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===34?(o=he,a++):(o=e,k===0&&O(Us)),o!==e){for(p=[],u=a,d=a,k++,t.charCodeAt(a)===34?(v=he,a++):(v=e,k===0&&O(Us)),k--,v===e?d=void 0:(a=d,d=e),d!==e?(v=qa(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,k===0&&O(ur))),v!==e?(K=u,u=wa(v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,d=a,k++,t.charCodeAt(a)===34?(v=he,a++):(v=e,k===0&&O(Us)),k--,v===e?d=void 0:(a=d,d=e),d!==e?(v=qa(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,k===0&&O(ur))),v!==e?(K=u,u=wa(v)):(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===34?(u=he,a++):(u=e,k===0&&O(Us)),u!==e?(K=s,s=Ql(p)):(a=s,s=e)}else a=s,s=e;if(s===e)if(s=a,t.charCodeAt(a)===39?(o=Le,a++):(o=e,k===0&&O(qs)),o!==e){for(p=[],u=a,d=a,k++,t.charCodeAt(a)===39?(v=Le,a++):(v=e,k===0&&O(qs)),k--,v===e?d=void 0:(a=d,d=e),d!==e?(v=Tn(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,k===0&&O(ur))),v!==e?(K=u,u=ma(v)):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,d=a,k++,t.charCodeAt(a)===39?(v=Le,a++):(v=e,k===0&&O(qs)),k--,v===e?d=void 0:(a=d,d=e),d!==e?(v=Tn(),v===e&&(t.length>a?(v=t.charAt(a),a++):(v=e,k===0&&O(ur))),v!==e?(K=u,u=ma(v)):(a=u,u=e)):(a=u,u=e);t.charCodeAt(a)===39?(u=Le,a++):(u=e,k===0&&O(qs)),u!==e?(K=s,s=Yl(p)):(a=s,s=e)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function qa(){var s,o,p=a*77+48,u=R[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===Re?(o=Re,a+=2):(o=e,k===0&&O(zs)),o!==e&&(K=s,o=eo()),s=o,R[p]={nextPos:a,result:s},s)}function Tn(){var s,o,p=a*77+49,u=R[p];return u?(a=u.nextPos,u.result):(s=a,t.substr(a,2)===He?(o=He,a+=2):(o=e,k===0&&O(aa)),o!==e&&(K=s,o=to()),s=o,R[p]={nextPos:a,result:s},s)}function za(){var s,o=a*77+50,p=R[o];return p?(a=p.nextPos,p.result):(s=To(),s===e&&(s=Va()),R[o]={nextPos:a,result:s},s)}function To(){var s,o,p,u,d,v,b=a*77+51,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,Lt.test(t.charAt(a))?(t.charAt(a),a++):k===0&&O(Nt),vt.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,k===0&&O(ia)),o!==e){if(p=[],qt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(cr)),u!==e)for(;u!==e;)p.push(u),qt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(cr));else p=e;if(p!==e)if(t.charCodeAt(a)===46?(u=z,a++):(u=e,k===0&&O(An)),u!==e){if(d=[],qt.test(t.charAt(a))?(v=t.charAt(a),a++):(v=e,k===0&&O(cr)),v!==e)for(;v!==e;)d.push(v),qt.test(t.charAt(a))?(v=t.charAt(a),a++):(v=e,k===0&&O(cr));else d=e;d!==e?(K=s,s=ro()):(a=s,s=e)}else a=s,s=e;else a=s,s=e}else a=s,s=e;if(s===e)if(s=a,Lt.test(t.charAt(a))?(t.charAt(a),a++):k===0&&O(Nt),qt.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,k===0&&O(cr)),o!==e)if(t.charCodeAt(a)===46?(p=z,a++):(p=e,k===0&&O(An)),p!==e){if(u=[],qt.test(t.charAt(a))?(d=t.charAt(a),a++):(d=e,k===0&&O(cr)),d!==e)for(;d!==e;)u.push(d),qt.test(t.charAt(a))?(d=t.charAt(a),a++):(d=e,k===0&&O(cr));else u=e;u!==e?(K=s,s=so()):(a=s,s=e)}else a=s,s=e;else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Va(){var s,o,p,u,d=a*77+52,v=R[d];if(v)return a=v.nextPos,v.result;if(s=a,Lt.test(t.charAt(a))?(t.charAt(a),a++):k===0&&O(Nt),vt.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,k===0&&O(ia)),o!==e){if(p=[],qt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(cr)),u!==e)for(;u!==e;)p.push(u),qt.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(cr));else p=e;p!==e?(K=s,s=no()):(a=s,s=e)}else a=s,s=e;return s===e&&(s=a,Lt.test(t.charAt(a))?(t.charAt(a),a++):k===0&&O(Nt),qt.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,k===0&&O(cr)),o!==e?(K=s,s=ao()):(a=s,s=e)),R[d]={nextPos:a,result:s},s}function Wa(){var s,o=a*77+53,p=R[o];return p?(a=p.nextPos,p.result):(s=jo(),s===e&&(s=jn()),R[o]={nextPos:a,result:s},s)}function jo(){var s,o,p,u,d=a*77+54,v=R[d];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,4)===We?(o=We,a+=4):(o=e,k===0&&O(rl)),o!==e?(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=xa()):(a=s,s=e)):(a=s,s=e),R[d]={nextPos:a,result:s},s)}function jn(){var s,o,p,u,d=a*77+55,v=R[d];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,5)===Ze?(o=Ze,a+=5):(o=e,k===0&&O(Vs)),o!==e?(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=io()):(a=s,s=e)):(a=s,s=e),R[d]={nextPos:a,result:s},s)}function Rn(){var s,o,p,u,d=a*77+56,v=R[d];return v?(a=v.nextPos,v.result):(s=a,t.substr(a,4)===at?(o=at,a+=4):(o=e,k===0&&O(sl)),o!==e?(p=a,k++,sr.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(dr)),k--,u===e?p=void 0:(a=p,p=e),p!==e?(K=s,s=$a()):(a=s,s=e)):(a=s,s=e),R[d]={nextPos:a,result:s},s)}function Ka(){var s,o,p,u,d,v,b,w,M,F,D,B,Q,xe,ne=a*77+57,Xe=R[ne];if(Xe)return a=Xe.nextPos,Xe.result;if(s=a,t.charCodeAt(a)===123?(o=S,a++):(o=e,k===0&&O(tt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],d=a,v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.charCodeAt(a)===58?(w=re,a++):(w=e,k===0&&O($t)),w!==e){if(M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;if(M!==e)if(F=Te(),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();for(t.charCodeAt(a)===44?(B=V,a++):(B=e,k===0&&O(gt)),B===e&&(t.charCodeAt(a)===59?(B=it,a++):(B=e,k===0&&O(ds))),B===e&&(B=null),Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();K=d,d=ba(v,F)}else a=d,d=e;else a=d,d=e}else a=d,d=e}else a=d,d=e;for(;d!==e;)if(u.push(d),d=a,v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.charCodeAt(a)===58?(w=re,a++):(w=e,k===0&&O($t)),w!==e){if(M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;if(M!==e)if(F=Te(),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();for(t.charCodeAt(a)===44?(B=V,a++):(B=e,k===0&&O(gt)),B===e&&(t.charCodeAt(a)===59?(B=it,a++):(B=e,k===0&&O(ds))),B===e&&(B=null),Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();K=d,d=ba(v,F)}else a=d,d=e;else a=d,d=e}else a=d,d=e}else a=d,d=e;t.charCodeAt(a)===125?(d=I,a++):(d=e,k===0&&O(Jt)),d!==e?(K=s,s=lo(u)):(a=s,s=e)}else a=s,s=e;return R[ne]={nextPos:a,result:s},s}function Ro(){var s,o,p,u,d,v,b,w,M,F,D=a*77+58,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.charCodeAt(a)===91?(o=Dt,a++):(o=e,k===0&&O(gs)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],d=a,v=Te(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,k===0&&O(gt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();K=d,d=Aa(v)}else a=d,d=e;for(;d!==e;)if(u.push(d),d=a,v=Te(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,k===0&&O(gt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();K=d,d=Aa(v)}else a=d,d=e;for(d=[],v=f();v!==e;)d.push(v),v=f();t.charCodeAt(a)===93?(v=H,a++):(v=e,k===0&&O(vs)),v!==e?(K=s,s=oo(u)):(a=s,s=e)}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function Dn(){var s,o,p,u,d,v,b,w=a*77+59,M=R[w];if(M)return a=M.nextPos,M.result;if(s=a,o=qe(),o!==e){for(p=a,u=[],d=f();d!==e;)u.push(d),d=f();if(t.charCodeAt(a)===58?(d=re,a++):(d=e,k===0&&O($t)),d!==e){for(v=[],b=f();b!==e;)v.push(b),b=f();b=Ue(),b!==e?p=b:(a=p,p=e)}else a=p,p=e;p===e&&(p=null),K=s,s=uo(o,p)}else a=s,s=e;return R[w]={nextPos:a,result:s},s}function Ja(){var s,o,p,u,d,v,b=a*77+60,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Dn(),o!==e){for(p=[],u=a,d=_(),d!==e?(v=Dn(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,d=_(),d!==e?(v=Dn(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);K=s,s=_a(o,p)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Gt(){var s,o,p,u,d,v,b,w,M,F,D,B,Q,xe,ne,Xe,Ge,Ln=a*77+61,ms=R[Ln];if(ms)return a=ms.nextPos,ms.result;if(s=a,t.charCodeAt(a)===64?(o=bt,a++):(o=e,k===0&&O(nl)),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(u=qe(),u!==e){for(d=[],v=y();v!==e;)d.push(v),v=y();if(t.charCodeAt(a)===40?(v=A,a++):(v=e,k===0&&O(Ot)),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(w=Ja(),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();if(t.charCodeAt(a)===41?(F=C,a++):(F=e,k===0&&O(Cr)),F!==e){for(D=a,B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.charCodeAt(a)===58?(Q=re,a++):(Q=e,k===0&&O($t)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();ne=Ue(),ne!==e?D=ne:(a=D,D=e)}else a=D,D=e;for(D===e&&(D=null),B=[],Q=f();Q!==e;)B.push(Q),Q=f();if(t.charCodeAt(a)===123?(Q=S,a++):(Q=e,k===0&&O(tt)),Q!==e){for(xe=[],ne=f();ne!==e;)xe.push(ne),ne=f();for(ne=yr(),ne===e&&(ne=null),Xe=[],Ge=f();Ge!==e;)Xe.push(Ge),Ge=f();t.charCodeAt(a)===125?(Ge=I,a++):(Ge=e,k===0&&O(Jt)),Ge!==e?(K=s,s=fo(p,u,d,w,D,ne)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[Ln]={nextPos:a,result:s},s}function Do(){var s,o,p,u,d,v,b,w,M,F,D,B,Q,xe=a*77+62,ne=R[xe];if(ne)return a=ne.nextPos,ne.result;if(s=a,t.substr(a,2)===Kt?(o=Kt,a+=2):(o=e,k===0&&O(_n)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=Ja(),u===e&&(u=null),d=[],v=f();v!==e;)d.push(v),v=f();if(t.charCodeAt(a)===41?(v=C,a++):(v=e,k===0&&O(Cr)),v!==e){for(b=a,w=[],M=f();M!==e;)w.push(M),M=f();if(t.charCodeAt(a)===58?(M=re,a++):(M=e,k===0&&O($t)),M!==e){for(F=[],D=f();D!==e;)F.push(D),D=f();D=Ue(),D!==e?b=D:(a=b,b=e)}else a=b,b=e;for(b===e&&(b=null),w=[],M=f();M!==e;)w.push(M),M=f();if(t.charCodeAt(a)===123?(M=S,a++):(M=e,k===0&&O(tt)),M!==e){for(F=[],D=f();D!==e;)F.push(D),D=f();for(D=yr(),D===e&&(D=null),B=[],Q=f();Q!==e;)B.push(Q),Q=f();t.charCodeAt(a)===125?(Q=I,a++):(Q=e,k===0&&O(Jt)),Q!==e?(K=s,s=Ca(u,b,D)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[xe]={nextPos:a,result:s},s}function Lo(){var s,o,p,u,d,v,b,w,M,F,D=a*77+63,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.charCodeAt(a)===91?(o=Dt,a++):(o=e,k===0&&O(gs)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],d=a,v=kr(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,k===0&&O(gt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();K=d,d=ka(v)}else a=d,d=e;for(;d!==e;)if(u.push(d),d=a,v=kr(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();for(t.charCodeAt(a)===44?(w=V,a++):(w=e,k===0&&O(gt)),w===e&&(w=null),M=[],F=f();F!==e;)M.push(F),F=f();K=d,d=ka(v)}else a=d,d=e;for(d=[],v=f();v!==e;)d.push(v),v=f();t.charCodeAt(a)===93?(v=H,a++):(v=e,k===0&&O(vs)),v!==e?(K=s,s=co(u)):(a=s,s=e)}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function Bo(){var s,o,p,u,d,v,b,w,M,F,D,B,Q,xe,ne=a*77+64,Xe=R[ne];if(Xe)return a=Xe.nextPos,Xe.result;if(s=a,t.charCodeAt(a)===123?(o=S,a++):(o=e,k===0&&O(tt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();if(u=[],d=a,v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.charCodeAt(a)===58?(w=re,a++):(w=e,k===0&&O($t)),w!==e){if(M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;if(M!==e)if(F=kr(),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();for(t.charCodeAt(a)===44?(B=V,a++):(B=e,k===0&&O(gt)),B===e&&(t.charCodeAt(a)===59?(B=it,a++):(B=e,k===0&&O(ds))),B===e&&(B=null),Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();K=d,d=Pa(v,F)}else a=d,d=e;else a=d,d=e}else a=d,d=e}else a=d,d=e;for(;d!==e;)if(u.push(d),d=a,v=qe(),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.charCodeAt(a)===58?(w=re,a++):(w=e,k===0&&O($t)),w!==e){if(M=[],F=f(),F!==e)for(;F!==e;)M.push(F),F=f();else M=e;if(M!==e)if(F=kr(),F!==e){for(D=[],B=f();B!==e;)D.push(B),B=f();for(t.charCodeAt(a)===44?(B=V,a++):(B=e,k===0&&O(gt)),B===e&&(t.charCodeAt(a)===59?(B=it,a++):(B=e,k===0&&O(ds))),B===e&&(B=null),Q=[],xe=f();xe!==e;)Q.push(xe),xe=f();K=d,d=Pa(v,F)}else a=d,d=e;else a=d,d=e}else a=d,d=e}else a=d,d=e;t.charCodeAt(a)===125?(d=I,a++):(d=e,k===0&&O(Jt)),d!==e?(K=s,s=ho(u)):(a=s,s=e)}else a=s,s=e;return R[ne]={nextPos:a,result:s},s}function Ue(){var s,o=a*77+65,p=R[o];return p?(a=p.nextPos,p.result):(s=Ho(),s===e&&(s=Ht()),R[o]={nextPos:a,result:s},s)}function Ho(){var s,o,p,u,d,v,b,w,M,F,D=a*77+66,B=R[D];if(B)return a=B.nextPos,B.result;if(s=a,t.substr(a,2)===Kt?(o=Kt,a+=2):(o=e,k===0&&O(_n)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=Jr(),u===e&&(u=null),d=[],v=f();v!==e;)d.push(v),v=f();if(t.charCodeAt(a)===41?(v=C,a++):(v=e,k===0&&O(Cr)),v!==e){for(b=[],w=f();w!==e;)b.push(w),w=f();if(t.substr(a,2)===oe?(w=oe,a+=2):(w=e,k===0&&O(Rs)),w!==e){for(M=[],F=f();F!==e;)M.push(F),F=f();F=Ue(),F!==e?(K=s,s=po(u,F)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return R[D]={nextPos:a,result:s},s}function Jr(){var s,o,p,u,d,v,b=a*77+67,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=Ue(),o!==e){for(p=[],u=a,d=_(),d!==e?(v=Ue(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,d=_(),d!==e?(v=Ue(),v!==e?u=v:(a=u,u=e)):(a=u,u=e);K=s,s=vo(o,p)}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function Ht(){var s,o,p,u,d,v,b,w,M=a*77+68,F=R[M];if(F)return a=F.nextPos,F.result;if(s=a,o=qe(),o!==e){for(p=[],u=y();u!==e;)p.push(u),u=y();if(t.charCodeAt(a)===60?(u=Ye,a++):(u=e,k===0&&O($n)),u!==e){for(d=[],v=y();v!==e;)d.push(v),v=y();if(v=Ue(),v!==e){for(b=[],w=y();w!==e;)b.push(w),w=y();t.charCodeAt(a)===62?(w=Br,a++):(w=e,k===0&&O(ra)),w!==e?(K=s,s=go(o,v)):(a=s,s=e)}else a=s,s=e}else a=s,s=e}else a=s,s=e;return s===e&&(s=a,o=qe(),o!==e&&(K=s,o=yo(o)),s=o),R[M]={nextPos:a,result:s},s}function qe(){var s,o,p,u,d=a*77+69,v=R[d];if(v)return a=v.nextPos,v.result;if(s=a,Zn.test(t.charAt(a))?(o=t.charAt(a),a++):(o=e,k===0&&O(al)),o!==e){for(p=[],Qn.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(la));u!==e;)p.push(u),Qn.test(t.charAt(a))?(u=t.charAt(a),a++):(u=e,k===0&&O(la));K=s,s=i()}else a=s,s=e;return R[d]={nextPos:a,result:s},s}function Xa(){var s,o,p,u,d,v,b=a*77+70,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,o=qe(),o!==e){for(p=[],u=a,t.charCodeAt(a)===58?(d=re,a++):(d=e,k===0&&O($t)),d!==e?(v=qe(),v!==e?(d=[d,v],u=d):(a=u,u=e)):(a=u,u=e);u!==e;)p.push(u),u=a,t.charCodeAt(a)===58?(d=re,a++):(d=e,k===0&&O($t)),d!==e?(v=qe(),v!==e?(d=[d,v],u=d):(a=u,u=e)):(a=u,u=e);K=s,s=X()}else a=s,s=e;return R[b]={nextPos:a,result:s},s}function _(){var s,o,p,u,d,v=a*77+71,b=R[v];if(b)return a=b.nextPos,b.result;for(s=a,o=[],p=f();p!==e;)o.push(p),p=f();if(t.charCodeAt(a)===44?(p=V,a++):(p=e,k===0&&O(gt)),p!==e){for(u=[],d=f();d!==e;)u.push(d),d=f();o=[o,p,u],s=o}else a=s,s=e;if(s===e)if(s=[],o=f(),o!==e)for(;o!==e;)s.push(o),o=f();else s=e;return R[v]={nextPos:a,result:s},s}function Ae(){var s,o,p,u,d,v,b=a*77+72,w=R[b];if(w)return a=w.nextPos,w.result;if(s=a,t.charCodeAt(a)===123?(o=S,a++):(o=e,k===0&&O(tt)),o!==e){for(p=[],u=f();u!==e;)p.push(u),u=f();for(u=yr(),u===e&&(u=null),d=[],v=f();v!==e;)d.push(v),v=f();t.charCodeAt(a)===125?(v=I,a++):(v=e,k===0&&O(Jt)),v!==e?(K=s,s=Ws(u)):(a=s,s=e)}else a=s,s=e;return s===e&&(s=Kr()),R[b]={nextPos:a,result:s},s}function ie(){var s,o=a*77+73,p=R[o];return p?(a=p.nextPos,p.result):(t.substr(a,2)===Ct?(s=Ct,a+=2):(s=e,k===0&&O(il)),s===e&&(Ii.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,k===0&&O(ll))),R[o]={nextPos:a,result:s},s)}function l(){var s,o,p=a*77+74,u=R[p];return u?(a=u.nextPos,u.result):(s=a,k++,t.length>a?(o=t.charAt(a),a++):(o=e,k===0&&O(ur)),k--,o===e?s=void 0:(a=s,s=e),s===e&&(s=ie()),R[p]={nextPos:a,result:s},s)}function f(){var s,o=a*77+75,p=R[o];return p?(a=p.nextPos,p.result):(Ti.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,k===0&&O(ol)),R[o]={nextPos:a,result:s},s)}function y(){var s,o=a*77+76,p=R[o];return p?(a=p.nextPos,p.result):(or.test(t.charAt(a))?(s=t.charAt(a),a++):(s=e,k===0&&O(ul)),R[o]={nextPos:a,result:s},s)}function h(s,o,p){const u={type:s};o.children=p;for(const v of Object.keys(o))o[v]!==void 0&&(u[v]=o[v]);const d=Xt();return u.loc={start:d.start.offset,end:d.end.offset-1},u}if(Ks=g(),Ks!==e&&a===t.length)return Ks;throw Ks!==e&&a`}else return t.name;case"fnTypeSource":{const r=t.args.map(n=>Lf(n)).join(", "),e=Lf(t.result);return`@(${r}) { ${e} }`}}}function Lu(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return qv(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=Lu(t.inner):r=qv("any"),Ab(t.name,[r])}}throw new pu(`Unknown type: '${Lf(t)}'`)}else{const r=t.args.map(e=>Lu(e));return _b(r,Lu(t.result))}}function Cb(t){switch(t.type){case"def":{t.varType!=null&&Lu(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&Lu(r.argType);t.retType!=null&&Lu(t.retType);break}}return t}function kb(t){for(const r of t)st(r,Cb);return t}function Bf(t){const r=[],e=[];for(const n of t)if(n.type==="attr")e.push(n);else if(n.type==="def")n.attr==null&&(n.attr=[]),n.attr.push(...e),e.splice(0,e.length),n.expr.type==="fn"&&(n.expr.children=Bf(n.expr.children)),r.push(n);else{if(e.length>0)throw new pu("invalid attribute.");switch(n.type){case"fn":{n.children=Bf(n.children);break}case"block":{n.statements=Bf(n.statements);break}}r.push(n)}if(e.length>0)throw new pu("invalid attribute.");return r}function Pb(t){if(yb(t)&&Ad(t)&&t.chain!=null){const{chain:r,...e}=t;let n=e;for(const c of r)switch(c.type){case"callChain":{n=wb(n,c.args,c.loc);break}case"indexChain":{n=mb(n,c.index,c.loc);break}case"propChain":{n=xb(n,c.name,c.loc);break}}return n}return t}function Eb(t){for(let r=0;r":{func:"Core:gt",priority:4},"<=":{func:"Core:lteq",priority:4},">=":{func:"Core:gteq",priority:4},"&&":{mapFn:t=>({type:"and",left:Zo(t.left),right:Zo(t.right)}),priority:3},"||":{mapFn:t=>({type:"or",left:Zo(t.left),right:Zo(t.right)}),priority:3}};function Sb(t){const r=t.operators.map(n=>{const c=Mb[n];if(c==null)throw new pu(`No such operator: ${n}.`);return c});let e=Hf(t.operands[0],t.operands[1],r[0]);for(let n=0;ne.type==="infix"?Sb(e):e);return t}var Ya;let Ob=(Ya=class{constructor(){be(this,"plugins");this.plugins={validate:[bb,kb],transform:[Bf,Eb,Fb]}}static parse(r){return Ya.instance==null&&(Ya.instance=new Ya),Ya.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;try{const n=Uv(r,{startRule:"Preprocess"});e=Uv(n,{startRule:"Main"})}catch(n){throw n.location?n.expected?new pu(`Parsing error. (Line ${n.location.start.line}:${n.location.start.column})`,n):new pu(`${n.message} (Line ${n.location.start.line}:${n.location.start.column})`,n):n}for(const n of this.plugins.validate)e=n(e);for(const n of this.plugins.transform)e=n(e);return e}},be(Ya,"instance"),Ya);const zv="0.16.0",Nb={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { + <: if (i % 15 == 0) "FizzBuzz" + elif (i % 3 == 0) "Fizz" + elif (i % 5 == 0) "Buzz" + else i + }`},Ib=t=>(vf("data-v-652f71ed"),t=t(),gf(),t),Tb={id:"root"},jb={id:"grid1"},Rb={class:"type"},Db={id:"grid2"},Lb=Ib(()=>Mt("header",null,null,-1)),Bb=si({__name:"index",setup(t){const r=wr(window.localStorage.getItem(zv)??'<: "Hello, AiScript!"'),e=wr(null),n=wr([]),c=wr(null);ri(r,()=>{window.localStorage.setItem(zv,r.value);try{e.value=Ob.parse(r.value),c.value=null}catch(x){const m=x;c.value=m.message,console.error("info"in m?m.info:m);return}},{immediate:!0});let g=null;const $=async()=>{n.value=[],g==null||g.abort(),g=new hs({},{in:x=>new Promise(m=>{const A=window.prompt(x);m(A??"")}),out:x=>{n.value.push({id:Math.random(),type:x.type,text:_h(x,!0),print:!0})},err:x=>{window.alert(x.toString())},log:(x,m)=>{switch(x){case"end":n.value.push({id:Math.random(),text:_h(m.val,!0),print:!1});break}}});try{await g.exec(e.value)}catch(x){console.error(x),window.alert("Internal Error: "+x)}};return(x,m)=>(wt(),Ut("div",Tb,[Mt("div",jb,[nt(yf,{modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=A=>r.value=A),samples:Mi(Nb),parseError:c.value,onRun:$},null,8,["modelValue","samples","parseError"]),nt(Fr,{id:"logs"},{header:ot(()=>[It("Output")]),default:ot(()=>[(wt(!0),Ut(Ir,null,fu(n.value,A=>(wt(),Ut("div",{class:Tr(["log",[{print:A.print},A.type]]),key:A.id},[Mt("span",Rb,Dr(A.type),1),It(" "+Dr(A.text),1)],2))),128))]),_:1})]),Mt("div",Db,[nt(Fr,{id:"ast"},{header:ot(()=>[It("AST")]),default:ot(()=>[Mt("pre",null,Dr(JSON.stringify(e.value,null," ")),1)]),_:1}),nt(Fr,{id:"bin"},{header:ot(()=>[It("Bytecode")]),default:ot(()=>[Lb]),_:1}),nt(Fr,{id:"debugger"},{header:ot(()=>[It("Debugger")]),_:1})])]))}});const Hb=ai(Bb,[["__scopeId","data-v-652f71ed"]]);function Uf(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Uf=function(e){return typeof e}:Uf=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uf(t)}function Cd(t,r,e){var n=e.value;if(typeof n!="function")throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(Uf(n)));var c=!1;return{configurable:!0,get:function(){if(c||this===t.prototype||this.hasOwnProperty(r)||typeof n!="function")return n;var $=n.bind(this);return c=!0,Object.defineProperty(this,r,{configurable:!0,get:function(){return $},set:function(m){n=m,delete this[r]}}),c=!1,$},set:function($){n=$}}}function Ub(t){var r;return typeof Reflect<"u"&&typeof Reflect.ownKeys=="function"?r=Reflect.ownKeys(t.prototype):(r=Object.getOwnPropertyNames(t.prototype),typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t.prototype)))),r.forEach(function(e){if(e!=="constructor"){var n=Object.getOwnPropertyDescriptor(t.prototype,e);typeof n.value=="function"&&Object.defineProperty(t.prototype,e,Cd(t,e,n))}}),t}function pt(){return arguments.length===1?Ub.apply(void 0,arguments):Cd.apply(void 0,arguments)}let kd=class Pd extends Error{constructor(e,n){super(e);be(this,"info");this.info=n,Error.captureStackTrace&&Error.captureStackTrace(this,Pd)}},vu=class extends kd{constructor(r,e){super(r,e)}},ir=class extends kd{constructor(r,e){super(r,e)}},qb=class extends ir{constructor(r,e){super(r,e)}};var bu=globalThis&&globalThis.__decorate||function(t,r,e,n){var c=arguments.length,g=c<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(t,r,e,n);else for(var x=t.length-1;x>=0;x--)($=t[x])&&(g=(c<3?$(g):c>3?$(r,e,g):$(r,e))||g);return c>3&&g&&Object.defineProperty(r,e,g),g};let Ni=class Ed{constructor(r=[],e,n){be(this,"parent");be(this,"layerdStates");be(this,"name");be(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=n||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const n=[r,...this.layerdStates];return new Ed(n,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const n=e.get(r);return this.log("read",{var:r,val:n}),n}throw new ir(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}getAll(){const r=this.layerdStates.reduce((e,n)=>[...e,...n],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const n=this.layerdStates[0];if(n.has(r))throw new ir(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(r,e),this.parent==null&&this.onUpdated(r,e)}assign(r,e){let n=1;for(const c of this.layerdStates){if(c.has(r)){c.set(r,e),this.log("assign",{var:r,val:e}),n===this.layerdStates.length&&this.onUpdated(r,e);return}n++}throw new ir(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}};bu([pt],Ni.prototype,"log",null);bu([pt],Ni.prototype,"onUpdated",null);bu([pt],Ni.prototype,"createChildScope",null);bu([pt],Ni.prototype,"get",null);bu([pt],Ni.prototype,"getAll",null);bu([pt],Ni.prototype,"add",null);bu([pt],Ni.prototype,"assign",null);let Mf;const zb=new Uint8Array(16);function Vb(){if(!Mf&&(Mf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Mf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Mf(zb)}const Qr=[];for(let t=0;t<256;++t)Qr.push((t+256).toString(16).slice(1));function Wb(t,r=0){return(Qr[t[r+0]]+Qr[t[r+1]]+Qr[t[r+2]]+Qr[t[r+3]]+"-"+Qr[t[r+4]]+Qr[t[r+5]]+"-"+Qr[t[r+6]]+Qr[t[r+7]]+"-"+Qr[t[r+8]]+Qr[t[r+9]]+"-"+Qr[t[r+10]]+Qr[t[r+11]]+Qr[t[r+12]]+Qr[t[r+13]]+Qr[t[r+14]]+Qr[t[r+15]]).toLowerCase()}const Kb=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Vv={randomUUID:Kb};function Jb(t,r,e){if(Vv.randomUUID&&!r&&!t)return Vv.randomUUID();t=t||{};const n=t.random||(t.rng||Vb)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){e=e||0;for(let c=0;c<16;++c)r[e+c]=n[c];return r}return Wb(n)}const zt={type:"null"},dn={type:"bool",value:!0},rn={type:"bool",value:!1},Oe=t=>({type:"num",value:t}),nr=t=>({type:"str",value:t}),Bu=t=>({type:"bool",value:t}),Op=t=>({type:"obj",value:t}),is=t=>({type:"arr",value:t}),Xb=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),we=t=>({type:"fn",native:t}),Gb=t=>({type:"return",value:t}),Zb=()=>({type:"break",value:null}),Qb=()=>({type:"continue",value:null}),Yb=t=>t.type==="return"?t.value:t;function on(t){if(t==null)throw new ir("Expect anything, but got nothing.")}function _s(t){if(t==null)throw new ir("Expect boolean, but got nothing.");if(t.type!=="bool")throw new ir(`Expect boolean, but got ${t.type}.`)}function bi(t){if(t==null)throw new ir("Expect function, but got nothing.");if(t.type!=="fn")throw new ir(`Expect function, but got ${t.type}.`)}function Ur(t){if(t==null)throw new ir("Expect string, but got nothing.");if(t.type!=="str")throw new ir(`Expect string, but got ${t.type}.`)}function Pe(t){if(t==null)throw new ir("Expect number, but got nothing.");if(t.type!=="num")throw new ir(`Expect number, but got ${t.type}.`)}function vi(t){if(t==null)throw new ir("Expect object, but got nothing.");if(t.type!=="obj")throw new ir(`Expect object, but got ${t.type}.`)}function Hu(t){if(t==null)throw new ir("Expect array, but got nothing.");if(t.type!=="arr")throw new ir(`Expect array, but got ${t.type}.`)}function e1(t){return t.type==="str"}function t1(t){return t.type==="num"}function r1(t){return t.type==="obj"}function s1(t){return t.type==="arr"}function Eh(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function Mh(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(n=>Mh(n,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function Sh(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>Sh(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,n]of t.value.entries())r[e]=Sh(n);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function Fh(t){if(t===null)return zt;if(typeof t=="boolean")return Bu(t);if(typeof t=="string")return nr(t);if(typeof t=="number")return Oe(t);if(Array.isArray(t))return is(t.map(r=>Fh(r)));if(typeof t=="object"){const r=new Map;for(const[e,n]of Object.entries(t))r.set(e,Fh(n));return Op(r)}return zt}const n1={help:nr("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":nr("0.14.1"),"Core:ai":nr("kawaii"),"Core:not":we(([t])=>(_s(t),t.value?rn:dn)),"Core:eq":we(([t,r])=>(on(t),on(r),Eh(t,r)?dn:rn)),"Core:neq":we(([t,r])=>(on(t),on(r),Eh(t,r)?rn:dn)),"Core:and":we(([t,r])=>(_s(t),t.value?(_s(r),r.value?dn:rn):rn)),"Core:or":we(([t,r])=>(_s(t),t.value?dn:(_s(r),r.value?dn:rn))),"Core:add":we(([t,r])=>(Pe(t),Pe(r),Oe(t.value+r.value))),"Core:sub":we(([t,r])=>(Pe(t),Pe(r),Oe(t.value-r.value))),"Core:mul":we(([t,r])=>(Pe(t),Pe(r),Oe(t.value*r.value))),"Core:pow":we(([t,r])=>{Pe(t),Pe(r);const e=t.value**r.value;if(isNaN(e))throw new ir("Invalid operation.");return Oe(e)}),"Core:div":we(([t,r])=>{Pe(t),Pe(r);const e=t.value/r.value;if(isNaN(e))throw new ir("Invalid operation.");return Oe(e)}),"Core:mod":we(([t,r])=>(Pe(t),Pe(r),Oe(t.value%r.value))),"Core:gt":we(([t,r])=>(Pe(t),Pe(r),t.value>r.value?dn:rn)),"Core:lt":we(([t,r])=>(Pe(t),Pe(r),t.value(Pe(t),Pe(r),t.value>=r.value?dn:rn)),"Core:lteq":we(([t,r])=>(Pe(t),Pe(r),t.value<=r.value?dn:rn)),"Core:type":we(([t])=>(on(t),nr(t.type))),"Core:to_str":we(([t])=>(on(t),t.type==="str"?t:t.type==="num"?nr(t.value.toString()):nr("?"))),"Core:range":we(([t,r])=>(Pe(t),Pe(r),t.valueOe(n+t.value))):t.value>r.value?is(Array.from({length:t.value-r.value+1},(e,n)=>Oe(t.value-n))):is([t]))),"Util:uuid":we(()=>nr(Jb())),"Json:stringify":we(([t])=>(on(t),nr(JSON.stringify(Sh(t))))),"Json:parse":we(([t])=>(Ur(t),Fh(JSON.parse(t.value)))),"Json:parsable":we(([t])=>{Ur(t);try{JSON.parse(t.value)}catch{return Bu(!1)}return Bu(!0)}),"Date:now":we(()=>Oe(Date.now())),"Date:year":we(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":we(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":we(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":we(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":we(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":we(([t])=>(t&&Pe(t),Oe(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":we(([t])=>(Ur(t),Oe(new Date(t.value).getTime()))),"Math:Infinity":Oe(1/0),"Math:E":Oe(Math.E),"Math:LN2":Oe(Math.LN2),"Math:LN10":Oe(Math.LN10),"Math:LOG2E":Oe(Math.LOG2E),"Math:LOG10E":Oe(Math.LOG10E),"Math:PI":Oe(Math.PI),"Math:SQRT1_2":Oe(Math.SQRT1_2),"Math:SQRT2":Oe(Math.SQRT2),"Math:abs":we(([t])=>(Pe(t),Oe(Math.abs(t.value)))),"Math:acos":we(([t])=>(Pe(t),Oe(Math.acos(t.value)))),"Math:acosh":we(([t])=>(Pe(t),Oe(Math.acosh(t.value)))),"Math:asin":we(([t])=>(Pe(t),Oe(Math.asin(t.value)))),"Math:asinh":we(([t])=>(Pe(t),Oe(Math.asinh(t.value)))),"Math:atan":we(([t])=>(Pe(t),Oe(Math.atan(t.value)))),"Math:atanh":we(([t])=>(Pe(t),Oe(Math.atanh(t.value)))),"Math:atan2":we(([t,r])=>(Pe(t),Pe(r),Oe(Math.atan2(t.value,r.value)))),"Math:cbrt":we(([t])=>(Pe(t),Oe(Math.cbrt(t.value)))),"Math:ceil":we(([t])=>(Pe(t),Oe(Math.ceil(t.value)))),"Math:clz32":we(([t])=>(Pe(t),Oe(Math.clz32(t.value)))),"Math:cos":we(([t])=>(Pe(t),Oe(Math.cos(t.value)))),"Math:cosh":we(([t])=>(Pe(t),Oe(Math.cosh(t.value)))),"Math:exp":we(([t])=>(Pe(t),Oe(Math.exp(t.value)))),"Math:expm1":we(([t])=>(Pe(t),Oe(Math.expm1(t.value)))),"Math:floor":we(([t])=>(Pe(t),Oe(Math.floor(t.value)))),"Math:fround":we(([t])=>(Pe(t),Oe(Math.fround(t.value)))),"Math:hypot":we(([t])=>{Hu(t);const r=[];for(const e of t.value)Pe(e),r.push(e.value);return Oe(Math.hypot(...r))}),"Math:imul":we(([t,r])=>(Pe(t),Pe(r),Oe(Math.imul(t.value,r.value)))),"Math:log":we(([t])=>(Pe(t),Oe(Math.log(t.value)))),"Math:log1p":we(([t])=>(Pe(t),Oe(Math.log1p(t.value)))),"Math:log10":we(([t])=>(Pe(t),Oe(Math.log10(t.value)))),"Math:log2":we(([t])=>(Pe(t),Oe(Math.log2(t.value)))),"Math:max":we(([t,r])=>(Pe(t),Pe(r),Oe(Math.max(t.value,r.value)))),"Math:min":we(([t,r])=>(Pe(t),Pe(r),Oe(Math.min(t.value,r.value)))),"Math:pow":we(([t,r])=>(Pe(t),Pe(r),Oe(Math.pow(t.value,r.value)))),"Math:round":we(([t])=>(Pe(t),Oe(Math.round(t.value)))),"Math:sign":we(([t])=>(Pe(t),Oe(Math.sign(t.value)))),"Math:sin":we(([t])=>(Pe(t),Oe(Math.sin(t.value)))),"Math:sinh":we(([t])=>(Pe(t),Oe(Math.sinh(t.value)))),"Math:sqrt":we(([t])=>{Pe(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new ir("Invalid operation.");return Oe(r)}),"Math:tan":we(([t])=>(Pe(t),Oe(Math.tan(t.value)))),"Math:tanh":we(([t])=>(Pe(t),Oe(Math.tanh(t.value)))),"Math:trunc":we(([t])=>(Pe(t),Oe(Math.trunc(t.value)))),"Math:rnd":we(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?Oe(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):Oe(Math.random())),"Math:gen_rng":we(([t])=>{if(on(t),t.type!=="num"&&t.type!=="str")return zt;const r=kp(t.value.toString());return we(([e,n])=>e&&e.type==="num"&&n&&n.type==="num"?Oe(Math.floor(r()*(Math.floor(n.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):Oe(r()))}),"Num:to_hex":we(([t])=>(Pe(t),nr(t.value.toString(16)))),"Num:from_hex":we(([t])=>(Ur(t),Oe(parseInt(t.value,16)))),"Str:lf":nr(` +`),"Str:lt":we(([t,r])=>(Ur(t),Ur(r),t.value(Ur(t),Ur(r),t.value>r.value?Oe(-1):t.value===r.value?Oe(0):Oe(1))),"Obj:keys":we(([t])=>(vi(t),is(Array.from(t.value.keys()).map(r=>nr(r))))),"Obj:vals":we(([t])=>(vi(t),is(Array.from(t.value.values())))),"Obj:kvs":we(([t])=>(vi(t),is(Array.from(t.value.entries()).map(([r,e])=>is([nr(r),e]))))),"Obj:get":we(([t,r])=>(vi(t),Ur(r),t.value.get(r.value)??zt)),"Obj:set":we(([t,r,e])=>(vi(t),Ur(r),on(e),t.value.set(r.value,e),zt)),"Obj:has":we(([t,r])=>(vi(t),Ur(r),Bu(t.value.has(r.value)))),"Obj:copy":we(([t])=>(vi(t),Op(new Map(t.value)))),"Async:interval":we(async([t,r,e],n)=>{Pe(t),bi(r),e&&(_s(e),e.value&&n.call(r,[]));const c=setInterval(()=>{n.call(r,[])},t.value),g=()=>{clearInterval(c)};return n.registerAbortHandler(g),we(([],$)=>{clearInterval(c),$.unregisterAbortHandler(g)})}),"Async:timeout":we(async([t,r],e)=>{Pe(t),bi(r);const n=setTimeout(()=>{e.call(r,[])},t.value),c=()=>{clearTimeout(n)};return e.registerAbortHandler(c),we(([],g)=>{clearTimeout(n),g.unregisterAbortHandler(c)})})},Pu={num:{to_str:t=>we(async(r,e)=>nr(t.value.toString()))},str:{to_num:t=>we(async(r,e)=>{const n=parseInt(t.value,10);return isNaN(n)?zt:Oe(n)}),len:t=>Oe(Mp(t.value)),replace:t=>we(async([r,e],n)=>(Ur(r),Ur(e),nr(t.value.split(r.value).join(e.value)))),index_of:t=>we(async([r],e)=>(Ur(r),Oe(Fp(t.value,r.value)))),incl:t=>we(async([r],e)=>(Ur(r),t.value.includes(r.value)?dn:rn)),trim:t=>we(async(r,e)=>nr(t.value.trim())),upper:t=>we(async(r,e)=>nr(t.value.toUpperCase())),lower:t=>we(async(r,e)=>nr(t.value.toLowerCase())),split:t=>we(async([r],e)=>(r&&Ur(r),is(r?t.value.split(r?r.value:"").map(n=>nr(n)):Xu(t.value).map(n=>nr(n))))),slice:t=>we(async([r,e],n)=>(Pe(r),Pe(e),nr(Sp(t.value,r.value,e.value)))),pick:t=>we(async([r],e)=>{Pe(r);const c=Xu(t.value)[r.value];return c?nr(c):zt})},arr:{len:t=>Oe(t.value.length),push:t=>we(async([r],e)=>(on(r),t.value.push(r),t)),unshift:t=>we(async([r],e)=>(on(r),t.value.unshift(r),t)),pop:t=>we(async(r,e)=>t.value.pop()??zt),shift:t=>we(async(r,e)=>t.value.shift()??zt),concat:t=>we(async([r],e)=>(Hu(r),is(t.value.concat(r.value)))),slice:t=>we(async([r,e],n)=>(Pe(r),Pe(e),is(t.value.slice(r.value,e.value)))),join:t=>we(async([r],e)=>(r&&Ur(r),nr(t.value.map(n=>n.type==="str"?n.value:"").join(r?r.value:"")))),map:t=>we(async([r],e)=>{bi(r);const n=t.value.map(async(c,g)=>await e.call(r,[c,Oe(g)]));return is(await Promise.all(n))}),filter:t=>we(async([r],e)=>{bi(r);const n=[];for(let c=0;cwe(async([r,e],n)=>{bi(r);const c=e!=null;let g=c?e:t.value[0];for(let $=c?0:1;$we(async([r],e)=>{bi(r);for(let n=0;nwe(async([r],e)=>(on(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?rn:(c=>c.value.map(g=>g.type==="str"||g.type==="num"||g.type==="bool"?g.value:g.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?dn:rn)),reverse:t=>we(async(r,e)=>(t.value.reverse(),zt)),copy:t=>we(async(r,e)=>is([...t.value])),sort:t=>we(async([r],e)=>{const n=async(g,$)=>{if(g.length<=1)return g;const x=Math.floor(g.length/2),m=await n(g.slice(0,x),$),A=await n(g.slice(x),$);return c(m,A,$)},c=async(g,$,x)=>{const m=[];let A=0,C=0;for(;A=0;x--)($=t[x])&&(g=(c<3?$(g):c>3?$(r,e,g):$(r,e))||g);return c>3&&g&&Object.defineProperty(r,e,g),g};const Md=300,a1=Md-1;let Fs=class{constructor(r,e){be(this,"vars");be(this,"opts");be(this,"stepCount",0);be(this,"stop",!1);be(this,"scope");be(this,"abortHandlers",[]);this.opts=e??{};const n={print:we(([c])=>{on(c),this.opts.out&&this.opts.out(c)}),readline:we(async c=>{const g=c[0];if(Ur(g),this.opts.in==null)return zt;const $=await this.opts.in(g.value);return nr($)})};this.vars={...r,...n1,...n},this.scope=new Ni([new Map(Object.entries(this.vars))]),this.scope.opts.log=(c,g)=>{switch(c){case"add":this.log("var:add",g);break;case"read":this.log("var:read",g);break;case"write":this.log("var:write",g);break}}}async exec(r){if(r==null||r.length===0)return;await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}async execFn(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(c){switch(c.type){case"arr":return c.value.map(g=>e(g));case"bool":return c.value;case"null":return null;case"num":return c.value;case"obj":{const g={};for(const[$,x]of c.value.entries())g[$]=e(x);return g}case"str":return c.value;default:return}}const n=new Map;for(const c of r)switch(c.type){case"meta":{n.set(c.name,e(c.value));break}}return n}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const n of r.members)switch(n.type){case"def":{const c=await this._eval(n.expr,e);e.add(n.name,c),this.scope.add(r.name+":"+n.name,c);break}case"ns":break;default:throw new Error("invalid ns member type: "+n.type)}}async _fn(r,e){if(r.native)return r.native(e,{call:this._fn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??zt;{const n=new Map;for(let g=0;g<(r.args??[]).length;g++)n.set(r.args[g],e[g]);const c=r.scope.createChildScope(n);return Yb(await this._run(r.statements,c))}}async _eval(r,e){if(this.stop)return zt;if(this.stepCount%Md===a1&&await new Promise(n=>setTimeout(n,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new ir("max step exceeded");switch(r.type){case"call":{const n=await this._eval(r.target,e);bi(n);const c=await Promise.all(r.args.map(g=>this._eval(g,e)));return this._fn(n,c)}case"if":{const n=await this._eval(r.cond,e);if(_s(n),n.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const c of r.elseif){const g=await this._eval(c.cond,e);if(_s(g),g.value)return this._eval(c.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return zt}case"match":{const n=await this._eval(r.about,e);for(const c of r.qs){const g=await this._eval(c.q,e);if(Eh(n,g))return await this._eval(c.a,e)}return r.default?await this._eval(r.default,e):zt}case"loop":{for(;;){const n=await this._run(r.statements,e.createChildScope());if(n.type==="break")break;if(n.type==="return")return n}return zt}case"for":{if(r.times){const n=await this._eval(r.times,e);Pe(n);for(let c=0;c0){const c=[];for(const g of r.attr)c.push({name:g.name,value:await this._eval(g.value,e)});n.attr=c}return e.add(r.name,n),zt}case"identifier":return e.get(r.name);case"assign":{const n=await this._eval(r.expr,e);return await this.assign(e,r.dest,n),zt}case"addAssign":{const n=await this._eval(r.dest,e);Pe(n);const c=await this._eval(r.expr,e);return Pe(c),await this.assign(e,r.dest,Oe(n.value+c.value)),zt}case"subAssign":{const n=await this._eval(r.dest,e);Pe(n);const c=await this._eval(r.expr,e);return Pe(c),await this.assign(e,r.dest,Oe(n.value-c.value)),zt}case"null":return zt;case"bool":return Bu(r.value);case"num":return Oe(r.value);case"str":return nr(r.value);case"arr":return is(await Promise.all(r.value.map(async n=>await this._eval(n,e))));case"obj":{const n=new Map;for(const c of r.value.keys())n.set(c,await this._eval(r.value.get(c),e));return Op(n)}case"prop":{const n=await this._eval(r.target,e);if(r1(n))return n.value.has(r.name)?n.value.get(r.name):zt;if(t1(n)){if(Object.hasOwn(Pu.num,r.name))return Pu.num[r.name](n);throw new ir(`No such prop (${r.name}) in ${n.type}.`)}else if(e1(n)){if(Object.hasOwn(Pu.str,r.name))return Pu.str[r.name](n);throw new ir(`No such prop (${r.name}) in ${n.type}.`)}else if(s1(n)){if(Object.hasOwn(Pu.arr,r.name))return Pu.arr[r.name](n);throw new ir(`No such prop (${r.name}) in ${n.type}.`)}else throw new ir(`Cannot read prop (${r.name}) of ${n.type}.`)}case"index":{const n=await this._eval(r.target,e);Hu(n);const c=await this._eval(r.index,e);Pe(c);const g=n.value[c.value];if(g===void 0)throw new qb(`Index out of range. index: ${c.value} max: ${n.value.length-1}`);return g}case"not":{const n=await this._eval(r.expr,e);return _s(n),Bu(!n.value)}case"fn":return Xb(r.args.map(n=>n.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"tmpl":{let n="";for(const c of r.tmpl)if(typeof c=="string")n+=c;else{const g=await this._eval(c,e);let $="";g.type==="str"?$=g.value:g.type==="num"&&($=g.value.toString()),n+=$}return nr(n)}case"return":{const n=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:n}),Gb(n)}case"break":return this.log("block:break",{scope:e.name}),Zb();case"continue":return this.log("block:continue",{scope:e.name}),Qb();case"ns":return zt;case"meta":return zt;case"and":{const n=await this._eval(r.left,e);if(_s(n),n.value){const c=await this._eval(r.right,e);return _s(c),c}else return n}case"or":{const n=await this._eval(r.left,e);if(_s(n),n.value)return n;{const c=await this._eval(r.right,e);return _s(c),c}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let n=zt;for(let c=0;ce!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,n){if(e.type==="identifier")r.assign(e.name,n);else if(e.type==="index"){const c=await this._eval(e.target,r);Hu(c);const g=await this._eval(e.index,r);Pe(g),c.value[g.value]=n}else if(e.type==="prop"){const c=await this._eval(e.target,r);vi(c),c.value.set(e.name,n)}else throw new ir("The left-hand side of an assignment expression must be a variable or a property/index access.")}};fn([pt],Fs.prototype,"exec",null);fn([pt],Fs.prototype,"execFn",null);fn([pt],Fs.prototype,"log",null);fn([pt],Fs.prototype,"collectNs",null);fn([pt],Fs.prototype,"collectNsMember",null);fn([pt],Fs.prototype,"_fn",null);fn([pt],Fs.prototype,"_eval",null);fn([pt],Fs.prototype,"_run",null);fn([pt],Fs.prototype,"registerAbortHandler",null);fn([pt],Fs.prototype,"unregisterAbortHandler",null);fn([pt],Fs.prototype,"abort",null);fn([pt],Fs.prototype,"assign",null);fn([pt],Fs,"collectMetadata",null);function i1(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function lu(t,r,e,n){var c=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(c,lu.prototype),c.expected=r,c.found=e,c.location=n,c.name="SyntaxError",c}i1(lu,Error);function Vc(t,r,e){return e=e||" ",t.length>r?t:(r-=t.length,e+=e.repeat(r),t+e.slice(0,r))}lu.prototype.format=function(t){var r="Error: "+this.message;if(this.location){var e=null,n;for(n=0;n `+$+` +`+m+` | +`+g.line+" | "+A+` +`+m+" | "+Vc("",c.column-1," ")+Vc("",P,"^")}else r+=` + at `+$}return r};lu.buildMessage=function(t,r){var e={literal:function(A){return'"'+c(A.text)+'"'},class:function(A){var C=A.parts.map(function(P){return Array.isArray(P)?g(P[0])+"-"+g(P[1]):g(P)});return"["+(A.inverted?"^":"")+C.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(A){return A.description}};function n(A){return A.charCodeAt(0).toString(16).toUpperCase()}function c(A){return A.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+n(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+n(C)})}function g(A){return A.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+n(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+n(C)})}function $(A){return e[A.type](A)}function x(A){var C=A.map($),P,S;if(C.sort(),C.length>0){for(P=1,S=1;P=",Ye="<",Br=">",Wt="+",Ar="-",Ft="*",br="^",Hr="/",Or="%",Rr="!",Dt="[",z=".",Z="if",se="elif",ve="else",ye="match",oe="=>",Ne="eval",me="`",$e='"',he="'",Le='\\"',Re="\\'",He="true",We="false",Ze="null",at=";",it="@",bt="@(",Kt=`\r +`,Ct=/^[A-Z0-9_:]/i,sr=/^[^`{]/,Ns=/^[{}`]/,rs=/^[+\-]/,Lt=/^[1-9]/,vt=/^[0-9]/,qt=/^[A-Z_]/i,Zn=/^[A-Z0-9_]/i,Qn=/^[\r\n]/,Ii=/^[ \t\r\n]/,Ti=/^[ \t]/,or=wo(),ur=te("//",!1),ji=te("/*",!1),xn=te("*/",!1),_r=te("(",!1),Ot=te(")",!1),Cr=te("::",!1),fr=te("{",!1),tt=te("}",!1),Jt=te("###",!1),zr=te("let",!1),xt=te(":",!1),$t=te("=",!1),ps=te("var",!1),Ri=te("<:",!1),Di=te("#[",!1),Is=te("]",!1),vs=te("each",!1),At=te(",",!1),gt=te("for",!1),Ts=te("return",!1),gr=Xt([["A","Z"],["0","9"],"_",":"],!1,!0),dr=te("loop",!1),Li=te("break",!1),Bi=te("continue",!1),Hi=te("+=",!1),Ui=te("-=",!1),Yn=te("\\",!1),ea=te("||",!1),qi=te("&&",!1),zi=te("==",!1),Vi=te("!=",!1),Wi=te("<=",!1),Ki=te(">=",!1),ta=te("<",!1),$n=te(">",!1),ra=te("+",!1),Ji=te("-",!1),sa=te("*",!1),na=te("^",!1),Xi=te("/",!1),Gi=te("%",!1),Zi=te("!",!1),bn=te("[",!1),gs=te(".",!1),An=te("if",!1),Qi=te("elif",!1),Yi=te("else",!1),el=te("match",!1),js=te("=>",!1),Rs=te("eval",!1),Ds=te("`",!1),tl=Xt(["`","{"],!0,!1),Ls=Xt(["{","}","`"],!1,!1),Bs=te('"',!1),Hs=te("'",!1),Us=te('\\"',!1),qs=te("\\'",!1),zs=Xt(["+","-"],!1,!1),aa=Xt([["1","9"]],!1,!1),Nt=Xt([["0","9"]],!1,!1),ia=te("true",!1),cr=te("false",!1),rl=te("null",!1),Vs=te(";",!1),sl=te("@",!1),ds=te("@(",!1),nl=Xt([["A","Z"],"_"],!1,!0),_n=Xt([["A","Z"],["0","9"],"_"],!1,!0),al=te(`\r +`,!1),la=Xt(["\r",` +`],!1,!1),il=Xt([" "," ","\r",` +`],!1,!1),ll=Xt([" "," "],!1,!1),ol=function(l){return l.join("")},ul=function(){return k()},fl=function(){return k()},cl=function(){return""},hl=function(){return""},pl=function(l){return l??[]},oa=function(l,f){return f},vl=function(l,f){return[l,...f]},Cn=function(l,f){return f},gl=function(l,f){return[l,...f]},kn=function(l,f){return f},dl=function(l,f){return[l,...f]},ua=function(l){return l},yl=function(l,f){return ie("ns",{name:l,members:f})},wl=function(l,f){return ie("meta",{name:l,value:f})},ml=function(l){return ie("meta",{name:null,value:l})},xl=function(l,f,y){return ie("def",{name:l,varType:f,expr:y,mut:!1,attr:[]})},$l=function(l,f,y){return ie("def",{name:l,varType:f,expr:y,mut:!0,attr:[]})},bl=function(l){return ie("identifier",{name:"print",chain:[ie("callChain",{args:[l]})]})},Al=function(l,f){return ie("attr",{name:l,value:f??ie("bool",{value:!0})})},_l=function(l,f,y){return ie("each",{var:l,items:f,for:y})},Cl=function(l,f,y){return ie("each",{var:l,items:f,for:y})},kl=function(l,f){return f},Pl=function(l,f,y,h){return ie("for",{var:l,from:f??ie("num",{value:0}),to:y,for:h})},El=function(l,f){return f},Ml=function(l,f,y,h){return ie("for",{var:l,from:f??ie("num",{value:0}),to:y,for:h})},Sl=function(l,f){return ie("for",{times:l,for:f})},Fl=function(l,f){return ie("for",{times:l,for:f})},Ol=function(l){return ie("return",{expr:l})},Nl=function(l){return ie("loop",{statements:l})},Il=function(){return ie("break",{})},Tl=function(){return ie("continue",{})},jl=function(l,f,y){return f==="+="?ie("addAssign",{dest:l,expr:y}):f==="-="?ie("subAssign",{dest:l,expr:y}):ie("assign",{dest:l,expr:y})},fa=function(l,f,y){return{op:f,term:y}},Rl=function(l,f){return ie("infix",{operands:[l,...f.map(y=>y.term)],operators:f.map(y=>y.op)})},ca=function(){return k()},Dl=function(l){return ie("not",{expr:l})},Ll=function(l,f){return{...l,chain:f}},Bl=function(l){return ie("callChain",{args:l??[]})},ha=function(l,f){return f},Hl=function(l,f){return[l,...f]},pa=function(l){return ie("indexChain",{index:l})},Ul=function(l){return ie("propChain",{name:l})},ql=function(l,f,y,h){return ie("if",{cond:l,then:f,elseif:y??[],else:h})},zl=function(l,f){return[l,...f]},Vl=function(l,f){return{cond:l,then:f}},Wl=function(l){return l},va=function(l,f,y){return{q:f,a:y}},Kl=function(l,f,y){return ie("match",{about:l,qs:f??[],default:y})},ga=function(l){return ie("block",{statements:l})},Jl=function(l){return ie("identifier",{name:l})},Xl=function(l){return ie("tmpl",{tmpl:l})},Gl=function(l){return l.join("")},da=function(l){return l},Zl=function(l){return ie("str",{value:l.join("")})},ya=function(l){return l},wa=function(l){return ie("str",{value:l.join("")})},Ql=function(){return'"'},ma=function(){return"'"},Yl=function(){return ie("num",{value:parseFloat(k())})},eo=function(){return ie("num",{value:parseFloat(k())})},to=function(){return ie("num",{value:parseInt(k(),10)})},ro=function(){return ie("num",{value:parseInt(k(),10)})},so=function(){return ie("bool",{value:!0})},no=function(){return ie("bool",{value:!1})},ao=function(){return ie("null",{})},xa=function(l,f){return{k:l,v:f}},io=function(l){const f=new Map;for(const y of l)f.set(y.k,y.v);return ie("obj",{value:f})},$a=function(l){return l},ba=function(l){return ie("arr",{value:l})},lo=function(l,f){return{name:l,argType:f}},Aa=function(l,f){return[l,...f]},oo=function(l,f,y,h,s,o){return(l.length>0||y.length>0)&&Ks("Cannot use spaces before or after the function name."),ie("def",{name:f,expr:ie("fn",{args:h??[],retType:s},o??[]),mut:!1,attr:[]})},uo=function(l,f,y){return ie("fn",{args:l??[],retType:f},y??[])},_a=function(l){return l},fo=function(l){return ie("arr",{value:l})},Ca=function(l,f){return{k:l,v:f}},ka=function(l){const f=new Map;for(const y of l)f.set(y.k,y.v);return ie("obj",{value:f})},co=function(l,f){return ie("fnTypeSource",{args:l??[],result:f})},Pa=function(l,f){return[l,...f]},ho=function(l,f){return ie("namedTypeSource",{name:l,inner:f})},po=function(l){return ie("namedTypeSource",{name:l,inner:null})},vo=function(){return k()},go=function(){return k()},yo=function(l){return ie("block",{statements:l??[]})},i=0,X=0,Ws=[{line:1,column:1}],a=0,K=[],E=0,T={},Vr;if("startRule"in r){if(!(r.startRule in c))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');g=c[r.startRule]}function k(){return t.substring(X,i)}function R(){return Js(X,i)}function Ks(l,f){throw f=f!==void 0?f:Js(X,i),Ea(l,f)}function te(l,f){return{type:"literal",text:l,ignoreCase:f}}function Xt(l,f,y){return{type:"class",parts:l,inverted:f,ignoreCase:y}}function wo(){return{type:"any"}}function ae(){return{type:"end"}}function Bt(l){var f=Ws[l],y;if(f)return f;for(y=l-1;!Ws[y];)y--;for(f=Ws[y],f={line:f.line,column:f.column};ya&&(a=i,K=[]),K.push(l))}function Ea(l,f){return new lu(l,null,null,f)}function Xs(l,f,y){return new lu(lu.buildMessage(l,f),l,f,y)}function O(){var l,f,y,h=i*76+0,s=T[h];if(s)return i=s.nextPos,s.result;for(l=i,f=[],y=Ma();y!==e;)f.push(y),y=Ma();return X=l,f=ol(f),l=f,T[h]={nextPos:i,result:l},l}function Ma(){var l,f,y=i*76+1,h=T[y];return h?(i=h.nextPos,h.result):(l=i,f=Da(),f!==e&&(X=l,f=ul()),l=f,l===e&&(l=i,f=Zs(),f!==e&&(X=l,f=fl()),l=f,l===e&&(l=mo(),l===e&&(t.length>i?(l=t.charAt(i),i++):(l=e,E===0&&N(or))))),T[y]={nextPos:i,result:l},l)}function mo(){var l,f,y,h,s,o,p=i*76+2,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,t.substr(i,2)===$?(f=$,i+=2):(f=e,E===0&&N(ur)),f!==e){for(y=[],h=i,s=i,E++,o=Xa(),E--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(or)),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,o=Xa(),E--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(or)),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);X=l,l=cl()}else i=l,l=e;if(l===e)if(l=i,t.substr(i,2)===x?(f=x,i+=2):(f=e,E===0&&N(ji)),f!==e){for(y=[],h=i,s=i,E++,t.substr(i,2)===m?(o=m,i+=2):(o=e,E===0&&N(xn)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(or)),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,t.substr(i,2)===m?(o=m,i+=2):(o=e,E===0&&N(xn)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(or)),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);t.substr(i,2)===m?(h=m,i+=2):(h=e,E===0&&N(xn)),h!==e?(X=l,l=hl()):(i=l,l=e)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function Sa(){var l,f,y,h,s,o=i*76+3,p=T[o];if(p)return i=p.nextPos,p.result;for(l=i,f=[],y=_();y!==e;)f.push(y),y=_();for(y=Fa(),y===e&&(y=null),h=[],s=_();s!==e;)h.push(s),s=_();return X=l,l=pl(y),T[o]={nextPos:i,result:l},l}function Fa(){var l,f,y,h,s,o,p,u,d=i*76+4,v=T[d];if(v)return i=v.nextPos,v.result;if(l=i,f=Pn(),f!==e){for(y=[],h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();u=Pn(),u!==e?(X=h,h=oa(f,u)):(i=h,h=e)}else i=h,h=e;for(;h!==e;){for(y.push(h),h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();u=Pn(),u!==e?(X=h,h=oa(f,u)):(i=h,h=e)}else i=h,h=e}X=l,l=vl(f,y)}else i=l,l=e;return T[d]={nextPos:i,result:l},l}function xo(){var l,f,y,h,s,o,p,u,d=i*76+5,v=T[d];if(v)return i=v.nextPos,v.result;if(l=i,f=En(),f!==e){for(y=[],h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();u=En(),u!==e?(X=h,h=Cn(f,u)):(i=h,h=e)}else i=h,h=e;for(;h!==e;){for(y.push(h),h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();u=En(),u!==e?(X=h,h=Cn(f,u)):(i=h,h=e)}else i=h,h=e}X=l,l=gl(f,y)}else i=l,l=e;return T[d]={nextPos:i,result:l},l}function ys(){var l,f,y,h,s,o,p,u,d=i*76+6,v=T[d];if(v)return i=v.nextPos,v.result;if(l=i,f=yr(),f!==e){for(y=[],h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();u=yr(),u!==e?(X=h,h=kn(f,u)):(i=h,h=e)}else i=h,h=e;for(;h!==e;){for(y.push(h),h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();u=yr(),u!==e?(X=h,h=kn(f,u)):(i=h,h=e)}else i=h,h=e}X=l,l=dl(f,y)}else i=l,l=e;return T[d]={nextPos:i,result:l},l}function Pn(){var l,f=i*76+7,y=T[f];return y?(i=y.nextPos,y.result):(l=ws(),l===e&&(l=Oa(),l===e&&(l=yr())),T[f]={nextPos:i,result:l},l)}function En(){var l,f=i*76+8,y=T[f];return y?(i=y.nextPos,y.result):(l=kr(),l===e&&(l=Ka(),l===e&&(l=ws())),T[f]={nextPos:i,result:l},l)}function yr(){var l,f=i*76+9,y=T[f];return y?(i=y.nextPos,y.result):(l=kr(),l===e&&(l=Ka(),l===e&&(l=Na(),l===e&&(l=Ao(),l===e&&(l=$o(),l===e&&(l=Ia(),l===e&&(l=bo(),l===e&&(l=_o(),l===e&&(l=Co(),l===e&&(l=ko(),l===e&&(l=Po(),l===e&&(l=De()))))))))))),T[f]={nextPos:i,result:l},l)}function De(){var l,f=i*76+10,y=T[f];return y?(i=y.nextPos,y.result):(l=Eo(),l===e&&(l=Wr()),T[f]={nextPos:i,result:l},l)}function Wr(){var l,f=i*76+11,y=T[f];return y?(i=y.nextPos,y.result):(l=Fo(),l===e&&(l=Ro(),l===e&&(l=Er(),l===e&&(l=Kr()))),T[f]={nextPos:i,result:l},l)}function Kr(){var l,f,y,h,s,o,p=i*76+12,u=T[p];if(u)return i=u.nextPos,u.result;if(l=No(),l===e&&(l=Fn(),l===e&&(l=Da(),l===e&&(l=Zs(),l===e&&(l=Ua(),l===e&&(l=Tn(),l===e&&(l=Va(),l===e&&(l=Wa(),l===e&&(l=jo(),l===e&&(l=Mo(),l===e&&(l=Io(),l===e)))))))))))if(l=i,t.charCodeAt(i)===40?(f=A,i++):(f=e,E===0&&N(_r)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(h=De(),h!==e){for(s=[],o=_();o!==e;)s.push(o),o=_();t.charCodeAt(i)===41?(o=C,i++):(o=e,E===0&&N(Ot)),o!==e?(X=l,l=ua(h)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function Te(){var l,f=i*76+13,y=T[f];return y?(i=y.nextPos,y.result):(l=Ua(),l===e&&(l=Zs(),l===e&&(l=Tn(),l===e&&(l=Dn(),l===e&&(l=Ja(),l===e&&(l=Va()))))),T[f]={nextPos:i,result:l},l)}function ws(){var l,f,y,h,s,o,p,u,d,v,b=i*76+14,w=T[b];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===P?(f=P,i+=2):(f=e,E===0&&N(Cr)),f!==e){if(y=[],h=_(),h!==e)for(;h!==e;)y.push(h),h=_();else y=e;if(y!==e)if(h=Ue(),h!==e){if(s=[],o=_(),o!==e)for(;o!==e;)s.push(o),o=_();else s=e;if(s!==e)if(t.charCodeAt(i)===123?(o=S,i++):(o=e,E===0&&N(fr)),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();for(u=xo(),u===e&&(u=null),d=[],v=_();v!==e;)d.push(v),v=_();t.charCodeAt(i)===125?(v=I,i++):(v=e,E===0&&N(tt)),v!==e?(X=l,l=yl(h,u)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return T[b]={nextPos:i,result:l},l}function Oa(){var l,f,y,h,s,o,p=i*76+15,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,t.substr(i,3)===G?(f=G,i+=3):(f=e,E===0&&N(Jt)),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();if(h=Ue(),h!==e){for(s=[],o=_();o!==e;)s.push(o),o=_();o=Te(),o!==e?(X=l,l=wl(h,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===G?(f=G,i+=3):(f=e,E===0&&N(Jt)),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();h=Te(),h!==e?(X=l,l=ml(h)):(i=l,l=e)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function kr(){var l,f,y,h,s,o,p,u,d,v=i*76+16,b=T[v];if(b)return i=b.nextPos,b.result;if(l=i,t.substr(i,3)===ee?(f=ee,i+=3):(f=e,E===0&&N(zr)),f!==e){if(y=[],h=_(),h!==e)for(;h!==e;)y.push(h),h=_();else y=e;if(y!==e)if(h=Ue(),h!==e){for(s=i,o=[],p=_();p!==e;)o.push(p),p=_();if(t.charCodeAt(i)===58?(p=re,i++):(p=e,E===0&&N(xt)),p!==e){for(u=[],d=_();d!==e;)u.push(d),d=_();d=Gt(),d!==e?s=d:(i=s,s=e)}else i=s,s=e;for(s===e&&(s=null),o=[],p=_();p!==e;)o.push(p),p=_();if(t.charCodeAt(i)===61?(p=ge,i++):(p=e,E===0&&N($t)),p!==e){for(u=[],d=_();d!==e;)u.push(d),d=_();d=De(),d!==e?(X=l,l=xl(h,s,d)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===q?(f=q,i+=3):(f=e,E===0&&N(ps)),f!==e){if(y=[],h=_(),h!==e)for(;h!==e;)y.push(h),h=_();else y=e;if(y!==e)if(h=Ue(),h!==e){for(s=i,o=[],p=_();p!==e;)o.push(p),p=_();if(t.charCodeAt(i)===58?(p=re,i++):(p=e,E===0&&N(xt)),p!==e){for(u=[],d=_();d!==e;)u.push(d),d=_();d=Gt(),d!==e?s=d:(i=s,s=e)}else i=s,s=e;for(s===e&&(s=null),o=[],p=_();p!==e;)o.push(p),p=_();if(t.charCodeAt(i)===61?(p=ge,i++):(p=e,E===0&&N($t)),p!==e){for(u=[],d=_();d!==e;)u.push(d),d=_();d=De(),d!==e?(X=l,l=$l(h,s,d)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return T[v]={nextPos:i,result:l},l}function Na(){var l,f,y,h,s=i*76+17,o=T[s];if(o)return i=o.nextPos,o.result;if(l=i,t.substr(i,2)===U?(f=U,i+=2):(f=e,E===0&&N(Ri)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();h=De(),h!==e?(X=l,l=bl(h)):(i=l,l=e)}else i=l,l=e;return T[s]={nextPos:i,result:l},l}function $o(){var l,f,y,h,s,o,p,u=i*76+18,d=T[u];if(d)return i=d.nextPos,d.result;if(l=i,t.substr(i,2)===L?(f=L,i+=2):(f=e,E===0&&N(Di)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(h=Ue(),h!==e){for(s=i,o=[],p=_();p!==e;)o.push(p),p=_();for(p=Te(),p!==e?s=p:(i=s,s=e),s===e&&(s=null),o=[],p=_();p!==e;)o.push(p),p=_();t.charCodeAt(i)===93?(p=H,i++):(p=e,E===0&&N(Is)),p!==e?(X=l,l=Al(h,s)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return T[u]={nextPos:i,result:l},l}function Ia(){var l,f,y,h,s,o,p,u,d,v,b,w,M,F,D=i*76+19,B=T[D];if(B)return i=B.nextPos,B.result;if(l=i,t.substr(i,4)===W?(f=W,i+=4):(f=e,E===0&&N(vs)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(t.charCodeAt(i)===40?(h=A,i++):(h=e,E===0&&N(_r)),h!==e)if(t.substr(i,3)===ee?(s=ee,i+=3):(s=e,E===0&&N(zr)),s!==e){if(o=[],p=_(),p!==e)for(;p!==e;)o.push(p),p=_();else o=e;if(o!==e)if(p=Ue(),p!==e){for(u=[],d=_();d!==e;)u.push(d),d=_();for(t.charCodeAt(i)===44?(d=V,i++):(d=e,E===0&&N(At)),d===e&&(d=null),v=[],b=_();b!==e;)v.push(b),b=_();if(b=De(),b!==e)if(t.charCodeAt(i)===41?(w=C,i++):(w=e,E===0&&N(Ot)),w!==e){for(M=[],F=_();F!==e;)M.push(F),F=_();F=Ht(),F!==e?(X=l,l=_l(p,b,F)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,4)===W?(f=W,i+=4):(f=e,E===0&&N(vs)),f!==e){if(y=[],h=_(),h!==e)for(;h!==e;)y.push(h),h=_();else y=e;if(y!==e)if(t.substr(i,3)===ee?(h=ee,i+=3):(h=e,E===0&&N(zr)),h!==e){if(s=[],o=_(),o!==e)for(;o!==e;)s.push(o),o=_();else s=e;if(s!==e)if(o=Ue(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(At)),u===e&&(u=null),d=[],v=_();v!==e;)d.push(v),v=_();if(v=De(),v!==e){if(b=[],w=_(),w!==e)for(;w!==e;)b.push(w),w=_();else b=e;b!==e?(w=Ht(),w!==e?(X=l,l=Cl(o,v,w)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return T[D]={nextPos:i,result:l},l}function bo(){var l,f,y,h,s,o,p,u,d,v,b,w,M,F,D,B=i*76+20,Q=T[B];if(Q)return i=Q.nextPos,Q.result;if(l=i,t.substr(i,3)===J?(f=J,i+=3):(f=e,E===0&&N(gt)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(t.charCodeAt(i)===40?(h=A,i++):(h=e,E===0&&N(_r)),h!==e)if(t.substr(i,3)===ee?(s=ee,i+=3):(s=e,E===0&&N(zr)),s!==e){if(o=[],p=_(),p!==e)for(;p!==e;)o.push(p),p=_();else o=e;if(o!==e)if(p=Ue(),p!==e){for(u=[],d=_();d!==e;)u.push(d),d=_();if(d=i,t.charCodeAt(i)===61?(v=ge,i++):(v=e,E===0&&N($t)),v!==e){for(b=[],w=_();w!==e;)b.push(w),w=_();w=De(),w!==e?(X=d,d=kl(p,w)):(i=d,d=e)}else i=d,d=e;for(d===e&&(d=null),t.charCodeAt(i)===44?(v=V,i++):(v=e,E===0&&N(At)),v===e&&(v=null),b=[],w=_();w!==e;)b.push(w),w=_();if(w=De(),w!==e)if(t.charCodeAt(i)===41?(M=C,i++):(M=e,E===0&&N(Ot)),M!==e){for(F=[],D=_();D!==e;)F.push(D),D=_();D=Ht(),D!==e?(X=l,l=Pl(p,d,w,D)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,t.substr(i,3)===J?(f=J,i+=3):(f=e,E===0&&N(gt)),f!==e){if(y=[],h=_(),h!==e)for(;h!==e;)y.push(h),h=_();else y=e;if(y!==e)if(t.substr(i,3)===ee?(h=ee,i+=3):(h=e,E===0&&N(zr)),h!==e){if(s=[],o=_(),o!==e)for(;o!==e;)s.push(o),o=_();else s=e;if(s!==e)if(o=Ue(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();if(u=i,t.charCodeAt(i)===61?(d=ge,i++):(d=e,E===0&&N($t)),d!==e){for(v=[],b=_();b!==e;)v.push(b),b=_();b=De(),b!==e?(X=u,u=El(o,b)):(i=u,u=e)}else i=u,u=e;for(u===e&&(u=null),t.charCodeAt(i)===44?(d=V,i++):(d=e,E===0&&N(At)),d===e&&(d=null),v=[],b=_();b!==e;)v.push(b),b=_();if(b=De(),b!==e){if(w=[],M=_(),M!==e)for(;M!==e;)w.push(M),M=_();else w=e;w!==e?(M=Ht(),M!==e?(X=l,l=Ml(o,u,b,M)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,t.substr(i,3)===J?(f=J,i+=3):(f=e,E===0&&N(gt)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(t.charCodeAt(i)===40?(h=A,i++):(h=e,E===0&&N(_r)),h!==e)if(s=De(),s!==e)if(t.charCodeAt(i)===41?(o=C,i++):(o=e,E===0&&N(Ot)),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();u=Ht(),u!==e?(X=l,l=Sl(s,u)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===J?(f=J,i+=3):(f=e,E===0&&N(gt)),f!==e){if(y=[],h=_(),h!==e)for(;h!==e;)y.push(h),h=_();else y=e;if(y!==e)if(h=De(),h!==e){if(s=[],o=_(),o!==e)for(;o!==e;)s.push(o),o=_();else s=e;s!==e?(o=Ht(),o!==e?(X=l,l=Fl(h,o)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e}}return T[B]={nextPos:i,result:l},l}function Ao(){var l,f,y,h,s,o=i*76+21,p=T[o];if(p)return i=p.nextPos,p.result;if(l=i,t.substr(i,6)===Y?(f=Y,i+=6):(f=e,E===0&&N(Ts)),f!==e)if(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e){for(h=[],s=_();s!==e;)h.push(s),s=_();s=De(),s!==e?(X=l,l=Ol(s)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return T[o]={nextPos:i,result:l},l}function _o(){var l,f,y,h,s,o,p,u,d=i*76+22,v=T[d];if(v)return i=v.nextPos,v.result;if(l=i,t.substr(i,4)===ue?(f=ue,i+=4):(f=e,E===0&&N(dr)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(t.charCodeAt(i)===123?(h=S,i++):(h=e,E===0&&N(fr)),h!==e){for(s=[],o=_();o!==e;)s.push(o),o=_();if(o=ys(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();t.charCodeAt(i)===125?(u=I,i++):(u=e,E===0&&N(tt)),u!==e?(X=l,l=Nl(o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return T[d]={nextPos:i,result:l},l}function Co(){var l,f,y,h,s=i*76+23,o=T[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,5)===de?(f=de,i+=5):(f=e,E===0&&N(Li)),f!==e?(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=Il()):(i=l,l=e)):(i=l,l=e),T[s]={nextPos:i,result:l},l)}function ko(){var l,f,y,h,s=i*76+24,o=T[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,8)===le?(f=le,i+=8):(f=e,E===0&&N(Bi)),f!==e?(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=Tl()):(i=l,l=e)):(i=l,l=e),T[s]={nextPos:i,result:l},l)}function Po(){var l,f,y,h,s,o,p=i*76+25,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,f=De(),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(t.substr(i,2)===Ie?(h=Ie,i+=2):(h=e,E===0&&N(Hi)),h===e&&(t.substr(i,2)===ze?(h=ze,i+=2):(h=e,E===0&&N(Ui)),h===e&&(t.charCodeAt(i)===61?(h=ge,i++):(h=e,E===0&&N($t)))),h!==e){for(s=[],o=_();o!==e;)s.push(o),o=_();o=De(),o!==e?(X=l,l=jl(f,h,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function Eo(){var l,f,y,h,s,o,p,u,d=i*76+26,v=T[d];if(v)return i=v.nextPos,v.result;if(l=i,f=Wr(),f!==e){for(y=[],h=i,s=[],o=Pr();o!==e;)s.push(o),o=Pr();if(o=Ta(),o!==e){for(p=[],u=Pr();u!==e;)p.push(u),u=Pr();u=Wr(),u!==e?(X=h,h=fa(f,o,u)):(i=h,h=e)}else i=h,h=e;if(h!==e)for(;h!==e;){for(y.push(h),h=i,s=[],o=Pr();o!==e;)s.push(o),o=Pr();if(o=Ta(),o!==e){for(p=[],u=Pr();u!==e;)p.push(u),u=Pr();u=Wr(),u!==e?(X=h,h=fa(f,o,u)):(i=h,h=e)}else i=h,h=e}else y=e;y!==e?(X=l,l=Rl(f,y)):(i=l,l=e)}else i=l,l=e;return T[d]={nextPos:i,result:l},l}function Pr(){var l,f,y,h=i*76+27,s=T[h];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===92?(f=mt,i++):(f=e,E===0&&N(Yn)),f!==e?(y=qe(),y!==e?(f=[f,y],l=f):(i=l,l=e)):(i=l,l=e),l===e&&(l=Ae()),T[h]={nextPos:i,result:l},l)}function Ta(){var l,f,y=i*76+28,h=T[y];return h?(i=h.nextPos,h.result):(l=i,t.substr(i,2)===Ke?(f=Ke,i+=2):(f=e,E===0&&N(ea)),f===e&&(t.substr(i,2)===ft?(f=ft,i+=2):(f=e,E===0&&N(qi)),f===e&&(t.substr(i,2)===je?(f=je,i+=2):(f=e,E===0&&N(zi)),f===e&&(t.substr(i,2)===ut?(f=ut,i+=2):(f=e,E===0&&N(Vi)),f===e&&(t.substr(i,2)===jt?(f=jt,i+=2):(f=e,E===0&&N(Wi)),f===e&&(t.substr(i,2)===Rt?(f=Rt,i+=2):(f=e,E===0&&N(Ki)),f===e&&(t.charCodeAt(i)===60?(f=Ye,i++):(f=e,E===0&&N(ta)),f===e&&(t.charCodeAt(i)===62?(f=Br,i++):(f=e,E===0&&N($n)),f===e&&(t.charCodeAt(i)===43?(f=Wt,i++):(f=e,E===0&&N(ra)),f===e&&(t.charCodeAt(i)===45?(f=Ar,i++):(f=e,E===0&&N(Ji)),f===e&&(t.charCodeAt(i)===42?(f=Ft,i++):(f=e,E===0&&N(sa)),f===e&&(t.charCodeAt(i)===94?(f=br,i++):(f=e,E===0&&N(na)),f===e&&(t.charCodeAt(i)===47?(f=Hr,i++):(f=e,E===0&&N(Xi)),f===e&&(t.charCodeAt(i)===37?(f=Or,i++):(f=e,E===0&&N(Gi))))))))))))))),f!==e&&(X=l,f=ca()),l=f,T[y]={nextPos:i,result:l},l)}function Mo(){var l,f,y,h=i*76+29,s=T[h];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===33?(f=Rr,i++):(f=e,E===0&&N(Zi)),f!==e?(y=De(),y!==e?(X=l,l=Dl(y)):(i=l,l=e)):(i=l,l=e),T[h]={nextPos:i,result:l},l)}function Er(){var l,f,y,h,s=i*76+30,o=T[s];if(o)return i=o.nextPos,o.result;if(l=i,f=Kr(),f!==e){if(y=[],h=Mn(),h===e&&(h=ja(),h===e&&(h=Sn())),h!==e)for(;h!==e;)y.push(h),h=Mn(),h===e&&(h=ja(),h===e&&(h=Sn()));else y=e;y!==e?(X=l,l=Ll(f,y)):(i=l,l=e)}else i=l,l=e;return T[s]={nextPos:i,result:l},l}function Mn(){var l,f,y,h,s,o,p=i*76+31,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===40?(f=A,i++):(f=e,E===0&&N(_r)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();for(h=So(),h===e&&(h=null),s=[],o=_();o!==e;)s.push(o),o=_();t.charCodeAt(i)===41?(o=C,i++):(o=e,E===0&&N(Ot)),o!==e?(X=l,l=Bl(h)):(i=l,l=e)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function So(){var l,f,y,h,s,o,p=i*76+32,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,f=De(),f!==e){for(y=[],h=i,s=Jr(),s!==e?(o=De(),o!==e?(X=h,h=ha(f,o)):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=Jr(),s!==e?(o=De(),o!==e?(X=h,h=ha(f,o)):(i=h,h=e)):(i=h,h=e);X=l,l=Hl(f,y)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function ja(){var l,f,y,h,s,o,p=i*76+33,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===91?(f=Dt,i++):(f=e,E===0&&N(bn)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(h=De(),h!==e){for(s=[],o=_();o!==e;)s.push(o),o=_();t.charCodeAt(i)===93?(o=H,i++):(o=e,E===0&&N(Is)),o!==e?(X=l,l=pa(h)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function Sn(){var l,f,y,h=i*76+34,s=T[h];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===46?(f=z,i++):(f=e,E===0&&N(gs)),f!==e?(y=Ue(),y!==e?(X=l,l=Ul(y)):(i=l,l=e)):(i=l,l=e),T[h]={nextPos:i,result:l},l)}function Fo(){var l,f,y,h,s,o,p,u,d,v,b=i*76+35,w=T[b];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===Z?(f=Z,i+=2):(f=e,E===0&&N(An)),f!==e){if(y=[],h=_(),h!==e)for(;h!==e;)y.push(h),h=_();else y=e;if(y!==e)if(h=De(),h!==e){if(s=[],o=_(),o!==e)for(;o!==e;)s.push(o),o=_();else s=e;if(s!==e)if(o=Ht(),o!==e){if(p=i,u=[],d=_(),d!==e)for(;d!==e;)u.push(d),d=_();else u=e;if(u!==e?(d=Ra(),d!==e?p=d:(i=p,p=e)):(i=p,p=e),p===e&&(p=null),u=i,d=[],v=_(),v!==e)for(;v!==e;)d.push(v),v=_();else d=e;d!==e?(v=Oo(),v!==e?u=v:(i=u,u=e)):(i=u,u=e),u===e&&(u=null),X=l,l=ql(h,o,p,u)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return T[b]={nextPos:i,result:l},l}function Ra(){var l,f,y,h,s,o,p=i*76+36,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Gs(),f!==e){for(y=[],h=i,s=[],o=_();o!==e;)s.push(o),o=_();for(o=Gs(),o!==e?h=o:(i=h,h=e);h!==e;){for(y.push(h),h=i,s=[],o=_();o!==e;)s.push(o),o=_();o=Gs(),o!==e?h=o:(i=h,h=e)}X=l,l=zl(f,y)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function Gs(){var l,f,y,h,s,o,p,u=i*76+37,d=T[u];if(d)return i=d.nextPos,d.result;if(l=i,t.substr(i,4)===se?(f=se,i+=4):(f=e,E===0&&N(Qi)),f!==e)if(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e){for(h=[],s=_();s!==e;)h.push(s),s=_();if(s=De(),s!==e){for(o=[],p=_();p!==e;)o.push(p),p=_();p=Ht(),p!==e?(X=l,l=Vl(s,p)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e;return T[u]={nextPos:i,result:l},l}function Oo(){var l,f,y,h,s,o=i*76+38,p=T[o];if(p)return i=p.nextPos,p.result;if(l=i,t.substr(i,4)===ve?(f=ve,i+=4):(f=e,E===0&&N(Yi)),f!==e)if(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e){for(h=[],s=_();s!==e;)h.push(s),s=_();s=Ht(),s!==e?(X=l,l=Wl(s)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return T[o]={nextPos:i,result:l},l}function No(){var l,f,y,h,s,o,p,u,d,v,b,w,M,F,D,B,Q,xe=i*76+39,ne=T[xe];if(ne)return i=ne.nextPos,ne.result;if(l=i,t.substr(i,5)===ye?(f=ye,i+=5):(f=e,E===0&&N(el)),f!==e)if(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e){for(h=[],s=_();s!==e;)h.push(s),s=_();if(s=De(),s!==e){for(o=[],p=_();p!==e;)o.push(p),p=_();if(t.charCodeAt(i)===123?(p=S,i++):(p=e,E===0&&N(fr)),p!==e){for(u=[],d=_();d!==e;)u.push(d),d=_();if(d=[],v=i,b=De(),b!==e){for(w=[],M=_();M!==e;)w.push(M),M=_();if(t.substr(i,2)===oe?(M=oe,i+=2):(M=e,E===0&&N(js)),M!==e){for(F=[],D=_();D!==e;)F.push(D),D=_();if(D=Ht(),D!==e){for(B=[],Q=_();Q!==e;)B.push(Q),Q=_();X=v,v=va(s,b,D)}else i=v,v=e}else i=v,v=e}else i=v,v=e;if(v!==e)for(;v!==e;)if(d.push(v),v=i,b=De(),b!==e){for(w=[],M=_();M!==e;)w.push(M),M=_();if(t.substr(i,2)===oe?(M=oe,i+=2):(M=e,E===0&&N(js)),M!==e){for(F=[],D=_();D!==e;)F.push(D),D=_();if(D=Ht(),D!==e){for(B=[],Q=_();Q!==e;)B.push(Q),Q=_();X=v,v=va(s,b,D)}else i=v,v=e}else i=v,v=e}else i=v,v=e;else d=e;if(d!==e){if(v=i,t.charCodeAt(i)===42?(b=Ft,i++):(b=e,E===0&&N(sa)),b!==e){for(w=[],M=_();M!==e;)w.push(M),M=_();if(t.substr(i,2)===oe?(M=oe,i+=2):(M=e,E===0&&N(js)),M!==e){for(F=[],D=_();D!==e;)F.push(D),D=_();if(D=Ht(),D!==e){for(B=[],Q=_();Q!==e;)B.push(Q),Q=_();v=D}else i=v,v=e}else i=v,v=e}else i=v,v=e;for(v===e&&(v=null),b=[],w=_();w!==e;)b.push(w),w=_();t.charCodeAt(i)===125?(w=I,i++):(w=e,E===0&&N(tt)),w!==e?(X=l,l=Kl(s,d,v)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e;else i=l,l=e;return T[xe]={nextPos:i,result:l},l}function Fn(){var l,f,y,h,s,o,p,u,d=i*76+40,v=T[d];if(v)return i=v.nextPos,v.result;if(l=i,t.substr(i,4)===Ne?(f=Ne,i+=4):(f=e,E===0&&N(Rs)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(t.charCodeAt(i)===123?(h=S,i++):(h=e,E===0&&N(fr)),h!==e){for(s=[],o=_();o!==e;)s.push(o),o=_();if(o=ys(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();t.charCodeAt(i)===125?(u=I,i++):(u=e,E===0&&N(tt)),u!==e?(X=l,l=ga(o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return T[d]={nextPos:i,result:l},l}function Io(){var l,f,y=i*76+41,h=T[y];return h?(i=h.nextPos,h.result):(l=i,f=Ho(),f!==e&&(X=l,f=Jl(f)),l=f,T[y]={nextPos:i,result:l},l)}function Da(){var l,f,y,h,s,o,p=i*76+42,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===96?(f=me,i++):(f=e,E===0&&N(Ds)),f!==e){for(y=[],h=i,s=i,E++,t.charCodeAt(i)===96?(o=me,i++):(o=e,E===0&&N(Ds)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=La(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,t.charCodeAt(i)===96?(o=me,i++):(o=e,E===0&&N(Ds)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=La(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);t.charCodeAt(i)===96?(h=me,i++):(h=e,E===0&&N(Ds)),h!==e?(X=l,l=Xl(y)):(i=l,l=e)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function La(){var l,f,y,h,s,o,p=i*76+43,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===123?(f=S,i++):(f=e,E===0&&N(fr)),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();if(h=De(),h!==e){for(s=[],o=Ae();o!==e;)s.push(o),o=Ae();t.charCodeAt(i)===125?(o=I,i++):(o=e,E===0&&N(tt)),o!==e?l=h:(i=l,l=e)}else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,f=[],y=Ba(),y!==e)for(;y!==e;)f.push(y),y=Ba();else f=e;f!==e&&(X=l,f=Gl(f)),l=f}return T[p]={nextPos:i,result:l},l}function Ba(){var l,f=i*76+44,y=T[f];return y?(i=y.nextPos,y.result):(l=Ha(),l===e&&(sr.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,E===0&&N(tl))),T[f]={nextPos:i,result:l},l)}function Ha(){var l,f,y,h=i*76+45,s=T[h];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===92?(f=mt,i++):(f=e,E===0&&N(Yn)),f!==e?(Ns.test(t.charAt(i))?(y=t.charAt(i),i++):(y=e,E===0&&N(Ls)),y!==e?l=y:(i=l,l=e)):(i=l,l=e),T[h]={nextPos:i,result:l},l)}function Zs(){var l,f,y,h,s,o,p=i*76+46,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===34?(f=$e,i++):(f=e,E===0&&N(Bs)),f!==e){for(y=[],h=i,s=i,E++,t.charCodeAt(i)===34?(o=$e,i++):(o=e,E===0&&N(Bs)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=On(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(or))),o!==e?(X=h,h=da(o)):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,t.charCodeAt(i)===34?(o=$e,i++):(o=e,E===0&&N(Bs)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=On(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(or))),o!==e?(X=h,h=da(o)):(i=h,h=e)):(i=h,h=e);t.charCodeAt(i)===34?(h=$e,i++):(h=e,E===0&&N(Bs)),h!==e?(X=l,l=Zl(y)):(i=l,l=e)}else i=l,l=e;if(l===e)if(l=i,t.charCodeAt(i)===39?(f=he,i++):(f=e,E===0&&N(Hs)),f!==e){for(y=[],h=i,s=i,E++,t.charCodeAt(i)===39?(o=he,i++):(o=e,E===0&&N(Hs)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Nn(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(or))),o!==e?(X=h,h=ya(o)):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,t.charCodeAt(i)===39?(o=he,i++):(o=e,E===0&&N(Hs)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Nn(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(or))),o!==e?(X=h,h=ya(o)):(i=h,h=e)):(i=h,h=e);t.charCodeAt(i)===39?(h=he,i++):(h=e,E===0&&N(Hs)),h!==e?(X=l,l=wa(y)):(i=l,l=e)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function On(){var l,f,y=i*76+47,h=T[y];return h?(i=h.nextPos,h.result):(l=i,t.substr(i,2)===Le?(f=Le,i+=2):(f=e,E===0&&N(Us)),f!==e&&(X=l,f=Ql()),l=f,T[y]={nextPos:i,result:l},l)}function Nn(){var l,f,y=i*76+48,h=T[y];return h?(i=h.nextPos,h.result):(l=i,t.substr(i,2)===Re?(f=Re,i+=2):(f=e,E===0&&N(qs)),f!==e&&(X=l,f=ma()),l=f,T[y]={nextPos:i,result:l},l)}function Ua(){var l,f=i*76+49,y=T[f];return y?(i=y.nextPos,y.result):(l=In(),l===e&&(l=qa()),T[f]={nextPos:i,result:l},l)}function In(){var l,f,y,h,s,o,p=i*76+50,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,rs.test(t.charAt(i))?(t.charAt(i),i++):E===0&&N(zs),Lt.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(aa)),f!==e){if(y=[],vt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(Nt)),h!==e)for(;h!==e;)y.push(h),vt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(Nt));else y=e;if(y!==e)if(t.charCodeAt(i)===46?(h=z,i++):(h=e,E===0&&N(gs)),h!==e){if(s=[],vt.test(t.charAt(i))?(o=t.charAt(i),i++):(o=e,E===0&&N(Nt)),o!==e)for(;o!==e;)s.push(o),vt.test(t.charAt(i))?(o=t.charAt(i),i++):(o=e,E===0&&N(Nt));else s=e;s!==e?(X=l,l=Yl()):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,rs.test(t.charAt(i))?(t.charAt(i),i++):E===0&&N(zs),vt.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(Nt)),f!==e)if(t.charCodeAt(i)===46?(y=z,i++):(y=e,E===0&&N(gs)),y!==e){if(h=[],vt.test(t.charAt(i))?(s=t.charAt(i),i++):(s=e,E===0&&N(Nt)),s!==e)for(;s!==e;)h.push(s),vt.test(t.charAt(i))?(s=t.charAt(i),i++):(s=e,E===0&&N(Nt));else h=e;h!==e?(X=l,l=eo()):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return T[p]={nextPos:i,result:l},l}function qa(){var l,f,y,h,s=i*76+51,o=T[s];if(o)return i=o.nextPos,o.result;if(l=i,rs.test(t.charAt(i))?(t.charAt(i),i++):E===0&&N(zs),Lt.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(aa)),f!==e){if(y=[],vt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(Nt)),h!==e)for(;h!==e;)y.push(h),vt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(Nt));else y=e;y!==e?(X=l,l=to()):(i=l,l=e)}else i=l,l=e;return l===e&&(l=i,rs.test(t.charAt(i))?(t.charAt(i),i++):E===0&&N(zs),vt.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(Nt)),f!==e?(X=l,l=ro()):(i=l,l=e)),T[s]={nextPos:i,result:l},l}function Tn(){var l,f=i*76+52,y=T[f];return y?(i=y.nextPos,y.result):(l=za(),l===e&&(l=To()),T[f]={nextPos:i,result:l},l)}function za(){var l,f,y,h,s=i*76+53,o=T[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,4)===He?(f=He,i+=4):(f=e,E===0&&N(ia)),f!==e?(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=so()):(i=l,l=e)):(i=l,l=e),T[s]={nextPos:i,result:l},l)}function To(){var l,f,y,h,s=i*76+54,o=T[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,5)===We?(f=We,i+=5):(f=e,E===0&&N(cr)),f!==e?(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=no()):(i=l,l=e)):(i=l,l=e),T[s]={nextPos:i,result:l},l)}function Va(){var l,f,y,h,s=i*76+55,o=T[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,4)===Ze?(f=Ze,i+=4):(f=e,E===0&&N(rl)),f!==e?(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=ao()):(i=l,l=e)):(i=l,l=e),T[s]={nextPos:i,result:l},l)}function Wa(){var l,f,y,h,s,o,p,u,d,v,b,w,M,F,D=i*76+56,B=T[D];if(B)return i=B.nextPos,B.result;if(l=i,t.charCodeAt(i)===123?(f=S,i++):(f=e,E===0&&N(fr)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(h=[],s=i,o=Ue(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();if(t.charCodeAt(i)===58?(u=re,i++):(u=e,E===0&&N(xt)),u!==e){if(d=[],v=_(),v!==e)for(;v!==e;)d.push(v),v=_();else d=e;if(d!==e)if(v=De(),v!==e){for(b=[],w=_();w!==e;)b.push(w),w=_();for(t.charCodeAt(i)===44?(w=V,i++):(w=e,E===0&&N(At)),w===e&&(t.charCodeAt(i)===59?(w=at,i++):(w=e,E===0&&N(Vs))),w===e&&(w=null),M=[],F=_();F!==e;)M.push(F),F=_();X=s,s=xa(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;for(;s!==e;)if(h.push(s),s=i,o=Ue(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();if(t.charCodeAt(i)===58?(u=re,i++):(u=e,E===0&&N(xt)),u!==e){if(d=[],v=_(),v!==e)for(;v!==e;)d.push(v),v=_();else d=e;if(d!==e)if(v=De(),v!==e){for(b=[],w=_();w!==e;)b.push(w),w=_();for(t.charCodeAt(i)===44?(w=V,i++):(w=e,E===0&&N(At)),w===e&&(t.charCodeAt(i)===59?(w=at,i++):(w=e,E===0&&N(Vs))),w===e&&(w=null),M=[],F=_();F!==e;)M.push(F),F=_();X=s,s=xa(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;t.charCodeAt(i)===125?(s=I,i++):(s=e,E===0&&N(tt)),s!==e?(X=l,l=io(h)):(i=l,l=e)}else i=l,l=e;return T[D]={nextPos:i,result:l},l}function jo(){var l,f,y,h,s,o,p,u,d,v,b=i*76+57,w=T[b];if(w)return i=w.nextPos,w.result;if(l=i,t.charCodeAt(i)===91?(f=Dt,i++):(f=e,E===0&&N(bn)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(h=[],s=i,o=De(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(At)),u===e&&(u=null),d=[],v=_();v!==e;)d.push(v),v=_();X=s,s=$a(o)}else i=s,s=e;for(;s!==e;)if(h.push(s),s=i,o=De(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(At)),u===e&&(u=null),d=[],v=_();v!==e;)d.push(v),v=_();X=s,s=$a(o)}else i=s,s=e;for(s=[],o=_();o!==e;)s.push(o),o=_();t.charCodeAt(i)===93?(o=H,i++):(o=e,E===0&&N(Is)),o!==e?(X=l,l=ba(h)):(i=l,l=e)}else i=l,l=e;return T[b]={nextPos:i,result:l},l}function jn(){var l,f,y,h,s,o,p,u=i*76+58,d=T[u];if(d)return i=d.nextPos,d.result;if(l=i,f=Ue(),f!==e){for(y=i,h=[],s=_();s!==e;)h.push(s),s=_();if(t.charCodeAt(i)===58?(s=re,i++):(s=e,E===0&&N(xt)),s!==e){for(o=[],p=_();p!==e;)o.push(p),p=_();p=Gt(),p!==e?y=p:(i=y,y=e)}else i=y,y=e;y===e&&(y=null),X=l,l=lo(f,y)}else i=l,l=e;return T[u]={nextPos:i,result:l},l}function Rn(){var l,f,y,h,s,o,p=i*76+59,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,f=jn(),f!==e){for(y=[],h=i,s=Jr(),s!==e?(o=jn(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=Jr(),s!==e?(o=jn(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);X=l,l=Aa(f,y)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function Ka(){var l,f,y,h,s,o,p,u,d,v,b,w,M,F,D,B,Q,xe=i*76+60,ne=T[xe];if(ne)return i=ne.nextPos,ne.result;if(l=i,t.charCodeAt(i)===64?(f=it,i++):(f=e,E===0&&N(sl)),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();if(h=Ue(),h!==e){for(s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(t.charCodeAt(i)===40?(o=A,i++):(o=e,E===0&&N(_r)),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();for(u=Rn(),u===e&&(u=null),d=[],v=_();v!==e;)d.push(v),v=_();if(t.charCodeAt(i)===41?(v=C,i++):(v=e,E===0&&N(Ot)),v!==e){for(b=i,w=[],M=_();M!==e;)w.push(M),M=_();if(t.charCodeAt(i)===58?(M=re,i++):(M=e,E===0&&N(xt)),M!==e){for(F=[],D=_();D!==e;)F.push(D),D=_();D=Gt(),D!==e?b=D:(i=b,b=e)}else i=b,b=e;for(b===e&&(b=null),w=[],M=_();M!==e;)w.push(M),M=_();if(t.charCodeAt(i)===123?(M=S,i++):(M=e,E===0&&N(fr)),M!==e){for(F=[],D=_();D!==e;)F.push(D),D=_();for(D=ys(),D===e&&(D=null),B=[],Q=_();Q!==e;)B.push(Q),Q=_();t.charCodeAt(i)===125?(Q=I,i++):(Q=e,E===0&&N(tt)),Q!==e?(X=l,l=oo(y,h,s,u,b,D)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e;return T[xe]={nextPos:i,result:l},l}function Ro(){var l,f,y,h,s,o,p,u,d,v,b,w,M,F=i*76+61,D=T[F];if(D)return i=D.nextPos,D.result;if(l=i,t.substr(i,2)===bt?(f=bt,i+=2):(f=e,E===0&&N(ds)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();for(h=Rn(),h===e&&(h=null),s=[],o=_();o!==e;)s.push(o),o=_();if(t.charCodeAt(i)===41?(o=C,i++):(o=e,E===0&&N(Ot)),o!==e){for(p=i,u=[],d=_();d!==e;)u.push(d),d=_();if(t.charCodeAt(i)===58?(d=re,i++):(d=e,E===0&&N(xt)),d!==e){for(v=[],b=_();b!==e;)v.push(b),b=_();b=Gt(),b!==e?p=b:(i=p,p=e)}else i=p,p=e;for(p===e&&(p=null),u=[],d=_();d!==e;)u.push(d),d=_();if(t.charCodeAt(i)===123?(d=S,i++):(d=e,E===0&&N(fr)),d!==e){for(v=[],b=_();b!==e;)v.push(b),b=_();for(b=ys(),b===e&&(b=null),w=[],M=_();M!==e;)w.push(M),M=_();t.charCodeAt(i)===125?(M=I,i++):(M=e,E===0&&N(tt)),M!==e?(X=l,l=uo(h,p,b)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return T[F]={nextPos:i,result:l},l}function Dn(){var l,f,y,h,s,o,p,u,d,v,b=i*76+62,w=T[b];if(w)return i=w.nextPos,w.result;if(l=i,t.charCodeAt(i)===91?(f=Dt,i++):(f=e,E===0&&N(bn)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(h=[],s=i,o=Te(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(At)),u===e&&(u=null),d=[],v=_();v!==e;)d.push(v),v=_();X=s,s=_a(o)}else i=s,s=e;for(;s!==e;)if(h.push(s),s=i,o=Te(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(At)),u===e&&(u=null),d=[],v=_();v!==e;)d.push(v),v=_();X=s,s=_a(o)}else i=s,s=e;for(s=[],o=_();o!==e;)s.push(o),o=_();t.charCodeAt(i)===93?(o=H,i++):(o=e,E===0&&N(Is)),o!==e?(X=l,l=fo(h)):(i=l,l=e)}else i=l,l=e;return T[b]={nextPos:i,result:l},l}function Ja(){var l,f,y,h,s,o,p,u,d,v,b,w,M,F,D=i*76+63,B=T[D];if(B)return i=B.nextPos,B.result;if(l=i,t.charCodeAt(i)===123?(f=S,i++):(f=e,E===0&&N(fr)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(h=[],s=i,o=Ue(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();if(t.charCodeAt(i)===58?(u=re,i++):(u=e,E===0&&N(xt)),u!==e){if(d=[],v=_(),v!==e)for(;v!==e;)d.push(v),v=_();else d=e;if(d!==e)if(v=Te(),v!==e){for(b=[],w=_();w!==e;)b.push(w),w=_();for(t.charCodeAt(i)===44?(w=V,i++):(w=e,E===0&&N(At)),w===e&&(t.charCodeAt(i)===59?(w=at,i++):(w=e,E===0&&N(Vs))),w===e&&(w=null),M=[],F=_();F!==e;)M.push(F),F=_();X=s,s=Ca(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;for(;s!==e;)if(h.push(s),s=i,o=Ue(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();if(t.charCodeAt(i)===58?(u=re,i++):(u=e,E===0&&N(xt)),u!==e){if(d=[],v=_(),v!==e)for(;v!==e;)d.push(v),v=_();else d=e;if(d!==e)if(v=Te(),v!==e){for(b=[],w=_();w!==e;)b.push(w),w=_();for(t.charCodeAt(i)===44?(w=V,i++):(w=e,E===0&&N(At)),w===e&&(t.charCodeAt(i)===59?(w=at,i++):(w=e,E===0&&N(Vs))),w===e&&(w=null),M=[],F=_();F!==e;)M.push(F),F=_();X=s,s=Ca(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;t.charCodeAt(i)===125?(s=I,i++):(s=e,E===0&&N(tt)),s!==e?(X=l,l=ka(h)):(i=l,l=e)}else i=l,l=e;return T[D]={nextPos:i,result:l},l}function Gt(){var l,f=i*76+64,y=T[f];return y?(i=y.nextPos,y.result):(l=Do(),l===e&&(l=Bo()),T[f]={nextPos:i,result:l},l)}function Do(){var l,f,y,h,s,o,p,u,d,v,b=i*76+65,w=T[b];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===bt?(f=bt,i+=2):(f=e,E===0&&N(ds)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();for(h=Lo(),h===e&&(h=null),s=[],o=_();o!==e;)s.push(o),o=_();if(t.charCodeAt(i)===41?(o=C,i++):(o=e,E===0&&N(Ot)),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();if(t.substr(i,2)===oe?(u=oe,i+=2):(u=e,E===0&&N(js)),u!==e){for(d=[],v=_();v!==e;)d.push(v),v=_();v=Gt(),v!==e?(X=l,l=co(h,v)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return T[b]={nextPos:i,result:l},l}function Lo(){var l,f,y,h,s,o,p=i*76+66,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Gt(),f!==e){for(y=[],h=i,s=Jr(),s!==e?(o=Gt(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=Jr(),s!==e?(o=Gt(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);X=l,l=Pa(f,y)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function Bo(){var l,f,y,h,s,o,p,u,d=i*76+67,v=T[d];if(v)return i=v.nextPos,v.result;if(l=i,f=Ue(),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();if(t.charCodeAt(i)===60?(h=Ye,i++):(h=e,E===0&&N(ta)),h!==e){for(s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=Gt(),o!==e){for(p=[],u=Ae();u!==e;)p.push(u),u=Ae();t.charCodeAt(i)===62?(u=Br,i++):(u=e,E===0&&N($n)),u!==e?(X=l,l=ho(f,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return l===e&&(l=i,f=Ue(),f!==e&&(X=l,f=po(f)),l=f),T[d]={nextPos:i,result:l},l}function Ue(){var l,f,y,h,s=i*76+68,o=T[s];if(o)return i=o.nextPos,o.result;if(l=i,qt.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(nl)),f!==e){for(y=[],Zn.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(_n));h!==e;)y.push(h),Zn.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(_n));X=l,l=vo()}else i=l,l=e;return T[s]={nextPos:i,result:l},l}function Ho(){var l,f,y,h,s,o,p=i*76+69,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Ue(),f!==e){for(y=[],h=i,t.charCodeAt(i)===58?(s=re,i++):(s=e,E===0&&N(xt)),s!==e?(o=Ue(),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,t.charCodeAt(i)===58?(s=re,i++):(s=e,E===0&&N(xt)),s!==e?(o=Ue(),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);X=l,l=go()}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function Jr(){var l,f,y,h,s,o=i*76+70,p=T[o];if(p)return i=p.nextPos,p.result;for(l=i,f=[],y=_();y!==e;)f.push(y),y=_();if(t.charCodeAt(i)===44?(y=V,i++):(y=e,E===0&&N(At)),y!==e){for(h=[],s=_();s!==e;)h.push(s),s=_();f=[f,y,h],l=f}else i=l,l=e;if(l===e)if(l=[],f=_(),f!==e)for(;f!==e;)l.push(f),f=_();else l=e;return T[o]={nextPos:i,result:l},l}function Ht(){var l,f,y,h,s,o,p=i*76+71,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===123?(f=S,i++):(f=e,E===0&&N(fr)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();for(h=ys(),h===e&&(h=null),s=[],o=_();o!==e;)s.push(o),o=_();t.charCodeAt(i)===125?(o=I,i++):(o=e,E===0&&N(tt)),o!==e?(X=l,l=yo(h)):(i=l,l=e)}else i=l,l=e;return l===e&&(l=yr()),T[p]={nextPos:i,result:l},l}function qe(){var l,f=i*76+72,y=T[f];return y?(i=y.nextPos,y.result):(t.substr(i,2)===Kt?(l=Kt,i+=2):(l=e,E===0&&N(al)),l===e&&(Qn.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,E===0&&N(la))),T[f]={nextPos:i,result:l},l)}function Xa(){var l,f,y=i*76+73,h=T[y];return h?(i=h.nextPos,h.result):(l=i,E++,t.length>i?(f=t.charAt(i),i++):(f=e,E===0&&N(or)),E--,f===e?l=void 0:(i=l,l=e),l===e&&(l=qe()),T[y]={nextPos:i,result:l},l)}function _(){var l,f=i*76+74,y=T[f];return y?(i=y.nextPos,y.result):(Ii.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,E===0&&N(il)),T[f]={nextPos:i,result:l},l)}function Ae(){var l,f=i*76+75,y=T[f];return y?(i=y.nextPos,y.result):(Ti.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,E===0&&N(ll)),T[f]={nextPos:i,result:l},l)}function ie(l,f,y){const h={type:l};f.children=y;for(const o of Object.keys(f))f[o]!==void 0&&(h[o]=f[o]);const s=R();return h.loc={start:s.start.offset,end:s.end.offset-1},h}if(Vr=g(),Vr!==e&&i===t.length)return Vr;throw Vr!==e&&i`}else return t.name;case"fnTypeSource":{const r=t.args.map(n=>qf(n)).join(", "),e=qf(t.result);return`@(${r}) { ${e} }`}}}function Uu(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return Kv(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=Uu(t.inner):r=Kv("any"),v1(t.name,[r])}}throw new vu(`Unknown type: '${qf(t)}'`)}else{const r=t.args.map(e=>Uu(e));return g1(r,Uu(t.result))}}function d1(t){switch(t.type){case"def":{t.varType!=null&&Uu(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&Uu(r.argType);t.retType!=null&&Uu(t.retType);break}}return t}function y1(t){for(const r of t)lt(r,d1);return t}function zf(t){const r=[],e=[];for(const n of t)if(n.type==="attr")e.push(n);else if(n.type==="def")n.attr==null&&(n.attr=[]),n.attr.push(...e),e.splice(0,e.length),n.expr.type==="fn"&&(n.expr.children=zf(n.expr.children)),r.push(n);else{if(e.length>0)throw new vu("invalid attribute.");switch(n.type){case"fn":{n.children=zf(n.children);break}case"block":{n.statements=zf(n.statements);break}}r.push(n)}if(e.length>0)throw new vu("invalid attribute.");return r}function w1(t){if(o1(t)&&Sd(t)&&t.chain!=null){const{chain:r,...e}=t;let n=e;for(const c of r)switch(c.type){case"callChain":{n=u1(n,c.args,c.loc);break}case"indexChain":{n=f1(n,c.index,c.loc);break}case"propChain":{n=c1(n,c.name,c.loc);break}}return n}return t}function m1(t){for(let r=0;r":{func:"Core:gt",priority:4},"<=":{func:"Core:lteq",priority:4},">=":{func:"Core:gteq",priority:4},"&&":{mapFn:t=>({type:"and",left:Qo(t.left),right:Qo(t.right)}),priority:3},"||":{mapFn:t=>({type:"or",left:Qo(t.left),right:Qo(t.right)}),priority:3}};function $1(t){const r=t.operators.map(n=>{const c=x1[n];if(c==null)throw new vu(`No such operator: ${n}.`);return c});let e=Vf(t.operands[0],t.operands[1],r[0]);for(let n=0;ne.type==="infix"?$1(e):e);return t}var ei;let A1=(ei=class{constructor(){be(this,"plugins");this.plugins={validate:[p1,y1],transform:[zf,m1,b1]}}static parse(r){return ei.instance==null&&(ei.instance=new ei),ei.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;try{const n=Wv(r,{startRule:"Preprocess"});e=Wv(n,{startRule:"Main"})}catch(n){throw n.location?n.expected?new vu(`Parsing error. (Line ${n.location.start.line}:${n.location.start.column})`):new vu(`${n.message} (Line ${n.location.start.line}:${n.location.start.column})`):n}for(const n of this.plugins.validate)e=n(e);for(const n of this.plugins.transform)e=n(e);return e}},be(ei,"instance"),ei);const Jv="0.15.0",_1={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { + <: if (i % 15 == 0) "FizzBuzz" + elif (i % 3 == 0) "Fizz" + elif (i % 5 == 0) "Buzz" + else i + }`},C1=t=>(vf("data-v-2f3e9383"),t=t(),gf(),t),k1={id:"root"},P1={id:"grid1"},E1={class:"type"},M1={id:"grid2"},S1=C1(()=>Mt("header",null,null,-1)),F1=si({__name:"index",setup(t){const r=wr(window.localStorage.getItem(Jv)??'<: "Hello, AiScript!"'),e=wr(null),n=wr([]),c=wr(null);ri(r,()=>{window.localStorage.setItem(Jv,r.value);try{e.value=A1.parse(r.value),c.value=null}catch(x){const m=x;c.value=m.message,console.error("info"in m?m.info:m);return}},{immediate:!0});let g=null;const $=async()=>{n.value=[],g==null||g.abort(),g=new Fs({},{in:x=>new Promise(m=>{const A=window.prompt(x);m(A??"")}),out:x=>{n.value.push({id:Math.random(),type:x.type,text:Mh(x,!0),print:!0})},log:(x,m)=>{switch(x){case"end":n.value.push({id:Math.random(),text:Mh(m.val,!0),print:!1});break}}});try{await g.exec(e.value)}catch(x){console.error(x),window.alert("{e}")}};return(x,m)=>(wt(),Ut("div",k1,[Mt("div",P1,[nt(yf,{modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=A=>r.value=A),samples:Mi(_1),parseError:c.value,onRun:$},null,8,["modelValue","samples","parseError"]),nt(Fr,{id:"logs"},{header:ot(()=>[It("Output")]),default:ot(()=>[(wt(!0),Ut(Ir,null,fu(n.value,A=>(wt(),Ut("div",{class:Tr(["log",[{print:A.print},A.type]]),key:A.id},[Mt("span",E1,Dr(A.type),1),It(" "+Dr(A.text),1)],2))),128))]),_:1})]),Mt("div",M1,[nt(Fr,{id:"ast"},{header:ot(()=>[It("AST")]),default:ot(()=>[Mt("pre",null,Dr(JSON.stringify(e.value,null," ")),1)]),_:1}),nt(Fr,{id:"bin"},{header:ot(()=>[It("Bytecode")]),default:ot(()=>[S1]),_:1}),nt(Fr,{id:"debugger"},{header:ot(()=>[It("Debugger")]),_:1})])]))}});const O1=ai(F1,[["__scopeId","data-v-2f3e9383"]]);class _c extends Error{constructor(e,n){super(e);be(this,"info");this.info=n,Error.captureStackTrace&&Error.captureStackTrace(this,_c)}}class gu extends _c{constructor(r,e){super(r,e)}}class lr extends _c{constructor(r,e){super(r,e)}}class N1 extends lr{constructor(r,e){super(r,e)}}var Au=globalThis&&globalThis.__decorate||function(t,r,e,n){var c=arguments.length,g=c<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(t,r,e,n);else for(var x=t.length-1;x>=0;x--)($=t[x])&&(g=(c<3?$(g):c>3?$(r,e,g):$(r,e))||g);return c>3&&g&&Object.defineProperty(r,e,g),g};class Gn{constructor(r=[],e,n){be(this,"parent");be(this,"layerdStates");be(this,"name");be(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=n||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const n=[r,...this.layerdStates];return new Gn(n,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const n=e.get(r);return this.log("read",{var:r,val:n}),n}throw new lr(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}getAll(){const r=this.layerdStates.reduce((e,n)=>[...e,...n],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const n=this.layerdStates[0];if(n.has(r))throw new lr(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});n.set(r,e),this.parent==null&&this.onUpdated(r,e)}assign(r,e){let n=1;for(const c of this.layerdStates){if(c.has(r)){c.set(r,e),this.log("assign",{var:r,val:e}),n===this.layerdStates.length&&this.onUpdated(r,e);return}n++}throw new lr(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}}Au([pt],Gn.prototype,"log",null);Au([pt],Gn.prototype,"onUpdated",null);Au([pt],Gn.prototype,"createChildScope",null);Au([pt],Gn.prototype,"get",null);Au([pt],Gn.prototype,"getAll",null);Au([pt],Gn.prototype,"add",null);Au([pt],Gn.prototype,"assign",null);let Sf;const I1=new Uint8Array(16);function T1(){if(!Sf&&(Sf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Sf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sf(I1)}const Yr=[];for(let t=0;t<256;++t)Yr.push((t+256).toString(16).slice(1));function j1(t,r=0){return(Yr[t[r+0]]+Yr[t[r+1]]+Yr[t[r+2]]+Yr[t[r+3]]+"-"+Yr[t[r+4]]+Yr[t[r+5]]+"-"+Yr[t[r+6]]+Yr[t[r+7]]+"-"+Yr[t[r+8]]+Yr[t[r+9]]+"-"+Yr[t[r+10]]+Yr[t[r+11]]+Yr[t[r+12]]+Yr[t[r+13]]+Yr[t[r+14]]+Yr[t[r+15]]).toLowerCase()}const R1=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Xv={randomUUID:R1};function D1(t,r,e){if(Xv.randomUUID&&!r&&!t)return Xv.randomUUID();t=t||{};const n=t.random||(t.rng||T1)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){e=e||0;for(let c=0;c<16;++c)r[e+c]=n[c];return r}return j1(n)}const Vt={type:"null"},yn={type:"bool",value:!0},sn={type:"bool",value:!1},Je=t=>({type:"num",value:t}),ar=t=>({type:"str",value:t}),qu=t=>({type:"bool",value:t}),Np=t=>({type:"obj",value:t}),ls=t=>({type:"arr",value:t}),L1=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),Ee=t=>({type:"fn",native:t}),B1=t=>({type:"return",value:t}),H1=()=>({type:"break",value:null}),U1=()=>({type:"continue",value:null}),q1=t=>t.type==="return"?t.value:t;function un(t){if(t==null)throw new lr("Expect anything, but got nothing.")}function Cs(t){if(t==null)throw new lr("Expect boolean, but got nothing.");if(t.type!=="bool")throw new lr(`Expect boolean, but got ${t.type}.`)}function Ai(t){if(t==null)throw new lr("Expect function, but got nothing.");if(t.type!=="fn")throw new lr(`Expect function, but got ${t.type}.`)}function qr(t){if(t==null)throw new lr("Expect string, but got nothing.");if(t.type!=="str")throw new lr(`Expect string, but got ${t.type}.`)}function Ve(t){if(t==null)throw new lr("Expect number, but got nothing.");if(t.type!=="num")throw new lr(`Expect number, but got ${t.type}.`)}function gi(t){if(t==null)throw new lr("Expect object, but got nothing.");if(t.type!=="obj")throw new lr(`Expect object, but got ${t.type}.`)}function lf(t){if(t==null)throw new lr("Expect array, but got nothing.");if(t.type!=="arr")throw new lr(`Expect array, but got ${t.type}.`)}function z1(t){return t.type==="str"}function V1(t){return t.type==="num"}function W1(t){return t.type==="obj"}function K1(t){return t.type==="arr"}function Oh(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function Nh(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(n=>Nh(n,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function Ih(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>Ih(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,n]of t.value.entries())r[e]=Ih(n);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function Th(t){if(t===null)return Vt;if(typeof t=="boolean")return qu(t);if(typeof t=="string")return ar(t);if(typeof t=="number")return Je(t);if(Array.isArray(t))return ls(t.map(r=>Th(r)));if(typeof t=="object"){const r=new Map;for(const[e,n]of Object.entries(t))r.set(e,Th(n));return Np(r)}return Vt}const J1={help:ar("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":ar("0.14.1"),"Core:ai":ar("kawaii"),"Core:not":Ee(([t])=>(Cs(t),t.value?sn:yn)),"Core:eq":Ee(([t,r])=>(un(t),un(r),Oh(t,r)?yn:sn)),"Core:neq":Ee(([t,r])=>(un(t),un(r),Oh(t,r)?sn:yn)),"Core:and":Ee(([t,r])=>(Cs(t),t.value?(Cs(r),r.value?yn:sn):sn)),"Core:or":Ee(([t,r])=>(Cs(t),t.value?yn:(Cs(r),r.value?yn:sn))),"Core:add":Ee(([t,r])=>(Ve(t),Ve(r),Je(t.value+r.value))),"Core:sub":Ee(([t,r])=>(Ve(t),Ve(r),Je(t.value-r.value))),"Core:mul":Ee(([t,r])=>(Ve(t),Ve(r),Je(t.value*r.value))),"Core:pow":Ee(([t,r])=>{Ve(t),Ve(r);const e=t.value**r.value;if(isNaN(e))throw new lr("Invalid operation.");return Je(e)}),"Core:div":Ee(([t,r])=>{Ve(t),Ve(r);const e=t.value/r.value;if(isNaN(e))throw new lr("Invalid operation.");return Je(e)}),"Core:mod":Ee(([t,r])=>(Ve(t),Ve(r),Je(t.value%r.value))),"Core:gt":Ee(([t,r])=>(Ve(t),Ve(r),t.value>r.value?yn:sn)),"Core:lt":Ee(([t,r])=>(Ve(t),Ve(r),t.value(Ve(t),Ve(r),t.value>=r.value?yn:sn)),"Core:lteq":Ee(([t,r])=>(Ve(t),Ve(r),t.value<=r.value?yn:sn)),"Core:type":Ee(([t])=>(un(t),ar(t.type))),"Core:to_str":Ee(([t])=>(un(t),t.type==="str"?t:t.type==="num"?ar(t.value.toString()):ar("?"))),"Core:range":Ee(([t,r])=>(Ve(t),Ve(r),t.valueJe(n+t.value))):t.value>r.value?ls(Array.from({length:t.value-r.value+1},(e,n)=>Je(t.value-n))):ls([t]))),"Util:uuid":Ee(()=>ar(D1())),"Json:stringify":Ee(([t])=>(un(t),ar(JSON.stringify(Ih(t))))),"Json:parse":Ee(([t])=>(qr(t),Th(JSON.parse(t.value)))),"Json:parsable":Ee(([t])=>{qr(t);try{JSON.parse(t.value)}catch{return qu(!1)}return qu(!0)}),"Date:now":Ee(()=>Je(Date.now())),"Date:year":Ee(([t])=>(t&&Ve(t),Je(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":Ee(([t])=>(t&&Ve(t),Je(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":Ee(([t])=>(t&&Ve(t),Je(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":Ee(([t])=>(t&&Ve(t),Je(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":Ee(([t])=>(t&&Ve(t),Je(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":Ee(([t])=>(t&&Ve(t),Je(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":Ee(([t])=>(qr(t),Je(new Date(t.value).getTime()))),"Math:Infinity":Je(1/0),"Math:PI":Je(Math.PI),"Math:sin":Ee(([t])=>(Ve(t),Je(Math.sin(t.value)))),"Math:cos":Ee(([t])=>(Ve(t),Je(Math.cos(t.value)))),"Math:abs":Ee(([t])=>(Ve(t),Je(Math.abs(t.value)))),"Math:sqrt":Ee(([t])=>{Ve(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new lr("Invalid operation.");return Je(r)}),"Math:round":Ee(([t])=>(Ve(t),Je(Math.round(t.value)))),"Math:ceil":Ee(([t])=>(Ve(t),Je(Math.ceil(t.value)))),"Math:floor":Ee(([t])=>(Ve(t),Je(Math.floor(t.value)))),"Math:min":Ee(([t,r])=>(Ve(t),Ve(r),Je(Math.min(t.value,r.value)))),"Math:max":Ee(([t,r])=>(Ve(t),Ve(r),Je(Math.max(t.value,r.value)))),"Math:rnd":Ee(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?Je(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):Je(Math.random())),"Math:gen_rng":Ee(([t])=>{if(un(t),t.type!=="num"&&t.type!=="str")return Vt;const r=kp(t.value.toString());return Ee(([e,n])=>e&&e.type==="num"&&n&&n.type==="num"?Je(Math.floor(r()*(Math.floor(n.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):Je(r()))}),"Num:to_hex":Ee(([t])=>(Ve(t),ar(t.value.toString(16)))),"Num:from_hex":Ee(([t])=>(qr(t),Je(parseInt(t.value,16)))),"Str:lf":ar(` +`),"Str:lt":Ee(([t,r])=>(qr(t),qr(r),t.value(qr(t),qr(r),t.value>r.value?Je(-1):t.value===r.value?Je(0):Je(1))),"Obj:keys":Ee(([t])=>(gi(t),ls(Array.from(t.value.keys()).map(r=>ar(r))))),"Obj:vals":Ee(([t])=>(gi(t),ls(Array.from(t.value.values())))),"Obj:kvs":Ee(([t])=>(gi(t),ls(Array.from(t.value.entries()).map(([r,e])=>ls([ar(r),e]))))),"Obj:get":Ee(([t,r])=>(gi(t),qr(r),t.value.get(r.value)??Vt)),"Obj:set":Ee(([t,r,e])=>(gi(t),qr(r),un(e),t.value.set(r.value,e),Vt)),"Obj:has":Ee(([t,r])=>(gi(t),qr(r),qu(t.value.has(r.value)))),"Obj:copy":Ee(([t])=>(gi(t),Np(new Map(t.value)))),"Async:interval":Ee(async([t,r,e],n)=>{Ve(t),Ai(r),e&&(Cs(e),e.value&&n.call(r,[]));const c=setInterval(()=>{n.call(r,[])},t.value),g=()=>{clearInterval(c)};return n.registerAbortHandler(g),Ee(([],$)=>{clearInterval(c),$.unregisterAbortHandler(g)})}),"Async:timeout":Ee(async([t,r],e)=>{Ve(t),Ai(r);const n=setTimeout(()=>{e.call(r,[])},t.value),c=()=>{clearTimeout(n)};return e.registerAbortHandler(c),Ee(([],g)=>{clearTimeout(n),g.unregisterAbortHandler(c)})})},Eu={num:{to_str:t=>Ee(async(r,e)=>ar(t.value.toString()))},str:{to_num:t=>Ee(async(r,e)=>{const n=parseInt(t.value,10);return isNaN(n)?Vt:Je(n)}),len:t=>Je(Mp(t.value)),replace:t=>Ee(async([r,e],n)=>(qr(r),qr(e),ar(t.value.split(r.value).join(e.value)))),index_of:t=>Ee(async([r],e)=>(qr(r),Je(Fp(t.value,r.value)))),incl:t=>Ee(async([r],e)=>(qr(r),t.value.includes(r.value)?yn:sn)),trim:t=>Ee(async(r,e)=>ar(t.value.trim())),upper:t=>Ee(async(r,e)=>ar(t.value.toUpperCase())),lower:t=>Ee(async(r,e)=>ar(t.value.toLowerCase())),split:t=>Ee(async([r],e)=>(r&&qr(r),ls(r?t.value.split(r?r.value:"").map(n=>ar(n)):Xu(t.value).map(n=>ar(n))))),slice:t=>Ee(async([r,e],n)=>(Ve(r),Ve(e),ar(Sp(t.value,r.value,e.value)))),pick:t=>Ee(async([r],e)=>{Ve(r);const c=Xu(t.value)[r.value];return c?ar(c):Vt})},arr:{len:t=>Je(t.value.length),push:t=>Ee(async([r],e)=>(un(r),t.value.push(r),t)),unshift:t=>Ee(async([r],e)=>(un(r),t.value.unshift(r),t)),pop:t=>Ee(async(r,e)=>t.value.pop()??Vt),shift:t=>Ee(async(r,e)=>t.value.shift()??Vt),concat:t=>Ee(async([r],e)=>(lf(r),ls(t.value.concat(r.value)))),slice:t=>Ee(async([r,e],n)=>(Ve(r),Ve(e),ls(t.value.slice(r.value,e.value)))),join:t=>Ee(async([r],e)=>(r&&qr(r),ar(t.value.map(n=>n.type==="str"?n.value:"").join(r?r.value:"")))),map:t=>Ee(async([r],e)=>{Ai(r);const n=t.value.map(async(c,g)=>await e.call(r,[c,Je(g)]));return ls(await Promise.all(n))}),filter:t=>Ee(async([r],e)=>{Ai(r);const n=[];for(let c=0;cEe(async([r,e],n)=>{Ai(r);const c=e!=null;let g=c?e:t.value[0];for(let $=c?0:1;$Ee(async([r],e)=>{Ai(r);for(let n=0;nEe(async([r],e)=>(un(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?sn:(c=>c.value.map(g=>g.type==="str"||g.type==="num"||g.type==="bool"?g.value:g.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?yn:sn)),reverse:t=>Ee(async(r,e)=>(t.value.reverse(),Vt)),copy:t=>Ee(async(r,e)=>ls([...t.value])),sort:t=>Ee(async([r],e)=>{const n=async(g,$)=>{if(g.length<=1)return g;const x=Math.floor(g.length/2),m=await n(g.slice(0,x),$),A=await n(g.slice(x),$);return c(m,A,$)},c=async(g,$,x)=>{const m=[];let A=0,C=0;for(;A=0;x--)($=t[x])&&(g=(c<3?$(g):c>3?$(r,e,g):$(r,e))||g);return c>3&&g&&Object.defineProperty(r,e,g),g};const Od=300,X1=Od-1;class Os{constructor(r,e){be(this,"vars");be(this,"opts");be(this,"stepCount",0);be(this,"stop",!1);be(this,"scope");be(this,"abortHandlers",[]);this.opts=e??{};const n={print:Ee(([c])=>{un(c),this.opts.out&&this.opts.out(c)}),readline:Ee(async c=>{const g=c[0];if(qr(g),this.opts.in==null)return Vt;const $=await this.opts.in(g.value);return ar($)})};this.vars={...r,...J1,...n},this.scope=new Gn([new Map(Object.entries(this.vars))]),this.scope.opts.log=(c,g)=>{switch(c){case"add":this.log("var:add",g);break;case"read":this.log("var:read",g);break;case"write":this.log("var:write",g);break}}}async exec(r){if(r==null||r.length===0)return;await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}async execFn(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(c){switch(c.type){case"arr":return c.value.map(g=>e(g));case"bool":return c.value;case"null":return null;case"num":return c.value;case"obj":{const g={};for(const[$,x]of c.value.entries())g[$]=e(x);return g}case"str":return c.value;default:return}}const n=new Map;for(const c of r)switch(c.type){case"meta":{n.set(c.name,e(c.value));break}}return n}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const n of r.members)switch(n.type){case"def":{const c=await this._eval(n.expr,e);e.add(n.name,c),this.scope.add(r.name+":"+n.name,c);break}case"ns":break;default:throw new Error("invalid ns member type: "+n.type)}}async _fn(r,e){if(r.native)return r.native(e,{call:this._fn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??Vt;{const n=new Map;for(let g=0;g<(r.args??[]).length;g++)n.set(r.args[g],e[g]);const c=r.scope.createChildScope(n);return q1(await this._run(r.statements,c))}}async _eval(r,e){if(this.stop)return Vt;if(this.stepCount%Od===X1&&await new Promise(n=>setTimeout(n,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new lr("max step exceeded");switch(r.type){case"call":{const n=await this._eval(r.target,e);Ai(n);const c=await Promise.all(r.args.map(g=>this._eval(g,e)));return this._fn(n,c)}case"if":{const n=await this._eval(r.cond,e);if(Cs(n),n.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const c of r.elseif){const g=await this._eval(c.cond,e);if(Cs(g),g.value)return this._eval(c.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return Vt}case"match":{const n=await this._eval(r.about,e);for(const c of r.qs){const g=await this._eval(c.q,e);if(Oh(n,g))return await this._eval(c.a,e)}return r.default?await this._eval(r.default,e):Vt}case"loop":{for(;;){const n=await this._run(r.statements,e.createChildScope());if(n.type==="break")break;if(n.type==="return")return n}return Vt}case"for":{if(r.times){const n=await this._eval(r.times,e);Ve(n);for(let c=0;c0){const c=[];for(const g of r.attr)c.push({name:g.name,value:await this._eval(g.value,e)});n.attr=c}return e.add(r.name,n),Vt}case"identifier":return e.get(r.name);case"assign":{const n=await this._eval(r.expr,e);return await this.assign(e,r.dest,n),Vt}case"addAssign":{const n=await this._eval(r.dest,e);Ve(n);const c=await this._eval(r.expr,e);return Ve(c),await this.assign(e,r.dest,Je(n.value+c.value)),Vt}case"subAssign":{const n=await this._eval(r.dest,e);Ve(n);const c=await this._eval(r.expr,e);return Ve(c),await this.assign(e,r.dest,Je(n.value-c.value)),Vt}case"null":return Vt;case"bool":return qu(r.value);case"num":return Je(r.value);case"str":return ar(r.value);case"arr":return ls(await Promise.all(r.value.map(async n=>await this._eval(n,e))));case"obj":{const n=new Map;for(const c of r.value.keys())n.set(c,await this._eval(r.value.get(c),e));return Np(n)}case"prop":{const n=await this._eval(r.target,e);if(W1(n))return n.value.has(r.name)?n.value.get(r.name):Vt;if(V1(n)){if(Object.hasOwn(Eu.num,r.name))return Eu.num[r.name](n);throw new lr(`No such prop (${r.name}) in ${n.type}.`)}else if(z1(n)){if(Object.hasOwn(Eu.str,r.name))return Eu.str[r.name](n);throw new lr(`No such prop (${r.name}) in ${n.type}.`)}else if(K1(n)){if(Object.hasOwn(Eu.arr,r.name))return Eu.arr[r.name](n);throw new lr(`No such prop (${r.name}) in ${n.type}.`)}else throw new lr(`Cannot read prop (${r.name}) of ${n.type}.`)}case"index":{const n=await this._eval(r.target,e);lf(n);const c=await this._eval(r.index,e);Ve(c);const g=n.value[c.value];if(g===void 0)throw new N1(`Index out of range. index: ${c.value} max: ${n.value.length-1}`);return g}case"not":{const n=await this._eval(r.expr,e);return Cs(n),qu(!n.value)}case"fn":return L1(r.args.map(n=>n.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"tmpl":{let n="";for(const c of r.tmpl)if(typeof c=="string")n+=c;else{const g=await this._eval(c,e);let $="";g.type==="str"?$=g.value:g.type==="num"&&($=g.value.toString()),n+=$}return ar(n)}case"return":{const n=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:n}),B1(n)}case"break":return this.log("block:break",{scope:e.name}),H1();case"continue":return this.log("block:continue",{scope:e.name}),U1();case"ns":return Vt;case"meta":return Vt;case"and":{const n=await this._eval(r.left,e);if(Cs(n),n.value){const c=await this._eval(r.right,e);return Cs(c),c}else return n}case"or":{const n=await this._eval(r.left,e);if(Cs(n),n.value)return n;{const c=await this._eval(r.right,e);return Cs(c),c}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let n=Vt;for(let c=0;ce!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,n){if(e.type==="identifier")r.assign(e.name,n);else if(e.type==="index"){const c=await this._eval(e.target,r);lf(c);const g=await this._eval(e.index,r);Ve(g),c.value[g.value]=n}else if(e.type==="prop"){const c=await this._eval(e.target,r);gi(c),c.value.set(e.name,n)}else throw new lr("The left-hand side of an assignment expression must be a variable or a property/index access.")}}cn([pt],Os.prototype,"exec",null);cn([pt],Os.prototype,"execFn",null);cn([pt],Os.prototype,"log",null);cn([pt],Os.prototype,"collectNs",null);cn([pt],Os.prototype,"collectNsMember",null);cn([pt],Os.prototype,"_fn",null);cn([pt],Os.prototype,"_eval",null);cn([pt],Os.prototype,"_run",null);cn([pt],Os.prototype,"registerAbortHandler",null);cn([pt],Os.prototype,"unregisterAbortHandler",null);cn([pt],Os.prototype,"abort",null);cn([pt],Os.prototype,"assign",null);cn([pt],Os,"collectMetadata",null);function G1(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function ou(t,r,e,n){var c=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(c,ou.prototype),c.expected=r,c.found=e,c.location=n,c.name="SyntaxError",c}G1(ou,Error);function Jc(t,r,e){return e=e||" ",t.length>r?t:(r-=t.length,e+=e.repeat(r),t+e.slice(0,r))}ou.prototype.format=function(t){var r="Error: "+this.message;if(this.location){var e=null,n;for(n=0;n `+$+` +`+m+` | +`+g.line+" | "+A+` +`+m+" | "+Jc("",c.column-1," ")+Jc("",P,"^")}else r+=` + at `+$}return r};ou.buildMessage=function(t,r){var e={literal:function(A){return'"'+c(A.text)+'"'},class:function(A){var C=A.parts.map(function(P){return Array.isArray(P)?g(P[0])+"-"+g(P[1]):g(P)});return"["+(A.inverted?"^":"")+C.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(A){return A.description}};function n(A){return A.charCodeAt(0).toString(16).toUpperCase()}function c(A){return A.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+n(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+n(C)})}function g(A){return A.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+n(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+n(C)})}function $(A){return e[A.type](A)}function x(A){var C=A.map($),P,S;if(C.sort(),C.length>0){for(P=1,S=1;P=",Ye="<",Br=">",Wt="+",Ar="-",Ft="*",br="^",Hr="/",Or="%",Rr="!",Dt="[",z=".",Z="if",se="elif",ve="else",ye="match",oe="=>",Ne="eval",me="`",$e='"',he="'",Le='\\"',Re="\\'",He="true",We="false",Ze="null",at=";",it="@",bt="@(",Kt=`\r +`,Ct=/^[A-Z0-9_:]/i,sr=/^[^`{]/,Ns=/^[{}`]/,rs=/^[+\-]/,Lt=/^[1-9]/,vt=/^[0-9]/,qt=/^[A-Z_]/i,Zn=/^[A-Z0-9_]/i,Qn=/^[\r\n]/,Ii=/^[ \t\r\n]/,Ti=/^[ \t]/,or=wo(),ur=te("//",!1),ji=te("/*",!1),xn=te("*/",!1),_r=te("(",!1),Ot=te(")",!1),Cr=te("::",!1),fr=te("{",!1),tt=te("}",!1),Jt=te("###",!1),zr=te("let",!1),xt=te(":",!1),$t=te("=",!1),ps=te("var",!1),Ri=te("<:",!1),Di=te("#[",!1),Is=te("]",!1),vs=te("each",!1),At=te(",",!1),gt=te("for",!1),Ts=te("return",!1),gr=Xt([["A","Z"],["0","9"],"_",":"],!1,!0),dr=te("loop",!1),Li=te("break",!1),Bi=te("continue",!1),Hi=te("+=",!1),Ui=te("-=",!1),Yn=te("\\",!1),ea=te("||",!1),qi=te("&&",!1),zi=te("==",!1),Vi=te("!=",!1),Wi=te("<=",!1),Ki=te(">=",!1),ta=te("<",!1),$n=te(">",!1),ra=te("+",!1),Ji=te("-",!1),sa=te("*",!1),na=te("^",!1),Xi=te("/",!1),Gi=te("%",!1),Zi=te("!",!1),bn=te("[",!1),gs=te(".",!1),An=te("if",!1),Qi=te("elif",!1),Yi=te("else",!1),el=te("match",!1),js=te("=>",!1),Rs=te("eval",!1),Ds=te("`",!1),tl=Xt(["`","{"],!0,!1),Ls=Xt(["{","}","`"],!1,!1),Bs=te('"',!1),Hs=te("'",!1),Us=te('\\"',!1),qs=te("\\'",!1),zs=Xt(["+","-"],!1,!1),aa=Xt([["1","9"]],!1,!1),Nt=Xt([["0","9"]],!1,!1),ia=te("true",!1),cr=te("false",!1),rl=te("null",!1),Vs=te(";",!1),sl=te("@",!1),ds=te("@(",!1),nl=Xt([["A","Z"],"_"],!1,!0),_n=Xt([["A","Z"],["0","9"],"_"],!1,!0),al=te(`\r +`,!1),la=Xt(["\r",` +`],!1,!1),il=Xt([" "," ","\r",` +`],!1,!1),ll=Xt([" "," "],!1,!1),ol=function(l){return l.join("")},ul=function(){return k()},fl=function(){return k()},cl=function(){return""},hl=function(){return""},pl=function(l){return l??[]},oa=function(l,f){return f},vl=function(l,f){return[l,...f]},Cn=function(l,f){return f},gl=function(l,f){return[l,...f]},kn=function(l,f){return f},dl=function(l,f){return[l,...f]},ua=function(l){return l},yl=function(l,f){return ie("ns",{name:l,members:f})},wl=function(l,f){return ie("meta",{name:l,value:f})},ml=function(l){return ie("meta",{name:null,value:l})},xl=function(l,f,y){return ie("def",{name:l,varType:f,expr:y,mut:!1,attr:[]})},$l=function(l,f,y){return ie("def",{name:l,varType:f,expr:y,mut:!0,attr:[]})},bl=function(l){return ie("identifier",{name:"print",chain:[ie("callChain",{args:[l]})]})},Al=function(l,f){return ie("attr",{name:l,value:f??ie("bool",{value:!0})})},_l=function(l,f,y){return ie("each",{var:l,items:f,for:y})},Cl=function(l,f,y){return ie("each",{var:l,items:f,for:y})},kl=function(l,f){return f},Pl=function(l,f,y,h){return ie("for",{var:l,from:f??ie("num",{value:0}),to:y,for:h})},El=function(l,f){return f},Ml=function(l,f,y,h){return ie("for",{var:l,from:f??ie("num",{value:0}),to:y,for:h})},Sl=function(l,f){return ie("for",{times:l,for:f})},Fl=function(l,f){return ie("for",{times:l,for:f})},Ol=function(l){return ie("return",{expr:l})},Nl=function(l){return ie("loop",{statements:l})},Il=function(){return ie("break",{})},Tl=function(){return ie("continue",{})},jl=function(l,f,y){return f==="+="?ie("addAssign",{dest:l,expr:y}):f==="-="?ie("subAssign",{dest:l,expr:y}):ie("assign",{dest:l,expr:y})},fa=function(l,f,y){return{op:f,term:y}},Rl=function(l,f){return ie("infix",{operands:[l,...f.map(y=>y.term)],operators:f.map(y=>y.op)})},ca=function(){return k()},Dl=function(l){return ie("not",{expr:l})},Ll=function(l,f){return{...l,chain:f}},Bl=function(l){return ie("callChain",{args:l??[]})},ha=function(l,f){return f},Hl=function(l,f){return[l,...f]},pa=function(l){return ie("indexChain",{index:l})},Ul=function(l){return ie("propChain",{name:l})},ql=function(l,f,y,h){return ie("if",{cond:l,then:f,elseif:y??[],else:h})},zl=function(l,f){return[l,...f]},Vl=function(l,f){return{cond:l,then:f}},Wl=function(l){return l},va=function(l,f,y){return{q:f,a:y}},Kl=function(l,f,y){return ie("match",{about:l,qs:f??[],default:y})},ga=function(l){return ie("block",{statements:l})},Jl=function(l){return ie("identifier",{name:l})},Xl=function(l){return ie("tmpl",{tmpl:l})},Gl=function(l){return l.join("")},da=function(l){return l},Zl=function(l){return ie("str",{value:l.join("")})},ya=function(l){return l},wa=function(l){return ie("str",{value:l.join("")})},Ql=function(){return'"'},ma=function(){return"'"},Yl=function(){return ie("num",{value:parseFloat(k())})},eo=function(){return ie("num",{value:parseFloat(k())})},to=function(){return ie("num",{value:parseInt(k(),10)})},ro=function(){return ie("num",{value:parseInt(k(),10)})},so=function(){return ie("bool",{value:!0})},no=function(){return ie("bool",{value:!1})},ao=function(){return ie("null",{})},xa=function(l,f){return{k:l,v:f}},io=function(l){const f=new Map;for(const y of l)f.set(y.k,y.v);return ie("obj",{value:f})},$a=function(l){return l},ba=function(l){return ie("arr",{value:l})},lo=function(l,f){return{name:l,argType:f}},Aa=function(l,f){return[l,...f]},oo=function(l,f,y,h,s,o){return(l.length>0||y.length>0)&&Ks("Cannot use spaces before or after the function name."),ie("def",{name:f,expr:ie("fn",{args:h??[],retType:s},o??[]),mut:!1,attr:[]})},uo=function(l,f,y){return ie("fn",{args:l??[],retType:f},y??[])},_a=function(l){return l},fo=function(l){return ie("arr",{value:l})},Ca=function(l,f){return{k:l,v:f}},ka=function(l){const f=new Map;for(const y of l)f.set(y.k,y.v);return ie("obj",{value:f})},co=function(l,f){return ie("fnTypeSource",{args:l??[],result:f})},Pa=function(l,f){return[l,...f]},ho=function(l,f){return ie("namedTypeSource",{name:l,inner:f})},po=function(l){return ie("namedTypeSource",{name:l,inner:null})},vo=function(){return k()},go=function(){return k()},yo=function(l){return ie("block",{statements:l??[]})},i=0,X=0,Ws=[{line:1,column:1}],a=0,K=[],E=0,T={},Vr;if("startRule"in r){if(!(r.startRule in c))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');g=c[r.startRule]}function k(){return t.substring(X,i)}function R(){return Js(X,i)}function Ks(l,f){throw f=f!==void 0?f:Js(X,i),Ea(l,f)}function te(l,f){return{type:"literal",text:l,ignoreCase:f}}function Xt(l,f,y){return{type:"class",parts:l,inverted:f,ignoreCase:y}}function wo(){return{type:"any"}}function ae(){return{type:"end"}}function Bt(l){var f=Ws[l],y;if(f)return f;for(y=l-1;!Ws[y];)y--;for(f=Ws[y],f={line:f.line,column:f.column};ya&&(a=i,K=[]),K.push(l))}function Ea(l,f){return new ou(l,null,null,f)}function Xs(l,f,y){return new ou(ou.buildMessage(l,f),l,f,y)}function O(){var l,f,y,h=i*76+0,s=T[h];if(s)return i=s.nextPos,s.result;for(l=i,f=[],y=Ma();y!==e;)f.push(y),y=Ma();return X=l,f=ol(f),l=f,T[h]={nextPos:i,result:l},l}function Ma(){var l,f,y=i*76+1,h=T[y];return h?(i=h.nextPos,h.result):(l=i,f=Da(),f!==e&&(X=l,f=ul()),l=f,l===e&&(l=i,f=Zs(),f!==e&&(X=l,f=fl()),l=f,l===e&&(l=mo(),l===e&&(t.length>i?(l=t.charAt(i),i++):(l=e,E===0&&N(or))))),T[y]={nextPos:i,result:l},l)}function mo(){var l,f,y,h,s,o,p=i*76+2,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,t.substr(i,2)===$?(f=$,i+=2):(f=e,E===0&&N(ur)),f!==e){for(y=[],h=i,s=i,E++,o=Xa(),E--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(or)),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,o=Xa(),E--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(or)),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);X=l,l=cl()}else i=l,l=e;if(l===e)if(l=i,t.substr(i,2)===x?(f=x,i+=2):(f=e,E===0&&N(ji)),f!==e){for(y=[],h=i,s=i,E++,t.substr(i,2)===m?(o=m,i+=2):(o=e,E===0&&N(xn)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(or)),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,t.substr(i,2)===m?(o=m,i+=2):(o=e,E===0&&N(xn)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(or)),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);t.substr(i,2)===m?(h=m,i+=2):(h=e,E===0&&N(xn)),h!==e?(X=l,l=hl()):(i=l,l=e)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function Sa(){var l,f,y,h,s,o=i*76+3,p=T[o];if(p)return i=p.nextPos,p.result;for(l=i,f=[],y=_();y!==e;)f.push(y),y=_();for(y=Fa(),y===e&&(y=null),h=[],s=_();s!==e;)h.push(s),s=_();return X=l,l=pl(y),T[o]={nextPos:i,result:l},l}function Fa(){var l,f,y,h,s,o,p,u,d=i*76+4,v=T[d];if(v)return i=v.nextPos,v.result;if(l=i,f=Pn(),f!==e){for(y=[],h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();u=Pn(),u!==e?(X=h,h=oa(f,u)):(i=h,h=e)}else i=h,h=e;for(;h!==e;){for(y.push(h),h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();u=Pn(),u!==e?(X=h,h=oa(f,u)):(i=h,h=e)}else i=h,h=e}X=l,l=vl(f,y)}else i=l,l=e;return T[d]={nextPos:i,result:l},l}function xo(){var l,f,y,h,s,o,p,u,d=i*76+5,v=T[d];if(v)return i=v.nextPos,v.result;if(l=i,f=En(),f!==e){for(y=[],h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();u=En(),u!==e?(X=h,h=Cn(f,u)):(i=h,h=e)}else i=h,h=e;for(;h!==e;){for(y.push(h),h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();u=En(),u!==e?(X=h,h=Cn(f,u)):(i=h,h=e)}else i=h,h=e}X=l,l=gl(f,y)}else i=l,l=e;return T[d]={nextPos:i,result:l},l}function ys(){var l,f,y,h,s,o,p,u,d=i*76+6,v=T[d];if(v)return i=v.nextPos,v.result;if(l=i,f=yr(),f!==e){for(y=[],h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();u=yr(),u!==e?(X=h,h=kn(f,u)):(i=h,h=e)}else i=h,h=e;for(;h!==e;){for(y.push(h),h=i,s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=qe(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();u=yr(),u!==e?(X=h,h=kn(f,u)):(i=h,h=e)}else i=h,h=e}X=l,l=dl(f,y)}else i=l,l=e;return T[d]={nextPos:i,result:l},l}function Pn(){var l,f=i*76+7,y=T[f];return y?(i=y.nextPos,y.result):(l=ws(),l===e&&(l=Oa(),l===e&&(l=yr())),T[f]={nextPos:i,result:l},l)}function En(){var l,f=i*76+8,y=T[f];return y?(i=y.nextPos,y.result):(l=kr(),l===e&&(l=Ka(),l===e&&(l=ws())),T[f]={nextPos:i,result:l},l)}function yr(){var l,f=i*76+9,y=T[f];return y?(i=y.nextPos,y.result):(l=kr(),l===e&&(l=Ka(),l===e&&(l=Na(),l===e&&(l=Ao(),l===e&&(l=$o(),l===e&&(l=Ia(),l===e&&(l=bo(),l===e&&(l=_o(),l===e&&(l=Co(),l===e&&(l=ko(),l===e&&(l=Po(),l===e&&(l=De()))))))))))),T[f]={nextPos:i,result:l},l)}function De(){var l,f=i*76+10,y=T[f];return y?(i=y.nextPos,y.result):(l=Eo(),l===e&&(l=Wr()),T[f]={nextPos:i,result:l},l)}function Wr(){var l,f=i*76+11,y=T[f];return y?(i=y.nextPos,y.result):(l=Fo(),l===e&&(l=Ro(),l===e&&(l=Er(),l===e&&(l=Kr()))),T[f]={nextPos:i,result:l},l)}function Kr(){var l,f,y,h,s,o,p=i*76+12,u=T[p];if(u)return i=u.nextPos,u.result;if(l=No(),l===e&&(l=Fn(),l===e&&(l=Da(),l===e&&(l=Zs(),l===e&&(l=Ua(),l===e&&(l=Tn(),l===e&&(l=Va(),l===e&&(l=Wa(),l===e&&(l=jo(),l===e&&(l=Mo(),l===e&&(l=Io(),l===e)))))))))))if(l=i,t.charCodeAt(i)===40?(f=A,i++):(f=e,E===0&&N(_r)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(h=De(),h!==e){for(s=[],o=_();o!==e;)s.push(o),o=_();t.charCodeAt(i)===41?(o=C,i++):(o=e,E===0&&N(Ot)),o!==e?(X=l,l=ua(h)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function Te(){var l,f=i*76+13,y=T[f];return y?(i=y.nextPos,y.result):(l=Ua(),l===e&&(l=Zs(),l===e&&(l=Tn(),l===e&&(l=Dn(),l===e&&(l=Ja(),l===e&&(l=Va()))))),T[f]={nextPos:i,result:l},l)}function ws(){var l,f,y,h,s,o,p,u,d,v,b=i*76+14,w=T[b];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===P?(f=P,i+=2):(f=e,E===0&&N(Cr)),f!==e){if(y=[],h=_(),h!==e)for(;h!==e;)y.push(h),h=_();else y=e;if(y!==e)if(h=Ue(),h!==e){if(s=[],o=_(),o!==e)for(;o!==e;)s.push(o),o=_();else s=e;if(s!==e)if(t.charCodeAt(i)===123?(o=S,i++):(o=e,E===0&&N(fr)),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();for(u=xo(),u===e&&(u=null),d=[],v=_();v!==e;)d.push(v),v=_();t.charCodeAt(i)===125?(v=I,i++):(v=e,E===0&&N(tt)),v!==e?(X=l,l=yl(h,u)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return T[b]={nextPos:i,result:l},l}function Oa(){var l,f,y,h,s,o,p=i*76+15,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,t.substr(i,3)===G?(f=G,i+=3):(f=e,E===0&&N(Jt)),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();if(h=Ue(),h!==e){for(s=[],o=_();o!==e;)s.push(o),o=_();o=Te(),o!==e?(X=l,l=wl(h,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===G?(f=G,i+=3):(f=e,E===0&&N(Jt)),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();h=Te(),h!==e?(X=l,l=ml(h)):(i=l,l=e)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function kr(){var l,f,y,h,s,o,p,u,d,v=i*76+16,b=T[v];if(b)return i=b.nextPos,b.result;if(l=i,t.substr(i,3)===ee?(f=ee,i+=3):(f=e,E===0&&N(zr)),f!==e){if(y=[],h=_(),h!==e)for(;h!==e;)y.push(h),h=_();else y=e;if(y!==e)if(h=Ue(),h!==e){for(s=i,o=[],p=_();p!==e;)o.push(p),p=_();if(t.charCodeAt(i)===58?(p=re,i++):(p=e,E===0&&N(xt)),p!==e){for(u=[],d=_();d!==e;)u.push(d),d=_();d=Gt(),d!==e?s=d:(i=s,s=e)}else i=s,s=e;for(s===e&&(s=null),o=[],p=_();p!==e;)o.push(p),p=_();if(t.charCodeAt(i)===61?(p=ge,i++):(p=e,E===0&&N($t)),p!==e){for(u=[],d=_();d!==e;)u.push(d),d=_();d=De(),d!==e?(X=l,l=xl(h,s,d)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===q?(f=q,i+=3):(f=e,E===0&&N(ps)),f!==e){if(y=[],h=_(),h!==e)for(;h!==e;)y.push(h),h=_();else y=e;if(y!==e)if(h=Ue(),h!==e){for(s=i,o=[],p=_();p!==e;)o.push(p),p=_();if(t.charCodeAt(i)===58?(p=re,i++):(p=e,E===0&&N(xt)),p!==e){for(u=[],d=_();d!==e;)u.push(d),d=_();d=Gt(),d!==e?s=d:(i=s,s=e)}else i=s,s=e;for(s===e&&(s=null),o=[],p=_();p!==e;)o.push(p),p=_();if(t.charCodeAt(i)===61?(p=ge,i++):(p=e,E===0&&N($t)),p!==e){for(u=[],d=_();d!==e;)u.push(d),d=_();d=De(),d!==e?(X=l,l=$l(h,s,d)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return T[v]={nextPos:i,result:l},l}function Na(){var l,f,y,h,s=i*76+17,o=T[s];if(o)return i=o.nextPos,o.result;if(l=i,t.substr(i,2)===U?(f=U,i+=2):(f=e,E===0&&N(Ri)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();h=De(),h!==e?(X=l,l=bl(h)):(i=l,l=e)}else i=l,l=e;return T[s]={nextPos:i,result:l},l}function $o(){var l,f,y,h,s,o,p,u=i*76+18,d=T[u];if(d)return i=d.nextPos,d.result;if(l=i,t.substr(i,2)===L?(f=L,i+=2):(f=e,E===0&&N(Di)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(h=Ue(),h!==e){for(s=i,o=[],p=_();p!==e;)o.push(p),p=_();for(p=Te(),p!==e?s=p:(i=s,s=e),s===e&&(s=null),o=[],p=_();p!==e;)o.push(p),p=_();t.charCodeAt(i)===93?(p=H,i++):(p=e,E===0&&N(Is)),p!==e?(X=l,l=Al(h,s)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return T[u]={nextPos:i,result:l},l}function Ia(){var l,f,y,h,s,o,p,u,d,v,b,w,M,F,D=i*76+19,B=T[D];if(B)return i=B.nextPos,B.result;if(l=i,t.substr(i,4)===W?(f=W,i+=4):(f=e,E===0&&N(vs)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(t.charCodeAt(i)===40?(h=A,i++):(h=e,E===0&&N(_r)),h!==e)if(t.substr(i,3)===ee?(s=ee,i+=3):(s=e,E===0&&N(zr)),s!==e){if(o=[],p=_(),p!==e)for(;p!==e;)o.push(p),p=_();else o=e;if(o!==e)if(p=Ue(),p!==e){for(u=[],d=_();d!==e;)u.push(d),d=_();for(t.charCodeAt(i)===44?(d=V,i++):(d=e,E===0&&N(At)),d===e&&(d=null),v=[],b=_();b!==e;)v.push(b),b=_();if(b=De(),b!==e)if(t.charCodeAt(i)===41?(w=C,i++):(w=e,E===0&&N(Ot)),w!==e){for(M=[],F=_();F!==e;)M.push(F),F=_();F=Ht(),F!==e?(X=l,l=_l(p,b,F)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,4)===W?(f=W,i+=4):(f=e,E===0&&N(vs)),f!==e){if(y=[],h=_(),h!==e)for(;h!==e;)y.push(h),h=_();else y=e;if(y!==e)if(t.substr(i,3)===ee?(h=ee,i+=3):(h=e,E===0&&N(zr)),h!==e){if(s=[],o=_(),o!==e)for(;o!==e;)s.push(o),o=_();else s=e;if(s!==e)if(o=Ue(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(At)),u===e&&(u=null),d=[],v=_();v!==e;)d.push(v),v=_();if(v=De(),v!==e){if(b=[],w=_(),w!==e)for(;w!==e;)b.push(w),w=_();else b=e;b!==e?(w=Ht(),w!==e?(X=l,l=Cl(o,v,w)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return T[D]={nextPos:i,result:l},l}function bo(){var l,f,y,h,s,o,p,u,d,v,b,w,M,F,D,B=i*76+20,Q=T[B];if(Q)return i=Q.nextPos,Q.result;if(l=i,t.substr(i,3)===J?(f=J,i+=3):(f=e,E===0&&N(gt)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(t.charCodeAt(i)===40?(h=A,i++):(h=e,E===0&&N(_r)),h!==e)if(t.substr(i,3)===ee?(s=ee,i+=3):(s=e,E===0&&N(zr)),s!==e){if(o=[],p=_(),p!==e)for(;p!==e;)o.push(p),p=_();else o=e;if(o!==e)if(p=Ue(),p!==e){for(u=[],d=_();d!==e;)u.push(d),d=_();if(d=i,t.charCodeAt(i)===61?(v=ge,i++):(v=e,E===0&&N($t)),v!==e){for(b=[],w=_();w!==e;)b.push(w),w=_();w=De(),w!==e?(X=d,d=kl(p,w)):(i=d,d=e)}else i=d,d=e;for(d===e&&(d=null),t.charCodeAt(i)===44?(v=V,i++):(v=e,E===0&&N(At)),v===e&&(v=null),b=[],w=_();w!==e;)b.push(w),w=_();if(w=De(),w!==e)if(t.charCodeAt(i)===41?(M=C,i++):(M=e,E===0&&N(Ot)),M!==e){for(F=[],D=_();D!==e;)F.push(D),D=_();D=Ht(),D!==e?(X=l,l=Pl(p,d,w,D)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,t.substr(i,3)===J?(f=J,i+=3):(f=e,E===0&&N(gt)),f!==e){if(y=[],h=_(),h!==e)for(;h!==e;)y.push(h),h=_();else y=e;if(y!==e)if(t.substr(i,3)===ee?(h=ee,i+=3):(h=e,E===0&&N(zr)),h!==e){if(s=[],o=_(),o!==e)for(;o!==e;)s.push(o),o=_();else s=e;if(s!==e)if(o=Ue(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();if(u=i,t.charCodeAt(i)===61?(d=ge,i++):(d=e,E===0&&N($t)),d!==e){for(v=[],b=_();b!==e;)v.push(b),b=_();b=De(),b!==e?(X=u,u=El(o,b)):(i=u,u=e)}else i=u,u=e;for(u===e&&(u=null),t.charCodeAt(i)===44?(d=V,i++):(d=e,E===0&&N(At)),d===e&&(d=null),v=[],b=_();b!==e;)v.push(b),b=_();if(b=De(),b!==e){if(w=[],M=_(),M!==e)for(;M!==e;)w.push(M),M=_();else w=e;w!==e?(M=Ht(),M!==e?(X=l,l=Ml(o,u,b,M)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,t.substr(i,3)===J?(f=J,i+=3):(f=e,E===0&&N(gt)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(t.charCodeAt(i)===40?(h=A,i++):(h=e,E===0&&N(_r)),h!==e)if(s=De(),s!==e)if(t.charCodeAt(i)===41?(o=C,i++):(o=e,E===0&&N(Ot)),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();u=Ht(),u!==e?(X=l,l=Sl(s,u)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,t.substr(i,3)===J?(f=J,i+=3):(f=e,E===0&&N(gt)),f!==e){if(y=[],h=_(),h!==e)for(;h!==e;)y.push(h),h=_();else y=e;if(y!==e)if(h=De(),h!==e){if(s=[],o=_(),o!==e)for(;o!==e;)s.push(o),o=_();else s=e;s!==e?(o=Ht(),o!==e?(X=l,l=Fl(h,o)):(i=l,l=e)):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e}}return T[B]={nextPos:i,result:l},l}function Ao(){var l,f,y,h,s,o=i*76+21,p=T[o];if(p)return i=p.nextPos,p.result;if(l=i,t.substr(i,6)===Y?(f=Y,i+=6):(f=e,E===0&&N(Ts)),f!==e)if(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e){for(h=[],s=_();s!==e;)h.push(s),s=_();s=De(),s!==e?(X=l,l=Ol(s)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return T[o]={nextPos:i,result:l},l}function _o(){var l,f,y,h,s,o,p,u,d=i*76+22,v=T[d];if(v)return i=v.nextPos,v.result;if(l=i,t.substr(i,4)===ue?(f=ue,i+=4):(f=e,E===0&&N(dr)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(t.charCodeAt(i)===123?(h=S,i++):(h=e,E===0&&N(fr)),h!==e){for(s=[],o=_();o!==e;)s.push(o),o=_();if(o=ys(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();t.charCodeAt(i)===125?(u=I,i++):(u=e,E===0&&N(tt)),u!==e?(X=l,l=Nl(o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return T[d]={nextPos:i,result:l},l}function Co(){var l,f,y,h,s=i*76+23,o=T[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,5)===de?(f=de,i+=5):(f=e,E===0&&N(Li)),f!==e?(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=Il()):(i=l,l=e)):(i=l,l=e),T[s]={nextPos:i,result:l},l)}function ko(){var l,f,y,h,s=i*76+24,o=T[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,8)===le?(f=le,i+=8):(f=e,E===0&&N(Bi)),f!==e?(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=Tl()):(i=l,l=e)):(i=l,l=e),T[s]={nextPos:i,result:l},l)}function Po(){var l,f,y,h,s,o,p=i*76+25,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,f=De(),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(t.substr(i,2)===Ie?(h=Ie,i+=2):(h=e,E===0&&N(Hi)),h===e&&(t.substr(i,2)===ze?(h=ze,i+=2):(h=e,E===0&&N(Ui)),h===e&&(t.charCodeAt(i)===61?(h=ge,i++):(h=e,E===0&&N($t)))),h!==e){for(s=[],o=_();o!==e;)s.push(o),o=_();o=De(),o!==e?(X=l,l=jl(f,h,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function Eo(){var l,f,y,h,s,o,p,u,d=i*76+26,v=T[d];if(v)return i=v.nextPos,v.result;if(l=i,f=Wr(),f!==e){for(y=[],h=i,s=[],o=Pr();o!==e;)s.push(o),o=Pr();if(o=Ta(),o!==e){for(p=[],u=Pr();u!==e;)p.push(u),u=Pr();u=Wr(),u!==e?(X=h,h=fa(f,o,u)):(i=h,h=e)}else i=h,h=e;if(h!==e)for(;h!==e;){for(y.push(h),h=i,s=[],o=Pr();o!==e;)s.push(o),o=Pr();if(o=Ta(),o!==e){for(p=[],u=Pr();u!==e;)p.push(u),u=Pr();u=Wr(),u!==e?(X=h,h=fa(f,o,u)):(i=h,h=e)}else i=h,h=e}else y=e;y!==e?(X=l,l=Rl(f,y)):(i=l,l=e)}else i=l,l=e;return T[d]={nextPos:i,result:l},l}function Pr(){var l,f,y,h=i*76+27,s=T[h];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===92?(f=mt,i++):(f=e,E===0&&N(Yn)),f!==e?(y=qe(),y!==e?(f=[f,y],l=f):(i=l,l=e)):(i=l,l=e),l===e&&(l=Ae()),T[h]={nextPos:i,result:l},l)}function Ta(){var l,f,y=i*76+28,h=T[y];return h?(i=h.nextPos,h.result):(l=i,t.substr(i,2)===Ke?(f=Ke,i+=2):(f=e,E===0&&N(ea)),f===e&&(t.substr(i,2)===ft?(f=ft,i+=2):(f=e,E===0&&N(qi)),f===e&&(t.substr(i,2)===je?(f=je,i+=2):(f=e,E===0&&N(zi)),f===e&&(t.substr(i,2)===ut?(f=ut,i+=2):(f=e,E===0&&N(Vi)),f===e&&(t.substr(i,2)===jt?(f=jt,i+=2):(f=e,E===0&&N(Wi)),f===e&&(t.substr(i,2)===Rt?(f=Rt,i+=2):(f=e,E===0&&N(Ki)),f===e&&(t.charCodeAt(i)===60?(f=Ye,i++):(f=e,E===0&&N(ta)),f===e&&(t.charCodeAt(i)===62?(f=Br,i++):(f=e,E===0&&N($n)),f===e&&(t.charCodeAt(i)===43?(f=Wt,i++):(f=e,E===0&&N(ra)),f===e&&(t.charCodeAt(i)===45?(f=Ar,i++):(f=e,E===0&&N(Ji)),f===e&&(t.charCodeAt(i)===42?(f=Ft,i++):(f=e,E===0&&N(sa)),f===e&&(t.charCodeAt(i)===94?(f=br,i++):(f=e,E===0&&N(na)),f===e&&(t.charCodeAt(i)===47?(f=Hr,i++):(f=e,E===0&&N(Xi)),f===e&&(t.charCodeAt(i)===37?(f=Or,i++):(f=e,E===0&&N(Gi))))))))))))))),f!==e&&(X=l,f=ca()),l=f,T[y]={nextPos:i,result:l},l)}function Mo(){var l,f,y,h=i*76+29,s=T[h];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===33?(f=Rr,i++):(f=e,E===0&&N(Zi)),f!==e?(y=De(),y!==e?(X=l,l=Dl(y)):(i=l,l=e)):(i=l,l=e),T[h]={nextPos:i,result:l},l)}function Er(){var l,f,y,h,s=i*76+30,o=T[s];if(o)return i=o.nextPos,o.result;if(l=i,f=Kr(),f!==e){if(y=[],h=Mn(),h===e&&(h=ja(),h===e&&(h=Sn())),h!==e)for(;h!==e;)y.push(h),h=Mn(),h===e&&(h=ja(),h===e&&(h=Sn()));else y=e;y!==e?(X=l,l=Ll(f,y)):(i=l,l=e)}else i=l,l=e;return T[s]={nextPos:i,result:l},l}function Mn(){var l,f,y,h,s,o,p=i*76+31,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===40?(f=A,i++):(f=e,E===0&&N(_r)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();for(h=So(),h===e&&(h=null),s=[],o=_();o!==e;)s.push(o),o=_();t.charCodeAt(i)===41?(o=C,i++):(o=e,E===0&&N(Ot)),o!==e?(X=l,l=Bl(h)):(i=l,l=e)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function So(){var l,f,y,h,s,o,p=i*76+32,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,f=De(),f!==e){for(y=[],h=i,s=Jr(),s!==e?(o=De(),o!==e?(X=h,h=ha(f,o)):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=Jr(),s!==e?(o=De(),o!==e?(X=h,h=ha(f,o)):(i=h,h=e)):(i=h,h=e);X=l,l=Hl(f,y)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function ja(){var l,f,y,h,s,o,p=i*76+33,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===91?(f=Dt,i++):(f=e,E===0&&N(bn)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(h=De(),h!==e){for(s=[],o=_();o!==e;)s.push(o),o=_();t.charCodeAt(i)===93?(o=H,i++):(o=e,E===0&&N(Is)),o!==e?(X=l,l=pa(h)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function Sn(){var l,f,y,h=i*76+34,s=T[h];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===46?(f=z,i++):(f=e,E===0&&N(gs)),f!==e?(y=Ue(),y!==e?(X=l,l=Ul(y)):(i=l,l=e)):(i=l,l=e),T[h]={nextPos:i,result:l},l)}function Fo(){var l,f,y,h,s,o,p,u,d,v,b=i*76+35,w=T[b];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===Z?(f=Z,i+=2):(f=e,E===0&&N(An)),f!==e){if(y=[],h=_(),h!==e)for(;h!==e;)y.push(h),h=_();else y=e;if(y!==e)if(h=De(),h!==e){if(s=[],o=_(),o!==e)for(;o!==e;)s.push(o),o=_();else s=e;if(s!==e)if(o=Ht(),o!==e){if(p=i,u=[],d=_(),d!==e)for(;d!==e;)u.push(d),d=_();else u=e;if(u!==e?(d=Ra(),d!==e?p=d:(i=p,p=e)):(i=p,p=e),p===e&&(p=null),u=i,d=[],v=_(),v!==e)for(;v!==e;)d.push(v),v=_();else d=e;d!==e?(v=Oo(),v!==e?u=v:(i=u,u=e)):(i=u,u=e),u===e&&(u=null),X=l,l=ql(h,o,p,u)}else i=l,l=e;else i=l,l=e}else i=l,l=e;else i=l,l=e}else i=l,l=e;return T[b]={nextPos:i,result:l},l}function Ra(){var l,f,y,h,s,o,p=i*76+36,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Gs(),f!==e){for(y=[],h=i,s=[],o=_();o!==e;)s.push(o),o=_();for(o=Gs(),o!==e?h=o:(i=h,h=e);h!==e;){for(y.push(h),h=i,s=[],o=_();o!==e;)s.push(o),o=_();o=Gs(),o!==e?h=o:(i=h,h=e)}X=l,l=zl(f,y)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function Gs(){var l,f,y,h,s,o,p,u=i*76+37,d=T[u];if(d)return i=d.nextPos,d.result;if(l=i,t.substr(i,4)===se?(f=se,i+=4):(f=e,E===0&&N(Qi)),f!==e)if(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e){for(h=[],s=_();s!==e;)h.push(s),s=_();if(s=De(),s!==e){for(o=[],p=_();p!==e;)o.push(p),p=_();p=Ht(),p!==e?(X=l,l=Vl(s,p)):(i=l,l=e)}else i=l,l=e}else i=l,l=e;else i=l,l=e;return T[u]={nextPos:i,result:l},l}function Oo(){var l,f,y,h,s,o=i*76+38,p=T[o];if(p)return i=p.nextPos,p.result;if(l=i,t.substr(i,4)===ve?(f=ve,i+=4):(f=e,E===0&&N(Yi)),f!==e)if(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e){for(h=[],s=_();s!==e;)h.push(s),s=_();s=Ht(),s!==e?(X=l,l=Wl(s)):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return T[o]={nextPos:i,result:l},l}function No(){var l,f,y,h,s,o,p,u,d,v,b,w,M,F,D,B,Q,xe=i*76+39,ne=T[xe];if(ne)return i=ne.nextPos,ne.result;if(l=i,t.substr(i,5)===ye?(f=ye,i+=5):(f=e,E===0&&N(el)),f!==e)if(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e){for(h=[],s=_();s!==e;)h.push(s),s=_();if(s=De(),s!==e){for(o=[],p=_();p!==e;)o.push(p),p=_();if(t.charCodeAt(i)===123?(p=S,i++):(p=e,E===0&&N(fr)),p!==e){for(u=[],d=_();d!==e;)u.push(d),d=_();if(d=[],v=i,b=De(),b!==e){for(w=[],M=_();M!==e;)w.push(M),M=_();if(t.substr(i,2)===oe?(M=oe,i+=2):(M=e,E===0&&N(js)),M!==e){for(F=[],D=_();D!==e;)F.push(D),D=_();if(D=Ht(),D!==e){for(B=[],Q=_();Q!==e;)B.push(Q),Q=_();X=v,v=va(s,b,D)}else i=v,v=e}else i=v,v=e}else i=v,v=e;if(v!==e)for(;v!==e;)if(d.push(v),v=i,b=De(),b!==e){for(w=[],M=_();M!==e;)w.push(M),M=_();if(t.substr(i,2)===oe?(M=oe,i+=2):(M=e,E===0&&N(js)),M!==e){for(F=[],D=_();D!==e;)F.push(D),D=_();if(D=Ht(),D!==e){for(B=[],Q=_();Q!==e;)B.push(Q),Q=_();X=v,v=va(s,b,D)}else i=v,v=e}else i=v,v=e}else i=v,v=e;else d=e;if(d!==e){if(v=i,t.charCodeAt(i)===42?(b=Ft,i++):(b=e,E===0&&N(sa)),b!==e){for(w=[],M=_();M!==e;)w.push(M),M=_();if(t.substr(i,2)===oe?(M=oe,i+=2):(M=e,E===0&&N(js)),M!==e){for(F=[],D=_();D!==e;)F.push(D),D=_();if(D=Ht(),D!==e){for(B=[],Q=_();Q!==e;)B.push(Q),Q=_();v=D}else i=v,v=e}else i=v,v=e}else i=v,v=e;for(v===e&&(v=null),b=[],w=_();w!==e;)b.push(w),w=_();t.charCodeAt(i)===125?(w=I,i++):(w=e,E===0&&N(tt)),w!==e?(X=l,l=Kl(s,d,v)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e;else i=l,l=e;return T[xe]={nextPos:i,result:l},l}function Fn(){var l,f,y,h,s,o,p,u,d=i*76+40,v=T[d];if(v)return i=v.nextPos,v.result;if(l=i,t.substr(i,4)===Ne?(f=Ne,i+=4):(f=e,E===0&&N(Rs)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(t.charCodeAt(i)===123?(h=S,i++):(h=e,E===0&&N(fr)),h!==e){for(s=[],o=_();o!==e;)s.push(o),o=_();if(o=ys(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();t.charCodeAt(i)===125?(u=I,i++):(u=e,E===0&&N(tt)),u!==e?(X=l,l=ga(o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return T[d]={nextPos:i,result:l},l}function Io(){var l,f,y=i*76+41,h=T[y];return h?(i=h.nextPos,h.result):(l=i,f=Ho(),f!==e&&(X=l,f=Jl(f)),l=f,T[y]={nextPos:i,result:l},l)}function Da(){var l,f,y,h,s,o,p=i*76+42,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===96?(f=me,i++):(f=e,E===0&&N(Ds)),f!==e){for(y=[],h=i,s=i,E++,t.charCodeAt(i)===96?(o=me,i++):(o=e,E===0&&N(Ds)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=La(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,t.charCodeAt(i)===96?(o=me,i++):(o=e,E===0&&N(Ds)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=La(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);t.charCodeAt(i)===96?(h=me,i++):(h=e,E===0&&N(Ds)),h!==e?(X=l,l=Xl(y)):(i=l,l=e)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function La(){var l,f,y,h,s,o,p=i*76+43,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===123?(f=S,i++):(f=e,E===0&&N(fr)),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();if(h=De(),h!==e){for(s=[],o=Ae();o!==e;)s.push(o),o=Ae();t.charCodeAt(i)===125?(o=I,i++):(o=e,E===0&&N(tt)),o!==e?l=h:(i=l,l=e)}else i=l,l=e}else i=l,l=e;if(l===e){if(l=i,f=[],y=Ba(),y!==e)for(;y!==e;)f.push(y),y=Ba();else f=e;f!==e&&(X=l,f=Gl(f)),l=f}return T[p]={nextPos:i,result:l},l}function Ba(){var l,f=i*76+44,y=T[f];return y?(i=y.nextPos,y.result):(l=Ha(),l===e&&(sr.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,E===0&&N(tl))),T[f]={nextPos:i,result:l},l)}function Ha(){var l,f,y,h=i*76+45,s=T[h];return s?(i=s.nextPos,s.result):(l=i,t.charCodeAt(i)===92?(f=mt,i++):(f=e,E===0&&N(Yn)),f!==e?(Ns.test(t.charAt(i))?(y=t.charAt(i),i++):(y=e,E===0&&N(Ls)),y!==e?l=y:(i=l,l=e)):(i=l,l=e),T[h]={nextPos:i,result:l},l)}function Zs(){var l,f,y,h,s,o,p=i*76+46,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===34?(f=$e,i++):(f=e,E===0&&N(Bs)),f!==e){for(y=[],h=i,s=i,E++,t.charCodeAt(i)===34?(o=$e,i++):(o=e,E===0&&N(Bs)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=On(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(or))),o!==e?(X=h,h=da(o)):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,t.charCodeAt(i)===34?(o=$e,i++):(o=e,E===0&&N(Bs)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=On(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(or))),o!==e?(X=h,h=da(o)):(i=h,h=e)):(i=h,h=e);t.charCodeAt(i)===34?(h=$e,i++):(h=e,E===0&&N(Bs)),h!==e?(X=l,l=Zl(y)):(i=l,l=e)}else i=l,l=e;if(l===e)if(l=i,t.charCodeAt(i)===39?(f=he,i++):(f=e,E===0&&N(Hs)),f!==e){for(y=[],h=i,s=i,E++,t.charCodeAt(i)===39?(o=he,i++):(o=e,E===0&&N(Hs)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Nn(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(or))),o!==e?(X=h,h=ya(o)):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=i,E++,t.charCodeAt(i)===39?(o=he,i++):(o=e,E===0&&N(Hs)),E--,o===e?s=void 0:(i=s,s=e),s!==e?(o=Nn(),o===e&&(t.length>i?(o=t.charAt(i),i++):(o=e,E===0&&N(or))),o!==e?(X=h,h=ya(o)):(i=h,h=e)):(i=h,h=e);t.charCodeAt(i)===39?(h=he,i++):(h=e,E===0&&N(Hs)),h!==e?(X=l,l=wa(y)):(i=l,l=e)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function On(){var l,f,y=i*76+47,h=T[y];return h?(i=h.nextPos,h.result):(l=i,t.substr(i,2)===Le?(f=Le,i+=2):(f=e,E===0&&N(Us)),f!==e&&(X=l,f=Ql()),l=f,T[y]={nextPos:i,result:l},l)}function Nn(){var l,f,y=i*76+48,h=T[y];return h?(i=h.nextPos,h.result):(l=i,t.substr(i,2)===Re?(f=Re,i+=2):(f=e,E===0&&N(qs)),f!==e&&(X=l,f=ma()),l=f,T[y]={nextPos:i,result:l},l)}function Ua(){var l,f=i*76+49,y=T[f];return y?(i=y.nextPos,y.result):(l=In(),l===e&&(l=qa()),T[f]={nextPos:i,result:l},l)}function In(){var l,f,y,h,s,o,p=i*76+50,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,rs.test(t.charAt(i))?(t.charAt(i),i++):E===0&&N(zs),Lt.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(aa)),f!==e){if(y=[],vt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(Nt)),h!==e)for(;h!==e;)y.push(h),vt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(Nt));else y=e;if(y!==e)if(t.charCodeAt(i)===46?(h=z,i++):(h=e,E===0&&N(gs)),h!==e){if(s=[],vt.test(t.charAt(i))?(o=t.charAt(i),i++):(o=e,E===0&&N(Nt)),o!==e)for(;o!==e;)s.push(o),vt.test(t.charAt(i))?(o=t.charAt(i),i++):(o=e,E===0&&N(Nt));else s=e;s!==e?(X=l,l=Yl()):(i=l,l=e)}else i=l,l=e;else i=l,l=e}else i=l,l=e;if(l===e)if(l=i,rs.test(t.charAt(i))?(t.charAt(i),i++):E===0&&N(zs),vt.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(Nt)),f!==e)if(t.charCodeAt(i)===46?(y=z,i++):(y=e,E===0&&N(gs)),y!==e){if(h=[],vt.test(t.charAt(i))?(s=t.charAt(i),i++):(s=e,E===0&&N(Nt)),s!==e)for(;s!==e;)h.push(s),vt.test(t.charAt(i))?(s=t.charAt(i),i++):(s=e,E===0&&N(Nt));else h=e;h!==e?(X=l,l=eo()):(i=l,l=e)}else i=l,l=e;else i=l,l=e;return T[p]={nextPos:i,result:l},l}function qa(){var l,f,y,h,s=i*76+51,o=T[s];if(o)return i=o.nextPos,o.result;if(l=i,rs.test(t.charAt(i))?(t.charAt(i),i++):E===0&&N(zs),Lt.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(aa)),f!==e){if(y=[],vt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(Nt)),h!==e)for(;h!==e;)y.push(h),vt.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(Nt));else y=e;y!==e?(X=l,l=to()):(i=l,l=e)}else i=l,l=e;return l===e&&(l=i,rs.test(t.charAt(i))?(t.charAt(i),i++):E===0&&N(zs),vt.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(Nt)),f!==e?(X=l,l=ro()):(i=l,l=e)),T[s]={nextPos:i,result:l},l}function Tn(){var l,f=i*76+52,y=T[f];return y?(i=y.nextPos,y.result):(l=za(),l===e&&(l=To()),T[f]={nextPos:i,result:l},l)}function za(){var l,f,y,h,s=i*76+53,o=T[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,4)===He?(f=He,i+=4):(f=e,E===0&&N(ia)),f!==e?(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=so()):(i=l,l=e)):(i=l,l=e),T[s]={nextPos:i,result:l},l)}function To(){var l,f,y,h,s=i*76+54,o=T[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,5)===We?(f=We,i+=5):(f=e,E===0&&N(cr)),f!==e?(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=no()):(i=l,l=e)):(i=l,l=e),T[s]={nextPos:i,result:l},l)}function Va(){var l,f,y,h,s=i*76+55,o=T[s];return o?(i=o.nextPos,o.result):(l=i,t.substr(i,4)===Ze?(f=Ze,i+=4):(f=e,E===0&&N(rl)),f!==e?(y=i,E++,Ct.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(gr)),E--,h===e?y=void 0:(i=y,y=e),y!==e?(X=l,l=ao()):(i=l,l=e)):(i=l,l=e),T[s]={nextPos:i,result:l},l)}function Wa(){var l,f,y,h,s,o,p,u,d,v,b,w,M,F,D=i*76+56,B=T[D];if(B)return i=B.nextPos,B.result;if(l=i,t.charCodeAt(i)===123?(f=S,i++):(f=e,E===0&&N(fr)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(h=[],s=i,o=Ue(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();if(t.charCodeAt(i)===58?(u=re,i++):(u=e,E===0&&N(xt)),u!==e){if(d=[],v=_(),v!==e)for(;v!==e;)d.push(v),v=_();else d=e;if(d!==e)if(v=De(),v!==e){for(b=[],w=_();w!==e;)b.push(w),w=_();for(t.charCodeAt(i)===44?(w=V,i++):(w=e,E===0&&N(At)),w===e&&(t.charCodeAt(i)===59?(w=at,i++):(w=e,E===0&&N(Vs))),w===e&&(w=null),M=[],F=_();F!==e;)M.push(F),F=_();X=s,s=xa(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;for(;s!==e;)if(h.push(s),s=i,o=Ue(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();if(t.charCodeAt(i)===58?(u=re,i++):(u=e,E===0&&N(xt)),u!==e){if(d=[],v=_(),v!==e)for(;v!==e;)d.push(v),v=_();else d=e;if(d!==e)if(v=De(),v!==e){for(b=[],w=_();w!==e;)b.push(w),w=_();for(t.charCodeAt(i)===44?(w=V,i++):(w=e,E===0&&N(At)),w===e&&(t.charCodeAt(i)===59?(w=at,i++):(w=e,E===0&&N(Vs))),w===e&&(w=null),M=[],F=_();F!==e;)M.push(F),F=_();X=s,s=xa(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;t.charCodeAt(i)===125?(s=I,i++):(s=e,E===0&&N(tt)),s!==e?(X=l,l=io(h)):(i=l,l=e)}else i=l,l=e;return T[D]={nextPos:i,result:l},l}function jo(){var l,f,y,h,s,o,p,u,d,v,b=i*76+57,w=T[b];if(w)return i=w.nextPos,w.result;if(l=i,t.charCodeAt(i)===91?(f=Dt,i++):(f=e,E===0&&N(bn)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(h=[],s=i,o=De(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(At)),u===e&&(u=null),d=[],v=_();v!==e;)d.push(v),v=_();X=s,s=$a(o)}else i=s,s=e;for(;s!==e;)if(h.push(s),s=i,o=De(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(At)),u===e&&(u=null),d=[],v=_();v!==e;)d.push(v),v=_();X=s,s=$a(o)}else i=s,s=e;for(s=[],o=_();o!==e;)s.push(o),o=_();t.charCodeAt(i)===93?(o=H,i++):(o=e,E===0&&N(Is)),o!==e?(X=l,l=ba(h)):(i=l,l=e)}else i=l,l=e;return T[b]={nextPos:i,result:l},l}function jn(){var l,f,y,h,s,o,p,u=i*76+58,d=T[u];if(d)return i=d.nextPos,d.result;if(l=i,f=Ue(),f!==e){for(y=i,h=[],s=_();s!==e;)h.push(s),s=_();if(t.charCodeAt(i)===58?(s=re,i++):(s=e,E===0&&N(xt)),s!==e){for(o=[],p=_();p!==e;)o.push(p),p=_();p=Gt(),p!==e?y=p:(i=y,y=e)}else i=y,y=e;y===e&&(y=null),X=l,l=lo(f,y)}else i=l,l=e;return T[u]={nextPos:i,result:l},l}function Rn(){var l,f,y,h,s,o,p=i*76+59,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,f=jn(),f!==e){for(y=[],h=i,s=Jr(),s!==e?(o=jn(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=Jr(),s!==e?(o=jn(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);X=l,l=Aa(f,y)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function Ka(){var l,f,y,h,s,o,p,u,d,v,b,w,M,F,D,B,Q,xe=i*76+60,ne=T[xe];if(ne)return i=ne.nextPos,ne.result;if(l=i,t.charCodeAt(i)===64?(f=it,i++):(f=e,E===0&&N(sl)),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();if(h=Ue(),h!==e){for(s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(t.charCodeAt(i)===40?(o=A,i++):(o=e,E===0&&N(_r)),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();for(u=Rn(),u===e&&(u=null),d=[],v=_();v!==e;)d.push(v),v=_();if(t.charCodeAt(i)===41?(v=C,i++):(v=e,E===0&&N(Ot)),v!==e){for(b=i,w=[],M=_();M!==e;)w.push(M),M=_();if(t.charCodeAt(i)===58?(M=re,i++):(M=e,E===0&&N(xt)),M!==e){for(F=[],D=_();D!==e;)F.push(D),D=_();D=Gt(),D!==e?b=D:(i=b,b=e)}else i=b,b=e;for(b===e&&(b=null),w=[],M=_();M!==e;)w.push(M),M=_();if(t.charCodeAt(i)===123?(M=S,i++):(M=e,E===0&&N(fr)),M!==e){for(F=[],D=_();D!==e;)F.push(D),D=_();for(D=ys(),D===e&&(D=null),B=[],Q=_();Q!==e;)B.push(Q),Q=_();t.charCodeAt(i)===125?(Q=I,i++):(Q=e,E===0&&N(tt)),Q!==e?(X=l,l=oo(y,h,s,u,b,D)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e}else i=l,l=e;return T[xe]={nextPos:i,result:l},l}function Ro(){var l,f,y,h,s,o,p,u,d,v,b,w,M,F=i*76+61,D=T[F];if(D)return i=D.nextPos,D.result;if(l=i,t.substr(i,2)===bt?(f=bt,i+=2):(f=e,E===0&&N(ds)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();for(h=Rn(),h===e&&(h=null),s=[],o=_();o!==e;)s.push(o),o=_();if(t.charCodeAt(i)===41?(o=C,i++):(o=e,E===0&&N(Ot)),o!==e){for(p=i,u=[],d=_();d!==e;)u.push(d),d=_();if(t.charCodeAt(i)===58?(d=re,i++):(d=e,E===0&&N(xt)),d!==e){for(v=[],b=_();b!==e;)v.push(b),b=_();b=Gt(),b!==e?p=b:(i=p,p=e)}else i=p,p=e;for(p===e&&(p=null),u=[],d=_();d!==e;)u.push(d),d=_();if(t.charCodeAt(i)===123?(d=S,i++):(d=e,E===0&&N(fr)),d!==e){for(v=[],b=_();b!==e;)v.push(b),b=_();for(b=ys(),b===e&&(b=null),w=[],M=_();M!==e;)w.push(M),M=_();t.charCodeAt(i)===125?(M=I,i++):(M=e,E===0&&N(tt)),M!==e?(X=l,l=uo(h,p,b)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return T[F]={nextPos:i,result:l},l}function Dn(){var l,f,y,h,s,o,p,u,d,v,b=i*76+62,w=T[b];if(w)return i=w.nextPos,w.result;if(l=i,t.charCodeAt(i)===91?(f=Dt,i++):(f=e,E===0&&N(bn)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(h=[],s=i,o=Te(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(At)),u===e&&(u=null),d=[],v=_();v!==e;)d.push(v),v=_();X=s,s=_a(o)}else i=s,s=e;for(;s!==e;)if(h.push(s),s=i,o=Te(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();for(t.charCodeAt(i)===44?(u=V,i++):(u=e,E===0&&N(At)),u===e&&(u=null),d=[],v=_();v!==e;)d.push(v),v=_();X=s,s=_a(o)}else i=s,s=e;for(s=[],o=_();o!==e;)s.push(o),o=_();t.charCodeAt(i)===93?(o=H,i++):(o=e,E===0&&N(Is)),o!==e?(X=l,l=fo(h)):(i=l,l=e)}else i=l,l=e;return T[b]={nextPos:i,result:l},l}function Ja(){var l,f,y,h,s,o,p,u,d,v,b,w,M,F,D=i*76+63,B=T[D];if(B)return i=B.nextPos,B.result;if(l=i,t.charCodeAt(i)===123?(f=S,i++):(f=e,E===0&&N(fr)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();if(h=[],s=i,o=Ue(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();if(t.charCodeAt(i)===58?(u=re,i++):(u=e,E===0&&N(xt)),u!==e){if(d=[],v=_(),v!==e)for(;v!==e;)d.push(v),v=_();else d=e;if(d!==e)if(v=Te(),v!==e){for(b=[],w=_();w!==e;)b.push(w),w=_();for(t.charCodeAt(i)===44?(w=V,i++):(w=e,E===0&&N(At)),w===e&&(t.charCodeAt(i)===59?(w=at,i++):(w=e,E===0&&N(Vs))),w===e&&(w=null),M=[],F=_();F!==e;)M.push(F),F=_();X=s,s=Ca(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;for(;s!==e;)if(h.push(s),s=i,o=Ue(),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();if(t.charCodeAt(i)===58?(u=re,i++):(u=e,E===0&&N(xt)),u!==e){if(d=[],v=_(),v!==e)for(;v!==e;)d.push(v),v=_();else d=e;if(d!==e)if(v=Te(),v!==e){for(b=[],w=_();w!==e;)b.push(w),w=_();for(t.charCodeAt(i)===44?(w=V,i++):(w=e,E===0&&N(At)),w===e&&(t.charCodeAt(i)===59?(w=at,i++):(w=e,E===0&&N(Vs))),w===e&&(w=null),M=[],F=_();F!==e;)M.push(F),F=_();X=s,s=Ca(o,v)}else i=s,s=e;else i=s,s=e}else i=s,s=e}else i=s,s=e;t.charCodeAt(i)===125?(s=I,i++):(s=e,E===0&&N(tt)),s!==e?(X=l,l=ka(h)):(i=l,l=e)}else i=l,l=e;return T[D]={nextPos:i,result:l},l}function Gt(){var l,f=i*76+64,y=T[f];return y?(i=y.nextPos,y.result):(l=Do(),l===e&&(l=Bo()),T[f]={nextPos:i,result:l},l)}function Do(){var l,f,y,h,s,o,p,u,d,v,b=i*76+65,w=T[b];if(w)return i=w.nextPos,w.result;if(l=i,t.substr(i,2)===bt?(f=bt,i+=2):(f=e,E===0&&N(ds)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();for(h=Lo(),h===e&&(h=null),s=[],o=_();o!==e;)s.push(o),o=_();if(t.charCodeAt(i)===41?(o=C,i++):(o=e,E===0&&N(Ot)),o!==e){for(p=[],u=_();u!==e;)p.push(u),u=_();if(t.substr(i,2)===oe?(u=oe,i+=2):(u=e,E===0&&N(js)),u!==e){for(d=[],v=_();v!==e;)d.push(v),v=_();v=Gt(),v!==e?(X=l,l=co(h,v)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return T[b]={nextPos:i,result:l},l}function Lo(){var l,f,y,h,s,o,p=i*76+66,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Gt(),f!==e){for(y=[],h=i,s=Jr(),s!==e?(o=Gt(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,s=Jr(),s!==e?(o=Gt(),o!==e?h=o:(i=h,h=e)):(i=h,h=e);X=l,l=Pa(f,y)}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function Bo(){var l,f,y,h,s,o,p,u,d=i*76+67,v=T[d];if(v)return i=v.nextPos,v.result;if(l=i,f=Ue(),f!==e){for(y=[],h=Ae();h!==e;)y.push(h),h=Ae();if(t.charCodeAt(i)===60?(h=Ye,i++):(h=e,E===0&&N(ta)),h!==e){for(s=[],o=Ae();o!==e;)s.push(o),o=Ae();if(o=Gt(),o!==e){for(p=[],u=Ae();u!==e;)p.push(u),u=Ae();t.charCodeAt(i)===62?(u=Br,i++):(u=e,E===0&&N($n)),u!==e?(X=l,l=ho(f,o)):(i=l,l=e)}else i=l,l=e}else i=l,l=e}else i=l,l=e;return l===e&&(l=i,f=Ue(),f!==e&&(X=l,f=po(f)),l=f),T[d]={nextPos:i,result:l},l}function Ue(){var l,f,y,h,s=i*76+68,o=T[s];if(o)return i=o.nextPos,o.result;if(l=i,qt.test(t.charAt(i))?(f=t.charAt(i),i++):(f=e,E===0&&N(nl)),f!==e){for(y=[],Zn.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(_n));h!==e;)y.push(h),Zn.test(t.charAt(i))?(h=t.charAt(i),i++):(h=e,E===0&&N(_n));X=l,l=vo()}else i=l,l=e;return T[s]={nextPos:i,result:l},l}function Ho(){var l,f,y,h,s,o,p=i*76+69,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,f=Ue(),f!==e){for(y=[],h=i,t.charCodeAt(i)===58?(s=re,i++):(s=e,E===0&&N(xt)),s!==e?(o=Ue(),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);h!==e;)y.push(h),h=i,t.charCodeAt(i)===58?(s=re,i++):(s=e,E===0&&N(xt)),s!==e?(o=Ue(),o!==e?(s=[s,o],h=s):(i=h,h=e)):(i=h,h=e);X=l,l=go()}else i=l,l=e;return T[p]={nextPos:i,result:l},l}function Jr(){var l,f,y,h,s,o=i*76+70,p=T[o];if(p)return i=p.nextPos,p.result;for(l=i,f=[],y=_();y!==e;)f.push(y),y=_();if(t.charCodeAt(i)===44?(y=V,i++):(y=e,E===0&&N(At)),y!==e){for(h=[],s=_();s!==e;)h.push(s),s=_();f=[f,y,h],l=f}else i=l,l=e;if(l===e)if(l=[],f=_(),f!==e)for(;f!==e;)l.push(f),f=_();else l=e;return T[o]={nextPos:i,result:l},l}function Ht(){var l,f,y,h,s,o,p=i*76+71,u=T[p];if(u)return i=u.nextPos,u.result;if(l=i,t.charCodeAt(i)===123?(f=S,i++):(f=e,E===0&&N(fr)),f!==e){for(y=[],h=_();h!==e;)y.push(h),h=_();for(h=ys(),h===e&&(h=null),s=[],o=_();o!==e;)s.push(o),o=_();t.charCodeAt(i)===125?(o=I,i++):(o=e,E===0&&N(tt)),o!==e?(X=l,l=yo(h)):(i=l,l=e)}else i=l,l=e;return l===e&&(l=yr()),T[p]={nextPos:i,result:l},l}function qe(){var l,f=i*76+72,y=T[f];return y?(i=y.nextPos,y.result):(t.substr(i,2)===Kt?(l=Kt,i+=2):(l=e,E===0&&N(al)),l===e&&(Qn.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,E===0&&N(la))),T[f]={nextPos:i,result:l},l)}function Xa(){var l,f,y=i*76+73,h=T[y];return h?(i=h.nextPos,h.result):(l=i,E++,t.length>i?(f=t.charAt(i),i++):(f=e,E===0&&N(or)),E--,f===e?l=void 0:(i=l,l=e),l===e&&(l=qe()),T[y]={nextPos:i,result:l},l)}function _(){var l,f=i*76+74,y=T[f];return y?(i=y.nextPos,y.result):(Ii.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,E===0&&N(il)),T[f]={nextPos:i,result:l},l)}function Ae(){var l,f=i*76+75,y=T[f];return y?(i=y.nextPos,y.result):(Ti.test(t.charAt(i))?(l=t.charAt(i),i++):(l=e,E===0&&N(ll)),T[f]={nextPos:i,result:l},l)}function ie(l,f,y){const h={type:l};f.children=y;for(const o of Object.keys(f))f[o]!==void 0&&(h[o]=f[o]);const s=R();return h.loc={start:s.start.offset,end:s.end.offset-1},h}if(Vr=g(),Vr!==e&&i===t.length)return Vr;throw Vr!==e&&i`}else return t.name;case"fnTypeSource":{const r=t.args.map(n=>Wf(n)).join(", "),e=Wf(t.result);return`@(${r}) { ${e} }`}}}function zu(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return Zv(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=zu(t.inner):r=Zv("any"),nA(t.name,[r])}}throw new gu(`Unknown type: '${Wf(t)}'`)}else{const r=t.args.map(e=>zu(e));return aA(r,zu(t.result))}}function iA(t){switch(t.type){case"def":{t.varType!=null&&zu(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&zu(r.argType);t.retType!=null&&zu(t.retType);break}}return t}function lA(t){for(const r of t)ct(r,iA);return t}function Kf(t){const r=[],e=[];for(const n of t)if(n.type==="attr")e.push(n);else if(n.type==="def")n.attr==null&&(n.attr=[]),n.attr.push(...e),e.splice(0,e.length),n.expr.type==="fn"&&(n.expr.children=Kf(n.expr.children)),r.push(n);else{if(e.length>0)throw new gu("invalid attribute.");switch(n.type){case"fn":{n.children=Kf(n.children);break}case"block":{n.statements=Kf(n.statements);break}}r.push(n)}if(e.length>0)throw new gu("invalid attribute.");return r}function oA(t){if(Q1(t)&&Nd(t)&&t.chain!=null){const{chain:r,...e}=t;let n=e;for(const c of r)switch(c.type){case"callChain":{n=Y1(n,c.args,c.loc);break}case"indexChain":{n=eA(n,c.index,c.loc);break}case"propChain":{n=tA(n,c.name,c.loc);break}}return n}return t}function uA(t){for(let r=0;r":{func:"Core:gt",priority:4},"<=":{func:"Core:lteq",priority:4},">=":{func:"Core:gteq",priority:4},"&&":{mapFn:t=>({type:"and",left:Yo(t.left),right:Yo(t.right)}),priority:3},"||":{mapFn:t=>({type:"or",left:Yo(t.left),right:Yo(t.right)}),priority:3}};function cA(t){const r=t.operators.map(n=>{const c=fA[n];if(c==null)throw new gu(`No such operator: ${n}.`);return c});let e=Jf(t.operands[0],t.operands[1],r[0]);for(let n=0;ne.type==="infix"?cA(e):e);return t}const Xo=class Xo{constructor(){be(this,"plugins");this.plugins={validate:[sA,lA],transform:[Kf,uA,hA]}}static parse(r){return Xo.instance==null&&(Xo.instance=new Xo),Xo.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;try{const n=Gv(r,{startRule:"Preprocess"});e=Gv(n,{startRule:"Main"})}catch(n){throw n.location?n.expected?new gu(`Parsing error. (Line ${n.location.start.line}:${n.location.start.column})`):new gu(`${n.message} (Line ${n.location.start.line}:${n.location.start.column})`):n}for(const n of this.plugins.validate)e=n(e);for(const n of this.plugins.transform)e=n(e);return e}};be(Xo,"instance");let jh=Xo;const Qv="0.14.1",pA={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { + <: if (i % 15 == 0) "FizzBuzz" + elif (i % 3 == 0) "Fizz" + elif (i % 5 == 0) "Buzz" + else i + }`},vA=t=>(vf("data-v-b9f39d34"),t=t(),gf(),t),gA={id:"root"},dA={id:"grid1"},yA={class:"type"},wA={id:"grid2"},mA=vA(()=>Mt("header",null,null,-1)),xA=si({__name:"index",setup(t){const r=wr(window.localStorage.getItem(Qv)??'<: "Hello, AiScript!"'),e=wr(null),n=wr([]),c=wr(null);ri(r,()=>{window.localStorage.setItem(Qv,r.value);try{e.value=jh.parse(r.value),c.value=null}catch(x){const m=x;c.value=m.message,console.error("info"in m?m.info:m);return}},{immediate:!0});let g=null;const $=async()=>{n.value=[],g==null||g.abort(),g=new Os({},{in:x=>new Promise(m=>{const A=window.prompt(x);m(A??"")}),out:x=>{n.value.push({id:Math.random(),type:x.type,text:Nh(x,!0),print:!0})},log:(x,m)=>{switch(x){case"end":n.value.push({id:Math.random(),text:Nh(m.val,!0),print:!1});break}}});try{await g.exec(e.value)}catch(x){console.error(x),window.alert("{e}")}};return(x,m)=>(wt(),Ut("div",gA,[Mt("div",dA,[nt(yf,{modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=A=>r.value=A),samples:Mi(pA),parseError:c.value,onRun:$},null,8,["modelValue","samples","parseError"]),nt(Fr,{id:"logs"},{header:ot(()=>[It("Output")]),default:ot(()=>[(wt(!0),Ut(Ir,null,fu(n.value,A=>(wt(),Ut("div",{class:Tr(["log",[{print:A.print},A.type]]),key:A.id},[Mt("span",yA,Dr(A.type),1),It(" "+Dr(A.text),1)],2))),128))]),_:1})]),Mt("div",wA,[nt(Fr,{id:"ast"},{header:ot(()=>[It("AST")]),default:ot(()=>[Mt("pre",null,Dr(JSON.stringify(e.value,null," ")),1)]),_:1}),nt(Fr,{id:"bin"},{header:ot(()=>[It("Bytecode")]),default:ot(()=>[mA]),_:1}),nt(Fr,{id:"debugger"},{header:ot(()=>[It("Debugger")]),_:1})])]))}});const $A=ai(xA,[["__scopeId","data-v-b9f39d34"]]),Yv="0.16.0",bA=si({__name:"App",setup(t){const r=["next","develop","0.16.0","0.15.0","0.14.1"],e=wr(window.localStorage.getItem("version")??Yv),n=Object.fromEntries(r.map(g=>[g,g+(g==Yv?"(latest)":"")]));function c(g){e.value=g,window.localStorage.setItem("version",e.value)}return(g,$)=>(wt(),Ut(Ir,null,[Mt("h1",null,[It("AiScript ( "),nt(Zg,{id:"version",options:Mi(n),onSelect:c},{default:ot(()=>[It(Dr(e.value),1)]),_:1},8,["options"]),It(" ) Playground")]),e.value==="next"?(wt(),wi($x,{key:0})):Xn("",!0),e.value==="develop"?(wt(),wi(N$,{key:1})):Xn("",!0),e.value==="0.16.0"?(wt(),wi(Hb,{key:2})):Xn("",!0),e.value==="0.15.0"?(wt(),wi(O1,{key:3})):Xn("",!0),e.value==="0.14.1"?(wt(),wi($A,{key:4})):Xn("",!0)],64))}});const AA=ai(bA,[["__scopeId","data-v-425f78ee"]]);lw(AA).mount("#app"); diff --git a/assets/index-b465af9a.js b/assets/index-b465af9a.js deleted file mode 100644 index 25deaf3..0000000 --- a/assets/index-b465af9a.js +++ /dev/null @@ -1,67 +0,0 @@ -var zp=Object.defineProperty;var qp=(t,r,e)=>r in t?zp(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e;var Be=(t,r,e)=>(qp(t,typeof r!="symbol"?r+"":r,e),e);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))a(h);new MutationObserver(h=>{for(const d of h)if(d.type==="childList")for(const x of d.addedNodes)x.tagName==="LINK"&&x.rel==="modulepreload"&&a(x)}).observe(document,{childList:!0,subtree:!0});function e(h){const d={};return h.integrity&&(d.integrity=h.integrity),h.referrerPolicy&&(d.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?d.credentials="include":h.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function a(h){if(h.ep)return;h.ep=!0;const d=e(h);fetch(h.href,d)}})();function Uf(t,r){const e=Object.create(null),a=t.split(",");for(let h=0;h!!e[h.toLowerCase()]:h=>!!e[h]}const Ot={},ua=[],bs=()=>{},Kp=()=>!1,Vp=/^on[^a-z]/,Su=t=>Vp.test(t),Bf=t=>t.startsWith("onUpdate:"),Xt=Object.assign,zf=(t,r)=>{const e=t.indexOf(r);e>-1&&t.splice(e,1)},Wp=Object.prototype.hasOwnProperty,et=(t,r)=>Wp.call(t,r),je=Array.isArray,fa=t=>Tu(t)==="[object Map]",Ph=t=>Tu(t)==="[object Set]",qe=t=>typeof t=="function",Wt=t=>typeof t=="string",Fu=t=>typeof t=="symbol",kt=t=>t!==null&&typeof t=="object",kh=t=>(kt(t)||qe(t))&&qe(t.then)&&qe(t.catch),Eh=Object.prototype.toString,Tu=t=>Eh.call(t),Jp=t=>Tu(t).slice(8,-1),Mh=t=>Tu(t)==="[object Object]",qf=t=>Wt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,uu=Uf(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ou=t=>{const r=Object.create(null);return e=>r[e]||(r[e]=t(e))},Zp=/-(\w)/g,xa=Ou(t=>t.replace(Zp,(r,e)=>e?e.toUpperCase():"")),Xp=/\B([A-Z])/g,Ca=Ou(t=>t.replace(Xp,"-$1").toLowerCase()),Sh=Ou(t=>t.charAt(0).toUpperCase()+t.slice(1)),Vu=Ou(t=>t?`on${Sh(t)}`:""),xi=(t,r)=>!Object.is(t,r),Wu=(t,r)=>{for(let e=0;e{Object.defineProperty(t,r,{configurable:!0,enumerable:!1,value:e})},Yp=t=>{const r=parseFloat(t);return isNaN(r)?t:r},Qp=t=>{const r=Wt(t)?Number(t):NaN;return isNaN(r)?t:r};let _c;const pf=()=>_c||(_c=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Kf(t){if(je(t)){const r={};for(let e=0;e{if(e){const a=e.split(eg);a.length>1&&(r[a[0].trim()]=a[1].trim())}}),r}function tr(t){let r="";if(Wt(t))r=t;else if(je(t))for(let e=0;eWt(t)?t:t==null?"":je(t)||kt(t)&&(t.toString===Eh||!qe(t.toString))?JSON.stringify(t,Th,2):String(t),Th=(t,r)=>r&&r.__v_isRef?Th(t,r.value):fa(r)?{[`Map(${r.size})`]:[...r.entries()].reduce((e,[a,h])=>(e[`${a} =>`]=h,e),{})}:Ph(r)?{[`Set(${r.size})`]:[...r.values()]}:kt(r)&&!je(r)&&!Mh(r)?String(r):r;let ws;class ig{constructor(r=!1){this.detached=r,this._active=!0,this.effects=[],this.cleanups=[],this.parent=ws,!r&&ws&&(this.index=(ws.scopes||(ws.scopes=[])).push(this)-1)}get active(){return this._active}run(r){if(this._active){const e=ws;try{return ws=this,r()}finally{ws=e}}}on(){ws=this}off(){ws=this.parent}stop(r){if(this._active){let e,a;for(e=0,a=this.effects.length;e{const r=new Set(t);return r.w=0,r.n=0,r},Oh=t=>(t.w&An)>0,Ih=t=>(t.n&An)>0,og=({deps:t})=>{if(t.length)for(let r=0;r{const{deps:r}=t;if(r.length){let e=0;for(let a=0;a{(k==="length"||!Fu(k)&&k>=A)&&$.push(C)})}else switch(e!==void 0&&$.push(x.get(e)),r){case"add":je(t)?qf(e)&&$.push(x.get("length")):($.push(x.get(gi)),fa(t)&&$.push(x.get(df)));break;case"delete":je(t)||($.push(x.get(gi)),fa(t)&&$.push(x.get(df)));break;case"set":fa(t)&&$.push(x.get(gi));break}if($.length===1)$[0]&&yf($[0]);else{const A=[];for(const C of $)C&&A.push(...C);yf(Vf(A))}}function yf(t,r){const e=je(t)?t:[...t];for(const a of e)a.computed&&Pc(a);for(const a of e)a.computed||Pc(a)}function Pc(t,r){(t!==$s||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const fg=Uf("__proto__,__v_isRef,__isVue"),Rh=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Fu)),kc=cg();function cg(){const t={};return["includes","indexOf","lastIndexOf"].forEach(r=>{t[r]=function(...e){const a=it(this);for(let d=0,x=this.length;d{t[r]=function(...e){Pa();const a=it(this)[r].apply(this,e);return ka(),a}}),t}function hg(t){const r=it(this);return Ir(r,"has",t),r.hasOwnProperty(t)}class Dh{constructor(r=!1,e=!1){this._isReadonly=r,this._shallow=e}get(r,e,a){const h=this._isReadonly,d=this._shallow;if(e==="__v_isReactive")return!h;if(e==="__v_isReadonly")return h;if(e==="__v_isShallow")return d;if(e==="__v_raw"&&a===(h?d?Cg:Bh:d?Uh:Hh).get(r))return r;const x=je(r);if(!h){if(x&&et(kc,e))return Reflect.get(kc,e,a);if(e==="hasOwnProperty")return hg}const $=Reflect.get(r,e,a);return(Fu(e)?Rh.has(e):fg(e))||(h||Ir(r,"get",e),d)?$:mr($)?x&&qf(e)?$:$.value:kt($)?h?zh($):Xf($):$}}class Lh extends Dh{constructor(r=!1){super(!1,r)}set(r,e,a,h){let d=r[e];if(ba(d)&&mr(d)&&!mr(a))return!1;if(!this._shallow&&(!_u(a)&&!ba(a)&&(d=it(d),a=it(a)),!je(r)&&mr(d)&&!mr(a)))return d.value=a,!0;const x=je(r)&&qf(e)?Number(e)t,Iu=t=>Reflect.getPrototypeOf(t);function Qo(t,r,e=!1,a=!1){t=t.__v_raw;const h=it(t),d=it(r);e||(xi(r,d)&&Ir(h,"get",r),Ir(h,"get",d));const{has:x}=Iu(h),$=a?Jf:e?Qf:Ko;if(x.call(h,r))return $(t.get(r));if(x.call(h,d))return $(t.get(d));t!==h&&t.get(r)}function Go(t,r=!1){const e=this.__v_raw,a=it(e),h=it(t);return r||(xi(t,h)&&Ir(a,"has",t),Ir(a,"has",h)),t===h?e.has(t):e.has(t)||e.has(h)}function eu(t,r=!1){return t=t.__v_raw,!r&&Ir(it(t),"iterate",gi),Reflect.get(t,"size",t)}function Ec(t){t=it(t);const r=it(this);return Iu(r).has.call(r,t)||(r.add(t),Us(r,"add",t,t)),this}function Mc(t,r){r=it(r);const e=it(this),{has:a,get:h}=Iu(e);let d=a.call(e,t);d||(t=it(t),d=a.call(e,t));const x=h.call(e,t);return e.set(t,r),d?xi(r,x)&&Us(e,"set",t,r):Us(e,"add",t,r),this}function Sc(t){const r=it(this),{has:e,get:a}=Iu(r);let h=e.call(r,t);h||(t=it(t),h=e.call(r,t)),a&&a.call(r,t);const d=r.delete(t);return h&&Us(r,"delete",t,void 0),d}function Fc(){const t=it(this),r=t.size!==0,e=t.clear();return r&&Us(t,"clear",void 0,void 0),e}function tu(t,r){return function(a,h){const d=this,x=d.__v_raw,$=it(x),A=r?Jf:t?Qf:Ko;return!t&&Ir($,"iterate",gi),x.forEach((C,k)=>a.call(h,A(C),A(k),d))}}function ru(t,r,e){return function(...a){const h=this.__v_raw,d=it(h),x=fa(d),$=t==="entries"||t===Symbol.iterator&&x,A=t==="keys"&&x,C=h[t](...a),k=e?Jf:r?Qf:Ko;return!r&&Ir(d,"iterate",A?df:gi),{next(){const{value:S,done:I}=C.next();return I?{value:S,done:I}:{value:$?[k(S[0]),k(S[1])]:k(S),done:I}},[Symbol.iterator](){return this}}}}function on(t){return function(...r){return t==="delete"?!1:this}}function yg(){const t={get(d){return Qo(this,d)},get size(){return eu(this)},has:Go,add:Ec,set:Mc,delete:Sc,clear:Fc,forEach:tu(!1,!1)},r={get(d){return Qo(this,d,!1,!0)},get size(){return eu(this)},has:Go,add:Ec,set:Mc,delete:Sc,clear:Fc,forEach:tu(!1,!0)},e={get(d){return Qo(this,d,!0)},get size(){return eu(this,!0)},has(d){return Go.call(this,d,!0)},add:on("add"),set:on("set"),delete:on("delete"),clear:on("clear"),forEach:tu(!0,!1)},a={get(d){return Qo(this,d,!0,!0)},get size(){return eu(this,!0)},has(d){return Go.call(this,d,!0)},add:on("add"),set:on("set"),delete:on("delete"),clear:on("clear"),forEach:tu(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(d=>{t[d]=ru(d,!1,!1),e[d]=ru(d,!0,!1),r[d]=ru(d,!1,!0),a[d]=ru(d,!0,!0)}),[t,e,r,a]}const[mg,wg,$g,xg]=yg();function Zf(t,r){const e=r?t?xg:$g:t?wg:mg;return(a,h,d)=>h==="__v_isReactive"?!t:h==="__v_isReadonly"?t:h==="__v_raw"?a:Reflect.get(et(e,h)&&h in a?e:a,h,d)}const bg={get:Zf(!1,!1)},Ag={get:Zf(!1,!0)},_g={get:Zf(!0,!1)},Hh=new WeakMap,Uh=new WeakMap,Bh=new WeakMap,Cg=new WeakMap;function Pg(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function kg(t){return t.__v_skip||!Object.isExtensible(t)?0:Pg(Jp(t))}function Xf(t){return ba(t)?t:Yf(t,!1,gg,bg,Hh)}function Eg(t){return Yf(t,!1,dg,Ag,Uh)}function zh(t){return Yf(t,!0,vg,_g,Bh)}function Yf(t,r,e,a,h){if(!kt(t)||t.__v_raw&&!(r&&t.__v_isReactive))return t;const d=h.get(t);if(d)return d;const x=kg(t);if(x===0)return t;const $=new Proxy(t,x===2?a:e);return h.set(t,$),$}function ca(t){return ba(t)?ca(t.__v_raw):!!(t&&t.__v_isReactive)}function ba(t){return!!(t&&t.__v_isReadonly)}function _u(t){return!!(t&&t.__v_isShallow)}function qh(t){return ca(t)||ba(t)}function it(t){const r=t&&t.__v_raw;return r?it(r):t}function Kh(t){return Au(t,"__v_skip",!0),t}const Ko=t=>kt(t)?Xf(t):t,Qf=t=>kt(t)?zh(t):t;function Vh(t){$n&&$s&&(t=it(t),jh(t.dep||(t.dep=Vf())))}function Wh(t,r){t=it(t);const e=t.dep;e&&yf(e)}function mr(t){return!!(t&&t.__v_isRef===!0)}function Pr(t){return Mg(t,!1)}function Mg(t,r){return mr(t)?t:new Sg(t,r)}class Sg{constructor(r,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?r:it(r),this._value=e?r:Ko(r)}get value(){return Vh(this),this._value}set value(r){const e=this.__v_isShallow||_u(r)||ba(r);r=e?r:it(r),xi(r,this._rawValue)&&(this._rawValue=r,this._value=e?r:Ko(r),Wh(this))}}function Nu(t){return mr(t)?t.value:t}const Fg={get:(t,r,e)=>Nu(Reflect.get(t,r,e)),set:(t,r,e,a)=>{const h=t[r];return mr(h)&&!mr(e)?(h.value=e,!0):Reflect.set(t,r,e,a)}};function Jh(t){return ca(t)?t:new Proxy(t,Fg)}class Tg{constructor(r,e,a,h){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new Wf(r,()=>{this._dirty||(this._dirty=!0,Wh(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!h,this.__v_isReadonly=a}get value(){const r=it(this);return Vh(r),(r._dirty||!r._cacheable)&&(r._dirty=!1,r._value=r.effect.run()),r._value}set value(r){this._setter(r)}}function Og(t,r,e=!1){let a,h;const d=qe(t);return d?(a=t,h=bs):(a=t.get,h=t.set),new Tg(a,h,d||!h,e)}function xn(t,r,e,a){let h;try{h=a?t(...a):t()}catch(d){ju(d,r,e)}return h}function is(t,r,e,a){if(qe(t)){const d=xn(t,r,e,a);return d&&kh(d)&&d.catch(x=>{ju(x,r,e)}),d}const h=[];for(let d=0;d>>1,h=yr[a],d=Wo(h);dSs&&yr.splice(r,1)}function Dg(t){je(t)?ha.push(...t):(!Ds||!Ds.includes(t,t.allowRecurse?li+1:li))&&ha.push(t),Xh()}function Tc(t,r=Vo?Ss+1:0){for(;rWo(e)-Wo(a)),li=0;lit.id==null?1/0:t.id,Lg=(t,r)=>{const e=Wo(t)-Wo(r);if(e===0){if(t.pre&&!r.pre)return-1;if(r.pre&&!t.pre)return 1}return e};function Qh(t){mf=!1,Vo=!0,yr.sort(Lg);const r=bs;try{for(Ss=0;SsWt(q)?q.trim():q)),S&&(h=e.map(Yp))}let $,A=a[$=Vu(r)]||a[$=Vu(xa(r))];!A&&d&&(A=a[$=Vu(Ca(r))]),A&&is(A,t,6,h);const C=a[$+"Once"];if(C){if(!t.emitted)t.emitted={};else if(t.emitted[$])return;t.emitted[$]=!0,is(C,t,6,h)}}function Gh(t,r,e=!1){const a=r.emitsCache,h=a.get(t);if(h!==void 0)return h;const d=t.emits;let x={},$=!1;if(!qe(t)){const A=C=>{const k=Gh(C,r,!0);k&&($=!0,Xt(x,k))};!e&&r.mixins.length&&r.mixins.forEach(A),t.extends&&A(t.extends),t.mixins&&t.mixins.forEach(A)}return!d&&!$?(kt(t)&&a.set(t,null),null):(je(d)?d.forEach(A=>x[A]=null):Xt(x,d),kt(t)&&a.set(t,x),x)}function Ru(t,r){return!t||!Su(r)?!1:(r=r.slice(2).replace(/Once$/,""),et(t,r[0].toLowerCase()+r.slice(1))||et(t,Ca(r))||et(t,r))}let kr=null,Du=null;function Cu(t){const r=kr;return kr=t,Du=t&&t.type.__scopeId||null,r}function tc(t){Du=t}function rc(){Du=null}function pt(t,r=kr,e){if(!r||t._n)return t;const a=(...h)=>{a._d&&zc(-1);const d=Cu(r);let x;try{x=t(...h)}finally{Cu(d),a._d&&zc(1)}return x};return a._n=!0,a._c=!0,a._d=!0,a}function Ju(t){const{type:r,vnode:e,proxy:a,withProxy:h,props:d,propsOptions:[x],slots:$,attrs:A,emit:C,render:k,renderCache:S,data:I,setupState:q,ctx:ue,inheritAttrs:Q}=t;let oe,$e;const j=Cu(t);try{if(e.shapeFlag&4){const N=h||a;oe=Ms(k.call(N,N,S,d,q,I,ue)),$e=A}else{const N=r;oe=Ms(N.length>1?N(d,{attrs:A,slots:$,emit:C}):N(d,null)),$e=r.props?A:Ug(A)}}catch(N){Bo.length=0,ju(N,t,1),oe=tt(as)}let O=oe;if($e&&Q!==!1){const N=Object.keys($e),{shapeFlag:L}=O;N.length&&L&7&&(x&&N.some(Bf)&&($e=Bg($e,x)),O=_n(O,$e))}return e.dirs&&(O=_n(O),O.dirs=O.dirs?O.dirs.concat(e.dirs):e.dirs),e.transition&&(O.transition=e.transition),oe=O,Cu(j),oe}const Ug=t=>{let r;for(const e in t)(e==="class"||e==="style"||Su(e))&&((r||(r={}))[e]=t[e]);return r},Bg=(t,r)=>{const e={};for(const a in t)(!Bf(a)||!(a.slice(9)in r))&&(e[a]=t[a]);return e};function zg(t,r,e){const{props:a,children:h,component:d}=t,{props:x,children:$,patchFlag:A}=r,C=d.emitsOptions;if(r.dirs||r.transition)return!0;if(e&&A>=0){if(A&1024)return!0;if(A&16)return a?Oc(a,x,C):!!x;if(A&8){const k=r.dynamicProps;for(let S=0;St.__isSuspense;function Vg(t,r){r&&r.pendingBranch?je(t)?r.effects.push(...t):r.effects.push(t):Dg(t)}const su={};function vi(t,r,e){return ep(t,r,e)}function ep(t,r,{immediate:e,deep:a,flush:h,onTrack:d,onTrigger:x}=Ot){var $;const A=lg()===(($=fr)==null?void 0:$.scope)?fr:null;let C,k=!1,S=!1;if(mr(t)?(C=()=>t.value,k=_u(t)):ca(t)?(C=()=>t,a=!0):je(t)?(S=!0,k=t.some(N=>ca(N)||_u(N)),C=()=>t.map(N=>{if(mr(N))return N.value;if(ca(N))return oa(N);if(qe(N))return xn(N,A,2)})):qe(t)?r?C=()=>xn(t,A,2):C=()=>{if(!(A&&A.isUnmounted))return I&&I(),is(t,A,3,[q])}:C=bs,r&&a){const N=C;C=()=>oa(N())}let I,q=N=>{I=j.onStop=()=>{xn(N,A,4)}},ue;if(Xo)if(q=bs,r?e&&is(r,A,3,[C(),S?[]:void 0,q]):C(),h==="sync"){const N=Bv();ue=N.__watcherHandles||(N.__watcherHandles=[])}else return bs;let Q=S?new Array(t.length).fill(su):su;const oe=()=>{if(j.active)if(r){const N=j.run();(a||k||(S?N.some((L,z)=>xi(L,Q[z])):xi(N,Q)))&&(I&&I(),is(r,A,3,[N,Q===su?void 0:S&&Q[0]===su?[]:Q,q]),Q=N)}else j.run()};oe.allowRecurse=!!r;let $e;h==="sync"?$e=oe:h==="post"?$e=()=>Or(oe,A&&A.suspense):(oe.pre=!0,A&&(oe.id=A.uid),$e=()=>ec(oe));const j=new Wf(C,$e);r?e?oe():Q=j.run():h==="post"?Or(j.run.bind(j),A&&A.suspense):j.run();const O=()=>{j.stop(),A&&A.scope&&zf(A.scope.effects,j)};return ue&&ue.push(O),O}function Wg(t,r,e){const a=this.proxy,h=Wt(t)?t.includes(".")?tp(a,t):()=>a[t]:t.bind(a,a);let d;qe(r)?d=r:(d=r.handler,e=r);const x=fr;Aa(this);const $=ep(h,d.bind(a),e);return x?Aa(x):di(),$}function tp(t,r){const e=r.split(".");return()=>{let a=t;for(let h=0;h{oa(e,r)});else if(Mh(t))for(const e in t)oa(t[e],r);return t}function si(t,r,e,a){const h=t.dirs,d=r&&r.dirs;for(let x=0;x{t.isMounted=!0}),lp(()=>{t.isUnmounting=!0}),t}const ts=[Function,Array],rp={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ts,onEnter:ts,onAfterEnter:ts,onEnterCancelled:ts,onBeforeLeave:ts,onLeave:ts,onAfterLeave:ts,onLeaveCancelled:ts,onBeforeAppear:ts,onAppear:ts,onAfterAppear:ts,onAppearCancelled:ts},Zg={name:"BaseTransition",props:rp,setup(t,{slots:r}){const e=Iv(),a=Jg();let h;return()=>{const d=r.default&&np(r.default(),!0);if(!d||!d.length)return;let x=d[0];if(d.length>1){for(const Q of d)if(Q.type!==as){x=Q;break}}const $=it(t),{mode:A}=$;if(a.isLeaving)return Zu(x);const C=Ic(x);if(!C)return Zu(x);const k=wf(C,$,a,e);$f(C,k);const S=e.subTree,I=S&&Ic(S);let q=!1;const{getTransitionKey:ue}=C.type;if(ue){const Q=ue();h===void 0?h=Q:Q!==h&&(h=Q,q=!0)}if(I&&I.type!==as&&(!oi(C,I)||q)){const Q=wf(I,$,a,e);if($f(I,Q),A==="out-in")return a.isLeaving=!0,Q.afterLeave=()=>{a.isLeaving=!1,e.update.active!==!1&&e.update()},Zu(x);A==="in-out"&&C.type!==as&&(Q.delayLeave=(oe,$e,j)=>{const O=sp(a,I);O[String(I.key)]=I,oe[vn]=()=>{$e(),oe[vn]=void 0,delete k.delayedLeave},k.delayedLeave=j})}return x}}},Xg=Zg;function sp(t,r){const{leavingVNodes:e}=t;let a=e.get(r.type);return a||(a=Object.create(null),e.set(r.type,a)),a}function wf(t,r,e,a){const{appear:h,mode:d,persisted:x=!1,onBeforeEnter:$,onEnter:A,onAfterEnter:C,onEnterCancelled:k,onBeforeLeave:S,onLeave:I,onAfterLeave:q,onLeaveCancelled:ue,onBeforeAppear:Q,onAppear:oe,onAfterAppear:$e,onAppearCancelled:j}=r,O=String(t.key),N=sp(e,t),L=(J,Z)=>{J&&is(J,a,9,Z)},z=(J,Z)=>{const pe=Z[1];L(J,Z),je(J)?J.every(we=>we.length<=1)&&pe():J.length<=1&&pe()},K={mode:d,persisted:x,beforeEnter(J){let Z=$;if(!e.isMounted)if(h)Z=Q||$;else return;J[vn]&&J[vn](!0);const pe=N[O];pe&&oi(t,pe)&&pe.el[vn]&&pe.el[vn](),L(Z,[J])},enter(J){let Z=A,pe=C,we=k;if(!e.isMounted)if(h)Z=oe||A,pe=$e||C,we=j||k;else return;let fe=!1;const Fe=J[nu]=Ze=>{fe||(fe=!0,Ze?L(we,[J]):L(pe,[J]),K.delayedLeave&&K.delayedLeave(),J[nu]=void 0)};Z?z(Z,[J,Fe]):Fe()},leave(J,Z){const pe=String(t.key);if(J[nu]&&J[nu](!0),e.isUnmounting)return Z();L(S,[J]);let we=!1;const fe=J[vn]=Fe=>{we||(we=!0,Z(),Fe?L(ue,[J]):L(q,[J]),J[vn]=void 0,N[pe]===t&&delete N[pe])};N[pe]=t,I?z(I,[J,fe]):fe()},clone(J){return wf(J,r,e,a)}};return K}function Zu(t){if(Lu(t))return t=_n(t),t.children=null,t}function Ic(t){return Lu(t)?t.children?t.children[0]:void 0:t}function $f(t,r){t.shapeFlag&6&&t.component?$f(t.component.subTree,r):t.shapeFlag&128?(t.ssContent.transition=r.clone(t.ssContent),t.ssFallback.transition=r.clone(t.ssFallback)):t.transition=r}function np(t,r=!1,e){let a=[],h=0;for(let d=0;d1)for(let d=0;dXt({name:t.name},r,{setup:t}))():t}const Ho=t=>!!t.type.__asyncLoader,Lu=t=>t.type.__isKeepAlive;function Yg(t,r){ip(t,"a",r)}function Qg(t,r){ip(t,"da",r)}function ip(t,r,e=fr){const a=t.__wdc||(t.__wdc=()=>{let h=e;for(;h;){if(h.isDeactivated)return;h=h.parent}return t()});if(Hu(r,a,e),e){let h=e.parent;for(;h&&h.parent;)Lu(h.parent.vnode)&&Gg(a,r,e,h),h=h.parent}}function Gg(t,r,e,a){const h=Hu(r,t,a,!0);op(()=>{zf(a[r],h)},e)}function Hu(t,r,e=fr,a=!1){if(e){const h=e[t]||(e[t]=[]),d=r.__weh||(r.__weh=(...x)=>{if(e.isUnmounted)return;Pa(),Aa(e);const $=is(r,e,t,x);return di(),ka(),$});return a?h.unshift(d):h.push(d),d}}const Bs=t=>(r,e=fr)=>(!Xo||t==="sp")&&Hu(t,(...a)=>r(...a),e),ev=Bs("bm"),ap=Bs("m"),tv=Bs("bu"),rv=Bs("u"),lp=Bs("bum"),op=Bs("um"),sv=Bs("sp"),nv=Bs("rtg"),iv=Bs("rtc");function av(t,r=fr){Hu("ec",t,r)}const lv=Symbol.for("v-ndc");function Jo(t,r,e,a){let h;const d=e&&e[a];if(je(t)||Wt(t)){h=new Array(t.length);for(let x=0,$=t.length;x<$;x++)h[x]=r(t[x],x,void 0,d&&d[x])}else if(typeof t=="number"){h=new Array(t);for(let x=0;xr(x,$,void 0,d&&d[$]));else{const x=Object.keys(t);h=new Array(x.length);for(let $=0,A=x.length;$Eu(r)?!(r.type===as||r.type===er&&!up(r.children)):!0)?t:null}const xf=t=>t?$p(t)?lc(t)||t.proxy:xf(t.parent):null,Uo=Xt(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>xf(t.parent),$root:t=>xf(t.root),$emit:t=>t.emit,$options:t=>sc(t),$forceUpdate:t=>t.f||(t.f=()=>ec(t.update)),$nextTick:t=>t.n||(t.n=Ng.bind(t.proxy)),$watch:t=>Wg.bind(t)}),Xu=(t,r)=>t!==Ot&&!t.__isScriptSetup&&et(t,r),ov={get({_:t},r){const{ctx:e,setupState:a,data:h,props:d,accessCache:x,type:$,appContext:A}=t;let C;if(r[0]!=="$"){const q=x[r];if(q!==void 0)switch(q){case 1:return a[r];case 2:return h[r];case 4:return e[r];case 3:return d[r]}else{if(Xu(a,r))return x[r]=1,a[r];if(h!==Ot&&et(h,r))return x[r]=2,h[r];if((C=t.propsOptions[0])&&et(C,r))return x[r]=3,d[r];if(e!==Ot&&et(e,r))return x[r]=4,e[r];bf&&(x[r]=0)}}const k=Uo[r];let S,I;if(k)return r==="$attrs"&&Ir(t,"get",r),k(t);if((S=$.__cssModules)&&(S=S[r]))return S;if(e!==Ot&&et(e,r))return x[r]=4,e[r];if(I=A.config.globalProperties,et(I,r))return I[r]},set({_:t},r,e){const{data:a,setupState:h,ctx:d}=t;return Xu(h,r)?(h[r]=e,!0):a!==Ot&&et(a,r)?(a[r]=e,!0):et(t.props,r)||r[0]==="$"&&r.slice(1)in t?!1:(d[r]=e,!0)},has({_:{data:t,setupState:r,accessCache:e,ctx:a,appContext:h,propsOptions:d}},x){let $;return!!e[x]||t!==Ot&&et(t,x)||Xu(r,x)||($=d[0])&&et($,x)||et(a,x)||et(Uo,x)||et(h.config.globalProperties,x)},defineProperty(t,r,e){return e.get!=null?t._.accessCache[r]=0:et(e,"value")&&this.set(t,r,e.value,null),Reflect.defineProperty(t,r,e)}};function Nc(t){return je(t)?t.reduce((r,e)=>(r[e]=null,r),{}):t}let bf=!0;function uv(t){const r=sc(t),e=t.proxy,a=t.ctx;bf=!1,r.beforeCreate&&jc(r.beforeCreate,t,"bc");const{data:h,computed:d,methods:x,watch:$,provide:A,inject:C,created:k,beforeMount:S,mounted:I,beforeUpdate:q,updated:ue,activated:Q,deactivated:oe,beforeDestroy:$e,beforeUnmount:j,destroyed:O,unmounted:N,render:L,renderTracked:z,renderTriggered:K,errorCaptured:J,serverPrefetch:Z,expose:pe,inheritAttrs:we,components:fe,directives:Fe,filters:Ze}=r;if(C&&fv(C,a,null),x)for(const Ye in x){const _e=x[Ye];qe(_e)&&(a[Ye]=_e.bind(e))}if(h){const Ye=h.call(e,e);kt(Ye)&&(t.data=Xf(Ye))}if(bf=!0,d)for(const Ye in d){const _e=d[Ye],Je=qe(_e)?_e.bind(e,e):qe(_e.get)?_e.get.bind(e,e):bs,gt=!qe(_e)&&qe(_e.set)?_e.set.bind(e):bs,mt=Hv({get:Je,set:gt});Object.defineProperty(a,Ye,{enumerable:!0,configurable:!0,get:()=>mt.value,set:Le=>mt.value=Le})}if($)for(const Ye in $)fp($[Ye],a,e,Ye);if(A){const Ye=qe(A)?A.call(e):A;Reflect.ownKeys(Ye).forEach(_e=>{dv(_e,Ye[_e])})}k&&jc(k,t,"c");function Xe(Ye,_e){je(_e)?_e.forEach(Je=>Ye(Je.bind(e))):_e&&Ye(_e.bind(e))}if(Xe(ev,S),Xe(ap,I),Xe(tv,q),Xe(rv,ue),Xe(Yg,Q),Xe(Qg,oe),Xe(av,J),Xe(iv,z),Xe(nv,K),Xe(lp,j),Xe(op,N),Xe(sv,Z),je(pe))if(pe.length){const Ye=t.exposed||(t.exposed={});pe.forEach(_e=>{Object.defineProperty(Ye,_e,{get:()=>e[_e],set:Je=>e[_e]=Je})})}else t.exposed||(t.exposed={});L&&t.render===bs&&(t.render=L),we!=null&&(t.inheritAttrs=we),fe&&(t.components=fe),Fe&&(t.directives=Fe)}function fv(t,r,e=bs){je(t)&&(t=Af(t));for(const a in t){const h=t[a];let d;kt(h)?"default"in h?d=cu(h.from||a,h.default,!0):d=cu(h.from||a):d=cu(h),mr(d)?Object.defineProperty(r,a,{enumerable:!0,configurable:!0,get:()=>d.value,set:x=>d.value=x}):r[a]=d}}function jc(t,r,e){is(je(t)?t.map(a=>a.bind(r.proxy)):t.bind(r.proxy),r,e)}function fp(t,r,e,a){const h=a.includes(".")?tp(e,a):()=>e[a];if(Wt(t)){const d=r[t];qe(d)&&vi(h,d)}else if(qe(t))vi(h,t.bind(e));else if(kt(t))if(je(t))t.forEach(d=>fp(d,r,e,a));else{const d=qe(t.handler)?t.handler.bind(e):r[t.handler];qe(d)&&vi(h,d,t)}}function sc(t){const r=t.type,{mixins:e,extends:a}=r,{mixins:h,optionsCache:d,config:{optionMergeStrategies:x}}=t.appContext,$=d.get(r);let A;return $?A=$:!h.length&&!e&&!a?A=r:(A={},h.length&&h.forEach(C=>Pu(A,C,x,!0)),Pu(A,r,x)),kt(r)&&d.set(r,A),A}function Pu(t,r,e,a=!1){const{mixins:h,extends:d}=r;d&&Pu(t,d,e,!0),h&&h.forEach(x=>Pu(t,x,e,!0));for(const x in r)if(!(a&&x==="expose")){const $=cv[x]||e&&e[x];t[x]=$?$(t[x],r[x]):r[x]}return t}const cv={data:Rc,props:Dc,emits:Dc,methods:Lo,computed:Lo,beforeCreate:br,created:br,beforeMount:br,mounted:br,beforeUpdate:br,updated:br,beforeDestroy:br,beforeUnmount:br,destroyed:br,unmounted:br,activated:br,deactivated:br,errorCaptured:br,serverPrefetch:br,components:Lo,directives:Lo,watch:pv,provide:Rc,inject:hv};function Rc(t,r){return r?t?function(){return Xt(qe(t)?t.call(this,this):t,qe(r)?r.call(this,this):r)}:r:t}function hv(t,r){return Lo(Af(t),Af(r))}function Af(t){if(je(t)){const r={};for(let e=0;e1)return e&&qe(r)?r.call(a&&a.proxy):r}}function yv(t,r,e,a=!1){const h={},d={};Au(d,Bu,1),t.propsDefaults=Object.create(null),hp(t,r,h,d);for(const x in t.propsOptions[0])x in h||(h[x]=void 0);e?t.props=a?h:Eg(h):t.type.props?t.props=h:t.props=d,t.attrs=d}function mv(t,r,e,a){const{props:h,attrs:d,vnode:{patchFlag:x}}=t,$=it(h),[A]=t.propsOptions;let C=!1;if((a||x>0)&&!(x&16)){if(x&8){const k=t.vnode.dynamicProps;for(let S=0;S{A=!0;const[I,q]=pp(S,r,!0);Xt(x,I),q&&$.push(...q)};!e&&r.mixins.length&&r.mixins.forEach(k),t.extends&&k(t.extends),t.mixins&&t.mixins.forEach(k)}if(!d&&!A)return kt(t)&&a.set(t,ua),ua;if(je(d))for(let k=0;k-1,q[1]=Q<0||ue-1||et(q,"default"))&&$.push(S)}}}const C=[x,$];return kt(t)&&a.set(t,C),C}function Lc(t){return t[0]!=="$"}function Hc(t){const r=t&&t.toString().match(/^\s*(function|class) (\w+)/);return r?r[2]:t===null?"null":""}function Uc(t,r){return Hc(t)===Hc(r)}function Bc(t,r){return je(r)?r.findIndex(e=>Uc(e,t)):qe(r)&&Uc(r,t)?0:-1}const gp=t=>t[0]==="_"||t==="$stable",nc=t=>je(t)?t.map(Ms):[Ms(t)],wv=(t,r,e)=>{if(r._n)return r;const a=pt((...h)=>nc(r(...h)),e);return a._c=!1,a},vp=(t,r,e)=>{const a=t._ctx;for(const h in t){if(gp(h))continue;const d=t[h];if(qe(d))r[h]=wv(h,d,a);else if(d!=null){const x=nc(d);r[h]=()=>x}}},dp=(t,r)=>{const e=nc(r);t.slots.default=()=>e},$v=(t,r)=>{if(t.vnode.shapeFlag&32){const e=r._;e?(t.slots=it(r),Au(r,"_",e)):vp(r,t.slots={})}else t.slots={},r&&dp(t,r);Au(t.slots,Bu,1)},xv=(t,r,e)=>{const{vnode:a,slots:h}=t;let d=!0,x=Ot;if(a.shapeFlag&32){const $=r._;$?e&&$===1?d=!1:(Xt(h,r),!e&&$===1&&delete h._):(d=!r.$stable,vp(r,h)),x=r}else r&&(dp(t,r),x={default:1});if(d)for(const $ in h)!gp($)&&x[$]==null&&delete h[$]};function Cf(t,r,e,a,h=!1){if(je(t)){t.forEach((I,q)=>Cf(I,r&&(je(r)?r[q]:r),e,a,h));return}if(Ho(a)&&!h)return;const d=a.shapeFlag&4?lc(a.component)||a.component.proxy:a.el,x=h?null:d,{i:$,r:A}=t,C=r&&r.r,k=$.refs===Ot?$.refs={}:$.refs,S=$.setupState;if(C!=null&&C!==A&&(Wt(C)?(k[C]=null,et(S,C)&&(S[C]=null)):mr(C)&&(C.value=null)),qe(A))xn(A,$,12,[x,k]);else{const I=Wt(A),q=mr(A);if(I||q){const ue=()=>{if(t.f){const Q=I?et(S,A)?S[A]:k[A]:A.value;h?je(Q)&&zf(Q,d):je(Q)?Q.includes(d)||Q.push(d):I?(k[A]=[d],et(S,A)&&(S[A]=k[A])):(A.value=[d],t.k&&(k[t.k]=A.value))}else I?(k[A]=x,et(S,A)&&(S[A]=x)):q&&(A.value=x,t.k&&(k[t.k]=x))};x?(ue.id=-1,Or(ue,e)):ue()}}}const Or=Vg;function bv(t){return Av(t)}function Av(t,r){const e=pf();e.__VUE__=!0;const{insert:a,remove:h,patchProp:d,createElement:x,createText:$,createComment:A,setText:C,setElementText:k,parentNode:S,nextSibling:I,setScopeId:q=bs,insertStaticContent:ue}=t,Q=(R,B,Y,se=null,le=null,ne=null,xe=!1,ce=null,he=!!B.dynamicChildren)=>{if(R===B)return;R&&!oi(R,B)&&(se=Kt(R),Le(R,le,ne,!0),R=null),B.patchFlag===-2&&(he=!1,B.dynamicChildren=null);const{type:ie,ref:Ee,shapeFlag:Ce}=B;switch(ie){case Uu:oe(R,B,Y,se);break;case as:$e(R,B,Y,se);break;case Yu:R==null&&j(B,Y,se,xe);break;case er:fe(R,B,Y,se,le,ne,xe,ce,he);break;default:Ce&1?L(R,B,Y,se,le,ne,xe,ce,he):Ce&6?Fe(R,B,Y,se,le,ne,xe,ce,he):(Ce&64||Ce&128)&&ie.process(R,B,Y,se,le,ne,xe,ce,he,Yt)}Ee!=null&&le&&Cf(Ee,R&&R.ref,ne,B||R,!B)},oe=(R,B,Y,se)=>{if(R==null)a(B.el=$(B.children),Y,se);else{const le=B.el=R.el;B.children!==R.children&&C(le,B.children)}},$e=(R,B,Y,se)=>{R==null?a(B.el=A(B.children||""),Y,se):B.el=R.el},j=(R,B,Y,se)=>{[R.el,R.anchor]=ue(R.children,B,Y,se,R.el,R.anchor)},O=({el:R,anchor:B},Y,se)=>{let le;for(;R&&R!==B;)le=I(R),a(R,Y,se),R=le;a(B,Y,se)},N=({el:R,anchor:B})=>{let Y;for(;R&&R!==B;)Y=I(R),h(R),R=Y;h(B)},L=(R,B,Y,se,le,ne,xe,ce,he)=>{xe=xe||B.type==="svg",R==null?z(B,Y,se,le,ne,xe,ce,he):Z(R,B,le,ne,xe,ce,he)},z=(R,B,Y,se,le,ne,xe,ce)=>{let he,ie;const{type:Ee,props:Ce,shapeFlag:Me,transition:Ie,dirs:De}=R;if(he=R.el=x(R.type,ne,Ce&&Ce.is,Ce),Me&8?k(he,R.children):Me&16&&J(R.children,he,null,se,le,ne&&Ee!=="foreignObject",xe,ce),De&&si(R,null,se,"created"),K(he,R,R.scopeId,xe,se),Ce){for(const Qe in Ce)Qe!=="value"&&!uu(Qe)&&d(he,Qe,null,Ce[Qe],ne,R.children,se,le,ft);"value"in Ce&&d(he,"value",null,Ce.value),(ie=Ce.onVnodeBeforeMount)&&Es(ie,se,R)}De&&si(R,null,se,"beforeMount");const Ve=_v(le,Ie);Ve&&Ie.beforeEnter(he),a(he,B,Y),((ie=Ce&&Ce.onVnodeMounted)||Ve||De)&&Or(()=>{ie&&Es(ie,se,R),Ve&&Ie.enter(he),De&&si(R,null,se,"mounted")},le)},K=(R,B,Y,se,le)=>{if(Y&&q(R,Y),se)for(let ne=0;ne{for(let ie=he;ie{const ce=B.el=R.el;let{patchFlag:he,dynamicChildren:ie,dirs:Ee}=B;he|=R.patchFlag&16;const Ce=R.props||Ot,Me=B.props||Ot;let Ie;Y&&ni(Y,!1),(Ie=Me.onVnodeBeforeUpdate)&&Es(Ie,Y,B,R),Ee&&si(B,R,Y,"beforeUpdate"),Y&&ni(Y,!0);const De=le&&B.type!=="foreignObject";if(ie?pe(R.dynamicChildren,ie,ce,Y,se,De,ne):xe||_e(R,B,ce,null,Y,se,De,ne,!1),he>0){if(he&16)we(ce,B,Ce,Me,Y,se,le);else if(he&2&&Ce.class!==Me.class&&d(ce,"class",null,Me.class,le),he&4&&d(ce,"style",Ce.style,Me.style,le),he&8){const Ve=B.dynamicProps;for(let Qe=0;Qe{Ie&&Es(Ie,Y,B,R),Ee&&si(B,R,Y,"updated")},se)},pe=(R,B,Y,se,le,ne,xe)=>{for(let ce=0;ce{if(Y!==se){if(Y!==Ot)for(const ce in Y)!uu(ce)&&!(ce in se)&&d(R,ce,Y[ce],null,xe,B.children,le,ne,ft);for(const ce in se){if(uu(ce))continue;const he=se[ce],ie=Y[ce];he!==ie&&ce!=="value"&&d(R,ce,ie,he,xe,B.children,le,ne,ft)}"value"in se&&d(R,"value",Y.value,se.value)}},fe=(R,B,Y,se,le,ne,xe,ce,he)=>{const ie=B.el=R?R.el:$(""),Ee=B.anchor=R?R.anchor:$("");let{patchFlag:Ce,dynamicChildren:Me,slotScopeIds:Ie}=B;Ie&&(ce=ce?ce.concat(Ie):Ie),R==null?(a(ie,Y,se),a(Ee,Y,se),J(B.children,Y,Ee,le,ne,xe,ce,he)):Ce>0&&Ce&64&&Me&&R.dynamicChildren?(pe(R.dynamicChildren,Me,Y,le,ne,xe,ce),(B.key!=null||le&&B===le.subTree)&&yp(R,B,!0)):_e(R,B,Y,Ee,le,ne,xe,ce,he)},Fe=(R,B,Y,se,le,ne,xe,ce,he)=>{B.slotScopeIds=ce,R==null?B.shapeFlag&512?le.ctx.activate(B,Y,se,xe,he):Ze(B,Y,se,le,ne,xe,he):It(R,B,he)},Ze=(R,B,Y,se,le,ne,xe)=>{const ce=R.component=Ov(R,se,le);if(Lu(R)&&(ce.ctx.renderer=Yt),Nv(ce),ce.asyncDep){if(le&&le.registerDep(ce,Xe),!R.el){const he=ce.subTree=tt(as);$e(null,he,B,Y)}return}Xe(ce,R,B,Y,le,ne,xe)},It=(R,B,Y)=>{const se=B.component=R.component;if(zg(R,B,Y))if(se.asyncDep&&!se.asyncResolved){Ye(se,B,Y);return}else se.next=B,Rg(se.update),se.update();else B.el=R.el,se.vnode=B},Xe=(R,B,Y,se,le,ne,xe)=>{const ce=()=>{if(R.isMounted){let{next:Ee,bu:Ce,u:Me,parent:Ie,vnode:De}=R,Ve=Ee,Qe;ni(R,!1),Ee?(Ee.el=De.el,Ye(R,Ee,xe)):Ee=De,Ce&&Wu(Ce),(Qe=Ee.props&&Ee.props.onVnodeBeforeUpdate)&&Es(Qe,Ie,Ee,De),ni(R,!0);const rt=Ju(R),Ut=R.subTree;R.subTree=rt,Q(Ut,rt,S(Ut.el),Kt(Ut),R,le,ne),Ee.el=rt.el,Ve===null&&qg(R,rt.el),Me&&Or(Me,le),(Qe=Ee.props&&Ee.props.onVnodeUpdated)&&Or(()=>Es(Qe,Ie,Ee,De),le)}else{let Ee;const{el:Ce,props:Me}=B,{bm:Ie,m:De,parent:Ve}=R,Qe=Ho(B);if(ni(R,!1),Ie&&Wu(Ie),!Qe&&(Ee=Me&&Me.onVnodeBeforeMount)&&Es(Ee,Ve,B),ni(R,!0),Ce&&Ct){const rt=()=>{R.subTree=Ju(R),Ct(Ce,R.subTree,R,le,null)};Qe?B.type.__asyncLoader().then(()=>!R.isUnmounted&&rt()):rt()}else{const rt=R.subTree=Ju(R);Q(null,rt,Y,se,R,le,ne),B.el=rt.el}if(De&&Or(De,le),!Qe&&(Ee=Me&&Me.onVnodeMounted)){const rt=B;Or(()=>Es(Ee,Ve,rt),le)}(B.shapeFlag&256||Ve&&Ho(Ve.vnode)&&Ve.vnode.shapeFlag&256)&&R.a&&Or(R.a,le),R.isMounted=!0,B=Y=se=null}},he=R.effect=new Wf(ce,()=>ec(ie),R.scope),ie=R.update=()=>he.run();ie.id=R.uid,ni(R,!0),ie()},Ye=(R,B,Y)=>{B.component=R;const se=R.vnode.props;R.vnode=B,R.next=null,mv(R,B.props,se,Y),xv(R,B.children,Y),Pa(),Tc(),ka()},_e=(R,B,Y,se,le,ne,xe,ce,he=!1)=>{const ie=R&&R.children,Ee=R?R.shapeFlag:0,Ce=B.children,{patchFlag:Me,shapeFlag:Ie}=B;if(Me>0){if(Me&128){gt(ie,Ce,Y,se,le,ne,xe,ce,he);return}else if(Me&256){Je(ie,Ce,Y,se,le,ne,xe,ce,he);return}}Ie&8?(Ee&16&&ft(ie,le,ne),Ce!==ie&&k(Y,Ce)):Ee&16?Ie&16?gt(ie,Ce,Y,se,le,ne,xe,ce,he):ft(ie,le,ne,!0):(Ee&8&&k(Y,""),Ie&16&&J(Ce,Y,se,le,ne,xe,ce,he))},Je=(R,B,Y,se,le,ne,xe,ce,he)=>{R=R||ua,B=B||ua;const ie=R.length,Ee=B.length,Ce=Math.min(ie,Ee);let Me;for(Me=0;MeEe?ft(R,le,ne,!0,!1,Ce):J(B,Y,se,le,ne,xe,ce,he,Ce)},gt=(R,B,Y,se,le,ne,xe,ce,he)=>{let ie=0;const Ee=B.length;let Ce=R.length-1,Me=Ee-1;for(;ie<=Ce&&ie<=Me;){const Ie=R[ie],De=B[ie]=he?dn(B[ie]):Ms(B[ie]);if(oi(Ie,De))Q(Ie,De,Y,null,le,ne,xe,ce,he);else break;ie++}for(;ie<=Ce&&ie<=Me;){const Ie=R[Ce],De=B[Me]=he?dn(B[Me]):Ms(B[Me]);if(oi(Ie,De))Q(Ie,De,Y,null,le,ne,xe,ce,he);else break;Ce--,Me--}if(ie>Ce){if(ie<=Me){const Ie=Me+1,De=IeMe)for(;ie<=Ce;)Le(R[ie],le,ne,!0),ie++;else{const Ie=ie,De=ie,Ve=new Map;for(ie=De;ie<=Me;ie++){const Et=B[ie]=he?dn(B[ie]):Ms(B[ie]);Et.key!=null&&Ve.set(Et.key,ie)}let Qe,rt=0;const Ut=Me-De+1;let lt=!1,hr=0;const ls=new Array(Ut);for(ie=0;ie=Ut){Le(Et,le,ne,!0);continue}let Ge;if(Et.key!=null)Ge=Ve.get(Et.key);else for(Qe=De;Qe<=Me;Qe++)if(ls[Qe-De]===0&&oi(Et,B[Qe])){Ge=Qe;break}Ge===void 0?Le(Et,le,ne,!0):(ls[Ge-De]=ie+1,Ge>=hr?hr=Ge:lt=!0,Q(Et,B[Ge],Y,null,le,ne,xe,ce,he),rt++)}const Mr=lt?Cv(ls):ua;for(Qe=Mr.length-1,ie=Ut-1;ie>=0;ie--){const Et=De+ie,Ge=B[Et],sr=Et+1{const{el:ne,type:xe,transition:ce,children:he,shapeFlag:ie}=R;if(ie&6){mt(R.component.subTree,B,Y,se);return}if(ie&128){R.suspense.move(B,Y,se);return}if(ie&64){xe.move(R,B,Y,Yt);return}if(xe===er){a(ne,B,Y);for(let Ce=0;Cece.enter(ne),le);else{const{leave:Ce,delayLeave:Me,afterLeave:Ie}=ce,De=()=>a(ne,B,Y),Ve=()=>{Ce(ne,()=>{De(),Ie&&Ie()})};Me?Me(ne,De,Ve):Ve()}else a(ne,B,Y)},Le=(R,B,Y,se=!1,le=!1)=>{const{type:ne,props:xe,ref:ce,children:he,dynamicChildren:ie,shapeFlag:Ee,patchFlag:Ce,dirs:Me}=R;if(ce!=null&&Cf(ce,null,Y,R,!0),Ee&256){B.ctx.deactivate(R);return}const Ie=Ee&1&&Me,De=!Ho(R);let Ve;if(De&&(Ve=xe&&xe.onVnodeBeforeUnmount)&&Es(Ve,B,R),Ee&6)Jt(R.component,Y,se);else{if(Ee&128){R.suspense.unmount(Y,se);return}Ie&&si(R,null,B,"beforeUnmount"),Ee&64?R.type.remove(R,B,Y,le,Yt,se):ie&&(ne!==er||Ce>0&&Ce&64)?ft(ie,B,Y,!1,!0):(ne===er&&Ce&384||!le&&Ee&16)&&ft(he,B,Y),se&&$r(R)}(De&&(Ve=xe&&xe.onVnodeUnmounted)||Ie)&&Or(()=>{Ve&&Es(Ve,B,R),Ie&&si(R,null,B,"unmounted")},Y)},$r=R=>{const{type:B,el:Y,anchor:se,transition:le}=R;if(B===er){_t(Y,se);return}if(B===Yu){N(R);return}const ne=()=>{h(Y),le&&!le.persisted&&le.afterLeave&&le.afterLeave()};if(R.shapeFlag&1&&le&&!le.persisted){const{leave:xe,delayLeave:ce}=le,he=()=>xe(Y,ne);ce?ce(R.el,ne,he):he()}else ne()},_t=(R,B)=>{let Y;for(;R!==B;)Y=I(R),h(R),R=Y;h(B)},Jt=(R,B,Y)=>{const{bum:se,scope:le,update:ne,subTree:xe,um:ce}=R;se&&Wu(se),le.stop(),ne&&(ne.active=!1,Le(xe,R,B,Y)),ce&&Or(ce,B),Or(()=>{R.isUnmounted=!0},B),B&&B.pendingBranch&&!B.isUnmounted&&R.asyncDep&&!R.asyncResolved&&R.suspenseId===B.pendingId&&(B.deps--,B.deps===0&&B.resolve())},ft=(R,B,Y,se=!1,le=!1,ne=0)=>{for(let xe=ne;xeR.shapeFlag&6?Kt(R.component.subTree):R.shapeFlag&128?R.suspense.next():I(R.anchor||R.el),cr=(R,B,Y)=>{R==null?B._vnode&&Le(B._vnode,null,null,!0):Q(B._vnode||null,R,B,null,null,null,Y),Tc(),Yh(),B._vnode=R},Yt={p:Q,um:Le,m:mt,r:$r,mt:Ze,mc:J,pc:_e,pbc:pe,n:Kt,o:t};let rr,Ct;return r&&([rr,Ct]=r(Yt)),{render:cr,hydrate:rr,createApp:vv(cr,rr)}}function ni({effect:t,update:r},e){t.allowRecurse=r.allowRecurse=e}function _v(t,r){return(!t||t&&!t.pendingBranch)&&r&&!r.persisted}function yp(t,r,e=!1){const a=t.children,h=r.children;if(je(a)&&je(h))for(let d=0;d>1,t[e[$]]0&&(r[a]=e[d-1]),e[d]=a)}}for(d=e.length,x=e[d-1];d-- >0;)e[d]=x,x=r[x];return e}const Pv=t=>t.__isTeleport,er=Symbol.for("v-fgt"),Uu=Symbol.for("v-txt"),as=Symbol.for("v-cmt"),Yu=Symbol.for("v-stc"),Bo=[];let xs=null;function ut(t=!1){Bo.push(xs=t?null:[])}function kv(){Bo.pop(),xs=Bo[Bo.length-1]||null}let Zo=1;function zc(t){Zo+=t}function mp(t){return t.dynamicChildren=Zo>0?xs||ua:null,kv(),Zo>0&&xs&&xs.push(t),t}function Lt(t,r,e,a,h,d){return mp(Bt(t,r,e,a,h,d,!0))}function pa(t,r,e,a,h){return mp(tt(t,r,e,a,h,!0))}function Eu(t){return t?t.__v_isVNode===!0:!1}function oi(t,r){return t.type===r.type&&t.key===r.key}const Bu="__vInternal",wp=({key:t})=>t??null,hu=({ref:t,ref_key:r,ref_for:e})=>(typeof t=="number"&&(t=""+t),t!=null?Wt(t)||mr(t)||qe(t)?{i:kr,r:t,k:r,f:!!e}:t:null);function Bt(t,r=null,e=null,a=0,h=null,d=t===er?0:1,x=!1,$=!1){const A={__v_isVNode:!0,__v_skip:!0,type:t,props:r,key:r&&wp(r),ref:r&&hu(r),scopeId:Du,slotScopeIds:null,children:e,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:d,patchFlag:a,dynamicProps:h,dynamicChildren:null,appContext:null,ctx:kr};return $?(ic(A,e),d&128&&t.normalize(A)):e&&(A.shapeFlag|=Wt(e)?8:16),Zo>0&&!x&&xs&&(A.patchFlag>0||d&6)&&A.patchFlag!==32&&xs.push(A),A}const tt=Ev;function Ev(t,r=null,e=null,a=0,h=null,d=!1){if((!t||t===lv)&&(t=as),Eu(t)){const $=_n(t,r,!0);return e&&ic($,e),Zo>0&&!d&&xs&&($.shapeFlag&6?xs[xs.indexOf(t)]=$:xs.push($)),$.patchFlag|=-2,$}if(Lv(t)&&(t=t.__vccOpts),r){r=Mv(r);let{class:$,style:A}=r;$&&!Wt($)&&(r.class=tr($)),kt(A)&&(qh(A)&&!je(A)&&(A=Xt({},A)),r.style=Kf(A))}const x=Wt(t)?1:Kg(t)?128:Pv(t)?64:kt(t)?4:qe(t)?2:0;return Bt(t,r,e,a,h,x,d,!0)}function Mv(t){return t?qh(t)||Bu in t?Xt({},t):t:null}function _n(t,r,e=!1){const{props:a,ref:h,patchFlag:d,children:x}=t,$=r?Sv(a||{},r):a;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:$,key:$&&wp($),ref:r&&r.ref?e&&h?je(h)?h.concat(hu(r)):[h,hu(r)]:hu(r):h,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:x,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:r&&t.type!==er?d===-1?16:d|16:d,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&_n(t.ssContent),ssFallback:t.ssFallback&&_n(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function qt(t=" ",r=0){return tt(Uu,null,t,r)}function bn(t="",r=!1){return r?(ut(),pa(as,null,t)):tt(as,null,t)}function Ms(t){return t==null||typeof t=="boolean"?tt(as):je(t)?tt(er,null,t.slice()):typeof t=="object"?dn(t):tt(Uu,null,String(t))}function dn(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:_n(t)}function ic(t,r){let e=0;const{shapeFlag:a}=t;if(r==null)r=null;else if(je(r))e=16;else if(typeof r=="object")if(a&65){const h=r.default;h&&(h._c&&(h._d=!1),ic(t,h()),h._c&&(h._d=!0));return}else{e=32;const h=r._;!h&&!(Bu in r)?r._ctx=kr:h===3&&kr&&(kr.slots._===1?r._=1:(r._=2,t.patchFlag|=1024))}else qe(r)?(r={default:r,_ctx:kr},e=32):(r=String(r),a&64?(e=16,r=[qt(r)]):e=8);t.children=r,t.shapeFlag|=e}function Sv(...t){const r={};for(let e=0;efr||kr;let ac,ia,qc="__VUE_INSTANCE_SETTERS__";(ia=pf()[qc])||(ia=pf()[qc]=[]),ia.push(t=>fr=t),ac=t=>{ia.length>1?ia.forEach(r=>r(t)):ia[0](t)};const Aa=t=>{ac(t),t.scope.on()},di=()=>{fr&&fr.scope.off(),ac(null)};function $p(t){return t.vnode.shapeFlag&4}let Xo=!1;function Nv(t,r=!1){Xo=r;const{props:e,children:a}=t.vnode,h=$p(t);yv(t,e,h,r),$v(t,a);const d=h?jv(t,r):void 0;return Xo=!1,d}function jv(t,r){const e=t.type;t.accessCache=Object.create(null),t.proxy=Kh(new Proxy(t.ctx,ov));const{setup:a}=e;if(a){const h=t.setupContext=a.length>1?Dv(t):null;Aa(t),Pa();const d=xn(a,t,0,[t.props,h]);if(ka(),di(),kh(d)){if(d.then(di,di),r)return d.then(x=>{Kc(t,x,r)}).catch(x=>{ju(x,t,0)});t.asyncDep=d}else Kc(t,d,r)}else xp(t,r)}function Kc(t,r,e){qe(r)?t.type.__ssrInlineRender?t.ssrRender=r:t.render=r:kt(r)&&(t.setupState=Jh(r)),xp(t,e)}let Vc;function xp(t,r,e){const a=t.type;if(!t.render){if(!r&&Vc&&!a.render){const h=a.template||sc(t).template;if(h){const{isCustomElement:d,compilerOptions:x}=t.appContext.config,{delimiters:$,compilerOptions:A}=a,C=Xt(Xt({isCustomElement:d,delimiters:$},x),A);a.render=Vc(h,C)}}t.render=a.render||bs}{Aa(t),Pa();try{uv(t)}finally{ka(),di()}}}function Rv(t){return t.attrsProxy||(t.attrsProxy=new Proxy(t.attrs,{get(r,e){return Ir(t,"get","$attrs"),r[e]}}))}function Dv(t){const r=e=>{t.exposed=e||{}};return{get attrs(){return Rv(t)},slots:t.slots,emit:t.emit,expose:r}}function lc(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(Jh(Kh(t.exposed)),{get(r,e){if(e in r)return r[e];if(e in Uo)return Uo[e](t)},has(r,e){return e in r||e in Uo}}))}function Lv(t){return qe(t)&&"__vccOpts"in t}const Hv=(t,r)=>Og(t,r,Xo);function cn(t,r,e){const a=arguments.length;return a===2?kt(r)&&!je(r)?Eu(r)?tt(t,null,[r]):tt(t,r):tt(t,null,r):(a>3?e=Array.prototype.slice.call(arguments,2):a===3&&Eu(e)&&(e=[e]),tt(t,r,e))}const Uv=Symbol.for("v-scx"),Bv=()=>cu(Uv),zv="3.3.7",qv="http://www.w3.org/2000/svg",ui=typeof document<"u"?document:null,Wc=ui&&ui.createElement("template"),Kv={insert:(t,r,e)=>{r.insertBefore(t,e||null)},remove:t=>{const r=t.parentNode;r&&r.removeChild(t)},createElement:(t,r,e,a)=>{const h=r?ui.createElementNS(qv,t):ui.createElement(t,e?{is:e}:void 0);return t==="select"&&a&&a.multiple!=null&&h.setAttribute("multiple",a.multiple),h},createText:t=>ui.createTextNode(t),createComment:t=>ui.createComment(t),setText:(t,r)=>{t.nodeValue=r},setElementText:(t,r)=>{t.textContent=r},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>ui.querySelector(t),setScopeId(t,r){t.setAttribute(r,"")},insertStaticContent(t,r,e,a,h,d){const x=e?e.previousSibling:r.lastChild;if(h&&(h===d||h.nextSibling))for(;r.insertBefore(h.cloneNode(!0),e),!(h===d||!(h=h.nextSibling)););else{Wc.innerHTML=a?`${t}`:t;const $=Wc.content;if(a){const A=$.firstChild;for(;A.firstChild;)$.appendChild(A.firstChild);$.removeChild(A)}r.insertBefore($,e)}return[x?x.nextSibling:r.firstChild,e?e.previousSibling:r.lastChild]}},un="transition",Ro="animation",Yo=Symbol("_vtc"),oc=(t,{slots:r})=>cn(Xg,Vv(t),r);oc.displayName="Transition";const bp={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};oc.props=Xt({},rp,bp);const ii=(t,r=[])=>{je(t)?t.forEach(e=>e(...r)):t&&t(...r)},Jc=t=>t?je(t)?t.some(r=>r.length>1):t.length>1:!1;function Vv(t){const r={};for(const fe in t)fe in bp||(r[fe]=t[fe]);if(t.css===!1)return r;const{name:e="v",type:a,duration:h,enterFromClass:d=`${e}-enter-from`,enterActiveClass:x=`${e}-enter-active`,enterToClass:$=`${e}-enter-to`,appearFromClass:A=d,appearActiveClass:C=x,appearToClass:k=$,leaveFromClass:S=`${e}-leave-from`,leaveActiveClass:I=`${e}-leave-active`,leaveToClass:q=`${e}-leave-to`}=t,ue=Wv(h),Q=ue&&ue[0],oe=ue&&ue[1],{onBeforeEnter:$e,onEnter:j,onEnterCancelled:O,onLeave:N,onLeaveCancelled:L,onBeforeAppear:z=$e,onAppear:K=j,onAppearCancelled:J=O}=r,Z=(fe,Fe,Ze)=>{ai(fe,Fe?k:$),ai(fe,Fe?C:x),Ze&&Ze()},pe=(fe,Fe)=>{fe._isLeaving=!1,ai(fe,S),ai(fe,q),ai(fe,I),Fe&&Fe()},we=fe=>(Fe,Ze)=>{const It=fe?K:j,Xe=()=>Z(Fe,fe,Ze);ii(It,[Fe,Xe]),Zc(()=>{ai(Fe,fe?A:d),fn(Fe,fe?k:$),Jc(It)||Xc(Fe,a,Q,Xe)})};return Xt(r,{onBeforeEnter(fe){ii($e,[fe]),fn(fe,d),fn(fe,x)},onBeforeAppear(fe){ii(z,[fe]),fn(fe,A),fn(fe,C)},onEnter:we(!1),onAppear:we(!0),onLeave(fe,Fe){fe._isLeaving=!0;const Ze=()=>pe(fe,Fe);fn(fe,S),Xv(),fn(fe,I),Zc(()=>{fe._isLeaving&&(ai(fe,S),fn(fe,q),Jc(N)||Xc(fe,a,oe,Ze))}),ii(N,[fe,Ze])},onEnterCancelled(fe){Z(fe,!1),ii(O,[fe])},onAppearCancelled(fe){Z(fe,!0),ii(J,[fe])},onLeaveCancelled(fe){pe(fe),ii(L,[fe])}})}function Wv(t){if(t==null)return null;if(kt(t))return[Qu(t.enter),Qu(t.leave)];{const r=Qu(t);return[r,r]}}function Qu(t){return Qp(t)}function fn(t,r){r.split(/\s+/).forEach(e=>e&&t.classList.add(e)),(t[Yo]||(t[Yo]=new Set)).add(r)}function ai(t,r){r.split(/\s+/).forEach(a=>a&&t.classList.remove(a));const e=t[Yo];e&&(e.delete(r),e.size||(t[Yo]=void 0))}function Zc(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let Jv=0;function Xc(t,r,e,a){const h=t._endId=++Jv,d=()=>{h===t._endId&&a()};if(e)return setTimeout(d,e);const{type:x,timeout:$,propCount:A}=Zv(t,r);if(!x)return a();const C=x+"end";let k=0;const S=()=>{t.removeEventListener(C,I),d()},I=q=>{q.target===t&&++k>=A&&S()};setTimeout(()=>{k(e[ue]||"").split(", "),h=a(`${un}Delay`),d=a(`${un}Duration`),x=Yc(h,d),$=a(`${Ro}Delay`),A=a(`${Ro}Duration`),C=Yc($,A);let k=null,S=0,I=0;r===un?x>0&&(k=un,S=x,I=d.length):r===Ro?C>0&&(k=Ro,S=C,I=A.length):(S=Math.max(x,C),k=S>0?x>C?un:Ro:null,I=k?k===un?d.length:A.length:0);const q=k===un&&/\b(transform|all)(,|$)/.test(a(`${un}Property`).toString());return{type:k,timeout:S,propCount:I,hasTransform:q}}function Yc(t,r){for(;t.lengthQc(e)+Qc(t[a])))}function Qc(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Xv(){return document.body.offsetHeight}function Yv(t,r,e){const a=t[Yo];a&&(r=(r?[r,...a]:[...a]).join(" ")),r==null?t.removeAttribute("class"):e?t.setAttribute("class",r):t.className=r}const Qv=Symbol("_vod");function Gv(t,r,e){const a=t.style,h=Wt(e);if(e&&!h){if(r&&!Wt(r))for(const d in r)e[d]==null&&Pf(a,d,"");for(const d in e)Pf(a,d,e[d])}else{const d=a.display;h?r!==e&&(a.cssText=e):r&&t.removeAttribute("style"),Qv in t&&(a.display=d)}}const Gc=/\s*!important$/;function Pf(t,r,e){if(je(e))e.forEach(a=>Pf(t,r,a));else if(e==null&&(e=""),r.startsWith("--"))t.setProperty(r,e);else{const a=ed(t,r);Gc.test(e)?t.setProperty(Ca(a),e.replace(Gc,""),"important"):t[a]=e}}const eh=["Webkit","Moz","ms"],Gu={};function ed(t,r){const e=Gu[r];if(e)return e;let a=xa(r);if(a!=="filter"&&a in t)return Gu[r]=a;a=Sh(a);for(let h=0;hef||(ld.then(()=>ef=0),ef=Date.now());function ud(t,r){const e=a=>{if(!a._vts)a._vts=Date.now();else if(a._vts<=e.attached)return;is(fd(a,e.value),r,5,[a])};return e.value=t,e.attached=od(),e}function fd(t,r){if(je(r)){const e=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{e.call(t),t._stopped=!0},r.map(a=>h=>!h._stopped&&a&&a(h))}else return r}const nh=/^on[a-z]/,cd=(t,r,e,a,h=!1,d,x,$,A)=>{r==="class"?Yv(t,a,h):r==="style"?Gv(t,e,a):Su(r)?Bf(r)||id(t,r,e,a,x):(r[0]==="."?(r=r.slice(1),!0):r[0]==="^"?(r=r.slice(1),!1):hd(t,r,a,h))?rd(t,r,a,d,x,$,A):(r==="true-value"?t._trueValue=a:r==="false-value"&&(t._falseValue=a),td(t,r,a,h))};function hd(t,r,e,a){return a?!!(r==="innerHTML"||r==="textContent"||r in t&&nh.test(r)&&qe(e)):r==="spellcheck"||r==="draggable"||r==="translate"||r==="form"||r==="list"&&t.tagName==="INPUT"||r==="type"&&t.tagName==="TEXTAREA"||nh.test(r)&&Wt(e)?!1:r in t}const pd=Xt({patchProp:cd},Kv);let ih;function gd(){return ih||(ih=bv(pd))}const vd=(...t)=>{const r=gd().createApp(...t),{mount:e}=r;return r.mount=a=>{const h=dd(a);if(!h)return;const d=r._component;!qe(d)&&!d.render&&!d.template&&(d.template=h.innerHTML),h.innerHTML="";const x=e(h,!1,h instanceof SVGElement);return h instanceof Element&&(h.removeAttribute("v-cloak"),h.setAttribute("data-v-app","")),x},r};function dd(t){return Wt(t)?document.querySelector(t):t}const yd={key:0},md=["onClick"],wd={key:1},$d=["onClick"],xd=Ci({__name:"MenuButton",props:{options:{}},emits:["select"],setup(t,{emit:r}){const e=Pr(!1),a=r;return(h,d)=>(ut(),Lt("div",{class:tr(h.$style.wrapper)},[Bt("button",{onClick:d[0]||(d[0]=x=>e.value=!e.value)},[fu(h.$slots,"default")]),tt(oc,null,{default:pt(()=>[e.value?(ut(),Lt("div",{key:0,class:tr(h.$style.menu)},[h.options instanceof Array?(ut(),Lt("div",yd,[(ut(!0),Lt(er,null,Jo(h.options,x=>(ut(),Lt("div",{class:tr(h.$style.opt),onClick:$=>{e.value=!1,a("select",x)}},Zr(x),11,md))),256))])):(ut(),Lt("div",wd,[(ut(!0),Lt(er,null,Jo(Object.keys(h.options),x=>(ut(),Lt("div",{class:tr(h.$style.opt),onClick:$=>{e.value=!1,a("select",x)}},Zr(h.options[x]),11,$d))),256))]))],2)):bn("",!0)]),_:1})],2))}}),bd="_wrapper_k2i3y_2",Ad="_menu_k2i3y_5",_d="_opt_k2i3y_12",Cd={wrapper:bd,menu:Ad,opt:_d},Pi=(t,r)=>{const e=t.__vccOpts||t;for(const[a,h]of r)e[a]=h;return e},Pd={$style:Cd},Ap=Pi(xd,[["__cssModules",Pd]]);function Ht(t,r,e){let a=e.value;return{configurable:!0,get(){const h=a.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,value:h}),h},set(h){a=h}}}let zu=class _p extends Error{constructor(e,a){super(e);Be(this,"info");this.info=a,Error.captureStackTrace&&Error.captureStackTrace(this,_p)}};class kd extends zu{constructor(r){super(`Internal Error. ${r}`,r)}}class bi extends zu{constructor(r,e){super(r,e)}}class yt extends zu{constructor(r,e){super(r,e)}}class Ed extends yt{constructor(r,e){super(r,e)}}var Cn=globalThis&&globalThis.__decorate||function(t,r,e,a){var h=arguments.length,d=h<3?r:a===null?a=Object.getOwnPropertyDescriptor(r,e):a,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,a);else for(var $=t.length-1;$>=0;$--)(x=t[$])&&(d=(h<3?x(d):h>3?x(r,e,d):x(r,e))||d);return h>3&&d&&Object.defineProperty(r,e,d),d};let zs=class Cp{constructor(r=[],e,a){Be(this,"parent");Be(this,"layerdStates");Be(this,"name");Be(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=a||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const a=[r,...this.layerdStates];return new Cp(a,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const a=e.get(r).value;return this.log("read",{var:r,val:a}),a}throw new yt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}exists(r){for(const e of this.layerdStates)if(e.has(r))return this.log("exists",{var:r}),!0;return this.log("not exists",{var:r}),!1}getAll(){const r=this.layerdStates.reduce((e,a)=>[...e,...a],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const a=this.layerdStates[0];if(a.has(r))throw new yt(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});a.set(r,e),this.parent==null&&this.onUpdated(r,e.value)}assign(r,e){let a=1;for(const h of this.layerdStates){if(h.has(r)){const d=h.get(r);if(!d.isMutable)throw new yt(`Cannot assign to an immutable variable ${r}.`);d.value=e,this.log("assign",{var:r,val:e}),a===this.layerdStates.length&&this.onUpdated(r,e);return}a++}throw new yt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}};Cn([Ht],zs.prototype,"log",null);Cn([Ht],zs.prototype,"onUpdated",null);Cn([Ht],zs.prototype,"createChildScope",null);Cn([Ht],zs.prototype,"get",null);Cn([Ht],zs.prototype,"exists",null);Cn([Ht],zs.prototype,"getAll",null);Cn([Ht],zs.prototype,"add",null);Cn([Ht],zs.prototype,"assign",null);let iu;const Md=new Uint8Array(16);function Sd(){if(!iu&&(iu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!iu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return iu(Md)}const lr=[];for(let t=0;t<256;++t)lr.push((t+256).toString(16).slice(1));function Fd(t,r=0){return lr[t[r+0]]+lr[t[r+1]]+lr[t[r+2]]+lr[t[r+3]]+"-"+lr[t[r+4]]+lr[t[r+5]]+"-"+lr[t[r+6]]+lr[t[r+7]]+"-"+lr[t[r+8]]+lr[t[r+9]]+"-"+lr[t[r+10]]+lr[t[r+11]]+lr[t[r+12]]+lr[t[r+13]]+lr[t[r+14]]+lr[t[r+15]]}const Td=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ah={randomUUID:Td};function Od(t,r,e){if(ah.randomUUID&&!r&&!t)return ah.randomUUID();t=t||{};const a=t.random||(t.rng||Sd)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,r){e=e||0;for(let h=0;h<16;++h)r[e+h]=a[h];return r}return Fd(a)}var Xr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Id(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Nd(t){if(t.__esModule)return t;var r=t.default;if(typeof r=="function"){var e=function a(){return this instanceof a?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};e.prototype=r.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var h=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,h.get?h:{enumerable:!0,get:function(){return t[a]}})}),e}var uc={exports:{}};uc.exports;(function(t){(function(r,e,a){function h(A){var C=this,k=$();C.next=function(){var S=2091639*C.s0+C.c*23283064365386963e-26;return C.s0=C.s1,C.s1=C.s2,C.s2=S-(C.c=S|0)},C.c=1,C.s0=k(" "),C.s1=k(" "),C.s2=k(" "),C.s0-=k(A),C.s0<0&&(C.s0+=1),C.s1-=k(A),C.s1<0&&(C.s1+=1),C.s2-=k(A),C.s2<0&&(C.s2+=1),k=null}function d(A,C){return C.c=A.c,C.s0=A.s0,C.s1=A.s1,C.s2=A.s2,C}function x(A,C){var k=new h(A),S=C&&C.state,I=k.next;return I.int32=function(){return k.next()*4294967296|0},I.double=function(){return I()+(I()*2097152|0)*11102230246251565e-32},I.quick=I,S&&(typeof S=="object"&&d(S,k),I.state=function(){return d(k,{})}),I}function $(){var A=4022871197,C=function(k){k=String(k);for(var S=0;S>>0,I-=A,I*=A,A=I>>>0,I-=A,A+=I*4294967296}return(A>>>0)*23283064365386963e-26};return C}e&&e.exports?e.exports=x:a&&a.amd?a(function(){return x}):this.alea=x})(Xr,t,!1)})(uc);var jd=uc.exports,fc={exports:{}};fc.exports;(function(t){(function(r,e,a){function h($){var A=this,C="";A.x=0,A.y=0,A.z=0,A.w=0,A.next=function(){var S=A.x^A.x<<11;return A.x=A.y,A.y=A.z,A.z=A.w,A.w^=A.w>>>19^S^S>>>8},$===($|0)?A.x=$:C+=$;for(var k=0;k>>0)/4294967296};return S.double=function(){do var I=C.next()>>>11,q=(C.next()>>>0)/4294967296,ue=(I+q)/(1<<21);while(ue===0);return ue},S.int32=C.next,S.quick=S,k&&(typeof k=="object"&&d(k,C),S.state=function(){return d(C,{})}),S}e&&e.exports?e.exports=x:a&&a.amd?a(function(){return x}):this.xor128=x})(Xr,t,!1)})(fc);var Rd=fc.exports,cc={exports:{}};cc.exports;(function(t){(function(r,e,a){function h($){var A=this,C="";A.next=function(){var S=A.x^A.x>>>2;return A.x=A.y,A.y=A.z,A.z=A.w,A.w=A.v,(A.d=A.d+362437|0)+(A.v=A.v^A.v<<4^(S^S<<1))|0},A.x=0,A.y=0,A.z=0,A.w=0,A.v=0,$===($|0)?A.x=$:C+=$;for(var k=0;k>>4),A.next()}function d($,A){return A.x=$.x,A.y=$.y,A.z=$.z,A.w=$.w,A.v=$.v,A.d=$.d,A}function x($,A){var C=new h($),k=A&&A.state,S=function(){return(C.next()>>>0)/4294967296};return S.double=function(){do var I=C.next()>>>11,q=(C.next()>>>0)/4294967296,ue=(I+q)/(1<<21);while(ue===0);return ue},S.int32=C.next,S.quick=S,k&&(typeof k=="object"&&d(k,C),S.state=function(){return d(C,{})}),S}e&&e.exports?e.exports=x:a&&a.amd?a(function(){return x}):this.xorwow=x})(Xr,t,!1)})(cc);var Dd=cc.exports,hc={exports:{}};hc.exports;(function(t){(function(r,e,a){function h($){var A=this;A.next=function(){var k=A.x,S=A.i,I,q;return I=k[S],I^=I>>>7,q=I^I<<24,I=k[S+1&7],q^=I^I>>>10,I=k[S+3&7],q^=I^I>>>3,I=k[S+4&7],q^=I^I<<7,I=k[S+7&7],I=I^I<<13,q^=I^I<<9,k[S]=q,A.i=S+1&7,q};function C(k,S){var I,q=[];if(S===(S|0))q[0]=S;else for(S=""+S,I=0;I0;--I)k.next()}C(A,$)}function d($,A){return A.x=$.x.slice(),A.i=$.i,A}function x($,A){$==null&&($=+new Date);var C=new h($),k=A&&A.state,S=function(){return(C.next()>>>0)/4294967296};return S.double=function(){do var I=C.next()>>>11,q=(C.next()>>>0)/4294967296,ue=(I+q)/(1<<21);while(ue===0);return ue},S.int32=C.next,S.quick=S,k&&(k.x&&d(k,C),S.state=function(){return d(C,{})}),S}e&&e.exports?e.exports=x:a&&a.amd?a(function(){return x}):this.xorshift7=x})(Xr,t,!1)})(hc);var Ld=hc.exports,pc={exports:{}};pc.exports;(function(t){(function(r,e,a){function h($){var A=this;A.next=function(){var k=A.w,S=A.X,I=A.i,q,ue;return A.w=k=k+1640531527|0,ue=S[I+34&127],q=S[I=I+1&127],ue^=ue<<13,q^=q<<17,ue^=ue>>>15,q^=q>>>12,ue=S[I]=ue^q,A.i=I,ue+(k^k>>>16)|0};function C(k,S){var I,q,ue,Q,oe,$e=[],j=128;for(S===(S|0)?(q=S,S=null):(S=S+"\0",q=0,j=Math.max(j,S.length)),ue=0,Q=-32;Q>>15,q^=q<<4,q^=q>>>13,Q>=0&&(oe=oe+1640531527|0,I=$e[Q&127]^=q+oe,ue=I==0?ue+1:0);for(ue>=128&&($e[(S&&S.length||0)&127]=-1),ue=127,Q=4*128;Q>0;--Q)q=$e[ue+34&127],I=$e[ue=ue+1&127],q^=q<<13,I^=I<<17,q^=q>>>15,I^=I>>>12,$e[ue]=q^I;k.w=oe,k.X=$e,k.i=ue}C(A,$)}function d($,A){return A.i=$.i,A.w=$.w,A.X=$.X.slice(),A}function x($,A){$==null&&($=+new Date);var C=new h($),k=A&&A.state,S=function(){return(C.next()>>>0)/4294967296};return S.double=function(){do var I=C.next()>>>11,q=(C.next()>>>0)/4294967296,ue=(I+q)/(1<<21);while(ue===0);return ue},S.int32=C.next,S.quick=S,k&&(k.X&&d(k,C),S.state=function(){return d(C,{})}),S}e&&e.exports?e.exports=x:a&&a.amd?a(function(){return x}):this.xor4096=x})(Xr,t,!1)})(pc);var Hd=pc.exports,gc={exports:{}};gc.exports;(function(t){(function(r,e,a){function h($){var A=this,C="";A.next=function(){var S=A.b,I=A.c,q=A.d,ue=A.a;return S=S<<25^S>>>7^I,I=I-q|0,q=q<<24^q>>>8^ue,ue=ue-S|0,A.b=S=S<<20^S>>>12^I,A.c=I=I-q|0,A.d=q<<16^I>>>16^ue,A.a=ue-S|0},A.a=0,A.b=0,A.c=-1640531527,A.d=1367130551,$===Math.floor($)?(A.a=$/4294967296|0,A.b=$|0):C+=$;for(var k=0;k>>0)/4294967296};return S.double=function(){do var I=C.next()>>>11,q=(C.next()>>>0)/4294967296,ue=(I+q)/(1<<21);while(ue===0);return ue},S.int32=C.next,S.quick=S,k&&(typeof k=="object"&&d(k,C),S.state=function(){return d(C,{})}),S}e&&e.exports?e.exports=x:a&&a.amd?a(function(){return x}):this.tychei=x})(Xr,t,!1)})(gc);var Ud=gc.exports,Pp={exports:{}};const Bd={},zd=Object.freeze(Object.defineProperty({__proto__:null,default:Bd},Symbol.toStringTag,{value:"Module"})),qd=Nd(zd);(function(t){(function(r,e,a){var h=256,d=6,x=52,$="random",A=a.pow(h,d),C=a.pow(2,x),k=C*2,S=h-1,I;function q(N,L,z){var K=[];L=L==!0?{entropy:!0}:L||{};var J=$e(oe(L.entropy?[N,O(e)]:N??j(),3),K),Z=new ue(K),pe=function(){for(var we=Z.g(d),fe=A,Fe=0;we=k;)we/=2,fe/=2,Fe>>>=1;return(we+Fe)/fe};return pe.int32=function(){return Z.g(4)|0},pe.quick=function(){return Z.g(4)/4294967296},pe.double=pe,$e(O(Z.S),e),(L.pass||z||function(we,fe,Fe,Ze){return Ze&&(Ze.S&&Q(Ze,Z),we.state=function(){return Q(Z,{})}),Fe?(a[$]=we,fe):we})(pe,J,"global"in L?L.global:this==a,L.state)}function ue(N){var L,z=N.length,K=this,J=0,Z=K.i=K.j=0,pe=K.S=[];for(z||(N=[z++]);J({type:"num",value:t}),dt=t=>({type:"str",value:t}),yi=t=>({type:"bool",value:t}),dc=t=>({type:"obj",value:t}),gr=t=>({type:"arr",value:t}),Gd=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),te=t=>({type:"fn",native:t}),e0=t=>({type:"return",value:t}),t0=()=>({type:"break",value:null}),r0=()=>({type:"continue",value:null}),s0=t=>t.type==="return"?t.value:t,kp=(t,r)=>({type:"error",value:t,info:r});function Kr(t){if(t==null)throw new yt("Expect anything, but got nothing.")}function Ar(t){if(t==null)throw new yt("Expect boolean, but got nothing.");if(t.type!=="bool")throw new yt(`Expect boolean, but got ${t.type}.`)}function yn(t){if(t==null)throw new yt("Expect function, but got nothing.");if(t.type!=="fn")throw new yt(`Expect function, but got ${t.type}.`)}function Vt(t){if(t==null)throw new yt("Expect string, but got nothing.");if(t.type!=="str")throw new yt(`Expect string, but got ${t.type}.`)}function ge(t){if(t==null)throw new yt("Expect number, but got nothing.");if(t.type!=="num")throw new yt(`Expect number, but got ${t.type}.`)}function hn(t){if(t==null)throw new yt("Expect object, but got nothing.");if(t.type!=="obj")throw new yt(`Expect object, but got ${t.type}.`)}function Mu(t){if(t==null)throw new yt("Expect array, but got nothing.");if(t.type!=="arr")throw new yt(`Expect array, but got ${t.type}.`)}function tf(t){return t.type==="obj"}function lh(t){return t.type==="arr"}function kf(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function Ef(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(a=>Ef(a,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function Mf(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>Mf(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,a]of t.value.entries())r[e]=Mf(a);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function Sf(t){if(t===null)return nt;if(typeof t=="boolean")return yi(t);if(typeof t=="string")return dt(t);if(typeof t=="number")return ye(t);if(Array.isArray(t))return gr(t.map(r=>Sf(r)));if(typeof t=="object"){const r=new Map;for(const[e,a]of Object.entries(t))r.set(e,Sf(a));return dc(r)}return nt}function ga(t,r=!1,e=new Set){if((t.type==="arr"||t.type==="obj")&&e.has(t.value))return"...";if(r&&t.type==="str")return'"'+t.value.replace(/["\\\r\n]/g,a=>`\\${a}`)+'"';if(t.type==="str")return t.value;if(t.type==="num")return t.value.toString();if(t.type==="arr"){e.add(t.value);const a=[];for(const h of t.value)a.push(ga(h,!0,e));return"[ "+a.join(", ")+" ]"}if(t.type==="obj"){e.add(t.value);const a=[];for(const[h,d]of t.value)a.push(`${h}: ${ga(d,!0,e)}`);return"{ "+a.join(", ")+" }"}return t.type==="bool"?t.value.toString():t.type==="null"?"null":t.type==="fn"?`@( ${(t.args??[]).join(", ")} ) { ... }`:"?"}const n0={help:dt("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":dt("0.16.0"),"Core:ai":dt("kawaii"),"Core:not":te(([t])=>(Ar(t),t.value?Br:rs)),"Core:eq":te(([t,r])=>(Kr(t),Kr(r),kf(t,r)?rs:Br)),"Core:neq":te(([t,r])=>(Kr(t),Kr(r),kf(t,r)?Br:rs)),"Core:and":te(([t,r])=>(Ar(t),t.value?(Ar(r),r.value?rs:Br):Br)),"Core:or":te(([t,r])=>(Ar(t),t.value?rs:(Ar(r),r.value?rs:Br))),"Core:add":te(([t,r])=>(ge(t),ge(r),ye(t.value+r.value))),"Core:sub":te(([t,r])=>(ge(t),ge(r),ye(t.value-r.value))),"Core:mul":te(([t,r])=>(ge(t),ge(r),ye(t.value*r.value))),"Core:pow":te(([t,r])=>{ge(t),ge(r);const e=t.value**r.value;if(isNaN(e))throw new yt("Invalid operation.");return ye(e)}),"Core:div":te(([t,r])=>{ge(t),ge(r);const e=t.value/r.value;if(isNaN(e))throw new yt("Invalid operation.");return ye(e)}),"Core:mod":te(([t,r])=>(ge(t),ge(r),ye(t.value%r.value))),"Core:gt":te(([t,r])=>(ge(t),ge(r),t.value>r.value?rs:Br)),"Core:lt":te(([t,r])=>(ge(t),ge(r),t.value(ge(t),ge(r),t.value>=r.value?rs:Br)),"Core:lteq":te(([t,r])=>(ge(t),ge(r),t.value<=r.value?rs:Br)),"Core:type":te(([t])=>(Kr(t),dt(t.type))),"Core:to_str":te(([t])=>(Kr(t),dt(ga(t)))),"Core:range":te(([t,r])=>(ge(t),ge(r),t.valueye(a+t.value))):t.value>r.value?gr(Array.from({length:t.value-r.value+1},(e,a)=>ye(t.value-a))):gr([t]))),"Core:sleep":te(async([t])=>(ge(t),await new Promise(r=>setTimeout(r,t.value)),nt)),"Util:uuid":te(()=>dt(Od())),"Json:stringify":te(([t])=>(Kr(t),dt(JSON.stringify(Mf(t))))),"Json:parse":te(([t])=>{Vt(t);try{return Sf(JSON.parse(t.value))}catch{return kp("not_json")}}),"Json:parsable":te(([t])=>{Vt(t);try{JSON.parse(t.value)}catch{return yi(!1)}return yi(!0)}),"Date:now":te(()=>ye(Date.now())),"Date:year":te(([t])=>(t&&ge(t),ye(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":te(([t])=>(t&&ge(t),ye(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":te(([t])=>(t&&ge(t),ye(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":te(([t])=>(t&&ge(t),ye(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":te(([t])=>(t&&ge(t),ye(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":te(([t])=>(t&&ge(t),ye(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":te(([t])=>(Vt(t),ye(new Date(t.value).getTime()))),"Math:Infinity":ye(1/0),"Math:E":ye(Math.E),"Math:LN2":ye(Math.LN2),"Math:LN10":ye(Math.LN10),"Math:LOG2E":ye(Math.LOG2E),"Math:LOG10E":ye(Math.LOG10E),"Math:PI":ye(Math.PI),"Math:SQRT1_2":ye(Math.SQRT1_2),"Math:SQRT2":ye(Math.SQRT2),"Math:abs":te(([t])=>(ge(t),ye(Math.abs(t.value)))),"Math:acos":te(([t])=>(ge(t),ye(Math.acos(t.value)))),"Math:acosh":te(([t])=>(ge(t),ye(Math.acosh(t.value)))),"Math:asin":te(([t])=>(ge(t),ye(Math.asin(t.value)))),"Math:asinh":te(([t])=>(ge(t),ye(Math.asinh(t.value)))),"Math:atan":te(([t])=>(ge(t),ye(Math.atan(t.value)))),"Math:atanh":te(([t])=>(ge(t),ye(Math.atanh(t.value)))),"Math:atan2":te(([t,r])=>(ge(t),ge(r),ye(Math.atan2(t.value,r.value)))),"Math:cbrt":te(([t])=>(ge(t),ye(Math.cbrt(t.value)))),"Math:ceil":te(([t])=>(ge(t),ye(Math.ceil(t.value)))),"Math:clz32":te(([t])=>(ge(t),ye(Math.clz32(t.value)))),"Math:cos":te(([t])=>(ge(t),ye(Math.cos(t.value)))),"Math:cosh":te(([t])=>(ge(t),ye(Math.cosh(t.value)))),"Math:exp":te(([t])=>(ge(t),ye(Math.exp(t.value)))),"Math:expm1":te(([t])=>(ge(t),ye(Math.expm1(t.value)))),"Math:floor":te(([t])=>(ge(t),ye(Math.floor(t.value)))),"Math:fround":te(([t])=>(ge(t),ye(Math.fround(t.value)))),"Math:hypot":te(([t])=>{Mu(t);const r=[];for(const e of t.value)ge(e),r.push(e.value);return ye(Math.hypot(...r))}),"Math:imul":te(([t,r])=>(ge(t),ge(r),ye(Math.imul(t.value,r.value)))),"Math:log":te(([t])=>(ge(t),ye(Math.log(t.value)))),"Math:log1p":te(([t])=>(ge(t),ye(Math.log1p(t.value)))),"Math:log10":te(([t])=>(ge(t),ye(Math.log10(t.value)))),"Math:log2":te(([t])=>(ge(t),ye(Math.log2(t.value)))),"Math:max":te(([t,r])=>(ge(t),ge(r),ye(Math.max(t.value,r.value)))),"Math:min":te(([t,r])=>(ge(t),ge(r),ye(Math.min(t.value,r.value)))),"Math:pow":te(([t,r])=>(ge(t),ge(r),ye(Math.pow(t.value,r.value)))),"Math:round":te(([t])=>(ge(t),ye(Math.round(t.value)))),"Math:sign":te(([t])=>(ge(t),ye(Math.sign(t.value)))),"Math:sin":te(([t])=>(ge(t),ye(Math.sin(t.value)))),"Math:sinh":te(([t])=>(ge(t),ye(Math.sinh(t.value)))),"Math:sqrt":te(([t])=>{ge(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new yt("Invalid operation.");return ye(r)}),"Math:tan":te(([t])=>(ge(t),ye(Math.tan(t.value)))),"Math:tanh":te(([t])=>(ge(t),ye(Math.tanh(t.value)))),"Math:trunc":te(([t])=>(ge(t),ye(Math.trunc(t.value)))),"Math:rnd":te(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?ye(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):ye(Math.random())),"Math:gen_rng":te(([t])=>{if(Kr(t),t.type!=="num"&&t.type!=="str")return nt;const r=vc(t.value.toString());return te(([e,a])=>e&&e.type==="num"&&a&&a.type==="num"?ye(Math.floor(r()*(Math.floor(a.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):ye(r()))}),"Num:to_hex":te(([t])=>(ge(t),dt(t.value.toString(16)))),"Num:from_hex":te(([t])=>(Vt(t),ye(parseInt(t.value,16)))),"Str:lf":dt(` -`),"Str:lt":te(([t,r])=>(Vt(t),Vt(r),t.value(Vt(t),Vt(r),t.value>r.value?ye(-1):t.value===r.value?ye(0):ye(1))),"Str:from_codepoint":te(([t])=>(ge(t),dt(String.fromCodePoint(t.value)))),"Obj:keys":te(([t])=>(hn(t),gr(Array.from(t.value.keys()).map(r=>dt(r))))),"Obj:vals":te(([t])=>(hn(t),gr(Array.from(t.value.values())))),"Obj:kvs":te(([t])=>(hn(t),gr(Array.from(t.value.entries()).map(([r,e])=>gr([dt(r),e]))))),"Obj:get":te(([t,r])=>(hn(t),Vt(r),t.value.get(r.value)??nt)),"Obj:set":te(([t,r,e])=>(hn(t),Vt(r),Kr(e),t.value.set(r.value,e),nt)),"Obj:has":te(([t,r])=>(hn(t),Vt(r),yi(t.value.has(r.value)))),"Obj:copy":te(([t])=>(hn(t),dc(new Map(t.value)))),"Async:interval":te(async([t,r,e],a)=>{ge(t),yn(r),e&&(Ar(e),e.value&&a.call(r,[]));const h=setInterval(()=>{a.topCall(r,[])},t.value),d=()=>{clearInterval(h)};return a.registerAbortHandler(d),te(([],x)=>{clearInterval(h),x.unregisterAbortHandler(d)})}),"Async:timeout":te(async([t,r],e)=>{ge(t),yn(r);const a=setTimeout(()=>{e.topCall(r,[])},t.value),h=()=>{clearTimeout(a)};return e.registerAbortHandler(h),te(([],d)=>{clearTimeout(a),d.unregisterAbortHandler(h)})})};var Ei={},i0=()=>{const t="\\ud800-\\udfff",r="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",h="\\u1ab0-\\u1aff",d="\\u1dc0-\\u1dff",x=r+e+a+h+d,$="\\ufe0e\\ufe0f",A="\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93",C=`[${t}]`,k=`[${x}]`,S="\\ud83c[\\udffb-\\udfff]",I=`(?:${k}|${S})`,q=`[^${t}]`,ue="(?:\\uD83C[\\uDDE6-\\uDDFF]){2}",Q="[\\ud800-\\udbff][\\udc00-\\udfff]",oe="\\u200d",$e="(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)",j=`[${A}]`,O=`${I}?`,N=`[${$}]?`,L=`(?:${oe}(?:${[q,ue,Q].join("|")})${N+O})*`,z=N+O+L,J=`(?:${[`${q}${k}?`,k,ue,Q,C,j].join("|")})`;return new RegExp(`${$e}|${S}(?=${S})|${J+z}`,"g")},a0=Xr&&Xr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ei,"__esModule",{value:!0});var qu=a0(i0);function Ff(t){if(typeof t!="string")throw new Error("A string is expected as input");return t.match(qu.default())||[]}var _a=Ei.toArray=Ff;function yc(t){if(typeof t!="string")throw new Error("Input must be a string");var r=t.match(qu.default());return r===null?0:r.length}var mc=Ei.length=yc;function Ep(t,r,e){if(r===void 0&&(r=0),typeof t!="string")throw new Error("Input must be a string");(typeof r!="number"||r<0)&&(r=0),typeof e=="number"&&e<0&&(e=0);var a=t.match(qu.default());return a?a.slice(r,e).join(""):""}var wc=Ei.substring=Ep;function l0(t,r,e){if(r===void 0&&(r=0),typeof t!="string")throw new Error("Input must be a string");var a=yc(t);if(typeof r!="number"&&(r=parseInt(r,10)),r>=a)return"";r<0&&(r+=a);var h;typeof e>"u"?h=a:(typeof e!="number"&&(e=parseInt(e,10)),h=e>=0?e+r:r);var d=t.match(qu.default());return d?d.slice(r,h).join(""):""}Ei.substr=l0;function o0(t,r,e,a){if(r===void 0&&(r=16),e===void 0&&(e="#"),a===void 0&&(a="right"),typeof t!="string"||typeof r!="number")throw new Error("Invalid arguments specified");if(["left","right"].indexOf(a)===-1)throw new Error("Pad position should be either left or right");typeof e!="string"&&(e=String(e));var h=yc(t);if(h>r)return Ep(t,0,r);if(h=a.length)return r===""?a.length:-1;if(r==="")return e;var h=Ff(r),d=!1,x;for(x=e;xte(async(r,e)=>dt(t.value.toString()))},str:{to_num:t=>te(async(r,e)=>{const a=parseInt(t.value,10);return isNaN(a)?nt:ye(a)}),len:t=>ye(mc(t.value)),replace:t=>te(async([r,e],a)=>(Vt(r),Vt(e),dt(t.value.split(r.value).join(e.value)))),index_of:t=>te(async([r],e)=>(Vt(r),ye($c(t.value,r.value)))),incl:t=>te(async([r],e)=>(Vt(r),t.value.includes(r.value)?rs:Br)),trim:t=>te(async(r,e)=>dt(t.value.trim())),upper:t=>te(async(r,e)=>dt(t.value.toUpperCase())),lower:t=>te(async(r,e)=>dt(t.value.toLowerCase())),split:t=>te(async([r],e)=>(r&&Vt(r),gr(r?t.value.split(r?r.value:"").map(a=>dt(a)):_a(t.value).map(a=>dt(a))))),slice:t=>te(async([r,e],a)=>(ge(r),ge(e),dt(wc(t.value,r.value,e.value)))),pick:t=>te(async([r],e)=>{ge(r);const h=_a(t.value)[r.value];return h?dt(h):nt}),codepoint_at:t=>te(([r],e)=>{ge(r);const a=t.value.charCodeAt(r.value);return Number.isNaN(a)?nt:ye(a)})},arr:{len:t=>ye(t.value.length),push:t=>te(async([r],e)=>(Kr(r),t.value.push(r),t)),unshift:t=>te(async([r],e)=>(Kr(r),t.value.unshift(r),t)),pop:t=>te(async(r,e)=>t.value.pop()??nt),shift:t=>te(async(r,e)=>t.value.shift()??nt),concat:t=>te(async([r],e)=>(Mu(r),gr(t.value.concat(r.value)))),slice:t=>te(async([r,e],a)=>(ge(r),ge(e),gr(t.value.slice(r.value,e.value)))),join:t=>te(async([r],e)=>(r&&Vt(r),dt(t.value.map(a=>a.type==="str"?a.value:"").join(r?r.value:"")))),map:t=>te(async([r],e)=>{yn(r);const a=t.value.map(async(h,d)=>await e.call(r,[h,ye(d)]));return gr(await Promise.all(a))}),filter:t=>te(async([r],e)=>{yn(r);const a=[];for(let h=0;hte(async([r,e],a)=>{yn(r);const h=e!=null;let d=h?e:t.value[0];for(let x=h?0:1;xte(async([r],e)=>{yn(r);for(let a=0;ate(async([r],e)=>(Kr(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?Br:(h=>h.value.map(d=>d.type==="str"||d.type==="num"||d.type==="bool"?d.value:d.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?rs:Br)),reverse:t=>te(async(r,e)=>(t.value.reverse(),nt)),copy:t=>te(async(r,e)=>gr([...t.value])),sort:t=>te(async([r],e)=>{const a=async(d,x)=>{if(d.length<=1)return d;const $=Math.floor(d.length/2),A=await a(d.slice(0,$),x),C=await a(d.slice($),x);return h(A,C,x)},h=async(d,x,$)=>{const A=[];let C=0,k=0;for(;Cdt(t.value),info:t=>t.info??nt}};function f0(t,r){if(Object.hasOwn(oh,t.type)){const e=oh[t.type];if(Object.hasOwn(e,r))return e[r](t);throw new yt(`No such prop (${r}) in ${t.type}.`)}else throw new yt(`Cannot read prop of ${t.type}. (reading ${r})`)}const c0={mut(t){return{isMutable:!0,value:t}},const(t){return{isMutable:!1,value:t}}};var Er=globalThis&&globalThis.__decorate||function(t,r,e,a){var h=arguments.length,d=h<3?r:a===null?a=Object.getOwnPropertyDescriptor(r,e):a,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,a);else for(var $=t.length-1;$>=0;$--)(x=t[$])&&(d=(h<3?x(d):h>3?x(r,e,d):x(r,e))||d);return h>3&&d&&Object.defineProperty(r,e,d),d};const Mp=300,h0=Mp-1;let wr=class{constructor(r,e={}){Be(this,"opts");Be(this,"stepCount",0);Be(this,"stop",!1);Be(this,"scope");Be(this,"abortHandlers",[]);Be(this,"vars",{});this.opts=e;const a={print:te(([h])=>{Kr(h),this.opts.out&&this.opts.out(h)}),readline:te(async h=>{const d=h[0];if(Vt(d),this.opts.in==null)return nt;const x=await this.opts.in(d.value);return dt(x)})};this.vars=Object.fromEntries(Object.entries({...r,...n0,...a}).map(([h,d])=>[h,c0.const(d)])),this.scope=new zs([new Map(Object.entries(this.vars))]),this.scope.opts.log=(h,d)=>{switch(h){case"add":this.log("var:add",d);break;case"read":this.log("var:read",d);break;case"write":this.log("var:write",d);break}}}async exec(r){if(!(r==null||r.length===0))try{await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}catch(e){this.handleError(e)}}async execFn(r,e){return await this._fn(r,e).catch(a=>(this.handleError(a),kp("func_failed")))}execFnSimple(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(h){switch(h.type){case"arr":return h.value.map(d=>e(d));case"bool":return h.value;case"null":return null;case"num":return h.value;case"obj":{const d={};for(const[x,$]of h.value.entries())d[x]=e($);return d}case"str":return h.value;default:return}}const a=new Map;for(const h of r)switch(h.type){case"meta":{a.set(h.name,e(h.value));break}}return a}handleError(r){if(this.opts.err)this.stop||(this.abort(),r instanceof zu?this.opts.err(r):this.opts.err(new kd(r)));else throw r}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const a of r.members)switch(a.type){case"def":{if(a.mut)throw new Error("Namespaces cannot include mutable variable: "+a.name);const h={isMutable:a.mut,value:await this._eval(a.expr,e)};e.add(a.name,h),this.scope.add(r.name+":"+a.name,h);break}case"ns":break;default:throw new Error("invalid ns member type: "+a.type)}}async _fn(r,e){if(r.native)return r.native(e,{call:this.execFnSimple,topCall:this.execFn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??nt;{const a=new Map;for(let d=0;d<(r.args??[]).length;d++)a.set(r.args[d],{isMutable:!0,value:e[d]});const h=r.scope.createChildScope(a);return s0(await this._run(r.statements,h))}}async _eval(r,e){if(this.stop)return nt;if(this.stepCount%Mp===h0&&await new Promise(a=>setTimeout(a,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new yt("max step exceeded");switch(r.type){case"call":{const a=await this._eval(r.target,e);yn(a);const h=await Promise.all(r.args.map(d=>this._eval(d,e)));return this._fn(a,h)}case"if":{const a=await this._eval(r.cond,e);if(Ar(a),a.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const h of r.elseif){const d=await this._eval(h.cond,e);if(Ar(d),d.value)return this._eval(h.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return nt}case"match":{const a=await this._eval(r.about,e);for(const h of r.qs){const d=await this._eval(h.q,e);if(kf(a,d))return await this._eval(h.a,e)}return r.default?await this._eval(r.default,e):nt}case"loop":{for(;;){const a=await this._run(r.statements,e.createChildScope());if(a.type==="break")break;if(a.type==="return")return a}return nt}case"for":{if(r.times){const a=await this._eval(r.times,e);ge(a);for(let h=0;h0){const h=[];for(const d of r.attr)h.push({name:d.name,value:await this._eval(d.value,e)});a.attr=h}return e.add(r.name,{isMutable:r.mut,value:a}),nt}case"identifier":return e.get(r.name);case"assign":{const a=await this._eval(r.expr,e);return await this.assign(e,r.dest,a),nt}case"addAssign":{const a=await this._eval(r.dest,e);ge(a);const h=await this._eval(r.expr,e);return ge(h),await this.assign(e,r.dest,ye(a.value+h.value)),nt}case"subAssign":{const a=await this._eval(r.dest,e);ge(a);const h=await this._eval(r.expr,e);return ge(h),await this.assign(e,r.dest,ye(a.value-h.value)),nt}case"null":return nt;case"bool":return yi(r.value);case"num":return ye(r.value);case"str":return dt(r.value);case"arr":return gr(await Promise.all(r.value.map(a=>this._eval(a,e))));case"obj":{const a=new Map;for(const h of r.value.keys())a.set(h,await this._eval(r.value.get(h),e));return dc(a)}case"prop":{const a=await this._eval(r.target,e);return tf(a)?a.value.has(r.name)?a.value.get(r.name):nt:f0(a,r.name)}case"index":{const a=await this._eval(r.target,e),h=await this._eval(r.index,e);if(lh(a)){ge(h);const d=a.value[h.value];if(d===void 0)throw new Ed(`Index out of range. index: ${h.value} max: ${a.value.length-1}`);return d}else{if(tf(a))return Vt(h),a.value.has(h.value)?a.value.get(h.value):nt;throw new yt(`Cannot read prop (${ga(h)}) of ${a.type}.`)}}case"not":{const a=await this._eval(r.expr,e);return Ar(a),yi(!a.value)}case"fn":return Gd(r.args.map(a=>a.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"exists":return yi(e.exists(r.identifier.name));case"tmpl":{let a="";for(const h of r.tmpl)if(typeof h=="string")a+=h;else{const d=await this._eval(h,e);a+=ga(d)}return dt(a)}case"return":{const a=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:a}),e0(a)}case"break":return this.log("block:break",{scope:e.name}),t0();case"continue":return this.log("block:continue",{scope:e.name}),r0();case"ns":return nt;case"meta":return nt;case"and":{const a=await this._eval(r.left,e);if(Ar(a),a.value){const h=await this._eval(r.right,e);return Ar(h),h}else return a}case"or":{const a=await this._eval(r.left,e);if(Ar(a),a.value)return a;{const h=await this._eval(r.right,e);return Ar(h),h}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let a=nt;for(let h=0;he!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,a){if(e.type==="identifier")r.assign(e.name,a);else if(e.type==="index"){const h=await this._eval(e.target,r),d=await this._eval(e.index,r);if(lh(h))ge(d),h.value[d.value]=a;else if(tf(h))Vt(d),h.value.set(d.value,a);else throw new yt(`Cannot read prop (${ga(d)}) of ${h.type}.`)}else if(e.type==="prop"){const h=await this._eval(e.target,r);hn(h),h.value.set(e.name,a)}else throw new yt("The left-hand side of an assignment expression must be a variable or a property/index access.")}};Er([Ht],wr.prototype,"exec",null);Er([Ht],wr.prototype,"execFn",null);Er([Ht],wr.prototype,"execFnSimple",null);Er([Ht],wr.prototype,"handleError",null);Er([Ht],wr.prototype,"log",null);Er([Ht],wr.prototype,"collectNs",null);Er([Ht],wr.prototype,"collectNsMember",null);Er([Ht],wr.prototype,"_fn",null);Er([Ht],wr.prototype,"_eval",null);Er([Ht],wr.prototype,"_run",null);Er([Ht],wr.prototype,"registerAbortHandler",null);Er([Ht],wr.prototype,"unregisterAbortHandler",null);Er([Ht],wr.prototype,"abort",null);Er([Ht],wr.prototype,"assign",null);Er([Ht],wr,"collectMetadata",null);function p0(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function mi(t,r,e,a){var h=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(h,mi.prototype),h.expected=r,h.found=e,h.location=a,h.name="SyntaxError",h}p0(mi,Error);function rf(t,r,e){return e=e||" ",t.length>r?t:(r-=t.length,e+=e.repeat(r),t+e.slice(0,r))}mi.prototype.format=function(t){var r="Error: "+this.message;if(this.location){var e=null,a;for(a=0;a `+x+` -`+A+` | -`+d.line+" | "+C+` -`+A+" | "+rf("",h.column-1," ")+rf("",S,"^")}else r+=` - at `+x}return r};mi.buildMessage=function(t,r){var e={literal:function(C){return'"'+h(C.text)+'"'},class:function(C){var k=C.parts.map(function(S){return Array.isArray(S)?d(S[0])+"-"+d(S[1]):d(S)});return"["+(C.inverted?"^":"")+k.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(C){return C.description}};function a(C){return C.charCodeAt(0).toString(16).toUpperCase()}function h(C){return C.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(k){return"\\x0"+a(k)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(k){return"\\x"+a(k)})}function d(C){return C.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(k){return"\\x0"+a(k)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(k){return"\\x"+a(k)})}function x(C){return e[C.type](C)}function $(C){var k=C.map(x),S,I;if(k.sort(),k.length>0){for(S=1,I=1;S=",Le="<",$r=">",_t="+",Jt="-",ft="*",Kt="^",cr="/",Yt="%",rr="!",Ct="[",R=".",B="if",Y="elif",se="else",le="match",ne="=>",xe="eval",ce="exists",he="`",ie='"',Ee="'",Ce='\\"',Me="\\'",Ie="true",De="false",Ve="null",Qe=";",rt="@",Ut="@(",lt=`\r -`,hr=/^[A-Z0-9_:]/i,ls=/^[^`{]/,Mr=/^[{}`]/,Et=/^[+\-]/,Ge=/^[1-9]/,sr=/^[0-9]/,kn=/^[A-Z_]/i,Fi=/^[A-Z0-9_]/i,Ea=/^[\r\n]/,Ma=/^[ \t\r\n]/,Nt=/^[ \t]/,Sr=ys(),Sa=ke("//",!1),Ts=ke("/*",!1),nr=ke("*/",!1),Mt=ke("(",!1),Gr=ke(")",!1),jt=ke("::",!1),st=ke("{",!1),pr=ke("}",!1),Fr=ke("###",!1),ot=ke("let",!1),Rt=ke(":",!1),Os=ke("=",!1),Fa=ke("var",!1),Ta=ke("<:",!1),os=ke("#[",!1),As=ke("]",!1),at=ke("each",!1),Dt=ke(",",!1),qs=ke("for",!1),zt=ke("return",!1),Rr=ir([["A","Z"],["0","9"],"_",":"],!1,!0),Oa=ke("loop",!1),Ia=ke("break",!1),Na=ke("continue",!1),ja=ke("+=",!1),En=ke("-=",!1),Ti=ke("\\",!1),Ra=ke("||",!1),Da=ke("&&",!1),La=ke("==",!1),Ha=ke("!=",!1),Ua=ke("<=",!1),Mn=ke(">=",!1),Ks=ke("<",!1),Oi=ke(">",!1),Ba=ke("+",!1),Sn=ke("-",!1),Ii=ke("*",!1),za=ke("^",!1),qa=ke("/",!1),Ka=ke("%",!1),Is=ke("!",!1),us=ke("[",!1),Fn=ke(".",!1),Va=ke("if",!1),Wa=ke("elif",!1),Ja=ke("else",!1),fs=ke("match",!1),Vs=ke("=>",!1),cs=ke("eval",!1),Za=ke("exists",!1),Ws=ke("`",!1),hs=ir(["`","{"],!0,!1),ps=ir(["{","}","`"],!1,!1),Js=ke('"',!1),Zs=ke("'",!1),gs=ke('\\"',!1),Tn=ke("\\'",!1),wt=ir(["+","-"],!1,!1),Ni=ir([["1","9"]],!1,!1),Tr=ir([["0","9"]],!1,!1),Xa=ke("true",!1),vs=ke("false",!1),Ya=ke("null",!1),_s=ke(";",!1),Qa=ke("@",!1),Xs=ke("@(",!1),Ga=ir([["A","Z"],"_"],!1,!0),ji=ir([["A","Z"],["0","9"],"_"],!1,!0),el=ke(`\r -`,!1),tl=ir(["\r",` -`],!1,!1),rl=ir([" "," ","\r",` -`],!1,!1),sl=ir([" "," "],!1,!1),nl=function(i){return i.join("")},il=function(){return X()},al=function(){return X()},ll=function(){return""},On=function(){return""},ol=function(i){return i??[]},Ys=function(i,l){return l},ul=function(i,l){return[i,...l]},Qs=function(i,l){return l},fl=function(i,l){return[i,...l]},Ri=function(i,l){return l},cl=function(i,l){return[i,...l]},hl=function(i){return i},pl=function(i,l){return u("ns",{name:i,members:l})},gl=function(i,l){return u("meta",{name:i,value:l})},vl=function(i){return u("meta",{name:null,value:i})},dl=function(i,l,p){return u("def",{name:i,varType:l,expr:p,mut:!1,attr:[]})},yl=function(i,l,p){return u("def",{name:i,varType:l,expr:p,mut:!0,attr:[]})},ml=function(i){return u("identifier",{name:"print",chain:[u("callChain",{args:[i]})]})},wl=function(i,l){return u("attr",{name:i,value:l??u("bool",{value:!0})})},$l=function(i,l,p){return u("each",{var:i,items:l,for:p})},xl=function(i,l,p){return u("each",{var:i,items:l,for:p})},bl=function(i,l){return l},Al=function(i,l,p,f){return u("for",{var:i,from:l??u("num",{value:0}),to:p,for:f})},_l=function(i,l){return l},Cl=function(i,l,p,f){return u("for",{var:i,from:l??u("num",{value:0}),to:p,for:f})},Pl=function(i,l){return u("for",{times:i,for:l})},kl=function(i,l){return u("for",{times:i,for:l})},El=function(i){return u("return",{expr:i})},Ml=function(i){return u("loop",{statements:i})},Sl=function(){return u("break",{})},In=function(){return u("continue",{})},Fl=function(i,l,p){return l==="+="?u("addAssign",{dest:i,expr:p}):l==="-="?u("subAssign",{dest:i,expr:p}):u("assign",{dest:i,expr:p})},Di=function(i,l,p){return{op:l,term:p}},Tl=function(i,l){return u("infix",{operands:[i,...l.map(p=>p.term)],operators:l.map(p=>p.op)})},Ol=function(){return X()},Il=function(i){return u("not",{expr:i})},Nn=function(i,l){return{...i,chain:l}},Nl=function(i){return u("callChain",{args:i??[]})},Li=function(i,l){return l},jl=function(i,l){return[i,...l]},Rl=function(i){return u("indexChain",{index:i})},Dl=function(i){return u("propChain",{name:i})},Ll=function(i,l,p,f){return u("if",{cond:i,then:l,elseif:p??[],else:f})},Hl=function(i,l){return[i,...l]},jn=function(i,l){return{cond:i,then:l}},Ul=function(i){return i},Hi=function(i,l,p){return{q:l,a:p}},Bl=function(i,l,p){return u("match",{about:i,qs:l??[],default:p})},zl=function(i){return u("block",{statements:i})},ql=function(i){return u("exists",{identifier:i})},Rn=function(i){return u("identifier",{name:i})},Kl=function(i){return u("tmpl",{tmpl:i})},Dn=function(i){return i.join("")},Ui=function(i){return i},Vl=function(i){return u("str",{value:i.join("")})},Bi=function(i){return i},Wl=function(i){return u("str",{value:i.join("")})},Jl=function(){return'"'},Zl=function(){return"'"},Xl=function(){return u("num",{value:parseFloat(X())})},Yl=function(){return u("num",{value:parseFloat(X())})},Ql=function(){return u("num",{value:parseInt(X(),10)})},Gl=function(){return u("num",{value:parseInt(X(),10)})},Ln=function(){return u("bool",{value:!0})},eo=function(){return u("bool",{value:!1})},Hn=function(){return u("null",{})},zi=function(i,l){return{k:i,v:l}},to=function(i){const l=new Map;for(const p of i)l.set(p.k,p.v);return u("obj",{value:l})},qi=function(i){return i},ro=function(i){return u("arr",{value:i})},so=function(i,l){return{name:i,argType:l}},Un=function(i,l){return[i,...l]},no=function(i,l,p,f,y,v){return(i.length>0||p.length>0)&&co("Cannot use spaces before or after the function name."),u("def",{name:l,expr:u("fn",{args:f??[],retType:y},v??[]),mut:!1,attr:[]})},Bn=function(i,l,p){return u("fn",{args:i??[],retType:l},p??[])},Ki=function(i){return i},io=function(i){return u("arr",{value:i})},Vi=function(i,l){return{k:i,v:l}},ao=function(i){const l=new Map;for(const p of i)l.set(p.k,p.v);return u("obj",{value:l})},lo=function(i,l){return u("fnTypeSource",{args:i??[],result:l})},oo=function(i,l){return[i,...l]},uo=function(i,l){return u("namedTypeSource",{name:i,inner:l})},fo=function(i){return u("namedTypeSource",{name:i,inner:null})},s=function(){return X()},U=function(){return X()},ds=function(i){return u("block",{statements:i??[]})},c=0,ae=0,b=[{line:1,column:1}],E=0,Dr=[],T=0,W={},Gs;if("startRule"in r){if(!(r.startRule in h))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');d=h[r.startRule]}function X(){return t.substring(ae,c)}function Pt(){return en(ae,c)}function co(i,l){throw l=l!==void 0?l:en(ae,c),zn(i,l)}function ke(i,l){return{type:"literal",text:i,ignoreCase:l}}function ir(i,l,p){return{type:"class",parts:i,inverted:l,ignoreCase:p}}function ys(){return{type:"any"}}function P(){return{type:"end"}}function Wi(i){var l=b[i],p;if(l)return l;for(p=i-1;!b[p];)p--;for(l=b[p],l={line:l.line,column:l.column};pE&&(E=c,Dr=[]),Dr.push(i))}function zn(i,l){return new mi(i,null,null,l)}function ho(i,l,p){return new mi(mi.buildMessage(i,l),i,l,p)}function Ji(){var i,l,p,f=c*77+0,y=W[f];if(y)return c=y.nextPos,y.result;for(i=c,l=[],p=Zi();p!==e;)l.push(p),p=Zi();return ae=i,l=nl(l),i=l,W[f]={nextPos:c,result:i},i}function Zi(){var i,l,p=c*77+1,f=W[p];return f?(c=f.nextPos,f.result):(i=c,l=ks(),l!==e&&(ae=i,l=il()),i=l,i===e&&(i=c,l=Yn(),l!==e&&(ae=i,l=al()),i=l,i===e&&(i=po(),i===e&&(t.length>c?(i=t.charAt(c),c++):(i=e,T===0&&H(Sr))))),W[p]={nextPos:c,result:i},i)}function po(){var i,l,p,f,y,v,_=c*77+2,w=W[_];if(w)return c=w.nextPos,w.result;if(i=c,t.substr(c,2)===x?(l=x,c+=2):(l=e,T===0&&H(Sa)),l!==e){for(p=[],f=c,y=c,T++,v=n(),T--,v===e?y=void 0:(c=y,y=e),y!==e?(t.length>c?(v=t.charAt(c),c++):(v=e,T===0&&H(Sr)),v!==e?(y=[y,v],f=y):(c=f,f=e)):(c=f,f=e);f!==e;)p.push(f),f=c,y=c,T++,v=n(),T--,v===e?y=void 0:(c=y,y=e),y!==e?(t.length>c?(v=t.charAt(c),c++):(v=e,T===0&&H(Sr)),v!==e?(y=[y,v],f=y):(c=f,f=e)):(c=f,f=e);ae=i,i=ll()}else c=i,i=e;if(i===e)if(i=c,t.substr(c,2)===$?(l=$,c+=2):(l=e,T===0&&H(Ts)),l!==e){for(p=[],f=c,y=c,T++,t.substr(c,2)===A?(v=A,c+=2):(v=e,T===0&&H(nr)),T--,v===e?y=void 0:(c=y,y=e),y!==e?(t.length>c?(v=t.charAt(c),c++):(v=e,T===0&&H(Sr)),v!==e?(y=[y,v],f=y):(c=f,f=e)):(c=f,f=e);f!==e;)p.push(f),f=c,y=c,T++,t.substr(c,2)===A?(v=A,c+=2):(v=e,T===0&&H(nr)),T--,v===e?y=void 0:(c=y,y=e),y!==e?(t.length>c?(v=t.charAt(c),c++):(v=e,T===0&&H(Sr)),v!==e?(y=[y,v],f=y):(c=f,f=e)):(c=f,f=e);t.substr(c,2)===A?(f=A,c+=2):(f=e,T===0&&H(nr)),f!==e?(ae=i,i=On()):(c=i,i=e)}else c=i,i=e;return W[_]={nextPos:c,result:i},i}function Lr(){var i,l,p,f,y,v=c*77+3,_=W[v];if(_)return c=_.nextPos,_.result;for(i=c,l=[],p=o();p!==e;)l.push(p),p=o();for(p=Ns(),p===e&&(p=null),f=[],y=o();y!==e;)f.push(y),y=o();return ae=i,i=ol(p),W[v]={nextPos:c,result:i},i}function Ns(){var i,l,p,f,y,v,_,w,M=c*77+4,F=W[M];if(F)return c=F.nextPos,F.result;if(i=c,l=Pe(),l!==e){for(p=[],f=c,y=[],v=g();v!==e;)y.push(v),v=g();if(v=ee(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();w=Pe(),w!==e?(ae=f,f=Ys(l,w)):(c=f,f=e)}else c=f,f=e;for(;f!==e;){for(p.push(f),f=c,y=[],v=g();v!==e;)y.push(v),v=g();if(v=ee(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();w=Pe(),w!==e?(ae=f,f=Ys(l,w)):(c=f,f=e)}else c=f,f=e}ae=i,i=ul(l,p)}else c=i,i=e;return W[M]={nextPos:c,result:i},i}function js(){var i,l,p,f,y,v,_,w,M=c*77+5,F=W[M];if(F)return c=F.nextPos,F.result;if(i=c,l=Hr(),l!==e){for(p=[],f=c,y=[],v=g();v!==e;)y.push(v),v=g();if(v=ee(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();w=Hr(),w!==e?(ae=f,f=Qs(l,w)):(c=f,f=e)}else c=f,f=e;for(;f!==e;){for(p.push(f),f=c,y=[],v=g();v!==e;)y.push(v),v=g();if(v=ee(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();w=Hr(),w!==e?(ae=f,f=Qs(l,w)):(c=f,f=e)}else c=f,f=e}ae=i,i=fl(l,p)}else c=i,i=e;return W[M]={nextPos:c,result:i},i}function ar(){var i,l,p,f,y,v,_,w,M=c*77+6,F=W[M];if(F)return c=F.nextPos,F.result;if(i=c,l=ms(),l!==e){for(p=[],f=c,y=[],v=g();v!==e;)y.push(v),v=g();if(v=ee(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();w=ms(),w!==e?(ae=f,f=Ri(l,w)):(c=f,f=e)}else c=f,f=e;for(;f!==e;){for(p.push(f),f=c,y=[],v=g();v!==e;)y.push(v),v=g();if(v=ee(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();w=ms(),w!==e?(ae=f,f=Ri(l,w)):(c=f,f=e)}else c=f,f=e}ae=i,i=cl(l,p)}else c=i,i=e;return W[M]={nextPos:c,result:i},i}function Pe(){var i,l=c*77+7,p=W[l];return p?(c=p.nextPos,p.result):(i=Yi(),i===e&&(i=go(),i===e&&(i=ms())),W[l]={nextPos:c,result:i},i)}function Hr(){var i,l=c*77+8,p=W[l];return p?(c=p.nextPos,p.result):(i=Qi(),i===e&&(i=St(),i===e&&(i=Yi())),W[l]={nextPos:c,result:i},i)}function ms(){var i,l=c*77+9,p=W[l];return p?(c=p.nextPos,p.result):(i=Qi(),i===e&&(i=St(),i===e&&(i=vo(),i===e&&(i=$o(),i===e&&(i=yo(),i===e&&(i=mo(),i===e&&(i=wo(),i===e&&(i=xo(),i===e&&(i=bo(),i===e&&(i=Zt(),i===e&&(i=qn(),i===e&&(i=Re()))))))))))),W[l]={nextPos:c,result:i},i)}function Re(){var i,l=c*77+10,p=W[l];return p?(c=p.nextPos,p.result):(i=Ao(),i===e&&(i=Cs()),W[l]={nextPos:c,result:i},i)}function Cs(){var i,l=c*77+11,p=W[l];return p?(c=p.nextPos,p.result):(i=Po(),i===e&&(i=To(),i===e&&(i=Kn(),i===e&&(i=Xi()))),W[l]={nextPos:c,result:i},i)}function Xi(){var i,l,p,f,y,v,_=c*77+12,w=W[_];if(w)return c=w.nextPos,w.result;if(i=Wn(),i===e&&(i=Jn(),i===e&&(i=Zn(),i===e&&(i=ks(),i===e&&(i=Yn(),i===e&&(i=ra(),i===e&&(i=sa(),i===e&&(i=ln(),i===e&&(i=Gn(),i===e&&(i=Fo(),i===e&&(i=_o(),i===e&&(i=ea(),i===e))))))))))))if(i=c,t.charCodeAt(c)===40?(l=C,c++):(l=e,T===0&&H(Mt)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();if(f=Re(),f!==e){for(y=[],v=o();v!==e;)y.push(v),v=o();t.charCodeAt(c)===41?(v=k,c++):(v=e,T===0&&H(Gr)),v!==e?(ae=i,i=hl(f)):(c=i,i=e)}else c=i,i=e}else c=i,i=e;return W[_]={nextPos:c,result:i},i}function Ur(){var i,l=c*77+13,p=W[l];return p?(c=p.nextPos,p.result):(i=ra(),i===e&&(i=Yn(),i===e&&(i=sa(),i===e&&(i=Oo(),i===e&&(i=Io(),i===e&&(i=ln()))))),W[l]={nextPos:c,result:i},i)}function Yi(){var i,l,p,f,y,v,_,w,M,F,D=c*77+14,V=W[D];if(V)return c=V.nextPos,V.result;if(i=c,t.substr(c,2)===S?(l=S,c+=2):(l=e,T===0&&H(jt)),l!==e){if(p=[],f=o(),f!==e)for(;f!==e;)p.push(f),f=o();else p=e;if(p!==e)if(f=We(),f!==e){if(y=[],v=o(),v!==e)for(;v!==e;)y.push(v),v=o();else y=e;if(y!==e)if(t.charCodeAt(c)===123?(v=I,c++):(v=e,T===0&&H(st)),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();for(w=js(),w===e&&(w=null),M=[],F=o();F!==e;)M.push(F),F=o();t.charCodeAt(c)===125?(F=q,c++):(F=e,T===0&&H(pr)),F!==e?(ae=i,i=pl(f,w)):(c=i,i=e)}else c=i,i=e;else c=i,i=e}else c=i,i=e;else c=i,i=e}else c=i,i=e;return W[D]={nextPos:c,result:i},i}function go(){var i,l,p,f,y,v,_=c*77+15,w=W[_];if(w)return c=w.nextPos,w.result;if(i=c,t.substr(c,3)===ue?(l=ue,c+=3):(l=e,T===0&&H(Fr)),l!==e){for(p=[],f=g();f!==e;)p.push(f),f=g();if(f=We(),f!==e){for(y=[],v=o();v!==e;)y.push(v),v=o();v=Ur(),v!==e?(ae=i,i=gl(f,v)):(c=i,i=e)}else c=i,i=e}else c=i,i=e;if(i===e)if(i=c,t.substr(c,3)===ue?(l=ue,c+=3):(l=e,T===0&&H(Fr)),l!==e){for(p=[],f=g();f!==e;)p.push(f),f=g();f=Ur(),f!==e?(ae=i,i=vl(f)):(c=i,i=e)}else c=i,i=e;return W[_]={nextPos:c,result:i},i}function Qi(){var i,l,p,f,y,v,_,w,M,F=c*77+16,D=W[F];if(D)return c=D.nextPos,D.result;if(i=c,t.substr(c,3)===Q?(l=Q,c+=3):(l=e,T===0&&H(ot)),l!==e){if(p=[],f=o(),f!==e)for(;f!==e;)p.push(f),f=o();else p=e;if(p!==e)if(f=We(),f!==e){for(y=c,v=[],_=o();_!==e;)v.push(_),_=o();if(t.charCodeAt(c)===58?(_=oe,c++):(_=e,T===0&&H(Rt)),_!==e){for(w=[],M=o();M!==e;)w.push(M),M=o();M=Oe(),M!==e?y=M:(c=y,y=e)}else c=y,y=e;for(y===e&&(y=null),v=[],_=o();_!==e;)v.push(_),_=o();if(t.charCodeAt(c)===61?(_=$e,c++):(_=e,T===0&&H(Os)),_!==e){for(w=[],M=o();M!==e;)w.push(M),M=o();M=Re(),M!==e?(ae=i,i=dl(f,y,M)):(c=i,i=e)}else c=i,i=e}else c=i,i=e;else c=i,i=e}else c=i,i=e;if(i===e)if(i=c,t.substr(c,3)===j?(l=j,c+=3):(l=e,T===0&&H(Fa)),l!==e){if(p=[],f=o(),f!==e)for(;f!==e;)p.push(f),f=o();else p=e;if(p!==e)if(f=We(),f!==e){for(y=c,v=[],_=o();_!==e;)v.push(_),_=o();if(t.charCodeAt(c)===58?(_=oe,c++):(_=e,T===0&&H(Rt)),_!==e){for(w=[],M=o();M!==e;)w.push(M),M=o();M=Oe(),M!==e?y=M:(c=y,y=e)}else c=y,y=e;for(y===e&&(y=null),v=[],_=o();_!==e;)v.push(_),_=o();if(t.charCodeAt(c)===61?(_=$e,c++):(_=e,T===0&&H(Os)),_!==e){for(w=[],M=o();M!==e;)w.push(M),M=o();M=Re(),M!==e?(ae=i,i=yl(f,y,M)):(c=i,i=e)}else c=i,i=e}else c=i,i=e;else c=i,i=e}else c=i,i=e;return W[F]={nextPos:c,result:i},i}function vo(){var i,l,p,f,y=c*77+17,v=W[y];if(v)return c=v.nextPos,v.result;if(i=c,t.substr(c,2)===O?(l=O,c+=2):(l=e,T===0&&H(Ta)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();f=Re(),f!==e?(ae=i,i=ml(f)):(c=i,i=e)}else c=i,i=e;return W[y]={nextPos:c,result:i},i}function yo(){var i,l,p,f,y,v,_,w=c*77+18,M=W[w];if(M)return c=M.nextPos,M.result;if(i=c,t.substr(c,2)===N?(l=N,c+=2):(l=e,T===0&&H(os)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();if(f=We(),f!==e){for(y=c,v=[],_=o();_!==e;)v.push(_),_=o();for(_=Ur(),_!==e?y=_:(c=y,y=e),y===e&&(y=null),v=[],_=o();_!==e;)v.push(_),_=o();t.charCodeAt(c)===93?(_=L,c++):(_=e,T===0&&H(As)),_!==e?(ae=i,i=wl(f,y)):(c=i,i=e)}else c=i,i=e}else c=i,i=e;return W[w]={nextPos:c,result:i},i}function mo(){var i,l,p,f,y,v,_,w,M,F,D,V,G,Te,Ae=c*77+19,Ft=W[Ae];if(Ft)return c=Ft.nextPos,Ft.result;if(i=c,t.substr(c,4)===z?(l=z,c+=4):(l=e,T===0&&H(at)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();if(t.charCodeAt(c)===40?(f=C,c++):(f=e,T===0&&H(Mt)),f!==e)if(t.substr(c,3)===Q?(y=Q,c+=3):(y=e,T===0&&H(ot)),y!==e){if(v=[],_=o(),_!==e)for(;_!==e;)v.push(_),_=o();else v=e;if(v!==e)if(_=We(),_!==e){for(w=[],M=o();M!==e;)w.push(M),M=o();for(t.charCodeAt(c)===44?(M=K,c++):(M=e,T===0&&H(Dt)),M===e&&(M=null),F=[],D=o();D!==e;)F.push(D),D=o();if(D=Re(),D!==e)if(t.charCodeAt(c)===41?(V=k,c++):(V=e,T===0&&H(Gr)),V!==e){for(G=[],Te=o();Te!==e;)G.push(Te),Te=o();Te=be(),Te!==e?(ae=i,i=$l(_,D,Te)):(c=i,i=e)}else c=i,i=e;else c=i,i=e}else c=i,i=e;else c=i,i=e}else c=i,i=e;else c=i,i=e}else c=i,i=e;if(i===e)if(i=c,t.substr(c,4)===z?(l=z,c+=4):(l=e,T===0&&H(at)),l!==e){if(p=[],f=o(),f!==e)for(;f!==e;)p.push(f),f=o();else p=e;if(p!==e)if(t.substr(c,3)===Q?(f=Q,c+=3):(f=e,T===0&&H(ot)),f!==e){if(y=[],v=o(),v!==e)for(;v!==e;)y.push(v),v=o();else y=e;if(y!==e)if(v=We(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();for(t.charCodeAt(c)===44?(w=K,c++):(w=e,T===0&&H(Dt)),w===e&&(w=null),M=[],F=o();F!==e;)M.push(F),F=o();if(F=Re(),F!==e){if(D=[],V=o(),V!==e)for(;V!==e;)D.push(V),V=o();else D=e;D!==e?(V=be(),V!==e?(ae=i,i=xl(v,F,V)):(c=i,i=e)):(c=i,i=e)}else c=i,i=e}else c=i,i=e;else c=i,i=e}else c=i,i=e;else c=i,i=e}else c=i,i=e;return W[Ae]={nextPos:c,result:i},i}function wo(){var i,l,p,f,y,v,_,w,M,F,D,V,G,Te,Ae,Ft=c*77+20,Tt=W[Ft];if(Tt)return c=Tt.nextPos,Tt.result;if(i=c,t.substr(c,3)===J?(l=J,c+=3):(l=e,T===0&&H(qs)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();if(t.charCodeAt(c)===40?(f=C,c++):(f=e,T===0&&H(Mt)),f!==e)if(t.substr(c,3)===Q?(y=Q,c+=3):(y=e,T===0&&H(ot)),y!==e){if(v=[],_=o(),_!==e)for(;_!==e;)v.push(_),_=o();else v=e;if(v!==e)if(_=We(),_!==e){for(w=[],M=o();M!==e;)w.push(M),M=o();if(M=c,t.charCodeAt(c)===61?(F=$e,c++):(F=e,T===0&&H(Os)),F!==e){for(D=[],V=o();V!==e;)D.push(V),V=o();V=Re(),V!==e?(ae=M,M=bl(_,V)):(c=M,M=e)}else c=M,M=e;for(M===e&&(M=null),t.charCodeAt(c)===44?(F=K,c++):(F=e,T===0&&H(Dt)),F===e&&(F=null),D=[],V=o();V!==e;)D.push(V),V=o();if(V=Re(),V!==e)if(t.charCodeAt(c)===41?(G=k,c++):(G=e,T===0&&H(Gr)),G!==e){for(Te=[],Ae=o();Ae!==e;)Te.push(Ae),Ae=o();Ae=be(),Ae!==e?(ae=i,i=Al(_,M,V,Ae)):(c=i,i=e)}else c=i,i=e;else c=i,i=e}else c=i,i=e;else c=i,i=e}else c=i,i=e;else c=i,i=e}else c=i,i=e;if(i===e){if(i=c,t.substr(c,3)===J?(l=J,c+=3):(l=e,T===0&&H(qs)),l!==e){if(p=[],f=o(),f!==e)for(;f!==e;)p.push(f),f=o();else p=e;if(p!==e)if(t.substr(c,3)===Q?(f=Q,c+=3):(f=e,T===0&&H(ot)),f!==e){if(y=[],v=o(),v!==e)for(;v!==e;)y.push(v),v=o();else y=e;if(y!==e)if(v=We(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();if(w=c,t.charCodeAt(c)===61?(M=$e,c++):(M=e,T===0&&H(Os)),M!==e){for(F=[],D=o();D!==e;)F.push(D),D=o();D=Re(),D!==e?(ae=w,w=_l(v,D)):(c=w,w=e)}else c=w,w=e;for(w===e&&(w=null),t.charCodeAt(c)===44?(M=K,c++):(M=e,T===0&&H(Dt)),M===e&&(M=null),F=[],D=o();D!==e;)F.push(D),D=o();if(D=Re(),D!==e){if(V=[],G=o(),G!==e)for(;G!==e;)V.push(G),G=o();else V=e;V!==e?(G=be(),G!==e?(ae=i,i=Cl(v,w,D,G)):(c=i,i=e)):(c=i,i=e)}else c=i,i=e}else c=i,i=e;else c=i,i=e}else c=i,i=e;else c=i,i=e}else c=i,i=e;if(i===e){if(i=c,t.substr(c,3)===J?(l=J,c+=3):(l=e,T===0&&H(qs)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();if(t.charCodeAt(c)===40?(f=C,c++):(f=e,T===0&&H(Mt)),f!==e)if(y=Re(),y!==e)if(t.charCodeAt(c)===41?(v=k,c++):(v=e,T===0&&H(Gr)),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();w=be(),w!==e?(ae=i,i=Pl(y,w)):(c=i,i=e)}else c=i,i=e;else c=i,i=e;else c=i,i=e}else c=i,i=e;if(i===e)if(i=c,t.substr(c,3)===J?(l=J,c+=3):(l=e,T===0&&H(qs)),l!==e){if(p=[],f=o(),f!==e)for(;f!==e;)p.push(f),f=o();else p=e;if(p!==e)if(f=Re(),f!==e){if(y=[],v=o(),v!==e)for(;v!==e;)y.push(v),v=o();else y=e;y!==e?(v=be(),v!==e?(ae=i,i=kl(f,v)):(c=i,i=e)):(c=i,i=e)}else c=i,i=e;else c=i,i=e}else c=i,i=e}}return W[Ft]={nextPos:c,result:i},i}function $o(){var i,l,p,f,y,v=c*77+21,_=W[v];if(_)return c=_.nextPos,_.result;if(i=c,t.substr(c,6)===Z?(l=Z,c+=6):(l=e,T===0&&H(zt)),l!==e)if(p=c,T++,hr.test(t.charAt(c))?(f=t.charAt(c),c++):(f=e,T===0&&H(Rr)),T--,f===e?p=void 0:(c=p,p=e),p!==e){for(f=[],y=o();y!==e;)f.push(y),y=o();y=Re(),y!==e?(ae=i,i=El(y)):(c=i,i=e)}else c=i,i=e;else c=i,i=e;return W[v]={nextPos:c,result:i},i}function xo(){var i,l,p,f,y,v,_,w,M=c*77+22,F=W[M];if(F)return c=F.nextPos,F.result;if(i=c,t.substr(c,4)===pe?(l=pe,c+=4):(l=e,T===0&&H(Oa)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();if(t.charCodeAt(c)===123?(f=I,c++):(f=e,T===0&&H(st)),f!==e){for(y=[],v=o();v!==e;)y.push(v),v=o();if(v=ar(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();t.charCodeAt(c)===125?(w=q,c++):(w=e,T===0&&H(pr)),w!==e?(ae=i,i=Ml(v)):(c=i,i=e)}else c=i,i=e}else c=i,i=e}else c=i,i=e;return W[M]={nextPos:c,result:i},i}function bo(){var i,l,p,f,y=c*77+23,v=W[y];return v?(c=v.nextPos,v.result):(i=c,t.substr(c,5)===we?(l=we,c+=5):(l=e,T===0&&H(Ia)),l!==e?(p=c,T++,hr.test(t.charAt(c))?(f=t.charAt(c),c++):(f=e,T===0&&H(Rr)),T--,f===e?p=void 0:(c=p,p=e),p!==e?(ae=i,i=Sl()):(c=i,i=e)):(c=i,i=e),W[y]={nextPos:c,result:i},i)}function Zt(){var i,l,p,f,y=c*77+24,v=W[y];return v?(c=v.nextPos,v.result):(i=c,t.substr(c,8)===fe?(l=fe,c+=8):(l=e,T===0&&H(Na)),l!==e?(p=c,T++,hr.test(t.charAt(c))?(f=t.charAt(c),c++):(f=e,T===0&&H(Rr)),T--,f===e?p=void 0:(c=p,p=e),p!==e?(ae=i,i=In()):(c=i,i=e)):(c=i,i=e),W[y]={nextPos:c,result:i},i)}function qn(){var i,l,p,f,y,v,_=c*77+25,w=W[_];if(w)return c=w.nextPos,w.result;if(i=c,l=Re(),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();if(t.substr(c,2)===Fe?(f=Fe,c+=2):(f=e,T===0&&H(ja)),f===e&&(t.substr(c,2)===Ze?(f=Ze,c+=2):(f=e,T===0&&H(En)),f===e&&(t.charCodeAt(c)===61?(f=$e,c++):(f=e,T===0&&H(Os)))),f!==e){for(y=[],v=o();v!==e;)y.push(v),v=o();v=Re(),v!==e?(ae=i,i=Fl(l,f,v)):(c=i,i=e)}else c=i,i=e}else c=i,i=e;return W[_]={nextPos:c,result:i},i}function Ao(){var i,l,p,f,y,v,_,w,M=c*77+26,F=W[M];if(F)return c=F.nextPos,F.result;if(i=c,l=Cs(),l!==e){for(p=[],f=c,y=[],v=es();v!==e;)y.push(v),v=es();if(v=tn(),v!==e){for(_=[],w=es();w!==e;)_.push(w),w=es();w=Cs(),w!==e?(ae=f,f=Di(l,v,w)):(c=f,f=e)}else c=f,f=e;if(f!==e)for(;f!==e;){for(p.push(f),f=c,y=[],v=es();v!==e;)y.push(v),v=es();if(v=tn(),v!==e){for(_=[],w=es();w!==e;)_.push(w),w=es();w=Cs(),w!==e?(ae=f,f=Di(l,v,w)):(c=f,f=e)}else c=f,f=e}else p=e;p!==e?(ae=i,i=Tl(l,p)):(c=i,i=e)}else c=i,i=e;return W[M]={nextPos:c,result:i},i}function es(){var i,l,p,f=c*77+27,y=W[f];return y?(c=y.nextPos,y.result):(i=c,t.charCodeAt(c)===92?(l=It,c++):(l=e,T===0&&H(Ti)),l!==e?(p=ee(),p!==e?(l=[l,p],i=l):(c=i,i=e)):(c=i,i=e),i===e&&(i=g()),W[f]={nextPos:c,result:i},i)}function tn(){var i,l,p=c*77+28,f=W[p];return f?(c=f.nextPos,f.result):(i=c,t.substr(c,2)===Xe?(l=Xe,c+=2):(l=e,T===0&&H(Ra)),l===e&&(t.substr(c,2)===Ye?(l=Ye,c+=2):(l=e,T===0&&H(Da)),l===e&&(t.substr(c,2)===_e?(l=_e,c+=2):(l=e,T===0&&H(La)),l===e&&(t.substr(c,2)===Je?(l=Je,c+=2):(l=e,T===0&&H(Ha)),l===e&&(t.substr(c,2)===gt?(l=gt,c+=2):(l=e,T===0&&H(Ua)),l===e&&(t.substr(c,2)===mt?(l=mt,c+=2):(l=e,T===0&&H(Mn)),l===e&&(t.charCodeAt(c)===60?(l=Le,c++):(l=e,T===0&&H(Ks)),l===e&&(t.charCodeAt(c)===62?(l=$r,c++):(l=e,T===0&&H(Oi)),l===e&&(t.charCodeAt(c)===43?(l=_t,c++):(l=e,T===0&&H(Ba)),l===e&&(t.charCodeAt(c)===45?(l=Jt,c++):(l=e,T===0&&H(Sn)),l===e&&(t.charCodeAt(c)===42?(l=ft,c++):(l=e,T===0&&H(Ii)),l===e&&(t.charCodeAt(c)===94?(l=Kt,c++):(l=e,T===0&&H(za)),l===e&&(t.charCodeAt(c)===47?(l=cr,c++):(l=e,T===0&&H(qa)),l===e&&(t.charCodeAt(c)===37?(l=Yt,c++):(l=e,T===0&&H(Ka))))))))))))))),l!==e&&(ae=i,l=Ol()),i=l,W[p]={nextPos:c,result:i},i)}function _o(){var i,l,p,f=c*77+29,y=W[f];return y?(c=y.nextPos,y.result):(i=c,t.charCodeAt(c)===33?(l=rr,c++):(l=e,T===0&&H(Is)),l!==e?(p=Re(),p!==e?(ae=i,i=Il(p)):(c=i,i=e)):(c=i,i=e),W[f]={nextPos:c,result:i},i)}function Kn(){var i,l,p,f,y=c*77+30,v=W[y];if(v)return c=v.nextPos,v.result;if(i=c,l=Xi(),l!==e){if(p=[],f=rn(),f===e&&(f=Gi(),f===e&&(f=Ps())),f!==e)for(;f!==e;)p.push(f),f=rn(),f===e&&(f=Gi(),f===e&&(f=Ps()));else p=e;p!==e?(ae=i,i=Nn(l,p)):(c=i,i=e)}else c=i,i=e;return W[y]={nextPos:c,result:i},i}function rn(){var i,l,p,f,y,v,_=c*77+31,w=W[_];if(w)return c=w.nextPos,w.result;if(i=c,t.charCodeAt(c)===40?(l=C,c++):(l=e,T===0&&H(Mt)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();for(f=Co(),f===e&&(f=null),y=[],v=o();v!==e;)y.push(v),v=o();t.charCodeAt(c)===41?(v=k,c++):(v=e,T===0&&H(Gr)),v!==e?(ae=i,i=Nl(f)):(c=i,i=e)}else c=i,i=e;return W[_]={nextPos:c,result:i},i}function Co(){var i,l,p,f,y,v,_=c*77+32,w=W[_];if(w)return c=w.nextPos,w.result;if(i=c,l=Re(),l!==e){for(p=[],f=c,y=m(),y!==e?(v=Re(),v!==e?(ae=f,f=Li(l,v)):(c=f,f=e)):(c=f,f=e);f!==e;)p.push(f),f=c,y=m(),y!==e?(v=Re(),v!==e?(ae=f,f=Li(l,v)):(c=f,f=e)):(c=f,f=e);ae=i,i=jl(l,p)}else c=i,i=e;return W[_]={nextPos:c,result:i},i}function Gi(){var i,l,p,f,y,v,_=c*77+33,w=W[_];if(w)return c=w.nextPos,w.result;if(i=c,t.charCodeAt(c)===91?(l=Ct,c++):(l=e,T===0&&H(us)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();if(f=Re(),f!==e){for(y=[],v=o();v!==e;)y.push(v),v=o();t.charCodeAt(c)===93?(v=L,c++):(v=e,T===0&&H(As)),v!==e?(ae=i,i=Rl(f)):(c=i,i=e)}else c=i,i=e}else c=i,i=e;return W[_]={nextPos:c,result:i},i}function Ps(){var i,l,p,f=c*77+34,y=W[f];return y?(c=y.nextPos,y.result):(i=c,t.charCodeAt(c)===46?(l=R,c++):(l=e,T===0&&H(Fn)),l!==e?(p=We(),p!==e?(ae=i,i=Dl(p)):(c=i,i=e)):(c=i,i=e),W[f]={nextPos:c,result:i},i)}function Po(){var i,l,p,f,y,v,_,w,M,F,D=c*77+35,V=W[D];if(V)return c=V.nextPos,V.result;if(i=c,t.substr(c,2)===B?(l=B,c+=2):(l=e,T===0&&H(Va)),l!==e){if(p=[],f=o(),f!==e)for(;f!==e;)p.push(f),f=o();else p=e;if(p!==e)if(f=Re(),f!==e){if(y=[],v=o(),v!==e)for(;v!==e;)y.push(v),v=o();else y=e;if(y!==e)if(v=be(),v!==e){if(_=c,w=[],M=o(),M!==e)for(;M!==e;)w.push(M),M=o();else w=e;if(w!==e?(M=ko(),M!==e?_=M:(c=_,_=e)):(c=_,_=e),_===e&&(_=null),w=c,M=[],F=o(),F!==e)for(;F!==e;)M.push(F),F=o();else M=e;M!==e?(F=Eo(),F!==e?w=F:(c=w,w=e)):(c=w,w=e),w===e&&(w=null),ae=i,i=Ll(f,v,_,w)}else c=i,i=e;else c=i,i=e}else c=i,i=e;else c=i,i=e}else c=i,i=e;return W[D]={nextPos:c,result:i},i}function ko(){var i,l,p,f,y,v,_=c*77+36,w=W[_];if(w)return c=w.nextPos,w.result;if(i=c,l=Vn(),l!==e){for(p=[],f=c,y=[],v=o();v!==e;)y.push(v),v=o();for(v=Vn(),v!==e?f=v:(c=f,f=e);f!==e;){for(p.push(f),f=c,y=[],v=o();v!==e;)y.push(v),v=o();v=Vn(),v!==e?f=v:(c=f,f=e)}ae=i,i=Hl(l,p)}else c=i,i=e;return W[_]={nextPos:c,result:i},i}function Vn(){var i,l,p,f,y,v,_,w=c*77+37,M=W[w];if(M)return c=M.nextPos,M.result;if(i=c,t.substr(c,4)===Y?(l=Y,c+=4):(l=e,T===0&&H(Wa)),l!==e)if(p=c,T++,hr.test(t.charAt(c))?(f=t.charAt(c),c++):(f=e,T===0&&H(Rr)),T--,f===e?p=void 0:(c=p,p=e),p!==e){for(f=[],y=o();y!==e;)f.push(y),y=o();if(y=Re(),y!==e){for(v=[],_=o();_!==e;)v.push(_),_=o();_=be(),_!==e?(ae=i,i=jn(y,_)):(c=i,i=e)}else c=i,i=e}else c=i,i=e;else c=i,i=e;return W[w]={nextPos:c,result:i},i}function Eo(){var i,l,p,f,y,v=c*77+38,_=W[v];if(_)return c=_.nextPos,_.result;if(i=c,t.substr(c,4)===se?(l=se,c+=4):(l=e,T===0&&H(Ja)),l!==e)if(p=c,T++,hr.test(t.charAt(c))?(f=t.charAt(c),c++):(f=e,T===0&&H(Rr)),T--,f===e?p=void 0:(c=p,p=e),p!==e){for(f=[],y=o();y!==e;)f.push(y),y=o();y=be(),y!==e?(ae=i,i=Ul(y)):(c=i,i=e)}else c=i,i=e;else c=i,i=e;return W[v]={nextPos:c,result:i},i}function Wn(){var i,l,p,f,y,v,_,w,M,F,D,V,G,Te,Ae,Ft,Tt,jo=c*77+39,ri=W[jo];if(ri)return c=ri.nextPos,ri.result;if(i=c,t.substr(c,5)===le?(l=le,c+=5):(l=e,T===0&&H(fs)),l!==e)if(p=c,T++,hr.test(t.charAt(c))?(f=t.charAt(c),c++):(f=e,T===0&&H(Rr)),T--,f===e?p=void 0:(c=p,p=e),p!==e){for(f=[],y=o();y!==e;)f.push(y),y=o();if(y=Re(),y!==e){for(v=[],_=o();_!==e;)v.push(_),_=o();if(t.charCodeAt(c)===123?(_=I,c++):(_=e,T===0&&H(st)),_!==e){for(w=[],M=o();M!==e;)w.push(M),M=o();if(M=[],F=c,D=Re(),D!==e){for(V=[],G=o();G!==e;)V.push(G),G=o();if(t.substr(c,2)===ne?(G=ne,c+=2):(G=e,T===0&&H(Vs)),G!==e){for(Te=[],Ae=o();Ae!==e;)Te.push(Ae),Ae=o();if(Ae=be(),Ae!==e){for(Ft=[],Tt=o();Tt!==e;)Ft.push(Tt),Tt=o();ae=F,F=Hi(y,D,Ae)}else c=F,F=e}else c=F,F=e}else c=F,F=e;if(F!==e)for(;F!==e;)if(M.push(F),F=c,D=Re(),D!==e){for(V=[],G=o();G!==e;)V.push(G),G=o();if(t.substr(c,2)===ne?(G=ne,c+=2):(G=e,T===0&&H(Vs)),G!==e){for(Te=[],Ae=o();Ae!==e;)Te.push(Ae),Ae=o();if(Ae=be(),Ae!==e){for(Ft=[],Tt=o();Tt!==e;)Ft.push(Tt),Tt=o();ae=F,F=Hi(y,D,Ae)}else c=F,F=e}else c=F,F=e}else c=F,F=e;else M=e;if(M!==e){if(F=c,t.charCodeAt(c)===42?(D=ft,c++):(D=e,T===0&&H(Ii)),D!==e){for(V=[],G=o();G!==e;)V.push(G),G=o();if(t.substr(c,2)===ne?(G=ne,c+=2):(G=e,T===0&&H(Vs)),G!==e){for(Te=[],Ae=o();Ae!==e;)Te.push(Ae),Ae=o();if(Ae=be(),Ae!==e){for(Ft=[],Tt=o();Tt!==e;)Ft.push(Tt),Tt=o();F=Ae}else c=F,F=e}else c=F,F=e}else c=F,F=e;for(F===e&&(F=null),D=[],V=o();V!==e;)D.push(V),V=o();t.charCodeAt(c)===125?(V=q,c++):(V=e,T===0&&H(pr)),V!==e?(ae=i,i=Bl(y,M,F)):(c=i,i=e)}else c=i,i=e}else c=i,i=e}else c=i,i=e}else c=i,i=e;else c=i,i=e;return W[jo]={nextPos:c,result:i},i}function Jn(){var i,l,p,f,y,v,_,w,M=c*77+40,F=W[M];if(F)return c=F.nextPos,F.result;if(i=c,t.substr(c,4)===xe?(l=xe,c+=4):(l=e,T===0&&H(cs)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();if(t.charCodeAt(c)===123?(f=I,c++):(f=e,T===0&&H(st)),f!==e){for(y=[],v=o();v!==e;)y.push(v),v=o();if(v=ar(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();t.charCodeAt(c)===125?(w=q,c++):(w=e,T===0&&H(pr)),w!==e?(ae=i,i=zl(v)):(c=i,i=e)}else c=i,i=e}else c=i,i=e}else c=i,i=e;return W[M]={nextPos:c,result:i},i}function Zn(){var i,l,p,f,y=c*77+41,v=W[y];if(v)return c=v.nextPos,v.result;if(i=c,t.substr(c,6)===ce?(l=ce,c+=6):(l=e,T===0&&H(Za)),l!==e){if(p=[],f=o(),f!==e)for(;f!==e;)p.push(f),f=o();else p=e;p!==e?(f=ea(),f!==e?(ae=i,i=ql(f)):(c=i,i=e)):(c=i,i=e)}else c=i,i=e;return W[y]={nextPos:c,result:i},i}function ea(){var i,l,p=c*77+42,f=W[p];return f?(c=f.nextPos,f.result):(i=c,l=ti(),l!==e&&(ae=i,l=Rn(l)),i=l,W[p]={nextPos:c,result:i},i)}function ks(){var i,l,p,f,y,v,_=c*77+43,w=W[_];if(w)return c=w.nextPos,w.result;if(i=c,t.charCodeAt(c)===96?(l=he,c++):(l=e,T===0&&H(Ws)),l!==e){for(p=[],f=c,y=c,T++,t.charCodeAt(c)===96?(v=he,c++):(v=e,T===0&&H(Ws)),T--,v===e?y=void 0:(c=y,y=e),y!==e?(v=sn(),v!==e?f=v:(c=f,f=e)):(c=f,f=e);f!==e;)p.push(f),f=c,y=c,T++,t.charCodeAt(c)===96?(v=he,c++):(v=e,T===0&&H(Ws)),T--,v===e?y=void 0:(c=y,y=e),y!==e?(v=sn(),v!==e?f=v:(c=f,f=e)):(c=f,f=e);t.charCodeAt(c)===96?(f=he,c++):(f=e,T===0&&H(Ws)),f!==e?(ae=i,i=Kl(p)):(c=i,i=e)}else c=i,i=e;return W[_]={nextPos:c,result:i},i}function sn(){var i,l,p,f,y,v,_=c*77+44,w=W[_];if(w)return c=w.nextPos,w.result;if(i=c,t.charCodeAt(c)===123?(l=I,c++):(l=e,T===0&&H(st)),l!==e){for(p=[],f=g();f!==e;)p.push(f),f=g();if(f=Re(),f!==e){for(y=[],v=g();v!==e;)y.push(v),v=g();t.charCodeAt(c)===125?(v=q,c++):(v=e,T===0&&H(pr)),v!==e?i=f:(c=i,i=e)}else c=i,i=e}else c=i,i=e;if(i===e){if(i=c,l=[],p=nn(),p!==e)for(;p!==e;)l.push(p),p=nn();else l=e;l!==e&&(ae=i,l=Dn(l)),i=l}return W[_]={nextPos:c,result:i},i}function nn(){var i,l=c*77+45,p=W[l];return p?(c=p.nextPos,p.result):(i=Xn(),i===e&&(ls.test(t.charAt(c))?(i=t.charAt(c),c++):(i=e,T===0&&H(hs))),W[l]={nextPos:c,result:i},i)}function Xn(){var i,l,p,f=c*77+46,y=W[f];return y?(c=y.nextPos,y.result):(i=c,t.charCodeAt(c)===92?(l=It,c++):(l=e,T===0&&H(Ti)),l!==e?(Mr.test(t.charAt(c))?(p=t.charAt(c),c++):(p=e,T===0&&H(ps)),p!==e?i=p:(c=i,i=e)):(c=i,i=e),W[f]={nextPos:c,result:i},i)}function Yn(){var i,l,p,f,y,v,_=c*77+47,w=W[_];if(w)return c=w.nextPos,w.result;if(i=c,t.charCodeAt(c)===34?(l=ie,c++):(l=e,T===0&&H(Js)),l!==e){for(p=[],f=c,y=c,T++,t.charCodeAt(c)===34?(v=ie,c++):(v=e,T===0&&H(Js)),T--,v===e?y=void 0:(c=y,y=e),y!==e?(v=ta(),v===e&&(t.length>c?(v=t.charAt(c),c++):(v=e,T===0&&H(Sr))),v!==e?(ae=f,f=Ui(v)):(c=f,f=e)):(c=f,f=e);f!==e;)p.push(f),f=c,y=c,T++,t.charCodeAt(c)===34?(v=ie,c++):(v=e,T===0&&H(Js)),T--,v===e?y=void 0:(c=y,y=e),y!==e?(v=ta(),v===e&&(t.length>c?(v=t.charAt(c),c++):(v=e,T===0&&H(Sr))),v!==e?(ae=f,f=Ui(v)):(c=f,f=e)):(c=f,f=e);t.charCodeAt(c)===34?(f=ie,c++):(f=e,T===0&&H(Js)),f!==e?(ae=i,i=Vl(p)):(c=i,i=e)}else c=i,i=e;if(i===e)if(i=c,t.charCodeAt(c)===39?(l=Ee,c++):(l=e,T===0&&H(Zs)),l!==e){for(p=[],f=c,y=c,T++,t.charCodeAt(c)===39?(v=Ee,c++):(v=e,T===0&&H(Zs)),T--,v===e?y=void 0:(c=y,y=e),y!==e?(v=an(),v===e&&(t.length>c?(v=t.charAt(c),c++):(v=e,T===0&&H(Sr))),v!==e?(ae=f,f=Bi(v)):(c=f,f=e)):(c=f,f=e);f!==e;)p.push(f),f=c,y=c,T++,t.charCodeAt(c)===39?(v=Ee,c++):(v=e,T===0&&H(Zs)),T--,v===e?y=void 0:(c=y,y=e),y!==e?(v=an(),v===e&&(t.length>c?(v=t.charAt(c),c++):(v=e,T===0&&H(Sr))),v!==e?(ae=f,f=Bi(v)):(c=f,f=e)):(c=f,f=e);t.charCodeAt(c)===39?(f=Ee,c++):(f=e,T===0&&H(Zs)),f!==e?(ae=i,i=Wl(p)):(c=i,i=e)}else c=i,i=e;return W[_]={nextPos:c,result:i},i}function ta(){var i,l,p=c*77+48,f=W[p];return f?(c=f.nextPos,f.result):(i=c,t.substr(c,2)===Ce?(l=Ce,c+=2):(l=e,T===0&&H(gs)),l!==e&&(ae=i,l=Jl()),i=l,W[p]={nextPos:c,result:i},i)}function an(){var i,l,p=c*77+49,f=W[p];return f?(c=f.nextPos,f.result):(i=c,t.substr(c,2)===Me?(l=Me,c+=2):(l=e,T===0&&H(Tn)),l!==e&&(ae=i,l=Zl()),i=l,W[p]={nextPos:c,result:i},i)}function ra(){var i,l=c*77+50,p=W[l];return p?(c=p.nextPos,p.result):(i=Mo(),i===e&&(i=Qn()),W[l]={nextPos:c,result:i},i)}function Mo(){var i,l,p,f,y,v,_=c*77+51,w=W[_];if(w)return c=w.nextPos,w.result;if(i=c,Et.test(t.charAt(c))?(t.charAt(c),c++):T===0&&H(wt),Ge.test(t.charAt(c))?(l=t.charAt(c),c++):(l=e,T===0&&H(Ni)),l!==e){if(p=[],sr.test(t.charAt(c))?(f=t.charAt(c),c++):(f=e,T===0&&H(Tr)),f!==e)for(;f!==e;)p.push(f),sr.test(t.charAt(c))?(f=t.charAt(c),c++):(f=e,T===0&&H(Tr));else p=e;if(p!==e)if(t.charCodeAt(c)===46?(f=R,c++):(f=e,T===0&&H(Fn)),f!==e){if(y=[],sr.test(t.charAt(c))?(v=t.charAt(c),c++):(v=e,T===0&&H(Tr)),v!==e)for(;v!==e;)y.push(v),sr.test(t.charAt(c))?(v=t.charAt(c),c++):(v=e,T===0&&H(Tr));else y=e;y!==e?(ae=i,i=Xl()):(c=i,i=e)}else c=i,i=e;else c=i,i=e}else c=i,i=e;if(i===e)if(i=c,Et.test(t.charAt(c))?(t.charAt(c),c++):T===0&&H(wt),sr.test(t.charAt(c))?(l=t.charAt(c),c++):(l=e,T===0&&H(Tr)),l!==e)if(t.charCodeAt(c)===46?(p=R,c++):(p=e,T===0&&H(Fn)),p!==e){if(f=[],sr.test(t.charAt(c))?(y=t.charAt(c),c++):(y=e,T===0&&H(Tr)),y!==e)for(;y!==e;)f.push(y),sr.test(t.charAt(c))?(y=t.charAt(c),c++):(y=e,T===0&&H(Tr));else f=e;f!==e?(ae=i,i=Yl()):(c=i,i=e)}else c=i,i=e;else c=i,i=e;return W[_]={nextPos:c,result:i},i}function Qn(){var i,l,p,f,y=c*77+52,v=W[y];if(v)return c=v.nextPos,v.result;if(i=c,Et.test(t.charAt(c))?(t.charAt(c),c++):T===0&&H(wt),Ge.test(t.charAt(c))?(l=t.charAt(c),c++):(l=e,T===0&&H(Ni)),l!==e){if(p=[],sr.test(t.charAt(c))?(f=t.charAt(c),c++):(f=e,T===0&&H(Tr)),f!==e)for(;f!==e;)p.push(f),sr.test(t.charAt(c))?(f=t.charAt(c),c++):(f=e,T===0&&H(Tr));else p=e;p!==e?(ae=i,i=Ql()):(c=i,i=e)}else c=i,i=e;return i===e&&(i=c,Et.test(t.charAt(c))?(t.charAt(c),c++):T===0&&H(wt),sr.test(t.charAt(c))?(l=t.charAt(c),c++):(l=e,T===0&&H(Tr)),l!==e?(ae=i,i=Gl()):(c=i,i=e)),W[y]={nextPos:c,result:i},i}function sa(){var i,l=c*77+53,p=W[l];return p?(c=p.nextPos,p.result):(i=So(),i===e&&(i=Rs()),W[l]={nextPos:c,result:i},i)}function So(){var i,l,p,f,y=c*77+54,v=W[y];return v?(c=v.nextPos,v.result):(i=c,t.substr(c,4)===Ie?(l=Ie,c+=4):(l=e,T===0&&H(Xa)),l!==e?(p=c,T++,hr.test(t.charAt(c))?(f=t.charAt(c),c++):(f=e,T===0&&H(Rr)),T--,f===e?p=void 0:(c=p,p=e),p!==e?(ae=i,i=Ln()):(c=i,i=e)):(c=i,i=e),W[y]={nextPos:c,result:i},i)}function Rs(){var i,l,p,f,y=c*77+55,v=W[y];return v?(c=v.nextPos,v.result):(i=c,t.substr(c,5)===De?(l=De,c+=5):(l=e,T===0&&H(vs)),l!==e?(p=c,T++,hr.test(t.charAt(c))?(f=t.charAt(c),c++):(f=e,T===0&&H(Rr)),T--,f===e?p=void 0:(c=p,p=e),p!==e?(ae=i,i=eo()):(c=i,i=e)):(c=i,i=e),W[y]={nextPos:c,result:i},i)}function ln(){var i,l,p,f,y=c*77+56,v=W[y];return v?(c=v.nextPos,v.result):(i=c,t.substr(c,4)===Ve?(l=Ve,c+=4):(l=e,T===0&&H(Ya)),l!==e?(p=c,T++,hr.test(t.charAt(c))?(f=t.charAt(c),c++):(f=e,T===0&&H(Rr)),T--,f===e?p=void 0:(c=p,p=e),p!==e?(ae=i,i=Hn()):(c=i,i=e)):(c=i,i=e),W[y]={nextPos:c,result:i},i)}function Gn(){var i,l,p,f,y,v,_,w,M,F,D,V,G,Te,Ae=c*77+57,Ft=W[Ae];if(Ft)return c=Ft.nextPos,Ft.result;if(i=c,t.charCodeAt(c)===123?(l=I,c++):(l=e,T===0&&H(st)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();if(f=[],y=c,v=We(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();if(t.charCodeAt(c)===58?(w=oe,c++):(w=e,T===0&&H(Rt)),w!==e){if(M=[],F=o(),F!==e)for(;F!==e;)M.push(F),F=o();else M=e;if(M!==e)if(F=Re(),F!==e){for(D=[],V=o();V!==e;)D.push(V),V=o();for(t.charCodeAt(c)===44?(V=K,c++):(V=e,T===0&&H(Dt)),V===e&&(t.charCodeAt(c)===59?(V=Qe,c++):(V=e,T===0&&H(_s))),V===e&&(V=null),G=[],Te=o();Te!==e;)G.push(Te),Te=o();ae=y,y=zi(v,F)}else c=y,y=e;else c=y,y=e}else c=y,y=e}else c=y,y=e;for(;y!==e;)if(f.push(y),y=c,v=We(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();if(t.charCodeAt(c)===58?(w=oe,c++):(w=e,T===0&&H(Rt)),w!==e){if(M=[],F=o(),F!==e)for(;F!==e;)M.push(F),F=o();else M=e;if(M!==e)if(F=Re(),F!==e){for(D=[],V=o();V!==e;)D.push(V),V=o();for(t.charCodeAt(c)===44?(V=K,c++):(V=e,T===0&&H(Dt)),V===e&&(t.charCodeAt(c)===59?(V=Qe,c++):(V=e,T===0&&H(_s))),V===e&&(V=null),G=[],Te=o();Te!==e;)G.push(Te),Te=o();ae=y,y=zi(v,F)}else c=y,y=e;else c=y,y=e}else c=y,y=e}else c=y,y=e;t.charCodeAt(c)===125?(y=q,c++):(y=e,T===0&&H(pr)),y!==e?(ae=i,i=to(f)):(c=i,i=e)}else c=i,i=e;return W[Ae]={nextPos:c,result:i},i}function Fo(){var i,l,p,f,y,v,_,w,M,F,D=c*77+58,V=W[D];if(V)return c=V.nextPos,V.result;if(i=c,t.charCodeAt(c)===91?(l=Ct,c++):(l=e,T===0&&H(us)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();if(f=[],y=c,v=Re(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();for(t.charCodeAt(c)===44?(w=K,c++):(w=e,T===0&&H(Dt)),w===e&&(w=null),M=[],F=o();F!==e;)M.push(F),F=o();ae=y,y=qi(v)}else c=y,y=e;for(;y!==e;)if(f.push(y),y=c,v=Re(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();for(t.charCodeAt(c)===44?(w=K,c++):(w=e,T===0&&H(Dt)),w===e&&(w=null),M=[],F=o();F!==e;)M.push(F),F=o();ae=y,y=qi(v)}else c=y,y=e;for(y=[],v=o();v!==e;)y.push(v),v=o();t.charCodeAt(c)===93?(v=L,c++):(v=e,T===0&&H(As)),v!==e?(ae=i,i=ro(f)):(c=i,i=e)}else c=i,i=e;return W[D]={nextPos:c,result:i},i}function ei(){var i,l,p,f,y,v,_,w=c*77+59,M=W[w];if(M)return c=M.nextPos,M.result;if(i=c,l=We(),l!==e){for(p=c,f=[],y=o();y!==e;)f.push(y),y=o();if(t.charCodeAt(c)===58?(y=oe,c++):(y=e,T===0&&H(Rt)),y!==e){for(v=[],_=o();_!==e;)v.push(_),_=o();_=Oe(),_!==e?p=_:(c=p,p=e)}else c=p,p=e;p===e&&(p=null),ae=i,i=so(l,p)}else c=i,i=e;return W[w]={nextPos:c,result:i},i}function na(){var i,l,p,f,y,v,_=c*77+60,w=W[_];if(w)return c=w.nextPos,w.result;if(i=c,l=ei(),l!==e){for(p=[],f=c,y=m(),y!==e?(v=ei(),v!==e?f=v:(c=f,f=e)):(c=f,f=e);f!==e;)p.push(f),f=c,y=m(),y!==e?(v=ei(),v!==e?f=v:(c=f,f=e)):(c=f,f=e);ae=i,i=Un(l,p)}else c=i,i=e;return W[_]={nextPos:c,result:i},i}function St(){var i,l,p,f,y,v,_,w,M,F,D,V,G,Te,Ae,Ft,Tt,jo=c*77+61,ri=W[jo];if(ri)return c=ri.nextPos,ri.result;if(i=c,t.charCodeAt(c)===64?(l=rt,c++):(l=e,T===0&&H(Qa)),l!==e){for(p=[],f=g();f!==e;)p.push(f),f=g();if(f=We(),f!==e){for(y=[],v=g();v!==e;)y.push(v),v=g();if(t.charCodeAt(c)===40?(v=C,c++):(v=e,T===0&&H(Mt)),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();for(w=na(),w===e&&(w=null),M=[],F=o();F!==e;)M.push(F),F=o();if(t.charCodeAt(c)===41?(F=k,c++):(F=e,T===0&&H(Gr)),F!==e){for(D=c,V=[],G=o();G!==e;)V.push(G),G=o();if(t.charCodeAt(c)===58?(G=oe,c++):(G=e,T===0&&H(Rt)),G!==e){for(Te=[],Ae=o();Ae!==e;)Te.push(Ae),Ae=o();Ae=Oe(),Ae!==e?D=Ae:(c=D,D=e)}else c=D,D=e;for(D===e&&(D=null),V=[],G=o();G!==e;)V.push(G),G=o();if(t.charCodeAt(c)===123?(G=I,c++):(G=e,T===0&&H(st)),G!==e){for(Te=[],Ae=o();Ae!==e;)Te.push(Ae),Ae=o();for(Ae=ar(),Ae===e&&(Ae=null),Ft=[],Tt=o();Tt!==e;)Ft.push(Tt),Tt=o();t.charCodeAt(c)===125?(Tt=q,c++):(Tt=e,T===0&&H(pr)),Tt!==e?(ae=i,i=no(p,f,y,w,D,Ae)):(c=i,i=e)}else c=i,i=e}else c=i,i=e}else c=i,i=e}else c=i,i=e}else c=i,i=e;return W[jo]={nextPos:c,result:i},i}function To(){var i,l,p,f,y,v,_,w,M,F,D,V,G,Te=c*77+62,Ae=W[Te];if(Ae)return c=Ae.nextPos,Ae.result;if(i=c,t.substr(c,2)===Ut?(l=Ut,c+=2):(l=e,T===0&&H(Xs)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();for(f=na(),f===e&&(f=null),y=[],v=o();v!==e;)y.push(v),v=o();if(t.charCodeAt(c)===41?(v=k,c++):(v=e,T===0&&H(Gr)),v!==e){for(_=c,w=[],M=o();M!==e;)w.push(M),M=o();if(t.charCodeAt(c)===58?(M=oe,c++):(M=e,T===0&&H(Rt)),M!==e){for(F=[],D=o();D!==e;)F.push(D),D=o();D=Oe(),D!==e?_=D:(c=_,_=e)}else c=_,_=e;for(_===e&&(_=null),w=[],M=o();M!==e;)w.push(M),M=o();if(t.charCodeAt(c)===123?(M=I,c++):(M=e,T===0&&H(st)),M!==e){for(F=[],D=o();D!==e;)F.push(D),D=o();for(D=ar(),D===e&&(D=null),V=[],G=o();G!==e;)V.push(G),G=o();t.charCodeAt(c)===125?(G=q,c++):(G=e,T===0&&H(pr)),G!==e?(ae=i,i=Bn(f,_,D)):(c=i,i=e)}else c=i,i=e}else c=i,i=e}else c=i,i=e;return W[Te]={nextPos:c,result:i},i}function Oo(){var i,l,p,f,y,v,_,w,M,F,D=c*77+63,V=W[D];if(V)return c=V.nextPos,V.result;if(i=c,t.charCodeAt(c)===91?(l=Ct,c++):(l=e,T===0&&H(us)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();if(f=[],y=c,v=Ur(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();for(t.charCodeAt(c)===44?(w=K,c++):(w=e,T===0&&H(Dt)),w===e&&(w=null),M=[],F=o();F!==e;)M.push(F),F=o();ae=y,y=Ki(v)}else c=y,y=e;for(;y!==e;)if(f.push(y),y=c,v=Ur(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();for(t.charCodeAt(c)===44?(w=K,c++):(w=e,T===0&&H(Dt)),w===e&&(w=null),M=[],F=o();F!==e;)M.push(F),F=o();ae=y,y=Ki(v)}else c=y,y=e;for(y=[],v=o();v!==e;)y.push(v),v=o();t.charCodeAt(c)===93?(v=L,c++):(v=e,T===0&&H(As)),v!==e?(ae=i,i=io(f)):(c=i,i=e)}else c=i,i=e;return W[D]={nextPos:c,result:i},i}function Io(){var i,l,p,f,y,v,_,w,M,F,D,V,G,Te,Ae=c*77+64,Ft=W[Ae];if(Ft)return c=Ft.nextPos,Ft.result;if(i=c,t.charCodeAt(c)===123?(l=I,c++):(l=e,T===0&&H(st)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();if(f=[],y=c,v=We(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();if(t.charCodeAt(c)===58?(w=oe,c++):(w=e,T===0&&H(Rt)),w!==e){if(M=[],F=o(),F!==e)for(;F!==e;)M.push(F),F=o();else M=e;if(M!==e)if(F=Ur(),F!==e){for(D=[],V=o();V!==e;)D.push(V),V=o();for(t.charCodeAt(c)===44?(V=K,c++):(V=e,T===0&&H(Dt)),V===e&&(t.charCodeAt(c)===59?(V=Qe,c++):(V=e,T===0&&H(_s))),V===e&&(V=null),G=[],Te=o();Te!==e;)G.push(Te),Te=o();ae=y,y=Vi(v,F)}else c=y,y=e;else c=y,y=e}else c=y,y=e}else c=y,y=e;for(;y!==e;)if(f.push(y),y=c,v=We(),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();if(t.charCodeAt(c)===58?(w=oe,c++):(w=e,T===0&&H(Rt)),w!==e){if(M=[],F=o(),F!==e)for(;F!==e;)M.push(F),F=o();else M=e;if(M!==e)if(F=Ur(),F!==e){for(D=[],V=o();V!==e;)D.push(V),V=o();for(t.charCodeAt(c)===44?(V=K,c++):(V=e,T===0&&H(Dt)),V===e&&(t.charCodeAt(c)===59?(V=Qe,c++):(V=e,T===0&&H(_s))),V===e&&(V=null),G=[],Te=o();Te!==e;)G.push(Te),Te=o();ae=y,y=Vi(v,F)}else c=y,y=e;else c=y,y=e}else c=y,y=e}else c=y,y=e;t.charCodeAt(c)===125?(y=q,c++):(y=e,T===0&&H(pr)),y!==e?(ae=i,i=ao(f)):(c=i,i=e)}else c=i,i=e;return W[Ae]={nextPos:c,result:i},i}function Oe(){var i,l=c*77+65,p=W[l];return p?(c=p.nextPos,p.result):(i=No(),i===e&&(i=vt()),W[l]={nextPos:c,result:i},i)}function No(){var i,l,p,f,y,v,_,w,M,F,D=c*77+66,V=W[D];if(V)return c=V.nextPos,V.result;if(i=c,t.substr(c,2)===Ut?(l=Ut,c+=2):(l=e,T===0&&H(Xs)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();for(f=xr(),f===e&&(f=null),y=[],v=o();v!==e;)y.push(v),v=o();if(t.charCodeAt(c)===41?(v=k,c++):(v=e,T===0&&H(Gr)),v!==e){for(_=[],w=o();w!==e;)_.push(w),w=o();if(t.substr(c,2)===ne?(w=ne,c+=2):(w=e,T===0&&H(Vs)),w!==e){for(M=[],F=o();F!==e;)M.push(F),F=o();F=Oe(),F!==e?(ae=i,i=lo(f,F)):(c=i,i=e)}else c=i,i=e}else c=i,i=e}else c=i,i=e;return W[D]={nextPos:c,result:i},i}function xr(){var i,l,p,f,y,v,_=c*77+67,w=W[_];if(w)return c=w.nextPos,w.result;if(i=c,l=Oe(),l!==e){for(p=[],f=c,y=m(),y!==e?(v=Oe(),v!==e?f=v:(c=f,f=e)):(c=f,f=e);f!==e;)p.push(f),f=c,y=m(),y!==e?(v=Oe(),v!==e?f=v:(c=f,f=e)):(c=f,f=e);ae=i,i=oo(l,p)}else c=i,i=e;return W[_]={nextPos:c,result:i},i}function vt(){var i,l,p,f,y,v,_,w,M=c*77+68,F=W[M];if(F)return c=F.nextPos,F.result;if(i=c,l=We(),l!==e){for(p=[],f=g();f!==e;)p.push(f),f=g();if(t.charCodeAt(c)===60?(f=Le,c++):(f=e,T===0&&H(Ks)),f!==e){for(y=[],v=g();v!==e;)y.push(v),v=g();if(v=Oe(),v!==e){for(_=[],w=g();w!==e;)_.push(w),w=g();t.charCodeAt(c)===62?(w=$r,c++):(w=e,T===0&&H(Oi)),w!==e?(ae=i,i=uo(l,v)):(c=i,i=e)}else c=i,i=e}else c=i,i=e}else c=i,i=e;return i===e&&(i=c,l=We(),l!==e&&(ae=i,l=fo(l)),i=l),W[M]={nextPos:c,result:i},i}function We(){var i,l,p,f,y=c*77+69,v=W[y];if(v)return c=v.nextPos,v.result;if(i=c,kn.test(t.charAt(c))?(l=t.charAt(c),c++):(l=e,T===0&&H(Ga)),l!==e){for(p=[],Fi.test(t.charAt(c))?(f=t.charAt(c),c++):(f=e,T===0&&H(ji));f!==e;)p.push(f),Fi.test(t.charAt(c))?(f=t.charAt(c),c++):(f=e,T===0&&H(ji));ae=i,i=s()}else c=i,i=e;return W[y]={nextPos:c,result:i},i}function ti(){var i,l,p,f,y,v,_=c*77+70,w=W[_];if(w)return c=w.nextPos,w.result;if(i=c,l=We(),l!==e){for(p=[],f=c,t.charCodeAt(c)===58?(y=oe,c++):(y=e,T===0&&H(Rt)),y!==e?(v=We(),v!==e?(y=[y,v],f=y):(c=f,f=e)):(c=f,f=e);f!==e;)p.push(f),f=c,t.charCodeAt(c)===58?(y=oe,c++):(y=e,T===0&&H(Rt)),y!==e?(v=We(),v!==e?(y=[y,v],f=y):(c=f,f=e)):(c=f,f=e);ae=i,i=U()}else c=i,i=e;return W[_]={nextPos:c,result:i},i}function m(){var i,l,p,f,y,v=c*77+71,_=W[v];if(_)return c=_.nextPos,_.result;for(i=c,l=[],p=o();p!==e;)l.push(p),p=o();if(t.charCodeAt(c)===44?(p=K,c++):(p=e,T===0&&H(Dt)),p!==e){for(f=[],y=o();y!==e;)f.push(y),y=o();l=[l,p,f],i=l}else c=i,i=e;if(i===e)if(i=[],l=o(),l!==e)for(;l!==e;)i.push(l),l=o();else i=e;return W[v]={nextPos:c,result:i},i}function be(){var i,l,p,f,y,v,_=c*77+72,w=W[_];if(w)return c=w.nextPos,w.result;if(i=c,t.charCodeAt(c)===123?(l=I,c++):(l=e,T===0&&H(st)),l!==e){for(p=[],f=o();f!==e;)p.push(f),f=o();for(f=ar(),f===e&&(f=null),y=[],v=o();v!==e;)y.push(v),v=o();t.charCodeAt(c)===125?(v=q,c++):(v=e,T===0&&H(pr)),v!==e?(ae=i,i=ds(f)):(c=i,i=e)}else c=i,i=e;return i===e&&(i=ms()),W[_]={nextPos:c,result:i},i}function ee(){var i,l=c*77+73,p=W[l];return p?(c=p.nextPos,p.result):(t.substr(c,2)===lt?(i=lt,c+=2):(i=e,T===0&&H(el)),i===e&&(Ea.test(t.charAt(c))?(i=t.charAt(c),c++):(i=e,T===0&&H(tl))),W[l]={nextPos:c,result:i},i)}function n(){var i,l,p=c*77+74,f=W[p];return f?(c=f.nextPos,f.result):(i=c,T++,t.length>c?(l=t.charAt(c),c++):(l=e,T===0&&H(Sr)),T--,l===e?i=void 0:(c=i,i=e),i===e&&(i=ee()),W[p]={nextPos:c,result:i},i)}function o(){var i,l=c*77+75,p=W[l];return p?(c=p.nextPos,p.result):(Ma.test(t.charAt(c))?(i=t.charAt(c),c++):(i=e,T===0&&H(rl)),W[l]={nextPos:c,result:i},i)}function g(){var i,l=c*77+76,p=W[l];return p?(c=p.nextPos,p.result):(Nt.test(t.charAt(c))?(i=t.charAt(c),c++):(i=e,T===0&&H(sl)),W[l]={nextPos:c,result:i},i)}function u(i,l,p){const f={type:i};l.children=p;for(const v of Object.keys(l))l[v]!==void 0&&(f[v]=l[v]);const y=Pt();return f.loc={start:y.start.offset,end:y.end.offset-1},f}if(Gs=d(),Gs!==e&&c===t.length)return Gs;throw Gs!==e&&c`}else return t.name;case"fnTypeSource":{const r=t.args.map(a=>pu(a)).join(", "),e=pu(t.result);return`@(${r}) { ${e} }`}}}function va(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return fh(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=va(t.inner):r=fh("any"),x0(t.name,[r])}}throw new bi(`Unknown type: '${pu(t)}'`)}else{const r=t.args.map(e=>va(e));return b0(r,va(t.result))}}function A0(t){switch(t.type){case"def":{t.varType!=null&&va(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&va(r.argType);t.retType!=null&&va(t.retType);break}}return t}function _0(t){for(const r of t)He(r,A0);return t}function gu(t){const r=[],e=[];for(const a of t)if(a.type==="attr")e.push(a);else if(a.type==="def")a.attr==null&&(a.attr=[]),a.attr.push(...e),e.splice(0,e.length),a.expr.type==="fn"&&(a.expr.children=gu(a.expr.children)),r.push(a);else{if(e.length>0)throw new bi("invalid attribute.");switch(a.type){case"fn":{a.children=gu(a.children);break}case"block":{a.statements=gu(a.statements);break}}r.push(a)}if(e.length>0)throw new bi("invalid attribute.");return r}function C0(t){if(v0(t)&&Sp(t)&&t.chain!=null){const{chain:r,...e}=t;let a=e;for(const h of r)switch(h.type){case"callChain":{a=d0(a,h.args,h.loc);break}case"indexChain":{a=y0(a,h.index,h.loc);break}case"propChain":{a=m0(a,h.name,h.loc);break}}return a}return t}function P0(t){for(let r=0;r":{func:"Core:gt",priority:4},"<=":{func:"Core:lteq",priority:4},">=":{func:"Core:gteq",priority:4},"&&":{mapFn:t=>({type:"and",left:ci(t.left),right:ci(t.right)}),priority:3},"||":{mapFn:t=>({type:"or",left:ci(t.left),right:ci(t.right)}),priority:3}};function E0(t){const r=t.operators.map(a=>{const h=k0[a];if(h==null)throw new bi(`No such operator: ${a}.`);return h});let e=vu(t.operands[0],t.operands[1],r[0]);for(let a=0;ae.type==="infix"?E0(e):e);return t}var Ls;let S0=(Ls=class{constructor(){Be(this,"plugins");this.plugins={validate:[$0,_0],transform:[gu,P0,M0]}}static parse(r){return Ls.instance==null&&(Ls.instance=new Ls),Ls.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;try{const a=uh(r,{startRule:"Preprocess"});e=uh(a,{startRule:"Main"})}catch(a){throw a.location?a.expected?new bi(`Parsing error. (Line ${a.location.start.line}:${a.location.start.column})`,a):new bi(`${a.message} (Line ${a.location.start.line}:${a.location.start.column})`,a):a}for(const a of this.plugins.validate)e=a(e);for(const a of this.plugins.transform)e=a(e);return e}},Be(Ls,"instance"),Ls);function zo(){return zo=Object.assign||function(t){for(var r=1;r";return r},lineNumbersCount:function(){var r=this.codeData.split(/\r\n|\n/).length;return r}},mounted:function(){this._recordCurrentState(),this.styleLineNumbers()},methods:{setLineNumbersHeight:function(){this.lineNumbersHeight=getComputedStyle(this.$refs.pre).height},styleLineNumbers:function(){if(!(!this.lineNumbers||!this.autoStyleLineNumbers)){var r=this.$refs.pre,e=this.$el.querySelector(".prism-editor__line-numbers"),a=window.getComputedStyle(r);this.$nextTick(function(){var h="border-top-left-radius",d="border-bottom-left-radius";if(e){e.style[h]=a[h],e.style[d]=a[d],r.style[h]="0",r.style[d]="0";var x=["background-color","margin-top","padding-top","font-family","font-size","line-height"];x.forEach(function($){e.style[$]=a[$]}),e.style["margin-bottom"]="-"+a["padding-top"]}})}},_recordCurrentState:function(){var r=this.$refs.textarea;if(r){var e=r.value,a=r.selectionStart,h=r.selectionEnd;this._recordChange({value:e,selectionStart:a,selectionEnd:h})}},_getLines:function(r,e){return r.substring(0,e).split(` -`)},_applyEdits:function(r){var e=this.$refs.textarea,a=this.history.stack[this.history.offset];a&&e&&(this.history.stack[this.history.offset]=zo({},a,{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd})),this._recordChange(r),this._updateInput(r)},_recordChange:function(r,e){e===void 0&&(e=!1);var a=this.history,h=a.stack,d=a.offset;if(h.length&&d>-1){this.history.stack=h.slice(0,d+1);var x=this.history.stack.length;if(x>vh){var $=x-vh;this.history.stack=h.slice($,x),this.history.offset=Math.max(this.history.offset-$,0)}}var A=Date.now();if(e){var C=this.history.stack[this.history.offset];if(C&&A-C.timestamp=S&&Fe<=I&&fe.startsWith(C)?fe.substring(C.length):fe}).join(` -`);if(x!==q){var ue=k[S];this._applyEdits({value:q,selectionStart:ue.startsWith(C)?$-C.length:$,selectionEnd:A-(x.length-q.length)})}}else if($!==A){var Q=this._getLines(x,$),oe=Q.length-1,$e=this._getLines(x,A).length-1,j=Q[oe];this._applyEdits({value:x.split(` -`).map(function(fe,Fe){return Fe>=oe&&Fe<=$e?C+fe:fe}).join(` -`),selectionStart:/\S/.test(j)?$+C.length:$,selectionEnd:A+C.length*($e-oe+1)})}else{var O=$+C.length;this._applyEdits({value:x.substring(0,$)+C+x.substring(A),selectionStart:O,selectionEnd:O})}else if(r.keyCode===O0){var N=$!==A,L=x.substring(0,$);if(L.endsWith(C)&&!N){r.preventDefault();var z=$-C.length;this._applyEdits({value:x.substring(0,$-C.length)+x.substring(A),selectionStart:z,selectionEnd:z})}}else if(r.keyCode===F0){if($===A){var K=this._getLines(x,$).pop(),J=K==null?void 0:K.match(/^\s+/);if(J&&J[0]){r.preventDefault();var Z=` -`+J[0],pe=$+Z.length;this._applyEdits({value:x.substring(0,$)+Z+x.substring(A),selectionStart:pe,selectionEnd:pe})}}}else if(r.keyCode===ch||r.keyCode===hh||r.keyCode===ph||r.keyCode===gh){var we;r.keyCode===ch&&r.shiftKey?we=["(",")"]:r.keyCode===hh?r.shiftKey?we=["{","}"]:we=["[","]"]:r.keyCode===ph?r.shiftKey?we=['"','"']:we=["'","'"]:r.keyCode===gh&&!r.shiftKey&&(we=["`","`"]),$!==A&&we&&(r.preventDefault(),this._applyEdits({value:x.substring(0,$)+we[0]+x.substring($,A)+we[1]+x.substring(A),selectionStart:$,selectionEnd:A+2}))}else(af?r.metaKey&&r.keyCode===au:r.ctrlKey&&r.keyCode===au)&&!r.shiftKey&&!r.altKey?(r.preventDefault(),this._undoEdit()):(af?r.metaKey&&r.keyCode===au&&r.shiftKey:D0?r.ctrlKey&&r.keyCode===I0:r.ctrlKey&&r.keyCode===au&&r.shiftKey)&&!r.altKey?(r.preventDefault(),this._redoEdit()):r.keyCode===N0&&r.ctrlKey&&(!af||r.shiftKey)&&(r.preventDefault(),this.capture=!this.capture)}}},render:function(){var r=this,e=cn("div",{class:"prism-editor__line-width-calc",style:"height: 0px; visibility: hidden; pointer-events: none;"},"999"),a=cn("div",{class:"prism-editor__line-numbers",style:{"min-height":this.lineNumbersHeight},"aria-hidden":"true"},[e,Array.from(Array(this.lineNumbersCount).keys()).map(function($,A){return cn("div",{class:"prism-editor__line-number token comment"},""+ ++A)})]),h=cn("textarea",{ref:"textarea",onInput:this.handleChange,onKeydown:this.handleKeyDown,onClick:function(A){r.$emit("click",A)},onKeyup:function(A){r.$emit("keyup",A)},onFocus:function(A){r.$emit("focus",A)},onBlur:function(A){r.$emit("blur",A)},class:{"prism-editor__textarea":!0,"prism-editor__textarea--empty":this.isEmpty},spellCheck:"false",autocapitalize:"off",autocomplete:"off",autocorrect:"off","data-gramm":"false",placeholder:this.placeholder,"data-testid":"textarea",readonly:this.readonly,value:this.codeData}),d=cn("pre",{ref:"pre",class:"prism-editor__editor","data-testid":"preview",innerHTML:this.content}),x=cn("div",{class:"prism-editor__container"},[h,d]);return cn("div",{class:"prism-editor-wrapper"},[this.lineNumbers&&a,x])}});var H0={exports:{}};(function(t){var r=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** - * Prism: Lightweight, robust, elegant syntax highlighting - * - * @license MIT - * @author Lea Verou - * @namespace - * @public - */var e=function(a){var h=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,d=0,x={},$={manual:a.Prism&&a.Prism.manual,disableWorkerMessageHandler:a.Prism&&a.Prism.disableWorkerMessageHandler,util:{encode:function j(O){return O instanceof A?new A(O.type,j(O.content),O.alias):Array.isArray(O)?O.map(j):O.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(L){var j=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(L.stack)||[])[1];if(j){var O=document.getElementsByTagName("script");for(var N in O)if(O[N].src==j)return O[N]}return null}},isActive:function(j,O,N){for(var L="no-"+O;j;){var z=j.classList;if(z.contains(O))return!0;if(z.contains(L))return!1;j=j.parentElement}return!!N}},languages:{plain:x,plaintext:x,text:x,txt:x,extend:function(j,O){var N=$.util.clone($.languages[j]);for(var L in O)N[L]=O[L];return N},insertBefore:function(j,O,N,L){L=L||$.languages;var z=L[j],K={};for(var J in z)if(z.hasOwnProperty(J)){if(J==O)for(var Z in N)N.hasOwnProperty(Z)&&(K[Z]=N[Z]);N.hasOwnProperty(J)||(K[J]=z[J])}var pe=L[j];return L[j]=K,$.languages.DFS($.languages,function(we,fe){fe===pe&&we!=j&&(this[we]=K)}),K},DFS:function j(O,N,L,z){z=z||{};var K=$.util.objId;for(var J in O)if(O.hasOwnProperty(J)){N.call(O,J,O[J],L||J);var Z=O[J],pe=$.util.type(Z);pe==="Object"&&!z[K(Z)]?(z[K(Z)]=!0,j(Z,N,null,z)):pe==="Array"&&!z[K(Z)]&&(z[K(Z)]=!0,j(Z,N,J,z))}}},plugins:{},highlightAll:function(j,O){$.highlightAllUnder(document,j,O)},highlightAllUnder:function(j,O,N){var L={callback:N,container:j,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};$.hooks.run("before-highlightall",L),L.elements=Array.prototype.slice.apply(L.container.querySelectorAll(L.selector)),$.hooks.run("before-all-elements-highlight",L);for(var z=0,K;K=L.elements[z++];)$.highlightElement(K,O===!0,L.callback)},highlightElement:function(j,O,N){var L=$.util.getLanguage(j),z=$.languages[L];$.util.setLanguage(j,L);var K=j.parentElement;K&&K.nodeName.toLowerCase()==="pre"&&$.util.setLanguage(K,L);var J=j.textContent,Z={element:j,language:L,grammar:z,code:J};function pe(fe){Z.highlightedCode=fe,$.hooks.run("before-insert",Z),Z.element.innerHTML=Z.highlightedCode,$.hooks.run("after-highlight",Z),$.hooks.run("complete",Z),N&&N.call(Z.element)}if($.hooks.run("before-sanity-check",Z),K=Z.element.parentElement,K&&K.nodeName.toLowerCase()==="pre"&&!K.hasAttribute("tabindex")&&K.setAttribute("tabindex","0"),!Z.code){$.hooks.run("complete",Z),N&&N.call(Z.element);return}if($.hooks.run("before-highlight",Z),!Z.grammar){pe($.util.encode(Z.code));return}if(O&&a.Worker){var we=new Worker($.filename);we.onmessage=function(fe){pe(fe.data)},we.postMessage(JSON.stringify({language:Z.language,code:Z.code,immediateClose:!0}))}else pe($.highlight(Z.code,Z.grammar,Z.language))},highlight:function(j,O,N){var L={code:j,grammar:O,language:N};if($.hooks.run("before-tokenize",L),!L.grammar)throw new Error('The language "'+L.language+'" has no grammar.');return L.tokens=$.tokenize(L.code,L.grammar),$.hooks.run("after-tokenize",L),A.stringify($.util.encode(L.tokens),L.language)},tokenize:function(j,O){var N=O.rest;if(N){for(var L in N)O[L]=N[L];delete O.rest}var z=new S;return I(z,z.head,j),k(j,z,O,z.head,0),ue(z)},hooks:{all:{},add:function(j,O){var N=$.hooks.all;N[j]=N[j]||[],N[j].push(O)},run:function(j,O){var N=$.hooks.all[j];if(!(!N||!N.length))for(var L=0,z;z=N[L++];)z(O)}},Token:A};a.Prism=$;function A(j,O,N,L){this.type=j,this.content=O,this.alias=N,this.length=(L||"").length|0}A.stringify=function j(O,N){if(typeof O=="string")return O;if(Array.isArray(O)){var L="";return O.forEach(function(pe){L+=j(pe,N)}),L}var z={type:O.type,content:j(O.content,N),tag:"span",classes:["token",O.type],attributes:{},language:N},K=O.alias;K&&(Array.isArray(K)?Array.prototype.push.apply(z.classes,K):z.classes.push(K)),$.hooks.run("wrap",z);var J="";for(var Z in z.attributes)J+=" "+Z+'="'+(z.attributes[Z]||"").replace(/"/g,""")+'"';return"<"+z.tag+' class="'+z.classes.join(" ")+'"'+J+">"+z.content+""};function C(j,O,N,L){j.lastIndex=O;var z=j.exec(N);if(z&&L&&z[1]){var K=z[1].length;z.index+=K,z[0]=z[0].slice(K)}return z}function k(j,O,N,L,z,K){for(var J in N)if(!(!N.hasOwnProperty(J)||!N[J])){var Z=N[J];Z=Array.isArray(Z)?Z:[Z];for(var pe=0;pe=K.reach);Je+=_e.value.length,_e=_e.next){var gt=_e.value;if(O.length>j.length)return;if(!(gt instanceof A)){var mt=1,Le;if(Ze){if(Le=C(Ye,Je,j,Fe),!Le||Le.index>=j.length)break;var ft=Le.index,$r=Le.index+Le[0].length,_t=Je;for(_t+=_e.value.length;ft>=_t;)_e=_e.next,_t+=_e.value.length;if(_t-=_e.value.length,Je=_t,_e.value instanceof A)continue;for(var Jt=_e;Jt!==O.tail&&(_t<$r||typeof Jt.value=="string");Jt=Jt.next)mt++,_t+=Jt.value.length;mt--,gt=j.slice(Je,_t),Le.index-=Je}else if(Le=C(Ye,0,gt,Fe),!Le)continue;var ft=Le.index,Kt=Le[0],cr=gt.slice(0,ft),Yt=gt.slice(ft+Kt.length),rr=Je+gt.length;K&&rr>K.reach&&(K.reach=rr);var Ct=_e.prev;cr&&(Ct=I(O,Ct,cr),Je+=cr.length),q(O,Ct,mt);var R=new A(J,fe?$.tokenize(Kt,fe):Kt,It,Kt);if(_e=I(O,Ct,R),Yt&&I(O,_e,Yt),mt>1){var B={cause:J+","+pe,reach:rr};k(j,O,N,_e.prev,Je,B),K&&B.reach>K.reach&&(K.reach=B.reach)}}}}}}function S(){var j={value:null,prev:null,next:null},O={value:null,prev:j,next:null};j.next=O,this.head=j,this.tail=O,this.length=0}function I(j,O,N){var L=O.next,z={value:N,prev:O,next:L};return O.next=z,L.prev=z,j.length++,z}function q(j,O,N){for(var L=O.next,z=0;z/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(a){a.type==="entity"&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(h,d){var x={};x["language-"+d]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[d]},x.cdata=/^$/i;var $={"included-cdata":{pattern://i,inside:x}};$["language-"+d]={pattern:/[\s\S]+/,inside:e.languages[d]};var A={};A[h]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return h}),"i"),lookbehind:!0,greedy:!0,inside:$},e.languages.insertBefore("markup","cdata",A)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(a,h){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+a+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[h,"language-"+h],inside:e.languages[h]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml,function(a){var h=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;a.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+h.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+h.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+h.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+h.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:h,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},a.languages.css.atrule.inside.rest=a.languages.css;var d=a.languages.markup;d&&(d.tag.addInlined("style","css"),d.tag.addAttribute("style","css"))}(e),e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript,function(){if(typeof e>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var a="Loading…",h=function(Q,oe){return"✖ Error "+Q+" while fetching file: "+oe},d="✖ Error: File does not exist or is empty",x={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},$="data-src-status",A="loading",C="loaded",k="failed",S="pre[data-src]:not(["+$+'="'+C+'"]):not(['+$+'="'+A+'"])';function I(Q,oe,$e){var j=new XMLHttpRequest;j.open("GET",Q,!0),j.onreadystatechange=function(){j.readyState==4&&(j.status<400&&j.responseText?oe(j.responseText):j.status>=400?$e(h(j.status,j.statusText)):$e(d))},j.send(null)}function q(Q){var oe=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(Q||"");if(oe){var $e=Number(oe[1]),j=oe[2],O=oe[3];return j?O?[$e,Number(O)]:[$e,void 0]:[$e,$e]}}e.hooks.add("before-highlightall",function(Q){Q.selector+=", "+S}),e.hooks.add("before-sanity-check",function(Q){var oe=Q.element;if(oe.matches(S)){Q.code="",oe.setAttribute($,A);var $e=oe.appendChild(document.createElement("CODE"));$e.textContent=a;var j=oe.getAttribute("data-src"),O=Q.language;if(O==="none"){var N=(/\.(\w+)$/.exec(j)||[,"none"])[1];O=x[N]||N}e.util.setLanguage($e,O),e.util.setLanguage(oe,O);var L=e.plugins.autoloader;L&&L.loadLanguages(O),I(j,function(z){oe.setAttribute($,C);var K=q(oe.getAttribute("data-range"));if(K){var J=z.split(/\r\n?|\n/g),Z=K[0],pe=K[1]==null?J.length:K[1];Z<0&&(Z+=J.length),Z=Math.max(0,Math.min(Z-1,J.length)),pe<0&&(pe+=J.length),pe=Math.max(0,Math.min(pe,J.length)),z=J.slice(Z,pe).join(` -`),oe.hasAttribute("data-start")||oe.setAttribute("data-start",String(Z+1))}$e.textContent=z,e.highlightElement($e)},function(z){oe.setAttribute($,k),$e.textContent=z})}}),e.plugins.fileHighlight={highlight:function(oe){for(var $e=(oe||document).querySelectorAll(S),j=0,O;O=$e[j++];)e.highlightElement(O)}};var ue=!1;e.fileHighlight=function(){ue||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),ue=!0),e.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(H0);var Tp={exports:{}};(function(t){var r=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** - * Prism: Lightweight, robust, elegant syntax highlighting - * - * @license MIT - * @author Lea Verou - * @namespace - * @public - */var e=function(a){var h=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,d=0,x={},$={manual:a.Prism&&a.Prism.manual,disableWorkerMessageHandler:a.Prism&&a.Prism.disableWorkerMessageHandler,util:{encode:function j(O){return O instanceof A?new A(O.type,j(O.content),O.alias):Array.isArray(O)?O.map(j):O.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(L){var j=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(L.stack)||[])[1];if(j){var O=document.getElementsByTagName("script");for(var N in O)if(O[N].src==j)return O[N]}return null}},isActive:function(j,O,N){for(var L="no-"+O;j;){var z=j.classList;if(z.contains(O))return!0;if(z.contains(L))return!1;j=j.parentElement}return!!N}},languages:{plain:x,plaintext:x,text:x,txt:x,extend:function(j,O){var N=$.util.clone($.languages[j]);for(var L in O)N[L]=O[L];return N},insertBefore:function(j,O,N,L){L=L||$.languages;var z=L[j],K={};for(var J in z)if(z.hasOwnProperty(J)){if(J==O)for(var Z in N)N.hasOwnProperty(Z)&&(K[Z]=N[Z]);N.hasOwnProperty(J)||(K[J]=z[J])}var pe=L[j];return L[j]=K,$.languages.DFS($.languages,function(we,fe){fe===pe&&we!=j&&(this[we]=K)}),K},DFS:function j(O,N,L,z){z=z||{};var K=$.util.objId;for(var J in O)if(O.hasOwnProperty(J)){N.call(O,J,O[J],L||J);var Z=O[J],pe=$.util.type(Z);pe==="Object"&&!z[K(Z)]?(z[K(Z)]=!0,j(Z,N,null,z)):pe==="Array"&&!z[K(Z)]&&(z[K(Z)]=!0,j(Z,N,J,z))}}},plugins:{},highlightAll:function(j,O){$.highlightAllUnder(document,j,O)},highlightAllUnder:function(j,O,N){var L={callback:N,container:j,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};$.hooks.run("before-highlightall",L),L.elements=Array.prototype.slice.apply(L.container.querySelectorAll(L.selector)),$.hooks.run("before-all-elements-highlight",L);for(var z=0,K;K=L.elements[z++];)$.highlightElement(K,O===!0,L.callback)},highlightElement:function(j,O,N){var L=$.util.getLanguage(j),z=$.languages[L];$.util.setLanguage(j,L);var K=j.parentElement;K&&K.nodeName.toLowerCase()==="pre"&&$.util.setLanguage(K,L);var J=j.textContent,Z={element:j,language:L,grammar:z,code:J};function pe(fe){Z.highlightedCode=fe,$.hooks.run("before-insert",Z),Z.element.innerHTML=Z.highlightedCode,$.hooks.run("after-highlight",Z),$.hooks.run("complete",Z),N&&N.call(Z.element)}if($.hooks.run("before-sanity-check",Z),K=Z.element.parentElement,K&&K.nodeName.toLowerCase()==="pre"&&!K.hasAttribute("tabindex")&&K.setAttribute("tabindex","0"),!Z.code){$.hooks.run("complete",Z),N&&N.call(Z.element);return}if($.hooks.run("before-highlight",Z),!Z.grammar){pe($.util.encode(Z.code));return}if(O&&a.Worker){var we=new Worker($.filename);we.onmessage=function(fe){pe(fe.data)},we.postMessage(JSON.stringify({language:Z.language,code:Z.code,immediateClose:!0}))}else pe($.highlight(Z.code,Z.grammar,Z.language))},highlight:function(j,O,N){var L={code:j,grammar:O,language:N};if($.hooks.run("before-tokenize",L),!L.grammar)throw new Error('The language "'+L.language+'" has no grammar.');return L.tokens=$.tokenize(L.code,L.grammar),$.hooks.run("after-tokenize",L),A.stringify($.util.encode(L.tokens),L.language)},tokenize:function(j,O){var N=O.rest;if(N){for(var L in N)O[L]=N[L];delete O.rest}var z=new S;return I(z,z.head,j),k(j,z,O,z.head,0),ue(z)},hooks:{all:{},add:function(j,O){var N=$.hooks.all;N[j]=N[j]||[],N[j].push(O)},run:function(j,O){var N=$.hooks.all[j];if(!(!N||!N.length))for(var L=0,z;z=N[L++];)z(O)}},Token:A};a.Prism=$;function A(j,O,N,L){this.type=j,this.content=O,this.alias=N,this.length=(L||"").length|0}A.stringify=function j(O,N){if(typeof O=="string")return O;if(Array.isArray(O)){var L="";return O.forEach(function(pe){L+=j(pe,N)}),L}var z={type:O.type,content:j(O.content,N),tag:"span",classes:["token",O.type],attributes:{},language:N},K=O.alias;K&&(Array.isArray(K)?Array.prototype.push.apply(z.classes,K):z.classes.push(K)),$.hooks.run("wrap",z);var J="";for(var Z in z.attributes)J+=" "+Z+'="'+(z.attributes[Z]||"").replace(/"/g,""")+'"';return"<"+z.tag+' class="'+z.classes.join(" ")+'"'+J+">"+z.content+""};function C(j,O,N,L){j.lastIndex=O;var z=j.exec(N);if(z&&L&&z[1]){var K=z[1].length;z.index+=K,z[0]=z[0].slice(K)}return z}function k(j,O,N,L,z,K){for(var J in N)if(!(!N.hasOwnProperty(J)||!N[J])){var Z=N[J];Z=Array.isArray(Z)?Z:[Z];for(var pe=0;pe=K.reach);Je+=_e.value.length,_e=_e.next){var gt=_e.value;if(O.length>j.length)return;if(!(gt instanceof A)){var mt=1,Le;if(Ze){if(Le=C(Ye,Je,j,Fe),!Le||Le.index>=j.length)break;var ft=Le.index,$r=Le.index+Le[0].length,_t=Je;for(_t+=_e.value.length;ft>=_t;)_e=_e.next,_t+=_e.value.length;if(_t-=_e.value.length,Je=_t,_e.value instanceof A)continue;for(var Jt=_e;Jt!==O.tail&&(_t<$r||typeof Jt.value=="string");Jt=Jt.next)mt++,_t+=Jt.value.length;mt--,gt=j.slice(Je,_t),Le.index-=Je}else if(Le=C(Ye,0,gt,Fe),!Le)continue;var ft=Le.index,Kt=Le[0],cr=gt.slice(0,ft),Yt=gt.slice(ft+Kt.length),rr=Je+gt.length;K&&rr>K.reach&&(K.reach=rr);var Ct=_e.prev;cr&&(Ct=I(O,Ct,cr),Je+=cr.length),q(O,Ct,mt);var R=new A(J,fe?$.tokenize(Kt,fe):Kt,It,Kt);if(_e=I(O,Ct,R),Yt&&I(O,_e,Yt),mt>1){var B={cause:J+","+pe,reach:rr};k(j,O,N,_e.prev,Je,B),K&&B.reach>K.reach&&(K.reach=B.reach)}}}}}}function S(){var j={value:null,prev:null,next:null},O={value:null,prev:j,next:null};j.next=O,this.head=j,this.tail=O,this.length=0}function I(j,O,N){var L=O.next,z={value:N,prev:O,next:L};return O.next=z,L.prev=z,j.length++,z}function q(j,O,N){for(var L=O.next,z=0;z]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;const U0={computed:{hasHeader(){return!!this.$slots.header},hasFooter(){return!!this.$slots.footer}}},B0="_container_157we_2",z0="_header_157we_9",q0="_main_157we_14",K0="_footer_157we_19",V0={container:B0,header:z0,main:q0,footer:K0};function W0(t,r,e,a,h,d){return ut(),Lt("div",{class:tr(t.$style.container)},[d.hasHeader?(ut(),Lt("header",{key:0,class:tr(t.$style.header)},[fu(t.$slots,"header")],2)):bn("",!0),Bt("main",{class:tr(t.$style.main)},[fu(t.$slots,"default")],2),d.hasFooter?(ut(),Lt("footer",{key:1,class:tr(t.$style.footer)},[fu(t.$slots,"footer")],2)):bn("",!0)],2)}const J0={$style:V0},Jr=Pi(U0,[["render",W0],["__cssModules",J0]]),Z0=Ci({__name:"Editor",props:{modelValue:{},samples:{},parseError:{}},emits:["run","update:modelValue"],setup(t,{emit:r}){const e=t,a=r,h=Pr(e.modelValue);vi(h,()=>{a("update:modelValue",h.value)},{immediate:!0});function d($){h.value=e.samples[$]}const x=$=>dh.highlight($,dh.languages.js,"javascript");return($,A)=>(ut(),pa(Jr,null,{header:pt(()=>[qt(" Input "),e.samples?(ut(),Lt("div",{key:0,class:tr($.$style.actions)},[tt(Ap,{options:Object.keys(e.samples),onSelect:d},{default:pt(()=>[qt("Samples")]),_:1},8,["options"])],2)):bn("",!0)]),footer:pt(()=>[e.parseError?(ut(),Lt("span",{key:0,class:tr($.$style.parseError)},Zr(e.parseError),3)):bn("",!0),Bt("div",{class:tr($.$style.actions)},[Bt("button",{onClick:A[1]||(A[1]=C=>a("run"))},"RUN")],2)]),default:pt(()=>[tt(Nu(L0),{class:tr($.$style.code),modelValue:h.value,"onUpdate:modelValue":A[0]||(A[0]=C=>h.value=C),highlight:x,"line-numbers":!1},null,8,["class","modelValue"])]),_:1}))}}),X0="_code_kvmon_2",Y0="_parseError_kvmon_6",Q0="_actions_kvmon_9",G0={code:X0,parseError:Y0,actions:Q0},ey={$style:G0},xc=Pi(Z0,[["__cssModules",ey]]),ty=t=>(tc("data-v-68118b39"),t=t(),rc(),t),ry={id:"root"},sy={id:"grid1"},ny={class:"type"},iy={id:"grid2"},ay=ty(()=>Bt("header",null,null,-1)),yh="0.16.0",ly=Ci({__name:"index",setup(t){const r=Pr(window.localStorage.getItem(yh)??'<: "Hello, AiScript!"'),e=Pr(null),a=Pr([]),h=Pr(null);vi(r,()=>{window.localStorage.setItem(yh,r.value);try{e.value=S0.parse(r.value),h.value=null}catch(A){const C=A;h.value=C.message,console.error("info"in C?C.info:C);return}},{immediate:!0});const d={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { - <: if (i % 15 == 0) "FizzBuzz" - elif (i % 3 == 0) "Fizz" - elif (i % 5 == 0) "Buzz" - else i -}`};let x=null;const $=async()=>{a.value=[],x==null||x.abort(),x=new wr({},{in:A=>new Promise(C=>{const k=window.prompt(A);C(k??"")}),out:A=>{a.value.push({id:Math.random(),type:A.type,text:Ef(A,!0),print:!0})},err:A=>{window.alert(A.toString())},log:(A,C)=>{switch(A){case"end":a.value.push({id:Math.random(),text:Ef(C.val,!0),print:!1});break}}});try{await x.exec(e.value)}catch(A){console.error(A),window.alert("Internal Error: "+A)}};return(A,C)=>(ut(),Lt("div",ry,[Bt("div",sy,[tt(xc,{modelValue:r.value,"onUpdate:modelValue":C[0]||(C[0]=k=>r.value=k),samples:d,parseError:h.value,onRun:$},null,8,["modelValue","parseError"]),tt(Jr,{id:"logs"},{header:pt(()=>[qt("Output")]),default:pt(()=>[(ut(!0),Lt(er,null,Jo(a.value,k=>(ut(),Lt("div",{class:tr(["log",[{print:k.print},k.type]]),key:k.id},[Bt("span",ny,Zr(k.type),1),qt(" "+Zr(k.text),1)],2))),128))]),_:1})]),Bt("div",iy,[tt(Jr,{id:"ast"},{header:pt(()=>[qt("AST")]),default:pt(()=>[Bt("pre",null,Zr(JSON.stringify(e.value,null," ")),1)]),_:1}),tt(Jr,{id:"bin"},{header:pt(()=>[qt("Bytecode")]),default:pt(()=>[ay]),_:1}),tt(Jr,{id:"debugger"},{header:pt(()=>[qt("Debugger")]),_:1})])]))}});const oy=Pi(ly,[["__scopeId","data-v-68118b39"]]);function du(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?du=function(e){return typeof e}:du=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},du(t)}function Op(t,r,e){var a=e.value;if(typeof a!="function")throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(du(a)));var h=!1;return{configurable:!0,get:function(){if(h||this===t.prototype||this.hasOwnProperty(r)||typeof a!="function")return a;var x=a.bind(this);return h=!0,Object.defineProperty(this,r,{configurable:!0,get:function(){return x},set:function(A){a=A,delete this[r]}}),h=!1,x},set:function(x){a=x}}}function uy(t){var r;return typeof Reflect<"u"&&typeof Reflect.ownKeys=="function"?r=Reflect.ownKeys(t.prototype):(r=Object.getOwnPropertyNames(t.prototype),typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t.prototype)))),r.forEach(function(e){if(e!=="constructor"){var a=Object.getOwnPropertyDescriptor(t.prototype,e);typeof a.value=="function"&&Object.defineProperty(t.prototype,e,Op(t,e,a))}}),t}function Ke(){return arguments.length===1?uy.apply(void 0,arguments):Op.apply(void 0,arguments)}let Ip=class Np extends Error{constructor(e,a){super(e);Be(this,"info");this.info=a,Error.captureStackTrace&&Error.captureStackTrace(this,Np)}},Ai=class extends Ip{constructor(r,e){super(r,e)}},bt=class extends Ip{constructor(r,e){super(r,e)}},fy=class extends bt{constructor(r,e){super(r,e)}};var Mi=globalThis&&globalThis.__decorate||function(t,r,e,a){var h=arguments.length,d=h<3?r:a===null?a=Object.getOwnPropertyDescriptor(r,e):a,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,a);else for(var $=t.length-1;$>=0;$--)(x=t[$])&&(d=(h<3?x(d):h>3?x(r,e,d):x(r,e))||d);return h>3&&d&&Object.defineProperty(r,e,d),d};let Pn=class jp{constructor(r=[],e,a){Be(this,"parent");Be(this,"layerdStates");Be(this,"name");Be(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=a||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const a=[r,...this.layerdStates];return new jp(a,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const a=e.get(r);return this.log("read",{var:r,val:a}),a}throw new bt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}getAll(){const r=this.layerdStates.reduce((e,a)=>[...e,...a],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const a=this.layerdStates[0];if(a.has(r))throw new bt(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});a.set(r,e),this.parent==null&&this.onUpdated(r,e)}assign(r,e){let a=1;for(const h of this.layerdStates){if(h.has(r)){h.set(r,e),this.log("assign",{var:r,val:e}),a===this.layerdStates.length&&this.onUpdated(r,e);return}a++}throw new bt(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}};Mi([Ke],Pn.prototype,"log",null);Mi([Ke],Pn.prototype,"onUpdated",null);Mi([Ke],Pn.prototype,"createChildScope",null);Mi([Ke],Pn.prototype,"get",null);Mi([Ke],Pn.prototype,"getAll",null);Mi([Ke],Pn.prototype,"add",null);Mi([Ke],Pn.prototype,"assign",null);let lu;const cy=new Uint8Array(16);function hy(){if(!lu&&(lu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lu(cy)}const or=[];for(let t=0;t<256;++t)or.push((t+256).toString(16).slice(1));function py(t,r=0){return(or[t[r+0]]+or[t[r+1]]+or[t[r+2]]+or[t[r+3]]+"-"+or[t[r+4]]+or[t[r+5]]+"-"+or[t[r+6]]+or[t[r+7]]+"-"+or[t[r+8]]+or[t[r+9]]+"-"+or[t[r+10]]+or[t[r+11]]+or[t[r+12]]+or[t[r+13]]+or[t[r+14]]+or[t[r+15]]).toLowerCase()}const gy=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),mh={randomUUID:gy};function vy(t,r,e){if(mh.randomUUID&&!r&&!t)return mh.randomUUID();t=t||{};const a=t.random||(t.rng||hy)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,r){e=e||0;for(let h=0;h<16;++h)r[e+h]=a[h];return r}return py(a)}const ct={type:"null"},ss={type:"bool",value:!0},zr={type:"bool",value:!1},me=t=>({type:"num",value:t}),$t=t=>({type:"str",value:t}),da=t=>({type:"bool",value:t}),bc=t=>({type:"obj",value:t}),vr=t=>({type:"arr",value:t}),dy=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),re=t=>({type:"fn",native:t}),yy=t=>({type:"return",value:t}),my=()=>({type:"break",value:null}),wy=()=>({type:"continue",value:null}),$y=t=>t.type==="return"?t.value:t;function Vr(t){if(t==null)throw new bt("Expect anything, but got nothing.")}function _r(t){if(t==null)throw new bt("Expect boolean, but got nothing.");if(t.type!=="bool")throw new bt(`Expect boolean, but got ${t.type}.`)}function mn(t){if(t==null)throw new bt("Expect function, but got nothing.");if(t.type!=="fn")throw new bt(`Expect function, but got ${t.type}.`)}function Qt(t){if(t==null)throw new bt("Expect string, but got nothing.");if(t.type!=="str")throw new bt(`Expect string, but got ${t.type}.`)}function ve(t){if(t==null)throw new bt("Expect number, but got nothing.");if(t.type!=="num")throw new bt(`Expect number, but got ${t.type}.`)}function pn(t){if(t==null)throw new bt("Expect object, but got nothing.");if(t.type!=="obj")throw new bt(`Expect object, but got ${t.type}.`)}function ya(t){if(t==null)throw new bt("Expect array, but got nothing.");if(t.type!=="arr")throw new bt(`Expect array, but got ${t.type}.`)}function xy(t){return t.type==="str"}function by(t){return t.type==="num"}function Ay(t){return t.type==="obj"}function _y(t){return t.type==="arr"}function Tf(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function Of(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(a=>Of(a,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function If(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>If(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,a]of t.value.entries())r[e]=If(a);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function Nf(t){if(t===null)return ct;if(typeof t=="boolean")return da(t);if(typeof t=="string")return $t(t);if(typeof t=="number")return me(t);if(Array.isArray(t))return vr(t.map(r=>Nf(r)));if(typeof t=="object"){const r=new Map;for(const[e,a]of Object.entries(t))r.set(e,Nf(a));return bc(r)}return ct}const Cy={help:$t("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":$t("0.14.1"),"Core:ai":$t("kawaii"),"Core:not":re(([t])=>(_r(t),t.value?zr:ss)),"Core:eq":re(([t,r])=>(Vr(t),Vr(r),Tf(t,r)?ss:zr)),"Core:neq":re(([t,r])=>(Vr(t),Vr(r),Tf(t,r)?zr:ss)),"Core:and":re(([t,r])=>(_r(t),t.value?(_r(r),r.value?ss:zr):zr)),"Core:or":re(([t,r])=>(_r(t),t.value?ss:(_r(r),r.value?ss:zr))),"Core:add":re(([t,r])=>(ve(t),ve(r),me(t.value+r.value))),"Core:sub":re(([t,r])=>(ve(t),ve(r),me(t.value-r.value))),"Core:mul":re(([t,r])=>(ve(t),ve(r),me(t.value*r.value))),"Core:pow":re(([t,r])=>{ve(t),ve(r);const e=t.value**r.value;if(isNaN(e))throw new bt("Invalid operation.");return me(e)}),"Core:div":re(([t,r])=>{ve(t),ve(r);const e=t.value/r.value;if(isNaN(e))throw new bt("Invalid operation.");return me(e)}),"Core:mod":re(([t,r])=>(ve(t),ve(r),me(t.value%r.value))),"Core:gt":re(([t,r])=>(ve(t),ve(r),t.value>r.value?ss:zr)),"Core:lt":re(([t,r])=>(ve(t),ve(r),t.value(ve(t),ve(r),t.value>=r.value?ss:zr)),"Core:lteq":re(([t,r])=>(ve(t),ve(r),t.value<=r.value?ss:zr)),"Core:type":re(([t])=>(Vr(t),$t(t.type))),"Core:to_str":re(([t])=>(Vr(t),t.type==="str"?t:t.type==="num"?$t(t.value.toString()):$t("?"))),"Core:range":re(([t,r])=>(ve(t),ve(r),t.valueme(a+t.value))):t.value>r.value?vr(Array.from({length:t.value-r.value+1},(e,a)=>me(t.value-a))):vr([t]))),"Util:uuid":re(()=>$t(vy())),"Json:stringify":re(([t])=>(Vr(t),$t(JSON.stringify(If(t))))),"Json:parse":re(([t])=>(Qt(t),Nf(JSON.parse(t.value)))),"Json:parsable":re(([t])=>{Qt(t);try{JSON.parse(t.value)}catch{return da(!1)}return da(!0)}),"Date:now":re(()=>me(Date.now())),"Date:year":re(([t])=>(t&&ve(t),me(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":re(([t])=>(t&&ve(t),me(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":re(([t])=>(t&&ve(t),me(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":re(([t])=>(t&&ve(t),me(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":re(([t])=>(t&&ve(t),me(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":re(([t])=>(t&&ve(t),me(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":re(([t])=>(Qt(t),me(new Date(t.value).getTime()))),"Math:Infinity":me(1/0),"Math:E":me(Math.E),"Math:LN2":me(Math.LN2),"Math:LN10":me(Math.LN10),"Math:LOG2E":me(Math.LOG2E),"Math:LOG10E":me(Math.LOG10E),"Math:PI":me(Math.PI),"Math:SQRT1_2":me(Math.SQRT1_2),"Math:SQRT2":me(Math.SQRT2),"Math:abs":re(([t])=>(ve(t),me(Math.abs(t.value)))),"Math:acos":re(([t])=>(ve(t),me(Math.acos(t.value)))),"Math:acosh":re(([t])=>(ve(t),me(Math.acosh(t.value)))),"Math:asin":re(([t])=>(ve(t),me(Math.asin(t.value)))),"Math:asinh":re(([t])=>(ve(t),me(Math.asinh(t.value)))),"Math:atan":re(([t])=>(ve(t),me(Math.atan(t.value)))),"Math:atanh":re(([t])=>(ve(t),me(Math.atanh(t.value)))),"Math:atan2":re(([t,r])=>(ve(t),ve(r),me(Math.atan2(t.value,r.value)))),"Math:cbrt":re(([t])=>(ve(t),me(Math.cbrt(t.value)))),"Math:ceil":re(([t])=>(ve(t),me(Math.ceil(t.value)))),"Math:clz32":re(([t])=>(ve(t),me(Math.clz32(t.value)))),"Math:cos":re(([t])=>(ve(t),me(Math.cos(t.value)))),"Math:cosh":re(([t])=>(ve(t),me(Math.cosh(t.value)))),"Math:exp":re(([t])=>(ve(t),me(Math.exp(t.value)))),"Math:expm1":re(([t])=>(ve(t),me(Math.expm1(t.value)))),"Math:floor":re(([t])=>(ve(t),me(Math.floor(t.value)))),"Math:fround":re(([t])=>(ve(t),me(Math.fround(t.value)))),"Math:hypot":re(([t])=>{ya(t);const r=[];for(const e of t.value)ve(e),r.push(e.value);return me(Math.hypot(...r))}),"Math:imul":re(([t,r])=>(ve(t),ve(r),me(Math.imul(t.value,r.value)))),"Math:log":re(([t])=>(ve(t),me(Math.log(t.value)))),"Math:log1p":re(([t])=>(ve(t),me(Math.log1p(t.value)))),"Math:log10":re(([t])=>(ve(t),me(Math.log10(t.value)))),"Math:log2":re(([t])=>(ve(t),me(Math.log2(t.value)))),"Math:max":re(([t,r])=>(ve(t),ve(r),me(Math.max(t.value,r.value)))),"Math:min":re(([t,r])=>(ve(t),ve(r),me(Math.min(t.value,r.value)))),"Math:pow":re(([t,r])=>(ve(t),ve(r),me(Math.pow(t.value,r.value)))),"Math:round":re(([t])=>(ve(t),me(Math.round(t.value)))),"Math:sign":re(([t])=>(ve(t),me(Math.sign(t.value)))),"Math:sin":re(([t])=>(ve(t),me(Math.sin(t.value)))),"Math:sinh":re(([t])=>(ve(t),me(Math.sinh(t.value)))),"Math:sqrt":re(([t])=>{ve(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new bt("Invalid operation.");return me(r)}),"Math:tan":re(([t])=>(ve(t),me(Math.tan(t.value)))),"Math:tanh":re(([t])=>(ve(t),me(Math.tanh(t.value)))),"Math:trunc":re(([t])=>(ve(t),me(Math.trunc(t.value)))),"Math:rnd":re(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?me(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):me(Math.random())),"Math:gen_rng":re(([t])=>{if(Vr(t),t.type!=="num"&&t.type!=="str")return ct;const r=vc(t.value.toString());return re(([e,a])=>e&&e.type==="num"&&a&&a.type==="num"?me(Math.floor(r()*(Math.floor(a.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):me(r()))}),"Num:to_hex":re(([t])=>(ve(t),$t(t.value.toString(16)))),"Num:from_hex":re(([t])=>(Qt(t),me(parseInt(t.value,16)))),"Str:lf":$t(` -`),"Str:lt":re(([t,r])=>(Qt(t),Qt(r),t.value(Qt(t),Qt(r),t.value>r.value?me(-1):t.value===r.value?me(0):me(1))),"Obj:keys":re(([t])=>(pn(t),vr(Array.from(t.value.keys()).map(r=>$t(r))))),"Obj:vals":re(([t])=>(pn(t),vr(Array.from(t.value.values())))),"Obj:kvs":re(([t])=>(pn(t),vr(Array.from(t.value.entries()).map(([r,e])=>vr([$t(r),e]))))),"Obj:get":re(([t,r])=>(pn(t),Qt(r),t.value.get(r.value)??ct)),"Obj:set":re(([t,r,e])=>(pn(t),Qt(r),Vr(e),t.value.set(r.value,e),ct)),"Obj:has":re(([t,r])=>(pn(t),Qt(r),da(t.value.has(r.value)))),"Obj:copy":re(([t])=>(pn(t),bc(new Map(t.value)))),"Async:interval":re(async([t,r,e],a)=>{ve(t),mn(r),e&&(_r(e),e.value&&a.call(r,[]));const h=setInterval(()=>{a.call(r,[])},t.value),d=()=>{clearInterval(h)};return a.registerAbortHandler(d),re(([],x)=>{clearInterval(h),x.unregisterAbortHandler(d)})}),"Async:timeout":re(async([t,r],e)=>{ve(t),mn(r);const a=setTimeout(()=>{e.call(r,[])},t.value),h=()=>{clearTimeout(a)};return e.registerAbortHandler(h),re(([],d)=>{clearTimeout(a),d.unregisterAbortHandler(h)})})},aa={num:{to_str:t=>re(async(r,e)=>$t(t.value.toString()))},str:{to_num:t=>re(async(r,e)=>{const a=parseInt(t.value,10);return isNaN(a)?ct:me(a)}),len:t=>me(mc(t.value)),replace:t=>re(async([r,e],a)=>(Qt(r),Qt(e),$t(t.value.split(r.value).join(e.value)))),index_of:t=>re(async([r],e)=>(Qt(r),me($c(t.value,r.value)))),incl:t=>re(async([r],e)=>(Qt(r),t.value.includes(r.value)?ss:zr)),trim:t=>re(async(r,e)=>$t(t.value.trim())),upper:t=>re(async(r,e)=>$t(t.value.toUpperCase())),lower:t=>re(async(r,e)=>$t(t.value.toLowerCase())),split:t=>re(async([r],e)=>(r&&Qt(r),vr(r?t.value.split(r?r.value:"").map(a=>$t(a)):_a(t.value).map(a=>$t(a))))),slice:t=>re(async([r,e],a)=>(ve(r),ve(e),$t(wc(t.value,r.value,e.value)))),pick:t=>re(async([r],e)=>{ve(r);const h=_a(t.value)[r.value];return h?$t(h):ct})},arr:{len:t=>me(t.value.length),push:t=>re(async([r],e)=>(Vr(r),t.value.push(r),t)),unshift:t=>re(async([r],e)=>(Vr(r),t.value.unshift(r),t)),pop:t=>re(async(r,e)=>t.value.pop()??ct),shift:t=>re(async(r,e)=>t.value.shift()??ct),concat:t=>re(async([r],e)=>(ya(r),vr(t.value.concat(r.value)))),slice:t=>re(async([r,e],a)=>(ve(r),ve(e),vr(t.value.slice(r.value,e.value)))),join:t=>re(async([r],e)=>(r&&Qt(r),$t(t.value.map(a=>a.type==="str"?a.value:"").join(r?r.value:"")))),map:t=>re(async([r],e)=>{mn(r);const a=t.value.map(async(h,d)=>await e.call(r,[h,me(d)]));return vr(await Promise.all(a))}),filter:t=>re(async([r],e)=>{mn(r);const a=[];for(let h=0;hre(async([r,e],a)=>{mn(r);const h=e!=null;let d=h?e:t.value[0];for(let x=h?0:1;xre(async([r],e)=>{mn(r);for(let a=0;are(async([r],e)=>(Vr(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?zr:(h=>h.value.map(d=>d.type==="str"||d.type==="num"||d.type==="bool"?d.value:d.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?ss:zr)),reverse:t=>re(async(r,e)=>(t.value.reverse(),ct)),copy:t=>re(async(r,e)=>vr([...t.value])),sort:t=>re(async([r],e)=>{const a=async(d,x)=>{if(d.length<=1)return d;const $=Math.floor(d.length/2),A=await a(d.slice(0,$),x),C=await a(d.slice($),x);return h(A,C,x)},h=async(d,x,$)=>{const A=[];let C=0,k=0;for(;C=0;$--)(x=t[$])&&(d=(h<3?x(d):h>3?x(r,e,d):x(r,e))||d);return h>3&&d&&Object.defineProperty(r,e,d),d};const Rp=300,Py=Rp-1;let Nr=class{constructor(r,e){Be(this,"vars");Be(this,"opts");Be(this,"stepCount",0);Be(this,"stop",!1);Be(this,"scope");Be(this,"abortHandlers",[]);this.opts=e??{};const a={print:re(([h])=>{Vr(h),this.opts.out&&this.opts.out(h)}),readline:re(async h=>{const d=h[0];if(Qt(d),this.opts.in==null)return ct;const x=await this.opts.in(d.value);return $t(x)})};this.vars={...r,...Cy,...a},this.scope=new Pn([new Map(Object.entries(this.vars))]),this.scope.opts.log=(h,d)=>{switch(h){case"add":this.log("var:add",d);break;case"read":this.log("var:read",d);break;case"write":this.log("var:write",d);break}}}async exec(r){if(r==null||r.length===0)return;await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}async execFn(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(h){switch(h.type){case"arr":return h.value.map(d=>e(d));case"bool":return h.value;case"null":return null;case"num":return h.value;case"obj":{const d={};for(const[x,$]of h.value.entries())d[x]=e($);return d}case"str":return h.value;default:return}}const a=new Map;for(const h of r)switch(h.type){case"meta":{a.set(h.name,e(h.value));break}}return a}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const a of r.members)switch(a.type){case"def":{const h=await this._eval(a.expr,e);e.add(a.name,h),this.scope.add(r.name+":"+a.name,h);break}case"ns":break;default:throw new Error("invalid ns member type: "+a.type)}}async _fn(r,e){if(r.native)return r.native(e,{call:this._fn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??ct;{const a=new Map;for(let d=0;d<(r.args??[]).length;d++)a.set(r.args[d],e[d]);const h=r.scope.createChildScope(a);return $y(await this._run(r.statements,h))}}async _eval(r,e){if(this.stop)return ct;if(this.stepCount%Rp===Py&&await new Promise(a=>setTimeout(a,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new bt("max step exceeded");switch(r.type){case"call":{const a=await this._eval(r.target,e);mn(a);const h=await Promise.all(r.args.map(d=>this._eval(d,e)));return this._fn(a,h)}case"if":{const a=await this._eval(r.cond,e);if(_r(a),a.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const h of r.elseif){const d=await this._eval(h.cond,e);if(_r(d),d.value)return this._eval(h.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return ct}case"match":{const a=await this._eval(r.about,e);for(const h of r.qs){const d=await this._eval(h.q,e);if(Tf(a,d))return await this._eval(h.a,e)}return r.default?await this._eval(r.default,e):ct}case"loop":{for(;;){const a=await this._run(r.statements,e.createChildScope());if(a.type==="break")break;if(a.type==="return")return a}return ct}case"for":{if(r.times){const a=await this._eval(r.times,e);ve(a);for(let h=0;h0){const h=[];for(const d of r.attr)h.push({name:d.name,value:await this._eval(d.value,e)});a.attr=h}return e.add(r.name,a),ct}case"identifier":return e.get(r.name);case"assign":{const a=await this._eval(r.expr,e);return await this.assign(e,r.dest,a),ct}case"addAssign":{const a=await this._eval(r.dest,e);ve(a);const h=await this._eval(r.expr,e);return ve(h),await this.assign(e,r.dest,me(a.value+h.value)),ct}case"subAssign":{const a=await this._eval(r.dest,e);ve(a);const h=await this._eval(r.expr,e);return ve(h),await this.assign(e,r.dest,me(a.value-h.value)),ct}case"null":return ct;case"bool":return da(r.value);case"num":return me(r.value);case"str":return $t(r.value);case"arr":return vr(await Promise.all(r.value.map(async a=>await this._eval(a,e))));case"obj":{const a=new Map;for(const h of r.value.keys())a.set(h,await this._eval(r.value.get(h),e));return bc(a)}case"prop":{const a=await this._eval(r.target,e);if(Ay(a))return a.value.has(r.name)?a.value.get(r.name):ct;if(by(a)){if(Object.hasOwn(aa.num,r.name))return aa.num[r.name](a);throw new bt(`No such prop (${r.name}) in ${a.type}.`)}else if(xy(a)){if(Object.hasOwn(aa.str,r.name))return aa.str[r.name](a);throw new bt(`No such prop (${r.name}) in ${a.type}.`)}else if(_y(a)){if(Object.hasOwn(aa.arr,r.name))return aa.arr[r.name](a);throw new bt(`No such prop (${r.name}) in ${a.type}.`)}else throw new bt(`Cannot read prop (${r.name}) of ${a.type}.`)}case"index":{const a=await this._eval(r.target,e);ya(a);const h=await this._eval(r.index,e);ve(h);const d=a.value[h.value];if(d===void 0)throw new fy(`Index out of range. index: ${h.value} max: ${a.value.length-1}`);return d}case"not":{const a=await this._eval(r.expr,e);return _r(a),da(!a.value)}case"fn":return dy(r.args.map(a=>a.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"tmpl":{let a="";for(const h of r.tmpl)if(typeof h=="string")a+=h;else{const d=await this._eval(h,e);let x="";d.type==="str"?x=d.value:d.type==="num"&&(x=d.value.toString()),a+=x}return $t(a)}case"return":{const a=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:a}),yy(a)}case"break":return this.log("block:break",{scope:e.name}),my();case"continue":return this.log("block:continue",{scope:e.name}),wy();case"ns":return ct;case"meta":return ct;case"and":{const a=await this._eval(r.left,e);if(_r(a),a.value){const h=await this._eval(r.right,e);return _r(h),h}else return a}case"or":{const a=await this._eval(r.left,e);if(_r(a),a.value)return a;{const h=await this._eval(r.right,e);return _r(h),h}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let a=ct;for(let h=0;he!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,a){if(e.type==="identifier")r.assign(e.name,a);else if(e.type==="index"){const h=await this._eval(e.target,r);ya(h);const d=await this._eval(e.index,r);ve(d),h.value[d.value]=a}else if(e.type==="prop"){const h=await this._eval(e.target,r);pn(h),h.value.set(e.name,a)}else throw new bt("The left-hand side of an assignment expression must be a variable or a property/index access.")}};Yr([Ke],Nr.prototype,"exec",null);Yr([Ke],Nr.prototype,"execFn",null);Yr([Ke],Nr.prototype,"log",null);Yr([Ke],Nr.prototype,"collectNs",null);Yr([Ke],Nr.prototype,"collectNsMember",null);Yr([Ke],Nr.prototype,"_fn",null);Yr([Ke],Nr.prototype,"_eval",null);Yr([Ke],Nr.prototype,"_run",null);Yr([Ke],Nr.prototype,"registerAbortHandler",null);Yr([Ke],Nr.prototype,"unregisterAbortHandler",null);Yr([Ke],Nr.prototype,"abort",null);Yr([Ke],Nr.prototype,"assign",null);Yr([Ke],Nr,"collectMetadata",null);function ky(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function wi(t,r,e,a){var h=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(h,wi.prototype),h.expected=r,h.found=e,h.location=a,h.name="SyntaxError",h}ky(wi,Error);function lf(t,r,e){return e=e||" ",t.length>r?t:(r-=t.length,e+=e.repeat(r),t+e.slice(0,r))}wi.prototype.format=function(t){var r="Error: "+this.message;if(this.location){var e=null,a;for(a=0;a `+x+` -`+A+` | -`+d.line+" | "+C+` -`+A+" | "+lf("",h.column-1," ")+lf("",S,"^")}else r+=` - at `+x}return r};wi.buildMessage=function(t,r){var e={literal:function(C){return'"'+h(C.text)+'"'},class:function(C){var k=C.parts.map(function(S){return Array.isArray(S)?d(S[0])+"-"+d(S[1]):d(S)});return"["+(C.inverted?"^":"")+k.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(C){return C.description}};function a(C){return C.charCodeAt(0).toString(16).toUpperCase()}function h(C){return C.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(k){return"\\x0"+a(k)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(k){return"\\x"+a(k)})}function d(C){return C.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(k){return"\\x0"+a(k)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(k){return"\\x"+a(k)})}function x(C){return e[C.type](C)}function $(C){var k=C.map(x),S,I;if(k.sort(),k.length>0){for(S=1,I=1;S=",Le="<",$r=">",_t="+",Jt="-",ft="*",Kt="^",cr="/",Yt="%",rr="!",Ct="[",R=".",B="if",Y="elif",se="else",le="match",ne="=>",xe="eval",ce="`",he='"',ie="'",Ee='\\"',Ce="\\'",Me="true",Ie="false",De="null",Ve=";",Qe="@",rt="@(",Ut=`\r -`,lt=/^[A-Z0-9_:]/i,hr=/^[^`{]/,ls=/^[{}`]/,Mr=/^[+\-]/,Et=/^[1-9]/,Ge=/^[0-9]/,sr=/^[A-Z_]/i,kn=/^[A-Z0-9_]/i,Fi=/^[\r\n]/,Ea=/^[ \t\r\n]/,Ma=/^[ \t]/,Nt=co(),Sr=X("//",!1),Sa=X("/*",!1),Ts=X("*/",!1),nr=X("(",!1),Mt=X(")",!1),Gr=X("::",!1),jt=X("{",!1),st=X("}",!1),pr=X("###",!1),Fr=X("let",!1),ot=X(":",!1),Rt=X("=",!1),Os=X("var",!1),Fa=X("<:",!1),Ta=X("#[",!1),os=X("]",!1),As=X("each",!1),at=X(",",!1),Dt=X("for",!1),qs=X("return",!1),zt=Pt([["A","Z"],["0","9"],"_",":"],!1,!0),Rr=X("loop",!1),Oa=X("break",!1),Ia=X("continue",!1),Na=X("+=",!1),ja=X("-=",!1),En=X("\\",!1),Ti=X("||",!1),Ra=X("&&",!1),Da=X("==",!1),La=X("!=",!1),Ha=X("<=",!1),Ua=X(">=",!1),Mn=X("<",!1),Ks=X(">",!1),Oi=X("+",!1),Ba=X("-",!1),Sn=X("*",!1),Ii=X("^",!1),za=X("/",!1),qa=X("%",!1),Ka=X("!",!1),Is=X("[",!1),us=X(".",!1),Fn=X("if",!1),Va=X("elif",!1),Wa=X("else",!1),Ja=X("match",!1),fs=X("=>",!1),Vs=X("eval",!1),cs=X("`",!1),Za=Pt(["`","{"],!0,!1),Ws=Pt(["{","}","`"],!1,!1),hs=X('"',!1),ps=X("'",!1),Js=X('\\"',!1),Zs=X("\\'",!1),gs=Pt(["+","-"],!1,!1),Tn=Pt([["1","9"]],!1,!1),wt=Pt([["0","9"]],!1,!1),Ni=X("true",!1),Tr=X("false",!1),Xa=X("null",!1),vs=X(";",!1),Ya=X("@",!1),_s=X("@(",!1),Qa=Pt([["A","Z"],"_"],!1,!0),Xs=Pt([["A","Z"],["0","9"],"_"],!1,!0),Ga=X(`\r -`,!1),ji=Pt(["\r",` -`],!1,!1),el=Pt([" "," ","\r",` -`],!1,!1),tl=Pt([" "," "],!1,!1),rl=function(n){return n.join("")},sl=function(){return T()},nl=function(){return T()},il=function(){return""},al=function(){return""},ll=function(n){return n??[]},On=function(n,o){return o},ol=function(n,o){return[n,...o]},Ys=function(n,o){return o},ul=function(n,o){return[n,...o]},Qs=function(n,o){return o},fl=function(n,o){return[n,...o]},Ri=function(n){return n},cl=function(n,o){return ee("ns",{name:n,members:o})},hl=function(n,o){return ee("meta",{name:n,value:o})},pl=function(n){return ee("meta",{name:null,value:n})},gl=function(n,o,g){return ee("def",{name:n,varType:o,expr:g,mut:!1,attr:[]})},vl=function(n,o,g){return ee("def",{name:n,varType:o,expr:g,mut:!0,attr:[]})},dl=function(n){return ee("identifier",{name:"print",chain:[ee("callChain",{args:[n]})]})},yl=function(n,o){return ee("attr",{name:n,value:o??ee("bool",{value:!0})})},ml=function(n,o,g){return ee("each",{var:n,items:o,for:g})},wl=function(n,o,g){return ee("each",{var:n,items:o,for:g})},$l=function(n,o){return o},xl=function(n,o,g,u){return ee("for",{var:n,from:o??ee("num",{value:0}),to:g,for:u})},bl=function(n,o){return o},Al=function(n,o,g,u){return ee("for",{var:n,from:o??ee("num",{value:0}),to:g,for:u})},_l=function(n,o){return ee("for",{times:n,for:o})},Cl=function(n,o){return ee("for",{times:n,for:o})},Pl=function(n){return ee("return",{expr:n})},kl=function(n){return ee("loop",{statements:n})},El=function(){return ee("break",{})},Ml=function(){return ee("continue",{})},Sl=function(n,o,g){return o==="+="?ee("addAssign",{dest:n,expr:g}):o==="-="?ee("subAssign",{dest:n,expr:g}):ee("assign",{dest:n,expr:g})},In=function(n,o,g){return{op:o,term:g}},Fl=function(n,o){return ee("infix",{operands:[n,...o.map(g=>g.term)],operators:o.map(g=>g.op)})},Di=function(){return T()},Tl=function(n){return ee("not",{expr:n})},Ol=function(n,o){return{...n,chain:o}},Il=function(n){return ee("callChain",{args:n??[]})},Nn=function(n,o){return o},Nl=function(n,o){return[n,...o]},Li=function(n){return ee("indexChain",{index:n})},jl=function(n){return ee("propChain",{name:n})},Rl=function(n,o,g,u){return ee("if",{cond:n,then:o,elseif:g??[],else:u})},Dl=function(n,o){return[n,...o]},Ll=function(n,o){return{cond:n,then:o}},Hl=function(n){return n},jn=function(n,o,g){return{q:o,a:g}},Ul=function(n,o,g){return ee("match",{about:n,qs:o??[],default:g})},Hi=function(n){return ee("block",{statements:n})},Bl=function(n){return ee("identifier",{name:n})},zl=function(n){return ee("tmpl",{tmpl:n})},ql=function(n){return n.join("")},Rn=function(n){return n},Kl=function(n){return ee("str",{value:n.join("")})},Dn=function(n){return n},Ui=function(n){return ee("str",{value:n.join("")})},Vl=function(){return'"'},Bi=function(){return"'"},Wl=function(){return ee("num",{value:parseFloat(T())})},Jl=function(){return ee("num",{value:parseFloat(T())})},Zl=function(){return ee("num",{value:parseInt(T(),10)})},Xl=function(){return ee("num",{value:parseInt(T(),10)})},Yl=function(){return ee("bool",{value:!0})},Ql=function(){return ee("bool",{value:!1})},Gl=function(){return ee("null",{})},Ln=function(n,o){return{k:n,v:o}},eo=function(n){const o=new Map;for(const g of n)o.set(g.k,g.v);return ee("obj",{value:o})},Hn=function(n){return n},zi=function(n){return ee("arr",{value:n})},to=function(n,o){return{name:n,argType:o}},qi=function(n,o){return[n,...o]},ro=function(n,o,g,u,i,l){return(n.length>0||g.length>0)&&Gs("Cannot use spaces before or after the function name."),ee("def",{name:o,expr:ee("fn",{args:u??[],retType:i},l??[]),mut:!1,attr:[]})},so=function(n,o,g){return ee("fn",{args:n??[],retType:o},g??[])},Un=function(n){return n},no=function(n){return ee("arr",{value:n})},Bn=function(n,o){return{k:n,v:o}},Ki=function(n){const o=new Map;for(const g of n)o.set(g.k,g.v);return ee("obj",{value:o})},io=function(n,o){return ee("fnTypeSource",{args:n??[],result:o})},Vi=function(n,o){return[n,...o]},ao=function(n,o){return ee("namedTypeSource",{name:n,inner:o})},lo=function(n){return ee("namedTypeSource",{name:n,inner:null})},oo=function(){return T()},uo=function(){return T()},fo=function(n){return ee("block",{statements:n??[]})},s=0,U=0,ds=[{line:1,column:1}],c=0,ae=[],b=0,E={},Dr;if("startRule"in r){if(!(r.startRule in h))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');d=h[r.startRule]}function T(){return t.substring(U,s)}function W(){return ys(U,s)}function Gs(n,o){throw o=o!==void 0?o:ys(U,s),Wi(n,o)}function X(n,o){return{type:"literal",text:n,ignoreCase:o}}function Pt(n,o,g){return{type:"class",parts:n,inverted:o,ignoreCase:g}}function co(){return{type:"any"}}function ke(){return{type:"end"}}function ir(n){var o=ds[n],g;if(o)return o;for(g=n-1;!ds[g];)g--;for(o=ds[g],o={line:o.line,column:o.column};gc&&(c=s,ae=[]),ae.push(n))}function Wi(n,o){return new wi(n,null,null,o)}function en(n,o,g){return new wi(wi.buildMessage(n,o),n,o,g)}function H(){var n,o,g,u=s*76+0,i=E[u];if(i)return s=i.nextPos,i.result;for(n=s,o=[],g=zn();g!==e;)o.push(g),g=zn();return U=n,o=rl(o),n=o,E[u]={nextPos:s,result:n},n}function zn(){var n,o,g=s*76+1,u=E[g];return u?(s=u.nextPos,u.result):(n=s,o=Wn(),o!==e&&(U=n,o=sl()),n=o,n===e&&(n=s,o=ks(),o!==e&&(U=n,o=nl()),n=o,n===e&&(n=ho(),n===e&&(t.length>s?(n=t.charAt(s),s++):(n=e,b===0&&P(Nt))))),E[g]={nextPos:s,result:n},n)}function ho(){var n,o,g,u,i,l,p=s*76+2,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,t.substr(s,2)===x?(o=x,s+=2):(o=e,b===0&&P(Sr)),o!==e){for(g=[],u=s,i=s,b++,l=ti(),b--,l===e?i=void 0:(s=i,i=e),i!==e?(t.length>s?(l=t.charAt(s),s++):(l=e,b===0&&P(Nt)),l!==e?(i=[i,l],u=i):(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,i=s,b++,l=ti(),b--,l===e?i=void 0:(s=i,i=e),i!==e?(t.length>s?(l=t.charAt(s),s++):(l=e,b===0&&P(Nt)),l!==e?(i=[i,l],u=i):(s=u,u=e)):(s=u,u=e);U=n,n=il()}else s=n,n=e;if(n===e)if(n=s,t.substr(s,2)===$?(o=$,s+=2):(o=e,b===0&&P(Sa)),o!==e){for(g=[],u=s,i=s,b++,t.substr(s,2)===A?(l=A,s+=2):(l=e,b===0&&P(Ts)),b--,l===e?i=void 0:(s=i,i=e),i!==e?(t.length>s?(l=t.charAt(s),s++):(l=e,b===0&&P(Nt)),l!==e?(i=[i,l],u=i):(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,i=s,b++,t.substr(s,2)===A?(l=A,s+=2):(l=e,b===0&&P(Ts)),b--,l===e?i=void 0:(s=i,i=e),i!==e?(t.length>s?(l=t.charAt(s),s++):(l=e,b===0&&P(Nt)),l!==e?(i=[i,l],u=i):(s=u,u=e)):(s=u,u=e);t.substr(s,2)===A?(u=A,s+=2):(u=e,b===0&&P(Ts)),u!==e?(U=n,n=al()):(s=n,n=e)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function Ji(){var n,o,g,u,i,l=s*76+3,p=E[l];if(p)return s=p.nextPos,p.result;for(n=s,o=[],g=m();g!==e;)o.push(g),g=m();for(g=Zi(),g===e&&(g=null),u=[],i=m();i!==e;)u.push(i),i=m();return U=n,n=ll(g),E[l]={nextPos:s,result:n},n}function Zi(){var n,o,g,u,i,l,p,f,y=s*76+4,v=E[y];if(v)return s=v.nextPos,v.result;if(n=s,o=Ns(),o!==e){for(g=[],u=s,i=[],l=be();l!==e;)i.push(l),l=be();if(l=We(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();f=Ns(),f!==e?(U=u,u=On(o,f)):(s=u,u=e)}else s=u,u=e;for(;u!==e;){for(g.push(u),u=s,i=[],l=be();l!==e;)i.push(l),l=be();if(l=We(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();f=Ns(),f!==e?(U=u,u=On(o,f)):(s=u,u=e)}else s=u,u=e}U=n,n=ol(o,g)}else s=n,n=e;return E[y]={nextPos:s,result:n},n}function po(){var n,o,g,u,i,l,p,f,y=s*76+5,v=E[y];if(v)return s=v.nextPos,v.result;if(n=s,o=js(),o!==e){for(g=[],u=s,i=[],l=be();l!==e;)i.push(l),l=be();if(l=We(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();f=js(),f!==e?(U=u,u=Ys(o,f)):(s=u,u=e)}else s=u,u=e;for(;u!==e;){for(g.push(u),u=s,i=[],l=be();l!==e;)i.push(l),l=be();if(l=We(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();f=js(),f!==e?(U=u,u=Ys(o,f)):(s=u,u=e)}else s=u,u=e}U=n,n=ul(o,g)}else s=n,n=e;return E[y]={nextPos:s,result:n},n}function Lr(){var n,o,g,u,i,l,p,f,y=s*76+6,v=E[y];if(v)return s=v.nextPos,v.result;if(n=s,o=ar(),o!==e){for(g=[],u=s,i=[],l=be();l!==e;)i.push(l),l=be();if(l=We(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();f=ar(),f!==e?(U=u,u=Qs(o,f)):(s=u,u=e)}else s=u,u=e;for(;u!==e;){for(g.push(u),u=s,i=[],l=be();l!==e;)i.push(l),l=be();if(l=We(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();f=ar(),f!==e?(U=u,u=Qs(o,f)):(s=u,u=e)}else s=u,u=e}U=n,n=fl(o,g)}else s=n,n=e;return E[y]={nextPos:s,result:n},n}function Ns(){var n,o=s*76+7,g=E[o];return g?(s=g.nextPos,g.result):(n=Cs(),n===e&&(n=Xi(),n===e&&(n=ar())),E[o]={nextPos:s,result:n},n)}function js(){var n,o=s*76+8,g=E[o];return g?(s=g.nextPos,g.result):(n=Ur(),n===e&&(n=Gn(),n===e&&(n=Cs())),E[o]={nextPos:s,result:n},n)}function ar(){var n,o=s*76+9,g=E[o];return g?(s=g.nextPos,g.result):(n=Ur(),n===e&&(n=Gn(),n===e&&(n=Yi(),n===e&&(n=yo(),n===e&&(n=go(),n===e&&(n=Qi(),n===e&&(n=vo(),n===e&&(n=mo(),n===e&&(n=wo(),n===e&&(n=$o(),n===e&&(n=xo(),n===e&&(n=Pe()))))))))))),E[o]={nextPos:s,result:n},n)}function Pe(){var n,o=s*76+10,g=E[o];return g?(s=g.nextPos,g.result):(n=bo(),n===e&&(n=Hr()),E[o]={nextPos:s,result:n},n)}function Hr(){var n,o=s*76+11,g=E[o];return g?(s=g.nextPos,g.result):(n=Co(),n===e&&(n=Fo(),n===e&&(n=es(),n===e&&(n=ms()))),E[o]={nextPos:s,result:n},n)}function ms(){var n,o,g,u,i,l,p=s*76+12,f=E[p];if(f)return s=f.nextPos,f.result;if(n=ko(),n===e&&(n=Vn(),n===e&&(n=Wn(),n===e&&(n=ks(),n===e&&(n=Xn(),n===e&&(n=an(),n===e&&(n=Qn(),n===e&&(n=sa(),n===e&&(n=So(),n===e&&(n=Ao(),n===e&&(n=Eo(),n===e)))))))))))if(n=s,t.charCodeAt(s)===40?(o=C,s++):(o=e,b===0&&P(nr)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(u=Pe(),u!==e){for(i=[],l=m();l!==e;)i.push(l),l=m();t.charCodeAt(s)===41?(l=k,s++):(l=e,b===0&&P(Mt)),l!==e?(U=n,n=Ri(u)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function Re(){var n,o=s*76+13,g=E[o];return g?(s=g.nextPos,g.result):(n=Xn(),n===e&&(n=ks(),n===e&&(n=an(),n===e&&(n=ei(),n===e&&(n=na(),n===e&&(n=Qn()))))),E[o]={nextPos:s,result:n},n)}function Cs(){var n,o,g,u,i,l,p,f,y,v,_=s*76+14,w=E[_];if(w)return s=w.nextPos,w.result;if(n=s,t.substr(s,2)===S?(o=S,s+=2):(o=e,b===0&&P(Gr)),o!==e){if(g=[],u=m(),u!==e)for(;u!==e;)g.push(u),u=m();else g=e;if(g!==e)if(u=Oe(),u!==e){if(i=[],l=m(),l!==e)for(;l!==e;)i.push(l),l=m();else i=e;if(i!==e)if(t.charCodeAt(s)===123?(l=I,s++):(l=e,b===0&&P(jt)),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();for(f=po(),f===e&&(f=null),y=[],v=m();v!==e;)y.push(v),v=m();t.charCodeAt(s)===125?(v=q,s++):(v=e,b===0&&P(st)),v!==e?(U=n,n=cl(u,f)):(s=n,n=e)}else s=n,n=e;else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;return E[_]={nextPos:s,result:n},n}function Xi(){var n,o,g,u,i,l,p=s*76+15,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,t.substr(s,3)===ue?(o=ue,s+=3):(o=e,b===0&&P(pr)),o!==e){for(g=[],u=be();u!==e;)g.push(u),u=be();if(u=Oe(),u!==e){for(i=[],l=m();l!==e;)i.push(l),l=m();l=Re(),l!==e?(U=n,n=hl(u,l)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;if(n===e)if(n=s,t.substr(s,3)===ue?(o=ue,s+=3):(o=e,b===0&&P(pr)),o!==e){for(g=[],u=be();u!==e;)g.push(u),u=be();u=Re(),u!==e?(U=n,n=pl(u)):(s=n,n=e)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function Ur(){var n,o,g,u,i,l,p,f,y,v=s*76+16,_=E[v];if(_)return s=_.nextPos,_.result;if(n=s,t.substr(s,3)===Q?(o=Q,s+=3):(o=e,b===0&&P(Fr)),o!==e){if(g=[],u=m(),u!==e)for(;u!==e;)g.push(u),u=m();else g=e;if(g!==e)if(u=Oe(),u!==e){for(i=s,l=[],p=m();p!==e;)l.push(p),p=m();if(t.charCodeAt(s)===58?(p=oe,s++):(p=e,b===0&&P(ot)),p!==e){for(f=[],y=m();y!==e;)f.push(y),y=m();y=St(),y!==e?i=y:(s=i,i=e)}else s=i,i=e;for(i===e&&(i=null),l=[],p=m();p!==e;)l.push(p),p=m();if(t.charCodeAt(s)===61?(p=$e,s++):(p=e,b===0&&P(Rt)),p!==e){for(f=[],y=m();y!==e;)f.push(y),y=m();y=Pe(),y!==e?(U=n,n=gl(u,i,y)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;if(n===e)if(n=s,t.substr(s,3)===j?(o=j,s+=3):(o=e,b===0&&P(Os)),o!==e){if(g=[],u=m(),u!==e)for(;u!==e;)g.push(u),u=m();else g=e;if(g!==e)if(u=Oe(),u!==e){for(i=s,l=[],p=m();p!==e;)l.push(p),p=m();if(t.charCodeAt(s)===58?(p=oe,s++):(p=e,b===0&&P(ot)),p!==e){for(f=[],y=m();y!==e;)f.push(y),y=m();y=St(),y!==e?i=y:(s=i,i=e)}else s=i,i=e;for(i===e&&(i=null),l=[],p=m();p!==e;)l.push(p),p=m();if(t.charCodeAt(s)===61?(p=$e,s++):(p=e,b===0&&P(Rt)),p!==e){for(f=[],y=m();y!==e;)f.push(y),y=m();y=Pe(),y!==e?(U=n,n=vl(u,i,y)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;return E[v]={nextPos:s,result:n},n}function Yi(){var n,o,g,u,i=s*76+17,l=E[i];if(l)return s=l.nextPos,l.result;if(n=s,t.substr(s,2)===O?(o=O,s+=2):(o=e,b===0&&P(Fa)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();u=Pe(),u!==e?(U=n,n=dl(u)):(s=n,n=e)}else s=n,n=e;return E[i]={nextPos:s,result:n},n}function go(){var n,o,g,u,i,l,p,f=s*76+18,y=E[f];if(y)return s=y.nextPos,y.result;if(n=s,t.substr(s,2)===N?(o=N,s+=2):(o=e,b===0&&P(Ta)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(u=Oe(),u!==e){for(i=s,l=[],p=m();p!==e;)l.push(p),p=m();for(p=Re(),p!==e?i=p:(s=i,i=e),i===e&&(i=null),l=[],p=m();p!==e;)l.push(p),p=m();t.charCodeAt(s)===93?(p=L,s++):(p=e,b===0&&P(os)),p!==e?(U=n,n=yl(u,i)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;return E[f]={nextPos:s,result:n},n}function Qi(){var n,o,g,u,i,l,p,f,y,v,_,w,M,F,D=s*76+19,V=E[D];if(V)return s=V.nextPos,V.result;if(n=s,t.substr(s,4)===z?(o=z,s+=4):(o=e,b===0&&P(As)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(t.charCodeAt(s)===40?(u=C,s++):(u=e,b===0&&P(nr)),u!==e)if(t.substr(s,3)===Q?(i=Q,s+=3):(i=e,b===0&&P(Fr)),i!==e){if(l=[],p=m(),p!==e)for(;p!==e;)l.push(p),p=m();else l=e;if(l!==e)if(p=Oe(),p!==e){for(f=[],y=m();y!==e;)f.push(y),y=m();for(t.charCodeAt(s)===44?(y=K,s++):(y=e,b===0&&P(at)),y===e&&(y=null),v=[],_=m();_!==e;)v.push(_),_=m();if(_=Pe(),_!==e)if(t.charCodeAt(s)===41?(w=k,s++):(w=e,b===0&&P(Mt)),w!==e){for(M=[],F=m();F!==e;)M.push(F),F=m();F=vt(),F!==e?(U=n,n=ml(p,_,F)):(s=n,n=e)}else s=n,n=e;else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;if(n===e)if(n=s,t.substr(s,4)===z?(o=z,s+=4):(o=e,b===0&&P(As)),o!==e){if(g=[],u=m(),u!==e)for(;u!==e;)g.push(u),u=m();else g=e;if(g!==e)if(t.substr(s,3)===Q?(u=Q,s+=3):(u=e,b===0&&P(Fr)),u!==e){if(i=[],l=m(),l!==e)for(;l!==e;)i.push(l),l=m();else i=e;if(i!==e)if(l=Oe(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();for(t.charCodeAt(s)===44?(f=K,s++):(f=e,b===0&&P(at)),f===e&&(f=null),y=[],v=m();v!==e;)y.push(v),v=m();if(v=Pe(),v!==e){if(_=[],w=m(),w!==e)for(;w!==e;)_.push(w),w=m();else _=e;_!==e?(w=vt(),w!==e?(U=n,n=wl(l,v,w)):(s=n,n=e)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;return E[D]={nextPos:s,result:n},n}function vo(){var n,o,g,u,i,l,p,f,y,v,_,w,M,F,D,V=s*76+20,G=E[V];if(G)return s=G.nextPos,G.result;if(n=s,t.substr(s,3)===J?(o=J,s+=3):(o=e,b===0&&P(Dt)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(t.charCodeAt(s)===40?(u=C,s++):(u=e,b===0&&P(nr)),u!==e)if(t.substr(s,3)===Q?(i=Q,s+=3):(i=e,b===0&&P(Fr)),i!==e){if(l=[],p=m(),p!==e)for(;p!==e;)l.push(p),p=m();else l=e;if(l!==e)if(p=Oe(),p!==e){for(f=[],y=m();y!==e;)f.push(y),y=m();if(y=s,t.charCodeAt(s)===61?(v=$e,s++):(v=e,b===0&&P(Rt)),v!==e){for(_=[],w=m();w!==e;)_.push(w),w=m();w=Pe(),w!==e?(U=y,y=$l(p,w)):(s=y,y=e)}else s=y,y=e;for(y===e&&(y=null),t.charCodeAt(s)===44?(v=K,s++):(v=e,b===0&&P(at)),v===e&&(v=null),_=[],w=m();w!==e;)_.push(w),w=m();if(w=Pe(),w!==e)if(t.charCodeAt(s)===41?(M=k,s++):(M=e,b===0&&P(Mt)),M!==e){for(F=[],D=m();D!==e;)F.push(D),D=m();D=vt(),D!==e?(U=n,n=xl(p,y,w,D)):(s=n,n=e)}else s=n,n=e;else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;if(n===e){if(n=s,t.substr(s,3)===J?(o=J,s+=3):(o=e,b===0&&P(Dt)),o!==e){if(g=[],u=m(),u!==e)for(;u!==e;)g.push(u),u=m();else g=e;if(g!==e)if(t.substr(s,3)===Q?(u=Q,s+=3):(u=e,b===0&&P(Fr)),u!==e){if(i=[],l=m(),l!==e)for(;l!==e;)i.push(l),l=m();else i=e;if(i!==e)if(l=Oe(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();if(f=s,t.charCodeAt(s)===61?(y=$e,s++):(y=e,b===0&&P(Rt)),y!==e){for(v=[],_=m();_!==e;)v.push(_),_=m();_=Pe(),_!==e?(U=f,f=bl(l,_)):(s=f,f=e)}else s=f,f=e;for(f===e&&(f=null),t.charCodeAt(s)===44?(y=K,s++):(y=e,b===0&&P(at)),y===e&&(y=null),v=[],_=m();_!==e;)v.push(_),_=m();if(_=Pe(),_!==e){if(w=[],M=m(),M!==e)for(;M!==e;)w.push(M),M=m();else w=e;w!==e?(M=vt(),M!==e?(U=n,n=Al(l,f,_,M)):(s=n,n=e)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;if(n===e){if(n=s,t.substr(s,3)===J?(o=J,s+=3):(o=e,b===0&&P(Dt)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(t.charCodeAt(s)===40?(u=C,s++):(u=e,b===0&&P(nr)),u!==e)if(i=Pe(),i!==e)if(t.charCodeAt(s)===41?(l=k,s++):(l=e,b===0&&P(Mt)),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();f=vt(),f!==e?(U=n,n=_l(i,f)):(s=n,n=e)}else s=n,n=e;else s=n,n=e;else s=n,n=e}else s=n,n=e;if(n===e)if(n=s,t.substr(s,3)===J?(o=J,s+=3):(o=e,b===0&&P(Dt)),o!==e){if(g=[],u=m(),u!==e)for(;u!==e;)g.push(u),u=m();else g=e;if(g!==e)if(u=Pe(),u!==e){if(i=[],l=m(),l!==e)for(;l!==e;)i.push(l),l=m();else i=e;i!==e?(l=vt(),l!==e?(U=n,n=Cl(u,l)):(s=n,n=e)):(s=n,n=e)}else s=n,n=e;else s=n,n=e}else s=n,n=e}}return E[V]={nextPos:s,result:n},n}function yo(){var n,o,g,u,i,l=s*76+21,p=E[l];if(p)return s=p.nextPos,p.result;if(n=s,t.substr(s,6)===Z?(o=Z,s+=6):(o=e,b===0&&P(qs)),o!==e)if(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e){for(u=[],i=m();i!==e;)u.push(i),i=m();i=Pe(),i!==e?(U=n,n=Pl(i)):(s=n,n=e)}else s=n,n=e;else s=n,n=e;return E[l]={nextPos:s,result:n},n}function mo(){var n,o,g,u,i,l,p,f,y=s*76+22,v=E[y];if(v)return s=v.nextPos,v.result;if(n=s,t.substr(s,4)===pe?(o=pe,s+=4):(o=e,b===0&&P(Rr)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(t.charCodeAt(s)===123?(u=I,s++):(u=e,b===0&&P(jt)),u!==e){for(i=[],l=m();l!==e;)i.push(l),l=m();if(l=Lr(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();t.charCodeAt(s)===125?(f=q,s++):(f=e,b===0&&P(st)),f!==e?(U=n,n=kl(l)):(s=n,n=e)}else s=n,n=e}else s=n,n=e}else s=n,n=e;return E[y]={nextPos:s,result:n},n}function wo(){var n,o,g,u,i=s*76+23,l=E[i];return l?(s=l.nextPos,l.result):(n=s,t.substr(s,5)===we?(o=we,s+=5):(o=e,b===0&&P(Oa)),o!==e?(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e?(U=n,n=El()):(s=n,n=e)):(s=n,n=e),E[i]={nextPos:s,result:n},n)}function $o(){var n,o,g,u,i=s*76+24,l=E[i];return l?(s=l.nextPos,l.result):(n=s,t.substr(s,8)===fe?(o=fe,s+=8):(o=e,b===0&&P(Ia)),o!==e?(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e?(U=n,n=Ml()):(s=n,n=e)):(s=n,n=e),E[i]={nextPos:s,result:n},n)}function xo(){var n,o,g,u,i,l,p=s*76+25,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,o=Pe(),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(t.substr(s,2)===Fe?(u=Fe,s+=2):(u=e,b===0&&P(Na)),u===e&&(t.substr(s,2)===Ze?(u=Ze,s+=2):(u=e,b===0&&P(ja)),u===e&&(t.charCodeAt(s)===61?(u=$e,s++):(u=e,b===0&&P(Rt)))),u!==e){for(i=[],l=m();l!==e;)i.push(l),l=m();l=Pe(),l!==e?(U=n,n=Sl(o,u,l)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function bo(){var n,o,g,u,i,l,p,f,y=s*76+26,v=E[y];if(v)return s=v.nextPos,v.result;if(n=s,o=Hr(),o!==e){for(g=[],u=s,i=[],l=Zt();l!==e;)i.push(l),l=Zt();if(l=qn(),l!==e){for(p=[],f=Zt();f!==e;)p.push(f),f=Zt();f=Hr(),f!==e?(U=u,u=In(o,l,f)):(s=u,u=e)}else s=u,u=e;if(u!==e)for(;u!==e;){for(g.push(u),u=s,i=[],l=Zt();l!==e;)i.push(l),l=Zt();if(l=qn(),l!==e){for(p=[],f=Zt();f!==e;)p.push(f),f=Zt();f=Hr(),f!==e?(U=u,u=In(o,l,f)):(s=u,u=e)}else s=u,u=e}else g=e;g!==e?(U=n,n=Fl(o,g)):(s=n,n=e)}else s=n,n=e;return E[y]={nextPos:s,result:n},n}function Zt(){var n,o,g,u=s*76+27,i=E[u];return i?(s=i.nextPos,i.result):(n=s,t.charCodeAt(s)===92?(o=It,s++):(o=e,b===0&&P(En)),o!==e?(g=We(),g!==e?(o=[o,g],n=o):(s=n,n=e)):(s=n,n=e),n===e&&(n=be()),E[u]={nextPos:s,result:n},n)}function qn(){var n,o,g=s*76+28,u=E[g];return u?(s=u.nextPos,u.result):(n=s,t.substr(s,2)===Xe?(o=Xe,s+=2):(o=e,b===0&&P(Ti)),o===e&&(t.substr(s,2)===Ye?(o=Ye,s+=2):(o=e,b===0&&P(Ra)),o===e&&(t.substr(s,2)===_e?(o=_e,s+=2):(o=e,b===0&&P(Da)),o===e&&(t.substr(s,2)===Je?(o=Je,s+=2):(o=e,b===0&&P(La)),o===e&&(t.substr(s,2)===gt?(o=gt,s+=2):(o=e,b===0&&P(Ha)),o===e&&(t.substr(s,2)===mt?(o=mt,s+=2):(o=e,b===0&&P(Ua)),o===e&&(t.charCodeAt(s)===60?(o=Le,s++):(o=e,b===0&&P(Mn)),o===e&&(t.charCodeAt(s)===62?(o=$r,s++):(o=e,b===0&&P(Ks)),o===e&&(t.charCodeAt(s)===43?(o=_t,s++):(o=e,b===0&&P(Oi)),o===e&&(t.charCodeAt(s)===45?(o=Jt,s++):(o=e,b===0&&P(Ba)),o===e&&(t.charCodeAt(s)===42?(o=ft,s++):(o=e,b===0&&P(Sn)),o===e&&(t.charCodeAt(s)===94?(o=Kt,s++):(o=e,b===0&&P(Ii)),o===e&&(t.charCodeAt(s)===47?(o=cr,s++):(o=e,b===0&&P(za)),o===e&&(t.charCodeAt(s)===37?(o=Yt,s++):(o=e,b===0&&P(qa))))))))))))))),o!==e&&(U=n,o=Di()),n=o,E[g]={nextPos:s,result:n},n)}function Ao(){var n,o,g,u=s*76+29,i=E[u];return i?(s=i.nextPos,i.result):(n=s,t.charCodeAt(s)===33?(o=rr,s++):(o=e,b===0&&P(Ka)),o!==e?(g=Pe(),g!==e?(U=n,n=Tl(g)):(s=n,n=e)):(s=n,n=e),E[u]={nextPos:s,result:n},n)}function es(){var n,o,g,u,i=s*76+30,l=E[i];if(l)return s=l.nextPos,l.result;if(n=s,o=ms(),o!==e){if(g=[],u=tn(),u===e&&(u=Kn(),u===e&&(u=rn())),u!==e)for(;u!==e;)g.push(u),u=tn(),u===e&&(u=Kn(),u===e&&(u=rn()));else g=e;g!==e?(U=n,n=Ol(o,g)):(s=n,n=e)}else s=n,n=e;return E[i]={nextPos:s,result:n},n}function tn(){var n,o,g,u,i,l,p=s*76+31,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,t.charCodeAt(s)===40?(o=C,s++):(o=e,b===0&&P(nr)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();for(u=_o(),u===e&&(u=null),i=[],l=m();l!==e;)i.push(l),l=m();t.charCodeAt(s)===41?(l=k,s++):(l=e,b===0&&P(Mt)),l!==e?(U=n,n=Il(u)):(s=n,n=e)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function _o(){var n,o,g,u,i,l,p=s*76+32,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,o=Pe(),o!==e){for(g=[],u=s,i=xr(),i!==e?(l=Pe(),l!==e?(U=u,u=Nn(o,l)):(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,i=xr(),i!==e?(l=Pe(),l!==e?(U=u,u=Nn(o,l)):(s=u,u=e)):(s=u,u=e);U=n,n=Nl(o,g)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function Kn(){var n,o,g,u,i,l,p=s*76+33,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,t.charCodeAt(s)===91?(o=Ct,s++):(o=e,b===0&&P(Is)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(u=Pe(),u!==e){for(i=[],l=m();l!==e;)i.push(l),l=m();t.charCodeAt(s)===93?(l=L,s++):(l=e,b===0&&P(os)),l!==e?(U=n,n=Li(u)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function rn(){var n,o,g,u=s*76+34,i=E[u];return i?(s=i.nextPos,i.result):(n=s,t.charCodeAt(s)===46?(o=R,s++):(o=e,b===0&&P(us)),o!==e?(g=Oe(),g!==e?(U=n,n=jl(g)):(s=n,n=e)):(s=n,n=e),E[u]={nextPos:s,result:n},n)}function Co(){var n,o,g,u,i,l,p,f,y,v,_=s*76+35,w=E[_];if(w)return s=w.nextPos,w.result;if(n=s,t.substr(s,2)===B?(o=B,s+=2):(o=e,b===0&&P(Fn)),o!==e){if(g=[],u=m(),u!==e)for(;u!==e;)g.push(u),u=m();else g=e;if(g!==e)if(u=Pe(),u!==e){if(i=[],l=m(),l!==e)for(;l!==e;)i.push(l),l=m();else i=e;if(i!==e)if(l=vt(),l!==e){if(p=s,f=[],y=m(),y!==e)for(;y!==e;)f.push(y),y=m();else f=e;if(f!==e?(y=Gi(),y!==e?p=y:(s=p,p=e)):(s=p,p=e),p===e&&(p=null),f=s,y=[],v=m(),v!==e)for(;v!==e;)y.push(v),v=m();else y=e;y!==e?(v=Po(),v!==e?f=v:(s=f,f=e)):(s=f,f=e),f===e&&(f=null),U=n,n=Rl(u,l,p,f)}else s=n,n=e;else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;return E[_]={nextPos:s,result:n},n}function Gi(){var n,o,g,u,i,l,p=s*76+36,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,o=Ps(),o!==e){for(g=[],u=s,i=[],l=m();l!==e;)i.push(l),l=m();for(l=Ps(),l!==e?u=l:(s=u,u=e);u!==e;){for(g.push(u),u=s,i=[],l=m();l!==e;)i.push(l),l=m();l=Ps(),l!==e?u=l:(s=u,u=e)}U=n,n=Dl(o,g)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function Ps(){var n,o,g,u,i,l,p,f=s*76+37,y=E[f];if(y)return s=y.nextPos,y.result;if(n=s,t.substr(s,4)===Y?(o=Y,s+=4):(o=e,b===0&&P(Va)),o!==e)if(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e){for(u=[],i=m();i!==e;)u.push(i),i=m();if(i=Pe(),i!==e){for(l=[],p=m();p!==e;)l.push(p),p=m();p=vt(),p!==e?(U=n,n=Ll(i,p)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;else s=n,n=e;return E[f]={nextPos:s,result:n},n}function Po(){var n,o,g,u,i,l=s*76+38,p=E[l];if(p)return s=p.nextPos,p.result;if(n=s,t.substr(s,4)===se?(o=se,s+=4):(o=e,b===0&&P(Wa)),o!==e)if(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e){for(u=[],i=m();i!==e;)u.push(i),i=m();i=vt(),i!==e?(U=n,n=Hl(i)):(s=n,n=e)}else s=n,n=e;else s=n,n=e;return E[l]={nextPos:s,result:n},n}function ko(){var n,o,g,u,i,l,p,f,y,v,_,w,M,F,D,V,G,Te=s*76+39,Ae=E[Te];if(Ae)return s=Ae.nextPos,Ae.result;if(n=s,t.substr(s,5)===le?(o=le,s+=5):(o=e,b===0&&P(Ja)),o!==e)if(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e){for(u=[],i=m();i!==e;)u.push(i),i=m();if(i=Pe(),i!==e){for(l=[],p=m();p!==e;)l.push(p),p=m();if(t.charCodeAt(s)===123?(p=I,s++):(p=e,b===0&&P(jt)),p!==e){for(f=[],y=m();y!==e;)f.push(y),y=m();if(y=[],v=s,_=Pe(),_!==e){for(w=[],M=m();M!==e;)w.push(M),M=m();if(t.substr(s,2)===ne?(M=ne,s+=2):(M=e,b===0&&P(fs)),M!==e){for(F=[],D=m();D!==e;)F.push(D),D=m();if(D=vt(),D!==e){for(V=[],G=m();G!==e;)V.push(G),G=m();U=v,v=jn(i,_,D)}else s=v,v=e}else s=v,v=e}else s=v,v=e;if(v!==e)for(;v!==e;)if(y.push(v),v=s,_=Pe(),_!==e){for(w=[],M=m();M!==e;)w.push(M),M=m();if(t.substr(s,2)===ne?(M=ne,s+=2):(M=e,b===0&&P(fs)),M!==e){for(F=[],D=m();D!==e;)F.push(D),D=m();if(D=vt(),D!==e){for(V=[],G=m();G!==e;)V.push(G),G=m();U=v,v=jn(i,_,D)}else s=v,v=e}else s=v,v=e}else s=v,v=e;else y=e;if(y!==e){if(v=s,t.charCodeAt(s)===42?(_=ft,s++):(_=e,b===0&&P(Sn)),_!==e){for(w=[],M=m();M!==e;)w.push(M),M=m();if(t.substr(s,2)===ne?(M=ne,s+=2):(M=e,b===0&&P(fs)),M!==e){for(F=[],D=m();D!==e;)F.push(D),D=m();if(D=vt(),D!==e){for(V=[],G=m();G!==e;)V.push(G),G=m();v=D}else s=v,v=e}else s=v,v=e}else s=v,v=e;for(v===e&&(v=null),_=[],w=m();w!==e;)_.push(w),w=m();t.charCodeAt(s)===125?(w=q,s++):(w=e,b===0&&P(st)),w!==e?(U=n,n=Ul(i,y,v)):(s=n,n=e)}else s=n,n=e}else s=n,n=e}else s=n,n=e}else s=n,n=e;else s=n,n=e;return E[Te]={nextPos:s,result:n},n}function Vn(){var n,o,g,u,i,l,p,f,y=s*76+40,v=E[y];if(v)return s=v.nextPos,v.result;if(n=s,t.substr(s,4)===xe?(o=xe,s+=4):(o=e,b===0&&P(Vs)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(t.charCodeAt(s)===123?(u=I,s++):(u=e,b===0&&P(jt)),u!==e){for(i=[],l=m();l!==e;)i.push(l),l=m();if(l=Lr(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();t.charCodeAt(s)===125?(f=q,s++):(f=e,b===0&&P(st)),f!==e?(U=n,n=Hi(l)):(s=n,n=e)}else s=n,n=e}else s=n,n=e}else s=n,n=e;return E[y]={nextPos:s,result:n},n}function Eo(){var n,o,g=s*76+41,u=E[g];return u?(s=u.nextPos,u.result):(n=s,o=No(),o!==e&&(U=n,o=Bl(o)),n=o,E[g]={nextPos:s,result:n},n)}function Wn(){var n,o,g,u,i,l,p=s*76+42,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,t.charCodeAt(s)===96?(o=ce,s++):(o=e,b===0&&P(cs)),o!==e){for(g=[],u=s,i=s,b++,t.charCodeAt(s)===96?(l=ce,s++):(l=e,b===0&&P(cs)),b--,l===e?i=void 0:(s=i,i=e),i!==e?(l=Jn(),l!==e?u=l:(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,i=s,b++,t.charCodeAt(s)===96?(l=ce,s++):(l=e,b===0&&P(cs)),b--,l===e?i=void 0:(s=i,i=e),i!==e?(l=Jn(),l!==e?u=l:(s=u,u=e)):(s=u,u=e);t.charCodeAt(s)===96?(u=ce,s++):(u=e,b===0&&P(cs)),u!==e?(U=n,n=zl(g)):(s=n,n=e)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function Jn(){var n,o,g,u,i,l,p=s*76+43,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,t.charCodeAt(s)===123?(o=I,s++):(o=e,b===0&&P(jt)),o!==e){for(g=[],u=be();u!==e;)g.push(u),u=be();if(u=Pe(),u!==e){for(i=[],l=be();l!==e;)i.push(l),l=be();t.charCodeAt(s)===125?(l=q,s++):(l=e,b===0&&P(st)),l!==e?n=u:(s=n,n=e)}else s=n,n=e}else s=n,n=e;if(n===e){if(n=s,o=[],g=Zn(),g!==e)for(;g!==e;)o.push(g),g=Zn();else o=e;o!==e&&(U=n,o=ql(o)),n=o}return E[p]={nextPos:s,result:n},n}function Zn(){var n,o=s*76+44,g=E[o];return g?(s=g.nextPos,g.result):(n=ea(),n===e&&(hr.test(t.charAt(s))?(n=t.charAt(s),s++):(n=e,b===0&&P(Za))),E[o]={nextPos:s,result:n},n)}function ea(){var n,o,g,u=s*76+45,i=E[u];return i?(s=i.nextPos,i.result):(n=s,t.charCodeAt(s)===92?(o=It,s++):(o=e,b===0&&P(En)),o!==e?(ls.test(t.charAt(s))?(g=t.charAt(s),s++):(g=e,b===0&&P(Ws)),g!==e?n=g:(s=n,n=e)):(s=n,n=e),E[u]={nextPos:s,result:n},n)}function ks(){var n,o,g,u,i,l,p=s*76+46,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,t.charCodeAt(s)===34?(o=he,s++):(o=e,b===0&&P(hs)),o!==e){for(g=[],u=s,i=s,b++,t.charCodeAt(s)===34?(l=he,s++):(l=e,b===0&&P(hs)),b--,l===e?i=void 0:(s=i,i=e),i!==e?(l=sn(),l===e&&(t.length>s?(l=t.charAt(s),s++):(l=e,b===0&&P(Nt))),l!==e?(U=u,u=Rn(l)):(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,i=s,b++,t.charCodeAt(s)===34?(l=he,s++):(l=e,b===0&&P(hs)),b--,l===e?i=void 0:(s=i,i=e),i!==e?(l=sn(),l===e&&(t.length>s?(l=t.charAt(s),s++):(l=e,b===0&&P(Nt))),l!==e?(U=u,u=Rn(l)):(s=u,u=e)):(s=u,u=e);t.charCodeAt(s)===34?(u=he,s++):(u=e,b===0&&P(hs)),u!==e?(U=n,n=Kl(g)):(s=n,n=e)}else s=n,n=e;if(n===e)if(n=s,t.charCodeAt(s)===39?(o=ie,s++):(o=e,b===0&&P(ps)),o!==e){for(g=[],u=s,i=s,b++,t.charCodeAt(s)===39?(l=ie,s++):(l=e,b===0&&P(ps)),b--,l===e?i=void 0:(s=i,i=e),i!==e?(l=nn(),l===e&&(t.length>s?(l=t.charAt(s),s++):(l=e,b===0&&P(Nt))),l!==e?(U=u,u=Dn(l)):(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,i=s,b++,t.charCodeAt(s)===39?(l=ie,s++):(l=e,b===0&&P(ps)),b--,l===e?i=void 0:(s=i,i=e),i!==e?(l=nn(),l===e&&(t.length>s?(l=t.charAt(s),s++):(l=e,b===0&&P(Nt))),l!==e?(U=u,u=Dn(l)):(s=u,u=e)):(s=u,u=e);t.charCodeAt(s)===39?(u=ie,s++):(u=e,b===0&&P(ps)),u!==e?(U=n,n=Ui(g)):(s=n,n=e)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function sn(){var n,o,g=s*76+47,u=E[g];return u?(s=u.nextPos,u.result):(n=s,t.substr(s,2)===Ee?(o=Ee,s+=2):(o=e,b===0&&P(Js)),o!==e&&(U=n,o=Vl()),n=o,E[g]={nextPos:s,result:n},n)}function nn(){var n,o,g=s*76+48,u=E[g];return u?(s=u.nextPos,u.result):(n=s,t.substr(s,2)===Ce?(o=Ce,s+=2):(o=e,b===0&&P(Zs)),o!==e&&(U=n,o=Bi()),n=o,E[g]={nextPos:s,result:n},n)}function Xn(){var n,o=s*76+49,g=E[o];return g?(s=g.nextPos,g.result):(n=Yn(),n===e&&(n=ta()),E[o]={nextPos:s,result:n},n)}function Yn(){var n,o,g,u,i,l,p=s*76+50,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,Mr.test(t.charAt(s))?(t.charAt(s),s++):b===0&&P(gs),Et.test(t.charAt(s))?(o=t.charAt(s),s++):(o=e,b===0&&P(Tn)),o!==e){if(g=[],Ge.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(wt)),u!==e)for(;u!==e;)g.push(u),Ge.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(wt));else g=e;if(g!==e)if(t.charCodeAt(s)===46?(u=R,s++):(u=e,b===0&&P(us)),u!==e){if(i=[],Ge.test(t.charAt(s))?(l=t.charAt(s),s++):(l=e,b===0&&P(wt)),l!==e)for(;l!==e;)i.push(l),Ge.test(t.charAt(s))?(l=t.charAt(s),s++):(l=e,b===0&&P(wt));else i=e;i!==e?(U=n,n=Wl()):(s=n,n=e)}else s=n,n=e;else s=n,n=e}else s=n,n=e;if(n===e)if(n=s,Mr.test(t.charAt(s))?(t.charAt(s),s++):b===0&&P(gs),Ge.test(t.charAt(s))?(o=t.charAt(s),s++):(o=e,b===0&&P(wt)),o!==e)if(t.charCodeAt(s)===46?(g=R,s++):(g=e,b===0&&P(us)),g!==e){if(u=[],Ge.test(t.charAt(s))?(i=t.charAt(s),s++):(i=e,b===0&&P(wt)),i!==e)for(;i!==e;)u.push(i),Ge.test(t.charAt(s))?(i=t.charAt(s),s++):(i=e,b===0&&P(wt));else u=e;u!==e?(U=n,n=Jl()):(s=n,n=e)}else s=n,n=e;else s=n,n=e;return E[p]={nextPos:s,result:n},n}function ta(){var n,o,g,u,i=s*76+51,l=E[i];if(l)return s=l.nextPos,l.result;if(n=s,Mr.test(t.charAt(s))?(t.charAt(s),s++):b===0&&P(gs),Et.test(t.charAt(s))?(o=t.charAt(s),s++):(o=e,b===0&&P(Tn)),o!==e){if(g=[],Ge.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(wt)),u!==e)for(;u!==e;)g.push(u),Ge.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(wt));else g=e;g!==e?(U=n,n=Zl()):(s=n,n=e)}else s=n,n=e;return n===e&&(n=s,Mr.test(t.charAt(s))?(t.charAt(s),s++):b===0&&P(gs),Ge.test(t.charAt(s))?(o=t.charAt(s),s++):(o=e,b===0&&P(wt)),o!==e?(U=n,n=Xl()):(s=n,n=e)),E[i]={nextPos:s,result:n},n}function an(){var n,o=s*76+52,g=E[o];return g?(s=g.nextPos,g.result):(n=ra(),n===e&&(n=Mo()),E[o]={nextPos:s,result:n},n)}function ra(){var n,o,g,u,i=s*76+53,l=E[i];return l?(s=l.nextPos,l.result):(n=s,t.substr(s,4)===Me?(o=Me,s+=4):(o=e,b===0&&P(Ni)),o!==e?(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e?(U=n,n=Yl()):(s=n,n=e)):(s=n,n=e),E[i]={nextPos:s,result:n},n)}function Mo(){var n,o,g,u,i=s*76+54,l=E[i];return l?(s=l.nextPos,l.result):(n=s,t.substr(s,5)===Ie?(o=Ie,s+=5):(o=e,b===0&&P(Tr)),o!==e?(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e?(U=n,n=Ql()):(s=n,n=e)):(s=n,n=e),E[i]={nextPos:s,result:n},n)}function Qn(){var n,o,g,u,i=s*76+55,l=E[i];return l?(s=l.nextPos,l.result):(n=s,t.substr(s,4)===De?(o=De,s+=4):(o=e,b===0&&P(Xa)),o!==e?(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e?(U=n,n=Gl()):(s=n,n=e)):(s=n,n=e),E[i]={nextPos:s,result:n},n)}function sa(){var n,o,g,u,i,l,p,f,y,v,_,w,M,F,D=s*76+56,V=E[D];if(V)return s=V.nextPos,V.result;if(n=s,t.charCodeAt(s)===123?(o=I,s++):(o=e,b===0&&P(jt)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(u=[],i=s,l=Oe(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();if(t.charCodeAt(s)===58?(f=oe,s++):(f=e,b===0&&P(ot)),f!==e){if(y=[],v=m(),v!==e)for(;v!==e;)y.push(v),v=m();else y=e;if(y!==e)if(v=Pe(),v!==e){for(_=[],w=m();w!==e;)_.push(w),w=m();for(t.charCodeAt(s)===44?(w=K,s++):(w=e,b===0&&P(at)),w===e&&(t.charCodeAt(s)===59?(w=Ve,s++):(w=e,b===0&&P(vs))),w===e&&(w=null),M=[],F=m();F!==e;)M.push(F),F=m();U=i,i=Ln(l,v)}else s=i,i=e;else s=i,i=e}else s=i,i=e}else s=i,i=e;for(;i!==e;)if(u.push(i),i=s,l=Oe(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();if(t.charCodeAt(s)===58?(f=oe,s++):(f=e,b===0&&P(ot)),f!==e){if(y=[],v=m(),v!==e)for(;v!==e;)y.push(v),v=m();else y=e;if(y!==e)if(v=Pe(),v!==e){for(_=[],w=m();w!==e;)_.push(w),w=m();for(t.charCodeAt(s)===44?(w=K,s++):(w=e,b===0&&P(at)),w===e&&(t.charCodeAt(s)===59?(w=Ve,s++):(w=e,b===0&&P(vs))),w===e&&(w=null),M=[],F=m();F!==e;)M.push(F),F=m();U=i,i=Ln(l,v)}else s=i,i=e;else s=i,i=e}else s=i,i=e}else s=i,i=e;t.charCodeAt(s)===125?(i=q,s++):(i=e,b===0&&P(st)),i!==e?(U=n,n=eo(u)):(s=n,n=e)}else s=n,n=e;return E[D]={nextPos:s,result:n},n}function So(){var n,o,g,u,i,l,p,f,y,v,_=s*76+57,w=E[_];if(w)return s=w.nextPos,w.result;if(n=s,t.charCodeAt(s)===91?(o=Ct,s++):(o=e,b===0&&P(Is)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(u=[],i=s,l=Pe(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();for(t.charCodeAt(s)===44?(f=K,s++):(f=e,b===0&&P(at)),f===e&&(f=null),y=[],v=m();v!==e;)y.push(v),v=m();U=i,i=Hn(l)}else s=i,i=e;for(;i!==e;)if(u.push(i),i=s,l=Pe(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();for(t.charCodeAt(s)===44?(f=K,s++):(f=e,b===0&&P(at)),f===e&&(f=null),y=[],v=m();v!==e;)y.push(v),v=m();U=i,i=Hn(l)}else s=i,i=e;for(i=[],l=m();l!==e;)i.push(l),l=m();t.charCodeAt(s)===93?(l=L,s++):(l=e,b===0&&P(os)),l!==e?(U=n,n=zi(u)):(s=n,n=e)}else s=n,n=e;return E[_]={nextPos:s,result:n},n}function Rs(){var n,o,g,u,i,l,p,f=s*76+58,y=E[f];if(y)return s=y.nextPos,y.result;if(n=s,o=Oe(),o!==e){for(g=s,u=[],i=m();i!==e;)u.push(i),i=m();if(t.charCodeAt(s)===58?(i=oe,s++):(i=e,b===0&&P(ot)),i!==e){for(l=[],p=m();p!==e;)l.push(p),p=m();p=St(),p!==e?g=p:(s=g,g=e)}else s=g,g=e;g===e&&(g=null),U=n,n=to(o,g)}else s=n,n=e;return E[f]={nextPos:s,result:n},n}function ln(){var n,o,g,u,i,l,p=s*76+59,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,o=Rs(),o!==e){for(g=[],u=s,i=xr(),i!==e?(l=Rs(),l!==e?u=l:(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,i=xr(),i!==e?(l=Rs(),l!==e?u=l:(s=u,u=e)):(s=u,u=e);U=n,n=qi(o,g)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function Gn(){var n,o,g,u,i,l,p,f,y,v,_,w,M,F,D,V,G,Te=s*76+60,Ae=E[Te];if(Ae)return s=Ae.nextPos,Ae.result;if(n=s,t.charCodeAt(s)===64?(o=Qe,s++):(o=e,b===0&&P(Ya)),o!==e){for(g=[],u=be();u!==e;)g.push(u),u=be();if(u=Oe(),u!==e){for(i=[],l=be();l!==e;)i.push(l),l=be();if(t.charCodeAt(s)===40?(l=C,s++):(l=e,b===0&&P(nr)),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();for(f=ln(),f===e&&(f=null),y=[],v=m();v!==e;)y.push(v),v=m();if(t.charCodeAt(s)===41?(v=k,s++):(v=e,b===0&&P(Mt)),v!==e){for(_=s,w=[],M=m();M!==e;)w.push(M),M=m();if(t.charCodeAt(s)===58?(M=oe,s++):(M=e,b===0&&P(ot)),M!==e){for(F=[],D=m();D!==e;)F.push(D),D=m();D=St(),D!==e?_=D:(s=_,_=e)}else s=_,_=e;for(_===e&&(_=null),w=[],M=m();M!==e;)w.push(M),M=m();if(t.charCodeAt(s)===123?(M=I,s++):(M=e,b===0&&P(jt)),M!==e){for(F=[],D=m();D!==e;)F.push(D),D=m();for(D=Lr(),D===e&&(D=null),V=[],G=m();G!==e;)V.push(G),G=m();t.charCodeAt(s)===125?(G=q,s++):(G=e,b===0&&P(st)),G!==e?(U=n,n=ro(g,u,i,f,_,D)):(s=n,n=e)}else s=n,n=e}else s=n,n=e}else s=n,n=e}else s=n,n=e}else s=n,n=e;return E[Te]={nextPos:s,result:n},n}function Fo(){var n,o,g,u,i,l,p,f,y,v,_,w,M,F=s*76+61,D=E[F];if(D)return s=D.nextPos,D.result;if(n=s,t.substr(s,2)===rt?(o=rt,s+=2):(o=e,b===0&&P(_s)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();for(u=ln(),u===e&&(u=null),i=[],l=m();l!==e;)i.push(l),l=m();if(t.charCodeAt(s)===41?(l=k,s++):(l=e,b===0&&P(Mt)),l!==e){for(p=s,f=[],y=m();y!==e;)f.push(y),y=m();if(t.charCodeAt(s)===58?(y=oe,s++):(y=e,b===0&&P(ot)),y!==e){for(v=[],_=m();_!==e;)v.push(_),_=m();_=St(),_!==e?p=_:(s=p,p=e)}else s=p,p=e;for(p===e&&(p=null),f=[],y=m();y!==e;)f.push(y),y=m();if(t.charCodeAt(s)===123?(y=I,s++):(y=e,b===0&&P(jt)),y!==e){for(v=[],_=m();_!==e;)v.push(_),_=m();for(_=Lr(),_===e&&(_=null),w=[],M=m();M!==e;)w.push(M),M=m();t.charCodeAt(s)===125?(M=q,s++):(M=e,b===0&&P(st)),M!==e?(U=n,n=so(u,p,_)):(s=n,n=e)}else s=n,n=e}else s=n,n=e}else s=n,n=e;return E[F]={nextPos:s,result:n},n}function ei(){var n,o,g,u,i,l,p,f,y,v,_=s*76+62,w=E[_];if(w)return s=w.nextPos,w.result;if(n=s,t.charCodeAt(s)===91?(o=Ct,s++):(o=e,b===0&&P(Is)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(u=[],i=s,l=Re(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();for(t.charCodeAt(s)===44?(f=K,s++):(f=e,b===0&&P(at)),f===e&&(f=null),y=[],v=m();v!==e;)y.push(v),v=m();U=i,i=Un(l)}else s=i,i=e;for(;i!==e;)if(u.push(i),i=s,l=Re(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();for(t.charCodeAt(s)===44?(f=K,s++):(f=e,b===0&&P(at)),f===e&&(f=null),y=[],v=m();v!==e;)y.push(v),v=m();U=i,i=Un(l)}else s=i,i=e;for(i=[],l=m();l!==e;)i.push(l),l=m();t.charCodeAt(s)===93?(l=L,s++):(l=e,b===0&&P(os)),l!==e?(U=n,n=no(u)):(s=n,n=e)}else s=n,n=e;return E[_]={nextPos:s,result:n},n}function na(){var n,o,g,u,i,l,p,f,y,v,_,w,M,F,D=s*76+63,V=E[D];if(V)return s=V.nextPos,V.result;if(n=s,t.charCodeAt(s)===123?(o=I,s++):(o=e,b===0&&P(jt)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(u=[],i=s,l=Oe(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();if(t.charCodeAt(s)===58?(f=oe,s++):(f=e,b===0&&P(ot)),f!==e){if(y=[],v=m(),v!==e)for(;v!==e;)y.push(v),v=m();else y=e;if(y!==e)if(v=Re(),v!==e){for(_=[],w=m();w!==e;)_.push(w),w=m();for(t.charCodeAt(s)===44?(w=K,s++):(w=e,b===0&&P(at)),w===e&&(t.charCodeAt(s)===59?(w=Ve,s++):(w=e,b===0&&P(vs))),w===e&&(w=null),M=[],F=m();F!==e;)M.push(F),F=m();U=i,i=Bn(l,v)}else s=i,i=e;else s=i,i=e}else s=i,i=e}else s=i,i=e;for(;i!==e;)if(u.push(i),i=s,l=Oe(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();if(t.charCodeAt(s)===58?(f=oe,s++):(f=e,b===0&&P(ot)),f!==e){if(y=[],v=m(),v!==e)for(;v!==e;)y.push(v),v=m();else y=e;if(y!==e)if(v=Re(),v!==e){for(_=[],w=m();w!==e;)_.push(w),w=m();for(t.charCodeAt(s)===44?(w=K,s++):(w=e,b===0&&P(at)),w===e&&(t.charCodeAt(s)===59?(w=Ve,s++):(w=e,b===0&&P(vs))),w===e&&(w=null),M=[],F=m();F!==e;)M.push(F),F=m();U=i,i=Bn(l,v)}else s=i,i=e;else s=i,i=e}else s=i,i=e}else s=i,i=e;t.charCodeAt(s)===125?(i=q,s++):(i=e,b===0&&P(st)),i!==e?(U=n,n=Ki(u)):(s=n,n=e)}else s=n,n=e;return E[D]={nextPos:s,result:n},n}function St(){var n,o=s*76+64,g=E[o];return g?(s=g.nextPos,g.result):(n=To(),n===e&&(n=Io()),E[o]={nextPos:s,result:n},n)}function To(){var n,o,g,u,i,l,p,f,y,v,_=s*76+65,w=E[_];if(w)return s=w.nextPos,w.result;if(n=s,t.substr(s,2)===rt?(o=rt,s+=2):(o=e,b===0&&P(_s)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();for(u=Oo(),u===e&&(u=null),i=[],l=m();l!==e;)i.push(l),l=m();if(t.charCodeAt(s)===41?(l=k,s++):(l=e,b===0&&P(Mt)),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();if(t.substr(s,2)===ne?(f=ne,s+=2):(f=e,b===0&&P(fs)),f!==e){for(y=[],v=m();v!==e;)y.push(v),v=m();v=St(),v!==e?(U=n,n=io(u,v)):(s=n,n=e)}else s=n,n=e}else s=n,n=e}else s=n,n=e;return E[_]={nextPos:s,result:n},n}function Oo(){var n,o,g,u,i,l,p=s*76+66,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,o=St(),o!==e){for(g=[],u=s,i=xr(),i!==e?(l=St(),l!==e?u=l:(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,i=xr(),i!==e?(l=St(),l!==e?u=l:(s=u,u=e)):(s=u,u=e);U=n,n=Vi(o,g)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function Io(){var n,o,g,u,i,l,p,f,y=s*76+67,v=E[y];if(v)return s=v.nextPos,v.result;if(n=s,o=Oe(),o!==e){for(g=[],u=be();u!==e;)g.push(u),u=be();if(t.charCodeAt(s)===60?(u=Le,s++):(u=e,b===0&&P(Mn)),u!==e){for(i=[],l=be();l!==e;)i.push(l),l=be();if(l=St(),l!==e){for(p=[],f=be();f!==e;)p.push(f),f=be();t.charCodeAt(s)===62?(f=$r,s++):(f=e,b===0&&P(Ks)),f!==e?(U=n,n=ao(o,l)):(s=n,n=e)}else s=n,n=e}else s=n,n=e}else s=n,n=e;return n===e&&(n=s,o=Oe(),o!==e&&(U=n,o=lo(o)),n=o),E[y]={nextPos:s,result:n},n}function Oe(){var n,o,g,u,i=s*76+68,l=E[i];if(l)return s=l.nextPos,l.result;if(n=s,sr.test(t.charAt(s))?(o=t.charAt(s),s++):(o=e,b===0&&P(Qa)),o!==e){for(g=[],kn.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(Xs));u!==e;)g.push(u),kn.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(Xs));U=n,n=oo()}else s=n,n=e;return E[i]={nextPos:s,result:n},n}function No(){var n,o,g,u,i,l,p=s*76+69,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,o=Oe(),o!==e){for(g=[],u=s,t.charCodeAt(s)===58?(i=oe,s++):(i=e,b===0&&P(ot)),i!==e?(l=Oe(),l!==e?(i=[i,l],u=i):(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,t.charCodeAt(s)===58?(i=oe,s++):(i=e,b===0&&P(ot)),i!==e?(l=Oe(),l!==e?(i=[i,l],u=i):(s=u,u=e)):(s=u,u=e);U=n,n=uo()}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function xr(){var n,o,g,u,i,l=s*76+70,p=E[l];if(p)return s=p.nextPos,p.result;for(n=s,o=[],g=m();g!==e;)o.push(g),g=m();if(t.charCodeAt(s)===44?(g=K,s++):(g=e,b===0&&P(at)),g!==e){for(u=[],i=m();i!==e;)u.push(i),i=m();o=[o,g,u],n=o}else s=n,n=e;if(n===e)if(n=[],o=m(),o!==e)for(;o!==e;)n.push(o),o=m();else n=e;return E[l]={nextPos:s,result:n},n}function vt(){var n,o,g,u,i,l,p=s*76+71,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,t.charCodeAt(s)===123?(o=I,s++):(o=e,b===0&&P(jt)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();for(u=Lr(),u===e&&(u=null),i=[],l=m();l!==e;)i.push(l),l=m();t.charCodeAt(s)===125?(l=q,s++):(l=e,b===0&&P(st)),l!==e?(U=n,n=fo(u)):(s=n,n=e)}else s=n,n=e;return n===e&&(n=ar()),E[p]={nextPos:s,result:n},n}function We(){var n,o=s*76+72,g=E[o];return g?(s=g.nextPos,g.result):(t.substr(s,2)===Ut?(n=Ut,s+=2):(n=e,b===0&&P(Ga)),n===e&&(Fi.test(t.charAt(s))?(n=t.charAt(s),s++):(n=e,b===0&&P(ji))),E[o]={nextPos:s,result:n},n)}function ti(){var n,o,g=s*76+73,u=E[g];return u?(s=u.nextPos,u.result):(n=s,b++,t.length>s?(o=t.charAt(s),s++):(o=e,b===0&&P(Nt)),b--,o===e?n=void 0:(s=n,n=e),n===e&&(n=We()),E[g]={nextPos:s,result:n},n)}function m(){var n,o=s*76+74,g=E[o];return g?(s=g.nextPos,g.result):(Ea.test(t.charAt(s))?(n=t.charAt(s),s++):(n=e,b===0&&P(el)),E[o]={nextPos:s,result:n},n)}function be(){var n,o=s*76+75,g=E[o];return g?(s=g.nextPos,g.result):(Ma.test(t.charAt(s))?(n=t.charAt(s),s++):(n=e,b===0&&P(tl)),E[o]={nextPos:s,result:n},n)}function ee(n,o,g){const u={type:n};o.children=g;for(const l of Object.keys(o))o[l]!==void 0&&(u[l]=o[l]);const i=W();return u.loc={start:i.start.offset,end:i.end.offset-1},u}if(Dr=d(),Dr!==e&&s===t.length)return Dr;throw Dr!==e&&s`}else return t.name;case"fnTypeSource":{const r=t.args.map(a=>yu(a)).join(", "),e=yu(t.result);return`@(${r}) { ${e} }`}}}function ma(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return $h(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=ma(t.inner):r=$h("any"),Ny(t.name,[r])}}throw new Ai(`Unknown type: '${yu(t)}'`)}else{const r=t.args.map(e=>ma(e));return jy(r,ma(t.result))}}function Ry(t){switch(t.type){case"def":{t.varType!=null&&ma(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&ma(r.argType);t.retType!=null&&ma(t.retType);break}}return t}function Dy(t){for(const r of t)Ue(r,Ry);return t}function mu(t){const r=[],e=[];for(const a of t)if(a.type==="attr")e.push(a);else if(a.type==="def")a.attr==null&&(a.attr=[]),a.attr.push(...e),e.splice(0,e.length),a.expr.type==="fn"&&(a.expr.children=mu(a.expr.children)),r.push(a);else{if(e.length>0)throw new Ai("invalid attribute.");switch(a.type){case"fn":{a.children=mu(a.children);break}case"block":{a.statements=mu(a.statements);break}}r.push(a)}if(e.length>0)throw new Ai("invalid attribute.");return r}function Ly(t){if(My(t)&&Dp(t)&&t.chain!=null){const{chain:r,...e}=t;let a=e;for(const h of r)switch(h.type){case"callChain":{a=Sy(a,h.args,h.loc);break}case"indexChain":{a=Fy(a,h.index,h.loc);break}case"propChain":{a=Ty(a,h.name,h.loc);break}}return a}return t}function Hy(t){for(let r=0;r":{func:"Core:gt",priority:4},"<=":{func:"Core:lteq",priority:4},">=":{func:"Core:gteq",priority:4},"&&":{mapFn:t=>({type:"and",left:hi(t.left),right:hi(t.right)}),priority:3},"||":{mapFn:t=>({type:"or",left:hi(t.left),right:hi(t.right)}),priority:3}};function By(t){const r=t.operators.map(a=>{const h=Uy[a];if(h==null)throw new Ai(`No such operator: ${a}.`);return h});let e=wu(t.operands[0],t.operands[1],r[0]);for(let a=0;ae.type==="infix"?By(e):e);return t}var Hs;let qy=(Hs=class{constructor(){Be(this,"plugins");this.plugins={validate:[Iy,Dy],transform:[mu,Hy,zy]}}static parse(r){return Hs.instance==null&&(Hs.instance=new Hs),Hs.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;try{const a=wh(r,{startRule:"Preprocess"});e=wh(a,{startRule:"Main"})}catch(a){throw a.location?a.expected?new Ai(`Parsing error. (Line ${a.location.start.line}:${a.location.start.column})`):new Ai(`${a.message} (Line ${a.location.start.line}:${a.location.start.column})`):a}for(const a of this.plugins.validate)e=a(e);for(const a of this.plugins.transform)e=a(e);return e}},Be(Hs,"instance"),Hs);const xh="0.15.0",Ky={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { - <: if (i % 15 == 0) "FizzBuzz" - elif (i % 3 == 0) "Fizz" - elif (i % 5 == 0) "Buzz" - else i - }`},Vy=t=>(tc("data-v-2f3e9383"),t=t(),rc(),t),Wy={id:"root"},Jy={id:"grid1"},Zy={class:"type"},Xy={id:"grid2"},Yy=Vy(()=>Bt("header",null,null,-1)),Qy=Ci({__name:"index",setup(t){const r=Pr(window.localStorage.getItem(xh)??'<: "Hello, AiScript!"'),e=Pr(null),a=Pr([]),h=Pr(null);vi(r,()=>{window.localStorage.setItem(xh,r.value);try{e.value=qy.parse(r.value),h.value=null}catch($){const A=$;h.value=A.message,console.error("info"in A?A.info:A);return}},{immediate:!0});let d=null;const x=async()=>{a.value=[],d==null||d.abort(),d=new Nr({},{in:$=>new Promise(A=>{const C=window.prompt($);A(C??"")}),out:$=>{a.value.push({id:Math.random(),type:$.type,text:Of($,!0),print:!0})},log:($,A)=>{switch($){case"end":a.value.push({id:Math.random(),text:Of(A.val,!0),print:!1});break}}});try{await d.exec(e.value)}catch($){console.error($),window.alert("{e}")}};return($,A)=>(ut(),Lt("div",Wy,[Bt("div",Jy,[tt(xc,{modelValue:r.value,"onUpdate:modelValue":A[0]||(A[0]=C=>r.value=C),samples:Nu(Ky),parseError:h.value,onRun:x},null,8,["modelValue","samples","parseError"]),tt(Jr,{id:"logs"},{header:pt(()=>[qt("Output")]),default:pt(()=>[(ut(!0),Lt(er,null,Jo(a.value,C=>(ut(),Lt("div",{class:tr(["log",[{print:C.print},C.type]]),key:C.id},[Bt("span",Zy,Zr(C.type),1),qt(" "+Zr(C.text),1)],2))),128))]),_:1})]),Bt("div",Xy,[tt(Jr,{id:"ast"},{header:pt(()=>[qt("AST")]),default:pt(()=>[Bt("pre",null,Zr(JSON.stringify(e.value,null," ")),1)]),_:1}),tt(Jr,{id:"bin"},{header:pt(()=>[qt("Bytecode")]),default:pt(()=>[Yy]),_:1}),tt(Jr,{id:"debugger"},{header:pt(()=>[qt("Debugger")]),_:1})])]))}});const Gy=Pi(Qy,[["__scopeId","data-v-2f3e9383"]]);class Ku extends Error{constructor(e,a){super(e);Be(this,"info");this.info=a,Error.captureStackTrace&&Error.captureStackTrace(this,Ku)}}class _i extends Ku{constructor(r,e){super(r,e)}}class At extends Ku{constructor(r,e){super(r,e)}}class em extends At{constructor(r,e){super(r,e)}}var Si=globalThis&&globalThis.__decorate||function(t,r,e,a){var h=arguments.length,d=h<3?r:a===null?a=Object.getOwnPropertyDescriptor(r,e):a,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,r,e,a);else for(var $=t.length-1;$>=0;$--)(x=t[$])&&(d=(h<3?x(d):h>3?x(r,e,d):x(r,e))||d);return h>3&&d&&Object.defineProperty(r,e,d),d};class Fs{constructor(r=[],e,a){Be(this,"parent");Be(this,"layerdStates");Be(this,"name");Be(this,"opts",{});this.layerdStates=r,this.parent=e,this.name=a||(r.length===1?"":"")}log(r,e){this.parent?this.parent.log(r,e):this.opts.log&&this.opts.log(r,e)}onUpdated(r,e){this.parent?this.parent.onUpdated(r,e):this.opts.onUpdated&&this.opts.onUpdated(r,e)}createChildScope(r=new Map,e){const a=[r,...this.layerdStates];return new Fs(a,this,e)}get(r){for(const e of this.layerdStates)if(e.has(r)){const a=e.get(r);return this.log("read",{var:r,val:a}),a}throw new At(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}getAll(){const r=this.layerdStates.reduce((e,a)=>[...e,...a],[]);return new Map(r)}add(r,e){this.log("add",{var:r,val:e});const a=this.layerdStates[0];if(a.has(r))throw new At(`Variable '${r}' is alerady exists in scope '${this.name}'`,{scope:this.layerdStates});a.set(r,e),this.parent==null&&this.onUpdated(r,e)}assign(r,e){let a=1;for(const h of this.layerdStates){if(h.has(r)){h.set(r,e),this.log("assign",{var:r,val:e}),a===this.layerdStates.length&&this.onUpdated(r,e);return}a++}throw new At(`No such variable '${r}' in scope '${this.name}'`,{scope:this.layerdStates})}}Si([Ke],Fs.prototype,"log",null);Si([Ke],Fs.prototype,"onUpdated",null);Si([Ke],Fs.prototype,"createChildScope",null);Si([Ke],Fs.prototype,"get",null);Si([Ke],Fs.prototype,"getAll",null);Si([Ke],Fs.prototype,"add",null);Si([Ke],Fs.prototype,"assign",null);let ou;const tm=new Uint8Array(16);function rm(){if(!ou&&(ou=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ou))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ou(tm)}const ur=[];for(let t=0;t<256;++t)ur.push((t+256).toString(16).slice(1));function sm(t,r=0){return(ur[t[r+0]]+ur[t[r+1]]+ur[t[r+2]]+ur[t[r+3]]+"-"+ur[t[r+4]]+ur[t[r+5]]+"-"+ur[t[r+6]]+ur[t[r+7]]+"-"+ur[t[r+8]]+ur[t[r+9]]+"-"+ur[t[r+10]]+ur[t[r+11]]+ur[t[r+12]]+ur[t[r+13]]+ur[t[r+14]]+ur[t[r+15]]).toLowerCase()}const nm=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),bh={randomUUID:nm};function im(t,r,e){if(bh.randomUUID&&!r&&!t)return bh.randomUUID();t=t||{};const a=t.random||(t.rng||rm)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,r){e=e||0;for(let h=0;h<16;++h)r[e+h]=a[h];return r}return sm(a)}const ht={type:"null"},ns={type:"bool",value:!0},qr={type:"bool",value:!1},Ne=t=>({type:"num",value:t}),xt=t=>({type:"str",value:t}),wa=t=>({type:"bool",value:t}),Ac=t=>({type:"obj",value:t}),dr=t=>({type:"arr",value:t}),am=(t,r,e)=>({type:"fn",args:t,statements:r,scope:e}),de=t=>({type:"fn",native:t}),lm=t=>({type:"return",value:t}),om=()=>({type:"break",value:null}),um=()=>({type:"continue",value:null}),fm=t=>t.type==="return"?t.value:t;function Wr(t){if(t==null)throw new At("Expect anything, but got nothing.")}function Cr(t){if(t==null)throw new At("Expect boolean, but got nothing.");if(t.type!=="bool")throw new At(`Expect boolean, but got ${t.type}.`)}function wn(t){if(t==null)throw new At("Expect function, but got nothing.");if(t.type!=="fn")throw new At(`Expect function, but got ${t.type}.`)}function Gt(t){if(t==null)throw new At("Expect string, but got nothing.");if(t.type!=="str")throw new At(`Expect string, but got ${t.type}.`)}function Se(t){if(t==null)throw new At("Expect number, but got nothing.");if(t.type!=="num")throw new At(`Expect number, but got ${t.type}.`)}function gn(t){if(t==null)throw new At("Expect object, but got nothing.");if(t.type!=="obj")throw new At(`Expect object, but got ${t.type}.`)}function qo(t){if(t==null)throw new At("Expect array, but got nothing.");if(t.type!=="arr")throw new At(`Expect array, but got ${t.type}.`)}function cm(t){return t.type==="str"}function hm(t){return t.type==="num"}function pm(t){return t.type==="obj"}function gm(t){return t.type==="arr"}function jf(t,r){return t.type==="fn"||r.type==="fn"?!1:t.type==="null"&&r.type==="null"?!0:t.type==="null"||r.type==="null"?!1:t.value===r.value}function Rf(t,r=!1){if(r){if(t.type==="num")return t.value.toString();if(t.type==="bool")return t.value?"true":"false";if(t.type==="str")return`"${t.value}"`;if(t.type==="arr")return`[${t.value.map(a=>Rf(a,!0)).join(", ")}]`;if(t.type==="null")return"(null)"}const e=t.type==="num"||t.type==="bool"?t.value:t.type==="str"?`"${t.value}"`:t.type==="fn"||t.type==="obj"?"...":t.type==="null"?"":null;return`${t.type}<${e}>`}function Df(t){switch(t.type){case"fn":return"";case"arr":return t.value.map(r=>Df(r));case"bool":return t.value;case"null":return null;case"num":return t.value;case"obj":{const r={};for(const[e,a]of t.value.entries())r[e]=Df(a);return r}case"str":return t.value;default:throw new Error(`Unrecognized value type: ${t.type}`)}}function Lf(t){if(t===null)return ht;if(typeof t=="boolean")return wa(t);if(typeof t=="string")return xt(t);if(typeof t=="number")return Ne(t);if(Array.isArray(t))return dr(t.map(r=>Lf(r)));if(typeof t=="object"){const r=new Map;for(const[e,a]of Object.entries(t))r.set(e,Lf(a));return Ac(r)}return ht}const vm={help:xt("SEE: https://github.com/syuilo/aiscript/blob/master/docs/get-started.md"),"Core:v":xt("0.14.1"),"Core:ai":xt("kawaii"),"Core:not":de(([t])=>(Cr(t),t.value?qr:ns)),"Core:eq":de(([t,r])=>(Wr(t),Wr(r),jf(t,r)?ns:qr)),"Core:neq":de(([t,r])=>(Wr(t),Wr(r),jf(t,r)?qr:ns)),"Core:and":de(([t,r])=>(Cr(t),t.value?(Cr(r),r.value?ns:qr):qr)),"Core:or":de(([t,r])=>(Cr(t),t.value?ns:(Cr(r),r.value?ns:qr))),"Core:add":de(([t,r])=>(Se(t),Se(r),Ne(t.value+r.value))),"Core:sub":de(([t,r])=>(Se(t),Se(r),Ne(t.value-r.value))),"Core:mul":de(([t,r])=>(Se(t),Se(r),Ne(t.value*r.value))),"Core:pow":de(([t,r])=>{Se(t),Se(r);const e=t.value**r.value;if(isNaN(e))throw new At("Invalid operation.");return Ne(e)}),"Core:div":de(([t,r])=>{Se(t),Se(r);const e=t.value/r.value;if(isNaN(e))throw new At("Invalid operation.");return Ne(e)}),"Core:mod":de(([t,r])=>(Se(t),Se(r),Ne(t.value%r.value))),"Core:gt":de(([t,r])=>(Se(t),Se(r),t.value>r.value?ns:qr)),"Core:lt":de(([t,r])=>(Se(t),Se(r),t.value(Se(t),Se(r),t.value>=r.value?ns:qr)),"Core:lteq":de(([t,r])=>(Se(t),Se(r),t.value<=r.value?ns:qr)),"Core:type":de(([t])=>(Wr(t),xt(t.type))),"Core:to_str":de(([t])=>(Wr(t),t.type==="str"?t:t.type==="num"?xt(t.value.toString()):xt("?"))),"Core:range":de(([t,r])=>(Se(t),Se(r),t.valueNe(a+t.value))):t.value>r.value?dr(Array.from({length:t.value-r.value+1},(e,a)=>Ne(t.value-a))):dr([t]))),"Util:uuid":de(()=>xt(im())),"Json:stringify":de(([t])=>(Wr(t),xt(JSON.stringify(Df(t))))),"Json:parse":de(([t])=>(Gt(t),Lf(JSON.parse(t.value)))),"Json:parsable":de(([t])=>{Gt(t);try{JSON.parse(t.value)}catch{return wa(!1)}return wa(!0)}),"Date:now":de(()=>Ne(Date.now())),"Date:year":de(([t])=>(t&&Se(t),Ne(new Date((t==null?void 0:t.value)||Date.now()).getFullYear()))),"Date:month":de(([t])=>(t&&Se(t),Ne(new Date((t==null?void 0:t.value)||Date.now()).getMonth()+1))),"Date:day":de(([t])=>(t&&Se(t),Ne(new Date((t==null?void 0:t.value)||Date.now()).getDate()))),"Date:hour":de(([t])=>(t&&Se(t),Ne(new Date((t==null?void 0:t.value)||Date.now()).getHours()))),"Date:minute":de(([t])=>(t&&Se(t),Ne(new Date((t==null?void 0:t.value)||Date.now()).getMinutes()))),"Date:second":de(([t])=>(t&&Se(t),Ne(new Date((t==null?void 0:t.value)||Date.now()).getSeconds()))),"Date:parse":de(([t])=>(Gt(t),Ne(new Date(t.value).getTime()))),"Math:Infinity":Ne(1/0),"Math:PI":Ne(Math.PI),"Math:sin":de(([t])=>(Se(t),Ne(Math.sin(t.value)))),"Math:cos":de(([t])=>(Se(t),Ne(Math.cos(t.value)))),"Math:abs":de(([t])=>(Se(t),Ne(Math.abs(t.value)))),"Math:sqrt":de(([t])=>{Se(t);const r=Math.sqrt(t.value);if(isNaN(r))throw new At("Invalid operation.");return Ne(r)}),"Math:round":de(([t])=>(Se(t),Ne(Math.round(t.value)))),"Math:ceil":de(([t])=>(Se(t),Ne(Math.ceil(t.value)))),"Math:floor":de(([t])=>(Se(t),Ne(Math.floor(t.value)))),"Math:min":de(([t,r])=>(Se(t),Se(r),Ne(Math.min(t.value,r.value)))),"Math:max":de(([t,r])=>(Se(t),Se(r),Ne(Math.max(t.value,r.value)))),"Math:rnd":de(([t,r])=>t&&t.type==="num"&&r&&r.type==="num"?Ne(Math.floor(Math.random()*(Math.floor(r.value)-Math.ceil(t.value)+1)+Math.ceil(t.value))):Ne(Math.random())),"Math:gen_rng":de(([t])=>{if(Wr(t),t.type!=="num"&&t.type!=="str")return ht;const r=vc(t.value.toString());return de(([e,a])=>e&&e.type==="num"&&a&&a.type==="num"?Ne(Math.floor(r()*(Math.floor(a.value)-Math.ceil(e.value)+1)+Math.ceil(e.value))):Ne(r()))}),"Num:to_hex":de(([t])=>(Se(t),xt(t.value.toString(16)))),"Num:from_hex":de(([t])=>(Gt(t),Ne(parseInt(t.value,16)))),"Str:lf":xt(` -`),"Str:lt":de(([t,r])=>(Gt(t),Gt(r),t.value(Gt(t),Gt(r),t.value>r.value?Ne(-1):t.value===r.value?Ne(0):Ne(1))),"Obj:keys":de(([t])=>(gn(t),dr(Array.from(t.value.keys()).map(r=>xt(r))))),"Obj:vals":de(([t])=>(gn(t),dr(Array.from(t.value.values())))),"Obj:kvs":de(([t])=>(gn(t),dr(Array.from(t.value.entries()).map(([r,e])=>dr([xt(r),e]))))),"Obj:get":de(([t,r])=>(gn(t),Gt(r),t.value.get(r.value)??ht)),"Obj:set":de(([t,r,e])=>(gn(t),Gt(r),Wr(e),t.value.set(r.value,e),ht)),"Obj:has":de(([t,r])=>(gn(t),Gt(r),wa(t.value.has(r.value)))),"Obj:copy":de(([t])=>(gn(t),Ac(new Map(t.value)))),"Async:interval":de(async([t,r,e],a)=>{Se(t),wn(r),e&&(Cr(e),e.value&&a.call(r,[]));const h=setInterval(()=>{a.call(r,[])},t.value),d=()=>{clearInterval(h)};return a.registerAbortHandler(d),de(([],x)=>{clearInterval(h),x.unregisterAbortHandler(d)})}),"Async:timeout":de(async([t,r],e)=>{Se(t),wn(r);const a=setTimeout(()=>{e.call(r,[])},t.value),h=()=>{clearTimeout(a)};return e.registerAbortHandler(h),de(([],d)=>{clearTimeout(a),d.unregisterAbortHandler(h)})})},la={num:{to_str:t=>de(async(r,e)=>xt(t.value.toString()))},str:{to_num:t=>de(async(r,e)=>{const a=parseInt(t.value,10);return isNaN(a)?ht:Ne(a)}),len:t=>Ne(mc(t.value)),replace:t=>de(async([r,e],a)=>(Gt(r),Gt(e),xt(t.value.split(r.value).join(e.value)))),index_of:t=>de(async([r],e)=>(Gt(r),Ne($c(t.value,r.value)))),incl:t=>de(async([r],e)=>(Gt(r),t.value.includes(r.value)?ns:qr)),trim:t=>de(async(r,e)=>xt(t.value.trim())),upper:t=>de(async(r,e)=>xt(t.value.toUpperCase())),lower:t=>de(async(r,e)=>xt(t.value.toLowerCase())),split:t=>de(async([r],e)=>(r&&Gt(r),dr(r?t.value.split(r?r.value:"").map(a=>xt(a)):_a(t.value).map(a=>xt(a))))),slice:t=>de(async([r,e],a)=>(Se(r),Se(e),xt(wc(t.value,r.value,e.value)))),pick:t=>de(async([r],e)=>{Se(r);const h=_a(t.value)[r.value];return h?xt(h):ht})},arr:{len:t=>Ne(t.value.length),push:t=>de(async([r],e)=>(Wr(r),t.value.push(r),t)),unshift:t=>de(async([r],e)=>(Wr(r),t.value.unshift(r),t)),pop:t=>de(async(r,e)=>t.value.pop()??ht),shift:t=>de(async(r,e)=>t.value.shift()??ht),concat:t=>de(async([r],e)=>(qo(r),dr(t.value.concat(r.value)))),slice:t=>de(async([r,e],a)=>(Se(r),Se(e),dr(t.value.slice(r.value,e.value)))),join:t=>de(async([r],e)=>(r&&Gt(r),xt(t.value.map(a=>a.type==="str"?a.value:"").join(r?r.value:"")))),map:t=>de(async([r],e)=>{wn(r);const a=t.value.map(async(h,d)=>await e.call(r,[h,Ne(d)]));return dr(await Promise.all(a))}),filter:t=>de(async([r],e)=>{wn(r);const a=[];for(let h=0;hde(async([r,e],a)=>{wn(r);const h=e!=null;let d=h?e:t.value[0];for(let x=h?0:1;xde(async([r],e)=>{wn(r);for(let a=0;ade(async([r],e)=>(Wr(r),r.type!=="str"&&r.type!=="num"&&r.type!=="bool"&&r.type!=="null"?qr:(h=>h.value.map(d=>d.type==="str"||d.type==="num"||d.type==="bool"?d.value:d.type==="null"?null:Symbol()))(t).includes(r.type==="null"?null:r.value)?ns:qr)),reverse:t=>de(async(r,e)=>(t.value.reverse(),ht)),copy:t=>de(async(r,e)=>dr([...t.value])),sort:t=>de(async([r],e)=>{const a=async(d,x)=>{if(d.length<=1)return d;const $=Math.floor(d.length/2),A=await a(d.slice(0,$),x),C=await a(d.slice($),x);return h(A,C,x)},h=async(d,x,$)=>{const A=[];let C=0,k=0;for(;C=0;$--)(x=t[$])&&(d=(h<3?x(d):h>3?x(r,e,d):x(r,e))||d);return h>3&&d&&Object.defineProperty(r,e,d),d};const Hp=300,dm=Hp-1;class jr{constructor(r,e){Be(this,"vars");Be(this,"opts");Be(this,"stepCount",0);Be(this,"stop",!1);Be(this,"scope");Be(this,"abortHandlers",[]);this.opts=e??{};const a={print:de(([h])=>{Wr(h),this.opts.out&&this.opts.out(h)}),readline:de(async h=>{const d=h[0];if(Gt(d),this.opts.in==null)return ht;const x=await this.opts.in(d.value);return xt(x)})};this.vars={...r,...vm,...a},this.scope=new Fs([new Map(Object.entries(this.vars))]),this.scope.opts.log=(h,d)=>{switch(h){case"add":this.log("var:add",d);break;case"read":this.log("var:read",d);break;case"write":this.log("var:write",d);break}}}async exec(r){if(r==null||r.length===0)return;await this.collectNs(r);const e=await this._run(r,this.scope);this.log("end",{val:e})}async execFn(r,e){return this._fn(r,e)}static collectMetadata(r){if(r==null||r.length===0)return;function e(h){switch(h.type){case"arr":return h.value.map(d=>e(d));case"bool":return h.value;case"null":return null;case"num":return h.value;case"obj":{const d={};for(const[x,$]of h.value.entries())d[x]=e($);return d}case"str":return h.value;default:return}}const a=new Map;for(const h of r)switch(h.type){case"meta":{a.set(h.name,e(h.value));break}}return a}log(r,e){this.opts.log&&this.opts.log(r,e)}async collectNs(r){for(const e of r)switch(e.type){case"ns":{await this.collectNsMember(e);break}}}async collectNsMember(r){const e=this.scope.createChildScope();for(const a of r.members)switch(a.type){case"def":{const h=await this._eval(a.expr,e);e.add(a.name,h),this.scope.add(r.name+":"+a.name,h);break}case"ns":break;default:throw new Error("invalid ns member type: "+a.type)}}async _fn(r,e){if(r.native)return r.native(e,{call:this._fn,registerAbortHandler:this.registerAbortHandler,unregisterAbortHandler:this.unregisterAbortHandler})??ht;{const a=new Map;for(let d=0;d<(r.args??[]).length;d++)a.set(r.args[d],e[d]);const h=r.scope.createChildScope(a);return fm(await this._run(r.statements,h))}}async _eval(r,e){if(this.stop)return ht;if(this.stepCount%Hp===dm&&await new Promise(a=>setTimeout(a,5)),this.stepCount++,this.opts.maxStep&&this.stepCount>this.opts.maxStep)throw new At("max step exceeded");switch(r.type){case"call":{const a=await this._eval(r.target,e);wn(a);const h=await Promise.all(r.args.map(d=>this._eval(d,e)));return this._fn(a,h)}case"if":{const a=await this._eval(r.cond,e);if(Cr(a),a.value)return this._eval(r.then,e);if(r.elseif&&r.elseif.length>0){for(const h of r.elseif){const d=await this._eval(h.cond,e);if(Cr(d),d.value)return this._eval(h.then,e)}if(r.else)return this._eval(r.else,e)}else if(r.else)return this._eval(r.else,e);return ht}case"match":{const a=await this._eval(r.about,e);for(const h of r.qs){const d=await this._eval(h.q,e);if(jf(a,d))return await this._eval(h.a,e)}return r.default?await this._eval(r.default,e):ht}case"loop":{for(;;){const a=await this._run(r.statements,e.createChildScope());if(a.type==="break")break;if(a.type==="return")return a}return ht}case"for":{if(r.times){const a=await this._eval(r.times,e);Se(a);for(let h=0;h0){const h=[];for(const d of r.attr)h.push({name:d.name,value:await this._eval(d.value,e)});a.attr=h}return e.add(r.name,a),ht}case"identifier":return e.get(r.name);case"assign":{const a=await this._eval(r.expr,e);return await this.assign(e,r.dest,a),ht}case"addAssign":{const a=await this._eval(r.dest,e);Se(a);const h=await this._eval(r.expr,e);return Se(h),await this.assign(e,r.dest,Ne(a.value+h.value)),ht}case"subAssign":{const a=await this._eval(r.dest,e);Se(a);const h=await this._eval(r.expr,e);return Se(h),await this.assign(e,r.dest,Ne(a.value-h.value)),ht}case"null":return ht;case"bool":return wa(r.value);case"num":return Ne(r.value);case"str":return xt(r.value);case"arr":return dr(await Promise.all(r.value.map(async a=>await this._eval(a,e))));case"obj":{const a=new Map;for(const h of r.value.keys())a.set(h,await this._eval(r.value.get(h),e));return Ac(a)}case"prop":{const a=await this._eval(r.target,e);if(pm(a))return a.value.has(r.name)?a.value.get(r.name):ht;if(hm(a)){if(Object.hasOwn(la.num,r.name))return la.num[r.name](a);throw new At(`No such prop (${r.name}) in ${a.type}.`)}else if(cm(a)){if(Object.hasOwn(la.str,r.name))return la.str[r.name](a);throw new At(`No such prop (${r.name}) in ${a.type}.`)}else if(gm(a)){if(Object.hasOwn(la.arr,r.name))return la.arr[r.name](a);throw new At(`No such prop (${r.name}) in ${a.type}.`)}else throw new At(`Cannot read prop (${r.name}) of ${a.type}.`)}case"index":{const a=await this._eval(r.target,e);qo(a);const h=await this._eval(r.index,e);Se(h);const d=a.value[h.value];if(d===void 0)throw new em(`Index out of range. index: ${h.value} max: ${a.value.length-1}`);return d}case"not":{const a=await this._eval(r.expr,e);return Cr(a),wa(!a.value)}case"fn":return am(r.args.map(a=>a.name),r.children,e);case"block":return this._run(r.statements,e.createChildScope());case"tmpl":{let a="";for(const h of r.tmpl)if(typeof h=="string")a+=h;else{const d=await this._eval(h,e);let x="";d.type==="str"?x=d.value:d.type==="num"&&(x=d.value.toString()),a+=x}return xt(a)}case"return":{const a=await this._eval(r.expr,e);return this.log("block:return",{scope:e.name,val:a}),lm(a)}case"break":return this.log("block:break",{scope:e.name}),om();case"continue":return this.log("block:continue",{scope:e.name}),um();case"ns":return ht;case"meta":return ht;case"and":{const a=await this._eval(r.left,e);if(Cr(a),a.value){const h=await this._eval(r.right,e);return Cr(h),h}else return a}case"or":{const a=await this._eval(r.left,e);if(Cr(a),a.value)return a;{const h=await this._eval(r.right,e);return Cr(h),h}}default:throw new Error("invalid node type")}}async _run(r,e){this.log("block:enter",{scope:e.name});let a=ht;for(let h=0;he!==r)}abort(){this.stop=!0;for(const r of this.abortHandlers)r();this.abortHandlers=[]}async assign(r,e,a){if(e.type==="identifier")r.assign(e.name,a);else if(e.type==="index"){const h=await this._eval(e.target,r);qo(h);const d=await this._eval(e.index,r);Se(d),h.value[d.value]=a}else if(e.type==="prop"){const h=await this._eval(e.target,r);gn(h),h.value.set(e.name,a)}else throw new At("The left-hand side of an assignment expression must be a variable or a property/index access.")}}Qr([Ke],jr.prototype,"exec",null);Qr([Ke],jr.prototype,"execFn",null);Qr([Ke],jr.prototype,"log",null);Qr([Ke],jr.prototype,"collectNs",null);Qr([Ke],jr.prototype,"collectNsMember",null);Qr([Ke],jr.prototype,"_fn",null);Qr([Ke],jr.prototype,"_eval",null);Qr([Ke],jr.prototype,"_run",null);Qr([Ke],jr.prototype,"registerAbortHandler",null);Qr([Ke],jr.prototype,"unregisterAbortHandler",null);Qr([Ke],jr.prototype,"abort",null);Qr([Ke],jr.prototype,"assign",null);Qr([Ke],jr,"collectMetadata",null);function ym(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e}function $i(t,r,e,a){var h=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(h,$i.prototype),h.expected=r,h.found=e,h.location=a,h.name="SyntaxError",h}ym($i,Error);function ff(t,r,e){return e=e||" ",t.length>r?t:(r-=t.length,e+=e.repeat(r),t+e.slice(0,r))}$i.prototype.format=function(t){var r="Error: "+this.message;if(this.location){var e=null,a;for(a=0;a `+x+` -`+A+` | -`+d.line+" | "+C+` -`+A+" | "+ff("",h.column-1," ")+ff("",S,"^")}else r+=` - at `+x}return r};$i.buildMessage=function(t,r){var e={literal:function(C){return'"'+h(C.text)+'"'},class:function(C){var k=C.parts.map(function(S){return Array.isArray(S)?d(S[0])+"-"+d(S[1]):d(S)});return"["+(C.inverted?"^":"")+k.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(C){return C.description}};function a(C){return C.charCodeAt(0).toString(16).toUpperCase()}function h(C){return C.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(k){return"\\x0"+a(k)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(k){return"\\x"+a(k)})}function d(C){return C.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(k){return"\\x0"+a(k)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(k){return"\\x"+a(k)})}function x(C){return e[C.type](C)}function $(C){var k=C.map(x),S,I;if(k.sort(),k.length>0){for(S=1,I=1;S=",Le="<",$r=">",_t="+",Jt="-",ft="*",Kt="^",cr="/",Yt="%",rr="!",Ct="[",R=".",B="if",Y="elif",se="else",le="match",ne="=>",xe="eval",ce="`",he='"',ie="'",Ee='\\"',Ce="\\'",Me="true",Ie="false",De="null",Ve=";",Qe="@",rt="@(",Ut=`\r -`,lt=/^[A-Z0-9_:]/i,hr=/^[^`{]/,ls=/^[{}`]/,Mr=/^[+\-]/,Et=/^[1-9]/,Ge=/^[0-9]/,sr=/^[A-Z_]/i,kn=/^[A-Z0-9_]/i,Fi=/^[\r\n]/,Ea=/^[ \t\r\n]/,Ma=/^[ \t]/,Nt=co(),Sr=X("//",!1),Sa=X("/*",!1),Ts=X("*/",!1),nr=X("(",!1),Mt=X(")",!1),Gr=X("::",!1),jt=X("{",!1),st=X("}",!1),pr=X("###",!1),Fr=X("let",!1),ot=X(":",!1),Rt=X("=",!1),Os=X("var",!1),Fa=X("<:",!1),Ta=X("#[",!1),os=X("]",!1),As=X("each",!1),at=X(",",!1),Dt=X("for",!1),qs=X("return",!1),zt=Pt([["A","Z"],["0","9"],"_",":"],!1,!0),Rr=X("loop",!1),Oa=X("break",!1),Ia=X("continue",!1),Na=X("+=",!1),ja=X("-=",!1),En=X("\\",!1),Ti=X("||",!1),Ra=X("&&",!1),Da=X("==",!1),La=X("!=",!1),Ha=X("<=",!1),Ua=X(">=",!1),Mn=X("<",!1),Ks=X(">",!1),Oi=X("+",!1),Ba=X("-",!1),Sn=X("*",!1),Ii=X("^",!1),za=X("/",!1),qa=X("%",!1),Ka=X("!",!1),Is=X("[",!1),us=X(".",!1),Fn=X("if",!1),Va=X("elif",!1),Wa=X("else",!1),Ja=X("match",!1),fs=X("=>",!1),Vs=X("eval",!1),cs=X("`",!1),Za=Pt(["`","{"],!0,!1),Ws=Pt(["{","}","`"],!1,!1),hs=X('"',!1),ps=X("'",!1),Js=X('\\"',!1),Zs=X("\\'",!1),gs=Pt(["+","-"],!1,!1),Tn=Pt([["1","9"]],!1,!1),wt=Pt([["0","9"]],!1,!1),Ni=X("true",!1),Tr=X("false",!1),Xa=X("null",!1),vs=X(";",!1),Ya=X("@",!1),_s=X("@(",!1),Qa=Pt([["A","Z"],"_"],!1,!0),Xs=Pt([["A","Z"],["0","9"],"_"],!1,!0),Ga=X(`\r -`,!1),ji=Pt(["\r",` -`],!1,!1),el=Pt([" "," ","\r",` -`],!1,!1),tl=Pt([" "," "],!1,!1),rl=function(n){return n.join("")},sl=function(){return T()},nl=function(){return T()},il=function(){return""},al=function(){return""},ll=function(n){return n??[]},On=function(n,o){return o},ol=function(n,o){return[n,...o]},Ys=function(n,o){return o},ul=function(n,o){return[n,...o]},Qs=function(n,o){return o},fl=function(n,o){return[n,...o]},Ri=function(n){return n},cl=function(n,o){return ee("ns",{name:n,members:o})},hl=function(n,o){return ee("meta",{name:n,value:o})},pl=function(n){return ee("meta",{name:null,value:n})},gl=function(n,o,g){return ee("def",{name:n,varType:o,expr:g,mut:!1,attr:[]})},vl=function(n,o,g){return ee("def",{name:n,varType:o,expr:g,mut:!0,attr:[]})},dl=function(n){return ee("identifier",{name:"print",chain:[ee("callChain",{args:[n]})]})},yl=function(n,o){return ee("attr",{name:n,value:o??ee("bool",{value:!0})})},ml=function(n,o,g){return ee("each",{var:n,items:o,for:g})},wl=function(n,o,g){return ee("each",{var:n,items:o,for:g})},$l=function(n,o){return o},xl=function(n,o,g,u){return ee("for",{var:n,from:o??ee("num",{value:0}),to:g,for:u})},bl=function(n,o){return o},Al=function(n,o,g,u){return ee("for",{var:n,from:o??ee("num",{value:0}),to:g,for:u})},_l=function(n,o){return ee("for",{times:n,for:o})},Cl=function(n,o){return ee("for",{times:n,for:o})},Pl=function(n){return ee("return",{expr:n})},kl=function(n){return ee("loop",{statements:n})},El=function(){return ee("break",{})},Ml=function(){return ee("continue",{})},Sl=function(n,o,g){return o==="+="?ee("addAssign",{dest:n,expr:g}):o==="-="?ee("subAssign",{dest:n,expr:g}):ee("assign",{dest:n,expr:g})},In=function(n,o,g){return{op:o,term:g}},Fl=function(n,o){return ee("infix",{operands:[n,...o.map(g=>g.term)],operators:o.map(g=>g.op)})},Di=function(){return T()},Tl=function(n){return ee("not",{expr:n})},Ol=function(n,o){return{...n,chain:o}},Il=function(n){return ee("callChain",{args:n??[]})},Nn=function(n,o){return o},Nl=function(n,o){return[n,...o]},Li=function(n){return ee("indexChain",{index:n})},jl=function(n){return ee("propChain",{name:n})},Rl=function(n,o,g,u){return ee("if",{cond:n,then:o,elseif:g??[],else:u})},Dl=function(n,o){return[n,...o]},Ll=function(n,o){return{cond:n,then:o}},Hl=function(n){return n},jn=function(n,o,g){return{q:o,a:g}},Ul=function(n,o,g){return ee("match",{about:n,qs:o??[],default:g})},Hi=function(n){return ee("block",{statements:n})},Bl=function(n){return ee("identifier",{name:n})},zl=function(n){return ee("tmpl",{tmpl:n})},ql=function(n){return n.join("")},Rn=function(n){return n},Kl=function(n){return ee("str",{value:n.join("")})},Dn=function(n){return n},Ui=function(n){return ee("str",{value:n.join("")})},Vl=function(){return'"'},Bi=function(){return"'"},Wl=function(){return ee("num",{value:parseFloat(T())})},Jl=function(){return ee("num",{value:parseFloat(T())})},Zl=function(){return ee("num",{value:parseInt(T(),10)})},Xl=function(){return ee("num",{value:parseInt(T(),10)})},Yl=function(){return ee("bool",{value:!0})},Ql=function(){return ee("bool",{value:!1})},Gl=function(){return ee("null",{})},Ln=function(n,o){return{k:n,v:o}},eo=function(n){const o=new Map;for(const g of n)o.set(g.k,g.v);return ee("obj",{value:o})},Hn=function(n){return n},zi=function(n){return ee("arr",{value:n})},to=function(n,o){return{name:n,argType:o}},qi=function(n,o){return[n,...o]},ro=function(n,o,g,u,i,l){return(n.length>0||g.length>0)&&Gs("Cannot use spaces before or after the function name."),ee("def",{name:o,expr:ee("fn",{args:u??[],retType:i},l??[]),mut:!1,attr:[]})},so=function(n,o,g){return ee("fn",{args:n??[],retType:o},g??[])},Un=function(n){return n},no=function(n){return ee("arr",{value:n})},Bn=function(n,o){return{k:n,v:o}},Ki=function(n){const o=new Map;for(const g of n)o.set(g.k,g.v);return ee("obj",{value:o})},io=function(n,o){return ee("fnTypeSource",{args:n??[],result:o})},Vi=function(n,o){return[n,...o]},ao=function(n,o){return ee("namedTypeSource",{name:n,inner:o})},lo=function(n){return ee("namedTypeSource",{name:n,inner:null})},oo=function(){return T()},uo=function(){return T()},fo=function(n){return ee("block",{statements:n??[]})},s=0,U=0,ds=[{line:1,column:1}],c=0,ae=[],b=0,E={},Dr;if("startRule"in r){if(!(r.startRule in h))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');d=h[r.startRule]}function T(){return t.substring(U,s)}function W(){return ys(U,s)}function Gs(n,o){throw o=o!==void 0?o:ys(U,s),Wi(n,o)}function X(n,o){return{type:"literal",text:n,ignoreCase:o}}function Pt(n,o,g){return{type:"class",parts:n,inverted:o,ignoreCase:g}}function co(){return{type:"any"}}function ke(){return{type:"end"}}function ir(n){var o=ds[n],g;if(o)return o;for(g=n-1;!ds[g];)g--;for(o=ds[g],o={line:o.line,column:o.column};gc&&(c=s,ae=[]),ae.push(n))}function Wi(n,o){return new $i(n,null,null,o)}function en(n,o,g){return new $i($i.buildMessage(n,o),n,o,g)}function H(){var n,o,g,u=s*76+0,i=E[u];if(i)return s=i.nextPos,i.result;for(n=s,o=[],g=zn();g!==e;)o.push(g),g=zn();return U=n,o=rl(o),n=o,E[u]={nextPos:s,result:n},n}function zn(){var n,o,g=s*76+1,u=E[g];return u?(s=u.nextPos,u.result):(n=s,o=Wn(),o!==e&&(U=n,o=sl()),n=o,n===e&&(n=s,o=ks(),o!==e&&(U=n,o=nl()),n=o,n===e&&(n=ho(),n===e&&(t.length>s?(n=t.charAt(s),s++):(n=e,b===0&&P(Nt))))),E[g]={nextPos:s,result:n},n)}function ho(){var n,o,g,u,i,l,p=s*76+2,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,t.substr(s,2)===x?(o=x,s+=2):(o=e,b===0&&P(Sr)),o!==e){for(g=[],u=s,i=s,b++,l=ti(),b--,l===e?i=void 0:(s=i,i=e),i!==e?(t.length>s?(l=t.charAt(s),s++):(l=e,b===0&&P(Nt)),l!==e?(i=[i,l],u=i):(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,i=s,b++,l=ti(),b--,l===e?i=void 0:(s=i,i=e),i!==e?(t.length>s?(l=t.charAt(s),s++):(l=e,b===0&&P(Nt)),l!==e?(i=[i,l],u=i):(s=u,u=e)):(s=u,u=e);U=n,n=il()}else s=n,n=e;if(n===e)if(n=s,t.substr(s,2)===$?(o=$,s+=2):(o=e,b===0&&P(Sa)),o!==e){for(g=[],u=s,i=s,b++,t.substr(s,2)===A?(l=A,s+=2):(l=e,b===0&&P(Ts)),b--,l===e?i=void 0:(s=i,i=e),i!==e?(t.length>s?(l=t.charAt(s),s++):(l=e,b===0&&P(Nt)),l!==e?(i=[i,l],u=i):(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,i=s,b++,t.substr(s,2)===A?(l=A,s+=2):(l=e,b===0&&P(Ts)),b--,l===e?i=void 0:(s=i,i=e),i!==e?(t.length>s?(l=t.charAt(s),s++):(l=e,b===0&&P(Nt)),l!==e?(i=[i,l],u=i):(s=u,u=e)):(s=u,u=e);t.substr(s,2)===A?(u=A,s+=2):(u=e,b===0&&P(Ts)),u!==e?(U=n,n=al()):(s=n,n=e)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function Ji(){var n,o,g,u,i,l=s*76+3,p=E[l];if(p)return s=p.nextPos,p.result;for(n=s,o=[],g=m();g!==e;)o.push(g),g=m();for(g=Zi(),g===e&&(g=null),u=[],i=m();i!==e;)u.push(i),i=m();return U=n,n=ll(g),E[l]={nextPos:s,result:n},n}function Zi(){var n,o,g,u,i,l,p,f,y=s*76+4,v=E[y];if(v)return s=v.nextPos,v.result;if(n=s,o=Ns(),o!==e){for(g=[],u=s,i=[],l=be();l!==e;)i.push(l),l=be();if(l=We(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();f=Ns(),f!==e?(U=u,u=On(o,f)):(s=u,u=e)}else s=u,u=e;for(;u!==e;){for(g.push(u),u=s,i=[],l=be();l!==e;)i.push(l),l=be();if(l=We(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();f=Ns(),f!==e?(U=u,u=On(o,f)):(s=u,u=e)}else s=u,u=e}U=n,n=ol(o,g)}else s=n,n=e;return E[y]={nextPos:s,result:n},n}function po(){var n,o,g,u,i,l,p,f,y=s*76+5,v=E[y];if(v)return s=v.nextPos,v.result;if(n=s,o=js(),o!==e){for(g=[],u=s,i=[],l=be();l!==e;)i.push(l),l=be();if(l=We(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();f=js(),f!==e?(U=u,u=Ys(o,f)):(s=u,u=e)}else s=u,u=e;for(;u!==e;){for(g.push(u),u=s,i=[],l=be();l!==e;)i.push(l),l=be();if(l=We(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();f=js(),f!==e?(U=u,u=Ys(o,f)):(s=u,u=e)}else s=u,u=e}U=n,n=ul(o,g)}else s=n,n=e;return E[y]={nextPos:s,result:n},n}function Lr(){var n,o,g,u,i,l,p,f,y=s*76+6,v=E[y];if(v)return s=v.nextPos,v.result;if(n=s,o=ar(),o!==e){for(g=[],u=s,i=[],l=be();l!==e;)i.push(l),l=be();if(l=We(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();f=ar(),f!==e?(U=u,u=Qs(o,f)):(s=u,u=e)}else s=u,u=e;for(;u!==e;){for(g.push(u),u=s,i=[],l=be();l!==e;)i.push(l),l=be();if(l=We(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();f=ar(),f!==e?(U=u,u=Qs(o,f)):(s=u,u=e)}else s=u,u=e}U=n,n=fl(o,g)}else s=n,n=e;return E[y]={nextPos:s,result:n},n}function Ns(){var n,o=s*76+7,g=E[o];return g?(s=g.nextPos,g.result):(n=Cs(),n===e&&(n=Xi(),n===e&&(n=ar())),E[o]={nextPos:s,result:n},n)}function js(){var n,o=s*76+8,g=E[o];return g?(s=g.nextPos,g.result):(n=Ur(),n===e&&(n=Gn(),n===e&&(n=Cs())),E[o]={nextPos:s,result:n},n)}function ar(){var n,o=s*76+9,g=E[o];return g?(s=g.nextPos,g.result):(n=Ur(),n===e&&(n=Gn(),n===e&&(n=Yi(),n===e&&(n=yo(),n===e&&(n=go(),n===e&&(n=Qi(),n===e&&(n=vo(),n===e&&(n=mo(),n===e&&(n=wo(),n===e&&(n=$o(),n===e&&(n=xo(),n===e&&(n=Pe()))))))))))),E[o]={nextPos:s,result:n},n)}function Pe(){var n,o=s*76+10,g=E[o];return g?(s=g.nextPos,g.result):(n=bo(),n===e&&(n=Hr()),E[o]={nextPos:s,result:n},n)}function Hr(){var n,o=s*76+11,g=E[o];return g?(s=g.nextPos,g.result):(n=Co(),n===e&&(n=Fo(),n===e&&(n=es(),n===e&&(n=ms()))),E[o]={nextPos:s,result:n},n)}function ms(){var n,o,g,u,i,l,p=s*76+12,f=E[p];if(f)return s=f.nextPos,f.result;if(n=ko(),n===e&&(n=Vn(),n===e&&(n=Wn(),n===e&&(n=ks(),n===e&&(n=Xn(),n===e&&(n=an(),n===e&&(n=Qn(),n===e&&(n=sa(),n===e&&(n=So(),n===e&&(n=Ao(),n===e&&(n=Eo(),n===e)))))))))))if(n=s,t.charCodeAt(s)===40?(o=C,s++):(o=e,b===0&&P(nr)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(u=Pe(),u!==e){for(i=[],l=m();l!==e;)i.push(l),l=m();t.charCodeAt(s)===41?(l=k,s++):(l=e,b===0&&P(Mt)),l!==e?(U=n,n=Ri(u)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function Re(){var n,o=s*76+13,g=E[o];return g?(s=g.nextPos,g.result):(n=Xn(),n===e&&(n=ks(),n===e&&(n=an(),n===e&&(n=ei(),n===e&&(n=na(),n===e&&(n=Qn()))))),E[o]={nextPos:s,result:n},n)}function Cs(){var n,o,g,u,i,l,p,f,y,v,_=s*76+14,w=E[_];if(w)return s=w.nextPos,w.result;if(n=s,t.substr(s,2)===S?(o=S,s+=2):(o=e,b===0&&P(Gr)),o!==e){if(g=[],u=m(),u!==e)for(;u!==e;)g.push(u),u=m();else g=e;if(g!==e)if(u=Oe(),u!==e){if(i=[],l=m(),l!==e)for(;l!==e;)i.push(l),l=m();else i=e;if(i!==e)if(t.charCodeAt(s)===123?(l=I,s++):(l=e,b===0&&P(jt)),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();for(f=po(),f===e&&(f=null),y=[],v=m();v!==e;)y.push(v),v=m();t.charCodeAt(s)===125?(v=q,s++):(v=e,b===0&&P(st)),v!==e?(U=n,n=cl(u,f)):(s=n,n=e)}else s=n,n=e;else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;return E[_]={nextPos:s,result:n},n}function Xi(){var n,o,g,u,i,l,p=s*76+15,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,t.substr(s,3)===ue?(o=ue,s+=3):(o=e,b===0&&P(pr)),o!==e){for(g=[],u=be();u!==e;)g.push(u),u=be();if(u=Oe(),u!==e){for(i=[],l=m();l!==e;)i.push(l),l=m();l=Re(),l!==e?(U=n,n=hl(u,l)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;if(n===e)if(n=s,t.substr(s,3)===ue?(o=ue,s+=3):(o=e,b===0&&P(pr)),o!==e){for(g=[],u=be();u!==e;)g.push(u),u=be();u=Re(),u!==e?(U=n,n=pl(u)):(s=n,n=e)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function Ur(){var n,o,g,u,i,l,p,f,y,v=s*76+16,_=E[v];if(_)return s=_.nextPos,_.result;if(n=s,t.substr(s,3)===Q?(o=Q,s+=3):(o=e,b===0&&P(Fr)),o!==e){if(g=[],u=m(),u!==e)for(;u!==e;)g.push(u),u=m();else g=e;if(g!==e)if(u=Oe(),u!==e){for(i=s,l=[],p=m();p!==e;)l.push(p),p=m();if(t.charCodeAt(s)===58?(p=oe,s++):(p=e,b===0&&P(ot)),p!==e){for(f=[],y=m();y!==e;)f.push(y),y=m();y=St(),y!==e?i=y:(s=i,i=e)}else s=i,i=e;for(i===e&&(i=null),l=[],p=m();p!==e;)l.push(p),p=m();if(t.charCodeAt(s)===61?(p=$e,s++):(p=e,b===0&&P(Rt)),p!==e){for(f=[],y=m();y!==e;)f.push(y),y=m();y=Pe(),y!==e?(U=n,n=gl(u,i,y)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;if(n===e)if(n=s,t.substr(s,3)===j?(o=j,s+=3):(o=e,b===0&&P(Os)),o!==e){if(g=[],u=m(),u!==e)for(;u!==e;)g.push(u),u=m();else g=e;if(g!==e)if(u=Oe(),u!==e){for(i=s,l=[],p=m();p!==e;)l.push(p),p=m();if(t.charCodeAt(s)===58?(p=oe,s++):(p=e,b===0&&P(ot)),p!==e){for(f=[],y=m();y!==e;)f.push(y),y=m();y=St(),y!==e?i=y:(s=i,i=e)}else s=i,i=e;for(i===e&&(i=null),l=[],p=m();p!==e;)l.push(p),p=m();if(t.charCodeAt(s)===61?(p=$e,s++):(p=e,b===0&&P(Rt)),p!==e){for(f=[],y=m();y!==e;)f.push(y),y=m();y=Pe(),y!==e?(U=n,n=vl(u,i,y)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;return E[v]={nextPos:s,result:n},n}function Yi(){var n,o,g,u,i=s*76+17,l=E[i];if(l)return s=l.nextPos,l.result;if(n=s,t.substr(s,2)===O?(o=O,s+=2):(o=e,b===0&&P(Fa)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();u=Pe(),u!==e?(U=n,n=dl(u)):(s=n,n=e)}else s=n,n=e;return E[i]={nextPos:s,result:n},n}function go(){var n,o,g,u,i,l,p,f=s*76+18,y=E[f];if(y)return s=y.nextPos,y.result;if(n=s,t.substr(s,2)===N?(o=N,s+=2):(o=e,b===0&&P(Ta)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(u=Oe(),u!==e){for(i=s,l=[],p=m();p!==e;)l.push(p),p=m();for(p=Re(),p!==e?i=p:(s=i,i=e),i===e&&(i=null),l=[],p=m();p!==e;)l.push(p),p=m();t.charCodeAt(s)===93?(p=L,s++):(p=e,b===0&&P(os)),p!==e?(U=n,n=yl(u,i)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;return E[f]={nextPos:s,result:n},n}function Qi(){var n,o,g,u,i,l,p,f,y,v,_,w,M,F,D=s*76+19,V=E[D];if(V)return s=V.nextPos,V.result;if(n=s,t.substr(s,4)===z?(o=z,s+=4):(o=e,b===0&&P(As)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(t.charCodeAt(s)===40?(u=C,s++):(u=e,b===0&&P(nr)),u!==e)if(t.substr(s,3)===Q?(i=Q,s+=3):(i=e,b===0&&P(Fr)),i!==e){if(l=[],p=m(),p!==e)for(;p!==e;)l.push(p),p=m();else l=e;if(l!==e)if(p=Oe(),p!==e){for(f=[],y=m();y!==e;)f.push(y),y=m();for(t.charCodeAt(s)===44?(y=K,s++):(y=e,b===0&&P(at)),y===e&&(y=null),v=[],_=m();_!==e;)v.push(_),_=m();if(_=Pe(),_!==e)if(t.charCodeAt(s)===41?(w=k,s++):(w=e,b===0&&P(Mt)),w!==e){for(M=[],F=m();F!==e;)M.push(F),F=m();F=vt(),F!==e?(U=n,n=ml(p,_,F)):(s=n,n=e)}else s=n,n=e;else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;if(n===e)if(n=s,t.substr(s,4)===z?(o=z,s+=4):(o=e,b===0&&P(As)),o!==e){if(g=[],u=m(),u!==e)for(;u!==e;)g.push(u),u=m();else g=e;if(g!==e)if(t.substr(s,3)===Q?(u=Q,s+=3):(u=e,b===0&&P(Fr)),u!==e){if(i=[],l=m(),l!==e)for(;l!==e;)i.push(l),l=m();else i=e;if(i!==e)if(l=Oe(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();for(t.charCodeAt(s)===44?(f=K,s++):(f=e,b===0&&P(at)),f===e&&(f=null),y=[],v=m();v!==e;)y.push(v),v=m();if(v=Pe(),v!==e){if(_=[],w=m(),w!==e)for(;w!==e;)_.push(w),w=m();else _=e;_!==e?(w=vt(),w!==e?(U=n,n=wl(l,v,w)):(s=n,n=e)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;return E[D]={nextPos:s,result:n},n}function vo(){var n,o,g,u,i,l,p,f,y,v,_,w,M,F,D,V=s*76+20,G=E[V];if(G)return s=G.nextPos,G.result;if(n=s,t.substr(s,3)===J?(o=J,s+=3):(o=e,b===0&&P(Dt)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(t.charCodeAt(s)===40?(u=C,s++):(u=e,b===0&&P(nr)),u!==e)if(t.substr(s,3)===Q?(i=Q,s+=3):(i=e,b===0&&P(Fr)),i!==e){if(l=[],p=m(),p!==e)for(;p!==e;)l.push(p),p=m();else l=e;if(l!==e)if(p=Oe(),p!==e){for(f=[],y=m();y!==e;)f.push(y),y=m();if(y=s,t.charCodeAt(s)===61?(v=$e,s++):(v=e,b===0&&P(Rt)),v!==e){for(_=[],w=m();w!==e;)_.push(w),w=m();w=Pe(),w!==e?(U=y,y=$l(p,w)):(s=y,y=e)}else s=y,y=e;for(y===e&&(y=null),t.charCodeAt(s)===44?(v=K,s++):(v=e,b===0&&P(at)),v===e&&(v=null),_=[],w=m();w!==e;)_.push(w),w=m();if(w=Pe(),w!==e)if(t.charCodeAt(s)===41?(M=k,s++):(M=e,b===0&&P(Mt)),M!==e){for(F=[],D=m();D!==e;)F.push(D),D=m();D=vt(),D!==e?(U=n,n=xl(p,y,w,D)):(s=n,n=e)}else s=n,n=e;else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;if(n===e){if(n=s,t.substr(s,3)===J?(o=J,s+=3):(o=e,b===0&&P(Dt)),o!==e){if(g=[],u=m(),u!==e)for(;u!==e;)g.push(u),u=m();else g=e;if(g!==e)if(t.substr(s,3)===Q?(u=Q,s+=3):(u=e,b===0&&P(Fr)),u!==e){if(i=[],l=m(),l!==e)for(;l!==e;)i.push(l),l=m();else i=e;if(i!==e)if(l=Oe(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();if(f=s,t.charCodeAt(s)===61?(y=$e,s++):(y=e,b===0&&P(Rt)),y!==e){for(v=[],_=m();_!==e;)v.push(_),_=m();_=Pe(),_!==e?(U=f,f=bl(l,_)):(s=f,f=e)}else s=f,f=e;for(f===e&&(f=null),t.charCodeAt(s)===44?(y=K,s++):(y=e,b===0&&P(at)),y===e&&(y=null),v=[],_=m();_!==e;)v.push(_),_=m();if(_=Pe(),_!==e){if(w=[],M=m(),M!==e)for(;M!==e;)w.push(M),M=m();else w=e;w!==e?(M=vt(),M!==e?(U=n,n=Al(l,f,_,M)):(s=n,n=e)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;if(n===e){if(n=s,t.substr(s,3)===J?(o=J,s+=3):(o=e,b===0&&P(Dt)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(t.charCodeAt(s)===40?(u=C,s++):(u=e,b===0&&P(nr)),u!==e)if(i=Pe(),i!==e)if(t.charCodeAt(s)===41?(l=k,s++):(l=e,b===0&&P(Mt)),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();f=vt(),f!==e?(U=n,n=_l(i,f)):(s=n,n=e)}else s=n,n=e;else s=n,n=e;else s=n,n=e}else s=n,n=e;if(n===e)if(n=s,t.substr(s,3)===J?(o=J,s+=3):(o=e,b===0&&P(Dt)),o!==e){if(g=[],u=m(),u!==e)for(;u!==e;)g.push(u),u=m();else g=e;if(g!==e)if(u=Pe(),u!==e){if(i=[],l=m(),l!==e)for(;l!==e;)i.push(l),l=m();else i=e;i!==e?(l=vt(),l!==e?(U=n,n=Cl(u,l)):(s=n,n=e)):(s=n,n=e)}else s=n,n=e;else s=n,n=e}else s=n,n=e}}return E[V]={nextPos:s,result:n},n}function yo(){var n,o,g,u,i,l=s*76+21,p=E[l];if(p)return s=p.nextPos,p.result;if(n=s,t.substr(s,6)===Z?(o=Z,s+=6):(o=e,b===0&&P(qs)),o!==e)if(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e){for(u=[],i=m();i!==e;)u.push(i),i=m();i=Pe(),i!==e?(U=n,n=Pl(i)):(s=n,n=e)}else s=n,n=e;else s=n,n=e;return E[l]={nextPos:s,result:n},n}function mo(){var n,o,g,u,i,l,p,f,y=s*76+22,v=E[y];if(v)return s=v.nextPos,v.result;if(n=s,t.substr(s,4)===pe?(o=pe,s+=4):(o=e,b===0&&P(Rr)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(t.charCodeAt(s)===123?(u=I,s++):(u=e,b===0&&P(jt)),u!==e){for(i=[],l=m();l!==e;)i.push(l),l=m();if(l=Lr(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();t.charCodeAt(s)===125?(f=q,s++):(f=e,b===0&&P(st)),f!==e?(U=n,n=kl(l)):(s=n,n=e)}else s=n,n=e}else s=n,n=e}else s=n,n=e;return E[y]={nextPos:s,result:n},n}function wo(){var n,o,g,u,i=s*76+23,l=E[i];return l?(s=l.nextPos,l.result):(n=s,t.substr(s,5)===we?(o=we,s+=5):(o=e,b===0&&P(Oa)),o!==e?(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e?(U=n,n=El()):(s=n,n=e)):(s=n,n=e),E[i]={nextPos:s,result:n},n)}function $o(){var n,o,g,u,i=s*76+24,l=E[i];return l?(s=l.nextPos,l.result):(n=s,t.substr(s,8)===fe?(o=fe,s+=8):(o=e,b===0&&P(Ia)),o!==e?(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e?(U=n,n=Ml()):(s=n,n=e)):(s=n,n=e),E[i]={nextPos:s,result:n},n)}function xo(){var n,o,g,u,i,l,p=s*76+25,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,o=Pe(),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(t.substr(s,2)===Fe?(u=Fe,s+=2):(u=e,b===0&&P(Na)),u===e&&(t.substr(s,2)===Ze?(u=Ze,s+=2):(u=e,b===0&&P(ja)),u===e&&(t.charCodeAt(s)===61?(u=$e,s++):(u=e,b===0&&P(Rt)))),u!==e){for(i=[],l=m();l!==e;)i.push(l),l=m();l=Pe(),l!==e?(U=n,n=Sl(o,u,l)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function bo(){var n,o,g,u,i,l,p,f,y=s*76+26,v=E[y];if(v)return s=v.nextPos,v.result;if(n=s,o=Hr(),o!==e){for(g=[],u=s,i=[],l=Zt();l!==e;)i.push(l),l=Zt();if(l=qn(),l!==e){for(p=[],f=Zt();f!==e;)p.push(f),f=Zt();f=Hr(),f!==e?(U=u,u=In(o,l,f)):(s=u,u=e)}else s=u,u=e;if(u!==e)for(;u!==e;){for(g.push(u),u=s,i=[],l=Zt();l!==e;)i.push(l),l=Zt();if(l=qn(),l!==e){for(p=[],f=Zt();f!==e;)p.push(f),f=Zt();f=Hr(),f!==e?(U=u,u=In(o,l,f)):(s=u,u=e)}else s=u,u=e}else g=e;g!==e?(U=n,n=Fl(o,g)):(s=n,n=e)}else s=n,n=e;return E[y]={nextPos:s,result:n},n}function Zt(){var n,o,g,u=s*76+27,i=E[u];return i?(s=i.nextPos,i.result):(n=s,t.charCodeAt(s)===92?(o=It,s++):(o=e,b===0&&P(En)),o!==e?(g=We(),g!==e?(o=[o,g],n=o):(s=n,n=e)):(s=n,n=e),n===e&&(n=be()),E[u]={nextPos:s,result:n},n)}function qn(){var n,o,g=s*76+28,u=E[g];return u?(s=u.nextPos,u.result):(n=s,t.substr(s,2)===Xe?(o=Xe,s+=2):(o=e,b===0&&P(Ti)),o===e&&(t.substr(s,2)===Ye?(o=Ye,s+=2):(o=e,b===0&&P(Ra)),o===e&&(t.substr(s,2)===_e?(o=_e,s+=2):(o=e,b===0&&P(Da)),o===e&&(t.substr(s,2)===Je?(o=Je,s+=2):(o=e,b===0&&P(La)),o===e&&(t.substr(s,2)===gt?(o=gt,s+=2):(o=e,b===0&&P(Ha)),o===e&&(t.substr(s,2)===mt?(o=mt,s+=2):(o=e,b===0&&P(Ua)),o===e&&(t.charCodeAt(s)===60?(o=Le,s++):(o=e,b===0&&P(Mn)),o===e&&(t.charCodeAt(s)===62?(o=$r,s++):(o=e,b===0&&P(Ks)),o===e&&(t.charCodeAt(s)===43?(o=_t,s++):(o=e,b===0&&P(Oi)),o===e&&(t.charCodeAt(s)===45?(o=Jt,s++):(o=e,b===0&&P(Ba)),o===e&&(t.charCodeAt(s)===42?(o=ft,s++):(o=e,b===0&&P(Sn)),o===e&&(t.charCodeAt(s)===94?(o=Kt,s++):(o=e,b===0&&P(Ii)),o===e&&(t.charCodeAt(s)===47?(o=cr,s++):(o=e,b===0&&P(za)),o===e&&(t.charCodeAt(s)===37?(o=Yt,s++):(o=e,b===0&&P(qa))))))))))))))),o!==e&&(U=n,o=Di()),n=o,E[g]={nextPos:s,result:n},n)}function Ao(){var n,o,g,u=s*76+29,i=E[u];return i?(s=i.nextPos,i.result):(n=s,t.charCodeAt(s)===33?(o=rr,s++):(o=e,b===0&&P(Ka)),o!==e?(g=Pe(),g!==e?(U=n,n=Tl(g)):(s=n,n=e)):(s=n,n=e),E[u]={nextPos:s,result:n},n)}function es(){var n,o,g,u,i=s*76+30,l=E[i];if(l)return s=l.nextPos,l.result;if(n=s,o=ms(),o!==e){if(g=[],u=tn(),u===e&&(u=Kn(),u===e&&(u=rn())),u!==e)for(;u!==e;)g.push(u),u=tn(),u===e&&(u=Kn(),u===e&&(u=rn()));else g=e;g!==e?(U=n,n=Ol(o,g)):(s=n,n=e)}else s=n,n=e;return E[i]={nextPos:s,result:n},n}function tn(){var n,o,g,u,i,l,p=s*76+31,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,t.charCodeAt(s)===40?(o=C,s++):(o=e,b===0&&P(nr)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();for(u=_o(),u===e&&(u=null),i=[],l=m();l!==e;)i.push(l),l=m();t.charCodeAt(s)===41?(l=k,s++):(l=e,b===0&&P(Mt)),l!==e?(U=n,n=Il(u)):(s=n,n=e)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function _o(){var n,o,g,u,i,l,p=s*76+32,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,o=Pe(),o!==e){for(g=[],u=s,i=xr(),i!==e?(l=Pe(),l!==e?(U=u,u=Nn(o,l)):(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,i=xr(),i!==e?(l=Pe(),l!==e?(U=u,u=Nn(o,l)):(s=u,u=e)):(s=u,u=e);U=n,n=Nl(o,g)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function Kn(){var n,o,g,u,i,l,p=s*76+33,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,t.charCodeAt(s)===91?(o=Ct,s++):(o=e,b===0&&P(Is)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(u=Pe(),u!==e){for(i=[],l=m();l!==e;)i.push(l),l=m();t.charCodeAt(s)===93?(l=L,s++):(l=e,b===0&&P(os)),l!==e?(U=n,n=Li(u)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function rn(){var n,o,g,u=s*76+34,i=E[u];return i?(s=i.nextPos,i.result):(n=s,t.charCodeAt(s)===46?(o=R,s++):(o=e,b===0&&P(us)),o!==e?(g=Oe(),g!==e?(U=n,n=jl(g)):(s=n,n=e)):(s=n,n=e),E[u]={nextPos:s,result:n},n)}function Co(){var n,o,g,u,i,l,p,f,y,v,_=s*76+35,w=E[_];if(w)return s=w.nextPos,w.result;if(n=s,t.substr(s,2)===B?(o=B,s+=2):(o=e,b===0&&P(Fn)),o!==e){if(g=[],u=m(),u!==e)for(;u!==e;)g.push(u),u=m();else g=e;if(g!==e)if(u=Pe(),u!==e){if(i=[],l=m(),l!==e)for(;l!==e;)i.push(l),l=m();else i=e;if(i!==e)if(l=vt(),l!==e){if(p=s,f=[],y=m(),y!==e)for(;y!==e;)f.push(y),y=m();else f=e;if(f!==e?(y=Gi(),y!==e?p=y:(s=p,p=e)):(s=p,p=e),p===e&&(p=null),f=s,y=[],v=m(),v!==e)for(;v!==e;)y.push(v),v=m();else y=e;y!==e?(v=Po(),v!==e?f=v:(s=f,f=e)):(s=f,f=e),f===e&&(f=null),U=n,n=Rl(u,l,p,f)}else s=n,n=e;else s=n,n=e}else s=n,n=e;else s=n,n=e}else s=n,n=e;return E[_]={nextPos:s,result:n},n}function Gi(){var n,o,g,u,i,l,p=s*76+36,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,o=Ps(),o!==e){for(g=[],u=s,i=[],l=m();l!==e;)i.push(l),l=m();for(l=Ps(),l!==e?u=l:(s=u,u=e);u!==e;){for(g.push(u),u=s,i=[],l=m();l!==e;)i.push(l),l=m();l=Ps(),l!==e?u=l:(s=u,u=e)}U=n,n=Dl(o,g)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function Ps(){var n,o,g,u,i,l,p,f=s*76+37,y=E[f];if(y)return s=y.nextPos,y.result;if(n=s,t.substr(s,4)===Y?(o=Y,s+=4):(o=e,b===0&&P(Va)),o!==e)if(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e){for(u=[],i=m();i!==e;)u.push(i),i=m();if(i=Pe(),i!==e){for(l=[],p=m();p!==e;)l.push(p),p=m();p=vt(),p!==e?(U=n,n=Ll(i,p)):(s=n,n=e)}else s=n,n=e}else s=n,n=e;else s=n,n=e;return E[f]={nextPos:s,result:n},n}function Po(){var n,o,g,u,i,l=s*76+38,p=E[l];if(p)return s=p.nextPos,p.result;if(n=s,t.substr(s,4)===se?(o=se,s+=4):(o=e,b===0&&P(Wa)),o!==e)if(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e){for(u=[],i=m();i!==e;)u.push(i),i=m();i=vt(),i!==e?(U=n,n=Hl(i)):(s=n,n=e)}else s=n,n=e;else s=n,n=e;return E[l]={nextPos:s,result:n},n}function ko(){var n,o,g,u,i,l,p,f,y,v,_,w,M,F,D,V,G,Te=s*76+39,Ae=E[Te];if(Ae)return s=Ae.nextPos,Ae.result;if(n=s,t.substr(s,5)===le?(o=le,s+=5):(o=e,b===0&&P(Ja)),o!==e)if(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e){for(u=[],i=m();i!==e;)u.push(i),i=m();if(i=Pe(),i!==e){for(l=[],p=m();p!==e;)l.push(p),p=m();if(t.charCodeAt(s)===123?(p=I,s++):(p=e,b===0&&P(jt)),p!==e){for(f=[],y=m();y!==e;)f.push(y),y=m();if(y=[],v=s,_=Pe(),_!==e){for(w=[],M=m();M!==e;)w.push(M),M=m();if(t.substr(s,2)===ne?(M=ne,s+=2):(M=e,b===0&&P(fs)),M!==e){for(F=[],D=m();D!==e;)F.push(D),D=m();if(D=vt(),D!==e){for(V=[],G=m();G!==e;)V.push(G),G=m();U=v,v=jn(i,_,D)}else s=v,v=e}else s=v,v=e}else s=v,v=e;if(v!==e)for(;v!==e;)if(y.push(v),v=s,_=Pe(),_!==e){for(w=[],M=m();M!==e;)w.push(M),M=m();if(t.substr(s,2)===ne?(M=ne,s+=2):(M=e,b===0&&P(fs)),M!==e){for(F=[],D=m();D!==e;)F.push(D),D=m();if(D=vt(),D!==e){for(V=[],G=m();G!==e;)V.push(G),G=m();U=v,v=jn(i,_,D)}else s=v,v=e}else s=v,v=e}else s=v,v=e;else y=e;if(y!==e){if(v=s,t.charCodeAt(s)===42?(_=ft,s++):(_=e,b===0&&P(Sn)),_!==e){for(w=[],M=m();M!==e;)w.push(M),M=m();if(t.substr(s,2)===ne?(M=ne,s+=2):(M=e,b===0&&P(fs)),M!==e){for(F=[],D=m();D!==e;)F.push(D),D=m();if(D=vt(),D!==e){for(V=[],G=m();G!==e;)V.push(G),G=m();v=D}else s=v,v=e}else s=v,v=e}else s=v,v=e;for(v===e&&(v=null),_=[],w=m();w!==e;)_.push(w),w=m();t.charCodeAt(s)===125?(w=q,s++):(w=e,b===0&&P(st)),w!==e?(U=n,n=Ul(i,y,v)):(s=n,n=e)}else s=n,n=e}else s=n,n=e}else s=n,n=e}else s=n,n=e;else s=n,n=e;return E[Te]={nextPos:s,result:n},n}function Vn(){var n,o,g,u,i,l,p,f,y=s*76+40,v=E[y];if(v)return s=v.nextPos,v.result;if(n=s,t.substr(s,4)===xe?(o=xe,s+=4):(o=e,b===0&&P(Vs)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(t.charCodeAt(s)===123?(u=I,s++):(u=e,b===0&&P(jt)),u!==e){for(i=[],l=m();l!==e;)i.push(l),l=m();if(l=Lr(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();t.charCodeAt(s)===125?(f=q,s++):(f=e,b===0&&P(st)),f!==e?(U=n,n=Hi(l)):(s=n,n=e)}else s=n,n=e}else s=n,n=e}else s=n,n=e;return E[y]={nextPos:s,result:n},n}function Eo(){var n,o,g=s*76+41,u=E[g];return u?(s=u.nextPos,u.result):(n=s,o=No(),o!==e&&(U=n,o=Bl(o)),n=o,E[g]={nextPos:s,result:n},n)}function Wn(){var n,o,g,u,i,l,p=s*76+42,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,t.charCodeAt(s)===96?(o=ce,s++):(o=e,b===0&&P(cs)),o!==e){for(g=[],u=s,i=s,b++,t.charCodeAt(s)===96?(l=ce,s++):(l=e,b===0&&P(cs)),b--,l===e?i=void 0:(s=i,i=e),i!==e?(l=Jn(),l!==e?u=l:(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,i=s,b++,t.charCodeAt(s)===96?(l=ce,s++):(l=e,b===0&&P(cs)),b--,l===e?i=void 0:(s=i,i=e),i!==e?(l=Jn(),l!==e?u=l:(s=u,u=e)):(s=u,u=e);t.charCodeAt(s)===96?(u=ce,s++):(u=e,b===0&&P(cs)),u!==e?(U=n,n=zl(g)):(s=n,n=e)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function Jn(){var n,o,g,u,i,l,p=s*76+43,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,t.charCodeAt(s)===123?(o=I,s++):(o=e,b===0&&P(jt)),o!==e){for(g=[],u=be();u!==e;)g.push(u),u=be();if(u=Pe(),u!==e){for(i=[],l=be();l!==e;)i.push(l),l=be();t.charCodeAt(s)===125?(l=q,s++):(l=e,b===0&&P(st)),l!==e?n=u:(s=n,n=e)}else s=n,n=e}else s=n,n=e;if(n===e){if(n=s,o=[],g=Zn(),g!==e)for(;g!==e;)o.push(g),g=Zn();else o=e;o!==e&&(U=n,o=ql(o)),n=o}return E[p]={nextPos:s,result:n},n}function Zn(){var n,o=s*76+44,g=E[o];return g?(s=g.nextPos,g.result):(n=ea(),n===e&&(hr.test(t.charAt(s))?(n=t.charAt(s),s++):(n=e,b===0&&P(Za))),E[o]={nextPos:s,result:n},n)}function ea(){var n,o,g,u=s*76+45,i=E[u];return i?(s=i.nextPos,i.result):(n=s,t.charCodeAt(s)===92?(o=It,s++):(o=e,b===0&&P(En)),o!==e?(ls.test(t.charAt(s))?(g=t.charAt(s),s++):(g=e,b===0&&P(Ws)),g!==e?n=g:(s=n,n=e)):(s=n,n=e),E[u]={nextPos:s,result:n},n)}function ks(){var n,o,g,u,i,l,p=s*76+46,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,t.charCodeAt(s)===34?(o=he,s++):(o=e,b===0&&P(hs)),o!==e){for(g=[],u=s,i=s,b++,t.charCodeAt(s)===34?(l=he,s++):(l=e,b===0&&P(hs)),b--,l===e?i=void 0:(s=i,i=e),i!==e?(l=sn(),l===e&&(t.length>s?(l=t.charAt(s),s++):(l=e,b===0&&P(Nt))),l!==e?(U=u,u=Rn(l)):(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,i=s,b++,t.charCodeAt(s)===34?(l=he,s++):(l=e,b===0&&P(hs)),b--,l===e?i=void 0:(s=i,i=e),i!==e?(l=sn(),l===e&&(t.length>s?(l=t.charAt(s),s++):(l=e,b===0&&P(Nt))),l!==e?(U=u,u=Rn(l)):(s=u,u=e)):(s=u,u=e);t.charCodeAt(s)===34?(u=he,s++):(u=e,b===0&&P(hs)),u!==e?(U=n,n=Kl(g)):(s=n,n=e)}else s=n,n=e;if(n===e)if(n=s,t.charCodeAt(s)===39?(o=ie,s++):(o=e,b===0&&P(ps)),o!==e){for(g=[],u=s,i=s,b++,t.charCodeAt(s)===39?(l=ie,s++):(l=e,b===0&&P(ps)),b--,l===e?i=void 0:(s=i,i=e),i!==e?(l=nn(),l===e&&(t.length>s?(l=t.charAt(s),s++):(l=e,b===0&&P(Nt))),l!==e?(U=u,u=Dn(l)):(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,i=s,b++,t.charCodeAt(s)===39?(l=ie,s++):(l=e,b===0&&P(ps)),b--,l===e?i=void 0:(s=i,i=e),i!==e?(l=nn(),l===e&&(t.length>s?(l=t.charAt(s),s++):(l=e,b===0&&P(Nt))),l!==e?(U=u,u=Dn(l)):(s=u,u=e)):(s=u,u=e);t.charCodeAt(s)===39?(u=ie,s++):(u=e,b===0&&P(ps)),u!==e?(U=n,n=Ui(g)):(s=n,n=e)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function sn(){var n,o,g=s*76+47,u=E[g];return u?(s=u.nextPos,u.result):(n=s,t.substr(s,2)===Ee?(o=Ee,s+=2):(o=e,b===0&&P(Js)),o!==e&&(U=n,o=Vl()),n=o,E[g]={nextPos:s,result:n},n)}function nn(){var n,o,g=s*76+48,u=E[g];return u?(s=u.nextPos,u.result):(n=s,t.substr(s,2)===Ce?(o=Ce,s+=2):(o=e,b===0&&P(Zs)),o!==e&&(U=n,o=Bi()),n=o,E[g]={nextPos:s,result:n},n)}function Xn(){var n,o=s*76+49,g=E[o];return g?(s=g.nextPos,g.result):(n=Yn(),n===e&&(n=ta()),E[o]={nextPos:s,result:n},n)}function Yn(){var n,o,g,u,i,l,p=s*76+50,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,Mr.test(t.charAt(s))?(t.charAt(s),s++):b===0&&P(gs),Et.test(t.charAt(s))?(o=t.charAt(s),s++):(o=e,b===0&&P(Tn)),o!==e){if(g=[],Ge.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(wt)),u!==e)for(;u!==e;)g.push(u),Ge.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(wt));else g=e;if(g!==e)if(t.charCodeAt(s)===46?(u=R,s++):(u=e,b===0&&P(us)),u!==e){if(i=[],Ge.test(t.charAt(s))?(l=t.charAt(s),s++):(l=e,b===0&&P(wt)),l!==e)for(;l!==e;)i.push(l),Ge.test(t.charAt(s))?(l=t.charAt(s),s++):(l=e,b===0&&P(wt));else i=e;i!==e?(U=n,n=Wl()):(s=n,n=e)}else s=n,n=e;else s=n,n=e}else s=n,n=e;if(n===e)if(n=s,Mr.test(t.charAt(s))?(t.charAt(s),s++):b===0&&P(gs),Ge.test(t.charAt(s))?(o=t.charAt(s),s++):(o=e,b===0&&P(wt)),o!==e)if(t.charCodeAt(s)===46?(g=R,s++):(g=e,b===0&&P(us)),g!==e){if(u=[],Ge.test(t.charAt(s))?(i=t.charAt(s),s++):(i=e,b===0&&P(wt)),i!==e)for(;i!==e;)u.push(i),Ge.test(t.charAt(s))?(i=t.charAt(s),s++):(i=e,b===0&&P(wt));else u=e;u!==e?(U=n,n=Jl()):(s=n,n=e)}else s=n,n=e;else s=n,n=e;return E[p]={nextPos:s,result:n},n}function ta(){var n,o,g,u,i=s*76+51,l=E[i];if(l)return s=l.nextPos,l.result;if(n=s,Mr.test(t.charAt(s))?(t.charAt(s),s++):b===0&&P(gs),Et.test(t.charAt(s))?(o=t.charAt(s),s++):(o=e,b===0&&P(Tn)),o!==e){if(g=[],Ge.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(wt)),u!==e)for(;u!==e;)g.push(u),Ge.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(wt));else g=e;g!==e?(U=n,n=Zl()):(s=n,n=e)}else s=n,n=e;return n===e&&(n=s,Mr.test(t.charAt(s))?(t.charAt(s),s++):b===0&&P(gs),Ge.test(t.charAt(s))?(o=t.charAt(s),s++):(o=e,b===0&&P(wt)),o!==e?(U=n,n=Xl()):(s=n,n=e)),E[i]={nextPos:s,result:n},n}function an(){var n,o=s*76+52,g=E[o];return g?(s=g.nextPos,g.result):(n=ra(),n===e&&(n=Mo()),E[o]={nextPos:s,result:n},n)}function ra(){var n,o,g,u,i=s*76+53,l=E[i];return l?(s=l.nextPos,l.result):(n=s,t.substr(s,4)===Me?(o=Me,s+=4):(o=e,b===0&&P(Ni)),o!==e?(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e?(U=n,n=Yl()):(s=n,n=e)):(s=n,n=e),E[i]={nextPos:s,result:n},n)}function Mo(){var n,o,g,u,i=s*76+54,l=E[i];return l?(s=l.nextPos,l.result):(n=s,t.substr(s,5)===Ie?(o=Ie,s+=5):(o=e,b===0&&P(Tr)),o!==e?(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e?(U=n,n=Ql()):(s=n,n=e)):(s=n,n=e),E[i]={nextPos:s,result:n},n)}function Qn(){var n,o,g,u,i=s*76+55,l=E[i];return l?(s=l.nextPos,l.result):(n=s,t.substr(s,4)===De?(o=De,s+=4):(o=e,b===0&&P(Xa)),o!==e?(g=s,b++,lt.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(zt)),b--,u===e?g=void 0:(s=g,g=e),g!==e?(U=n,n=Gl()):(s=n,n=e)):(s=n,n=e),E[i]={nextPos:s,result:n},n)}function sa(){var n,o,g,u,i,l,p,f,y,v,_,w,M,F,D=s*76+56,V=E[D];if(V)return s=V.nextPos,V.result;if(n=s,t.charCodeAt(s)===123?(o=I,s++):(o=e,b===0&&P(jt)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(u=[],i=s,l=Oe(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();if(t.charCodeAt(s)===58?(f=oe,s++):(f=e,b===0&&P(ot)),f!==e){if(y=[],v=m(),v!==e)for(;v!==e;)y.push(v),v=m();else y=e;if(y!==e)if(v=Pe(),v!==e){for(_=[],w=m();w!==e;)_.push(w),w=m();for(t.charCodeAt(s)===44?(w=K,s++):(w=e,b===0&&P(at)),w===e&&(t.charCodeAt(s)===59?(w=Ve,s++):(w=e,b===0&&P(vs))),w===e&&(w=null),M=[],F=m();F!==e;)M.push(F),F=m();U=i,i=Ln(l,v)}else s=i,i=e;else s=i,i=e}else s=i,i=e}else s=i,i=e;for(;i!==e;)if(u.push(i),i=s,l=Oe(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();if(t.charCodeAt(s)===58?(f=oe,s++):(f=e,b===0&&P(ot)),f!==e){if(y=[],v=m(),v!==e)for(;v!==e;)y.push(v),v=m();else y=e;if(y!==e)if(v=Pe(),v!==e){for(_=[],w=m();w!==e;)_.push(w),w=m();for(t.charCodeAt(s)===44?(w=K,s++):(w=e,b===0&&P(at)),w===e&&(t.charCodeAt(s)===59?(w=Ve,s++):(w=e,b===0&&P(vs))),w===e&&(w=null),M=[],F=m();F!==e;)M.push(F),F=m();U=i,i=Ln(l,v)}else s=i,i=e;else s=i,i=e}else s=i,i=e}else s=i,i=e;t.charCodeAt(s)===125?(i=q,s++):(i=e,b===0&&P(st)),i!==e?(U=n,n=eo(u)):(s=n,n=e)}else s=n,n=e;return E[D]={nextPos:s,result:n},n}function So(){var n,o,g,u,i,l,p,f,y,v,_=s*76+57,w=E[_];if(w)return s=w.nextPos,w.result;if(n=s,t.charCodeAt(s)===91?(o=Ct,s++):(o=e,b===0&&P(Is)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(u=[],i=s,l=Pe(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();for(t.charCodeAt(s)===44?(f=K,s++):(f=e,b===0&&P(at)),f===e&&(f=null),y=[],v=m();v!==e;)y.push(v),v=m();U=i,i=Hn(l)}else s=i,i=e;for(;i!==e;)if(u.push(i),i=s,l=Pe(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();for(t.charCodeAt(s)===44?(f=K,s++):(f=e,b===0&&P(at)),f===e&&(f=null),y=[],v=m();v!==e;)y.push(v),v=m();U=i,i=Hn(l)}else s=i,i=e;for(i=[],l=m();l!==e;)i.push(l),l=m();t.charCodeAt(s)===93?(l=L,s++):(l=e,b===0&&P(os)),l!==e?(U=n,n=zi(u)):(s=n,n=e)}else s=n,n=e;return E[_]={nextPos:s,result:n},n}function Rs(){var n,o,g,u,i,l,p,f=s*76+58,y=E[f];if(y)return s=y.nextPos,y.result;if(n=s,o=Oe(),o!==e){for(g=s,u=[],i=m();i!==e;)u.push(i),i=m();if(t.charCodeAt(s)===58?(i=oe,s++):(i=e,b===0&&P(ot)),i!==e){for(l=[],p=m();p!==e;)l.push(p),p=m();p=St(),p!==e?g=p:(s=g,g=e)}else s=g,g=e;g===e&&(g=null),U=n,n=to(o,g)}else s=n,n=e;return E[f]={nextPos:s,result:n},n}function ln(){var n,o,g,u,i,l,p=s*76+59,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,o=Rs(),o!==e){for(g=[],u=s,i=xr(),i!==e?(l=Rs(),l!==e?u=l:(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,i=xr(),i!==e?(l=Rs(),l!==e?u=l:(s=u,u=e)):(s=u,u=e);U=n,n=qi(o,g)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function Gn(){var n,o,g,u,i,l,p,f,y,v,_,w,M,F,D,V,G,Te=s*76+60,Ae=E[Te];if(Ae)return s=Ae.nextPos,Ae.result;if(n=s,t.charCodeAt(s)===64?(o=Qe,s++):(o=e,b===0&&P(Ya)),o!==e){for(g=[],u=be();u!==e;)g.push(u),u=be();if(u=Oe(),u!==e){for(i=[],l=be();l!==e;)i.push(l),l=be();if(t.charCodeAt(s)===40?(l=C,s++):(l=e,b===0&&P(nr)),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();for(f=ln(),f===e&&(f=null),y=[],v=m();v!==e;)y.push(v),v=m();if(t.charCodeAt(s)===41?(v=k,s++):(v=e,b===0&&P(Mt)),v!==e){for(_=s,w=[],M=m();M!==e;)w.push(M),M=m();if(t.charCodeAt(s)===58?(M=oe,s++):(M=e,b===0&&P(ot)),M!==e){for(F=[],D=m();D!==e;)F.push(D),D=m();D=St(),D!==e?_=D:(s=_,_=e)}else s=_,_=e;for(_===e&&(_=null),w=[],M=m();M!==e;)w.push(M),M=m();if(t.charCodeAt(s)===123?(M=I,s++):(M=e,b===0&&P(jt)),M!==e){for(F=[],D=m();D!==e;)F.push(D),D=m();for(D=Lr(),D===e&&(D=null),V=[],G=m();G!==e;)V.push(G),G=m();t.charCodeAt(s)===125?(G=q,s++):(G=e,b===0&&P(st)),G!==e?(U=n,n=ro(g,u,i,f,_,D)):(s=n,n=e)}else s=n,n=e}else s=n,n=e}else s=n,n=e}else s=n,n=e}else s=n,n=e;return E[Te]={nextPos:s,result:n},n}function Fo(){var n,o,g,u,i,l,p,f,y,v,_,w,M,F=s*76+61,D=E[F];if(D)return s=D.nextPos,D.result;if(n=s,t.substr(s,2)===rt?(o=rt,s+=2):(o=e,b===0&&P(_s)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();for(u=ln(),u===e&&(u=null),i=[],l=m();l!==e;)i.push(l),l=m();if(t.charCodeAt(s)===41?(l=k,s++):(l=e,b===0&&P(Mt)),l!==e){for(p=s,f=[],y=m();y!==e;)f.push(y),y=m();if(t.charCodeAt(s)===58?(y=oe,s++):(y=e,b===0&&P(ot)),y!==e){for(v=[],_=m();_!==e;)v.push(_),_=m();_=St(),_!==e?p=_:(s=p,p=e)}else s=p,p=e;for(p===e&&(p=null),f=[],y=m();y!==e;)f.push(y),y=m();if(t.charCodeAt(s)===123?(y=I,s++):(y=e,b===0&&P(jt)),y!==e){for(v=[],_=m();_!==e;)v.push(_),_=m();for(_=Lr(),_===e&&(_=null),w=[],M=m();M!==e;)w.push(M),M=m();t.charCodeAt(s)===125?(M=q,s++):(M=e,b===0&&P(st)),M!==e?(U=n,n=so(u,p,_)):(s=n,n=e)}else s=n,n=e}else s=n,n=e}else s=n,n=e;return E[F]={nextPos:s,result:n},n}function ei(){var n,o,g,u,i,l,p,f,y,v,_=s*76+62,w=E[_];if(w)return s=w.nextPos,w.result;if(n=s,t.charCodeAt(s)===91?(o=Ct,s++):(o=e,b===0&&P(Is)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(u=[],i=s,l=Re(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();for(t.charCodeAt(s)===44?(f=K,s++):(f=e,b===0&&P(at)),f===e&&(f=null),y=[],v=m();v!==e;)y.push(v),v=m();U=i,i=Un(l)}else s=i,i=e;for(;i!==e;)if(u.push(i),i=s,l=Re(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();for(t.charCodeAt(s)===44?(f=K,s++):(f=e,b===0&&P(at)),f===e&&(f=null),y=[],v=m();v!==e;)y.push(v),v=m();U=i,i=Un(l)}else s=i,i=e;for(i=[],l=m();l!==e;)i.push(l),l=m();t.charCodeAt(s)===93?(l=L,s++):(l=e,b===0&&P(os)),l!==e?(U=n,n=no(u)):(s=n,n=e)}else s=n,n=e;return E[_]={nextPos:s,result:n},n}function na(){var n,o,g,u,i,l,p,f,y,v,_,w,M,F,D=s*76+63,V=E[D];if(V)return s=V.nextPos,V.result;if(n=s,t.charCodeAt(s)===123?(o=I,s++):(o=e,b===0&&P(jt)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();if(u=[],i=s,l=Oe(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();if(t.charCodeAt(s)===58?(f=oe,s++):(f=e,b===0&&P(ot)),f!==e){if(y=[],v=m(),v!==e)for(;v!==e;)y.push(v),v=m();else y=e;if(y!==e)if(v=Re(),v!==e){for(_=[],w=m();w!==e;)_.push(w),w=m();for(t.charCodeAt(s)===44?(w=K,s++):(w=e,b===0&&P(at)),w===e&&(t.charCodeAt(s)===59?(w=Ve,s++):(w=e,b===0&&P(vs))),w===e&&(w=null),M=[],F=m();F!==e;)M.push(F),F=m();U=i,i=Bn(l,v)}else s=i,i=e;else s=i,i=e}else s=i,i=e}else s=i,i=e;for(;i!==e;)if(u.push(i),i=s,l=Oe(),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();if(t.charCodeAt(s)===58?(f=oe,s++):(f=e,b===0&&P(ot)),f!==e){if(y=[],v=m(),v!==e)for(;v!==e;)y.push(v),v=m();else y=e;if(y!==e)if(v=Re(),v!==e){for(_=[],w=m();w!==e;)_.push(w),w=m();for(t.charCodeAt(s)===44?(w=K,s++):(w=e,b===0&&P(at)),w===e&&(t.charCodeAt(s)===59?(w=Ve,s++):(w=e,b===0&&P(vs))),w===e&&(w=null),M=[],F=m();F!==e;)M.push(F),F=m();U=i,i=Bn(l,v)}else s=i,i=e;else s=i,i=e}else s=i,i=e}else s=i,i=e;t.charCodeAt(s)===125?(i=q,s++):(i=e,b===0&&P(st)),i!==e?(U=n,n=Ki(u)):(s=n,n=e)}else s=n,n=e;return E[D]={nextPos:s,result:n},n}function St(){var n,o=s*76+64,g=E[o];return g?(s=g.nextPos,g.result):(n=To(),n===e&&(n=Io()),E[o]={nextPos:s,result:n},n)}function To(){var n,o,g,u,i,l,p,f,y,v,_=s*76+65,w=E[_];if(w)return s=w.nextPos,w.result;if(n=s,t.substr(s,2)===rt?(o=rt,s+=2):(o=e,b===0&&P(_s)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();for(u=Oo(),u===e&&(u=null),i=[],l=m();l!==e;)i.push(l),l=m();if(t.charCodeAt(s)===41?(l=k,s++):(l=e,b===0&&P(Mt)),l!==e){for(p=[],f=m();f!==e;)p.push(f),f=m();if(t.substr(s,2)===ne?(f=ne,s+=2):(f=e,b===0&&P(fs)),f!==e){for(y=[],v=m();v!==e;)y.push(v),v=m();v=St(),v!==e?(U=n,n=io(u,v)):(s=n,n=e)}else s=n,n=e}else s=n,n=e}else s=n,n=e;return E[_]={nextPos:s,result:n},n}function Oo(){var n,o,g,u,i,l,p=s*76+66,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,o=St(),o!==e){for(g=[],u=s,i=xr(),i!==e?(l=St(),l!==e?u=l:(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,i=xr(),i!==e?(l=St(),l!==e?u=l:(s=u,u=e)):(s=u,u=e);U=n,n=Vi(o,g)}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function Io(){var n,o,g,u,i,l,p,f,y=s*76+67,v=E[y];if(v)return s=v.nextPos,v.result;if(n=s,o=Oe(),o!==e){for(g=[],u=be();u!==e;)g.push(u),u=be();if(t.charCodeAt(s)===60?(u=Le,s++):(u=e,b===0&&P(Mn)),u!==e){for(i=[],l=be();l!==e;)i.push(l),l=be();if(l=St(),l!==e){for(p=[],f=be();f!==e;)p.push(f),f=be();t.charCodeAt(s)===62?(f=$r,s++):(f=e,b===0&&P(Ks)),f!==e?(U=n,n=ao(o,l)):(s=n,n=e)}else s=n,n=e}else s=n,n=e}else s=n,n=e;return n===e&&(n=s,o=Oe(),o!==e&&(U=n,o=lo(o)),n=o),E[y]={nextPos:s,result:n},n}function Oe(){var n,o,g,u,i=s*76+68,l=E[i];if(l)return s=l.nextPos,l.result;if(n=s,sr.test(t.charAt(s))?(o=t.charAt(s),s++):(o=e,b===0&&P(Qa)),o!==e){for(g=[],kn.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(Xs));u!==e;)g.push(u),kn.test(t.charAt(s))?(u=t.charAt(s),s++):(u=e,b===0&&P(Xs));U=n,n=oo()}else s=n,n=e;return E[i]={nextPos:s,result:n},n}function No(){var n,o,g,u,i,l,p=s*76+69,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,o=Oe(),o!==e){for(g=[],u=s,t.charCodeAt(s)===58?(i=oe,s++):(i=e,b===0&&P(ot)),i!==e?(l=Oe(),l!==e?(i=[i,l],u=i):(s=u,u=e)):(s=u,u=e);u!==e;)g.push(u),u=s,t.charCodeAt(s)===58?(i=oe,s++):(i=e,b===0&&P(ot)),i!==e?(l=Oe(),l!==e?(i=[i,l],u=i):(s=u,u=e)):(s=u,u=e);U=n,n=uo()}else s=n,n=e;return E[p]={nextPos:s,result:n},n}function xr(){var n,o,g,u,i,l=s*76+70,p=E[l];if(p)return s=p.nextPos,p.result;for(n=s,o=[],g=m();g!==e;)o.push(g),g=m();if(t.charCodeAt(s)===44?(g=K,s++):(g=e,b===0&&P(at)),g!==e){for(u=[],i=m();i!==e;)u.push(i),i=m();o=[o,g,u],n=o}else s=n,n=e;if(n===e)if(n=[],o=m(),o!==e)for(;o!==e;)n.push(o),o=m();else n=e;return E[l]={nextPos:s,result:n},n}function vt(){var n,o,g,u,i,l,p=s*76+71,f=E[p];if(f)return s=f.nextPos,f.result;if(n=s,t.charCodeAt(s)===123?(o=I,s++):(o=e,b===0&&P(jt)),o!==e){for(g=[],u=m();u!==e;)g.push(u),u=m();for(u=Lr(),u===e&&(u=null),i=[],l=m();l!==e;)i.push(l),l=m();t.charCodeAt(s)===125?(l=q,s++):(l=e,b===0&&P(st)),l!==e?(U=n,n=fo(u)):(s=n,n=e)}else s=n,n=e;return n===e&&(n=ar()),E[p]={nextPos:s,result:n},n}function We(){var n,o=s*76+72,g=E[o];return g?(s=g.nextPos,g.result):(t.substr(s,2)===Ut?(n=Ut,s+=2):(n=e,b===0&&P(Ga)),n===e&&(Fi.test(t.charAt(s))?(n=t.charAt(s),s++):(n=e,b===0&&P(ji))),E[o]={nextPos:s,result:n},n)}function ti(){var n,o,g=s*76+73,u=E[g];return u?(s=u.nextPos,u.result):(n=s,b++,t.length>s?(o=t.charAt(s),s++):(o=e,b===0&&P(Nt)),b--,o===e?n=void 0:(s=n,n=e),n===e&&(n=We()),E[g]={nextPos:s,result:n},n)}function m(){var n,o=s*76+74,g=E[o];return g?(s=g.nextPos,g.result):(Ea.test(t.charAt(s))?(n=t.charAt(s),s++):(n=e,b===0&&P(el)),E[o]={nextPos:s,result:n},n)}function be(){var n,o=s*76+75,g=E[o];return g?(s=g.nextPos,g.result):(Ma.test(t.charAt(s))?(n=t.charAt(s),s++):(n=e,b===0&&P(tl)),E[o]={nextPos:s,result:n},n)}function ee(n,o,g){const u={type:n};o.children=g;for(const l of Object.keys(o))o[l]!==void 0&&(u[l]=o[l]);const i=W();return u.loc={start:i.start.offset,end:i.end.offset-1},u}if(Dr=d(),Dr!==e&&s===t.length)return Dr;throw Dr!==e&&s`}else return t.name;case"fnTypeSource":{const r=t.args.map(a=>$u(a)).join(", "),e=$u(t.result);return`@(${r}) { ${e} }`}}}function $a(t){if(t.type==="namedTypeSource"){switch(t.name){case"null":case"bool":case"num":case"str":case"any":case"void":{if(t.inner==null)return _h(t.name);break}case"arr":case"obj":{let r;return t.inner!=null?r=$a(t.inner):r=_h("any"),Cm(t.name,[r])}}throw new _i(`Unknown type: '${$u(t)}'`)}else{const r=t.args.map(e=>$a(e));return Pm(r,$a(t.result))}}function km(t){switch(t.type){case"def":{t.varType!=null&&$a(t.varType);break}case"fn":{for(const r of t.args)r.argType!=null&&$a(r.argType);t.retType!=null&&$a(t.retType);break}}return t}function Em(t){for(const r of t)ze(r,km);return t}function xu(t){const r=[],e=[];for(const a of t)if(a.type==="attr")e.push(a);else if(a.type==="def")a.attr==null&&(a.attr=[]),a.attr.push(...e),e.splice(0,e.length),a.expr.type==="fn"&&(a.expr.children=xu(a.expr.children)),r.push(a);else{if(e.length>0)throw new _i("invalid attribute.");switch(a.type){case"fn":{a.children=xu(a.children);break}case"block":{a.statements=xu(a.statements);break}}r.push(a)}if(e.length>0)throw new _i("invalid attribute.");return r}function Mm(t){if(wm(t)&&Up(t)&&t.chain!=null){const{chain:r,...e}=t;let a=e;for(const h of r)switch(h.type){case"callChain":{a=$m(a,h.args,h.loc);break}case"indexChain":{a=xm(a,h.index,h.loc);break}case"propChain":{a=bm(a,h.name,h.loc);break}}return a}return t}function Sm(t){for(let r=0;r":{func:"Core:gt",priority:4},"<=":{func:"Core:lteq",priority:4},">=":{func:"Core:gteq",priority:4},"&&":{mapFn:t=>({type:"and",left:pi(t.left),right:pi(t.right)}),priority:3},"||":{mapFn:t=>({type:"or",left:pi(t.left),right:pi(t.right)}),priority:3}};function Tm(t){const r=t.operators.map(a=>{const h=Fm[a];if(h==null)throw new _i(`No such operator: ${a}.`);return h});let e=bu(t.operands[0],t.operands[1],r[0]);for(let a=0;ae.type==="infix"?Tm(e):e);return t}const fi=class fi{constructor(){Be(this,"plugins");this.plugins={validate:[_m,Em],transform:[xu,Sm,Om]}}static parse(r){return fi.instance==null&&(fi.instance=new fi),fi.instance.parse(r)}addPlugin(r,e){switch(r){case"validate":this.plugins.validate.push(e);break;case"transform":this.plugins.transform.push(e);break;default:throw new Error("unknown plugin type")}}parse(r){let e;try{const a=Ah(r,{startRule:"Preprocess"});e=Ah(a,{startRule:"Main"})}catch(a){throw a.location?a.expected?new _i(`Parsing error. (Line ${a.location.start.line}:${a.location.start.column})`):new _i(`${a.message} (Line ${a.location.start.line}:${a.location.start.column})`):a}for(const a of this.plugins.validate)e=a(e);for(const a of this.plugins.transform)e=a(e);return e}};Be(fi,"instance");let Hf=fi;const Ch="0.14.1",Im={"Hello AiScript":'<: "Hello, AiScript!"',FizzBazz:`for (let i, 100) { - <: if (i % 15 == 0) "FizzBuzz" - elif (i % 3 == 0) "Fizz" - elif (i % 5 == 0) "Buzz" - else i - }`},Nm=t=>(tc("data-v-b9f39d34"),t=t(),rc(),t),jm={id:"root"},Rm={id:"grid1"},Dm={class:"type"},Lm={id:"grid2"},Hm=Nm(()=>Bt("header",null,null,-1)),Um=Ci({__name:"index",setup(t){const r=Pr(window.localStorage.getItem(Ch)??'<: "Hello, AiScript!"'),e=Pr(null),a=Pr([]),h=Pr(null);vi(r,()=>{window.localStorage.setItem(Ch,r.value);try{e.value=Hf.parse(r.value),h.value=null}catch($){const A=$;h.value=A.message,console.error("info"in A?A.info:A);return}},{immediate:!0});let d=null;const x=async()=>{a.value=[],d==null||d.abort(),d=new jr({},{in:$=>new Promise(A=>{const C=window.prompt($);A(C??"")}),out:$=>{a.value.push({id:Math.random(),type:$.type,text:Rf($,!0),print:!0})},log:($,A)=>{switch($){case"end":a.value.push({id:Math.random(),text:Rf(A.val,!0),print:!1});break}}});try{await d.exec(e.value)}catch($){console.error($),window.alert("{e}")}};return($,A)=>(ut(),Lt("div",jm,[Bt("div",Rm,[tt(xc,{modelValue:r.value,"onUpdate:modelValue":A[0]||(A[0]=C=>r.value=C),samples:Nu(Im),parseError:h.value,onRun:x},null,8,["modelValue","samples","parseError"]),tt(Jr,{id:"logs"},{header:pt(()=>[qt("Output")]),default:pt(()=>[(ut(!0),Lt(er,null,Jo(a.value,C=>(ut(),Lt("div",{class:tr(["log",[{print:C.print},C.type]]),key:C.id},[Bt("span",Dm,Zr(C.type),1),qt(" "+Zr(C.text),1)],2))),128))]),_:1})]),Bt("div",Lm,[tt(Jr,{id:"ast"},{header:pt(()=>[qt("AST")]),default:pt(()=>[Bt("pre",null,Zr(JSON.stringify(e.value,null," ")),1)]),_:1}),tt(Jr,{id:"bin"},{header:pt(()=>[qt("Bytecode")]),default:pt(()=>[Hm]),_:1}),tt(Jr,{id:"debugger"},{header:pt(()=>[qt("Debugger")]),_:1})])]))}});const Bm=Pi(Um,[["__scopeId","data-v-b9f39d34"]]),zm=Ci({__name:"App",setup(t){const r=Pr(window.localStorage.getItem("version")??"0.16.0"),e=["0.16.0","0.15.0","0.14.1"];function a(h){r.value=h,window.localStorage.setItem("version",r.value)}return(h,d)=>(ut(),Lt(er,null,[Bt("h1",null,[qt("AiScript ( "),tt(Ap,{id:"version",options:e,onSelect:a},{default:pt(()=>[qt(Zr(r.value),1)]),_:1}),qt(" ) Playground")]),r.value==="0.16.0"?(ut(),pa(oy,{key:0})):bn("",!0),r.value==="0.15.0"?(ut(),pa(Gy,{key:1})):bn("",!0),r.value==="0.14.1"?(ut(),pa(Bm,{key:2})):bn("",!0)],64))}});const qm=Pi(zm,[["__scopeId","data-v-0701d9c6"]]);vd(qm).mount("#app"); diff --git a/assets/index-c17f16ea.css b/assets/index-d80a0f28.css similarity index 57% rename from assets/index-c17f16ea.css rename to assets/index-d80a0f28.css index 894bca3..ed485b0 100644 --- a/assets/index-c17f16ea.css +++ b/assets/index-d80a0f28.css @@ -1 +1 @@ -._wrapper_k2i3y_2{display:inline-block}._menu_k2i3y_5{position:absolute;border:solid var(--borderThickness) #555;border-radius:4px;background:#202020;z-index:10}._opt_k2i3y_12{padding:8px 16px}._opt_k2i3y_12:not(:first-child){border-top:dashed var(--borderThickness) #555}.prism-editor-wrapper{width:100%;height:100%;display:flex;align-items:flex-start;overflow:auto;-o-tab-size:1.5em;tab-size:1.5em;-moz-tab-size:1.5em}@media (-ms-high-contrast:active),(-ms-high-contrast:none){.prism-editor-wrapper .prism-editor__textarea{color:transparent!important}.prism-editor-wrapper .prism-editor__textarea::-moz-selection{background-color:#accef7!important;color:transparent!important}.prism-editor-wrapper .prism-editor__textarea::selection{background-color:#accef7!important;color:transparent!important}}.prism-editor-wrapper .prism-editor__container{position:relative;text-align:left;box-sizing:border-box;padding:0;overflow:hidden;width:100%}.prism-editor-wrapper .prism-editor__line-numbers{height:100%;overflow:hidden;flex-shrink:0;padding-top:4px;margin-top:0;margin-right:10px}.prism-editor-wrapper .prism-editor__line-number{text-align:right;white-space:nowrap}.prism-editor-wrapper .prism-editor__textarea{position:absolute;top:0;left:0;height:100%;width:100%;resize:none;color:inherit;overflow:hidden;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-text-fill-color:transparent}.prism-editor-wrapper .prism-editor__editor,.prism-editor-wrapper .prism-editor__textarea{margin:0;border:0;background:none;box-sizing:inherit;display:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-ligatures:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;-moz-tab-size:inherit;-o-tab-size:inherit;tab-size:inherit;text-indent:inherit;text-rendering:inherit;text-transform:inherit;white-space:pre-wrap;word-wrap:keep-all;overflow-wrap:break-word;padding:0}.prism-editor-wrapper .prism-editor__textarea--empty{-webkit-text-fill-color:inherit!important}.prism-editor-wrapper .prism-editor__editor{position:relative;pointer-events:none}code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:none;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#272822}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#8292a2}.token.punctuation{color:#f8f8f2}.token.namespace{opacity:.7}.token.property,.token.tag,.token.constant,.token.symbol,.token.deleted{color:#f92672}.token.boolean,.token.number{color:#ae81ff}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#a6e22e}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.function,.token.class-name{color:#e6db74}.token.keyword{color:#66d9ef}.token.regex,.token.important{color:#fd971f}.token.important,.token.bold{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}._container_157we_2{display:flex;flex-direction:column;border:solid var(--borderThickness) #555;border-radius:8px;background:#202020}._header_157we_9{padding:8px 16px;border-bottom:dashed var(--borderThickness) #555;font-weight:700}._main_157we_14{flex:1;overflow:auto;padding:16px}._footer_157we_19{padding:8px 16px;border-top:dashed var(--borderThickness) #555}._code_kvmon_2{box-sizing:border-box;padding:0}._parseError_kvmon_6{color:red}._actions_kvmon_9{margin-left:auto;float:right}pre[data-v-68118b39]{margin:0}#root[data-v-68118b39]{display:flex;flex-direction:column;height:100vh}#grid1[data-v-68118b39]{box-sizing:border-box;flex:1;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;grid-gap:16px;padding:16px;min-height:0}#grid1>*[data-v-68118b39]{min-height:0}#grid2[data-v-68118b39]{box-sizing:border-box;flex:1;display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr;grid-gap:16px;padding:0 16px 16px;min-height:0}#grid2>*[data-v-68118b39]{min-height:0}#logs .log .type[data-v-68118b39]{opacity:.5;color:#fff}#logs .log[data-v-68118b39]:not(.print){opacity:.7}#logs .log.num[data-v-68118b39]{color:#0ff}#logs .log.str[data-v-68118b39]{color:#ff0}.actions[data-v-68118b39]{margin-left:auto}pre[data-v-2f3e9383]{margin:0}#root[data-v-2f3e9383]{display:flex;flex-direction:column;height:100vh}#grid1[data-v-2f3e9383]{box-sizing:border-box;flex:1;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;grid-gap:16px;padding:16px;min-height:0}#grid1>*[data-v-2f3e9383]{min-height:0}#grid2[data-v-2f3e9383]{box-sizing:border-box;flex:1;display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr;grid-gap:16px;padding:0 16px 16px;min-height:0}#grid2>*[data-v-2f3e9383]{min-height:0}#logs .log .type[data-v-2f3e9383]{opacity:.5;color:#fff}#logs .log[data-v-2f3e9383]:not(.print){opacity:.7}#logs .log.num[data-v-2f3e9383]{color:#0ff}#logs .log.str[data-v-2f3e9383]{color:#ff0}.actions[data-v-2f3e9383]{margin-left:auto}pre[data-v-b9f39d34]{margin:0}#root[data-v-b9f39d34]{display:flex;flex-direction:column;height:100vh}#grid1[data-v-b9f39d34]{box-sizing:border-box;flex:1;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;grid-gap:16px;padding:16px;min-height:0}#grid1>*[data-v-b9f39d34]{min-height:0}#grid2[data-v-b9f39d34]{box-sizing:border-box;flex:1;display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr;grid-gap:16px;padding:0 16px 16px;min-height:0}#grid2>*[data-v-b9f39d34]{min-height:0}#logs .log .type[data-v-b9f39d34]{opacity:.5;color:#fff}#logs .log[data-v-b9f39d34]:not(.print){opacity:.7}#logs .log.num[data-v-b9f39d34]{color:#0ff}#logs .log.str[data-v-b9f39d34]{color:#ff0}.actions[data-v-b9f39d34]{margin-left:auto}:root{--borderThickness: 1px}*{font-family:Fira code,Fira Mono,Consolas,Menlo,Courier,monospace}html{background:#171717;color:#fff;-moz-tab-size:2;tab-size:2}body{margin:0;padding:0}h1[data-v-0701d9c6]{font-size:1.5em;margin:16px 16px 0} +._wrapper_k2i3y_2{display:inline-block}._menu_k2i3y_5{position:absolute;border:solid var(--borderThickness) #555;border-radius:4px;background:#202020;z-index:10}._opt_k2i3y_12{padding:8px 16px}._opt_k2i3y_12:not(:first-child){border-top:dashed var(--borderThickness) #555}.prism-editor-wrapper{width:100%;height:100%;display:flex;align-items:flex-start;overflow:auto;-o-tab-size:1.5em;tab-size:1.5em;-moz-tab-size:1.5em}@media (-ms-high-contrast:active),(-ms-high-contrast:none){.prism-editor-wrapper .prism-editor__textarea{color:transparent!important}.prism-editor-wrapper .prism-editor__textarea::-moz-selection{background-color:#accef7!important;color:transparent!important}.prism-editor-wrapper .prism-editor__textarea::selection{background-color:#accef7!important;color:transparent!important}}.prism-editor-wrapper .prism-editor__container{position:relative;text-align:left;box-sizing:border-box;padding:0;overflow:hidden;width:100%}.prism-editor-wrapper .prism-editor__line-numbers{height:100%;overflow:hidden;flex-shrink:0;padding-top:4px;margin-top:0;margin-right:10px}.prism-editor-wrapper .prism-editor__line-number{text-align:right;white-space:nowrap}.prism-editor-wrapper .prism-editor__textarea{position:absolute;top:0;left:0;height:100%;width:100%;resize:none;color:inherit;overflow:hidden;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-text-fill-color:transparent}.prism-editor-wrapper .prism-editor__editor,.prism-editor-wrapper .prism-editor__textarea{margin:0;border:0;background:none;box-sizing:inherit;display:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-ligatures:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;-moz-tab-size:inherit;-o-tab-size:inherit;tab-size:inherit;text-indent:inherit;text-rendering:inherit;text-transform:inherit;white-space:pre-wrap;word-wrap:keep-all;overflow-wrap:break-word;padding:0}.prism-editor-wrapper .prism-editor__textarea--empty{-webkit-text-fill-color:inherit!important}.prism-editor-wrapper .prism-editor__editor{position:relative;pointer-events:none}code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:none;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#272822}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#8292a2}.token.punctuation{color:#f8f8f2}.token.namespace{opacity:.7}.token.property,.token.tag,.token.constant,.token.symbol,.token.deleted{color:#f92672}.token.boolean,.token.number{color:#ae81ff}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#a6e22e}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.function,.token.class-name{color:#e6db74}.token.keyword{color:#66d9ef}.token.regex,.token.important{color:#fd971f}.token.important,.token.bold{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}._container_157we_2{display:flex;flex-direction:column;border:solid var(--borderThickness) #555;border-radius:8px;background:#202020}._header_157we_9{padding:8px 16px;border-bottom:dashed var(--borderThickness) #555;font-weight:700}._main_157we_14{flex:1;overflow:auto;padding:16px}._footer_157we_19{padding:8px 16px;border-top:dashed var(--borderThickness) #555}._code_kvmon_2{box-sizing:border-box;padding:0}._parseError_kvmon_6{color:red}._actions_kvmon_9{margin-left:auto;float:right}pre[data-v-b7034ed2]{margin:0}#root[data-v-b7034ed2]{display:flex;flex-direction:column;height:100vh}#grid1[data-v-b7034ed2]{box-sizing:border-box;flex:1;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;grid-gap:16px;padding:16px;min-height:0}#grid1>*[data-v-b7034ed2]{min-height:0}#grid2[data-v-b7034ed2]{box-sizing:border-box;flex:1;display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr;grid-gap:16px;padding:0 16px 16px;min-height:0}#grid2>*[data-v-b7034ed2]{min-height:0}#logs .log .type[data-v-b7034ed2]{opacity:.5;color:#fff}#logs .log[data-v-b7034ed2]:not(.print){opacity:.7}#logs .log.num[data-v-b7034ed2]{color:#0ff}#logs .log.str[data-v-b7034ed2]{color:#ff0}.actions[data-v-b7034ed2]{margin-left:auto}pre[data-v-064d6b25]{margin:0}#root[data-v-064d6b25]{display:flex;flex-direction:column;height:100vh}#grid1[data-v-064d6b25]{box-sizing:border-box;flex:1;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;grid-gap:16px;padding:16px;min-height:0}#grid1>*[data-v-064d6b25]{min-height:0}#grid2[data-v-064d6b25]{box-sizing:border-box;flex:1;display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr;grid-gap:16px;padding:0 16px 16px;min-height:0}#grid2>*[data-v-064d6b25]{min-height:0}#logs .log .type[data-v-064d6b25]{opacity:.5;color:#fff}#logs .log[data-v-064d6b25]:not(.print){opacity:.7}#logs .log.num[data-v-064d6b25]{color:#0ff}#logs .log.str[data-v-064d6b25]{color:#ff0}.actions[data-v-064d6b25]{margin-left:auto}pre[data-v-652f71ed]{margin:0}#root[data-v-652f71ed]{display:flex;flex-direction:column;height:100vh}#grid1[data-v-652f71ed]{box-sizing:border-box;flex:1;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;grid-gap:16px;padding:16px;min-height:0}#grid1>*[data-v-652f71ed]{min-height:0}#grid2[data-v-652f71ed]{box-sizing:border-box;flex:1;display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr;grid-gap:16px;padding:0 16px 16px;min-height:0}#grid2>*[data-v-652f71ed]{min-height:0}#logs .log .type[data-v-652f71ed]{opacity:.5;color:#fff}#logs .log[data-v-652f71ed]:not(.print){opacity:.7}#logs .log.num[data-v-652f71ed]{color:#0ff}#logs .log.str[data-v-652f71ed]{color:#ff0}.actions[data-v-652f71ed]{margin-left:auto}pre[data-v-2f3e9383]{margin:0}#root[data-v-2f3e9383]{display:flex;flex-direction:column;height:100vh}#grid1[data-v-2f3e9383]{box-sizing:border-box;flex:1;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;grid-gap:16px;padding:16px;min-height:0}#grid1>*[data-v-2f3e9383]{min-height:0}#grid2[data-v-2f3e9383]{box-sizing:border-box;flex:1;display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr;grid-gap:16px;padding:0 16px 16px;min-height:0}#grid2>*[data-v-2f3e9383]{min-height:0}#logs .log .type[data-v-2f3e9383]{opacity:.5;color:#fff}#logs .log[data-v-2f3e9383]:not(.print){opacity:.7}#logs .log.num[data-v-2f3e9383]{color:#0ff}#logs .log.str[data-v-2f3e9383]{color:#ff0}.actions[data-v-2f3e9383]{margin-left:auto}pre[data-v-b9f39d34]{margin:0}#root[data-v-b9f39d34]{display:flex;flex-direction:column;height:100vh}#grid1[data-v-b9f39d34]{box-sizing:border-box;flex:1;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;grid-gap:16px;padding:16px;min-height:0}#grid1>*[data-v-b9f39d34]{min-height:0}#grid2[data-v-b9f39d34]{box-sizing:border-box;flex:1;display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr;grid-gap:16px;padding:0 16px 16px;min-height:0}#grid2>*[data-v-b9f39d34]{min-height:0}#logs .log .type[data-v-b9f39d34]{opacity:.5;color:#fff}#logs .log[data-v-b9f39d34]:not(.print){opacity:.7}#logs .log.num[data-v-b9f39d34]{color:#0ff}#logs .log.str[data-v-b9f39d34]{color:#ff0}.actions[data-v-b9f39d34]{margin-left:auto}:root{--borderThickness: 1px}*{font-family:Fira code,Fira Mono,Consolas,Menlo,Courier,monospace}html{background:#171717;color:#fff;-moz-tab-size:2;tab-size:2}body{margin:0;padding:0}h1[data-v-425f78ee]{font-size:1.5em;margin:16px 16px 0} diff --git a/index.html b/index.html index 243eb43..a90a4f4 100644 --- a/index.html +++ b/index.html @@ -4,8 +4,8 @@ AiScript Playground - - + +