From 70208bbba58a0cb579e5f0df9d84b4c870a6c12f Mon Sep 17 00:00:00 2001 From: xiangnanscu <280145668@qq.com> Date: Thu, 10 Oct 2024 03:20:54 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20xiangnan?= =?UTF-8?q?scu/js2lua@56c7803906d9acac27c5057d2c0aae5299cecb86=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/index.2ac9fc4a.js | 537 ++++++++++++++++++++++++++++++++++++++ assets/index.39b4a8b0.js | 546 --------------------------------------- index.html | 2 +- 3 files changed, 538 insertions(+), 547 deletions(-) create mode 100644 assets/index.2ac9fc4a.js delete mode 100644 assets/index.39b4a8b0.js diff --git a/assets/index.2ac9fc4a.js b/assets/index.2ac9fc4a.js new file mode 100644 index 0000000..1d228a7 --- /dev/null +++ b/assets/index.2ac9fc4a.js @@ -0,0 +1,537 @@ +var au=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports);var Pg=au((Ig,oi)=>{const ou=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const n of r)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function e(r){const n={};return r.integrity&&(n.integrity=r.integrity),r.referrerpolicy&&(n.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?n.credentials="include":r.crossorigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function s(r){if(r.ep)return;r.ep=!0;const n=e(r);fetch(r.href,n)}};ou();/** +* @vue/shared v3.5.11 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function _n(i){const t=Object.create(null);for(const e of i.split(","))t[e]=1;return e=>e in t}const Be={},Os=[],Et=()=>{},lu=()=>!1,pr=i=>i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&(i.charCodeAt(2)>122||i.charCodeAt(2)<97),Mn=i=>i.startsWith("onUpdate:"),Xe=Object.assign,On=(i,t)=>{const e=i.indexOf(t);e>-1&&i.splice(e,1)},cu=Object.prototype.hasOwnProperty,Oe=(i,t)=>cu.call(i,t),be=Array.isArray,Ds=i=>Li(i)==="[object Map]",dr=i=>Li(i)==="[object Set]",wa=i=>Li(i)==="[object Date]",Ee=i=>typeof i=="function",We=i=>typeof i=="string",Nt=i=>typeof i=="symbol",je=i=>i!==null&&typeof i=="object",Ho=i=>(je(i)||Ee(i))&&Ee(i.then)&&Ee(i.catch),Go=Object.prototype.toString,Li=i=>Go.call(i),uu=i=>Li(i).slice(8,-1),Wo=i=>Li(i)==="[object Object]",Dn=i=>We(i)&&i!=="NaN"&&i[0]!=="-"&&""+parseInt(i,10)===i,li=_n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),mr=i=>{const t=Object.create(null);return e=>t[e]||(t[e]=i(e))},hu=/-(\w)/g,xt=mr(i=>i.replace(hu,(t,e)=>e?e.toUpperCase():"")),fu=/\B([A-Z])/g,ws=mr(i=>i.replace(fu,"-$1").toLowerCase()),yr=mr(i=>i.charAt(0).toUpperCase()+i.slice(1)),Rr=mr(i=>i?`on${yr(i)}`:""),ls=(i,t)=>!Object.is(i,t),Wi=(i,...t)=>{for(let e=0;e{Object.defineProperty(i,t,{configurable:!0,enumerable:!1,writable:s,value:e})},cn=i=>{const t=parseFloat(i);return isNaN(t)?i:t};let Ca;const Fn=()=>Ca||(Ca=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});function Bn(i){if(be(i)){const t={};for(let e=0;e{if(e){const s=e.split(du);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function bi(i){let t="";if(We(i))t=i;else if(be(i))for(let e=0;egr(e,t))}const Jo=i=>!!(i&&i.__v_isRef===!0),Is=i=>We(i)?i:i==null?"":be(i)||je(i)&&(i.toString===Go||!Ee(i.toString))?Jo(i)?Is(i.value):JSON.stringify(i,Xo,2):String(i),Xo=(i,t)=>Jo(t)?Xo(i,t.value):Ds(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[s,r],n)=>(e[$r(s,n)+" =>"]=r,e),{})}:dr(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>$r(e))}:Nt(t)?$r(t):je(t)&&!be(t)&&!Wo(t)?String(t):t,$r=(i,t="")=>{var e;return Nt(i)?`Symbol(${(e=i.description)!=null?e:t})`:i};/** +* @vue/reactivity v3.5.11 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let pt;class xu{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=pt,!t&&pt&&(this.index=(pt.scopes||(pt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,e;if(this.scopes)for(t=0,e=this.scopes.length;t0)return;if(ui){let t=ui;for(ui=void 0;t;){const e=t.next;t.next=void 0,t.flags&=-9,t=e}}let i;for(;ci;){let t=ci;for(ci=void 0;t;){const e=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){i||(i=s)}t=e}}if(i)throw i}function el(i){for(let t=i.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function tl(i){let t,e=i.depsTail,s=e;for(;s;){const r=s.prevDep;s.version===-1?(s===e&&(e=r),jn(s),Pu(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}i.deps=t,i.depsTail=e}function un(i){for(let t=i.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(sl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!i._dirty}function sl(i){if(i.flags&4&&!(i.flags&16)||(i.flags&=-17,i.globalVersion===xi))return;i.globalVersion=xi;const t=i.dep;if(i.flags|=2,t.version>0&&!i.isSSR&&i.deps&&!un(i)){i.flags&=-3;return}const e=$e,s=At;$e=i,At=!0;try{el(i);const r=i.fn(i._value);(t.version===0||ls(r,i._value))&&(i._value=r,t.version++)}catch(r){throw t.version++,r}finally{$e=e,At=s,tl(i),i.flags&=-3}}function jn(i,t=!1){const{dep:e,prevSub:s,nextSub:r}=i;if(s&&(s.nextSub=r,i.prevSub=void 0),r&&(r.prevSub=s,i.nextSub=void 0),e.subs===i&&(e.subs=s),!e.subs&&e.computed){e.computed.flags&=-5;for(let n=e.computed.deps;n;n=n.nextDep)jn(n,!0)}!t&&!--e.sc&&e.map&&e.map.delete(e.key)}function Pu(i){const{prevDep:t,nextDep:e}=i;t&&(t.nextDep=e,i.prevDep=void 0),e&&(e.prevDep=t,i.nextDep=void 0)}let At=!0;const il=[];function cs(){il.push(At),At=!1}function us(){const i=il.pop();At=i===void 0?!0:i}function ka(i){const{cleanup:t}=i;if(i.cleanup=void 0,t){const e=$e;$e=void 0;try{t()}finally{$e=e}}}let xi=0;class Eu{constructor(t,e){this.sub=t,this.dep=e,this.version=e.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Un{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!$e||!At||$e===this.computed)return;let e=this.activeLink;if(e===void 0||e.sub!==$e)e=this.activeLink=new Eu($e,this),$e.deps?(e.prevDep=$e.depsTail,$e.depsTail.nextDep=e,$e.depsTail=e):$e.deps=$e.depsTail=e,rl(e);else if(e.version===-1&&(e.version=this.version,e.nextDep)){const s=e.nextDep;s.prevDep=e.prevDep,e.prevDep&&(e.prevDep.nextDep=s),e.prevDep=$e.depsTail,e.nextDep=void 0,$e.depsTail.nextDep=e,$e.depsTail=e,$e.deps===e&&($e.deps=s)}return e}trigger(t){this.version++,xi++,this.notify(t)}notify(t){Rn();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{$n()}}}function rl(i){if(i.dep.sc++,i.sub.flags&4){const t=i.dep.computed;if(t&&!i.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)rl(s)}const e=i.dep.subs;e!==i&&(i.prevSub=e,e&&(e.nextSub=i)),i.dep.subs=i}}const hn=new WeakMap,xs=Symbol(""),fn=Symbol(""),Si=Symbol("");function st(i,t,e){if(At&&$e){let s=hn.get(i);s||hn.set(i,s=new Map);let r=s.get(e);r||(s.set(e,r=new Un),r.map=s,r.key=e),r.track()}}function qt(i,t,e,s,r,n){const a=hn.get(i);if(!a){xi++;return}const o=l=>{l&&l.trigger()};if(Rn(),t==="clear")a.forEach(o);else{const l=be(i),h=l&&Dn(e);if(l&&e==="length"){const u=Number(s);a.forEach((d,c)=>{(c==="length"||c===Si||!Nt(c)&&c>=u)&&o(d)})}else switch(e!==void 0&&o(a.get(e)),h&&o(a.get(Si)),t){case"add":l?h&&o(a.get("length")):(o(a.get(xs)),Ds(i)&&o(a.get(fn)));break;case"delete":l||(o(a.get(xs)),Ds(i)&&o(a.get(fn)));break;case"set":Ds(i)&&o(a.get(xs));break}}$n()}function vs(i){const t=De(i);return t===i?t:(st(t,"iterate",Si),bt(i)?t:t.map(Qe))}function Tr(i){return st(i=De(i),"iterate",Si),i}const Au={__proto__:null,[Symbol.iterator](){return Ur(this,Symbol.iterator,Qe)},concat(...i){return vs(this).concat(...i.map(t=>be(t)?vs(t):t))},entries(){return Ur(this,"entries",i=>(i[1]=Qe(i[1]),i))},every(i,t){return Ot(this,"every",i,t,void 0,arguments)},filter(i,t){return Ot(this,"filter",i,t,e=>e.map(Qe),arguments)},find(i,t){return Ot(this,"find",i,t,Qe,arguments)},findIndex(i,t){return Ot(this,"findIndex",i,t,void 0,arguments)},findLast(i,t){return Ot(this,"findLast",i,t,Qe,arguments)},findLastIndex(i,t){return Ot(this,"findLastIndex",i,t,void 0,arguments)},forEach(i,t){return Ot(this,"forEach",i,t,void 0,arguments)},includes(...i){return Vr(this,"includes",i)},indexOf(...i){return Vr(this,"indexOf",i)},join(i){return vs(this).join(i)},lastIndexOf(...i){return Vr(this,"lastIndexOf",i)},map(i,t){return Ot(this,"map",i,t,void 0,arguments)},pop(){return Ks(this,"pop")},push(...i){return Ks(this,"push",i)},reduce(i,...t){return va(this,"reduce",i,t)},reduceRight(i,...t){return va(this,"reduceRight",i,t)},shift(){return Ks(this,"shift")},some(i,t){return Ot(this,"some",i,t,void 0,arguments)},splice(...i){return Ks(this,"splice",i)},toReversed(){return vs(this).toReversed()},toSorted(i){return vs(this).toSorted(i)},toSpliced(...i){return vs(this).toSpliced(...i)},unshift(...i){return Ks(this,"unshift",i)},values(){return Ur(this,"values",Qe)}};function Ur(i,t,e){const s=Tr(i),r=s[t]();return s!==i&&!bt(i)&&(r._next=r.next,r.next=()=>{const n=r._next();return n.value&&(n.value=e(n.value)),n}),r}const wu=Array.prototype;function Ot(i,t,e,s,r,n){const a=Tr(i),o=a!==i&&!bt(i),l=a[t];if(l!==wu[t]){const d=l.apply(i,n);return o?Qe(d):d}let h=e;a!==i&&(o?h=function(d,c){return e.call(this,Qe(d),c,i)}:e.length>2&&(h=function(d,c){return e.call(this,d,c,i)}));const u=l.call(a,h,s);return o&&r?r(u):u}function va(i,t,e,s){const r=Tr(i);let n=e;return r!==i&&(bt(i)?e.length>3&&(n=function(a,o,l){return e.call(this,a,o,l,i)}):n=function(a,o,l){return e.call(this,a,Qe(o),l,i)}),r[t](n,...s)}function Vr(i,t,e){const s=De(i);st(s,"iterate",Si);const r=s[t](...e);return(r===-1||r===!1)&&Wn(e[0])?(e[0]=De(e[0]),s[t](...e)):r}function Ks(i,t,e=[]){cs(),Rn();const s=De(i)[t].apply(i,e);return $n(),us(),s}const Cu=_n("__proto__,__v_isRef,__isVue"),nl=new Set(Object.getOwnPropertyNames(Symbol).filter(i=>i!=="arguments"&&i!=="caller").map(i=>Symbol[i]).filter(Nt));function ku(i){Nt(i)||(i=String(i));const t=De(this);return st(t,"has",i),t.hasOwnProperty(i)}class al{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,s){const r=this._isReadonly,n=this._isShallow;if(e==="__v_isReactive")return!r;if(e==="__v_isReadonly")return r;if(e==="__v_isShallow")return n;if(e==="__v_raw")return s===(r?n?ju:ul:n?cl:ll).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const a=be(t);if(!r){let l;if(a&&(l=Au[e]))return l;if(e==="hasOwnProperty")return ku}const o=Reflect.get(t,e,tt(t)?t:s);return(Nt(e)?nl.has(e):Cu(e))||(r||st(t,"get",e),n)?o:tt(o)?a&&Dn(e)?o:o.value:je(o)?r?hl(o):xr(o):o}}class ol extends al{constructor(t=!1){super(!1,t)}set(t,e,s,r){let n=t[e];if(!this._isShallow){const l=Es(n);if(!bt(s)&&!Es(s)&&(n=De(n),s=De(s)),!be(t)&&tt(n)&&!tt(s))return l?!1:(n.value=s,!0)}const a=be(t)&&Dn(e)?Number(e)i,br=i=>Reflect.getPrototypeOf(i);function Di(i,t,e=!1,s=!1){i=i.__v_raw;const r=De(i),n=De(t);e||(ls(t,n)&&st(r,"get",t),st(r,"get",n));const{has:a}=br(r),o=s?Vn:e?Kn:Qe;if(a.call(r,t))return o(i.get(t));if(a.call(r,n))return o(i.get(n));i!==r&&i.get(t)}function Fi(i,t=!1){const e=this.__v_raw,s=De(e),r=De(i);return t||(ls(i,r)&&st(s,"has",i),st(s,"has",r)),i===r?e.has(i):e.has(i)||e.has(r)}function Bi(i,t=!1){return i=i.__v_raw,!t&&st(De(i),"iterate",xs),Reflect.get(i,"size",i)}function La(i,t=!1){!t&&!bt(i)&&!Es(i)&&(i=De(i));const e=De(this);return br(e).has.call(e,i)||(e.add(i),qt(e,"add",i,i)),this}function Ia(i,t,e=!1){!e&&!bt(t)&&!Es(t)&&(t=De(t));const s=De(this),{has:r,get:n}=br(s);let a=r.call(s,i);a||(i=De(i),a=r.call(s,i));const o=n.call(s,i);return s.set(i,t),a?ls(t,o)&&qt(s,"set",i,t):qt(s,"add",i,t),this}function Na(i){const t=De(this),{has:e,get:s}=br(t);let r=e.call(t,i);r||(i=De(i),r=e.call(t,i)),s&&s.call(t,i);const n=t.delete(i);return r&&qt(t,"delete",i,void 0),n}function _a(){const i=De(this),t=i.size!==0,e=i.clear();return t&&qt(i,"clear",void 0,void 0),e}function Ri(i,t){return function(s,r){const n=this,a=n.__v_raw,o=De(a),l=t?Vn:i?Kn:Qe;return!i&&st(o,"iterate",xs),a.forEach((h,u)=>s.call(r,l(h),l(u),n))}}function $i(i,t,e){return function(...s){const r=this.__v_raw,n=De(r),a=Ds(n),o=i==="entries"||i===Symbol.iterator&&a,l=i==="keys"&&a,h=r[i](...s),u=e?Vn:t?Kn:Qe;return!t&&st(n,"iterate",l?fn:xs),{next(){const{value:d,done:c}=h.next();return c?{value:d,done:c}:{value:o?[u(d[0]),u(d[1])]:u(d),done:c}},[Symbol.iterator](){return this}}}}function Zt(i){return function(...t){return i==="delete"?!1:i==="clear"?void 0:this}}function _u(){const i={get(n){return Di(this,n)},get size(){return Bi(this)},has:Fi,add:La,set:Ia,delete:Na,clear:_a,forEach:Ri(!1,!1)},t={get(n){return Di(this,n,!1,!0)},get size(){return Bi(this)},has:Fi,add(n){return La.call(this,n,!0)},set(n,a){return Ia.call(this,n,a,!0)},delete:Na,clear:_a,forEach:Ri(!1,!0)},e={get(n){return Di(this,n,!0)},get size(){return Bi(this,!0)},has(n){return Fi.call(this,n,!0)},add:Zt("add"),set:Zt("set"),delete:Zt("delete"),clear:Zt("clear"),forEach:Ri(!0,!1)},s={get(n){return Di(this,n,!0,!0)},get size(){return Bi(this,!0)},has(n){return Fi.call(this,n,!0)},add:Zt("add"),set:Zt("set"),delete:Zt("delete"),clear:Zt("clear"),forEach:Ri(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(n=>{i[n]=$i(n,!1,!1),e[n]=$i(n,!0,!1),t[n]=$i(n,!1,!0),s[n]=$i(n,!0,!0)}),[i,e,t,s]}const[Mu,Ou,Du,Fu]=_u();function Hn(i,t){const e=t?i?Fu:Du:i?Ou:Mu;return(s,r,n)=>r==="__v_isReactive"?!i:r==="__v_isReadonly"?i:r==="__v_raw"?s:Reflect.get(Oe(e,r)&&r in s?e:s,r,n)}const Bu={get:Hn(!1,!1)},Ru={get:Hn(!1,!0)},$u={get:Hn(!0,!1)},ll=new WeakMap,cl=new WeakMap,ul=new WeakMap,ju=new WeakMap;function Uu(i){switch(i){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Vu(i){return i.__v_skip||!Object.isExtensible(i)?0:Uu(uu(i))}function xr(i){return Es(i)?i:Gn(i,!1,Lu,Bu,ll)}function Hu(i){return Gn(i,!1,Nu,Ru,cl)}function hl(i){return Gn(i,!0,Iu,$u,ul)}function Gn(i,t,e,s,r){if(!je(i)||i.__v_raw&&!(t&&i.__v_isReactive))return i;const n=r.get(i);if(n)return n;const a=Vu(i);if(a===0)return i;const o=new Proxy(i,a===2?s:e);return r.set(i,o),o}function Fs(i){return Es(i)?Fs(i.__v_raw):!!(i&&i.__v_isReactive)}function Es(i){return!!(i&&i.__v_isReadonly)}function bt(i){return!!(i&&i.__v_isShallow)}function Wn(i){return i?!!i.__v_raw:!1}function De(i){const t=i&&i.__v_raw;return t?De(t):i}function Gu(i){return!Oe(i,"__v_skip")&&Object.isExtensible(i)&&Ko(i,"__v_skip",!0),i}const Qe=i=>je(i)?xr(i):i,Kn=i=>je(i)?hl(i):i;function tt(i){return i?i.__v_isRef===!0:!1}function gs(i){return Wu(i,!1)}function Wu(i,t){return tt(i)?i:new Ku(i,t)}class Ku{constructor(t,e){this.dep=new Un,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:De(t),this._value=e?t:Qe(t),this.__v_isShallow=e}get value(){return this.dep.track(),this._value}set value(t){const e=this._rawValue,s=this.__v_isShallow||bt(t)||Es(t);t=s?t:De(t),ls(t,e)&&(this._rawValue=t,this._value=s?t:Qe(t),this.dep.trigger())}}function Ki(i){return tt(i)?i.value:i}const qu={get:(i,t,e)=>t==="__v_raw"?i:Ki(Reflect.get(i,t,e)),set:(i,t,e,s)=>{const r=i[t];return tt(r)&&!tt(e)?(r.value=e,!0):Reflect.set(i,t,e,s)}};function fl(i){return Fs(i)?i:new Proxy(i,qu)}class zu{constructor(t,e,s){this.fn=t,this.setter=e,this._value=void 0,this.dep=new Un(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=xi-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!e,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&$e!==this)return Qo(this,!0),!0}get value(){const t=this.dep.track();return sl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Ju(i,t,e=!1){let s,r;return Ee(i)?s=i:(s=i.get,r=i.set),new zu(s,r,e)}const ji={},tr=new WeakMap;let Ts;function Xu(i,t=!1,e=Ts){if(e){let s=tr.get(e);s||tr.set(e,s=[]),s.push(i)}}function Yu(i,t,e=Be){const{immediate:s,deep:r,once:n,scheduler:a,augmentJob:o,call:l}=e,h=O=>r?O:bt(O)||r===!1||r===0?jt(O,1):jt(O);let u,d,c,f,p=!1,m=!1;if(tt(i)?(d=()=>i.value,p=bt(i)):Fs(i)?(d=()=>h(i),p=!0):be(i)?(m=!0,p=i.some(O=>Fs(O)||bt(O)),d=()=>i.map(O=>{if(tt(O))return O.value;if(Fs(O))return h(O);if(Ee(O))return l?l(O,2):O()})):Ee(i)?t?d=l?()=>l(i,2):i:d=()=>{if(c){cs();try{c()}finally{us()}}const O=Ts;Ts=u;try{return l?l(i,3,[f]):i(f)}finally{Ts=O}}:d=Et,t&&r){const O=d,S=r===!0?1/0:r;d=()=>jt(O(),S)}const b=Su(),P=()=>{u.stop(),b&&On(b.effects,u)};if(n&&t){const O=t;t=(...S)=>{O(...S),P()}}let A=m?new Array(i.length).fill(ji):ji;const U=O=>{if(!(!(u.flags&1)||!u.dirty&&!O))if(t){const S=u.run();if(r||p||(m?S.some((W,fe)=>ls(W,A[fe])):ls(S,A))){c&&c();const W=Ts;Ts=u;try{const fe=[S,A===ji?void 0:m&&A[0]===ji?[]:A,f];l?l(t,3,fe):t(...fe),A=S}finally{Ts=W}}}else u.run()};return o&&o(U),u=new Yo(d),u.scheduler=a?()=>a(U,!1):U,f=O=>Xu(O,!1,u),c=u.onStop=()=>{const O=tr.get(u);if(O){if(l)l(O,4);else for(const S of O)S();tr.delete(u)}},t?s?U(!0):A=u.run():a?a(U.bind(null,!0),!0):u.run(),P.pause=u.pause.bind(u),P.resume=u.resume.bind(u),P.stop=P,P}function jt(i,t=1/0,e){if(t<=0||!je(i)||i.__v_skip||(e=e||new Set,e.has(i)))return i;if(e.add(i),t--,tt(i))jt(i.value,t,e);else if(be(i))for(let s=0;s{jt(s,t,e)});else if(Wo(i)){for(const s in i)jt(i[s],t,e);for(const s of Object.getOwnPropertySymbols(i))Object.prototype.propertyIsEnumerable.call(i,s)&&jt(i[s],t,e)}return i}/** +* @vue/runtime-core v3.5.11 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Ii(i,t,e,s){try{return s?i(...s):i()}catch(r){Sr(r,t,e)}}function _t(i,t,e,s){if(Ee(i)){const r=Ii(i,t,e,s);return r&&Ho(r)&&r.catch(n=>{Sr(n,t,e)}),r}if(be(i)){const r=[];for(let n=0;n>>1,r=at[s],n=Pi(r);n=Pi(e)?at.push(i):at.splice(eh(t),0,i),i.flags|=1,dl()}}function dl(){sr||(sr=pl.then(yl))}function th(i){be(i)?Bs.push(...i):is&&i.id===-1?is.splice(Ns+1,0,i):i.flags&1||(Bs.push(i),i.flags|=1),dl()}function Ma(i,t,e=Lt+1){for(;ePi(e)-Pi(s));if(Bs.length=0,is){is.push(...t);return}for(is=t,Ns=0;Nsi.id==null?i.flags&2?-1:1/0:i.id;function yl(i){const t=Et;try{for(Lt=0;Lt{s._d&&Va(-1);const n=ir(t);let a;try{a=i(...r)}finally{ir(n),s._d&&Va(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function qs(i,t){if(mt===null)return i;const e=Cr(mt),s=i.dirs||(i.dirs=[]);for(let r=0;ri.__isTeleport;function zn(i,t){i.shapeFlag&6&&i.component?(i.transition=t,zn(i.component.subTree,t)):i.shapeFlag&128?(i.ssContent.transition=t.clone(i.ssContent),i.ssFallback.transition=t.clone(i.ssFallback)):i.transition=t}/*! #__NO_SIDE_EFFECTS__ */function nh(i,t){return Ee(i)?(()=>Xe({name:i.name},t,{setup:i}))():i}function Tl(i){i.ids=[i.ids[0]+i.ids[2]+++"-",0,0]}function pn(i,t,e,s,r=!1){if(be(i)){i.forEach((p,m)=>pn(p,t&&(be(t)?t[m]:t),e,s,r));return}if(hi(s)&&!r)return;const n=s.shapeFlag&4?Cr(s.component):s.el,a=r?null:n,{i:o,r:l}=i,h=t&&t.r,u=o.refs===Be?o.refs={}:o.refs,d=o.setupState,c=De(d),f=d===Be?()=>!1:p=>Oe(c,p);if(h!=null&&h!==l&&(We(h)?(u[h]=null,f(h)&&(d[h]=null)):tt(h)&&(h.value=null)),Ee(l))Ii(l,o,12,[a,u]);else{const p=We(l),m=tt(l);if(p||m){const b=()=>{if(i.f){const P=p?f(l)?d[l]:u[l]:l.value;r?be(P)&&On(P,n):be(P)?P.includes(n)||P.push(n):p?(u[l]=[n],f(l)&&(d[l]=u[l])):(l.value=[n],i.k&&(u[i.k]=l.value))}else p?(u[l]=a,f(l)&&(d[l]=a)):m&&(l.value=a,i.k&&(u[i.k]=a))};a?(b.id=-1,ft(b,e)):b()}}}const hi=i=>!!i.type.__asyncLoader,bl=i=>i.type.__isKeepAlive;function ah(i,t){xl(i,"a",t)}function oh(i,t){xl(i,"da",t)}function xl(i,t,e=et){const s=i.__wdc||(i.__wdc=()=>{let r=e;for(;r;){if(r.isDeactivated)return;r=r.parent}return i()});if(Pr(t,s,e),e){let r=e.parent;for(;r&&r.parent;)bl(r.parent.vnode)&&lh(s,t,e,r),r=r.parent}}function lh(i,t,e,s){const r=Pr(t,i,s,!0);Sl(()=>{On(s[t],r)},e)}function Pr(i,t,e=et,s=!1){if(e){const r=e[i]||(e[i]=[]),n=t.__weh||(t.__weh=(...a)=>{cs();const o=Ni(e),l=_t(t,e,i,a);return o(),us(),l});return s?r.unshift(n):r.push(n),n}}const Xt=i=>(t,e=et)=>{(!wr||i==="sp")&&Pr(i,(...s)=>t(...s),e)},ch=Xt("bm"),uh=Xt("m"),hh=Xt("bu"),fh=Xt("u"),ph=Xt("bum"),Sl=Xt("um"),dh=Xt("sp"),mh=Xt("rtg"),yh=Xt("rtc");function gh(i,t=et){Pr("ec",i,t)}const Pl="components";function Th(i,t){return xh(Pl,i,!0,t)||i}const bh=Symbol.for("v-ndc");function xh(i,t,e=!0,s=!1){const r=mt||et;if(r){const n=r.type;if(i===Pl){const o=hf(n,!1);if(o&&(o===t||o===xt(t)||o===yr(xt(t))))return n}const a=Oa(r[i]||n[i],t)||Oa(r.appContext[i],t);return!a&&s?n:a}}function Oa(i,t){return i&&(i[t]||i[xt(t)]||i[yr(xt(t))])}function Hr(i,t,e,s){let r;const n=e&&e[s],a=be(i);if(a||We(i)){const o=a&&Fs(i);let l=!1;o&&(l=!bt(i),i=Tr(i)),r=new Array(i.length);for(let h=0,u=i.length;ht(o,l,void 0,n&&n[l]));else{const o=Object.keys(i);r=new Array(o.length);for(let l=0,h=o.length;li?Vl(i)?Cr(i):dn(i.parent):null,fi=Xe(Object.create(null),{$:i=>i,$el:i=>i.vnode.el,$data:i=>i.data,$props:i=>i.props,$attrs:i=>i.attrs,$slots:i=>i.slots,$refs:i=>i.refs,$parent:i=>dn(i.parent),$root:i=>dn(i.root),$host:i=>i.ce,$emit:i=>i.emit,$options:i=>Jn(i),$forceUpdate:i=>i.f||(i.f=()=>{qn(i.update)}),$nextTick:i=>i.n||(i.n=Qu.bind(i.proxy)),$watch:i=>Hh.bind(i)}),Gr=(i,t)=>i!==Be&&!i.__isScriptSetup&&Oe(i,t),Sh={get({_:i},t){if(t==="__v_skip")return!0;const{ctx:e,setupState:s,data:r,props:n,accessCache:a,type:o,appContext:l}=i;let h;if(t[0]!=="$"){const f=a[t];if(f!==void 0)switch(f){case 1:return s[t];case 2:return r[t];case 4:return e[t];case 3:return n[t]}else{if(Gr(s,t))return a[t]=1,s[t];if(r!==Be&&Oe(r,t))return a[t]=2,r[t];if((h=i.propsOptions[0])&&Oe(h,t))return a[t]=3,n[t];if(e!==Be&&Oe(e,t))return a[t]=4,e[t];mn&&(a[t]=0)}}const u=fi[t];let d,c;if(u)return t==="$attrs"&&st(i.attrs,"get",""),u(i);if((d=o.__cssModules)&&(d=d[t]))return d;if(e!==Be&&Oe(e,t))return a[t]=4,e[t];if(c=l.config.globalProperties,Oe(c,t))return c[t]},set({_:i},t,e){const{data:s,setupState:r,ctx:n}=i;return Gr(r,t)?(r[t]=e,!0):s!==Be&&Oe(s,t)?(s[t]=e,!0):Oe(i.props,t)||t[0]==="$"&&t.slice(1)in i?!1:(n[t]=e,!0)},has({_:{data:i,setupState:t,accessCache:e,ctx:s,appContext:r,propsOptions:n}},a){let o;return!!e[a]||i!==Be&&Oe(i,a)||Gr(t,a)||(o=n[0])&&Oe(o,a)||Oe(s,a)||Oe(fi,a)||Oe(r.config.globalProperties,a)},defineProperty(i,t,e){return e.get!=null?i._.accessCache[t]=0:Oe(e,"value")&&this.set(i,t,e.value,null),Reflect.defineProperty(i,t,e)}};function Da(i){return be(i)?i.reduce((t,e)=>(t[e]=null,t),{}):i}let mn=!0;function Ph(i){const t=Jn(i),e=i.proxy,s=i.ctx;mn=!1,t.beforeCreate&&Fa(t.beforeCreate,i,"bc");const{data:r,computed:n,methods:a,watch:o,provide:l,inject:h,created:u,beforeMount:d,mounted:c,beforeUpdate:f,updated:p,activated:m,deactivated:b,beforeDestroy:P,beforeUnmount:A,destroyed:U,unmounted:O,render:S,renderTracked:W,renderTriggered:fe,errorCaptured:g,serverPrefetch:se,expose:ie,inheritAttrs:T,components:k,directives:Y,filters:z}=t;if(h&&Eh(h,s,null),a)for(const x in a){const C=a[x];Ee(C)&&(s[x]=C.bind(e))}if(r){const x=r.call(e,e);je(x)&&(i.data=xr(x))}if(mn=!0,n)for(const x in n){const C=n[x],R=Ee(C)?C.bind(e,e):Ee(C.get)?C.get.bind(e,e):Et,re=!Ee(C)&&Ee(C.set)?C.set.bind(e):Et,M=Ht({get:R,set:re});Object.defineProperty(s,x,{enumerable:!0,configurable:!0,get:()=>M.value,set:F=>M.value=F})}if(o)for(const x in o)El(o[x],s,e,x);if(l){const x=Ee(l)?l.call(e):l;Reflect.ownKeys(x).forEach(C=>{Lh(C,x[C])})}u&&Fa(u,i,"c");function L(x,C){be(C)?C.forEach(R=>x(R.bind(e))):C&&x(C.bind(e))}if(L(ch,d),L(uh,c),L(hh,f),L(fh,p),L(ah,m),L(oh,b),L(gh,g),L(yh,W),L(mh,fe),L(ph,A),L(Sl,O),L(dh,se),be(ie))if(ie.length){const x=i.exposed||(i.exposed={});ie.forEach(C=>{Object.defineProperty(x,C,{get:()=>e[C],set:R=>e[C]=R})})}else i.exposed||(i.exposed={});S&&i.render===Et&&(i.render=S),T!=null&&(i.inheritAttrs=T),k&&(i.components=k),Y&&(i.directives=Y),se&&Tl(i)}function Eh(i,t,e=Et){be(i)&&(i=yn(i));for(const s in i){const r=i[s];let n;je(r)?"default"in r?n=qi(r.from||s,r.default,!0):n=qi(r.from||s):n=qi(r),tt(n)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>n.value,set:a=>n.value=a}):t[s]=n}}function Fa(i,t,e){_t(be(i)?i.map(s=>s.bind(t.proxy)):i.bind(t.proxy),t,e)}function El(i,t,e,s){let r=s.includes(".")?Bl(e,s):()=>e[s];if(We(i)){const n=t[i];Ee(n)&&pi(r,n)}else if(Ee(i))pi(r,i.bind(e));else if(je(i))if(be(i))i.forEach(n=>El(n,t,e,s));else{const n=Ee(i.handler)?i.handler.bind(e):t[i.handler];Ee(n)&&pi(r,n,i)}}function Jn(i){const t=i.type,{mixins:e,extends:s}=t,{mixins:r,optionsCache:n,config:{optionMergeStrategies:a}}=i.appContext,o=n.get(t);let l;return o?l=o:!r.length&&!e&&!s?l=t:(l={},r.length&&r.forEach(h=>rr(l,h,a,!0)),rr(l,t,a)),je(t)&&n.set(t,l),l}function rr(i,t,e,s=!1){const{mixins:r,extends:n}=t;n&&rr(i,n,e,!0),r&&r.forEach(a=>rr(i,a,e,!0));for(const a in t)if(!(s&&a==="expose")){const o=Ah[a]||e&&e[a];i[a]=o?o(i[a],t[a]):t[a]}return i}const Ah={data:Ba,props:Ra,emits:Ra,methods:ii,computed:ii,beforeCreate:nt,created:nt,beforeMount:nt,mounted:nt,beforeUpdate:nt,updated:nt,beforeDestroy:nt,beforeUnmount:nt,destroyed:nt,unmounted:nt,activated:nt,deactivated:nt,errorCaptured:nt,serverPrefetch:nt,components:ii,directives:ii,watch:Ch,provide:Ba,inject:wh};function Ba(i,t){return t?i?function(){return Xe(Ee(i)?i.call(this,this):i,Ee(t)?t.call(this,this):t)}:t:i}function wh(i,t){return ii(yn(i),yn(t))}function yn(i){if(be(i)){const t={};for(let e=0;e1)return e&&Ee(t)?t.call(s&&s.proxy):t}}const wl={},Cl=()=>Object.create(wl),kl=i=>Object.getPrototypeOf(i)===wl;function Ih(i,t,e,s=!1){const r={},n=Cl();i.propsDefaults=Object.create(null),vl(i,t,r,n);for(const a in i.propsOptions[0])a in r||(r[a]=void 0);e?i.props=s?r:Hu(r):i.type.props?i.props=r:i.props=n,i.attrs=n}function Nh(i,t,e,s){const{props:r,attrs:n,vnode:{patchFlag:a}}=i,o=De(r),[l]=i.propsOptions;let h=!1;if((s||a>0)&&!(a&16)){if(a&8){const u=i.vnode.dynamicProps;for(let d=0;d{l=!0;const[c,f]=Ll(d,t,!0);Xe(a,c),f&&o.push(...f)};!e&&t.mixins.length&&t.mixins.forEach(u),i.extends&&u(i.extends),i.mixins&&i.mixins.forEach(u)}if(!n&&!l)return je(i)&&s.set(i,Os),Os;if(be(n))for(let u=0;ui[0]==="_"||i==="$stable",Xn=i=>be(i)?i.map(It):[It(i)],Mh=(i,t,e)=>{if(t._n)return t;const s=sh((...r)=>Xn(t(...r)),e);return s._c=!1,s},Nl=(i,t,e)=>{const s=i._ctx;for(const r in i){if(Il(r))continue;const n=i[r];if(Ee(n))t[r]=Mh(r,n,s);else if(n!=null){const a=Xn(n);t[r]=()=>a}}},_l=(i,t)=>{const e=Xn(t);i.slots.default=()=>e},Ml=(i,t,e)=>{for(const s in t)(e||s!=="_")&&(i[s]=t[s])},Oh=(i,t,e)=>{const s=i.slots=Cl();if(i.vnode.shapeFlag&32){const r=t._;r?(Ml(s,t,e),e&&Ko(s,"_",r,!0)):Nl(t,s)}else t&&_l(i,t)},Dh=(i,t,e)=>{const{vnode:s,slots:r}=i;let n=!0,a=Be;if(s.shapeFlag&32){const o=t._;o?e&&o===1?n=!1:Ml(r,t,e):(n=!t.$stable,Nl(t,r)),a=t}else t&&(_l(i,t),a={default:1});if(n)for(const o in r)!Il(o)&&a[o]==null&&delete r[o]};function Fh(){typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__!="boolean"&&(Fn().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1)}const ft=Xh;function Bh(i){return Rh(i)}function Rh(i,t){Fh();const e=Fn();e.__VUE__=!0;const{insert:s,remove:r,patchProp:n,createElement:a,createText:o,createComment:l,setText:h,setElementText:u,parentNode:d,nextSibling:c,setScopeId:f=Et,insertStaticContent:p}=i,m=(E,I,_,B=null,$=null,q=null,H=void 0,te=null,X=!!I.dynamicChildren)=>{if(E===I)return;E&&!zs(E,I)&&(B=Z(E),F(E,$,q,!0),E=null),I.patchFlag===-2&&(X=!1,I.dynamicChildren=null);const{type:G,ref:ye,shapeFlag:ae}=I;switch(G){case Ar:b(E,I,_,B);break;case As:P(E,I,_,B);break;case qr:E==null&&A(I,_,B,H);break;case dt:k(E,I,_,B,$,q,H,te,X);break;default:ae&1?S(E,I,_,B,$,q,H,te,X):ae&6?Y(E,I,_,B,$,q,H,te,X):(ae&64||ae&128)&&G.process(E,I,_,B,$,q,H,te,X,ke)}ye!=null&&$&&pn(ye,E&&E.ref,q,I||E,!I)},b=(E,I,_,B)=>{if(E==null)s(I.el=o(I.children),_,B);else{const $=I.el=E.el;I.children!==E.children&&h($,I.children)}},P=(E,I,_,B)=>{E==null?s(I.el=l(I.children||""),_,B):I.el=E.el},A=(E,I,_,B)=>{[E.el,E.anchor]=p(E.children,I,_,B,E.el,E.anchor)},U=({el:E,anchor:I},_,B)=>{let $;for(;E&&E!==I;)$=c(E),s(E,_,B),E=$;s(I,_,B)},O=({el:E,anchor:I})=>{let _;for(;E&&E!==I;)_=c(E),r(E),E=_;r(I)},S=(E,I,_,B,$,q,H,te,X)=>{I.type==="svg"?H="svg":I.type==="math"&&(H="mathml"),E==null?W(I,_,B,$,q,H,te,X):se(E,I,$,q,H,te,X)},W=(E,I,_,B,$,q,H,te)=>{let X,G;const{props:ye,shapeFlag:ae,transition:de,dirs:Te}=E;if(X=E.el=a(E.type,q,ye&&ye.is,ye),ae&8?u(X,E.children):ae&16&&g(E.children,X,null,B,$,Wr(E,q),H,te),Te&&ps(E,null,B,"created"),fe(X,E,E.scopeId,H,B),ye){for(const ee in ye)ee!=="value"&&!li(ee)&&n(X,ee,null,ye[ee],q,B);"value"in ye&&n(X,"value",null,ye.value,q),(G=ye.onVnodeBeforeMount)&&kt(G,B,E)}Te&&ps(E,null,B,"beforeMount");const J=$h($,de);J&&de.beforeEnter(X),s(X,I,_),((G=ye&&ye.onVnodeMounted)||J||Te)&&ft(()=>{G&&kt(G,B,E),J&&de.enter(X),Te&&ps(E,null,B,"mounted")},$)},fe=(E,I,_,B,$)=>{if(_&&f(E,_),B)for(let q=0;q{for(let G=X;G{const te=I.el=E.el;let{patchFlag:X,dynamicChildren:G,dirs:ye}=I;X|=E.patchFlag&16;const ae=E.props||Be,de=I.props||Be;let Te;if(_&&ds(_,!1),(Te=de.onVnodeBeforeUpdate)&&kt(Te,_,I,E),ye&&ps(I,E,_,"beforeUpdate"),_&&ds(_,!0),(ae.innerHTML&&de.innerHTML==null||ae.textContent&&de.textContent==null)&&u(te,""),G?ie(E.dynamicChildren,G,te,_,B,Wr(I,$),q):H||C(E,I,te,null,_,B,Wr(I,$),q,!1),X>0){if(X&16)T(te,ae,de,_,$);else if(X&2&&ae.class!==de.class&&n(te,"class",null,de.class,$),X&4&&n(te,"style",ae.style,de.style,$),X&8){const J=I.dynamicProps;for(let ee=0;ee{Te&&kt(Te,_,I,E),ye&&ps(I,E,_,"updated")},B)},ie=(E,I,_,B,$,q,H)=>{for(let te=0;te{if(I!==_){if(I!==Be)for(const q in I)!li(q)&&!(q in _)&&n(E,q,I[q],null,$,B);for(const q in _){if(li(q))continue;const H=_[q],te=I[q];H!==te&&q!=="value"&&n(E,q,te,H,$,B)}"value"in _&&n(E,"value",I.value,_.value,$)}},k=(E,I,_,B,$,q,H,te,X)=>{const G=I.el=E?E.el:o(""),ye=I.anchor=E?E.anchor:o("");let{patchFlag:ae,dynamicChildren:de,slotScopeIds:Te}=I;Te&&(te=te?te.concat(Te):Te),E==null?(s(G,_,B),s(ye,_,B),g(I.children||[],_,ye,$,q,H,te,X)):ae>0&&ae&64&&de&&E.dynamicChildren?(ie(E.dynamicChildren,de,_,$,q,H,te),(I.key!=null||$&&I===$.subTree)&&Ol(E,I,!0)):C(E,I,_,ye,$,q,H,te,X)},Y=(E,I,_,B,$,q,H,te,X)=>{I.slotScopeIds=te,E==null?I.shapeFlag&512?$.ctx.activate(I,_,B,H,X):z(I,_,B,$,q,H,X):ue(E,I,X)},z=(E,I,_,B,$,q,H)=>{const te=E.component=af(E,B,$);if(bl(E)&&(te.ctx.renderer=ke),of(te,!1,H),te.asyncDep){if($&&$.registerDep(te,L,H),!E.el){const X=te.subTree=Je(As);P(null,X,I,_)}}else L(te,E,I,_,$,q,H)},ue=(E,I,_)=>{const B=I.component=E.component;if(zh(E,I,_))if(B.asyncDep&&!B.asyncResolved){x(B,I,_);return}else B.next=I,B.update();else I.el=E.el,B.vnode=I},L=(E,I,_,B,$,q,H)=>{const te=()=>{if(E.isMounted){let{next:ae,bu:de,u:Te,parent:J,vnode:ee}=E;{const Ke=Dl(E);if(Ke){ae&&(ae.el=ee.el,x(E,ae,H)),Ke.asyncDep.then(()=>{E.isUnmounted||te()});return}}let le=ae,xe;ds(E,!1),ae?(ae.el=ee.el,x(E,ae,H)):ae=ee,de&&Wi(de),(xe=ae.props&&ae.props.onVnodeBeforeUpdate)&&kt(xe,J,ae,ee),ds(E,!0);const Pe=Kr(E),_e=E.subTree;E.subTree=Pe,m(_e,Pe,d(_e.el),Z(_e),E,$,q),ae.el=Pe.el,le===null&&Jh(E,Pe.el),Te&&ft(Te,$),(xe=ae.props&&ae.props.onVnodeUpdated)&&ft(()=>kt(xe,J,ae,ee),$)}else{let ae;const{el:de,props:Te}=I,{bm:J,m:ee,parent:le,root:xe,type:Pe}=E,_e=hi(I);if(ds(E,!1),J&&Wi(J),!_e&&(ae=Te&&Te.onVnodeBeforeMount)&&kt(ae,le,I),ds(E,!0),de&&Ie){const Ke=()=>{E.subTree=Kr(E),Ie(de,E.subTree,E,$,null)};_e&&Pe.__asyncHydrate?Pe.__asyncHydrate(de,E,Ke):Ke()}else{xe.ce&&xe.ce._injectChildStyle(Pe);const Ke=E.subTree=Kr(E);m(null,Ke,_,B,E,$,q),I.el=Ke.el}if(ee&&ft(ee,$),!_e&&(ae=Te&&Te.onVnodeMounted)){const Ke=I;ft(()=>kt(ae,le,Ke),$)}(I.shapeFlag&256||le&&hi(le.vnode)&&le.vnode.shapeFlag&256)&&E.a&&ft(E.a,$),E.isMounted=!0,I=_=B=null}};E.scope.on();const X=E.effect=new Yo(te);E.scope.off();const G=E.update=X.run.bind(X),ye=E.job=X.runIfDirty.bind(X);ye.i=E,ye.id=E.uid,X.scheduler=()=>qn(ye),ds(E,!0),G()},x=(E,I,_)=>{I.component=E;const B=E.vnode.props;E.vnode=I,E.next=null,Nh(E,I.props,B,_),Dh(E,I.children,_),cs(),Ma(E),us()},C=(E,I,_,B,$,q,H,te,X=!1)=>{const G=E&&E.children,ye=E?E.shapeFlag:0,ae=I.children,{patchFlag:de,shapeFlag:Te}=I;if(de>0){if(de&128){re(G,ae,_,B,$,q,H,te,X);return}else if(de&256){R(G,ae,_,B,$,q,H,te,X);return}}Te&8?(ye&16&&Q(G,$,q),ae!==G&&u(_,ae)):ye&16?Te&16?re(G,ae,_,B,$,q,H,te,X):Q(G,$,q,!0):(ye&8&&u(_,""),Te&16&&g(ae,_,B,$,q,H,te,X))},R=(E,I,_,B,$,q,H,te,X)=>{E=E||Os,I=I||Os;const G=E.length,ye=I.length,ae=Math.min(G,ye);let de;for(de=0;deye?Q(E,$,q,!0,!1,ae):g(I,_,B,$,q,H,te,X,ae)},re=(E,I,_,B,$,q,H,te,X)=>{let G=0;const ye=I.length;let ae=E.length-1,de=ye-1;for(;G<=ae&&G<=de;){const Te=E[G],J=I[G]=X?rs(I[G]):It(I[G]);if(zs(Te,J))m(Te,J,_,null,$,q,H,te,X);else break;G++}for(;G<=ae&&G<=de;){const Te=E[ae],J=I[de]=X?rs(I[de]):It(I[de]);if(zs(Te,J))m(Te,J,_,null,$,q,H,te,X);else break;ae--,de--}if(G>ae){if(G<=de){const Te=de+1,J=Tede)for(;G<=ae;)F(E[G],$,q,!0),G++;else{const Te=G,J=G,ee=new Map;for(G=J;G<=de;G++){const Ze=I[G]=X?rs(I[G]):It(I[G]);Ze.key!=null&&ee.set(Ze.key,G)}let le,xe=0;const Pe=de-J+1;let _e=!1,Ke=0;const ht=new Array(Pe);for(G=0;G=Pe){F(Ze,$,q,!0);continue}let Ve;if(Ze.key!=null)Ve=ee.get(Ze.key);else for(le=J;le<=de;le++)if(ht[le-J]===0&&zs(Ze,I[le])){Ve=le;break}Ve===void 0?F(Ze,$,q,!0):(ht[Ve-J]=G+1,Ve>=Ke?Ke=Ve:_e=!0,m(Ze,I[Ve],_,null,$,q,H,te,X),xe++)}const fs=_e?jh(ht):Os;for(le=fs.length-1,G=Pe-1;G>=0;G--){const Ze=J+G,Ve=I[Ze],qe=Ze+1{const{el:q,type:H,transition:te,children:X,shapeFlag:G}=E;if(G&6){M(E.component.subTree,I,_,B);return}if(G&128){E.suspense.move(I,_,B);return}if(G&64){H.move(E,I,_,ke);return}if(H===dt){s(q,I,_);for(let ae=0;aete.enter(q),$);else{const{leave:ae,delayLeave:de,afterLeave:Te}=te,J=()=>s(q,I,_),ee=()=>{ae(q,()=>{J(),Te&&Te()})};de?de(q,J,ee):ee()}else s(q,I,_)},F=(E,I,_,B=!1,$=!1)=>{const{type:q,props:H,ref:te,children:X,dynamicChildren:G,shapeFlag:ye,patchFlag:ae,dirs:de,cacheIndex:Te}=E;if(ae===-2&&($=!1),te!=null&&pn(te,null,_,E,!0),Te!=null&&(I.renderCache[Te]=void 0),ye&256){I.ctx.deactivate(E);return}const J=ye&1&&de,ee=!hi(E);let le;if(ee&&(le=H&&H.onVnodeBeforeUnmount)&&kt(le,I,E),ye&6)K(E.component,_,B);else{if(ye&128){E.suspense.unmount(_,B);return}J&&ps(E,null,I,"beforeUnmount"),ye&64?E.type.remove(E,I,_,ke,B):G&&!G.hasOnce&&(q!==dt||ae>0&&ae&64)?Q(G,I,_,!1,!0):(q===dt&&ae&384||!$&&ye&16)&&Q(X,I,_),B&&N(E)}(ee&&(le=H&&H.onVnodeUnmounted)||J)&&ft(()=>{le&&kt(le,I,E),J&&ps(E,null,I,"unmounted")},_)},N=E=>{const{type:I,el:_,anchor:B,transition:$}=E;if(I===dt){D(_,B);return}if(I===qr){O(E);return}const q=()=>{r(_),$&&!$.persisted&&$.afterLeave&&$.afterLeave()};if(E.shapeFlag&1&&$&&!$.persisted){const{leave:H,delayLeave:te}=$,X=()=>H(_,q);te?te(E.el,q,X):X()}else q()},D=(E,I)=>{let _;for(;E!==I;)_=c(E),r(E),E=_;r(I)},K=(E,I,_)=>{const{bum:B,scope:$,job:q,subTree:H,um:te,m:X,a:G}=E;ja(X),ja(G),B&&Wi(B),$.stop(),q&&(q.flags|=8,F(H,E,I,_)),te&&ft(te,I),ft(()=>{E.isUnmounted=!0},I),I&&I.pendingBranch&&!I.isUnmounted&&E.asyncDep&&!E.asyncResolved&&E.suspenseId===I.pendingId&&(I.deps--,I.deps===0&&I.resolve())},Q=(E,I,_,B=!1,$=!1,q=0)=>{for(let H=q;H{if(E.shapeFlag&6)return Z(E.component.subTree);if(E.shapeFlag&128)return E.suspense.next();const I=c(E.anchor||E.el),_=I&&I[ih];return _?c(_):I};let ce=!1;const pe=(E,I,_)=>{E==null?I._vnode&&F(I._vnode,null,null,!0):m(I._vnode||null,E,I,null,null,null,_),I._vnode=E,ce||(ce=!0,Ma(),ml(),ce=!1)},ke={p:m,um:F,m:M,r:N,mt:z,mc:g,pc:C,pbc:ie,n:Z,o:i};let ve,Ie;return t&&([ve,Ie]=t(ke)),{render:pe,hydrate:ve,createApp:vh(pe,ve)}}function Wr({type:i,props:t},e){return e==="svg"&&i==="foreignObject"||e==="mathml"&&i==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:e}function ds({effect:i,job:t},e){e?(i.flags|=32,t.flags|=4):(i.flags&=-33,t.flags&=-5)}function $h(i,t){return(!i||i&&!i.pendingBranch)&&t&&!t.persisted}function Ol(i,t,e=!1){const s=i.children,r=t.children;if(be(s)&&be(r))for(let n=0;n>1,i[e[o]]0&&(t[s]=e[n-1]),e[n]=s)}}for(n=e.length,a=e[n-1];n-- >0;)e[n]=a,a=t[a];return e}function Dl(i){const t=i.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Dl(t)}function ja(i){if(i)for(let t=0;tqi(Uh);function pi(i,t,e){return Fl(i,t,e)}function Fl(i,t,e=Be){const{immediate:s,deep:r,flush:n,once:a}=e,o=Xe({},e);let l;if(wr)if(n==="sync"){const c=Vh();l=c.__watcherHandles||(c.__watcherHandles=[])}else if(!t||s)o.once=!0;else{const c=()=>{};return c.stop=Et,c.resume=Et,c.pause=Et,c}const h=et;o.call=(c,f,p)=>_t(c,h,f,p);let u=!1;n==="post"?o.scheduler=c=>{ft(c,h&&h.suspense)}:n!=="sync"&&(u=!0,o.scheduler=(c,f)=>{f?c():qn(c)}),o.augmentJob=c=>{t&&(c.flags|=4),u&&(c.flags|=2,h&&(c.id=h.uid,c.i=h))};const d=Yu(i,t,o);return l&&l.push(d),d}function Hh(i,t,e){const s=this.proxy,r=We(i)?i.includes(".")?Bl(s,i):()=>s[i]:i.bind(s,s);let n;Ee(t)?n=t:(n=t.handler,e=t);const a=Ni(this),o=Fl(r,n.bind(s),e);return a(),o}function Bl(i,t){const e=t.split(".");return()=>{let s=i;for(let r=0;rt==="modelValue"||t==="model-value"?i.modelModifiers:i[`${t}Modifiers`]||i[`${xt(t)}Modifiers`]||i[`${ws(t)}Modifiers`];function Wh(i,t,...e){if(i.isUnmounted)return;const s=i.vnode.props||Be;let r=e;const n=t.startsWith("update:"),a=n&&Gh(s,t.slice(7));a&&(a.trim&&(r=e.map(u=>We(u)?u.trim():u)),a.number&&(r=e.map(cn)));let o,l=s[o=Rr(t)]||s[o=Rr(xt(t))];!l&&n&&(l=s[o=Rr(ws(t))]),l&&_t(l,i,6,r);const h=s[o+"Once"];if(h){if(!i.emitted)i.emitted={};else if(i.emitted[o])return;i.emitted[o]=!0,_t(h,i,6,r)}}function Rl(i,t,e=!1){const s=t.emitsCache,r=s.get(i);if(r!==void 0)return r;const n=i.emits;let a={},o=!1;if(!Ee(i)){const l=h=>{const u=Rl(h,t,!0);u&&(o=!0,Xe(a,u))};!e&&t.mixins.length&&t.mixins.forEach(l),i.extends&&l(i.extends),i.mixins&&i.mixins.forEach(l)}return!n&&!o?(je(i)&&s.set(i,null),null):(be(n)?n.forEach(l=>a[l]=null):Xe(a,n),je(i)&&s.set(i,a),a)}function Er(i,t){return!i||!pr(t)?!1:(t=t.slice(2).replace(/Once$/,""),Oe(i,t[0].toLowerCase()+t.slice(1))||Oe(i,ws(t))||Oe(i,t))}function Kr(i){const{type:t,vnode:e,proxy:s,withProxy:r,propsOptions:[n],slots:a,attrs:o,emit:l,render:h,renderCache:u,props:d,data:c,setupState:f,ctx:p,inheritAttrs:m}=i,b=ir(i);let P,A;try{if(e.shapeFlag&4){const O=r||s,S=O;P=It(h.call(S,O,u,d,f,c,p)),A=o}else{const O=t;P=It(O.length>1?O(d,{attrs:o,slots:a,emit:l}):O(d,null)),A=t.props?o:Kh(o)}}catch(O){di.length=0,Sr(O,i,1),P=Je(As)}let U=P;if(A&&m!==!1){const O=Object.keys(A),{shapeFlag:S}=U;O.length&&S&7&&(n&&O.some(Mn)&&(A=qh(A,n)),U=Vs(U,A,!1,!0))}return e.dirs&&(U=Vs(U,null,!1,!0),U.dirs=U.dirs?U.dirs.concat(e.dirs):e.dirs),e.transition&&zn(U,e.transition),P=U,ir(b),P}const Kh=i=>{let t;for(const e in i)(e==="class"||e==="style"||pr(e))&&((t||(t={}))[e]=i[e]);return t},qh=(i,t)=>{const e={};for(const s in i)(!Mn(s)||!(s.slice(9)in t))&&(e[s]=i[s]);return e};function zh(i,t,e){const{props:s,children:r,component:n}=i,{props:a,children:o,patchFlag:l}=t,h=n.emitsOptions;if(t.dirs||t.transition)return!0;if(e&&l>=0){if(l&1024)return!0;if(l&16)return s?Ua(s,a,h):!!a;if(l&8){const u=t.dynamicProps;for(let d=0;di.__isSuspense;function Xh(i,t){t&&t.pendingBranch?be(i)?t.effects.push(...i):t.effects.push(i):th(i)}const dt=Symbol.for("v-fgt"),Ar=Symbol.for("v-txt"),As=Symbol.for("v-cmt"),qr=Symbol.for("v-stc"),di=[];let yt=null;function St(i=!1){di.push(yt=i?null:[])}function Yh(){di.pop(),yt=di[di.length-1]||null}let Ei=1;function Va(i){Ei+=i,i<0&&yt&&(yt.hasOnce=!0)}function jl(i){return i.dynamicChildren=Ei>0?yt||Os:null,Yh(),Ei>0&&yt&&yt.push(i),i}function Ct(i,t,e,s,r,n){return jl(Ae(i,t,e,s,r,n,!0))}function Zh(i,t,e,s,r){return jl(Je(i,t,e,s,r,!0))}function nr(i){return i?i.__v_isVNode===!0:!1}function zs(i,t){return i.type===t.type&&i.key===t.key}const Ul=({key:i})=>i!=null?i:null,zi=({ref:i,ref_key:t,ref_for:e})=>(typeof i=="number"&&(i=""+i),i!=null?We(i)||tt(i)||Ee(i)?{i:mt,r:i,k:t,f:!!e}:i:null);function Ae(i,t=null,e=null,s=0,r=null,n=i===dt?0:1,a=!1,o=!1){const l={__v_isVNode:!0,__v_skip:!0,type:i,props:t,key:t&&Ul(t),ref:t&&zi(t),scopeId:gl,slotScopeIds:null,children:e,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:n,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:mt};return o?(Yn(l,e),n&128&&i.normalize(l)):e&&(l.shapeFlag|=We(e)?8:16),Ei>0&&!a&&yt&&(l.patchFlag>0||n&6)&&l.patchFlag!==32&&yt.push(l),l}const Je=Qh;function Qh(i,t=null,e=null,s=0,r=null,n=!1){if((!i||i===bh)&&(i=As),nr(i)){const o=Vs(i,t,!0);return e&&Yn(o,e),Ei>0&&!n&&yt&&(o.shapeFlag&6?yt[yt.indexOf(i)]=o:yt.push(o)),o.patchFlag=-2,o}if(ff(i)&&(i=i.__vccOpts),t){t=ef(t);let{class:o,style:l}=t;o&&!We(o)&&(t.class=bi(o)),je(l)&&(Wn(l)&&!be(l)&&(l=Xe({},l)),t.style=Bn(l))}const a=We(i)?1:$l(i)?128:rh(i)?64:je(i)?4:Ee(i)?2:0;return Ae(i,t,e,s,r,a,n,!0)}function ef(i){return i?Wn(i)||kl(i)?Xe({},i):i:null}function Vs(i,t,e=!1,s=!1){const{props:r,ref:n,patchFlag:a,children:o,transition:l}=i,h=t?sf(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:i.type,props:h,key:h&&Ul(h),ref:t&&t.ref?e&&n?be(n)?n.concat(zi(t)):[n,zi(t)]:zi(t):n,scopeId:i.scopeId,slotScopeIds:i.slotScopeIds,children:o,target:i.target,targetStart:i.targetStart,targetAnchor:i.targetAnchor,staticCount:i.staticCount,shapeFlag:i.shapeFlag,patchFlag:t&&i.type!==dt?a===-1?16:a|16:a,dynamicProps:i.dynamicProps,dynamicChildren:i.dynamicChildren,appContext:i.appContext,dirs:i.dirs,transition:l,component:i.component,suspense:i.suspense,ssContent:i.ssContent&&Vs(i.ssContent),ssFallback:i.ssFallback&&Vs(i.ssFallback),el:i.el,anchor:i.anchor,ctx:i.ctx,ce:i.ce};return l&&s&&zn(u,l.clone(u)),u}function Tn(i=" ",t=0){return Je(Ar,null,i,t)}function tf(i="",t=!1){return t?(St(),Zh(As,null,i)):Je(As,null,i)}function It(i){return i==null||typeof i=="boolean"?Je(As):be(i)?Je(dt,null,i.slice()):nr(i)?rs(i):Je(Ar,null,String(i))}function rs(i){return i.el===null&&i.patchFlag!==-1||i.memo?i:Vs(i)}function Yn(i,t){let e=0;const{shapeFlag:s}=i;if(t==null)t=null;else if(be(t))e=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Yn(i,r()),r._c&&(r._d=!0));return}else{e=32;const r=t._;!r&&!kl(t)?t._ctx=mt:r===3&&mt&&(mt.slots._===1?t._=1:(t._=2,i.patchFlag|=1024))}else Ee(t)?(t={default:t,_ctx:mt},e=32):(t=String(t),s&64?(e=16,t=[Tn(t)]):e=8);i.children=t,i.shapeFlag|=e}function sf(...i){const t={};for(let e=0;e{let r;return(r=i[e])||(r=i[e]=[]),r.push(s),n=>{r.length>1?r.forEach(a=>a(n)):r[0](n)}};ar=t("__VUE_INSTANCE_SETTERS__",e=>et=e),bn=t("__VUE_SSR_SETTERS__",e=>wr=e)}const Ni=i=>{const t=et;return ar(i),i.scope.on(),()=>{i.scope.off(),ar(t)}},Ha=()=>{et&&et.scope.off(),ar(null)};function Vl(i){return i.vnode.shapeFlag&4}let wr=!1;function of(i,t=!1,e=!1){t&&bn(t);const{props:s,children:r}=i.vnode,n=Vl(i);Ih(i,s,n,t),Oh(i,r,e);const a=n?lf(i,t):void 0;return t&&bn(!1),a}function lf(i,t){const e=i.type;i.accessCache=Object.create(null),i.proxy=new Proxy(i.ctx,Sh);const{setup:s}=e;if(s){const r=i.setupContext=s.length>1?uf(i):null,n=Ni(i);cs();const a=Ii(s,i,0,[i.props,r]);if(us(),n(),Ho(a)){if(hi(i)||Tl(i),a.then(Ha,Ha),t)return a.then(o=>{Ga(i,o,t)}).catch(o=>{Sr(o,i,0)});i.asyncDep=a}else Ga(i,a,t)}else Hl(i,t)}function Ga(i,t,e){Ee(t)?i.type.__ssrInlineRender?i.ssrRender=t:i.render=t:je(t)&&(i.setupState=fl(t)),Hl(i,e)}let Wa;function Hl(i,t,e){const s=i.type;if(!i.render){if(!t&&Wa&&!s.render){const r=s.template||Jn(i).template;if(r){const{isCustomElement:n,compilerOptions:a}=i.appContext.config,{delimiters:o,compilerOptions:l}=s,h=Xe(Xe({isCustomElement:n,delimiters:o},a),l);s.render=Wa(r,h)}}i.render=s.render||Et}{const r=Ni(i);cs();try{Ph(i)}finally{us(),r()}}}const cf={get(i,t){return st(i,"get",""),i[t]}};function uf(i){const t=e=>{i.exposed=e||{}};return{attrs:new Proxy(i.attrs,cf),slots:i.slots,emit:i.emit,expose:t}}function Cr(i){return i.exposed?i.exposeProxy||(i.exposeProxy=new Proxy(fl(Gu(i.exposed)),{get(t,e){if(e in t)return t[e];if(e in fi)return fi[e](i)},has(t,e){return e in t||e in fi}})):i.proxy}function hf(i,t=!0){return Ee(i)?i.displayName||i.name:i.name||t&&i.__name}function ff(i){return Ee(i)&&"__vccOpts"in i}const Ht=(i,t)=>Ju(i,t,wr);function Ka(i,t,e){const s=arguments.length;return s===2?je(t)&&!be(t)?nr(t)?Je(i,null,[t]):Je(i,t):Je(i,null,t):(s>3?e=Array.prototype.slice.call(arguments,2):s===3&&nr(e)&&(e=[e]),Je(i,t,e))}const pf="3.5.11";/** +* @vue/runtime-dom v3.5.11 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let xn;const qa=typeof window!="undefined"&&window.trustedTypes;if(qa)try{xn=qa.createPolicy("vue",{createHTML:i=>i})}catch{}const Gl=xn?i=>xn.createHTML(i):i=>i,df="http://www.w3.org/2000/svg",mf="http://www.w3.org/1998/Math/MathML",Rt=typeof document!="undefined"?document:null,za=Rt&&Rt.createElement("template"),yf={insert:(i,t,e)=>{t.insertBefore(i,e||null)},remove:i=>{const t=i.parentNode;t&&t.removeChild(i)},createElement:(i,t,e,s)=>{const r=t==="svg"?Rt.createElementNS(df,i):t==="mathml"?Rt.createElementNS(mf,i):e?Rt.createElement(i,{is:e}):Rt.createElement(i);return i==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:i=>Rt.createTextNode(i),createComment:i=>Rt.createComment(i),setText:(i,t)=>{i.nodeValue=t},setElementText:(i,t)=>{i.textContent=t},parentNode:i=>i.parentNode,nextSibling:i=>i.nextSibling,querySelector:i=>Rt.querySelector(i),setScopeId(i,t){i.setAttribute(t,"")},insertStaticContent(i,t,e,s,r,n){const a=e?e.previousSibling:t.lastChild;if(r&&(r===n||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),e),!(r===n||!(r=r.nextSibling)););else{za.innerHTML=Gl(s==="svg"?`${i}`:s==="mathml"?`${i}`:i);const o=za.content;if(s==="svg"||s==="mathml"){const l=o.firstChild;for(;l.firstChild;)o.appendChild(l.firstChild);o.removeChild(l)}t.insertBefore(o,e)}return[a?a.nextSibling:t.firstChild,e?e.previousSibling:t.lastChild]}},gf=Symbol("_vtc");function Tf(i,t,e){const s=i[gf];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?i.removeAttribute("class"):e?i.setAttribute("class",t):i.className=t}const Ja=Symbol("_vod"),bf=Symbol("_vsh"),xf=Symbol(""),Sf=/(^|;)\s*display\s*:/;function Pf(i,t,e){const s=i.style,r=We(e);let n=!1;if(e&&!r){if(t)if(We(t))for(const a of t.split(";")){const o=a.slice(0,a.indexOf(":")).trim();e[o]==null&&Ji(s,o,"")}else for(const a in t)e[a]==null&&Ji(s,a,"");for(const a in e)a==="display"&&(n=!0),Ji(s,a,e[a])}else if(r){if(t!==e){const a=s[xf];a&&(e+=";"+a),s.cssText=e,n=Sf.test(e)}}else t&&i.removeAttribute("style");Ja in i&&(i[Ja]=n?s.display:"",i[bf]&&(s.display="none"))}const Xa=/\s*!important$/;function Ji(i,t,e){if(be(e))e.forEach(s=>Ji(i,t,s));else if(e==null&&(e=""),t.startsWith("--"))i.setProperty(t,e);else{const s=Ef(i,t);Xa.test(e)?i.setProperty(ws(s),e.replace(Xa,""),"important"):i[s]=e}}const Ya=["Webkit","Moz","ms"],zr={};function Ef(i,t){const e=zr[t];if(e)return e;let s=xt(t);if(s!=="filter"&&s in i)return zr[t]=s;s=yr(s);for(let r=0;rJr||(kf.then(()=>Jr=0),Jr=Date.now());function Lf(i,t){const e=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=e.attached)return;_t(If(s,e.value),t,5,[s])};return e.value=i,e.attached=vf(),e}function If(i,t){if(be(t)){const e=i.stopImmediatePropagation;return i.stopImmediatePropagation=()=>{e.call(i),i._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const io=i=>i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&i.charCodeAt(2)>96&&i.charCodeAt(2)<123,Nf=(i,t,e,s,r,n)=>{const a=r==="svg";t==="class"?Tf(i,s,a):t==="style"?Pf(i,e,s):pr(t)?Mn(t)||wf(i,t,e,s,n):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):_f(i,t,s,a))?(eo(i,t,s),!i.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Qa(i,t,s,a,n,t!=="value")):i._isVueCE&&(/[A-Z]/.test(t)||!We(s))?eo(i,xt(t),s):(t==="true-value"?i._trueValue=s:t==="false-value"&&(i._falseValue=s),Qa(i,t,s,a))};function _f(i,t,e,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in i&&io(t)&&Ee(e));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&i.tagName==="INPUT"||t==="type"&&i.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=i.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return io(t)&&We(e)?!1:t in i}const or=i=>{const t=i.props["onUpdate:modelValue"]||!1;return be(t)?e=>Wi(t,e):t};function Mf(i){i.target.composing=!0}function ro(i){const t=i.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const $s=Symbol("_assign"),no={created(i,{modifiers:{lazy:t,trim:e,number:s}},r){i[$s]=or(r);const n=s||r.props&&r.props.type==="number";bs(i,t?"change":"input",a=>{if(a.target.composing)return;let o=i.value;e&&(o=o.trim()),n&&(o=cn(o)),i[$s](o)}),e&&bs(i,"change",()=>{i.value=i.value.trim()}),t||(bs(i,"compositionstart",Mf),bs(i,"compositionend",ro),bs(i,"change",ro))},mounted(i,{value:t}){i.value=t==null?"":t},beforeUpdate(i,{value:t,oldValue:e,modifiers:{lazy:s,trim:r,number:n}},a){if(i[$s]=or(a),i.composing)return;const o=(n||i.type==="number")&&!/^0\d/.test(i.value)?cn(i.value):i.value,l=t==null?"":t;o!==l&&(document.activeElement===i&&i.type!=="range"&&(s&&t===e||r&&i.value.trim()===l)||(i.value=l))}},Xr={deep:!0,created(i,t,e){i[$s]=or(e),bs(i,"change",()=>{const s=i._modelValue,r=Of(i),n=i.checked,a=i[$s];if(be(s)){const o=zo(s,r),l=o!==-1;if(n&&!l)a(s.concat(r));else if(!n&&l){const h=[...s];h.splice(o,1),a(h)}}else if(dr(s)){const o=new Set(s);n?o.add(r):o.delete(r),a(o)}else a(Wl(i,n))})},mounted:ao,beforeUpdate(i,t,e){i[$s]=or(e),ao(i,t,e)}};function ao(i,{value:t},e){i._modelValue=t;let s;be(t)?s=zo(t,e.props.value)>-1:dr(t)?s=t.has(e.props.value):s=gr(t,Wl(i,!0)),i.checked!==s&&(i.checked=s)}function Of(i){return"_value"in i?i._value:i.value}function Wl(i,t){const e=t?"_trueValue":"_falseValue";return e in i?i[e]:t}const Df=Xe({patchProp:Nf},yf);let oo;function Ff(){return oo||(oo=Bh(Df))}const Bf=(...i)=>{const t=Ff().createApp(...i),{mount:e}=t;return t.mount=s=>{const r=$f(s);if(!r)return;const n=t._component;!Ee(n)&&!n.render&&!n.template&&(n.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const a=e(r,!1,Rf(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),a},t};function Rf(i){if(i instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&i instanceof MathMLElement)return"mathml"}function $f(i){return We(i)?document.querySelector(i):i}var Ut=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},kr={};Object.defineProperty(kr,"__esModule",{value:!0});function jf(i,t){if(i==null)return{};var e={};for(var s in i)if({}.hasOwnProperty.call(i,s)){if(t.includes(s))continue;e[s]=i[s]}return e}class as{constructor(t,e,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=e,this.index=s}}class lr{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}}function ot(i,t){const{line:e,column:s,index:r}=i;return new as(e,s+t,r+t)}const lo="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";var Uf={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:lo},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:lo}};const co={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},Xi=i=>i.type==="UpdateExpression"?co.UpdateExpression[`${i.prefix}`]:co[i.type];var Vf={AccessorIsGenerator:({kind:i})=>`A ${i}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:i})=>`Missing initializer in ${i} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:i})=>`\`${i}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:i})=>`'import.${i}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:i,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`. +- Did you mean \`export { '${i}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:i})=>`'${i==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:i})=>`Unsyntactic ${i==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:i})=>`A string literal cannot be used as an imported binding. +- Did you mean \`import { "${i}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:i})=>`\`import()\` requires exactly ${i===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:i})=>`Expected number in radix ${i}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:i})=>`Escape sequence in keyword ${i}.`,InvalidIdentifier:({identifierName:i})=>`Invalid identifier ${i}.`,InvalidLhs:({ancestor:i})=>`Invalid left-hand side in ${Xi(i)}.`,InvalidLhsBinding:({ancestor:i})=>`Binding invalid left-hand side in ${Xi(i)}.`,InvalidLhsOptionalChaining:({ancestor:i})=>`Invalid optional chaining in the left-hand side of ${Xi(i)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:i})=>`Unexpected character '${i}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:i})=>`Private name #${i} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:i})=>`Label '${i}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:i})=>`This experimental syntax requires enabling the parser plugin: ${i.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:i})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${i.map(t=>JSON.stringify(t)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:i})=>`Duplicate key "${i}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:i})=>`An export name cannot include a lone surrogate, found '\\u${i.toString(16)}'.`,ModuleExportUndefined:({localName:i})=>`Export '${i}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:i})=>`Private names are only allowed in property accesses (\`obj.#${i}\`) or in \`in\` expressions (\`#${i} in obj\`).`,PrivateNameRedeclaration:({identifierName:i})=>`Duplicate private name #${i}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:i})=>`Unexpected keyword '${i}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:i})=>`Unexpected reserved word '${i}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:i,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${i?`, expected "${i}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:i,onlyValidPropertyName:t})=>`The only valid meta property for ${i} is ${i}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:i})=>`Identifier '${i}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Hf={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:i})=>`Assigning to '${i}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:i})=>`Binding '${i}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."};const Gf=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]);var Wf={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:i})=>`Invalid topic token ${i}. In order to use ${i} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${i}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:i})=>`Hack-style pipe body cannot be an unparenthesized ${Xi({type:i})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'};const Kf=["message"];function uo(i,t,e){Object.defineProperty(i,t,{enumerable:!1,configurable:!0,value:e})}function qf({toMessage:i,code:t,reasonCode:e,syntaxPlugin:s}){const r=e==="MissingPlugin"||e==="MissingOneOfPlugins";{const n={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};n[e]&&(e=n[e])}return function n(a,o){const l=new SyntaxError;return l.code=t,l.reasonCode=e,l.loc=a,l.pos=a.index,l.syntaxPlugin=s,r&&(l.missingPlugin=o.missingPlugin),uo(l,"clone",function(u={}){var d;const{line:c,column:f,index:p}=(d=u.loc)!=null?d:a;return n(new as(c,f,p),Object.assign({},o,u.details))}),uo(l,"details",o),Object.defineProperty(l,"message",{configurable:!0,get(){const h=`${i(o)} (${a.line}:${a.column})`;return this.message=h,h},set(h){Object.defineProperty(this,"message",{value:h,writable:!0})}}),l}}function Gt(i,t){if(Array.isArray(i))return s=>Gt(s,i[0]);const e={};for(const s of Object.keys(i)){const r=i[s],n=typeof r=="string"?{message:()=>r}:typeof r=="function"?{message:r}:r,{message:a}=n,o=jf(n,Kf),l=typeof a=="string"?()=>a:a;e[s]=qf(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:l},t?{syntaxPlugin:t}:{},o))}return e}const w=Object.assign({},Gt(Uf),Gt(Vf),Gt(Hf),Gt`pipelineOperator`(Wf)),{defineProperty:zf}=Object,ho=(i,t)=>{i&&zf(i,t,{enumerable:!1,value:i[t]})};function Js(i){return ho(i.loc.start,"index"),ho(i.loc.end,"index"),i}var Jf=i=>class extends i{parse(){const e=Js(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(Js)),e}parseRegExpLiteral({pattern:e,flags:s}){let r=null;try{r=new RegExp(e,s)}catch{}const n=this.estreeParseLiteral(r);return n.regex={pattern:e,flags:s},n}parseBigIntLiteral(e){let s;try{s=BigInt(e)}catch{s=null}const r=this.estreeParseLiteral(s);return r.bigint=String(r.value||e),r}parseDecimalLiteral(e){const r=this.estreeParseLiteral(null);return r.decimal=String(r.value||e),r}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){const s=e.value;delete e.value,s.type="Literal",s.raw=s.extra.raw,s.value=s.extra.expressionValue;const r=e;return r.type="ExpressionStatement",r.expression=s,r.directive=s.extra.rawValue,delete s.extra,r}initFunction(e,s){super.initFunction(e,s),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var s;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((s=e.expression.extra)!=null&&s.parenthesized)}parseBlockBody(e,s,r,n,a){super.parseBlockBody(e,s,r,n,a);const o=e.directives.map(l=>this.directiveToStmt(l));e.body=o.concat(e.body),delete e.directives}pushClassMethod(e,s,r,n,a,o){this.parseMethod(s,r,n,a,o,"ClassMethod",!0),s.typeParameters&&(s.value.typeParameters=s.typeParameters,delete s.typeParameters),e.body.push(s)}parsePrivateName(){const e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){const s=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=s,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?e.type==="PrivateIdentifier":super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,s){const r=super.parseLiteral(e,s);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(e,s,r=!1){super.parseFunctionBody(e,s,r),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,s,r,n,a,o,l=!1){let h=this.startNode();return h.kind=e.kind,h=super.parseMethod(h,s,r,n,a,o,l),h.type="FunctionExpression",delete h.kind,e.value=h,o==="ClassPrivateMethod"&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}nameIsConstructor(e){return e.type==="Literal"?e.value==="constructor":super.nameIsConstructor(e)}parseClassProperty(...e){const s=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition"),s}parseClassPrivateProperty(...e){const s=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition",s.computed=!1),s}parseObjectMethod(e,s,r,n,a){const o=super.parseObjectMethod(e,s,r,n,a);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(e,s,r,n){const a=super.parseObjectProperty(e,s,r,n);return a&&(a.kind="init",a.type="Property"),a}isValidLVal(e,s,r){return e==="Property"?"value":super.isValidLVal(e,s,r)}isAssignable(e,s){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,s):super.isAssignable(e,s)}toAssignable(e,s=!1){if(e!=null&&this.isObjectProperty(e)){const{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,s)}else super.toAssignable(e,s)}toAssignableObjectExpressionProp(e,s,r){e.type==="Property"&&(e.kind==="get"||e.kind==="set")?this.raise(w.PatternHasAccessor,e.key):e.type==="Property"&&e.method?this.raise(w.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,s,r)}finishCallExpression(e,s){const r=super.finishCallExpression(e,s);if(r.callee.type==="Import"){if(r.type="ImportExpression",r.source=r.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var n,a;r.options=(n=r.arguments[1])!=null?n:null,r.attributes=(a=r.arguments[1])!=null?a:null}delete r.arguments,delete r.callee}return r}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,s){const r=this.state.lastTokStartLoc,n=super.parseExport(e,s);switch(n.type){case"ExportAllDeclaration":n.exported=null;break;case"ExportNamedDeclaration":n.specifiers.length===1&&n.specifiers[0].type==="ExportNamespaceSpecifier"&&(n.type="ExportAllDeclaration",n.exported=n.specifiers[0].exported,delete n.specifiers);case"ExportDefaultDeclaration":{var a;const{declaration:o}=n;(o==null?void 0:o.type)==="ClassDeclaration"&&((a=o.decorators)==null?void 0:a.length)>0&&o.start===n.start&&this.resetStartLocation(n,r)}break}return n}parseSubscript(e,s,r,n){const a=super.parseSubscript(e,s,r,n);if(n.optionalChainMember){if((a.type==="OptionalMemberExpression"||a.type==="OptionalCallExpression")&&(a.type=a.type.substring(8)),n.stop){const o=this.startNodeAtNode(a);return o.expression=a,this.finishNode(o,"ChainExpression")}}else(a.type==="MemberExpression"||a.type==="CallExpression")&&(a.optional=!1);return a}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.type==="Property"&&(e.method||e.kind==="get"||e.kind==="set")}finishNodeAt(e,s,r){return Js(super.finishNodeAt(e,s,r))}resetStartLocation(e,s){super.resetStartLocation(e,s),Js(e)}resetEndLocation(e,s=this.state.lastTokEndLoc){super.resetEndLocation(e,s),Js(e)}};class ri{constructor(t,e){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!e}}const Fe={brace:new ri("{"),j_oTag:new ri("...",!0)};Fe.template=new ri("`",!0);const Ce=!0,oe=!0,Yr=!0,Xs=!0,Qt=!0,Xf=!0;class Kl{constructor(t,e={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop!=null?e.binop:null,this.updateContext=null}}const Zn=new Map;function Le(i,t={}){t.keyword=i;const e=me(i,t);return Zn.set(i,e),e}function rt(i,t){return me(i,{beforeExpr:Ce,binop:t})}let mi=-1;const $t=[],Qn=[],ea=[],ta=[],sa=[],ia=[];function me(i,t={}){var e,s,r,n;return++mi,Qn.push(i),ea.push((e=t.binop)!=null?e:-1),ta.push((s=t.beforeExpr)!=null?s:!1),sa.push((r=t.startsExpr)!=null?r:!1),ia.push((n=t.prefix)!=null?n:!1),$t.push(new Kl(i,t)),mi}function we(i,t={}){var e,s,r,n;return++mi,Zn.set(i,mi),Qn.push(i),ea.push((e=t.binop)!=null?e:-1),ta.push((s=t.beforeExpr)!=null?s:!1),sa.push((r=t.startsExpr)!=null?r:!1),ia.push((n=t.prefix)!=null?n:!1),$t.push(new Kl("name",t)),mi}const Yf={bracketL:me("[",{beforeExpr:Ce,startsExpr:oe}),bracketHashL:me("#[",{beforeExpr:Ce,startsExpr:oe}),bracketBarL:me("[|",{beforeExpr:Ce,startsExpr:oe}),bracketR:me("]"),bracketBarR:me("|]"),braceL:me("{",{beforeExpr:Ce,startsExpr:oe}),braceBarL:me("{|",{beforeExpr:Ce,startsExpr:oe}),braceHashL:me("#{",{beforeExpr:Ce,startsExpr:oe}),braceR:me("}"),braceBarR:me("|}"),parenL:me("(",{beforeExpr:Ce,startsExpr:oe}),parenR:me(")"),comma:me(",",{beforeExpr:Ce}),semi:me(";",{beforeExpr:Ce}),colon:me(":",{beforeExpr:Ce}),doubleColon:me("::",{beforeExpr:Ce}),dot:me("."),question:me("?",{beforeExpr:Ce}),questionDot:me("?."),arrow:me("=>",{beforeExpr:Ce}),template:me("template"),ellipsis:me("...",{beforeExpr:Ce}),backQuote:me("`",{startsExpr:oe}),dollarBraceL:me("${",{beforeExpr:Ce,startsExpr:oe}),templateTail:me("...`",{startsExpr:oe}),templateNonTail:me("...${",{beforeExpr:Ce,startsExpr:oe}),at:me("@"),hash:me("#",{startsExpr:oe}),interpreterDirective:me("#!..."),eq:me("=",{beforeExpr:Ce,isAssign:Xs}),assign:me("_=",{beforeExpr:Ce,isAssign:Xs}),slashAssign:me("_=",{beforeExpr:Ce,isAssign:Xs}),xorAssign:me("_=",{beforeExpr:Ce,isAssign:Xs}),moduloAssign:me("_=",{beforeExpr:Ce,isAssign:Xs}),incDec:me("++/--",{prefix:Qt,postfix:Xf,startsExpr:oe}),bang:me("!",{beforeExpr:Ce,prefix:Qt,startsExpr:oe}),tilde:me("~",{beforeExpr:Ce,prefix:Qt,startsExpr:oe}),doubleCaret:me("^^",{startsExpr:oe}),doubleAt:me("@@",{startsExpr:oe}),pipeline:rt("|>",0),nullishCoalescing:rt("??",1),logicalOR:rt("||",1),logicalAND:rt("&&",2),bitwiseOR:rt("|",3),bitwiseXOR:rt("^",4),bitwiseAND:rt("&",5),equality:rt("==/!=/===/!==",6),lt:rt("/<=/>=",7),gt:rt("/<=/>=",7),relational:rt("/<=/>=",7),bitShift:rt("<>/>>>",8),bitShiftL:rt("<>/>>>",8),bitShiftR:rt("<>/>>>",8),plusMin:me("+/-",{beforeExpr:Ce,binop:9,prefix:Qt,startsExpr:oe}),modulo:me("%",{binop:10,startsExpr:oe}),star:me("*",{binop:10}),slash:rt("/",10),exponent:me("**",{beforeExpr:Ce,binop:11,rightAssociative:!0}),_in:Le("in",{beforeExpr:Ce,binop:7}),_instanceof:Le("instanceof",{beforeExpr:Ce,binop:7}),_break:Le("break"),_case:Le("case",{beforeExpr:Ce}),_catch:Le("catch"),_continue:Le("continue"),_debugger:Le("debugger"),_default:Le("default",{beforeExpr:Ce}),_else:Le("else",{beforeExpr:Ce}),_finally:Le("finally"),_function:Le("function",{startsExpr:oe}),_if:Le("if"),_return:Le("return",{beforeExpr:Ce}),_switch:Le("switch"),_throw:Le("throw",{beforeExpr:Ce,prefix:Qt,startsExpr:oe}),_try:Le("try"),_var:Le("var"),_const:Le("const"),_with:Le("with"),_new:Le("new",{beforeExpr:Ce,startsExpr:oe}),_this:Le("this",{startsExpr:oe}),_super:Le("super",{startsExpr:oe}),_class:Le("class",{startsExpr:oe}),_extends:Le("extends",{beforeExpr:Ce}),_export:Le("export"),_import:Le("import",{startsExpr:oe}),_null:Le("null",{startsExpr:oe}),_true:Le("true",{startsExpr:oe}),_false:Le("false",{startsExpr:oe}),_typeof:Le("typeof",{beforeExpr:Ce,prefix:Qt,startsExpr:oe}),_void:Le("void",{beforeExpr:Ce,prefix:Qt,startsExpr:oe}),_delete:Le("delete",{beforeExpr:Ce,prefix:Qt,startsExpr:oe}),_do:Le("do",{isLoop:Yr,beforeExpr:Ce}),_for:Le("for",{isLoop:Yr}),_while:Le("while",{isLoop:Yr}),_as:we("as",{startsExpr:oe}),_assert:we("assert",{startsExpr:oe}),_async:we("async",{startsExpr:oe}),_await:we("await",{startsExpr:oe}),_defer:we("defer",{startsExpr:oe}),_from:we("from",{startsExpr:oe}),_get:we("get",{startsExpr:oe}),_let:we("let",{startsExpr:oe}),_meta:we("meta",{startsExpr:oe}),_of:we("of",{startsExpr:oe}),_sent:we("sent",{startsExpr:oe}),_set:we("set",{startsExpr:oe}),_source:we("source",{startsExpr:oe}),_static:we("static",{startsExpr:oe}),_using:we("using",{startsExpr:oe}),_yield:we("yield",{startsExpr:oe}),_asserts:we("asserts",{startsExpr:oe}),_checks:we("checks",{startsExpr:oe}),_exports:we("exports",{startsExpr:oe}),_global:we("global",{startsExpr:oe}),_implements:we("implements",{startsExpr:oe}),_intrinsic:we("intrinsic",{startsExpr:oe}),_infer:we("infer",{startsExpr:oe}),_is:we("is",{startsExpr:oe}),_mixins:we("mixins",{startsExpr:oe}),_proto:we("proto",{startsExpr:oe}),_require:we("require",{startsExpr:oe}),_satisfies:we("satisfies",{startsExpr:oe}),_keyof:we("keyof",{startsExpr:oe}),_readonly:we("readonly",{startsExpr:oe}),_unique:we("unique",{startsExpr:oe}),_abstract:we("abstract",{startsExpr:oe}),_declare:we("declare",{startsExpr:oe}),_enum:we("enum",{startsExpr:oe}),_module:we("module",{startsExpr:oe}),_namespace:we("namespace",{startsExpr:oe}),_interface:we("interface",{startsExpr:oe}),_type:we("type",{startsExpr:oe}),_opaque:we("opaque",{startsExpr:oe}),name:me("name",{startsExpr:oe}),string:me("string",{startsExpr:oe}),num:me("num",{startsExpr:oe}),bigint:me("bigint",{startsExpr:oe}),decimal:me("decimal",{startsExpr:oe}),regexp:me("regexp",{startsExpr:oe}),privateName:me("#name",{startsExpr:oe}),eof:me("eof"),jsxName:me("jsxName"),jsxText:me("jsxText",{beforeExpr:!0}),jsxTagStart:me("jsxTagStart",{startsExpr:!0}),jsxTagEnd:me("jsxTagEnd"),placeholder:me("%%",{startsExpr:!0})};function Me(i){return i>=93&&i<=132}function Zf(i){return i<=92}function Pt(i){return i>=58&&i<=132}function ql(i){return i>=58&&i<=136}function Qf(i){return ta[i]}function Sn(i){return sa[i]}function ep(i){return i>=29&&i<=33}function fo(i){return i>=129&&i<=131}function tp(i){return i>=90&&i<=92}function ra(i){return i>=58&&i<=92}function sp(i){return i>=39&&i<=59}function ip(i){return i===34}function rp(i){return ia[i]}function np(i){return i>=121&&i<=123}function ap(i){return i>=124&&i<=130}function os(i){return Qn[i]}function Yi(i){return ea[i]}function op(i){return i===57}function cr(i){return i>=24&&i<=25}function Bt(i){return $t[i]}$t[8].updateContext=i=>{i.pop()},$t[5].updateContext=$t[7].updateContext=$t[23].updateContext=i=>{i.push(Fe.brace)},$t[22].updateContext=i=>{i[i.length-1]===Fe.template?i.pop():i.push(Fe.template)},$t[142].updateContext=i=>{i.push(Fe.j_expr,Fe.j_oTag)};let na="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",zl="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";const lp=new RegExp("["+na+"]"),cp=new RegExp("["+na+zl+"]");na=zl=null;const Jl=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],up=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];function Pn(i,t){let e=65536;for(let s=0,r=t.length;si)return!1;if(e+=t[s+1],e>=i)return!0}return!1}function Vt(i){return i<65?i===36:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&lp.test(String.fromCharCode(i)):Pn(i,Jl)}function js(i){return i<48?i===36:i<58?!0:i<65?!1:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&cp.test(String.fromCharCode(i)):Pn(i,Jl)||Pn(i,up)}const aa={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},hp=new Set(aa.keyword),fp=new Set(aa.strict),pp=new Set(aa.strictBind);function Xl(i,t){return t&&i==="await"||i==="enum"}function Yl(i,t){return Xl(i,t)||fp.has(i)}function Zl(i){return pp.has(i)}function Ql(i,t){return Yl(i,t)||Zl(i)}function dp(i){return hp.has(i)}function mp(i,t,e){return i===64&&t===64&&Vt(e)}const yp=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function gp(i){return yp.has(i)}class oa{constructor(t){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=t}}class la{constructor(t,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=e}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){const t=this.currentThisScopeFlags();return(t&64)>0&&(t&2)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(e&128)return!0;if(e&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new oa(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&130||!this.parser.inModule&&t.flags&1)}declareName(t,e,s){let r=this.currentScope();if(e&8||e&16){this.checkRedeclarationInScope(r,t,e,s);let n=r.names.get(t)||0;e&16?n=n|4:(r.firstLexicalName||(r.firstLexicalName=t),n=n|2),r.names.set(t,n),e&8&&this.maybeExportDefined(r,t)}else if(e&4)for(let n=this.scopeStack.length-1;n>=0&&(r=this.scopeStack[n],this.checkRedeclarationInScope(r,t,e,s),r.names.set(t,(r.names.get(t)||0)|1),this.maybeExportDefined(r,t),!(r.flags&387));--n);this.parser.inModule&&r.flags&1&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.parser.inModule&&t.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,r){this.isRedeclaredInScope(t,e,s)&&this.parser.raise(w.VarRedeclaration,r,{identifierName:e})}isRedeclaredInScope(t,e,s){if(!(s&1))return!1;if(s&8)return t.names.has(e);const r=t.names.get(e);return s&16?(r&2)>0||!this.treatFunctionsAsVarInScope(t)&&(r&1)>0:(r&2)>0&&!(t.flags&8&&t.firstLexicalName===e)||!this.treatFunctionsAsVarInScope(t)&&(r&4)>0}checkLocalExport(t){const{name:e}=t;this.scopeStack[0].names.has(e)||this.undefinedExports.set(e,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(e&387)return e}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(e&451&&!(e&4))return e}}}class Tp extends oa{constructor(...t){super(...t),this.declareFunctions=new Set}}class bp extends la{createScope(t){return new Tp(t)}declareName(t,e,s){const r=this.currentScope();if(e&2048){this.checkRedeclarationInScope(r,t,e,s),this.maybeExportDefined(r,t),r.declareFunctions.add(t);return}super.declareName(t,e,s)}isRedeclaredInScope(t,e,s){if(super.isRedeclaredInScope(t,e,s))return!0;if(s&2048&&!t.declareFunctions.has(e)){const r=t.names.get(e);return(r&4)>0||(r&2)>0}return!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}}class xp{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){if(typeof t=="string")return this.plugins.has(t);{const[e,s]=t;if(!this.hasPlugin(e))return!1;const r=this.plugins.get(e);for(const n of Object.keys(s))if((r==null?void 0:r[n])!==s[n])return!1;return!0}}getPluginOption(t,e){var s;return(s=this.plugins.get(t))==null?void 0:s[e]}}function ec(i,t){i.trailingComments===void 0?i.trailingComments=t:i.trailingComments.unshift(...t)}function Sp(i,t){i.leadingComments===void 0?i.leadingComments=t:i.leadingComments.unshift(...t)}function Ai(i,t){i.innerComments===void 0?i.innerComments=t:i.innerComments.unshift(...t)}function Ys(i,t,e){let s=null,r=t.length;for(;s===null&&r>0;)s=t[--r];s===null||s.start>e.start?Ai(i,e.comments):ec(s,e.comments)}class Pp extends xp{addComment(t){this.filename&&(t.loc.filename=this.filename);const{commentsLen:e}=this.state;this.comments.length!==e&&(this.comments.length=e),this.comments.push(t),this.state.commentsLen++}processComment(t){const{commentStack:e}=this.state,s=e.length;if(s===0)return;let r=s-1;const n=e[r];n.start===t.end&&(n.leadingNode=t,r--);const{start:a}=t;for(;r>=0;r--){const o=e[r],l=o.end;if(l>a)o.containingNode=t,this.finalizeComment(o),e.splice(r,1);else{l===a&&(o.trailingNode=t);break}}}finalizeComment(t){const{comments:e}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&ec(t.leadingNode,e),t.trailingNode!==null&&Sp(t.trailingNode,e);else{const{containingNode:s,start:r}=t;if(this.input.charCodeAt(r-1)===44)switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Ys(s,s.properties,t);break;case"CallExpression":case"OptionalCallExpression":Ys(s,s.arguments,t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Ys(s,s.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Ys(s,s.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":Ys(s,s.specifiers,t);break;default:Ai(s,e)}else Ai(s,e)}}finalizeRemainingComments(){const{commentStack:t}=this.state;for(let e=t.length-1;e>=0;e--)this.finalizeComment(t[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){const{commentStack:e}=this.state,{length:s}=e;if(s===0)return;const r=e[s-1];r.leadingNode===t&&(r.leadingNode=null)}resetPreviousIdentifierLeadingComments(t){const{commentStack:e}=this.state,{length:s}=e;s!==0&&(e[s-1].trailingNode===t?e[s-1].trailingNode=null:s>=2&&e[s-2].trailingNode===t&&(e[s-2].trailingNode=null))}takeSurroundingComments(t,e,s){const{commentStack:r}=this.state,n=r.length;if(n===0)return;let a=n-1;for(;a>=0;a--){const o=r[a],l=o.end;if(o.start===s)o.leadingNode=t;else if(l===e)o.trailingNode=t;else if(l0}set strict(t){t?this.flags|=1:this.flags&=-2}init({strictMode:t,sourceType:e,startLine:s,startColumn:r}){this.strict=t===!1?!1:t===!0?!0:e==="module",this.curLine=s,this.lineStart=-r,this.startLoc=this.endLoc=new as(s,r,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(t){t?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(t){t?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(t){t?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(t){t?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(t){t?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(t){t?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(t){t?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(t){t?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(t){t?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(t){t?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(t){t?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(t){t?this.flags|=4096:this.flags&=-4097}curPosition(){return new as(this.curLine,this.pos-this.lineStart,this.pos)}clone(){const t=new ca;return t.flags=this.flags,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}}var wp=function(t){return t>=48&&t<=57};const mo={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Vi={bin:i=>i===48||i===49,oct:i=>i>=48&&i<=55,dec:i=>i>=48&&i<=57,hex:i=>i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102};function yo(i,t,e,s,r,n){const a=e,o=s,l=r;let h="",u=null,d=e;const{length:c}=t;for(;;){if(e>=c){n.unterminated(a,o,l),h+=t.slice(d,e);break}const f=t.charCodeAt(e);if(Cp(i,f,t,e)){h+=t.slice(d,e);break}if(f===92){h+=t.slice(d,e);const p=kp(t,e,s,r,i==="template",n);p.ch===null&&!u?u={pos:e,lineStart:s,curLine:r}:h+=p.ch,{pos:e,lineStart:s,curLine:r}=p,d=e}else f===8232||f===8233?(++e,++r,s=e):f===10||f===13?i==="template"?(h+=t.slice(d,e)+` +`,++e,f===13&&t.charCodeAt(e)===10&&++e,++r,d=s=e):n.unterminated(a,o,l):++e}return{pos:e,str:h,firstInvalidLoc:u,lineStart:s,curLine:r,containsInvalid:!!u}}function Cp(i,t,e,s){return i==="template"?t===96||t===36&&e.charCodeAt(s+1)===123:t===(i==="double"?34:39)}function kp(i,t,e,s,r,n){const a=!r;t++;const o=h=>({pos:t,ch:h,lineStart:e,curLine:s}),l=i.charCodeAt(t++);switch(l){case 110:return o(` +`);case 114:return o("\r");case 120:{let h;return{code:h,pos:t}=En(i,t,e,s,2,!1,a,n),o(h===null?null:String.fromCharCode(h))}case 117:{let h;return{code:h,pos:t}=sc(i,t,e,s,a,n),o(h===null?null:String.fromCodePoint(h))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:i.charCodeAt(t)===10&&++t;case 10:e=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);n.strictNumericEscape(t-1,e,s);default:if(l>=48&&l<=55){const h=t-1;let d=/^[0-7]+/.exec(i.slice(h,t+2))[0],c=parseInt(d,8);c>255&&(d=d.slice(0,-1),c=parseInt(d,8)),t+=d.length-1;const f=i.charCodeAt(t);if(d!=="0"||f===56||f===57){if(r)return o(null);n.strictNumericEscape(h,e,s)}return o(String.fromCharCode(c))}return o(String.fromCharCode(l))}}function En(i,t,e,s,r,n,a,o){const l=t;let h;return{n:h,pos:t}=tc(i,t,e,s,16,r,n,!1,o,!a),h===null&&(a?o.invalidEscapeSequence(l,e,s):t=l-1),{code:h,pos:t}}function tc(i,t,e,s,r,n,a,o,l,h){const u=t,d=r===16?mo.hex:mo.decBinOct,c=r===16?Vi.hex:r===10?Vi.dec:r===8?Vi.oct:Vi.bin;let f=!1,p=0;for(let m=0,b=n==null?1/0:n;m=97?A=P-97+10:P>=65?A=P-65+10:wp(P)?A=P-48:A=1/0,A>=r){if(A<=9&&h)return{n:null,pos:t};if(A<=9&&l.invalidDigit(t,e,s,r))A=0;else if(a)A=0,f=!0;else break}++t,p=p*r+A}return t===u||n!=null&&t-u!==n||f?{n:null,pos:t}:{n:p,pos:t}}function sc(i,t,e,s,r,n){const a=i.charCodeAt(t);let o;if(a===123){if(++t,{code:o,pos:t}=En(i,t,e,s,i.indexOf("}",t)-t,!0,r,n),++t,o!==null&&o>1114111)if(r)n.invalidCodePoint(t,e,s);else return{code:null,pos:t}}else({code:o,pos:t}=En(i,t,e,s,4,!1,r,n));return{code:o,pos:t}}function Zs(i,t,e){return new as(e,i-t,i)}const vp=new Set([103,109,115,105,121,117,100,118]);class ts{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new lr(t.startLoc,t.endLoc)}}class Lp extends Pp{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(s,r,n,a)=>this.options.errorRecovery?(this.raise(w.InvalidDigit,Zs(s,r,n),{radix:a}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(w.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(w.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(w.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(w.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(s,r,n)=>{this.recordStrictModeErrors(w.StrictNumericEscape,Zs(s,r,n))},unterminated:(s,r,n)=>{throw this.raise(w.UnterminatedString,Zs(s-1,r,n))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(w.StrictNumericEscape),unterminated:(s,r,n)=>{throw this.raise(w.UnterminatedTemplate,Zs(s,r,n))}}),this.state=new ca,this.state.init(t),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new ts(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){const t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return Zr.lastIndex=t,Zr.test(this.input)?Zr.lastIndex:t}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return Qr.lastIndex=t,Qr.test(this.input)?Qr.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if((e&64512)===55296&&++tthis.raise(e,s)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let e;this.isLookahead||(e=this.state.curPosition());const s=this.state.pos,r=this.input.indexOf(t,s+2);if(r===-1)throw this.raise(w.UnterminatedComment,this.state.curPosition());for(this.state.pos=r+t.length,Ui.lastIndex=s+2;Ui.test(this.input)&&Ui.lastIndex<=r;)++this.state.curLine,this.state.lineStart=Ui.lastIndex;if(this.isLookahead)return;const n={type:"CommentBlock",value:this.input.slice(s+2,r),start:s,end:r+t.length,loc:new lr(e,this.state.curPosition())};return this.options.tokens&&this.pushToken(n),n}skipLineComment(t){const e=this.state.pos;let s;this.isLookahead||(s=this.state.curPosition());let r=this.input.charCodeAt(this.state.pos+=t);if(this.state.post)){const n=this.skipLineComment(3);n!==void 0&&(this.addComment(n),this.options.attachComment&&e.push(n))}else break e}else if(s===60&&!this.inModule&&this.options.annexB){const r=this.state.pos;if(this.input.charCodeAt(r+1)===33&&this.input.charCodeAt(r+2)===45&&this.input.charCodeAt(r+3)===45){const n=this.skipLineComment(4);n!==void 0&&(this.addComment(n),this.options.attachComment&&e.push(n))}else break e}else break e}}if(e.length>0){const s=this.state.pos,r={start:t,end:s,comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}finishToken(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||this.updateContext(s)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;const t=this.state.pos+1,e=this.codePointAtPos(t);if(e>=48&&e<=57)throw this.raise(w.UnexpectedDigitAfterHash,this.state.curPosition());if(e===123||e===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(e===123?w.RecordExpressionHashIncorrectStartSyntaxType:w.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else Vt(e)?(++this.state.pos,this.finishToken(138,this.readWord1(e))):e===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){const t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57){this.readNumber(!0);return}t===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(t!==33)return!1;const e=this.state.pos;for(this.state.pos+=1;!Us(t)&&++this.state.pos=48&&e<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(t){switch(t){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(w.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(w.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{const e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(t);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(t);return;case 124:case 38:this.readToken_pipe_amp(t);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(t);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(t);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(Vt(t)){this.readWord(t);return}}throw this.raise(w.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(t)})}finishOp(t,e){const s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}readRegexp(){const t=this.state.startLoc,e=this.state.start+1;let s,r,{pos:n}=this.state;for(;;++n){if(n>=this.length)throw this.raise(w.UnterminatedRegExp,ot(t,1));const h=this.input.charCodeAt(n);if(Us(h))throw this.raise(w.UnterminatedRegExp,ot(t,1));if(s)s=!1;else{if(h===91)r=!0;else if(h===93&&r)r=!1;else if(h===47&&!r)break;s=h===92}}const a=this.input.slice(e,n);++n;let o="";const l=()=>ot(t,n+2-e);for(;n=2&&this.input.charCodeAt(e)===48;if(l){const f=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(w.StrictOctalLiteral,s),!this.state.strict){const p=f.indexOf("_");p>0&&this.raise(w.ZeroDigitNumericSeparator,ot(s,p))}o=l&&!/[89]/.test(f)}let h=this.input.charCodeAt(this.state.pos);if(h===46&&!o&&(++this.state.pos,this.readInt(10),r=!0,h=this.input.charCodeAt(this.state.pos)),(h===69||h===101)&&!o&&(h=this.input.charCodeAt(++this.state.pos),(h===43||h===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(w.InvalidOrMissingExponent,s),r=!0,a=!0,h=this.input.charCodeAt(this.state.pos)),h===110&&((r||l)&&this.raise(w.InvalidBigIntLiteral,s),++this.state.pos,n=!0),h===109){this.expectPlugin("decimal",this.state.curPosition()),(a||l)&&this.raise(w.InvalidDecimal,s),++this.state.pos;var u=!0}if(Vt(this.codePointAtPos(this.state.pos)))throw this.raise(w.NumberIdentifier,this.state.curPosition());const d=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(n){this.finishToken(135,d);return}if(u){this.finishToken(136,d);return}const c=o?parseInt(d,8):parseFloat(d);this.finishToken(134,c)}readCodePoint(t){const{code:e,pos:s}=sc(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=s,e}readString(t){const{str:e,pos:s,curLine:r,lineStart:n}=yo(t===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=s+1,this.state.lineStart=n,this.state.curLine=r,this.finishToken(133,e)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){const t=this.input[this.state.pos],{str:e,firstInvalidLoc:s,pos:r,curLine:n,lineStart:a}=yo("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=r+1,this.state.lineStart=a,this.state.curLine=n,s&&(this.state.firstInvalidTemplateEscapePos=new as(s.curLine,s.pos-s.lineStart,s.pos)),this.input.codePointAt(r)===96?this.finishToken(24,s?null:t+e+"`"):(this.state.pos++,this.finishToken(25,s?null:t+e+"${"))}recordStrictModeErrors(t,e){const s=e.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(t,e):this.state.strictErrors.set(s,[t,e])}readWord1(t){this.state.containsEsc=!1;let e="";const s=this.state.pos;let r=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos=0;o--){const l=a[o];if(l.loc.index===n)return a[o]=t(r,s);if(l.loc.indexthis.hasPlugin(e)))throw this.raise(w.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:t})}errorBuilder(t){return(e,s,r)=>{this.raise(t,Zs(e,s,r))}}}class Ip{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class Np{constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Ip)}exit(){const t=this.stack.pop(),e=this.current();for(const[s,r]of Array.from(t.undefinedPrivateNames))e?e.undefinedPrivateNames.has(s)||e.undefinedPrivateNames.set(s,r):this.parser.raise(w.InvalidPrivateFieldResolution,r,{identifierName:s})}declarePrivateName(t,e,s){const{privateNames:r,loneAccessors:n,undefinedPrivateNames:a}=this.current();let o=r.has(t);if(e&3){const l=o&&n.get(t);if(l){const h=l&4,u=e&4,d=l&3,c=e&3;o=d===c||h!==u,o||n.delete(t)}else o||n.set(t,e)}o&&this.parser.raise(w.PrivateNameRedeclaration,s,{identifierName:t}),r.add(t),a.delete(t)}usePrivateName(t,e){let s;for(s of this.stack)if(s.privateNames.has(t))return;s?s.undefinedPrivateNames.set(t,e):this.parser.raise(w.InvalidPrivateFieldResolution,e,{identifierName:t})}}class vr{constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}}class ic extends vr{constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,e){const s=e.index;this.declarationErrors.set(s,[t,e])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}}class _p{constructor(t){this.parser=void 0,this.stack=[new vr],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,e){const s=e.loc.start,{stack:r}=this;let n=r.length-1,a=r[n];for(;!a.isCertainlyParameterDeclaration();){if(a.canBeArrowParameterDeclaration())a.recordDeclarationError(t,s);else return;a=r[--n]}this.parser.raise(t,s)}recordArrowParameterBindingError(t,e){const{stack:s}=this,r=s[s.length-1],n=e.loc.start;if(r.isCertainlyParameterDeclaration())this.parser.raise(t,n);else if(r.canBeArrowParameterDeclaration())r.recordDeclarationError(t,n);else return}recordAsyncArrowParametersError(t){const{stack:e}=this;let s=e.length-1,r=e[s];for(;r.canBeArrowParameterDeclaration();)r.type===2&&r.recordDeclarationError(w.AwaitBindingIdentifier,t),r=e[--s]}validateAsPattern(){const{stack:t}=this,e=t[t.length-1];!e.canBeArrowParameterDeclaration()||e.iterateErrors(([s,r])=>{this.parser.raise(s,r);let n=t.length-2,a=t[n];for(;a.canBeArrowParameterDeclaration();)a.clearDeclarationError(r.index),a=t[--n]})}}function Mp(){return new vr(3)}function Op(){return new ic(1)}function Dp(){return new ic(2)}function rc(){return new vr}class Fp{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}}function Zi(i,t){return(i?2:0)|(t?1:0)}class Bp extends Lp{addExtra(t,e,s,r=!0){if(!t)return;let{extra:n}=t;n==null&&(n={},t.extra=n),r?n[e]=s:Object.defineProperty(n,e,{enumerable:r,value:s})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,e){const s=t+e.length;if(this.input.slice(t,s)===e){const r=this.input.charCodeAt(s);return!(js(r)||(r&64512)===55296)}return!1}isLookaheadContextual(t){const e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return this.isContextual(t)?(this.next(),!0):!1}expectContextual(t,e){if(!this.eatContextual(t)){if(e!=null)throw this.raise(e,this.state.startLoc);this.unexpected(null,t)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return po(this.input,this.state.lastTokEndLoc.index,this.state.start)}hasFollowingLineBreak(){return po(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(w.MissingSemicolon,this.state.lastTokEndLoc)}expect(t,e){this.eat(t)||this.unexpected(e,t)}tryParse(t,e=this.state.clone()){const s={node:null};try{const r=t((n=null)=>{throw s.node=n,s});if(this.state.errors.length>e.errors.length){const n=this.state;return this.state=e,this.state.tokensLength=n.tokensLength,{node:r,error:n.errors[e.errors.length],thrown:!1,aborted:!1,failState:n}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(r){const n=this.state;if(this.state=e,r instanceof SyntaxError)return{node:null,error:r,thrown:!0,aborted:!1,failState:n};if(r===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:n};throw r}}checkExpressionErrors(t,e){if(!t)return!1;const{shorthandAssignLoc:s,doubleProtoLoc:r,privateKeyLoc:n,optionalParametersLoc:a}=t,o=!!s||!!r||!!a||!!n;if(!e)return o;s!=null&&this.raise(w.InvalidCoverInitializedName,s),r!=null&&this.raise(w.DuplicateProto,r),n!=null&&this.raise(w.UnexpectedPrivateField,n),a!=null&&this.unexpected(a)}isLiteralPropertyName(){return ql(this.state.type)}isPrivateName(t){return t.type==="PrivateName"}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return(t.type==="MemberExpression"||t.type==="OptionalMemberExpression")&&this.isPrivateName(t.property)}isObjectProperty(t){return t.type==="ObjectProperty"}isObjectMethod(t){return t.type==="ObjectMethod"}initializeScopes(t=this.options.sourceType==="module"){const e=this.state.labels;this.state.labels=[];const s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const r=this.inModule;this.inModule=t;const n=this.scope,a=this.getScopeHandler();this.scope=new a(this,t);const o=this.prodParam;this.prodParam=new Fp;const l=this.classScope;this.classScope=new Np(this);const h=this.expressionScope;return this.expressionScope=new _p(this),()=>{this.state.labels=e,this.exportedIdentifiers=s,this.inModule=r,this.scope=n,this.prodParam=o,this.classScope=l,this.expressionScope=h}}enterInitialScopes(){let t=0;this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t)}checkDestructuringPrivate(t){const{privateKeyLoc:e}=t;e!==null&&this.expectPlugin("destructuringPrivate",e)}}class Qi{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}}class ur{constructor(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new lr(s),t!=null&&t.options.ranges&&(this.range=[e,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}}const ua=ur.prototype;ua.__clone=function(){const i=new ur(void 0,this.start,this.loc.start),t=Object.keys(this);for(let e=0,s=t.length;e`Cannot overwrite reserved type ${i}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:i,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${i} = true,\` or \`${i} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:i,enumName:t})=>`Enum member names need to be unique, but the name \`${i}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:i})=>`Enum \`${i}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:i,enumName:t})=>`Enum type \`${i}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:i})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${i}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:i,memberName:t,explicitType:e})=>`Enum \`${i}\` has type \`${e}\`, so the initializer of \`${t}\` needs to be a ${e} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:i,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${i}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:i,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${i}\`.`,EnumInvalidMemberName:({enumName:i,memberName:t,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${e}\`, in enum \`${i}\`.`,EnumNumberMemberNotInitialized:({enumName:i,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${i}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:i})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${i}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:i})=>`Unexpected reserved type ${i}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:i,suggestion:t})=>`\`declare export ${i}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Vp(i){return i.type==="DeclareExportAllDeclaration"||i.type==="DeclareExportDeclaration"&&(!i.declaration||i.declaration.type!=="TypeAlias"&&i.declaration.type!=="InterfaceDeclaration")}function go(i){return i.importKind==="type"||i.importKind==="typeof"}const Hp={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function Gp(i,t){const e=[],s=[];for(let r=0;rclass extends i{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return bp}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(e,s){e!==133&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,s)}addComment(e){if(this.flowPragma===void 0){const s=Wp.exec(e.value);if(s)if(s[1]==="flow")this.flowPragma="flow";else if(s[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){const s=this.state.inType;this.state.inType=!0,this.expect(e||14);const r=this.flowParseType();return this.state.inType=s,r}flowParsePredicate(){const e=this.startNode(),s=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>s.index+1&&this.raise(ge.UnexpectedSpaceBetweenModuloChecks,s),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const e=this.state.inType;this.state.inType=!0,this.expect(14);let s=null,r=null;return this.match(54)?(this.state.inType=e,r=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=e,this.match(54)&&(r=this.flowParsePredicate())),[s,r]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();const s=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(10);const a=this.flowParseFunctionTypeParams();return r.params=a.params,r.rest=a.rest,r.this=a._this,this.expect(11),[r.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),s.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.resetEndLocation(s),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,s){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(s&&this.raise(ge.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,s);this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(133)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();const s=e.body=this.startNode(),r=s.body=[];for(this.expect(5);!this.match(8);){let o=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(ge.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(o)):(this.expectContextual(125,ge.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),r.push(o)}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");let n=null,a=!1;return r.forEach(o=>{Vp(o)?(n==="CommonJS"&&this.raise(ge.AmbiguousDeclareModuleKind,o),n="ES"):o.type==="DeclareModuleExports"&&(a&&this.raise(ge.DuplicateDeclareModuleExports,o),n==="ES"&&this.raise(ge.AmbiguousDeclareModuleKind,o),n="CommonJS",a=!0)}),e.kind=n||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,s){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!s){const r=this.state.value;throw this.raise(ge.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:r,suggestion:Hp[r]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();const s=this.flowParseTypeAlias(e);return s.type="DeclareTypeAlias",s}flowParseDeclareOpaqueType(e){this.next();const s=this.flowParseOpaqueType(e,!0);return s.type="DeclareOpaqueType",s}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,s){if(e.id=this.flowParseRestrictedIdentifier(!s,!0),this.scope.declareName(e.id.name,s?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!s&&this.eat(12));if(s){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:s,allowExact:!1,allowSpread:!1,allowProto:s,allowInexact:!1})}flowParseInterfaceExtends(){const e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(ge.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,s,r){!Up.has(e)||this.raise(r?ge.AssignReservedType:ge.UnexpectedReservedType,s,{reservedType:e})}flowParseRestrictedIdentifier(e,s){return this.checkReservedType(this.state.value,this.state.startLoc,s),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,s){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,s||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){const s=this.state.startLoc,r=this.startNode(),n=this.flowParseVariance(),a=this.flowParseTypeAnnotatableIdentifier();return r.name=a.name,r.variance=n,r.bound=a.typeAnnotation,this.match(29)?(this.eat(29),r.default=this.flowParseType()):e&&this.raise(ge.MissingTypeParamDefault,s),this.finishNode(r,"TypeParameter")}flowParseTypeParameterDeclaration(){const e=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let r=!1;do{const n=this.flowParseTypeParameter(r);s.params.push(n),n.default&&(r=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(s,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){const e=this.startNode(),s=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);const r=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=r,this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){const e=this.startNode(),s=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){const e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,s,r){return e.static=s,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,s){return e.static=s,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,s){const r=this.startNode();return e.static=s,e.value=this.flowParseObjectTypeMethodish(r),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:s,allowSpread:r,allowProto:n,allowInexact:a}){const o=this.state.inType;this.state.inType=!0;const l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];let h,u,d=!1;for(s&&this.match(6)?(this.expect(6),h=9,u=!0):(this.expect(5),h=8,u=!1),l.exact=u;!this.match(h);){let f=!1,p=null,m=null;const b=this.startNode();if(n&&this.isContextual(118)){const A=this.lookahead();A.type!==14&&A.type!==17&&(this.next(),p=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){const A=this.lookahead();A.type!==14&&A.type!==17&&(this.next(),f=!0)}const P=this.flowParseVariance();if(this.eat(0))p!=null&&this.unexpected(p),this.eat(0)?(P&&this.unexpected(P.loc.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(b,f))):l.indexers.push(this.flowParseObjectTypeIndexer(b,f,P));else if(this.match(10)||this.match(47))p!=null&&this.unexpected(p),P&&this.unexpected(P.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(b,f));else{let A="init";if(this.isContextual(99)||this.isContextual(104)){const O=this.lookahead();ql(O.type)&&(A=this.state.value,this.next())}const U=this.flowParseObjectTypeProperty(b,f,p,P,A,r,a!=null?a:!u);U===null?(d=!0,m=this.state.lastTokStartLoc):l.properties.push(U)}this.flowObjectTypeSemicolon(),m&&!this.match(8)&&!this.match(9)&&this.raise(ge.UnexpectedExplicitInexactInObject,m)}this.expect(h),r&&(l.inexact=d);const c=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=o,c}flowParseObjectTypeProperty(e,s,r,n,a,o,l){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?l||this.raise(ge.InexactInsideExact,this.state.lastTokStartLoc):this.raise(ge.InexactInsideNonObject,this.state.lastTokStartLoc),n&&this.raise(ge.InexactVariance,n),null):(o||this.raise(ge.UnexpectedSpreadType,this.state.lastTokStartLoc),r!=null&&this.unexpected(r),n&&this.raise(ge.SpreadVariance,n),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=s,e.proto=r!=null,e.kind=a;let h=!1;return this.match(47)||this.match(10)?(e.method=!0,r!=null&&this.unexpected(r),n&&this.unexpected(n.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(a==="get"||a==="set")&&this.flowCheckGetterSetterParams(e),!o&&e.key.name==="constructor"&&e.value.this&&this.raise(ge.ThisParamBannedInConstructor,e.value.this)):(a!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(h=!0),e.value=this.flowParseTypeInitialiser(),e.variance=n),e.optional=h,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){const s=e.kind==="get"?0:1,r=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?ge.GetterMayNotHaveThisParam:ge.SetterMayNotHaveThisParam,e.value.this),r!==s&&this.raise(e.kind==="get"?w.BadGetterArity:w.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(w.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,s){var r;(r=e)!=null||(e=this.state.startLoc);let n=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){const a=this.startNodeAt(e);a.qualification=n,a.id=this.flowParseRestrictedIdentifier(!0),n=this.finishNode(a,"QualifiedTypeIdentifier")}return n}flowParseGenericType(e,s){const r=this.startNodeAt(e);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,s),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){const e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){const e=this.startNode();for(e.types=[],this.expect(0);this.state.possuper.parseFunctionBody(e,!0,r));return}super.parseFunctionBody(e,!1,r)}parseFunctionBodyAndFinish(e,s,r=!1){if(this.match(14)){const n=this.startNode();[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=n.typeAnnotation?this.finishNode(n,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,s,r)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){const r=this.lookahead();if(Pt(r.type)){const n=this.startNode();return this.next(),this.flowParseInterface(n)}}else if(this.plugins.get("flow").enums&&this.isContextual(126)){const r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}const s=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(s)&&(this.flowPragma=null),s}parseExpressionStatement(e,s,r){if(s.type==="Identifier"){if(s.name==="declare"){if(this.match(80)||Me(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(Me(this.state.type)){if(s.name==="interface")return this.flowParseInterface(e);if(s.name==="type")return this.flowParseTypeAlias(e);if(s.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,s,r)}shouldParseExportDeclaration(){const{type:e}=this.state;return fo(e)||this.plugins.get("flow").enums&&e===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:e}=this.state;return fo(e)||this.plugins.get("flow").enums&&e===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.plugins.get("flow").enums&&this.isContextual(126)){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,s,r){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){const c=this.lookaheadCharCode();if(c===44||c===61||c===58||c===41)return this.setOptionalParametersError(r),e}this.expect(17);const n=this.state.clone(),a=this.state.noArrowAt,o=this.startNodeAt(s);let{consequent:l,failed:h}=this.tryParseConditionalConsequent(),[u,d]=this.getArrowLikeExpressions(l);if(h||d.length>0){const c=[...a];if(d.length>0){this.state=n,this.state.noArrowAt=c;for(let f=0;f1&&this.raise(ge.AmbiguousConditionalArrow,n.startLoc),h&&u.length===1&&(this.state=n,c.push(u[0].start),this.state.noArrowAt=c,{consequent:l,failed:h}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=a,this.expect(14),o.test=e,o.consequent=l,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const e=this.parseMaybeAssignAllowIn(),s=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:s}}getArrowLikeExpressions(e,s){const r=[e],n=[];for(;r.length!==0;){const a=r.pop();a.type==="ArrowFunctionExpression"&&a.body.type!=="BlockStatement"?(a.typeParameters||!a.returnType?this.finishArrowValidation(a):n.push(a),r.push(a.body)):a.type==="ConditionalExpression"&&(r.push(a.consequent),r.push(a.alternate))}return s?(n.forEach(a=>this.finishArrowValidation(a)),[n,[]]):Gp(n,a=>a.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(e){var s;this.toAssignableList(e.params,(s=e.extra)==null?void 0:s.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,s){let r;return this.state.noArrowParamsConversionAt.includes(e.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),r=s(),this.state.noArrowParamsConversionAt.pop()):r=s(),r}parseParenItem(e,s){const r=super.parseParenItem(e,s);if(this.eat(17)&&(r.optional=!0,this.resetEndLocation(e)),this.match(14)){const n=this.startNodeAt(s);return n.expression=r,n.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(n,"TypeCastExpression")}return r}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";const s=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(s)}else if(this.isContextual(131)){e.exportKind="type";const s=this.startNode();return this.next(),this.flowParseOpaqueType(s,!1)}else if(this.isContextual(129)){e.exportKind="type";const s=this.startNode();return this.next(),this.flowParseInterface(s)}else if(this.plugins.get("flow").enums&&this.isContextual(126)){e.exportKind="value";const s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){const{startLoc:s}=this.state,r=super.maybeParseExportNamespaceSpecifier(e);return r&&e.exportKind==="type"&&this.unexpected(s),r}parseClassId(e,s,r){super.parseClassId(e,s,r),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,s,r){const{startLoc:n}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,s))return;s.declare=!0}super.parseClassMember(e,s,r),s.declare&&(s.type!=="ClassProperty"&&s.type!=="ClassPrivateProperty"&&s.type!=="PropertyDefinition"?this.raise(ge.DeclareClassElement,n):s.value&&this.raise(ge.DeclareClassFieldInitializer,s.value))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){const e=super.readWord1(),s="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(w.InvalidIdentifier,this.state.curPosition(),{identifierName:s}),this.finishToken(132,s)}getTokenFromCode(e){const s=this.input.charCodeAt(this.state.pos+1);e===123&&s===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?s===46?this.finishOp(18,2):this.finishOp(17,1):mp(e,s,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,s){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,s):super.isAssignable(e,s)}toAssignable(e,s=!1){!s&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,s)}toAssignableList(e,s,r){for(let n=0;n1||!s)&&this.raise(ge.TypeCastInPattern,a.typeAnnotation)}return e}parseArrayLike(e,s,r,n){const a=super.parseArrayLike(e,s,r,n);return s&&!this.state.maybeInArrowParameters&&this.toReferencedList(a.elements),a}isValidLVal(e,s,r){return e==="TypeCastExpression"||super.isValidLVal(e,s,r)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,s,r,n,a,o){if(s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,s,r,n,a,o),s.params&&a){const l=s.params;l.length>0&&this.isThisParam(l[0])&&this.raise(ge.ThisParamBannedInConstructor,s)}else if(s.type==="MethodDefinition"&&a&&s.value.params){const l=s.value.params;l.length>0&&this.isThisParam(l[0])&&this.raise(ge.ThisParamBannedInConstructor,s)}}pushClassPrivateMethod(e,s,r,n){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,s,r,n)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();const s=e.implements=[];do{const r=this.startNode();r.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,s.push(this.finishNode(r,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);const s=this.getObjectOrClassMethodParams(e);if(s.length>0){const r=s[0];this.isThisParam(r)&&e.kind==="get"?this.raise(ge.GetterMayNotHaveThisParam,r):this.isThisParam(r)&&this.raise(ge.SetterMayNotHaveThisParam,r)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,s,r,n,a,o,l){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let h;this.match(47)&&!o&&(h=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());const u=super.parseObjPropValue(e,s,r,n,a,o,l);return h&&((u.value||u).typeParameters=h),u}parseFunctionParamType(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(ge.PatternIsOptional,e),this.isThisParam(e)&&this.raise(ge.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(ge.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(ge.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,s){const r=super.parseMaybeDefault(e,s);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.startsuper.parseMaybeAssign(e,s),n),!a.error)return a.node;const{context:h}=this.state,u=h[h.length-1];(u===Fe.j_oTag||u===Fe.j_expr)&&h.pop()}if((r=a)!=null&&r.error||this.match(47)){var o,l;n=n||this.state.clone();let h;const u=this.tryParse(c=>{var f;h=this.flowParseTypeParameterDeclaration();const p=this.forwardNoArrowParamsConversionAt(h,()=>{const b=super.parseMaybeAssign(e,s);return this.resetStartLocationFromNode(b,h),b});(f=p.extra)!=null&&f.parenthesized&&c();const m=this.maybeUnwrapTypeCastExpression(p);return m.type!=="ArrowFunctionExpression"&&c(),m.typeParameters=h,this.resetStartLocationFromNode(m,h),p},n);let d=null;if(u.node&&this.maybeUnwrapTypeCastExpression(u.node).type==="ArrowFunctionExpression"){if(!u.error&&!u.aborted)return u.node.async&&this.raise(ge.UnexpectedTypeParameterBeforeAsyncArrowFunction,h),u.node;d=u.node}if((o=a)!=null&&o.node)return this.state=a.failState,a.node;if(d)return this.state=u.failState,d;throw(l=a)!=null&&l.thrown?a.error:u.thrown?u.error:this.raise(ge.UnexpectedTokenAfterTypeParameter,h)}return super.parseMaybeAssign(e,s)}parseArrow(e){if(this.match(14)){const s=this.tryParse(()=>{const r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const n=this.startNode();return[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=r,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),n});if(s.thrown)return null;s.error&&(this.state=s.failState),e.returnType=s.node.typeAnnotation?this.finishNode(s.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,s){this.state.noArrowParamsConversionAt.includes(e.start)?e.params=s:super.setArrowFunctionParameters(e,s)}checkParams(e,s,r,n=!0){if(!(r&&this.state.noArrowParamsConversionAt.includes(e.start))){for(let a=0;a0&&this.raise(ge.ThisParamMustBeFirst,e.params[a]);super.checkParams(e,s,r,n)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&!this.state.noArrowAt.includes(this.state.start))}parseSubscripts(e,s,r){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.includes(s.index)){this.next();const n=this.startNodeAt(s);n.callee=e,n.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(n,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){const n=this.state.clone(),a=this.tryParse(l=>this.parseAsyncArrowWithTypeParameters(s)||l(),n);if(!a.error&&!a.aborted)return a.node;const o=this.tryParse(()=>super.parseSubscripts(e,s,r),n);if(o.node&&!o.error)return o.node;if(a.node)return this.state=a.failState,a.node;if(o.node)return this.state=o.failState,o.node;throw a.error||o.error}return super.parseSubscripts(e,s,r)}parseSubscript(e,s,r,n){if(this.match(18)&&this.isLookaheadToken_lt()){if(n.optionalChainMember=!0,r)return n.stop=!0,e;this.next();const a=this.startNodeAt(s);return a.callee=e,a.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),a.arguments=this.parseCallExpressionArguments(11,!1),a.optional=!0,this.finishCallExpression(a,!0)}else if(!r&&this.shouldParseTypes()&&this.match(47)){const a=this.startNodeAt(s);a.callee=e;const o=this.tryParse(()=>(a.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),a.arguments=super.parseCallExpressionArguments(11,!1),n.optionalChainMember&&(a.optional=!1),this.finishCallExpression(a,n.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(e,s,r,n)}parseNewCallee(e){super.parseNewCallee(e);let s=null;this.shouldParseTypes()&&this.match(47)&&(s=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=s}parseAsyncArrowWithTypeParameters(e){const s=this.startNodeAt(e);if(this.parseFunctionParams(s,!1),!!this.parseArrow(s))return super.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(e){const s=this.input.charCodeAt(this.state.pos+1);if(e===42&&s===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){const s=this.input.charCodeAt(this.state.pos+1);if(e===124&&s===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,s){const r=super.parseTopLevel(e,s);return this.state.hasFlowComment&&this.raise(ge.UnterminatedFlowComment,this.state.curPosition()),r}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(ge.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();const e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){const{pos:e}=this.state;let s=2;for(;[32,9].includes(this.input.charCodeAt(e+s));)s++;const r=this.input.charCodeAt(s+e),n=this.input.charCodeAt(s+e+1);return r===58&&n===58?s+2:this.input.slice(s+e,s+e+12)==="flow-include"?s+12:r===58&&n!==58?s:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(w.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:s,memberName:r}){this.raise(ge.EnumBooleanMemberNotInitialized,e,{memberName:r,enumName:s})}flowEnumErrorInvalidMemberInitializer(e,s){return this.raise(s.explicitType?s.explicitType==="symbol"?ge.EnumInvalidMemberInitializerSymbolType:ge.EnumInvalidMemberInitializerPrimaryType:ge.EnumInvalidMemberInitializerUnknownType,e,s)}flowEnumErrorNumberMemberNotInitialized(e,s){this.raise(ge.EnumNumberMemberNotInitialized,e,s)}flowEnumErrorStringMemberInconsistentlyInitialized(e,s){this.raise(ge.EnumStringMemberInconsistentlyInitialized,e,s)}flowEnumMemberInit(){const e=this.state.startLoc,s=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{const r=this.parseNumericLiteral(this.state.value);return s()?{type:"number",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 133:{const r=this.parseStringLiteral(this.state.value);return s()?{type:"string",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 85:case 86:{const r=this.parseBooleanLiteral(this.match(85));return s()?{type:"boolean",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){const e=this.state.startLoc,s=this.parseIdentifier(!0),r=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:s,init:r}}flowEnumCheckExplicitTypeMismatch(e,s,r){const{explicitType:n}=s;n!==null&&n!==r&&this.flowEnumErrorInvalidMemberInitializer(e,s)}flowEnumMembers({enumName:e,explicitType:s}){const r=new Set,n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let a=!1;for(;!this.match(8);){if(this.eat(21)){a=!0;break}const o=this.startNode(),{id:l,init:h}=this.flowEnumMemberRaw(),u=l.name;if(u==="")continue;/^[a-z]/.test(u)&&this.raise(ge.EnumInvalidMemberName,l,{memberName:u,suggestion:u[0].toUpperCase()+u.slice(1),enumName:e}),r.has(u)&&this.raise(ge.EnumDuplicateMemberName,l,{memberName:u,enumName:e}),r.add(u);const d={enumName:e,explicitType:s,memberName:u};switch(o.id=l,h.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(h.loc,d,"boolean"),o.init=h.value,n.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(h.loc,d,"number"),o.init=h.value,n.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(h.loc,d,"string"),o.init=h.value,n.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(h.loc,d);case"none":switch(s){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(h.loc,d);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(h.loc,d);break;default:n.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:n,hasUnknownMembers:a}}flowEnumStringMembers(e,s,{enumName:r}){if(e.length===0)return s;if(s.length===0)return e;if(s.length>e.length){for(const n of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:r});return s}else{for(const n of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:r});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!Me(this.state.type))throw this.raise(ge.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});const{value:s}=this.state;return this.next(),s!=="boolean"&&s!=="number"&&s!=="string"&&s!=="symbol"&&this.raise(ge.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:s}),s}flowEnumBody(e,s){const r=s.name,n=s.loc.start,a=this.flowEnumParseExplicitType({enumName:r});this.expect(5);const{members:o,hasUnknownMembers:l}=this.flowEnumMembers({enumName:r,explicitType:a});switch(e.hasUnknownMembers=l,a){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{const h=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;const u=o.booleanMembers.length,d=o.numberMembers.length,c=o.stringMembers.length,f=o.defaultedMembers.length;if(!u&&!d&&!c&&!f)return h();if(!u&&!d)return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!d&&!c&&u>=f){for(const p of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(p.loc.start,{enumName:r,memberName:p.id.name});return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!u&&!c&&d>=f){for(const p of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(p.loc.start,{enumName:r,memberName:p.id.name});return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(ge.EnumInconsistentMemberValues,n,{enumName:r}),h()}}}flowParseEnumDeclaration(e){const s=this.parseIdentifier();return e.id=s,e.body=this.flowEnumBody(this.startNode(),s),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){const e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){const s=this.input.charCodeAt(e+1);return s!==60&&s!==61}return!1}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}};const qp={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},ms=Gt`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:i})=>`Expected corresponding JSX closing tag for <${i}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:i,HTMLEntity:t})=>`Unexpected token \`${i}\`. Did you mean \`${t}\` or \`{'${i}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?"});function es(i){return i?i.type==="JSXOpeningFragment"||i.type==="JSXClosingFragment":!1}function _s(i){if(i.type==="JSXIdentifier")return i.name;if(i.type==="JSXNamespacedName")return i.namespace.name+":"+i.name.name;if(i.type==="JSXMemberExpression")return _s(i.object)+"."+_s(i.property);throw new Error("Node had unexpected type: "+i.type)}var zp=i=>class extends i{jsxReadToken(){let e="",s=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(ms.UnterminatedJsxContent,this.state.startLoc);const r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:if(this.state.pos===this.state.start){r===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(r);return}e+=this.input.slice(s,this.state.pos),this.finishToken(141,e);return;case 38:e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos;break;case 62:case 125:default:Us(r)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){const s=this.input.charCodeAt(this.state.pos);let r;return++this.state.pos,s===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,r=e?` +`:`\r +`):r=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,r}jsxReadString(e){let s="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(w.UnterminatedString,this.state.startLoc);const n=this.input.charCodeAt(this.state.pos);if(n===e)break;n===38?(s+=this.input.slice(r,this.state.pos),s+=this.jsxReadEntity(),r=this.state.pos):Us(n)?(s+=this.input.slice(r,this.state.pos),s+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}s+=this.input.slice(r,this.state.pos++),this.finishToken(133,s)}jsxReadEntity(){const e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);const r=this.readInt(s,void 0,!1,"bail");if(r!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(r)}else{let s=0,r=!1;for(;s++<10&&this.state.pos1){for(let r=0;r0){if(s&256){const n=!!(s&512),a=(r&4)>0;return n!==a}return!0}return s&128&&(r&8)>0?t.names.get(e)&2?!!(s&1):!1:s&2&&(r&1)>0?!0:super.isRedeclaredInScope(t,e,s)}checkLocalExport(t){const{name:e}=t;if(this.hasImport(e))return;const s=this.scopeStack.length;for(let r=s-1;r>=0;r--){const a=this.scopeStack[r].tsNames.get(e);if((a&1)>0||(a&16)>0)return}super.checkLocalExport(t)}}const nc=i=>i.type==="ParenthesizedExpression"?nc(i.expression):i;class Yp extends jp{toAssignable(t,e=!1){var s,r;let n;switch((t.type==="ParenthesizedExpression"||(s=t.extra)!=null&&s.parenthesized)&&(n=nc(t),e?n.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(w.InvalidParenthesizedAssignment,t):n.type!=="MemberExpression"&&!this.isOptionalMemberExpression(n)&&this.raise(w.InvalidParenthesizedAssignment,t):this.raise(w.InvalidParenthesizedAssignment,t)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern";for(let o=0,l=t.properties.length,h=l-1;or.type!=="ObjectMethod"&&(n===s||r.type!=="SpreadElement")&&this.isAssignable(r))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(s=>s===null||this.isAssignable(s));case"AssignmentExpression":return t.operator==="=";case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(const s of t)(s==null?void 0:s.type)==="ArrayExpression"&&this.toReferencedListDeep(s.elements)}parseSpread(t){const e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){const t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,1),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(t,e,s){const r=s&1,n=[];let a=!0;for(;!this.eat(t);)if(a?a=!1:this.expect(12),r&&this.match(12))n.push(null);else{if(this.eat(t))break;if(this.match(21)){let o=this.parseRestBinding();if((this.hasPlugin("flow")||s&2)&&(o=this.parseFunctionParamType(o)),n.push(o),!this.checkCommaAfterRest(e)){this.expect(t);break}}else{const o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(w.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());n.push(this.parseAssignableListItem(s,o))}}return n}parseBindingRestProperty(t){return this.next(),t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){const{type:t,startLoc:e}=this.state;if(t===21)return this.parseBindingRestProperty(this.startNode());const s=this.startNode();return t===138?(this.expectPlugin("destructuringPrivate",e),this.classScope.usePrivateName(this.state.value,e),s.key=this.parsePrivateName()):this.parsePropertyName(s),s.method=!1,this.parseObjPropValue(s,e,!1,!1,!0,!1)}parseAssignableListItem(t,e){const s=this.parseMaybeDefault();(this.hasPlugin("flow")||t&2)&&this.parseFunctionParamType(s);const r=this.parseMaybeDefault(s.loc.start,s);return e.length&&(s.decorators=e),r}parseFunctionParamType(t){return t}parseMaybeDefault(t,e){var s,r;if((s=t)!=null||(t=this.state.startLoc),e=(r=e)!=null?r:this.parseBindingAtom(),!this.eat(29))return e;const n=this.startNodeAt(t);return n.left=e,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}isValidLVal(t,e,s){switch(t){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties"}return!1}isOptionalMemberExpression(t){return t.type==="OptionalMemberExpression"}checkLVal(t,e,s=64,r=!1,n=!1,a=!1){var o;const l=t.type;if(this.isObjectMethod(t))return;const h=this.isOptionalMemberExpression(t);if(h||l==="MemberExpression"){h&&(this.expectPlugin("optionalChainingAssign",t.loc.start),e.type!=="AssignmentExpression"&&this.raise(w.InvalidLhsOptionalChaining,t,{ancestor:e})),s!==64&&this.raise(w.InvalidPropertyBindingPattern,t);return}if(l==="Identifier"){this.checkIdentifier(t,s,n);const{name:m}=t;r&&(r.has(m)?this.raise(w.ParamDupe,t):r.add(m));return}const u=this.isValidLVal(l,!(a||(o=t.extra)!=null&&o.parenthesized)&&e.type==="AssignmentExpression",s);if(u===!0)return;if(u===!1){const m=s===64?w.InvalidLhs:w.InvalidLhsBinding;this.raise(m,t,{ancestor:e});return}let d,c;typeof u=="string"?(d=u,c=l==="ParenthesizedExpression"):[d,c]=u;const f=l==="ArrayPattern"||l==="ObjectPattern"?{type:l}:e,p=t[d];if(Array.isArray(p))for(const m of p)m&&this.checkLVal(m,f,s,r,n,c);else p&&this.checkLVal(p,f,s,r,n,c)}checkIdentifier(t,e,s=!1){this.state.strict&&(s?Ql(t.name,this.inModule):Zl(t.name))&&(e===64?this.raise(w.StrictEvalArguments,t,{referenceName:t.name}):this.raise(w.StrictEvalArgumentsBinding,t,{bindingName:t.name})),e&8192&&t.name==="let"&&this.raise(w.LetInLexicalBinding,t),e&64||this.declareNameFromIdentifier(t,e)}declareNameFromIdentifier(t,e){this.scope.declareName(t.name,e,t.loc.start)}checkToRestConversion(t,e){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(w.InvalidRestAssignmentPattern,t)}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?w.RestTrailingComma:w.ElementAfterRest,this.state.startLoc),!0):!1}}function Zp(i){if(i==null)throw new Error(`Unexpected ${i} value.`);return i}function To(i){if(!i)throw new Error("Assert fail")}const he=Gt`typescript`({AbstractMethodHasImplementation:({methodName:i})=>`Method '${i}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:i})=>`Property '${i}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:i})=>`'declare' is not allowed in ${i}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:i})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:i})=>`Duplicate modifier: '${i}'.`,EmptyHeritageClauseType:({token:i})=>`'${i}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:i})=>`'${i[0]}' modifier cannot be used with '${i[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:i})=>`Index signatures cannot have an accessibility modifier ('${i}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:i})=>`'${i}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:i})=>`'${i}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:i})=>`'${i}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:i})=>`'${i[0]}' modifier must precede '${i[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:i})=>`Private elements cannot have an accessibility modifier ('${i}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:i})=>`Single type parameter ${i} should have a trailing comma. Example usage: <${i},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:i})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${i}.`});function Qp(i){switch(i){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function bo(i){return i==="private"||i==="public"||i==="protected"}function ed(i){return i==="in"||i==="out"}var td=i=>class extends i{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:he.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:he.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:he.InvalidModifierOnTypeParameter})}getScopeHandler(){return Xp}tsIsIdentifier(){return Me(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(e,s){if(!Me(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;const r=this.state.value;if(e.includes(r)){if(s&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:s,stopOnStartOfClassStaticBlock:r,errorTemplate:n=he.InvalidModifierOnTypeMember},a){const o=(h,u,d,c)=>{u===d&&a[c]&&this.raise(he.InvalidModifiersOrder,h,{orderedModifiers:[d,c]})},l=(h,u,d,c)=>{(a[d]&&u===c||a[c]&&u===d)&&this.raise(he.IncompatibleModifiers,h,{modifiers:[d,c]})};for(;;){const{startLoc:h}=this.state,u=this.tsParseModifier(e.concat(s!=null?s:[]),r);if(!u)break;bo(u)?a.accessibility?this.raise(he.DuplicateAccessibilityModifier,h,{modifier:u}):(o(h,u,u,"override"),o(h,u,u,"static"),o(h,u,u,"readonly"),a.accessibility=u):ed(u)?(a[u]&&this.raise(he.DuplicateModifier,h,{modifier:u}),a[u]=!0,o(h,u,"in","out")):(hasOwnProperty.call(a,u)?this.raise(he.DuplicateModifier,h,{modifier:u}):(o(h,u,"static","readonly"),o(h,u,"static","override"),o(h,u,"override","readonly"),o(h,u,"abstract","override"),l(h,u,"declare","override"),l(h,u,"static","abstract")),a[u]=!0),s!=null&&s.includes(u)&&this.raise(n,h,{modifier:u})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,s){const r=[];for(;!this.tsIsListTerminator(e);)r.push(s());return r}tsParseDelimitedList(e,s,r){return Zp(this.tsParseDelimitedListWorker(e,s,!0,r))}tsParseDelimitedListWorker(e,s,r,n){const a=[];let o=-1;for(;!this.tsIsListTerminator(e);){o=-1;const l=s();if(l==null)return;if(a.push(l),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;r&&this.expect(12);return}return n&&(n.value=o),a}tsParseBracketedList(e,s,r,n,a){n||(r?this.expect(0):this.expect(47));const o=this.tsParseDelimitedList(e,s,a);return r?this.expect(3):this.expect(48),o}tsParseImportType(){const e=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(he.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(e.options=null),this.eat(12)&&(this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes"),this.match(11)||(e.options=super.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let s=this.parseIdentifier(e);for(;this.eat(16);){const r=this.startNodeAtNode(s);r.left=s,r.right=this.parseIdentifier(e),s=this.finishNode(r,"TSQualifiedName")}return s}tsParseTypeReference(){const e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();const s=this.startNodeAtNode(e);return s.parameterName=e,s.typeAnnotation=this.tsParseTypeAnnotation(!1),s.asserts=!1,this.finishNode(s,"TSTypePredicate")}tsParseThisTypeNode(){const e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){const e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){const s=this.startNode();return e(s),s.name=this.tsParseTypeParameterName(),s.constraint=this.tsEatThenParseType(81),s.default=this.tsEatThenParseType(29),this.finishNode(s,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){const s=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();const r={value:-1};return s.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,r),s.params.length===0&&this.raise(he.EmptyTypeParameters,s),r.value!==-1&&this.addExtra(s,"trailingComma",r.value),this.finishNode(s,"TSTypeParameterDeclaration")}tsFillSignature(e,s){const r=e===19,n="parameters",a="typeAnnotation";s.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),s[n]=this.tsParseBindingListForSignature(),r?s[a]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(s[a]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){const e=super.parseBindingList(11,41,2);for(const s of e){const{type:r}=s;(r==="AssignmentPattern"||r==="TSParameterProperty")&&this.raise(he.UnsupportedSignatureParameterKind,s,{type:r})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,s){return this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon(),this.finishNode(s,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),Me(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);const s=this.parseIdentifier();s.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(s),this.expect(3),e.parameters=[s];const r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,s){this.eat(17)&&(e.optional=!0);const r=e;if(this.match(10)||this.match(47)){s&&this.raise(he.ReadonlyForMethodSignature,e);const n=r;n.kind&&this.match(47)&&this.raise(he.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon();const a="parameters",o="typeAnnotation";if(n.kind==="get")n[a].length>0&&(this.raise(w.BadGetterArity,this.state.curPosition()),this.isThisParam(n[a][0])&&this.raise(he.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(n.kind==="set"){if(n[a].length!==1)this.raise(w.BadSetterArity,this.state.curPosition());else{const l=n[a][0];this.isThisParam(l)&&this.raise(he.AccessorCannotDeclareThisParameter,this.state.curPosition()),l.type==="Identifier"&&l.optional&&this.raise(he.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),l.type==="RestElement"&&this.raise(he.SetAccessorCannotHaveRestParameter,this.state.curPosition())}n[o]&&this.raise(he.SetAccessorCannotHaveReturnType,n[o])}else n.kind="method";return this.finishNode(n,"TSMethodSignature")}else{const n=r;s&&(n.readonly=!0);const a=this.tsTryParseTypeAnnotation();return a&&(n.typeAnnotation=a),this.tsParseTypeMemberSemicolon(),this.finishNode(n,"TSPropertySignature")}}tsParseTypeMember(){const e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){const r=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(r,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);const s=this.tsTryParseIndexSignature(e);return s||(super.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){const e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){const e=this.startNode();this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0);{const s=this.startNode();s.name=this.tsParseTypeParameterName(),s.constraint=this.tsExpectThenParseType(58),e.typeParameter=this.finishNode(s,"TSTypeParameter")}return e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){const e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let s=!1;return e.elementTypes.forEach(r=>{const{type:n}=r;s&&n!=="TSRestType"&&n!=="TSOptionalType"&&!(n==="TSNamedTupleMember"&&r.optional)&&this.raise(he.OptionalTypeBeforeRequired,r),s||(s=n==="TSNamedTupleMember"&&r.optional||n==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){const{startLoc:e}=this.state,s=this.eat(21);let r,n,a,o;const h=Pt(this.state.type)?this.lookaheadCharCode():null;if(h===58)r=!0,a=!1,n=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(h===63){a=!0;const u=this.state.startLoc,d=this.state.value,c=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(r=!0,n=this.createIdentifier(this.startNodeAt(u),d),this.expect(17),this.expect(14),o=this.tsParseType()):(r=!1,o=c,this.expect(17))}else o=this.tsParseType(),a=this.eat(17),r=this.eat(14);if(r){let u;n?(u=this.startNodeAtNode(n),u.optional=a,u.label=n,u.elementType=o,this.eat(17)&&(u.optional=!0,this.raise(he.TupleOptionalAfterType,this.state.lastTokStartLoc))):(u=this.startNodeAtNode(o),u.optional=a,this.raise(he.InvalidTupleMemberLabel,o),u.label=o,u.elementType=this.tsParseType()),o=this.finishNode(u,"TSNamedTupleMember")}else if(a){const u=this.startNodeAtNode(o);u.typeAnnotation=o,o=this.finishNode(u,"TSOptionalType")}if(s){const u=this.startNodeAt(e);u.typeAnnotation=o,o=this.finishNode(u,"TSRestType")}return o}tsParseParenthesizedType(){const e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,s){const r=this.startNode();return e==="TSConstructorType"&&(r.abstract=!!s,s&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,r)),this.finishNode(r,e)}tsParseLiteralTypeNode(){const e=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){const e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){const e=this.startNode(),s=this.lookahead();return s.type!==134&&s.type!==135&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{const{type:e}=this.state;if(Me(e)||e===88||e===84){const s=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":Qp(this.state.value);if(s!==void 0&&this.lookaheadCharCode()!==46){const r=this.startNode();return this.next(),this.finishNode(r,s)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){const s=this.startNodeAtNode(e);s.elementType=e,this.expect(3),e=this.finishNode(s,"TSArrayType")}else{const s=this.startNodeAtNode(e);s.objectType=e,s.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(s,"TSIndexedAccessType")}return e}tsParseTypeOperator(){const e=this.startNode(),s=this.state.value;return this.next(),e.operator=s,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),s==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(he.UnexpectedReadonly,e)}}tsParseInferType(){const e=this.startNode();this.expectContextual(115);const s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(s,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){const e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return np(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,s,r){const n=this.startNode(),a=this.eat(r),o=[];do o.push(s());while(this.eat(r));return o.length===1&&!a?o[0]:(n.types=o,this.finishNode(n,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(Me(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){const{errors:e}=this.state,s=e.length;try{return this.parseObjectLike(8,!0),e.length===s}catch{return!1}}if(this.match(0)){this.next();const{errors:e}=this.state,s=e.length;try{return super.parseBindingList(3,93,1),e.length===s}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{const s=this.startNode();this.expect(e);const r=this.startNode(),n=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(78)){let l=this.tsParseThisTypeOrThisTypePredicate();return l.type==="TSThisType"?(r.parameterName=l,r.asserts=!0,r.typeAnnotation=null,l=this.finishNode(r,"TSTypePredicate")):(this.resetStartLocationFromNode(l,r),l.asserts=!0),s.typeAnnotation=l,this.finishNode(s,"TSTypeAnnotation")}const a=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!a)return n?(r.parameterName=this.parseIdentifier(),r.asserts=n,r.typeAnnotation=null,s.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,s);const o=this.tsParseTypeAnnotation(!1);return r.parameterName=a,r.typeAnnotation=o,r.asserts=n,s.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){const e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;const e=this.state.containsEsc;return this.next(),!Me(this.state.type)&&!this.match(78)?!1:(e&&this.raise(w.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,s=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),s.typeAnnotation=this.tsParseType()}),this.finishNode(s,"TSTypeAnnotation")}tsParseType(){To(this.state.inType);const e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;const s=this.startNodeAtNode(e);return s.checkType=e,s.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),s.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),s.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(s,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(he.ReservedTypeAssertion,this.state.startLoc);const e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){const s=this.state.startLoc,r=this.tsParseDelimitedList("HeritageClauseElement",()=>{const n=this.startNode();return n.expression=this.tsParseEntityName(),this.match(47)&&(n.typeParameters=this.tsParseTypeArguments()),this.finishNode(n,"TSExpressionWithTypeArguments")});return r.length||this.raise(he.EmptyHeritageClauseType,s,{token:e}),r}tsParseInterfaceDeclaration(e,s={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),s.declare&&(e.declare=!0),Me(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(he.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));const r=this.startNode();return r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(r,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){const s=this.startNode();return this.next(),this.finishNode(s,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){const s=this.state.context;this.state.context=[s[0]];try{return e()}finally{this.state.context=s}}tsInType(e){const s=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=s}}tsInDisallowConditionalTypesContext(e){const s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsInAllowConditionalTypesContext(e){const s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){const e=this.startNode();return e.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,s={}){return s.const&&(e.const=!0),s.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){const e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,s=!1){if(e.id=this.parseIdentifier(),s||this.checkIdentifier(e.id,1024),this.eat(16)){const r=this.startNode();this.tsParseModuleOrNamespaceDeclaration(r,!0),e.body=r}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.global=!0,e.id=this.parseIdentifier()):this.match(133)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,s,r){e.isExport=r||!1,e.id=s||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);const n=this.tsParseModuleReference();return e.importKind==="type"&&n.type!=="TSExternalModuleReference"&&this.raise(he.ImportAliasHasImportType,n),e.moduleReference=n,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){const e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){const s=this.state.clone(),r=e();return this.state=s,r}tsTryParseAndCatch(e){const s=this.tryParse(r=>e()||r());if(!(s.aborted||!s.node))return s.error&&(this.state=s.failState),s.node}tsTryParse(e){const s=this.state.clone(),r=e();if(r!==void 0&&r!==!1)return r;this.state=s}tsTryParseDeclare(e){if(this.isLineTerminator())return;let s=this.state.type,r;return this.isContextual(100)&&(s=74,r="let"),this.tsInAmbientContext(()=>{switch(s){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,r||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 129:{const n=this.tsParseInterfaceDeclaration(e,{declare:!0});if(n)return n}default:if(Me(s))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,s,r){switch(s.name){case"declare":{const n=this.tsTryParseDeclare(e);return n&&(n.declare=!0),n}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);const n=e;return n.global=!0,n.id=s,n.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(n,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,s.name,!1,r)}}tsParseDeclaration(e,s,r,n){switch(s){case"abstract":if(this.tsCheckLineTerminator(r)&&(this.match(80)||Me(this.state.type)))return this.tsParseAbstractDeclaration(e,n);break;case"module":if(this.tsCheckLineTerminator(r)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(e);if(Me(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(r)&&Me(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(r)&&Me(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;const s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const r=this.tsTryParseAndCatch(()=>{const n=this.startNodeAt(e);return n.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(n),n.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),n});if(this.state.maybeInArrowParameters=s,!!r)return super.parseArrowExpression(r,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){const e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(he.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===Fe.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return ap(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,s){const r=this.state.startLoc,n={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},n);const a=n.accessibility,o=n.override,l=n.readonly;!(e&4)&&(a||l||o)&&this.raise(he.UnexpectedParameterModifier,r);const h=this.parseMaybeDefault();e&2&&this.parseFunctionParamType(h);const u=this.parseMaybeDefault(h.loc.start,h);if(a||l||o){const d=this.startNodeAt(r);return s.length&&(d.decorators=s),a&&(d.accessibility=a),l&&(d.readonly=l),o&&(d.override=o),u.type!=="Identifier"&&u.type!=="AssignmentPattern"&&this.raise(he.UnsupportedParameterPropertyKind,d),d.parameter=u,this.finishNode(d,"TSParameterProperty")}return s.length&&(h.decorators=s),u}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(const s of e.params)s.type!=="Identifier"&&s.optional&&!this.state.isAmbientContext&&this.raise(he.PatternIsOptional,s)}setArrowFunctionParameters(e,s,r){super.setArrowFunctionParameters(e,s,r),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,s,r=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));const n=s==="FunctionDeclaration"?"TSDeclareFunction":s==="ClassMethod"||s==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return n&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,n):n==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(he.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,n,r):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,s,r))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(s=>{(s==null?void 0:s.type)==="TSTypeCastExpression"&&this.raise(he.UnexpectedTypeAnnotation,s.typeAnnotation)})}toReferencedList(e,s){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,s,r,n){const a=super.parseArrayLike(e,s,r,n);return a.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(a.elements),a}parseSubscript(e,s,r,n){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();const o=this.startNodeAt(s);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let a=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(r)return n.stop=!0,e;n.optionalChainMember=a=!0,this.next()}if(this.match(47)||this.match(51)){let o;const l=this.tsTryParseAndCatch(()=>{if(!r&&this.atPossibleAsyncArrow(e)){const c=this.tsTryParseGenericAsyncArrowFunction(s);if(c)return c}const h=this.tsParseTypeArgumentsInExpression();if(!h)return;if(a&&!this.match(10)){o=this.state.curPosition();return}if(cr(this.state.type)){const c=super.parseTaggedTemplateExpression(e,s,n);return c.typeParameters=h,c}if(!r&&this.eat(10)){const c=this.startNodeAt(s);return c.callee=e,c.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(c.arguments),c.typeParameters=h,n.optionalChainMember&&(c.optional=a),this.finishCallExpression(c,n.optionalChainMember)}const u=this.state.type;if(u===48||u===52||u!==10&&Sn(u)&&!this.hasPrecedingLineBreak())return;const d=this.startNodeAt(s);return d.expression=e,d.typeParameters=h,this.finishNode(d,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),l)return l.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(he.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),l}return super.parseSubscript(e,s,r,n)}parseNewCallee(e){var s;super.parseNewCallee(e);const{callee:r}=e;r.type==="TSInstantiationExpression"&&!((s=r.extra)!=null&&s.parenthesized)&&(e.typeParameters=r.typeParameters,e.callee=r.expression)}parseExprOp(e,s,r){let n;if(Yi(58)>r&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(n=this.isContextual(120)))){const a=this.startNodeAt(s);return a.expression=e,a.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(n&&this.raise(w.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(a,n?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(a,s,r)}return super.parseExprOp(e,s,r)}checkReservedWord(e,s,r,n){this.state.isAmbientContext||super.checkReservedWord(e,s,r,n)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(he.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){const s=this.lookaheadCharCode();return e?s===123||s===42:s!==61}return!e&&this.isContextual(87)}applyImportPhase(e,s,r,n){super.applyImportPhase(e,s,r,n),s?e.exportKind=r==="type"?"type":"value":e.importKind=r==="type"||r==="typeof"?r:"value"}parseImport(e){if(this.match(133))return e.importKind="value",super.parseImport(e);let s;if(Me(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){const r=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,r);s=super.parseImportSpecifiersAndAfter(e,r)}else s=super.parseImport(e);return s.importKind==="type"&&s.specifiers.length>1&&s.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(he.TypeImportCannotSpecifyDefaultAndNamed,s),s}parseExport(e,s){if(this.match(83)){this.next();const r=e;let n=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?n=this.parseMaybeImportPhase(r,!1):r.importKind="value",this.tsParseImportEqualsDeclaration(r,n,!0)}else if(this.eat(29)){const r=e;return r.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(r,"TSExportAssignment")}else if(this.eatContextual(93)){const r=e;return this.expectContextual(128),r.id=this.parseIdentifier(),this.semicolon(),this.finishNode(r,"TSNamespaceExportDeclaration")}else return super.parseExport(e,s)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){const e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,s,r=!1){const{isAmbientContext:n}=this.state,a=super.parseVarStatement(e,s,r||n);if(!n)return a;for(const{id:o,init:l}of a.declarations)!l||(s!=="const"||!!o.typeAnnotation?this.raise(he.InitializerNotAllowedInAmbientContext,l):id(l,this.hasPlugin("estree"))||this.raise(he.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,l));return a}parseStatementContent(e,s){if(this.match(75)&&this.isLookaheadContextual("enum")){const r=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(r,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){const r=this.tsParseInterfaceDeclaration(this.startNode());if(r)return r}return super.parseStatementContent(e,s)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,s){return s.some(r=>bo(r)?e.accessibility===r:!!e[r])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,s,r){const n=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:n,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:he.InvalidModifierOnTypeParameterPositions},s);const a=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(s,n)&&this.raise(he.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,s)):this.parseClassMemberWithIsStatic(e,s,r,!!s.static)};s.declare?this.tsInAmbientContext(a):a()}parseClassMemberWithIsStatic(e,s,r,n){const a=this.tsTryParseIndexSignature(s);if(a){e.body.push(a),s.abstract&&this.raise(he.IndexSignatureHasAbstract,s),s.accessibility&&this.raise(he.IndexSignatureHasAccessibility,s,{modifier:s.accessibility}),s.declare&&this.raise(he.IndexSignatureHasDeclare,s),s.override&&this.raise(he.IndexSignatureHasOverride,s);return}!this.state.inAbstractClass&&s.abstract&&this.raise(he.NonAbstractClassHasAbstractMethod,s),s.override&&(r.hadSuperClass||this.raise(he.OverrideNotInSubClass,s)),super.parseClassMemberWithIsStatic(e,s,r,n)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(he.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(he.ClassMethodHasDeclare,e)}parseExpressionStatement(e,s,r){return(s.type==="Identifier"?this.tsParseExpressionStatement(e,s,r):void 0)||super.parseExpressionStatement(e,s,r)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,s,r){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,s,r);const n=this.tryParse(()=>super.parseConditional(e,s));return n.node?(n.error&&(this.state=n.failState),n.node):(n.error&&super.setOptionalParametersError(r,n.error),e)}parseParenItem(e,s){const r=super.parseParenItem(e,s);if(this.eat(17)&&(r.optional=!0,this.resetEndLocation(e)),this.match(14)){const n=this.startNodeAt(s);return n.expression=e,n.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(n,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));const s=this.state.startLoc,r=this.eatContextual(125);if(r&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(he.ExpectedAmbientAfterExportDeclare,this.state.startLoc);const a=Me(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return a?((a.type==="TSInterfaceDeclaration"||a.type==="TSTypeAliasDeclaration"||r)&&(e.exportKind="type"),r&&(this.resetStartLocation(a,s),a.declare=!0),a):null}parseClassId(e,s,r,n){if((!s||r)&&this.isContextual(113))return;super.parseClassId(e,s,r,e.declare?1024:8331);const a=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);a&&(e.typeParameters=a)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));const s=this.tsTryParseTypeAnnotation();s&&(e.typeAnnotation=s)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(he.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){const{key:s}=e;this.raise(he.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:s.type==="Identifier"&&!e.computed?s.name:`[${this.input.slice(s.start,s.end)}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(he.PrivateElementHasAbstract,e),e.accessibility&&this.raise(he.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(he.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,s,r,n,a,o){const l=this.tsTryParseTypeParameters(this.tsParseConstModifier);l&&a&&this.raise(he.ConstructorHasTypeParameters,l);const{declare:h=!1,kind:u}=s;h&&(u==="get"||u==="set")&&this.raise(he.DeclareAccessor,s,{kind:u}),l&&(s.typeParameters=l),super.pushClassMethod(e,s,r,n,a,o)}pushClassPrivateMethod(e,s,r,n){const a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(s.typeParameters=a),super.pushClassPrivateMethod(e,s,r,n)}declareClassPrivateMethodInScope(e,s){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!hasOwnProperty.call(e.value,"body")||super.declareClassPrivateMethodInScope(e,s))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,s,r,n,a,o,l){const h=this.tsTryParseTypeParameters(this.tsParseConstModifier);return h&&(e.typeParameters=h),super.parseObjPropValue(e,s,r,n,a,o,l)}parseFunctionParams(e,s){const r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(e.typeParameters=r),super.parseFunctionParams(e,s)}parseVarId(e,s){super.parseVarId(e,s),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);const r=this.tsTryParseTypeAnnotation();r&&(e.id.typeAnnotation=r,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,s){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,s)}parseMaybeAssign(e,s){var r,n,a,o,l;let h,u,d;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(h=this.state.clone(),u=this.tryParse(()=>super.parseMaybeAssign(e,s),h),!u.error)return u.node;const{context:p}=this.state,m=p[p.length-1];(m===Fe.j_oTag||m===Fe.j_expr)&&p.pop()}if(!((r=u)!=null&&r.error)&&!this.match(47))return super.parseMaybeAssign(e,s);(!h||h===this.state)&&(h=this.state.clone());let c;const f=this.tryParse(p=>{var m,b;c=this.tsParseTypeParameters(this.tsParseConstModifier);const P=super.parseMaybeAssign(e,s);return(P.type!=="ArrowFunctionExpression"||(m=P.extra)!=null&&m.parenthesized)&&p(),((b=c)==null?void 0:b.params.length)!==0&&this.resetStartLocationFromNode(P,c),P.typeParameters=c,P},h);if(!f.error&&!f.aborted)return c&&this.reportReservedArrowTypeParam(c),f.node;if(!u&&(To(!this.hasPlugin("jsx")),d=this.tryParse(()=>super.parseMaybeAssign(e,s),h),!d.error))return d.node;if((n=u)!=null&&n.node)return this.state=u.failState,u.node;if(f.node)return this.state=f.failState,c&&this.reportReservedArrowTypeParam(c),f.node;if((a=d)!=null&&a.node)return this.state=d.failState,d.node;throw((o=u)==null?void 0:o.error)||f.error||((l=d)==null?void 0:l.error)}reportReservedArrowTypeParam(e){var s;e.params.length===1&&!e.params[0].constraint&&!((s=e.extra)!=null&&s.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(he.ReservedArrowTypeParam,e)}parseMaybeUnary(e,s){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,s)}parseArrow(e){if(this.match(14)){const s=this.tryParse(r=>{const n=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&r(),n});if(s.aborted)return;s.thrown||(s.error&&(this.state=s.failState),e.returnType=s.node)}return super.parseArrow(e)}parseFunctionParamType(e){this.eat(17)&&(e.optional=!0);const s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),this.resetEndLocation(e),e}isAssignable(e,s){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,s);case"TSParameterProperty":return!0;default:return super.isAssignable(e,s)}}toAssignable(e,s=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,s);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":s?this.expressionScope.recordArrowParameterBindingError(he.UnexpectedTypeCastInParameter,e):this.raise(he.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,s);break;case"AssignmentExpression":!s&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,s)}}toAssignableParenthesizedExpression(e,s){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,s);break;default:super.toAssignable(e,s)}}checkToRestConversion(e,s){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,s)}}isValidLVal(e,s,r){switch(e){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":case"TSInstantiationExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(r!==64||!s)&&["expression",!0];default:return super.isValidLVal(e,s,r)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){const s=this.tsParseTypeArgumentsInExpression();if(this.match(10)){const r=super.parseMaybeDecoratorArguments(e);return r.typeParameters=s,r}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,s){const r=super.parseMaybeDefault(e,s);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.startthis.isAssignable(s,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){const s=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());s&&(e.typeParameters=s)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){const s=super.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e)[0];return n&&this.isThisParam(n)?s+1:s}parseCatchClauseParam(){const e=super.parseCatchClauseParam(),s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s,this.resetEndLocation(e)),e}tsInAmbientContext(e){const{isAmbientContext:s,strict:r}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return e()}finally{this.state.isAmbientContext=s,this.state.strict=r}}parseClass(e,s,r){const n=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,s,r)}finally{this.state.inAbstractClass=n}}tsParseAbstractDeclaration(e,s){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(s,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(he.NonClassMethodPropertyHasAbstractModifer,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,s,r,n,a,o,l){const h=super.parseMethod(e,s,r,n,a,o,l);if(h.abstract&&(this.hasPlugin("estree")?!!h.value.body:!!h.body)){const{key:d}=h;this.raise(he.AbstractMethodHasImplementation,h,{methodName:d.type==="Identifier"&&!h.computed?d.name:`[${this.input.slice(d.start,d.end)}]`})}return h}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,s,r,n){return!s&&n?(this.parseTypeOnlyImportExportSpecifier(e,!1,r),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,s,r,n))}parseImportSpecifier(e,s,r,n,a){return!s&&n?(this.parseTypeOnlyImportExportSpecifier(e,!0,r),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,s,r,n,r?4098:4096))}parseTypeOnlyImportExportSpecifier(e,s,r){const n=s?"imported":"local",a=s?"local":"exported";let o=e[n],l,h=!1,u=!0;const d=o.loc.start;if(this.isContextual(93)){const f=this.parseIdentifier();if(this.isContextual(93)){const p=this.parseIdentifier();Pt(this.state.type)?(h=!0,o=f,l=s?this.parseIdentifier():this.parseModuleExportName(),u=!1):(l=p,u=!1)}else Pt(this.state.type)?(u=!1,l=s?this.parseIdentifier():this.parseModuleExportName()):(h=!0,o=f)}else Pt(this.state.type)&&(h=!0,s?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());h&&r&&this.raise(s?he.TypeModifierIsUsedInTypeImports:he.TypeModifierIsUsedInTypeExports,d),e[n]=o,e[a]=l;const c=s?"importKind":"exportKind";e[c]=h?"type":"value",u&&this.eatContextual(93)&&(e[a]=s?this.parseIdentifier():this.parseModuleExportName()),e[a]||(e[a]=zt(e[n])),s&&this.checkIdentifier(e[a],h?4098:4096)}};function sd(i){if(i.type!=="MemberExpression")return!1;const{computed:t,property:e}=i;return t&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:oc(i.object)}function id(i,t){var e;const{type:s}=i;if((e=i.extra)!=null&&e.parenthesized)return!1;if(t){if(s==="Literal"){const{value:r}=i;if(typeof r=="string"||typeof r=="boolean")return!0}}else if(s==="StringLiteral"||s==="BooleanLiteral")return!0;return!!(ac(i,t)||rd(i,t)||s==="TemplateLiteral"&&i.expressions.length===0||sd(i))}function ac(i,t){return t?i.type==="Literal"&&(typeof i.value=="number"||"bigint"in i):i.type==="NumericLiteral"||i.type==="BigIntLiteral"}function rd(i,t){if(i.type==="UnaryExpression"){const{operator:e,argument:s}=i;if(e==="-"&&ac(s,t))return!0}return!1}function oc(i){return i.type==="Identifier"?!0:i.type!=="MemberExpression"||i.computed?!1:oc(i.object)}const xo=Gt`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."});var nd=i=>class extends i{parsePlaceholder(e){if(this.match(144)){const s=this.startNode();return this.next(),this.assertNoSpace(),s.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(s,e)}}finishPlaceholder(e,s){let r=e;return(!r.expectedNode||!r.type)&&(r=this.finishNode(r,"Placeholder")),r.expectedNode=s,r}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,s,r,n){e!==void 0&&super.checkReservedWord(e,s,r,n)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,s,r){return e==="Placeholder"||super.isValidLVal(e,s,r)}toAssignable(e,s){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,s)}chStartsBindingIdentifier(e,s){return!!(super.chStartsBindingIdentifier(e,s)||this.lookahead().type===144)}verifyBreakContinue(e,s){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,s)}parseExpressionStatement(e,s){var r;if(s.type!=="Placeholder"||(r=s.extra)!=null&&r.parenthesized)return super.parseExpressionStatement(e,s);if(this.match(14)){const a=e;return a.label=this.finishPlaceholder(s,"Identifier"),this.next(),a.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(a,"LabeledStatement")}this.semicolon();const n=e;return n.name=s.name,this.finishPlaceholder(n,"Statement")}parseBlock(e,s,r){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,s,r)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,s,r){const n=s?"ClassDeclaration":"ClassExpression";this.next();const a=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(144)||this.match(5))e.id=o;else{if(r||!s)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,n);throw this.raise(xo.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(e,s,r);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,a),this.finishNode(e,n)}parseExport(e,s){const r=this.parsePlaceholder("Identifier");if(!r)return super.parseExport(e,s);const n=e;if(!this.isContextual(98)&&!this.match(12))return n.specifiers=[],n.source=null,n.declaration=this.finishPlaceholder(r,"Declaration"),this.finishNode(n,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const a=this.startNode();return a.exported=r,n.specifiers=[this.finishNode(a,"ExportDefaultSpecifier")],super.parseExport(n,s)}isExportDefaultSpecifier(){if(this.match(65)){const e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(os(144),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,s){var r;return(r=e.specifiers)!=null&&r.length?!0:super.maybeParseExportDefaultSpecifier(e,s)}checkExport(e){const{specifiers:s}=e;s!=null&&s.length&&(e.specifiers=s.filter(r=>r.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=s}parseImport(e){const s=this.parsePlaceholder("Identifier");if(!s)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(s,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");const r=this.startNodeAtNode(s);return r.local=s,e.specifiers.push(this.finishNode(r,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(xo.UnexpectedSpace,this.state.lastTokEndLoc)}},ad=i=>class extends i{parseV8Intrinsic(){if(this.match(54)){const e=this.state.startLoc,s=this.startNode();if(this.next(),Me(this.state.type)){const r=this.parseIdentifierName(),n=this.createIdentifier(s,r);if(n.type="V8IntrinsicIdentifier",this.match(10))return n}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}};const So=["minimal","fsharp","hack","smart"],Po=["^^","@@","^","%","#"];function od(i){if(i.has("decorators")){if(i.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const e=i.get("decorators").decoratorsBeforeExport;if(e!=null&&typeof e!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");const s=i.get("decorators").allowCallParenthesized;if(s!=null&&typeof s!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(i.has("flow")&&i.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(i.has("placeholders")&&i.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(i.has("pipelineOperator")){var t;const e=i.get("pipelineOperator").proposal;if(!So.includes(e)){const r=So.map(n=>`"${n}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${r}.`)}const s=((t=i.get("recordAndTuple"))==null?void 0:t.syntaxType)==="hash";if(e==="hack"){if(i.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(i.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const r=i.get("pipelineOperator").topicToken;if(!Po.includes(r)){const n=Po.map(a=>`"${a}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${n}.`)}if(r==="#"&&s)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",i.get("recordAndTuple")])}\`.`)}else if(e==="smart"&&s)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",i.get("recordAndTuple")])}\`.`)}if(i.has("moduleAttributes")){if(i.has("importAttributes")||i.has("importAssertions"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(i.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(i.has("importAssertions")&&i.has("importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(i.has("recordAndTuple")){const e=i.get("recordAndTuple").syntaxType;if(e!=null){const s=["hash","bar"];if(!s.includes(e))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+s.map(r=>`'${r}'`).join(", "))}}if(i.has("asyncDoExpressions")&&!i.has("doExpressions")){const e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(i.has("optionalChainingAssign")&&i.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}const lc={estree:Jf,jsx:zp,flow:Kp,typescript:td,v8intrinsic:ad,placeholders:nd},ld=Object.keys(lc),en={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function cd(i){if(i==null)return Object.assign({},en);if(i.annexB!=null&&i.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");const t={};for(const s of Object.keys(en)){var e;t[s]=(e=i[s])!=null?e:en[s]}return t}class ud extends Yp{checkProto(t,e,s,r){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return;const n=t.key;if((n.type==="Identifier"?n.name:n.value)==="__proto__"){if(e){this.raise(w.RecordNoProto,n);return}s.used&&(r?r.doubleProtoLoc===null&&(r.doubleProtoLoc=n.loc.start):this.raise(w.DuplicateProto,n)),s.used=!0}}shouldExitDescending(t,e){return t.type==="ArrowFunctionExpression"&&t.start===e}getExpression(){this.enterInitialScopes(),this.nextToken();const t=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),t.comments=this.comments,t.errors=this.state.errors,this.options.tokens&&(t.tokens=this.tokens),t}parseExpression(t,e){return t?this.disallowInAnd(()=>this.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(t){const e=this.state.startLoc,s=this.parseMaybeAssign(t);if(this.match(12)){const r=this.startNodeAt(e);for(r.expressions=[s];this.eat(12);)r.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(r.expressions),this.finishNode(r,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(t,e){return this.disallowInAnd(()=>this.parseMaybeAssign(t,e))}parseMaybeAssignAllowIn(t,e){return this.allowInAnd(()=>this.parseMaybeAssign(t,e))}setOptionalParametersError(t,e){var s;t.optionalParametersLoc=(s=e==null?void 0:e.loc)!=null?s:this.state.startLoc}parseMaybeAssign(t,e){const s=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let o=this.parseYield();return e&&(o=e.call(this,o,s)),o}let r;t?r=!1:(t=new Qi,r=!0);const{type:n}=this.state;(n===10||Me(n))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(t);if(e&&(a=e.call(this,a,s)),ep(this.state.type)){const o=this.startNodeAt(s),l=this.state.value;if(o.operator=l,this.match(29)){this.toAssignable(a,!0),o.left=a;const h=s.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=h&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=h&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=h&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null)}else o.left=a;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(a,this.finishNode(o,"AssignmentExpression")),o}else r&&this.checkExpressionErrors(t,!0);return a}parseMaybeConditional(t){const e=this.state.startLoc,s=this.state.potentialArrowAt,r=this.parseExprOps(t);return this.shouldExitDescending(r,s)?r:this.parseConditional(r,e,t)}parseConditional(t,e,s){if(this.eat(17)){const r=this.startNodeAt(e);return r.test=t,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){const e=this.state.startLoc,s=this.state.potentialArrowAt,r=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(r,s)?r:this.parseExprOp(r,e,-1)}parseExprOp(t,e,s){if(this.isPrivateName(t)){const n=this.getPrivateNameSV(t);(s>=Yi(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(w.PrivateInExpectedIn,t,{identifierName:n}),this.classScope.usePrivateName(n,t.loc.start)}const r=this.state.type;if(sp(r)&&(this.prodParam.hasIn||!this.match(58))){let n=Yi(r);if(n>s){if(r===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,e)}const a=this.startNodeAt(e);a.left=t,a.operator=this.state.value;const o=r===41||r===42,l=r===40;if(l&&(n=Yi(42)),this.next(),r===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(w.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);a.right=this.parseExprOpRightExpr(r,n);const h=this.finishNode(a,o||l?"LogicalExpression":"BinaryExpression"),u=this.state.type;if(l&&(u===41||u===42)||o&&u===40)throw this.raise(w.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(h,e,s)}}return t}parseExprOpRightExpr(t,e){const s=this.state.startLoc;switch(t){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(w.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,e),s)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}default:return this.parseExprOpBaseRightExpr(t,e)}}parseExprOpBaseRightExpr(t,e){const s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,op(t)?e-1:e)}parseHackPipeBody(){var t;const{startLoc:e}=this.state,s=this.parseMaybeAssign();return Gf.has(s.type)&&!((t=s.extra)!=null&&t.parenthesized)&&this.raise(w.PipeUnparenthesizedBody,e,{type:s.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(w.PipeTopicUnused,e),s}checkExponentialAfterUnary(t){this.match(57)&&this.raise(w.UnexpectedTokenUnaryExponentiation,t.argument)}parseMaybeUnary(t,e){const s=this.state.startLoc,r=this.isContextual(96);if(r&&this.recordAwaitIfAllowed()){this.next();const l=this.parseAwait(s);return e||this.checkExponentialAfterUnary(l),l}const n=this.match(34),a=this.startNode();if(rp(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");const l=this.match(89);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&l){const h=a.argument;h.type==="Identifier"?this.raise(w.StrictDelete,a):this.hasPropertyAsPrivateName(h)&&this.raise(w.DeletePrivateField,a)}if(!n)return e||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}const o=this.parseUpdate(a,n,t);if(r){const{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?Sn(l):Sn(l)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(w.AwaitNotInAsyncContext,s),this.parseAwait(s)}return o}parseUpdate(t,e,s){if(e){const a=t;return this.checkLVal(a.argument,this.finishNode(a,"UpdateExpression")),t}const r=this.state.startLoc;let n=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return n;for(;ip(this.state.type)&&!this.canInsertSemicolon();){const a=this.startNodeAt(r);a.operator=this.state.value,a.prefix=!1,a.argument=n,this.next(),this.checkLVal(n,n=this.finishNode(a,"UpdateExpression"))}return n}parseExprSubscripts(t){const e=this.state.startLoc,s=this.state.potentialArrowAt,r=this.parseExprAtom(t);return this.shouldExitDescending(r,s)?r:this.parseSubscripts(r,e)}parseSubscripts(t,e,s){const r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do t=this.parseSubscript(t,e,s,r),r.maybeAsyncArrow=!1;while(!r.stop);return t}parseSubscript(t,e,s,r){const{type:n}=this.state;if(!s&&n===15)return this.parseBind(t,e,s,r);if(cr(n))return this.parseTaggedTemplateExpression(t,e,r);let a=!1;if(n===18){if(s&&(this.raise(w.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return r.stop=!0,t;r.optionalChainMember=a=!0,this.next()}if(!s&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,e,r,a);{const o=this.eat(0);return o||a||this.eat(16)?this.parseMember(t,e,r,o,a):(r.stop=!0,t)}}parseMember(t,e,s,r,n){const a=this.startNodeAt(e);return a.object=t,a.computed=r,r?(a.property=this.parseExpression(),this.expect(3)):this.match(138)?(t.type==="Super"&&this.raise(w.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),s.optionalChainMember?(a.optional=n,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(t,e,s,r){const n=this.startNodeAt(e);return n.object=t,this.next(),n.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(n,"BindExpression"),e,s)}parseCoverCallAndAsyncArrowHead(t,e,s,r){const n=this.state.maybeInArrowParameters;let a=null;this.state.maybeInArrowParameters=!0,this.next();const o=this.startNodeAt(e);o.callee=t;const{maybeAsyncArrow:l,optionalChainMember:h}=s;l&&(this.expressionScope.enter(Dp()),a=new Qi),h&&(o.optional=r),r?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,t.type==="Import",t.type!=="Super",o,a);let u=this.finishCallExpression(o,h);return l&&this.shouldParseAsyncArrow()&&!r?(s.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),u=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),u)):(l&&(this.checkExpressionErrors(a,!0),this.expressionScope.exit()),this.toReferencedArguments(u)),this.state.maybeInArrowParameters=n,u}toReferencedArguments(t,e){this.toReferencedListDeep(t.arguments,e)}parseTaggedTemplateExpression(t,e,s){const r=this.startNodeAt(e);return r.tag=t,r.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(w.OptionalChainingNoTemplate,e),this.finishNode(r,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return t.type==="Identifier"&&t.name==="async"&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}finishCallExpression(t,e){if(t.callee.type==="Import")if(t.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")),t.arguments.length===0||t.arguments.length>2)this.raise(w.ImportCallArity,t,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(const s of t.arguments)s.type==="SpreadElement"&&this.raise(w.ImportCallSpreadArgument,s);return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s,r,n){const a=[];let o=!0;const l=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){e&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(w.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),r&&this.addTrailingCommaExtraToNode(r),this.next();break}a.push(this.parseExprListItem(!1,n,s))}return this.state.inFSharpPipelineDirectBody=l,a}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(t,e.arguments,!0,(s=e.extra)==null?void 0:s.trailingCommaLoc),e.innerComments&&Ai(t,e.innerComments),e.callee.trailingComments&&Ai(t,e.callee.trailingComments),t}parseNoCallExpr(){const t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let e,s=null;const{type:r}=this.state;switch(r){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):this.match(10)?this.options.createImportExpressions?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(w.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(e,"Import"));case 78:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{const n=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(n)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,t);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:s=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(s,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;const n=e.callee=this.parseNoCallExpr();if(n.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(w.UnsupportedBind,n)}case 138:return this.raise(w.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{const n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.parseTopicReference(n);this.unexpected();break}case 47:{const n=this.input.codePointAt(this.nextTokenStart());Vt(n)||n===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(r===136)return this.parseDecimalLiteral(this.state.value);if(Me(r)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();const n=this.state.potentialArrowAt===this.state.start,a=this.state.containsEsc,o=this.parseIdentifier();if(!a&&o.name==="async"&&!this.canInsertSemicolon()){const{type:l}=this.state;if(l===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(Me(l))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(l===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return n&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else this.unexpected()}}parseTopicReferenceThenEqualsSign(t,e){const s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=t,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=ot(this.state.endLoc,-1),this.parseTopicReference(s);this.unexpected()}parseTopicReference(t){const e=this.startNode(),s=this.state.startLoc,r=this.state.type;return this.next(),this.finishTopicReference(e,s,t,r)}finishTopicReference(t,e,s,r){if(this.testTopicReferenceConfiguration(s,e,r)){const n=s==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(s==="smart"?w.PrimaryTopicNotAllowed:w.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(t,n)}else throw this.raise(w.PipeTopicUnconfiguredToken,e,{token:os(r)})}testTopicReferenceConfiguration(t,e,s){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:os(s)}]);case"smart":return s===27;default:throw this.raise(w.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(Zi(!0,this.prodParam.hasYield));const e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(w.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(t,e,!0)}parseDo(t,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),t.async=e,this.next();const s=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=s,this.finishNode(t,"DoExpression")}parseSuper(){const t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(w.SuperNotAllowed,t):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(w.UnexpectedSuper,t),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(w.UnsupportedSuper,t),this.finishNode(t,"Super")}parsePrivateName(){const t=this.startNode(),e=this.startNodeAt(ot(this.state.startLoc,1)),s=this.state.value;return this.next(),t.id=this.createIdentifier(e,s),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){const t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){const e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e;const r=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||r)&&this.raise(w.UnsupportedMetaProperty,t.property,{target:e.name,onlyValidPropertyName:s}),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){const e=this.createIdentifier(this.startNodeAtNode(t),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(w.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){const s=this.isContextual(105);if(s||this.unexpected(),this.expectPlugin(s?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(w.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),t.phase=s?"source":"defer",this.parseImportCall(t)}return this.parseMetaProperty(t,e,"meta")}parseLiteralAtNode(t,e,s){return this.addExtra(s,"rawValue",t),this.addExtra(s,"raw",this.input.slice(s.start,this.state.end)),s.value=t,this.next(),this.finishNode(s,e)}parseLiteral(t,e){const s=this.startNode();return this.parseLiteralAtNode(t,e,s)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){const e=this.startNode();return this.addExtra(e,"raw",this.input.slice(e.start,this.state.end)),e.pattern=t.pattern,e.flags=t.flags,this.next(),this.finishNode(e,"RegExpLiteral")}parseBooleanLiteral(t){const e=this.startNode();return e.value=t,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){const t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){const e=this.state.startLoc;let s;this.next(),this.expressionScope.enter(Op());const r=this.state.maybeInArrowParameters,n=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const a=this.state.startLoc,o=[],l=new Qi;let h=!0,u,d;for(;!this.match(11);){if(h)h=!1;else if(this.expect(12,l.optionalParametersLoc===null?null:l.optionalParametersLoc),this.match(11)){d=this.state.startLoc;break}if(this.match(21)){const p=this.state.startLoc;if(u=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),p)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}const c=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=r,this.state.inFSharpPipelineDirectBody=n;let f=this.startNodeAt(e);return t&&this.shouldParseArrow(o)&&(f=this.parseArrow(f))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(f,o,!1),f):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),d&&this.unexpected(d),u&&this.unexpected(u),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(o,!0),o.length>1?(s=this.startNodeAt(a),s.expressions=o,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,c)):s=o[0],this.wrapParenthesis(e,s))}wrapParenthesis(t,e){if(!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",t.index),this.takeSurroundingComments(e,t.index,this.state.lastTokEndLoc.index),e;const s=this.startNodeAt(t);return s.expression=e,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,e){return t}parseNewOrNewTarget(){const t=this.startNode();if(this.next(),this.match(16)){const e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();const s=this.parseMetaProperty(t,e,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(w.UnexpectedNewTarget,s),s}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){const e=this.parseExprList(11);this.toReferencedList(e),t.arguments=e}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){const e=this.match(83),s=this.parseNoCallExpr();t.callee=s,e&&(s.type==="Import"||s.type==="ImportExpression")&&this.raise(w.ImportCallNotNewExpression,s)}parseTemplateElement(t){const{start:e,startLoc:s,end:r,value:n}=this.state,a=e+1,o=this.startNodeAt(ot(s,1));n===null&&(t||this.raise(w.InvalidEscapeSequenceTemplate,ot(this.state.firstInvalidTemplateEscapePos,1)));const l=this.match(24),h=l?-1:-2,u=r+h;o.value={raw:this.input.slice(a,u).replace(/\r\n?/g,` +`),cooked:n===null?null:n.slice(1,h)},o.tail=l,this.next();const d=this.finishNode(o,"TemplateElement");return this.resetEndLocation(d,ot(this.state.lastTokEndLoc,h)),d}parseTemplate(t){const e=this.startNode();let s=this.parseTemplateElement(t);const r=[s],n=[];for(;!s.tail;)n.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.push(s=this.parseTemplateElement(t));return e.expressions=n,e.quasis=r,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,r){s&&this.expectPlugin("recordAndTuple");const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=Object.create(null);let o=!0;const l=this.startNode();for(l.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(l);break}let u;e?u=this.parseBindingProperty():(u=this.parsePropertyDefinition(r),this.checkProto(u,s,a,r)),s&&!this.isObjectProperty(u)&&u.type!=="SpreadElement"&&this.raise(w.InvalidRecordProperty,u),u.shorthand&&this.addExtra(u,"shorthand",!0),l.properties.push(u)}this.next(),this.state.inFSharpPipelineDirectBody=n;let h="ObjectExpression";return e?h="ObjectPattern":s&&(h="RecordExpression"),this.finishNode(l,h)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(w.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());const s=this.startNode();let r=!1,n=!1,a;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(a=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);const l=this.state.containsEsc;if(this.parsePropertyName(s,t),!o&&!l&&this.maybeAsyncOrAccessorProp(s)){const{key:h}=s,u=h.name;u==="async"&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(h),o=this.eat(55),this.parsePropertyName(s)),(u==="get"||u==="set")&&(n=!0,this.resetPreviousNodeTrailingComments(h),s.kind=u,this.match(55)&&(o=!0,this.raise(w.AccessorIsGenerator,this.state.curPosition(),{kind:u}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,a,o,r,!1,n,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;const s=this.getGetterSetterExpectedParamCount(t),r=this.getObjectOrClassMethodParams(t);r.length!==s&&this.raise(t.kind==="get"?w.BadGetterArity:w.BadSetterArity,t),t.kind==="set"&&((e=r[r.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(w.BadSetterRestParameter,t)}parseObjectMethod(t,e,s,r,n){if(n){const a=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(s||e||this.match(10))return r&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,r){if(t.shorthand=!1,this.eat(14))return t.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(r),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),s)t.value=this.parseMaybeDefault(e,zt(t.key));else if(this.match(29)){const n=this.state.startLoc;r!=null?r.shorthandAssignLoc===null&&(r.shorthandAssignLoc=n):this.raise(w.InvalidCoverInitializedName,n),t.value=this.parseMaybeDefault(e,zt(t.key))}else t.value=zt(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,e,s,r,n,a,o){const l=this.parseObjectMethod(t,s,r,n,a)||this.parseObjectProperty(t,e,n,o);return l||this.unexpected(),l}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:s,value:r}=this.state;let n;if(Pt(s))n=this.parseIdentifier(!0);else switch(s){case 134:n=this.parseNumericLiteral(r);break;case 133:n=this.parseStringLiteral(r);break;case 135:n=this.parseBigIntLiteral(r);break;case 138:{const a=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=a):this.raise(w.UnexpectedPrivateField,a),n=this.parsePrivateName();break}default:if(s===136){n=this.parseDecimalLiteral(r);break}this.unexpected()}t.key=n,s!==138&&(t.computed=!1)}}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,s,r,n,a,o=!1){this.initFunction(t,s),t.generator=e,this.scope.enter(18|(o?64:0)|(n?32:0)),this.prodParam.enter(Zi(s,t.generator)),this.parseFunctionParams(t,r);const l=this.parseFunctionBodyAndFinish(t,a,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(t,e,s,r){s&&this.expectPlugin("recordAndTuple");const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=this.startNode();return this.next(),a.elements=this.parseExprList(t,!s,r,a),this.state.inFSharpPipelineDirectBody=n,this.finishNode(a,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,s,r){this.scope.enter(6);let n=Zi(s,!1);!this.match(5)&&this.prodParam.hasIn&&(n|=8),this.prodParam.enter(n),this.initFunction(t,s);const a=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,s){this.toAssignableList(e,s,!1),t.params=e}parseFunctionBodyAndFinish(t,e,s=!1){return this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}parseFunctionBody(t,e,s=!1){const r=e&&!this.match(5);if(this.expressionScope.enter(rc()),r)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{const n=this.state.strict,a=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,o=>{const l=!this.isSimpleParamList(t.params);o&&l&&this.raise(w.IllegalLanguageModeDirective,(t.kind==="method"||t.kind==="constructor")&&!!t.key?t.key.loc.end:t);const h=!n&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!s&&!l,e,h),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,h)}),this.prodParam.exit(),this.state.labels=a}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let e=0,s=t.length;e10||!gp(t))return;if(s&&dp(t)){this.raise(w.UnexpectedKeyword,e,{keyword:t});return}if((this.state.strict?r?Ql:Yl:Xl)(t,this.inModule)){this.raise(w.UnexpectedReservedWord,e,{reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(w.YieldBindingIdentifier,e);return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(w.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(w.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(w.ArgumentsInClass,e);return}}recordAwaitIfAllowed(){const t=this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction;return t&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),t}parseAwait(t){const e=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(w.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(w.ObsoleteAwaitStar,e),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;const{type:t}=this.state;return t===53||t===10||t===0||cr(t)||t===102&&!this.state.containsEsc||t===137||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){const t=this.startNode();this.expressionScope.recordParameterInitializerError(w.YieldInParameter,t),this.next();let e=!1,s=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:s=this.parseMaybeAssign()}return t.delegate=e,t.argument=s,this.finishNode(t,"YieldExpression")}parseImportCall(t){return this.next(),t.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(t.options=null),this.eat(12)&&(this.hasPlugin("moduleAttributes")||this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes"),this.match(11)||(t.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(w.PipelineHeadSequenceExpression,e)}parseSmartPipelineBodyInStyle(t,e){if(this.isSimpleReference(t)){const s=this.startNodeAt(e);return s.callee=t,this.finishNode(s,"PipelineBareFunction")}else{const s=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),s.expression=t,this.finishNode(s,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(w.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(w.PipelineTopicUnused,t)}withTopicBindingContext(t){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}else return t()}withSoloAwaitPermittingContext(t){const e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){const e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){const e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){const e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const r=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,t);return this.state.inFSharpPipelineDirectBody=s,r}parseModuleExpression(){this.expectPlugin("moduleBlocks");const t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);const e=this.startNodeAt(this.state.endLoc);this.next();const s=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(e,8,"module")}finally{s()}return this.finishNode(t,"ModuleExpression")}parsePropertyNamePrefixOperator(t){}}const tn={kind:1},hd={kind:2},fd=/[\uD800-\uDFFF]/u,sn=/in(?:stanceof)?/y;function pd(i,t){for(let e=0;e0)for(const[n,a]of Array.from(this.scope.undefinedExports))this.raise(w.ModuleExportUndefined,a,{localName:n});this.addExtra(t,"topLevelAwait",this.state.hasTopLevelAwait)}let r;return e===139?r=this.finishNode(t,"Program"):r=this.finishNodeAt(t,"Program",ot(this.state.startLoc,-1)),r}stmtToDirective(t){const e=t;e.type="Directive",e.value=e.expression,delete e.expression;const s=e.value,r=s.value,n=this.input.slice(s.start,s.end),a=s.value=n.slice(1,-1);return this.addExtra(s,"raw",n),this.addExtra(s,"rawValue",a),this.addExtra(s,"expressionValue",r),s.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;const t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(t,e){if(Vt(t)){if(sn.lastIndex=e,sn.test(this.input)){const s=this.codePointAtPos(sn.lastIndex);if(!js(s)&&s!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){const t=this.nextTokenStart(),e=this.codePointAtPos(t);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,t)}hasInLineFollowingBindingIdentifierOrBrace(){const t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return e===123||this.chStartsBindingIdentifier(e,t)}startsUsingForOf(){const{type:t,containsEsc:e}=this.lookahead();if(t===102&&!e)return!1;if(Me(t)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);const e=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(e,t))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,t&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(t,e)}parseStatementContent(t,e){const s=this.state.type,r=this.startNode(),n=!!(t&2),a=!!(t&4),o=t&1;switch(s){case 60:return this.parseBreakContinueStatement(r,!0);case 63:return this.parseBreakContinueStatement(r,!1);case 64:return this.parseDebuggerStatement(r);case 90:return this.parseDoWhileStatement(r);case 91:return this.parseForStatement(r);case 68:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?w.StrictFunction:this.options.annexB?w.SloppyFunctionAnnexB:w.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(r,!1,!n&&a);case 80:return n||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,r),!0);case 69:return this.parseIfStatement(r);case 70:return this.parseReturnStatement(r);case 71:return this.parseSwitchStatement(r);case 72:return this.parseThrowStatement(r);case 73:return this.parseTryStatement(r);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?n||this.raise(w.UnexpectedLexicalDeclaration,r):this.raise(w.AwaitUsingNotInAsyncContext,r),this.next(),this.parseVarStatement(r,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(w.UnexpectedUsingDeclaration,this.state.startLoc):n||this.raise(w.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(r,"using");case 100:{if(this.state.containsEsc)break;const u=this.nextTokenStart(),d=this.codePointAtPos(u);if(d!==91&&(!n&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(d,u)&&d!==123))break}case 75:n||this.raise(w.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{const u=this.state.value;return this.parseVarStatement(r,u)}case 92:return this.parseWhileStatement(r);case 76:return this.parseWithStatement(r);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(r);case 83:{const u=this.lookaheadCharCode();if(u===40||u===46)break}case 82:{!this.options.allowImportExportEverywhere&&!o&&this.raise(w.UnexpectedImportExport,this.state.startLoc),this.next();let u;return s===83?(u=this.parseImport(r),u.type==="ImportDeclaration"&&(!u.importKind||u.importKind==="value")&&(this.sawUnambiguousESM=!0)):(u=this.parseExport(r,e),(u.type==="ExportNamedDeclaration"&&(!u.exportKind||u.exportKind==="value")||u.type==="ExportAllDeclaration"&&(!u.exportKind||u.exportKind==="value")||u.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(u),u}default:if(this.isAsyncFunction())return n||this.raise(w.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,!n&&a)}const l=this.state.value,h=this.parseExpression();return Me(s)&&h.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(r,l,h,t):this.parseExpressionStatement(r,h,e)}assertModuleNodeAllowed(t){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(w.ImportOutsideModule,t)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,e,s){return t&&(e.decorators&&e.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(w.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...t)):e.decorators=t,this.resetStartLocationFromNode(e,t[0]),s&&this.resetStartLocationFromNode(s,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){const e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(w.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(w.UnexpectedLeadingDecorator,this.state.startLoc);return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const t=this.startNode();if(this.next(),this.hasPlugin("decorators")){const e=this.state.startLoc;let s;if(this.match(10)){const r=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(11),s=this.wrapParenthesis(r,s);const n=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(s),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==s&&this.raise(w.DecoratorArgumentsOutsideParentheses,n)}else{for(s=this.parseIdentifier(!1);this.eat(16);){const r=this.startNodeAt(e);r.object=s,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),r.property=this.parsePrivateName()):r.property=this.parseIdentifier(!0),r.computed=!1,s=this.finishNode(r,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(s)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(10)){const e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}parseBreakContinueStatement(t,e){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){let s;for(s=0;sthis.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(tn);let e=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(e=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return e!==null&&this.unexpected(e),this.parseFor(t,null);const s=this.isContextual(100);{const l=this.isContextual(96)&&this.startsAwaitUsing(),h=l||this.isContextual(107)&&this.startsUsingForOf(),u=s&&this.hasFollowingBindingAtom()||h;if(this.match(74)||this.match(75)||u){const d=this.startNode();let c;l?(c="await using",this.recordAwaitIfAllowed()||this.raise(w.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):c=this.state.value,this.next(),this.parseVar(d,!0,c);const f=this.finishNode(d,"VariableDeclaration"),p=this.match(58);return p&&h&&this.raise(w.ForInUsing,f),(p||this.isContextual(102))&&f.declarations.length===1?this.parseForIn(t,f,e):(e!==null&&this.unexpected(e),this.parseFor(t,f))}}const r=this.isContextual(95),n=new Qi,a=this.parseExpression(!0,n),o=this.isContextual(102);if(o&&(s&&this.raise(w.ForOfLet,a),e===null&&r&&a.type==="Identifier"&&this.raise(w.ForOfAsync,a)),o||this.match(58)){this.checkDestructuringPrivate(n),this.toAssignable(a,!0);const l=o?"ForOfStatement":"ForInStatement";return this.checkLVal(a,{type:l}),this.parseForIn(t,a,e)}else this.checkExpressionErrors(n,!0);return e!==null&&this.unexpected(e),this.parseFor(t,a)}parseFunctionStatement(t,e,s){return this.next(),this.parseFunction(t,1|(s?2:0)|(e?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(w.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();const e=t.cases=[];this.expect(5),this.state.labels.push(hd),this.scope.enter(0);let s;for(let r;!this.match(8);)if(this.match(61)||this.match(65)){const n=this.match(61);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),n?s.test=this.parseExpression():(r&&this.raise(w.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),r=!0,s.test=null),this.expect(14)}else s?s.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(w.NewlineAfterThrow,this.state.lastTokEndLoc),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){const t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{type:"CatchClause"},9),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){const e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(w.NoCatchOrFinally,t),this.finishNode(t,"TryStatement")}parseVarStatement(t,e,s=!1){return this.next(),this.parseVar(t,!1,e,s),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(tn),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(w.StrictWith,this.state.startLoc),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,s,r){for(const a of this.state.labels)a.name===e&&this.raise(w.LabelRedeclaration,s,{labelName:e});const n=tp(this.state.type)?1:this.match(71)?2:null;for(let a=this.state.labels.length-1;a>=0;a--){const o=this.state.labels[a];if(o.statementStart===t.start)o.statementStart=this.state.start,o.kind=n;else break}return this.state.labels.push({name:e,kind:n,statementStart:this.state.start}),t.body=r&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e,s){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,s){const r=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(r,t,!1,8,s),e&&this.scope.exit(),this.finishNode(r,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,e,s,r,n){const a=t.body=[],o=t.directives=[];this.parseBlockOrModuleBlockBody(a,e?o:void 0,s,r,n)}parseBlockOrModuleBlockBody(t,e,s,r,n){const a=this.state.strict;let o=!1,l=!1;for(;!this.match(r);){const h=s?this.parseModuleItem():this.parseStatementListItem();if(e&&!l){if(this.isValidDirective(h)){const u=this.stmtToDirective(h);e.push(u),!o&&u.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}t.push(h)}n==null||n.call(this,o),a||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,s){const r=this.match(58);return this.next(),r?s!==null&&this.unexpected(s):t.await=s!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!r||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(w.ForInOfLoopInitializer,e,{type:r?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(w.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),t.left=e,t.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,r?"ForInStatement":"ForOfStatement")}parseVar(t,e,s,r=!1){const n=t.declarations=[];for(t.kind=s;;){const a=this.startNode();if(this.parseVarId(a,s),a.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,a.init===null&&!r&&(a.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(w.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(s==="const"||s==="using"||s==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(w.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:s})),n.push(this.finishNode(a,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,e){const s=this.parseBindingAtom();(e==="using"||e==="await using")&&(s.type==="ArrayPattern"||s.type==="ObjectPattern")&&this.raise(w.UsingDeclarationHasBindingPattern,s.loc.start),this.checkLVal(s,{type:"VariableDeclarator"},e==="var"?5:8201),t.id=s}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,e=0){const s=e&2,r=!!(e&1),n=r&&!(e&4),a=!!(e&8);this.initFunction(t,a),this.match(55)&&(s&&this.raise(w.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),t.generator=!0),r&&(t.id=this.parseFunctionId(n));const o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(Zi(a,t.generator)),r||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,r?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),r&&!s&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,t}parseFunctionId(t){return t||Me(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(10),this.expressionScope.enter(Mp()),t.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){!t.id||this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,e,s){this.next();const r=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,r),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(t){return t.type==="Identifier"&&t.name==="constructor"||t.type==="StringLiteral"&&t.value==="constructor"}isNonstaticConstructor(t){return!t.computed&&!t.static&&this.nameIsConstructor(t.key)}parseClassBody(t,e){this.classScope.enter();const s={hadConstructor:!1,hadSuperClass:t};let r=[];const n=this.startNode();if(n.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(r.length>0)throw this.raise(w.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){r.push(this.parseDecorator());continue}const a=this.startNode();r.length&&(a.decorators=r,this.resetStartLocationFromNode(a,r[0]),r=[]),this.parseClassMember(n,a,s),a.kind==="constructor"&&a.decorators&&a.decorators.length>0&&this.raise(w.DecoratorConstructor,a)}}),this.state.strict=e,this.next(),r.length)throw this.raise(w.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(n,"ClassBody")}parseClassMemberFromModifier(t,e){const s=this.parseIdentifier(!0);if(this.isClassMethod()){const r=e;return r.kind="method",r.computed=!1,r.key=s,r.static=!1,this.pushClassMethod(t,r,!1,!1,!1,!1),!0}else if(this.isClassProperty()){const r=e;return r.computed=!1,r.key=s,r.static=!1,t.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(t,e,s){const r=this.isContextual(106);if(r){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(5)){this.parseClassStaticBlock(t,e);return}}this.parseClassMemberWithIsStatic(t,e,s,r)}parseClassMemberWithIsStatic(t,e,s,r){const n=e,a=e,o=e,l=e,h=e,u=n,d=n;if(e.static=r,this.parsePropertyNamePrefixOperator(e),this.eat(55)){u.kind="method";const P=this.match(138);if(this.parseClassElementName(u),P){this.pushClassPrivateMethod(t,a,!0,!1);return}this.isNonstaticConstructor(n)&&this.raise(w.ConstructorIsGenerator,n.key),this.pushClassMethod(t,n,!0,!1,!1,!1);return}const c=!this.state.containsEsc&&Me(this.state.type),f=this.parseClassElementName(e),p=c?f.name:null,m=this.isPrivateName(f),b=this.state.startLoc;if(this.parsePostMemberNameModifiers(d),this.isClassMethod()){if(u.kind="method",m){this.pushClassPrivateMethod(t,a,!1,!1);return}const P=this.isNonstaticConstructor(n);let A=!1;P&&(n.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(w.DuplicateConstructor,f),P&&this.hasPlugin("typescript")&&e.override&&this.raise(w.OverrideOnConstructor,f),s.hadConstructor=!0,A=s.hadSuperClass),this.pushClassMethod(t,n,!1,!1,P,A)}else if(this.isClassProperty())m?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o);else if(p==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(f);const P=this.eat(55);d.optional&&this.unexpected(b),u.kind="method";const A=this.match(138);this.parseClassElementName(u),this.parsePostMemberNameModifiers(d),A?this.pushClassPrivateMethod(t,a,P,!0):(this.isNonstaticConstructor(n)&&this.raise(w.ConstructorIsAsync,n.key),this.pushClassMethod(t,n,P,!0,!1,!1))}else if((p==="get"||p==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(f),u.kind=p;const P=this.match(138);this.parseClassElementName(n),P?this.pushClassPrivateMethod(t,a,!1,!1):(this.isNonstaticConstructor(n)&&this.raise(w.ConstructorIsAccessor,n.key),this.pushClassMethod(t,n,!1,!1,!1,!1)),this.checkGetterSetterParams(n)}else if(p==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(f);const P=this.match(138);this.parseClassElementName(o),this.pushClassAccessorProperty(t,h,P)}else this.isLineTerminator()?m?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o):this.unexpected()}parseClassElementName(t){const{type:e,value:s}=this.state;if((e===132||e===133)&&t.static&&s==="prototype"&&this.raise(w.StaticPrototype,this.state.startLoc),e===138){s==="constructor"&&this.raise(w.ConstructorClassPrivateField,this.state.startLoc);const r=this.parsePrivateName();return t.key=r,r}return this.parsePropertyName(t),t.key}parseClassStaticBlock(t,e){var s;this.scope.enter(208);const r=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const n=e.body=[];this.parseBlockOrModuleBlockBody(n,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=r,t.body.push(this.finishNode(e,"StaticBlock")),(s=e.decorators)!=null&&s.length&&this.raise(w.DecoratorStaticBlock,e)}pushClassProperty(t,e){!e.computed&&this.nameIsConstructor(e.key)&&this.raise(w.ConstructorClassField,e.key),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){const s=this.parseClassPrivateProperty(e);t.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassAccessorProperty(t,e,s){!s&&!e.computed&&this.nameIsConstructor(e.key)&&this.raise(w.ConstructorClassField,e.key);const r=this.parseClassAccessorProperty(e);t.body.push(r),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassMethod(t,e,s,r,n,a){t.body.push(this.parseMethod(e,s,r,n,a,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,r){const n=this.parseMethod(e,s,r,!1,!1,"ClassPrivateMethod",!0);t.body.push(n);const a=n.kind==="get"?n.static?6:2:n.kind==="set"?n.static?5:1:0;this.declareClassPrivateMethodInScope(n,a)}declareClassPrivateMethodInScope(t,e){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),e,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(rc()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,e,s,r=8331){if(Me(this.state.type))t.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(t.id,r);else if(s||!e)t.id=null;else throw this.raise(w.MissingClassName,this.state.startLoc)}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,e){const s=this.parseMaybeImportPhase(t,!0),r=this.maybeParseExportDefaultSpecifier(t,s),n=!r||this.eat(12),a=n&&this.eatExportStar(t),o=a&&this.maybeParseExportNamespaceSpecifier(t),l=n&&(!o||this.eat(12)),h=r||a;if(a&&!o){if(r&&this.unexpected(),e)throw this.raise(w.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}const u=this.maybeParseExportNamedSpecifiers(t);r&&n&&!a&&!u&&this.unexpected(null,5),o&&l&&this.unexpected(null,98);let d;if(h||u){if(d=!1,e)throw this.raise(w.UnsupportedDecoratorExport,t);this.parseExportFrom(t,h)}else d=this.maybeParseExportDeclaration(t);if(h||u||d){var c;const f=t;if(this.checkExport(f,!0,!1,!!f.source),((c=f.declaration)==null?void 0:c.type)==="ClassDeclaration")this.maybeTakeDecorators(e,f.declaration,f);else if(e)throw this.raise(w.UnsupportedDecoratorExport,t);return this.finishNode(f,"ExportNamedDeclaration")}if(this.eat(65)){const f=t,p=this.parseExportDefaultExpression();if(f.declaration=p,p.type==="ClassDeclaration")this.maybeTakeDecorators(e,p,f);else if(e)throw this.raise(w.UnsupportedDecoratorExport,t);return this.checkExport(f,!0,!0),this.finishNode(f,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e==null?void 0:e.loc.start);const s=e||this.parseIdentifier(!0),r=this.startNodeAtNode(s);return r.exported=s,t.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){var e,s;(s=(e=t).specifiers)!=null||(e.specifiers=[]);const r=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),r.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(r,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){const e=t;e.specifiers||(e.specifiers=[]);const s=e.exportKind==="type";return e.specifiers.push(...this.parseExportSpecifiers(s)),e.source=null,e.declaration=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;const t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){const t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(w.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(w.UnsupportedDefaultExport,this.state.startLoc);const e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:t}=this.state;if(Me(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){const{type:r}=this.lookahead();if(Me(r)&&r!==98||r===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const e=this.nextTokenStart(),s=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||Me(this.state.type)&&s)return!0;if(this.match(65)&&s){const r=this.input.charCodeAt(this.nextTokenStartSince(e+4));return r===34||r===39}return!1}parseExportFrom(t,e){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(w.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(w.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(w.UsingDeclarationExport,this.state.startLoc),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,e,s,r){if(e){var n;if(s){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var a;const o=t.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((a=o.extra)!=null&&a.parenthesized)&&this.raise(w.ExportDefaultFromAsIdentifier,o)}}else if((n=t.specifiers)!=null&&n.length)for(const o of t.specifiers){const{exported:l}=o,h=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(o,h),!r&&o.local){const{local:u}=o;u.type!=="Identifier"?this.raise(w.ExportBindingIsString,o,{localName:u.value,exportName:h}):(this.checkReservedWord(u.name,u.loc.start,!0,!1),this.scope.checkLocalExport(u))}}else if(t.declaration){const o=t.declaration;if(o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"){const{id:l}=o;if(!l)throw new Error("Assertion failure");this.checkDuplicateExports(t,l.name)}else if(o.type==="VariableDeclaration")for(const l of o.declarations)this.checkDeclaration(l.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(const e of t.properties)this.checkDeclaration(e);else if(t.type==="ArrayPattern")for(const e of t.elements)e&&this.checkDeclaration(e);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(w.DuplicateDefaultExport,t):this.raise(w.DuplicateExport,t,{exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(t){const e=[];let s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else if(this.expect(12),this.eat(8))break;const r=this.isContextual(130),n=this.match(133),a=this.startNode();a.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(a,n,t,r))}return e}parseExportSpecifier(t,e,s,r){return this.eatContextual(93)?t.exported=this.parseModuleExportName():e?t.exported=$p(t.local):t.exported||(t.exported=zt(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){const t=this.parseStringLiteral(this.state.value),e=fd.exec(t.value);return e&&this.raise(w.ModuleExportNameHasLoneSurrogate,t,{surrogateCharCode:e[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:e,value:s})=>s.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(t){const{specifiers:e}=t,s=e.length===1?e[0].type:null;if(t.phase==="source")s!=="ImportDefaultSpecifier"&&this.raise(w.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(t.phase==="defer")s!=="ImportNamespaceSpecifier"&&this.raise(w.DeferImportRequiresNamespace,e[0].loc.start);else if(t.module){var r;s!=="ImportDefaultSpecifier"&&this.raise(w.ImportReflectionNotBinding,e[0].loc.start),((r=t.assertions)==null?void 0:r.length)>0&&this.raise(w.ImportReflectionHasAssertion,e[0].loc.start)}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){const{specifiers:e}=t;if(e!=null){const s=e.find(r=>{let n;if(r.type==="ExportSpecifier"?n=r.local:r.type==="ImportSpecifier"&&(n=r.imported),n!==void 0)return n.type==="Identifier"?n.name!=="default":n.value!=="default"});s!==void 0&&this.raise(w.ImportJSONBindingNotDefault,s.loc.start)}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,e,s,r){e||(s==="module"?(this.expectPlugin("importReflection",r),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),s==="source"?(this.expectPlugin("sourcePhaseImports",r),t.phase="source"):s==="defer"?(this.expectPlugin("deferredImportEvaluation",r),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(t,e,null),null;const s=this.parseIdentifier(!0),{type:r}=this.state;return(Pt(r)?r!==98||this.lookaheadCharCode()===102:r!==12)?(this.resetPreviousIdentifierLeadingComments(s),this.applyImportPhase(t,e,s.name,s.loc.start),null):(this.applyImportPhase(t,e,null),s)}isPrecedingIdImportPhase(t){const{type:e}=this.state;return Me(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(t){return this.match(133)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,e){t.specifiers=[];const r=!this.maybeParseDefaultImportSpecifier(t,e)||this.eat(12),n=r&&this.maybeParseStarImportSpecifier(t);return r&&!n&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var e;return(e=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,e,s){e.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(e,s))}finishImportSpecifier(t,e,s=8201){return this.checkLVal(t.local,{type:e},s),this.finishNode(t,e)}parseImportAttributes(){this.expect(5);const t=[],e=new Set;do{if(this.match(8))break;const s=this.startNode(),r=this.state.value;if(e.has(r)&&this.raise(w.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:r}),e.add(r),this.match(133)?s.key=this.parseStringLiteral(r):s.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(w.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){const t=[],e=new Set;do{const s=this.startNode();if(s.key=this.parseIdentifier(!0),s.key.name!=="type"&&this.raise(w.ModuleAttributeDifferentFromType,s.key),e.has(s.key.name)&&this.raise(w.ModuleAttributesWithDuplicateKeys,s.key,{key:s.key.name}),e.add(s.key.name),this.expect(14),!this.match(133))throw this.raise(w.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let e;var s=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():(this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes"),e=this.parseImportAttributes()),s=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(w.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(t,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),e=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))e=[];else if(this.hasPlugin("moduleAttributes"))e=[];else return;!s&&this.hasPlugin("importAssertions")?t.assertions=e:t.attributes=e}maybeParseDefaultImportSpecifier(t,e){if(e){const s=this.startNodeAtNode(e);return s.local=e,t.specifiers.push(this.finishImportSpecifier(s,"ImportDefaultSpecifier")),!0}else if(Pt(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){const e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(w.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}const s=this.startNode(),r=this.match(133),n=this.isContextual(130);s.imported=this.parseModuleExportName();const a=this.parseImportSpecifier(s,r,t.importKind==="type"||t.importKind==="typeof",n,void 0);t.specifiers.push(a)}}parseImportSpecifier(t,e,s,r,n){if(this.eatContextual(93))t.local=this.parseIdentifier();else{const{imported:a}=t;if(e)throw this.raise(w.ImportBindingIsString,t,{importName:a.value});this.checkReservedWord(a.name,t.loc.start,!0,!0),t.local||(t.local=zt(a))}return this.finishImportSpecifier(t,"ImportSpecifier",n)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}}class cc extends dd{constructor(t,e,s){t=cd(t),super(t,e),this.options=t,this.initializeScopes(),this.plugins=s,this.filename=t.sourceFilename}getScopeHandler(){return la}parse(){this.enterInitialScopes();const t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t.comments.length=this.state.commentsLen,t}}function md(i,t){var e;if(((e=t)==null?void 0:e.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";const s=ni(t,i),r=s.parse();if(s.sawUnambiguousESM)return r;if(s.ambiguousScriptDifferentAst)try{return t.sourceType="script",ni(t,i).parse()}catch{}else r.program.sourceType="script";return r}catch(s){try{return t.sourceType="script",ni(t,i).parse()}catch{}throw s}}else return ni(t,i).parse()}function yd(i,t){const e=ni(t,i);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function gd(i){const t={};for(const e of Object.keys(i))t[e]=Bt(i[e]);return t}const Td=gd(Yf);function ni(i,t){let e=cc;const s=new Map;if(i!=null&&i.plugins){for(const r of i.plugins){let n,a;typeof r=="string"?n=r:[n,a]=r,s.has(n)||s.set(n,a||{})}od(s),e=bd(s)}return new e(i,t,s)}const Eo=new Map;function bd(i){const t=[];for(const r of ld)i.has(r)&&t.push(r);const e=t.join("|");let s=Eo.get(e);if(!s){s=cc;for(const r of t)s=lc[r](s);Eo.set(e,s)}return s}var xd=kr.parse=md;kr.parseExpression=yd;kr.tokTypes=Td;var _i={},hs={},gt={};Object.defineProperty(gt,"__esModule",{value:!0});function uc(i){return{type:"concat",parts:i}}gt.concat=uc;function Sd(i,t){const e=[];return t.forEach((s,r)=>{r>0&&e.push(i),e.push(s)}),uc(e)}gt.join=Sd;gt.line={type:"line",hard:!1,soft:!1};gt.hardline={type:"line",hard:!0,soft:!1};gt.softline={type:"line",hard:!1,soft:!0};function Pd(i){return{type:"indent",content:i}}gt.indent=Pd;function Ed(i){return{type:"lineSuffix",content:i}}gt.lineSuffix=Ed;function Ad(i,t=!1){return{type:"group",content:i,willBreak:t}}gt.group=Ad;gt.breakParent={type:"breakParent"};function wd(i){return typeof i=="string"&&i.length===0}gt.isEmpty=wd;var Ye={};Object.defineProperty(Ye,"__esModule",{value:!0});function Cd(i){return i.range[0]}Ye.locStart=Cd;function kd(i){return i.range[1]}Ye.locEnd=kd;function vd(i){if(!i||typeof i.type!="string")return!1;switch(i.type){case"LabelStatement":case"BreakStatement":case"GotoStatement":case"ReturnStatement":case"IfStatement":case"IfClause":case"ElseifClause":case"ElseClause":case"WhileStatement":case"DoStatement":case"RepeatStatement":case"LocalStatement":case"AssignmentStatement":case"CallStatement":case"FunctionDeclaration":case"ForNumericStatement":case"ForGenericStatement":case"Chunk":case"Identifier":case"BooleanLiteral":case"NilLiteral":case"NumericLiteral":case"StringLiteral":case"VarargLiteral":case"TableKey":case"TableKeyString":case"TableValue":case"TableConstructorExpression":case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"MemberExpression":case"IndexExpression":case"CallExpression":case"TableCallExpression":case"StringCallExpression":case"Comment":return!0;default:return!1}}Ye.isNode=vd;function ha(i,t,e,s={}){let r=0;return e.forEach(n=>{if((s.searchBackwards?i.substring(t-n.length,t):i.substring(t,t+n.length))===n){r=n.length;return}}),t+(s.searchBackwards?-r:r)}Ye.skipOnce=ha;function fa(i,t,e,s={}){let r=null;for(;r!==t;)r=t,t=ha(i,t,e,s);return t}Ye.skipMany=fa;function wi(i,t,e={}){return ha(i,t,[` +`,`\r +`],e)}Ye.skipNewLine=wi;function Hs(i,t,e={}){return fa(i,t,[" "," "],e)}Ye.skipSpaces=Hs;function hc(i,t,e={}){return fa(i,Hs(i,t),[";"],e)}Ye.skipToLineEnd=hc;function fc(i,t,e={}){const s=Hs(i,t,e),r=wi(i,s,e);return s!==r}Ye.hasNewLine=fc;function Ld(i,t,e){return i.substr(t,e-t).indexOf(` +`)!==-1}Ye.hasNewLineInRange=Ld;function Id(i,t){t=Hs(i,t,{searchBackwards:!0}),t=wi(i,t,{searchBackwards:!0}),t=Hs(i,t,{searchBackwards:!0});const e=wi(i,t,{searchBackwards:!0});return t!==e}Ye.isPreviousLineEmpty=Id;function pc(i,t){if(i.charAt(t)==="-"&&i.charAt(t+1)==="-")for(t+=2;t>=0&&t=0&&!(Ue.locStart(e[n])<=Ue.locStart(r)&&Ue.locEnd(e[n])<=Ue.locEnd(i));--n);e.splice(n+1,0,r)}}for(const r of t){const n=i[r];Array.isArray(n)?n.forEach(s):n&&s(n)}return e}function Md(i,t){for(const e of i.comments){dc(i,e);const s=e.precedingNode,r=e.enclosingNode,n=e.followingNode;Ue.hasNewLine(t.sourceText,Ue.locStart(e),{searchBackwards:!0})?jd(r,e)||Ud(s,r,e)||Vd(s,r,n,e)||(n?Ao(n,e):s?wo(s,e):Wt(r||i,e)):Hd(s,r,e)||Gd(s,r,e)||(s?wo(s,e):n?Ao(n,e):Wt(r||i,e))}}hs.attachComments=Md;function Od(i,t){if(!t.sourceText.startsWith("#!"))return;const e=t.sourceText.indexOf(` +`),s=t.sourceText.slice(0,e),r=t.sourceText.slice(2,e);i.comments.push({type:"Comment",loc:{start:{line:1,column:0},end:{line:1,column:e}},range:[0,e],raw:s,value:r})}hs.injectShebang=Od;function Dd(i,t=!1){const e=i.getValue();if(!e||!e.attachedComments)return"";const s=[];return i.forEach(r=>{const n=r.getValue();n.commentType===Mt.Dangling&&s.push(n.raw)},"attachedComments"),s.length===0?"":t?He.join(He.hardline,s):He.indent(He.concat([He.hardline,He.join(He.hardline,s)]))}hs.printDanglingComments=Dd;function Fd(i){const t=i.getValue();if(!t||!t.attachedComments)return"";const e=[];return i.forEach(s=>{const r=s.getValue();r.commentType===Mt.DanglingStatement&&(e.push(" "),e.push(r.raw))},"attachedComments"),e.length===0?"":He.concat(e)}hs.printDanglingStatementComments=Fd;function Bd(i,t){const e=i.getValue();if(e.raw.startsWith("--[["))return He.concat([e.raw,Ue.hasNewLine(t.sourceText,Ue.locEnd(e))?He.hardline:" "]);const r=[];return r.push(e.raw),r.push(He.hardline),Ue.isNextLineEmpty(t.sourceText,Ue.locEnd(e))&&r.push(He.hardline),He.concat(r)}function Rd(i,t){const e=i.getValue();if(Ue.hasNewLine(t.sourceText,Ue.locStart(e),{searchBackwards:!0})){const r=Ue.isPreviousLineEmpty(t.sourceText,Ue.locStart(e));return He.concat([He.hardline,r?He.hardline:"",e.raw])}if(e.raw.startsWith("--[["))return He.concat([" ",e.raw]);const s=[];return Ue.isNextLineEmpty(t.sourceText,Ue.locStart(e),{searchBackwards:!0})&&s.push(He.hardline),s.push(" "),s.push(e.raw),s.push(He.breakParent),He.lineSuffix(He.concat(s))}function $d(i,t,e){const s=i.getValue(),r=e(i),n=s.attachedComments;if(!n||n.length===0)return r;const a=[],o=[r];return i.forEach(l=>{switch(l.getValue().commentType){case Mt.Leading:a.push(Bd(i,t));break;case Mt.Trailing:o.push(Rd(i,t));break}},"attachedComments"),He.concat(a.concat(o))}hs.printComments=$d;function dc(i,t){const e=_d(i);let s=null,r=null,n=0,a=e.length;for(;n0?!1:t.parameters.length>0&&t.parameters[t.parameters.length-1]===i||i&&i.type==="Identifier"?(Wt(t,e),!0):!1}function Vd(i,t,e,s){return!t||t.type!=="IfStatement"?!1:e&&(e.type==="ElseifClause"||e.type==="ElseClause")||i&&i.type==="ElseClause"?(Wt(i,s),!0):!1}function Hd(i,t,e){if(e.raw.startsWith("--[[")||!t)return!1;switch(t.type){case"WhileStatement":if(i===t.condition)return ss(t,e),!0;break;case"DoStatement":case"RepeatStatement":if(i==null)return ss(t,e),!0;break;case"FunctionDeclaration":if(t.parameters.length&&i===t.parameters[t.parameters.length-1]||i===t.identifier)return ss(t,e),!0;break;case"ForNumericStatement":if(i===t.end||i===t.step)return ss(t,e),!0;break;case"ForGenericStatement":if(i===t.iterators[t.iterators.length-1])return ss(t,e),!0;break;case"IfClause":case"ElseifClause":if(i===t.condition&&e.loc.start.column>i.loc.start.column)return ss(t,e),!0;break;case"ElseClause":if(i==null)return ss(t,e),!0;break}return!1}function Gd(i,t,e){if(!i||!t||t.type!=="IfStatement")return!1;switch(i.type){case"IfClause":case"ElseifClause":case"ElseClause":if(i.body.length===0)return ss(i,e),!0;break}return!1}var pa={},da={};Object.defineProperty(da,"__esModule",{value:!0});const Wd=Ye;class Kd{constructor(t){this.stack=[t]}getValue(){return this.stack[this.stack.length-1]}getNodeAtDepth(t){for(let e=this.stack.length-1;e>=0;e-=2){const s=this.stack[e];if(Wd.isNode(s)&&--t<0)return s}return null}getParent(t=0){return this.getNodeAtDepth(t+1)}call(t,e){const s=this.getValue(),r=this.stack.length;this.stack.push(e,s[e]);const n=t(this);return this.stack.length=r,n}forEach(t,e=null){let s=this.getValue();const r=this.stack.length;e&&(s=s[e],this.stack.push(s));for(let n=0;n{this.stack.push(o,a),r.push(t(this,o)),this.stack.length-=2}),this.stack.length=n,r}needsParens(){const t=this.getParent(),e=this.getValue();let s=!1;switch(e.type){case"FunctionDeclaration":case"Chunk":case"Identifier":case"BooleanLiteral":case"NilLiteral":case"NumericLiteral":case"StringLiteral":case"VarargLiteral":case"TableConstructorExpression":case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"MemberExpression":case"IndexExpression":case"CallExpression":case"TableCallExpression":case"StringCallExpression":s=e.inParens||!1}return t&&e.type==="UnaryExpression"&&t.type==="UnaryExpression"&&(s=!0),s}}da.FastPath=Kd;var Ir={};Object.defineProperty(Ir,"__esModule",{value:!0});function mc(i,t,e){let s=!1;const r=n=>{if(t(n)){s=!0;return}if(!s&&typeof n!="string"){switch(n.type){case"concat":n.parts.forEach(r);break;case"indent":case"group":case"lineSuffix":r(n.content);break}e&&e(n)}};r(i)}function qd(i,t){let e=!1;return mc(i,s=>t(s)?(e=!0,!0):!1),e}function zd(i){return qd(i,t=>{if(typeof t=="string")return!1;switch(t.type){case"line":if(t.hard)return!0;break;case"group":if(t.willBreak)return!0}return!1})}Ir.willBreak=zd;function Co(i){i.length>0&&(i[i.length-1].willBreak=!0)}function Jd(i){const t=[];mc(i,e=>{if(typeof e=="string")return!1;switch(e.type){case"breakParent":Co(t);break;case"group":t.push(e);break}return!1},e=>{if(typeof e=="string")return!1;if(e.type==="group"){const s=t.pop();s&&s.willBreak&&Co(t)}return!1})}Ir.propagateBreaks=Jd;var Nr={};(function(i){Object.defineProperty(i,"__esModule",{value:!0});var t;(function(r){r.StdOut="stdout",r.Replace="replace",r.Diff="diff"})(t=i.WriteMode||(i.WriteMode={})),i.defaultOptions={sourceText:"",lineWidth:120,indentCount:4,useTabs:!1,linebreakMultipleAssignments:!1,quotemark:"double",writeMode:t.StdOut};function e(r){return r==="single"?"'":'"'}i.getStringQuotemark=e;function s(r){return r==="single"?'"':"'"}i.getAlternativeStringQuotemark=s})(Nr);Object.defineProperty(pa,"__esModule",{value:!0});const Xd=da,V=gt,yc=Ir,hr=hs,An=Ye,wn=Nr;function gc(i,t,e){const s=[];return i.forEach(r=>{const n=[e(r)];An.isNextLineEmpty(t.sourceText,An.locEnd(r.getValue()))&&!Qd(i)&&n.push(V.hardline),s.push(V.concat(n))}),V.join(V.hardline,s)}function Dt(i,t,e,s){const r=i.call(n=>gc(n,t,e),s);return V.indent(V.concat([V.hardline,r]))}function Ft(i){return i.getValue().attachedComments?V.concat([hr.printDanglingStatementComments(i),hr.printDanglingComments(i)]):""}function Yd(i,t){const e=wn.getStringQuotemark(t),s=wn.getAlternativeStringQuotemark(t==="single"?"single":"double"),r=i.replace(/\\([\s\S])|(['"])/g,(n,a,o)=>a===s?a:o===e?"\\"+o:n);return e+r+e}function Zd(i,t){const e=i.getValue();if(e.type!=="StringLiteral")throw new Error("printStringLiteral: Expected StringLiteral, got "+e.type);if(e.raw.startsWith("[[")||e.raw.startsWith("[="))return e.raw;const s=e.raw.slice(1,-1);let r=t.quotemark;const n=wn.getStringQuotemark(r);return s.includes(n)&&(r=r==="single"?"double":"single"),Yd(s,r)}function Qd(i){const t=i.getParent(),e=i.getValue(),s=t.body;return s&&s[s.length-1]===e}function em(i,t,e){const s=i.getValue();if(!s)return"";const r=[],n=s;switch(n.type){case"Chunk":return r.push(i.call(p=>gc(p,t,e),"body")),r.push(hr.printDanglingComments(i,!0)),(n.body.length||n.attachedComments)&&r.push(V.hardline),V.concat(r);case"LabelStatement":return V.concat(["::",i.call(e,"label"),"::"]);case"GotoStatement":return V.concat(["goto ",i.call(e,"label")]);case"BreakStatement":return"break";case"ReturnStatement":return r.push("return"),n.arguments.length>0&&(r.push(" "),r.push(V.join(", ",i.map(e,"arguments")))),V.concat(r);case"WhileStatement":return r.push("while "),r.push(i.call(e,"condition")),r.push(" do"),r.push(Ft(i)),n.body.length&&r.push(Dt(i,t,e,"body")),r.push(V.concat([V.hardline,"end"])),V.concat(r);case"DoStatement":return r.push("do"),r.push(Ft(i)),n.body.length&&r.push(Dt(i,t,e,"body")),r.push(V.concat([V.hardline,"end"])),V.concat(r);case"RepeatStatement":return r.push("repeat"),r.push(Ft(i)),n.body.length&&r.push(Dt(i,t,e,"body")),r.push(V.concat([V.hardline,"until "])),r.push(i.call(e,"condition")),V.concat(r);case"LocalStatement":case"AssignmentStatement":{const p=[];n.type==="LocalStatement"&&p.push("local ");const m=t.linebreakMultipleAssignments;p.push(V.indent(V.join(V.concat([",",m?V.hardline:V.line]),i.map(e,"variables"))));let b="";const P=[];n.init.length&&(b=" =",n.init.length>1?P.push(V.indent(V.join(V.concat([",",V.line]),i.map(e,"init")))):P.push(V.join(V.concat([",",V.line]),i.map(e,"init"))));const A=n.init.some(U=>U!=null&&U.type!=="TableConstructorExpression"&&U.type!=="FunctionDeclaration");return V.group(V.concat([V.group(V.concat(p)),V.group(V.concat([b,A?V.indent(V.line):" ",V.concat(P)]))]))}case"CallStatement":return i.call(e,"expression");case"FunctionDeclaration":return n.isLocal&&r.push("local "),r.push("function"),n.identifier&&r.push(" ",i.call(e,"identifier")),r.push(V.concat(["(",V.group(V.indent(V.concat([V.softline,V.join(V.concat([",",V.line]),i.map(e,"parameters"))]))),")"])),r.push(Ft(i)),n.body.length&&r.push(Dt(i,t,e,"body")),r.push(V.hardline,"end"),V.concat(r);case"ForNumericStatement":return r.push("for "),r.push(i.call(e,"variable")),r.push(" = "),r.push(i.call(e,"start")),r.push(", "),r.push(i.call(e,"end")),n.step&&(r.push(", "),r.push(i.call(e,"step"))),r.push(" do"),r.push(Ft(i)),n.body.length&&r.push(Dt(i,t,e,"body")),r.push(V.concat([V.hardline,"end"])),V.concat(r);case"ForGenericStatement":return r.push("for "),r.push(V.join(", ",i.map(e,"variables"))),r.push(" in "),r.push(V.join(", ",i.map(e,"iterators"))),r.push(" do"),r.push(Ft(i)),n.body.length&&r.push(Dt(i,t,e,"body")),r.push(V.concat([V.hardline,"end"])),V.concat(r);case"IfStatement":const a=[];return i.forEach(p=>{a.push(e(p))},"clauses"),r.push(V.join(V.hardline,a)),r.push(V.concat([V.hardline,"end"])),V.concat(r);case"IfClause":return r.push(V.concat(["if ",V.group(V.concat([V.indent(V.concat([V.softline,i.call(e,"condition")])),V.softline]))," then"])),r.push(Ft(i)),n.body.length&&r.push(Dt(i,t,e,"body")),V.concat(r);case"ElseifClause":return r.push(V.concat(["elseif ",V.group(V.concat([V.indent(V.concat([V.softline,i.call(e,"condition")])),V.softline]))," then"])),r.push(Ft(i)),n.body.length&&r.push(Dt(i,t,e,"body")),V.concat(r);case"ElseClause":return r.push("else"),r.push(Ft(i)),n.body.length&&r.push(Dt(i,t,e,"body")),V.concat(r);case"BooleanLiteral":return n.raw;case"NilLiteral":return"nil";case"NumericLiteral":return n.raw;case"StringLiteral":return Zd(i,t);case"VarargLiteral":return"...";case"Identifier":return n.name;case"BinaryExpression":case"LogicalExpression":const l=i.getParent().type!==n.type&&n.left.type!==n.type&&n.right.type!==n.type,h=V.concat([n.operator,V.line,i.call(e,"right")]);return V.group(V.concat([i.call(e,"left"),V.indent(V.concat([" ",l?V.group(h):h]))]));case"UnaryExpression":return r.push(n.operator),n.operator==="not"&&r.push(" "),r.push(i.call(e,"argument")),V.concat(r);case"MemberExpression":return V.concat([i.call(e,"base"),n.indexer,i.call(e,"identifier")]);case"IndexExpression":return V.concat([i.call(e,"base"),"[",V.group(V.concat([V.indent(V.concat([V.softline,i.call(e,"index")])),V.softline])),"]"]);case"CallExpression":const u=i.map(e,"arguments");return V.concat([i.call(e,"base"),V.group(V.concat(["(",V.indent(V.concat([V.softline,V.join(V.concat([",",V.line]),u)])),V.softline,")"]),u.some(yc.willBreak))]);case"TableCallExpression":return r.push(i.call(e,"base")),r.push(" "),r.push(i.call(e,"arguments")),V.concat(r);case"StringCallExpression":return r.push(i.call(e,"base")),r.push(" "),r.push(i.call(e,"argument")),V.concat(r);case"TableConstructorExpression":if(n.fields.length===0)return"{}";const d=[];let c=[];i.forEach(p=>{d.push(V.concat(c)),d.push(V.group(e(p))),c=[",",V.line]},"fields");const f=An.hasNewLineInRange(t.sourceText,n.range[0],n.range[1]);return V.group(V.concat(["{",V.indent(V.concat([V.softline,V.concat(d)])),V.softline,"}"]),f);case"TableKeyString":return V.concat([i.call(e,"key")," = ",i.call(e,"value")]);case"TableKey":return V.concat(["[",i.call(e,"key"),"]"," = ",i.call(e,"value")]);case"TableValue":return i.call(e,"value")}throw new Error("Unhandled AST node: "+n.type)}function tm(i,t,e){const s=em(i,t,e),r=[],n=i.needsParens();return n&&r.push("("),r.push(s),n&&r.push(")"),V.concat(r)}function sm(i,t){const e=r=>hr.printComments(r,t,n=>tm(n,t,e)),s=e(new Xd.FastPath(i));return yc.propagateBreaks(s),s}pa.buildDocFromAst=sm;var ma={};Object.defineProperty(ma,"__esModule",{value:!0});var Kt;(function(i){i[i.Flat=0]="Flat",i[i.Break=1]="Break"})(Kt||(Kt={}));function im(i,t){const e={options:t,indentation:0,currentLineLength:0,mode:Kt.Break,lineSuffixes:[],renderedText:""};return ai(i,e),e.renderedText}ma.printDocToString=im;function er(i,t){function e(s){return t.currentLineLength+s.length<=t.options.lineWidth?(t.currentLineLength+=s.length,!0):!1}if(typeof i=="string")return e(i);switch(i.type){case"concat":return i.parts.every(s=>er(s,t));case"indent":return t.indentation++,er(i.content,t)?(t.indentation--,!0):(t.indentation--,!1);case"group":return i.willBreak&&(t.mode=Kt.Break),er(i.content,t);case"line":return t.mode===Kt.Flat&&!i.hard?i.soft?!0:e(" "):(t.currentLineLength=t.indentation,!0);case"lineSuffix":return!0}return!1}function ai(i,t){if(typeof i=="string")t.renderedText+=i,t.currentLineLength+=i.length;else switch(i.type){case"concat":for(const n of i.parts)ai(n,t);break;case"line":if(t.mode===Kt.Flat&&!i.hard){i.soft||(t.renderedText+=" ",t.currentLineLength+=1);break}if(t.lineSuffixes.length>0){const n=[...t.lineSuffixes];t.lineSuffixes.length=0;for(const a of n)ai(a.content,t)}t.renderedText.length>0&&(t.renderedText=t.renderedText.replace(/[^\S\n]*$/,""));const e=t.options.useTabs?" ".repeat(t.indentation):" ".repeat(t.indentation*t.options.indentCount);t.renderedText+=` +`+e,t.currentLineLength=e.length;break;case"indent":{t.indentation++,ai(i.content,t),t.indentation--;break}case"lineSuffix":t.lineSuffixes.push(i);break;case"group":const s=er(i,Object.assign({},t,{mode:Kt.Flat})),r=t.mode;!i.willBreak&&s?t.mode=Kt.Flat:t.mode=Kt.Break,ai(i.content,t),t.mode=r;break}}var Cn={exports:{}};(function(i,t){(function(e,s,r){var n=t&&!t.nodeType&&t,a=i&&!i.nodeType&&i,o=n&&a&&typeof Ut=="object"&&Ut,l=a&&a.exports===n&&n;o&&(o.global===o||o.window===o||o.self===o)&&(e=o),r(n&&a?l?a.exports:n:e[s]={})})(Ut,"luaparse",function(e){e.version="0.2.1";var s,r,n,a=e.defaultOptions={wait:!1,comments:!0,scope:!1,locations:!1,ranges:!1,onCreateNode:null,onCreateScope:null,onDestroyScope:null,onLocalDeclaration:null,luaVersion:"5.1"},o=1,l=2,h=4,u=8,d=16,c=32,f=64,p=128,m=256;e.tokenTypes={EOF:o,StringLiteral:l,Keyword:h,Identifier:u,NumericLiteral:d,Punctuator:c,BooleanLiteral:f,NilLiteral:p,VarargLiteral:m};var b=e.errors={unexpected:"unexpected %1 '%2' near '%3'",expected:"'%1' expected near '%2'",expectedToken:"%1 expected near '%2'",unfinishedString:"unfinished string near '%1'",malformedNumber:"malformed number near '%1'",invalidVar:"invalid left-hand side of assignment near '%1'",decimalEscapeTooLarge:"decimal escape too large near '%1'",invalidEscape:"invalid escape sequence near '%1'",hexadecimalDigitExpected:"hexadecimal digit expected near '%1'",braceExpected:"missing '%1' near '%2'",tooLargeCodepoint:"UTF-8 value too large near '%1'",unfinishedLongString:"unfinished long string (starting at line %1) near '%2'",unfinishedLongComment:"unfinished long comment (starting at line %1) near '%2'"},P=e.ast={labelStatement:function(y){return{type:"LabelStatement",label:y}},breakStatement:function(){return{type:"BreakStatement"}},gotoStatement:function(y){return{type:"GotoStatement",label:y}},returnStatement:function(y){return{type:"ReturnStatement",arguments:y}},ifStatement:function(y){return{type:"IfStatement",clauses:y}},ifClause:function(y,v){return{type:"IfClause",condition:y,body:v}},elseifClause:function(y,v){return{type:"ElseifClause",condition:y,body:v}},elseClause:function(y){return{type:"ElseClause",body:y}},whileStatement:function(y,v){return{type:"WhileStatement",condition:y,body:v}},doStatement:function(y){return{type:"DoStatement",body:y}},repeatStatement:function(y,v){return{type:"RepeatStatement",condition:y,body:v}},localStatement:function(y,v){return{type:"LocalStatement",variables:y,init:v}},assignmentStatement:function(y,v){return{type:"AssignmentStatement",variables:y,init:v}},callStatement:function(y){return{type:"CallStatement",expression:y}},functionStatement:function(y,v,j,ne){return{type:"FunctionDeclaration",identifier:y,isLocal:j,parameters:v,body:ne}},forNumericStatement:function(y,v,j,ne,Se){return{type:"ForNumericStatement",variable:y,start:v,end:j,step:ne,body:Se}},forGenericStatement:function(y,v,j){return{type:"ForGenericStatement",variables:y,iterators:v,body:j}},chunk:function(y){return{type:"Chunk",body:y}},identifier:function(y){return{type:"Identifier",name:y}},literal:function(y,v,j){return y=y===l?"StringLiteral":y===d?"NumericLiteral":y===f?"BooleanLiteral":y===p?"NilLiteral":"VarargLiteral",{type:y,value:v,raw:j}},tableKey:function(y,v){return{type:"TableKey",key:y,value:v}},tableKeyString:function(y,v){return{type:"TableKeyString",key:y,value:v}},tableValue:function(y){return{type:"TableValue",value:y}},tableConstructorExpression:function(y){return{type:"TableConstructorExpression",fields:y}},binaryExpression:function(y,v,j){var ne=y==="and"||y==="or"?"LogicalExpression":"BinaryExpression";return{type:ne,operator:y,left:v,right:j}},unaryExpression:function(y,v){return{type:"UnaryExpression",operator:y,argument:v}},memberExpression:function(y,v,j){return{type:"MemberExpression",indexer:v,identifier:j,base:y}},indexExpression:function(y,v){return{type:"IndexExpression",base:y,index:v}},callExpression:function(y,v){return{type:"CallExpression",base:y,arguments:v}},tableCallExpression:function(y,v){return{type:"TableCallExpression",base:y,arguments:v}},stringCallExpression:function(y,v){return{type:"StringCallExpression",base:y,argument:v}},comment:function(y,v){return{type:"Comment",value:y,raw:v}}};function A(y){if(qe){var v=Ve.pop();v.complete(),v.bless(y)}return r.onCreateNode&&r.onCreateNode(y),y}var U=Array.prototype.slice,O=function(v,j){for(var ne=0,Se=v.length;ne=n)return{type:o,value:"",line:x,lineStart:C,range:[T,T]};var y=s.charCodeAt(T),v=s.charCodeAt(T+1);if(L=T,G(y))return F();switch(y){case 39:case 34:return K();case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Z();case 46:return te(v)?Z():v===46?s.charCodeAt(T+2)===46?D():N(".."):N(".");case 61:return N(v===61?"==":"=");case 62:return r.luaVersion==="5.3"&&v===62?N(">>"):N(v===61?">=":">");case 60:return r.luaVersion==="5.3"&&v===60?N("<<"):N(v===61?"<=":"<");case 126:if(v===61)return N("~=");if(r.luaVersion==="5.1"||r.luaVersion==="5.2")break;return N("~");case 58:return(r.luaVersion==="5.2"||r.luaVersion==="5.3")&&v===58?N("::"):N(":");case 91:return v===91||v===61?Q():N("[");case 47:return r.luaVersion==="5.3"&&v===47?N("//"):N("/");case 38:case 124:if(r.luaVersion==="5.1"||r.luaVersion==="5.2")break;case 42:case 94:case 37:case 44:case 123:case 125:case 93:case 40:case 41:case 59:case 35:case 45:case 43:return N(s.charAt(T))}return ie(s.charAt(T))}function re(){var y=s.charCodeAt(T),v=s.charCodeAt(T+1);return H(y)?(y===10&&v===13&&++T,y===13&&v===10&&++T,++x,C=++T,!0):!1}function M(){for(;T=n||H(Ne))&&(Se+=s.slice(ne,T-1),g({},b.unfinishedString,Se+String.fromCharCode(Ne)));return Se+=s.slice(ne,T-1),{type:l,value:Se,line:v,lineStart:j,lastLine:x,lastLineStart:C,range:[L,T]}}function Q(){var y=x,v=C,j=I(!1);return j===!1&&g(k,b.expected,"[",k.value),{type:l,value:j,line:y,lineStart:v,lastLine:x,lastLineStart:C,range:[L,T]}}function Z(){var y=s.charAt(T),v=s.charAt(T+1),j=y==="0"&&"xX".indexOf(v||null)>=0?ce():pe();return{type:d,value:j,line:x,lineStart:C,range:[L,T]}}function ce(){var y=0,v=1,j=1,ne,Se,Ne,it;for(it=T+=2,X(s.charCodeAt(T))||g({},b.malformedNumber,s.slice(L,T));X(s.charCodeAt(T));)++T;if(ne=parseInt(s.slice(it,T),16),s.charAt(T)==="."){for(Se=++T;X(s.charCodeAt(T));)++T;y=s.slice(Se,T),y=Se===T?0:parseInt(y,16)/Math.pow(16,T-Se)}if("pP".indexOf(s.charAt(T)||null)>=0){for(++T,"+-".indexOf(s.charAt(T)||null)>=0&&(j=s.charAt(T++)==="+"?1:-1),Ne=T,te(s.charCodeAt(T))||g({},b.malformedNumber,s.slice(L,T));te(s.charCodeAt(T));)++T;v=s.slice(Ne,T),v=Math.pow(2,v*j)}return(ne+y)*v}function pe(){for(;te(s.charCodeAt(T));)++T;if(s.charAt(T)===".")for(++T;te(s.charCodeAt(T));)++T;if("eE".indexOf(s.charAt(T)||null)>=0)for(++T,"+-".indexOf(s.charAt(T)||null)>=0&&++T,te(s.charCodeAt(T))||g({},b.malformedNumber,s.slice(L,T));te(s.charCodeAt(T));)++T;return parseFloat(s.slice(L,T))}function ke(y){return y<128?String.fromCharCode(y):y<2048?String.fromCharCode(192|y>>6,128|y&63):y<65536?String.fromCharCode(224|y>>12,128|y>>6&63,128|y&63):y<1114112?String.fromCharCode(240|y>>18,128|y>>12&63,128|y>>6&63,128|y&63):null}function ve(){var y=T++;for(s.charAt(T++)!=="{"&&g({},b.braceExpected,"{","\\"+s.slice(y,T)),X(s.charCodeAt(T))||g({},b.hexadecimalDigitExpected,"\\"+s.slice(y,T));s.charCodeAt(T)===48;)++T;for(var v=T;X(s.charCodeAt(T));)++T,T-v>6&&g({},b.tooLargeCodepoint,"\\"+s.slice(y,T));var j=s.charAt(T++);j!=="}"&&(j==='"'||j==="'"?g({},b.braceExpected,"}","\\"+s.slice(y,T--)):g({},b.hexadecimalDigitExpected,"\\"+s.slice(y,T)));var ne=parseInt(s.slice(v,T-1),16);return ne=ke(ne),ne===null&&g({},b.tooLargeCodepoint,"\\"+s.slice(y,T)),ne}function Ie(){var y=T;switch(s.charAt(T)){case"a":return++T,"\x07";case"n":return++T,` +`;case"r":return++T,"\r";case"t":return++T," ";case"v":return++T,"\v";case"b":return++T,"\b";case"f":return++T,"\f";case"\r":case` +`:return re(),` +`;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;te(s.charCodeAt(T))&&T-y<3;)++T;var v=parseInt(s.slice(y,T),10);return v>255&&g({},b.decimalEscapeTooLarge,"\\"+v),String.fromCharCode(v);case"z":if(r.luaVersion==="5.2"||r.luaVersion==="5.3")return++T,M(),"";case"x":if(r.luaVersion==="5.2"||r.luaVersion==="5.3"){if(X(s.charCodeAt(T+1))&&X(s.charCodeAt(T+2)))return T+=3,String.fromCharCode(parseInt(s.slice(y+1,T),16));g({},b.hexadecimalDigitExpected,"\\"+s.slice(y,T+2))}case"u":if(r.luaVersion==="5.3")return ve();default:(r.luaVersion==="5.2"||r.luaVersion==="5.3")&&g({},b.invalidEscape,"\\"+s.slice(y,T+1));case"\\":case'"':case"'":return s.charAt(T++)}}function E(){L=T,T+=2;var y=s.charAt(T),v="",j=!1,ne=T,Se=C,Ne=x;if(y==="["&&(v=I(!0),v===!1?v=y:j=!0),!j){for(;T")}function _(){Y=k,k=z,z=R()}function B(y){return y===k.value?(_(),!0):!1}function $(y){y===k.value?_():g(k,b.expected,y,k.value)}function q(y){return y===9||y===32||y===11||y===12}function H(y){return y===10||y===13}function te(y){return y>=48&&y<=57}function X(y){return y>=48&&y<=57||y>=97&&y<=102||y>=65&&y<=70}function G(y){return y>=65&&y<=90||y>=97&&y<=122||y===95}function ye(y){return y>=65&&y<=90||y>=97&&y<=122||y===95||y>=48&&y<=57}function ae(y){switch(y.length){case 2:return y==="do"||y==="if"||y==="in"||y==="or";case 3:return y==="and"||y==="end"||y==="for"||y==="not";case 4:return y==="else"||y==="then"?!0:r.luaVersion==="5.2"||r.luaVersion==="5.3"?y==="goto":!1;case 5:return y==="break"||y==="local"||y==="until"||y==="while";case 6:return y==="elseif"||y==="repeat"||y==="return";case 8:return y==="function"}return!1}function de(y){return c===y.type?"#-~".indexOf(y.value)>=0:h===y.type?y.value==="not":!1}function Te(y){switch(y.type){case"CallExpression":case"TableCallExpression":case"StringCallExpression":return!0}return!1}function J(y){if(o===y.type)return!0;if(h!==y.type)return!1;switch(y.value){case"else":case"elseif":case"end":case"until":return!0;default:return!1}}var ee,le,xe;function Pe(){var y=Array.apply(null,ee[le++]);ee.push(y),r.onCreateScope&&r.onCreateScope()}function _e(){ee.pop(),le--,r.onDestroyScope&&r.onDestroyScope()}function Ke(y){r.onLocalDeclaration&&r.onLocalDeclaration(y),O(ee[le],y)===-1&&ee[le].push(y)}function ht(y){Ke(y.name),fs(y,!0)}function fs(y,v){!v&&S(xe,"name",y.name)===-1&&xe.push(y),y.isLocal=v}function Ze(y){return O(ee[le],y)!==-1}var Ve=[],qe;function Yt(){return new Mi(k)}function Mi(y){r.locations&&(this.loc={start:{line:y.line,column:y.range[0]-y.lineStart},end:{line:0,column:0}}),r.ranges&&(this.range=[y.range[0],0])}Mi.prototype.complete=function(){r.locations&&(this.loc.end.line=Y.lastLine||Y.line,this.loc.end.column=Y.range[1]-(Y.lastLineStart||Y.lineStart)),r.ranges&&(this.range[1]=Y.range[1])},Mi.prototype.bless=function(y){if(this.loc){var v=this.loc;y.loc={start:{line:v.start.line,column:v.start.column},end:{line:v.end.line,column:v.end.column}}}this.range&&(y.range=[this.range[0],this.range[1]])};function ks(){qe&&Ve.push(Yt())}function ct(y){qe&&Ve.push(y)}function Wc(){_(),ks(),r.scope&&Pe();var y=wt();return r.scope&&_e(),o!==k.type&&ie(k),qe&&!y.length&&(Y=k),A(P.chunk(y))}function wt(y){for(var v=[],j;!J(k);){if(k.value==="return"){v.push(xa());break}j=xa(),B(";"),j&&v.push(j)}return v}function xa(){if(ks(),h===k.type)switch(k.value){case"local":return _(),tu();case"if":return _(),Qc();case"return":return _(),Zc();case"function":_();var y=iu();return Mr(y);case"while":return _(),Xc();case"for":return _(),eu();case"repeat":return _(),Yc();case"break":return _(),qc();case"do":return _(),Jc();case"goto":return _(),zc()}if(c===k.type&&B("::"))return Kc();if(qe&&Ve.pop(),!((r.luaVersion==="5.2"||r.luaVersion==="5.3")&&B(";")))return su()}function Kc(){var y=k.value,v=ut();return r.scope&&(Ke("::"+y+"::"),fs(v,!0)),$("::"),A(P.labelStatement(v))}function qc(){return A(P.breakStatement())}function zc(){k.value;var y=ut();return A(P.gotoStatement(y))}function Jc(){r.scope&&Pe();var y=wt();return r.scope&&_e(),$("end"),A(P.doStatement(y))}function Xc(){var y=ze();$("do"),r.scope&&Pe();var v=wt();return r.scope&&_e(),$("end"),A(P.whileStatement(y,v))}function Yc(){r.scope&&Pe();var y=wt();$("until");var v=ze();return r.scope&&_e(),A(P.repeatStatement(v,y))}function Zc(){var y=[];if(k.value!=="end"){var v=Oi();for(v!=null&&y.push(v);B(",");)v=ze(),y.push(v);B(";")}return A(P.returnStatement(y))}function Qc(){var y=[],v,j,ne;for(qe&&(ne=Ve[Ve.length-1],Ve.push(ne)),v=ze(),$("then"),r.scope&&Pe(),j=wt(),r.scope&&_e(),y.push(A(P.ifClause(v,j))),qe&&(ne=Yt());B("elseif");)ct(ne),v=ze(),$("then"),r.scope&&Pe(),j=wt(),r.scope&&_e(),y.push(A(P.elseifClause(v,j))),qe&&(ne=Yt());return B("else")&&(qe&&(ne=new Mi(Y),Ve.push(ne)),r.scope&&Pe(),j=wt(),r.scope&&_e(),y.push(A(P.elseClause(j)))),$("end"),A(P.ifStatement(y))}function eu(){var y=ut(),v;if(r.scope&&(Pe(),ht(y)),B("=")){var j=ze();$(",");var ne=ze(),Se=B(",")?ze():null;return $("do"),v=wt(),$("end"),r.scope&&_e(),A(P.forNumericStatement(y,j,ne,Se,v))}else{for(var Ne=[y];B(",");)y=ut(),r.scope&&ht(y),Ne.push(y);$("in");var it=[];do{var Ws=ze();it.push(Ws)}while(B(","));return $("do"),v=wt(),$("end"),r.scope&&_e(),A(P.forGenericStatement(Ne,it,v))}}function tu(){var y;if(u===k.type){var v=[],j=[];do y=ut(),v.push(y);while(B(","));if(B("="))do{var ne=ze();j.push(ne)}while(B(","));if(r.scope)for(var Se=0,Ne=v.length;Se",k)}function Sa(y){(y.inParens||["Identifier","MemberExpression","IndexExpression"].indexOf(y.type)===-1)&&g(k,b.invalidVar,k.value)}function su(){var y=k,v,j;if(qe&&(j=Yt()),v=Dr(),v==null)return ie(k);if(",=".indexOf(k.value)>=0){var ne=[v],Se=[],Ne;for(Sa(v);B(",");)Ne=Dr(),Ne==null&&se("",k),Sa(Ne),ne.push(Ne);$("=");do Ne=ze(),Se.push(Ne);while(B(","));return ct(j),A(P.assignmentStatement(ne,Se))}return Te(v)?(ct(j),A(P.callStatement(v))):ie(y)}function ut(){ks();var y=k.value;return u!==k.type&&se("",k),_(),A(P.identifier(y))}function Mr(y,v){var j=[];if($("("),!B(")"))for(;;)if(u===k.type){var ne=ut();if(r.scope&&ht(ne),j.push(ne),B(","))continue;if(B(")"))break}else if(m===k.type){j.push(Br()),$(")");break}else se(" or '...'",k);var Se=wt();return $("end"),r.scope&&_e(),v=v||!1,A(P.functionStatement(y,j,v,Se))}function iu(){var y,v,j;for(qe&&(j=Yt()),y=ut(),r.scope&&(fs(y,Ze(y.name)),Pe());B(".");)ct(j),v=ut(),y=A(P.memberExpression(y,".",v));return B(":")&&(ct(j),v=ut(),y=A(P.memberExpression(y,":",v)),r.scope&&Ke("self")),y}function Pa(){for(var y=[],v,j;;){if(ks(),c===k.type&&B("["))v=ze(),$("]"),$("="),j=ze(),y.push(A(P.tableKey(v,j)));else if(u===k.type)z.value==="="?(v=ut(),_(),j=ze(),y.push(A(P.tableKeyString(v,j)))):(j=ze(),y.push(A(P.tableValue(j))));else{if((j=Oi())==null){Ve.pop();break}y.push(A(P.tableValue(j)))}if(",;".indexOf(k.value)>=0){_();continue}break}return $("}"),A(P.tableConstructorExpression(y))}function Oi(){var y=Or(0);return y}function ze(){var y=Oi();if(y==null)se("",k);else return y}function ru(y){var v=y.charCodeAt(0),j=y.length;if(j===1)switch(v){case 94:return 12;case 42:case 47:case 37:return 10;case 43:case 45:return 9;case 38:return 6;case 126:return 5;case 124:return 4;case 60:case 62:return 3}else if(j===2)switch(v){case 47:return 10;case 46:return 8;case 60:case 62:return y==="<<"||y===">>"?7:3;case 61:case 126:return 3;case 111:return 1}else if(v===97&&y==="and")return 2;return 0}function Or(y){var v=k.value,j,ne;if(qe&&(ne=Yt()),de(k)){ks(),_();var Se=Or(10);Se==null&&se("",k),j=A(P.unaryExpression(v,Se))}if(j==null&&(j=Br(),j==null&&(j=Dr())),j==null)return null;for(var Ne;v=k.value,Ne=c===k.type||h===k.type?ru(v):0,!(Ne===0||Ne<=y);){(v==="^"||v==="..")&&Ne--,_();var it=Or(Ne);it==null&&se("",k),qe&&Ve.push(ne),j=A(P.binaryExpression(v,j,it))}return j}function Dr(){var y,v,j;if(qe&&(j=Yt()),u===k.type)v=k.value,y=ut(),r.scope&&fs(y,Ze(v));else if(B("("))y=ze(),$(")"),y.inParens=!0;else return null;for(var ne,Se;;)if(c===k.type)switch(k.value){case"[":ct(j),_(),ne=ze(),$("]"),y=A(P.indexExpression(y,ne));break;case".":ct(j),_(),Se=ut(),y=A(P.memberExpression(y,".",Se));break;case":":ct(j),_(),Se=ut(),y=A(P.memberExpression(y,":",Se)),ct(j),y=Fr(y);break;case"(":case"{":ct(j),y=Fr(y);break;default:return y}else if(l===k.type)ct(j),y=Fr(y);else break;return y}function Fr(y){if(c===k.type)switch(k.value){case"(":_();var v=[],j=Oi();for(j!=null&&v.push(j);B(",");)j=ze(),v.push(j);return $(")"),A(P.callExpression(y,v));case"{":ks(),_();var ne=Pa();return A(P.tableCallExpression(y,ne))}else if(l===k.type)return A(P.stringCallExpression(y,Br()));se("function arguments",k)}function Br(){var y=l|d|f|p|m,v=k.value,j=k.type,ne;if(qe&&(ne=Yt()),j&y){ct(ne);var Se=s.slice(k.range[0],k.range[1]);return _(),A(P.literal(j,v,Se))}else{if(h===j&&v==="function")return ct(ne),_(),r.scope&&Pe(),Mr(null);if(B("{"))return ct(ne),Pa()}}e.parse=nu;function nu(y,v){if(typeof v=="undefined"&&typeof y=="object"&&(v=y,y=void 0),v||(v={}),s=y||"",r=fe(a,v),T=0,x=1,C=0,n=s.length,ee=[[]],le=0,xe=[],Ve=[],!(r.luaVersion==="5.1"||r.luaVersion==="5.2"||r.luaVersion==="5.3"))throw new Error(W("Lua version '%1' not supported",r.luaVersion));return r.comments&&(ue=[]),r.wait?e:Aa()}e.write=Ea;function Ea(y){return s+=String(y),n=s.length,e}e.end=Aa;function Aa(y){typeof y!="undefined"&&Ea(y),s&&s.substr(0,2)==="#!"&&(s=s.replace(/^.*/,function(j){return j.replace(/./g," ")})),n=s.length,qe=r.locations||r.ranges,z=R();var v=Wc();if(r.comments&&(v.comments=ue),r.scope&&(v.globals=xe),Ve.length>0)throw new Error("Location tracking failed. This is most likely a bug in luaparse");return v}})})(Cn,Cn.exports);var Tc={exports:{}};/*! + + diff v3.5.0 + +Software License Agreement (BSD License) + +Copyright (c) 2009-2015, Kevin Decker + +All rights reserved. + +Redistribution and use of this software in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above + copyright notice, this list of conditions and the + following disclaimer. + +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + +* Neither the name of Kevin Decker nor the names of its + contributors may be used to endorse or promote products + derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +@license +*/(function(i,t){(function(s,r){i.exports=r()})(Ut,function(){return function(e){var s={};function r(n){if(s[n])return s[n].exports;var a=s[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}return r.m=e,r.c=s,r.p="",r(0)}([function(e,s,r){s.__esModule=!0,s.canonicalize=s.convertChangesToXML=s.convertChangesToDMP=s.merge=s.parsePatch=s.applyPatches=s.applyPatch=s.createPatch=s.createTwoFilesPatch=s.structuredPatch=s.diffArrays=s.diffJson=s.diffCss=s.diffSentences=s.diffTrimmedLines=s.diffLines=s.diffWordsWithSpace=s.diffWords=s.diffChars=s.Diff=void 0;var n=r(1),a=O(n),o=r(2),l=r(3),h=r(5),u=r(6),d=r(7),c=r(8),f=r(9),p=r(10),m=r(11),b=r(13),P=r(14),A=r(16),U=r(17);function O(S){return S&&S.__esModule?S:{default:S}}s.Diff=a.default,s.diffChars=o.diffChars,s.diffWords=l.diffWords,s.diffWordsWithSpace=l.diffWordsWithSpace,s.diffLines=h.diffLines,s.diffTrimmedLines=h.diffTrimmedLines,s.diffSentences=u.diffSentences,s.diffCss=d.diffCss,s.diffJson=c.diffJson,s.diffArrays=f.diffArrays,s.structuredPatch=P.structuredPatch,s.createTwoFilesPatch=P.createTwoFilesPatch,s.createPatch=P.createPatch,s.applyPatch=p.applyPatch,s.applyPatches=p.applyPatches,s.parsePatch=m.parsePatch,s.merge=b.merge,s.convertChangesToDMP=A.convertChangesToDMP,s.convertChangesToXML=U.convertChangesToXML,s.canonicalize=c.canonicalize},function(e,s){s.__esModule=!0,s.default=r;function r(){}r.prototype={diff:function(l,h){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d=u.callback;typeof u=="function"&&(d=u,u={}),this.options=u;var c=this;function f(W){return d?(setTimeout(function(){d(void 0,W)},0),!0):W}l=this.castInput(l),h=this.castInput(h),l=this.removeEmpty(this.tokenize(l)),h=this.removeEmpty(this.tokenize(h));var p=h.length,m=l.length,b=1,P=p+m,A=[{newPos:-1,components:[]}],U=this.extractCommon(A[0],h,l,0);if(A[0].newPos+1>=p&&U+1>=m)return f([{value:this.join(h),count:h.length}]);function O(){for(var W=-1*b;W<=b;W+=2){var fe=void 0,g=A[W-1],se=A[W+1],ie=(se?se.newPos:0)-W;g&&(A[W-1]=void 0);var T=g&&g.newPos+1=p&&ie+1>=m)return f(n(c,fe.components,h,l,c.useLongestToken));A[W]=fe}b++}if(d)(function W(){setTimeout(function(){if(b>P)return d();O()||W()},0)})();else for(;b<=P;){var S=O();if(S)return S}},pushComponent:function(l,h,u){var d=l[l.length-1];d&&d.added===h&&d.removed===u?l[l.length-1]={count:d.count+1,added:h,removed:u}:l.push({count:1,added:h,removed:u})},extractCommon:function(l,h,u,d){for(var c=h.length,f=u.length,p=l.newPos,m=p-d,b=0;p+1O.length?W:O}),b.value=o.join(P)}else b.value=o.join(h.slice(p,p+b.count));p+=b.count,b.added||(m+=b.count)}}var U=l[f-1];return f>1&&typeof U.value=="string"&&(U.added||U.removed)&&o.equals("",U.value)&&(l[f-2].value+=U.value,l.pop()),l}function a(o){return{newPos:o.newPos,components:o.components.slice(0)}}},function(e,s,r){s.__esModule=!0,s.characterDiff=void 0,s.diffChars=h;var n=r(1),a=o(n);function o(u){return u&&u.__esModule?u:{default:u}}var l=s.characterDiff=new a.default;function h(u,d,c){return l.diff(u,d,c)}},function(e,s,r){s.__esModule=!0,s.wordDiff=void 0,s.diffWords=c,s.diffWordsWithSpace=f;var n=r(1),a=l(n),o=r(4);function l(p){return p&&p.__esModule?p:{default:p}}var h=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,u=/\S/,d=s.wordDiff=new a.default;d.equals=function(p,m){return this.options.ignoreCase&&(p=p.toLowerCase(),m=m.toLowerCase()),p===m||this.options.ignoreWhitespace&&!u.test(p)&&!u.test(m)},d.tokenize=function(p){for(var m=p.split(/(\s+|\b)/),b=0;b2&&arguments[2]!==void 0?arguments[2]:{};if(typeof c=="string"&&(c=(0,n.parsePatch)(c)),Array.isArray(c)){if(c.length>1)throw new Error("applyPatch only works with a single input.");c=c[0]}var p=d.split(/\r\n|[\n\v\f\r\x85]/),m=d.match(/\r\n|[\n\v\f\r\x85]/g)||[],b=c.hunks,P=f.compareLine||function(Q,Z,ce,pe){return Z===pe},A=0,U=f.fuzzFactor||0,O=0,S=0,W=void 0,fe=void 0;function g(Q,Z){for(var ce=0;ce0?pe[0]:" ",ve=pe.length>0?pe.substr(1):pe;if(ke===" "||ke==="-"){if(!P(Z+1,p[Z],ke,ve)&&(A++,A>U))return!1;Z++}}return!0}for(var se=0;se0?re[0]:" ",F=re.length>0?re.substr(1):re,N=x.linedelimiters[R];if(M===" ")C++;else if(M==="-")p.splice(C,1),m.splice(C,1);else if(M==="+")p.splice(C,0,F),m.splice(C,0,N),C++;else if(M==="\\"){var D=x.lines[R-1]?x.lines[R-1][0]:null;D==="+"?W=!0:D==="-"&&(fe=!0)}}}if(W)for(;!p[p.length-1];)p.pop(),m.pop();else fe&&(p.push(""),m.push(` +`));for(var K=0;K1&&arguments[1]!==void 0?arguments[1]:{},o=n.split(/\r\n|[\n\v\f\r\x85]/),l=n.match(/\r\n|[\n\v\f\r\x85]/g)||[],h=[],u=0;function d(){var p={};for(h.push(p);u0?A(L.lines.slice(-b.context)):[],O-=W.length,S-=W.length)}(ue=W).push.apply(ue,a(z.map(function(N){return(Y.added?"+":"-")+N}))),Y.added?g+=z.length:fe+=z.length}else{if(O)if(z.length<=b.context*2&&k=P.length-2&&z.length<=b.context){var M=/\n$/.test(c),F=/\n$/.test(f);z.length==0&&!M?W.splice(re.oldLines,0,"\\ No newline at end of file"):(!M||!F)&&W.push("\\ No newline at end of file")}U.push(re),O=0,S=0,W=[]}fe+=z.length,g+=z.length}},ie=0;iea.length)return!1;for(var l=0;l"):h.removed&&o.push(""),o.push(n(h.value)),h.added?o.push(""):h.removed&&o.push("")}return o.join("")}function n(a){var o=a;return o=o.replace(/&/g,"&"),o=o.replace(//g,">"),o=o.replace(/"/g,"""),o}}])})})(Tc);Object.defineProperty(_i,"__esModule",{value:!0});const ko=hs,rm=pa,nm=ma,am=Nr,om=Cn.exports,lm=Tc.exports;var bc=Nr;_i.defaultOptions=bc.defaultOptions;_i.WriteMode=bc.WriteMode;function cm(i,t){const e=om.parse(i,{comments:!0,locations:!0,ranges:!0,luaVersion:"5.3"});e.range[0]=0,e.range[1]=i.length;const s=Object.assign({},am.defaultOptions,t),r=Object.assign({},s,{sourceText:i});ko.injectShebang(e,r),ko.attachComments(e,r);const n=rm.buildDocFromAst(e,r);return nm.printDocToString(n,r)}_i.formatText=cm;function um(i,t,e){return lm.createPatch(i,t,e,"original","formatted")}_i.producePatch=um;function hm(i){for(var t=0,e=i.length;e--;)t+=i.charCodeAt(e),t+=t<<10,t^=t>>6;return t+=t<<3,t^=t>>11,t+=t<<15,t}const Ms=console.log,lt=function(i,t){if(!i)throw t};function Tt(i,t){if(!i)return 0;var e=i.toString().split(".");return e.length>1?parseInt(e[0],t)+parseInt(e[1],t)/Math.pow(t,e[1].length):parseInt(e[0],t)}const xc=[" ",` +`," ","\r"],fm={r:"\r",n:` +`,t:" ",'"':'"',"'":"'","\\":"\\"},vo=new Proxy(fm,{get(i,t){return Tt(t)}}),pm=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","_","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],kn=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","_","a","b","c","d","e","f","g","t","u","v","w","h","i","j","k","l","m","n","o","p","q","r","s","x","y","z"],Qs=["0","1","2","3","4","5","6","7","8","9"],dm=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","A","B","C","D","E","F"],mm=["0","1"],ym=["+","-","*",")",";","/","^","%","#",",","{","}",":","[","]","(",".","`"],gm=["~","=",">","<"],Tm=["+","-","*","/","^","..","%","//"],bm=["+=","-=","*=","/=","^=","..=","%=","//="],Sc=["and","break","do","else","elseif","end","false","for","function","goto","if","in","local","nil","not","or","repeat","return","then","true","until","while","continue"],xm=["else","elseif","until","end"],Sm=["-","not","#","~"],Pc=["+","-","*","/","%","^","#","//","&","|","~","<<",">>","..",".",":",">","<","<=",">=","~=","==","+=","-=","*=","/=","%=","^=","..=","//=","and","or"],Pm=11,rn={"^":[13,12],"%":[10,10],"//":[10,10],"/":[10,10],"*":[10,10],"+":[9,9],"-":[9,9],"..":[8,7],">>":[7,7],"<<":[7,7],"&":[6,6],"~":[5,5],"|":[4,4],"==":[3,3],"~=":[3,3],">=":[3,3],"<=":[3,3],">":[3,3],"<":[3,3],"+=":[3,3],"-=":[3,3],"*=":[3,3],"/=":[3,3],"^=":[3,3],"%=":[3,3],"..=":[3,3],"//=":[3,3],and:[2,2],or:[1,1]};function Em(i){let t=0;const e=i.length,s=[];function r(c){return c=c||0,t<=e?i.substr(t+c,1):""}function n(){if(t<=e){const c=i.substr(t,1);return t++,c}else return""}function a(c){let p=1,m=1;for(;0<=t;)i.substr(0,1)==` +`?(p++,m=1):m++;let b;for(b=0;b`)}throw`file<${p}:${m}>: ${c}`}function o(c){for(;;){const f=n();if(f=="")a("Unfinished long string.");else if(f=="]"){let p=!0,m;for(m=1;m<=c;m++)if(r()=="=")t++;else{p=!1;break}if(p&&n()=="]")return}}}function l(){const c=t;for(;r()=="=";)t++;if(r()=="[")return t++,t-c-1;t=c}let h=0,u=0;function d(c){let f=i.substr(u,t-u),p=null;c=="Number"&&(f.substr(0,2).toLowerCase()=="0x"?(p="hex",parseInt(f,16)<999999999999&&(f=parseInt(f,16))):f.substr(0,2).toLowerCase()=="0b"&&(p="bin",parseInt(f.substr(2),2)<999999999999&&(f=parseInt(f.substr(2),2))));const m={Type:c,LeadingWhite:i.substr(h,u-h),Source:f};return p!==null&&(m.NType=p),s.push(m),h=t,u=t,m}for(;;){for(h=t;;){const f=r();if(f=="")break;if(f=="-")if(r(1)=="-")if(t+=2,r()=="["){t++;const p=l();if(p!=null)o(p),h=t;else for(;;){const m=n();if(m==""||m==` +`)break}}else for(;;){const p=n();if(p==""||p==` +`)break}else break;else if(xc.includes(f))t++;else break}i.substr(h,t-h),u=t;const c=n();if(c==""){d("Eof");break}else if(c=="'"||c=='"'){for(;;){const f=n();if(f=="\\"){const p=n();if(vo[p]==null)throw`Invalid Escape Sequence \`${p}\`.`}else{if(f==c)break;if(f=="")throw"Unfinished string!"}}d("String")}else if(c=="`"){for(;;){const f=n();if(f=="\\"){const p=n();if(vo[p]==null)throw`Invalid Escape Sequence \`${p}\`.`}else{if(f==c)break;if(f=="")throw"Unfinished string!"}}d("Hash")}else if(pm.includes(c)){for(;kn.includes(r());)t++;Sc.includes(i.substr(u,t-u))?d("Keyword"):d("Ident")}else if(Qs.includes(c)||c=="."&&Qs.includes(r())){if(c=="0"&&r().toLowerCase()=="x")for(t++;dm.includes(r())||r()==="_";)t++;else if(c=="0"&&r().toLowerCase()=="b")for(t++;mm.includes(r())||r()==="_";)t++;else{for(;Qs.includes(r())||r()==="_";)t++;if(r()==".")for(t++;Qs.includes(r());)t++;if(r()=="e"||r()=="E")for(t++,(r()=="-"||r()=="+")&&t++;Qs.includes(r());)t++}d("Number")}else if(c=="["){const f=l();f!=null?(o(f),d("String")):d("Symbol")}else if(c==".")r()=="."&&(n(),(r()=="."||r()=="=")&&n()),d("Symbol");else if(c+r()=="//")n(),r()=="="&&n(),d("Symbol");else if(c+r()=="::")n(),d("Symbol");else if(Pc.includes(c+r()))n(),d("Symbol");else if(gm.includes(c))r()=="="&&t++,d("Symbol");else if(Tm.includes(c)&&r()=="=")n(),d("Symbol");else if(ym.includes(c))d("Symbol");else throw`Bad symbol \`${c}\` in source. ${t}`}return s}function Ec(i){const t=Em(i);let e=0;function s(){const M=t[e];return e at: ${n(M)}`}function o(){const M=r();return M.Type=="Eof"||M.Type=="Keyword"&&xm.includes(M.Source)}function l(){return Sm.includes(r().Source)||!1}function h(){return Pc.includes(r().Source)||!1}function u(M,F){const N=r();if(N.Type==M&&(F==null||N.Source==F))return s();{let D;for(D=-3;D<=3;D++)Ms(`Tokens[${D}] = \`${r(D).Source}\``);throw F?`${n(N)}: \`${F}\` expected.`:`${n(N)}: ${M} expected.`}}function d(M){const F=M.GetFirstToken,N=M.GetLastToken,D=M;return M.GetFirstToken=function(){const K=F(D);return lt(K),K},M.GetLastToken=function(){const K=N(D);return lt(K),K},M}let c,f;function p(M,F){const N=[f(M,F)],D=[];for(;r().Source==",";)D.push(s()),N.push(f(M,F));return[N,D]}function m(M,F){var D,K,Q,Z;const N=r();if(N.Source=="("){const ce=s(),pe=f(M,F),ke=u("Symbol",")");let ve;return ve=d({Type:"ParenExpr",Expression:pe,Token_OpenParen:ce,Token_CloseParen:ke,GetFirstToken:()=>ve.Token_OpenParen,GetLastToken:()=>ve.Token_CloseParen}),ve}else if(N.Type=="Ident"){let ce;return ce=d({Type:"VariableExpr",Token:s(),GetFirstToken:()=>ce.Token,GetLastToken:()=>ce.Token}),M[ce.Token.Source]!=null&&((K=(D=M[ce.Token.Source])==null?void 0:D.Tokens)==null?void 0:K.push)!=null?(M[ce.Token.Source].Tokens.push(ce.Token),M[ce.Token.Source].UseCountIncrease()):F[ce.Token.Source]!=null&&((Z=(Q=F[ce.Token.Source])==null?void 0:Q.Tokens)==null?void 0:Z.push)!=null&&(F[ce.Token.Source].Tokens.push(ce.Token),F[ce.Token.Source].UseCountIncrease()),ce}else throw Ms(a()),`${n(N)}: Unexpected symbol. ${N.Type} ${N.Source}`}function b(M,F){const N=u("Symbol","{"),D=[],K=[];for(;r().Source!="}";){if(r().Source=="["){const ce=s(),pe=f(M,F),ke=u("Symbol","]"),ve=u("Symbol","="),Ie=f(M,F);pe.Token&&pe.Token.Source,D.push({EntryType:"Index",Index:pe,Value:Ie,Token_OpenBracket:ce,Token_CloseBracket:ke,Token_Equals:ve})}else if(r().Type=="Ident"&&r(1).Source=="="){const ce=s(),pe=s(),ke=f(M,F);D.push({EntryType:"Field",Field:ce,Value:ke,Token_Equals:pe})}else{const ce=f(M,F);D.push({EntryType:"Value",Value:ce})}if(r().Source==","||r().Source==";")K.push(s());else break}const Q=u("Symbol","}");let Z;return Z=d({Type:"TableLiteral",EntryList:D,Token_SeperatorList:K,Token_OpenBrace:N,Token_CloseBrace:Q,GetFirstToken:()=>Z.Token_OpenBrace,GetLastToken:()=>Z.Token_CloseBrace}),Z}function P(M,F){const N=[],D=[];if(r().Type=="Ident"){const K=s();if(F&&r().Source=="<"&&r(2).Source==">"){const Q=r(1).Source;K.Attribute={LeadingWhite:r().LeadingWhite,Source:`<${Q}>`},s(),s(),s()}N.push(K)}else if(r().Source=="..."&&M)return[N,D,s()];for(;r().Source==",";){if(D.push(s()),r().Source=="..."&&M)return[N,D,s()];{const K=u("Ident");if(F&&r().Source=="<"&&r(2).Source==">"){const Q=r(1).Source;K.Attribute={LeadingWhite:r().LeadingWhite,Source:`<${Q}>`},s(),s(),s()}N.push(K)}}return[N,D]}function A(M,F,N){const D=c(F,N),K=r();if(K.Type=="Keyword"&&K.Source==M)return s(),[D,K];throw Ms(K.Type,K.Source),`${n(K)}: ${M} expected.`}function U(M,F,N,D){const K=s();let Q,Z;if(!M){Q=[],Z=[];const B=u("Ident");for(Q.push(B);r().Source==".";)Z.push(s()),Q.push(u("Ident"));r().Source==":"&&(Z.push(s()),Q.push(u("Ident")))}const ce=u("Symbol","("),[pe,ke,ve]=P(!0),Ie=u("Symbol",")"),[E,I]=A("end",F,N);let _;return _=d({Type:M==!0?"FunctionLiteral":"FunctionStat",NameChain:Q,ArgList:pe,Body:E,Token_Function:K,Token_NameChainSeperator:Z,Token_OpenParen:ce,Token_Varg:ve,Token_ArgCommaList:ke,Token_CloseParen:Ie,Token_End:I,GetFirstToken:()=>_.Token_Function,GetLastToken:()=>_.Token_End}),_}function O(M,F){const N=r();if(N.Source=="("){const D=s(),K=[],Q=[];for(;r().Source!=")"&&(K.push(f(M,F)),r().Source==",");)Q.push(s());const Z=u("Symbol",")");let ce;return ce=d({CallType:"ArgCall",ArgList:K,Token_CommaList:Q,Token_OpenParen:D,Token_CloseParen:Z,GetFirstToken:()=>ce.Token_OpenParen,GetLastToken:()=>ce.Token_CloseParen}),ce}else if(N.Source=="{"){let D;return D=d({CallType:"TableCall",TableExpr:f(M,F),GetFirstToken:()=>D.TableExpr.GetFirstToken(),GetLastToken:()=>D.TableExpr.GetLastToken()}),D}else if(N.Type=="String"){let D;return D=d({CallType:"StringCall",Token:s(),GetFirstToken:()=>D.Token,GetLastToken:()=>D.Token}),D}else throw"Function arguments expected."}function S(M,F){let N=m(M,F);for(lt(N,"nil prefixexpr");;){const D=r();if(D.Source=="."){const K=s(),Q=u("Ident");let Z;Z=d({Type:"FieldExpr",Base:N,Field:Q,Token_Dot:K,GetFirstToken:()=>Z.Base.GetFirstToken(),GetLastToken:()=>Z.Field}),N=Z}else if(D.Source==":"){const K=s(),Q=u("Ident"),Z=O(M,F);let ce;ce=d({Type:"MethodExpr",Base:N,Method:Q,FunctionArguments:Z,Token_Colon:K,GetFirstToken:()=>ce.Base.GetFirstToken(),GetLastToken:()=>ce.FunctionArguments.GetLastToken()}),N=ce}else if(D.Source=="["){const K=s(),Q=f(M,F),Z=u("Symbol","]");let ce;ce=d({Type:"IndexExpr",Base:N,Index:Q,Token_OpenBracket:K,Token_CloseBracket:Z,GetFirstToken:()=>ce.Base.GetFirstToken(),GetLastToken:()=>ce.Token_CloseBracket}),N=ce}else if(D.Source=="{"||D.Source=="("||D.Type=="String"){let K;K=d({Type:"CallExpr",Base:N,FunctionArguments:O(M,F),GetFirstToken:()=>K.Base.GetFirstToken(),GetLastToken:()=>K.FunctionArguments.GetLastToken()}),N=K}else if(bm.includes(D.Source)){const K=s(),Q=f(M,F);let Z;Z=d({Type:"CompoundStat",Base:N,Token_Compound:K,Rhs:Q,Lhs:N,GetFirstToken:()=>Z.Base.GetFirstToken(),GetLastToken:()=>Z.Rhs.GetLastToken()}),N=Z}else return N}}function W(M,F){const N=r();if(N.Type=="Number"){let D;return D=d({Type:"NumberLiteral",Token:s(),GetFirstToken:()=>D.Token,GetLastToken:()=>D.Token}),D}else if(N.Type=="String"){let D;return D=d({Type:"StringLiteral",Token:s(),GetFirstToken:()=>D.Token,GetLastToken:()=>D.Token}),D}else if(N.Type=="Hash"){let D;return D=d({Type:"HashLiteral",Token:s(),GetFirstToken:()=>D.Token,GetLastToken:()=>D.Token}),D}else if(N.Source=="nil"){let D;return D=d({Type:"NilLiteral",Token:s(),GetFirstToken:()=>D.Token,GetLastToken:()=>D.Token}),D}else if(N.Source=="true"||N.Source=="false"){let D;return D=d({Type:"BooleanLiteral",Token:s(),GetFirstToken:()=>D.Token,GetLastToken:()=>D.Token}),D}else if(N.Source=="..."){let D;return D=d({Type:"VargLiteral",Token:s(),GetFirstToken:()=>D.Token,GetLastToken:()=>D.Token}),D}else return N.Source=="{"?b(M,F):N.Source=="function"?U(!0,M,F):S(M,F)}function fe(M,F,N){let D;if(l()){const K=s(),Q=fe(Pm,F,N);let Z;Z=d({Type:"UnopExpr",Token_Op:K,Rhs:Q,GetFirstToken:()=>Z.Token_Op,GetLastToken:()=>Z.Rhs.GetLastToken()}),D=Z}else D=W(F,N),lt(D,"nil sipleexpr");for(;h()&&rn[r().Source]!=null&&rn[r().Source][0]>M;){const K=s(),Q=fe(rn[K.Source][1],F,N);lt(Q,"RhsNeeded");let Z;Z=d({Type:"BinopExpr",Lhs:D,Rhs:Q,Token_Op:K,GetFirstToken:()=>Z.Lhs.GetFirstToken(),GetLastToken:()=>Z.Rhs.GetLastToken()}),D=Z}return D}f=(M,F)=>fe(0,M,F);function g(M,F){const N=S(M,F);if(N.Type=="MethodExpr"||N.Type=="CallExpr"){let D;return D=d({Type:"CallExprStat",Expression:N,GetFirstToken:()=>D.Expression.GetFirstToken(),GetLastToken:()=>D.Expression.GetLastToken()}),D}else{if(N.Type=="CompoundStat")return N;{const D=[N],K=[];for(;r().Source==",";){K.push(s());const ke=S(M,F);if(ke.Type=="MethodExpr"||ke.Type=="CallExpr")throw"Bad left hand side of asignment";D.push(ke)}const Q=u("Symbol","="),Z=[f(M,F)],ce=[];for(;r().Source==",";)ce.push(s()),Z.push(f(M,F));let pe;return pe=d({Type:"AssignmentStat",Rhs:Z,Lhs:D,Token_Equals:Q,Token_LhsSeperatorList:K,Token_RhsSeperatorList:ce,GetFirstToken:()=>pe.Lhs[0].GetFirstToken(),GetLastToken:()=>pe.Rhs[pe.Rhs.length-1].GetLastToken()}),pe}}}function se(M,F){const N=s(),D=f(M,F),K=u("Keyword","then"),Q=c(M,F),Z=[];for(;r().Source=="elseif"||r().Source=="else";){const ke=s();let ve,Ie;ke.Source=="elseif"&&(ve=f(M,F),Ie=u("Keyword","then"));const E=c(M,F);if(Z.push({Condition:ve,Body:E,ClauseType:ke.Source,Token:ke,Token_Then:Ie}),ke.Source=="else")break}const ce=u("Keyword","end");let pe;return pe=d({Type:"IfStat",Condition:D,Body:Q,ElseClauseList:Z,Token_If:N,Token_Then:K,Token_End:ce,GetFirstToken:()=>pe.Token_If,GetLastToken:()=>pe.Token_End}),pe}function ie(M,F){const N=s(),[D,K]=A("end",M,F);let Q;return Q=d({Type:"DoStat",Body:D,Token_Do:N,Token_End:K,GetFirstToken:()=>Q.Token_Do,GetLastToken:()=>Q.Token_End}),Q}function T(M,F){const N=s(),D=f(M,F),K=u("Keyword","do"),[Q,Z]=A("end",M,F);let ce;return ce=d({Type:"WhileStat",Condition:D,Body:Q,Token_While:N,Token_Do:K,Token_End:Z,GetFirstToken:()=>ce.Token_While,GetLastToken:()=>ce.Token_End}),ce}function k(M,F){const N=s(),[D,K]=P();if(r().Source=="="){const Q=s(),[Z,ce]=p(M,F);if(Z.length<2||Z.length>3)throw"Expected 2 or 3 values for range bounds";const pe=u("Keyword","do"),[ke,ve]=A("end",M,F);let Ie;return Ie=d({Type:"NumericForStat",VarList:D,RangeList:Z,Body:ke,Token_For:N,Token_VarCommaList:K,Token_Equals:Q,Token_RangeCommaList:ce,Token_Do:pe,Token_End:ve,GetFirstToken:()=>Ie.Token_For,GetLastToken:()=>Ie.Token_End}),Ie}else if(r().Source=="in"){const Q=s(),[Z,ce]=p(M,F),pe=u("Keyword","do"),[ke,ve]=A("end",M,F);let Ie;return Ie=d({Type:"GenericForStat",VarList:D,GeneratorList:Z,Body:ke,Token_For:N,Token_VarCommaList:K,Token_In:Q,Token_GeneratorCommaList:ce,Token_Do:pe,Token_End:ve,GetFirstToken:()=>Ie.Token_For,GetLastToken:()=>Ie.Token_End}),Ie}}function Y(M,F){const N=s(),[D,K]=A("until",M),Q=f(M,F);let Z;return Z=d({Type:"RepeatStat",Body:D,Condition:Q,Token_Repeat:N,Token_Until:K,GetFirstToken:()=>Z.Token_Repeat,GetLastToken:()=>Z.Condition.GetLastToken()}),Z}function z(M,F){const N=s();if(r().Source=="function"){const D=U(!1,M,F);if(D.NameChain.length>1)throw n(D.Token_NameChainSeperator[0])+": `(` expected.";let K;return K=d({Type:"LocalFunctionStat",FunctionStat:D,Token_Local:N,GetFirstToken:()=>K.Token_Local,GetLastToken:()=>K.FunctionStat.GetLastToken()}),K}else if(r().Type=="Ident"){const[D,K]=P(!1,!0);let Q=[],Z=[],ce;if(r().Source=="="){ce=s();const[ke,ve]=p(M,F);Q=ke,Z=ve}let pe;return pe=d({Type:"LocalVarStat",VarList:D,ExprList:Q,Token_Local:N,Token_Equals:ce,Token_VarCommaList:K,Token_ExprCommaList:Z,GetFirstToken:()=>pe.Token_Local,GetLastToken:function(){return pe.ExprList.length>0?pe.ExprList[pe.ExprList.length-1].GetLastToken():pe.VarList[pe.VarList.length-1]}}),pe}else throw"`function` or ident expected"}function ue(M,F){const N=s();let D,K;o()||r().Source==";"?(D=[],K=[]):[D,K]=p(M,F);let Q;return Q={Type:"ReturnStat",ExprList:D,Token_Return:N,Token_CommaList:K,GetFirstToken:()=>Q.Token_Return,GetLastToken:function(){return Q.ExprList.length>0?Q.ExprList[Q.ExprList.length-1].GetLastToken():Q.Token_Return}},Q}function L(M,F){const N=s();let D;return D={Type:"BreakStat",Token_Break:N,GetFirstToken:()=>D.Token_Break,GetLastToken:()=>D.Token_Break},D}function x(M,F){const N=s();let D;return D={Type:"ContinueStat",Token_Continue:N,GetFirstToken:()=>D.Token_Continue,GetLastToken:()=>D.Token_Continue},D}function C(){const M=s();let F;r().Type=="Keyword"?F=u("Keyword"):F=u("Ident");let N;return N={Type:"GotoStat",Token_Goto:M,Token_Label:F,GetFirstToken:()=>N.Token_Goto,GetLastToken:()=>N.Token_Label},N}function R(){const M=s();let F;r().Type=="Keyword"?F=u("Keyword"):F=u("Ident");const N=u("Symbol","::");let D;return D={Type:"LabelStat",Token_ColonsLeft:M,Token_Label:F,Token_ColonsRight:N,GetFirstToken:()=>D.Token_ColonsLeft,GetLastToken:()=>D.Token_ColonsRight},D}function re(M,F){const N=r();return N.Source=="if"?[!1,se(M,F)]:N.Source=="while"?[!1,T(M,F)]:N.Source=="do"?[!1,ie(M,F)]:N.Source=="for"?[!1,k(M,F)]:N.Source=="repeat"?[!1,Y(M,F)]:N.Source=="function"?[!1,U(!1,M,F)]:N.Source=="local"?[!1,z(M,F)]:N.Source=="return"?[!0,ue(M,F)]:N.Source=="break"?[!0,L()]:N.Source=="continue"?[!0,x()]:N.Source=="goto"?[!1,C()]:N.Source=="::"?[!1,R()]:[!1,g(M,F)]}return c=function(M,F){const N=[],D=[],K={},Q={};if(F!=null)for(const[ve,Ie]of Object.entries(F))Q[ve]=Ie;if(M!=null)for(const[ve,Ie]of Object.entries(M))Q[ve]=Ie;let Z,ce=0;for(;!o();){Z&&Z==r()&&Ms(`INFINITE LOOP POSSIBLE ON STATEMENT ${Z.Source} :`,Z),Z=r();const[ve,Ie]=re(K,Q);if(Ie)switch(N.push(Ie),Ie.Type){case"LocalVarStat":Ie.VarList.forEach(_=>{_.UseCount=0,_.Number=ce++,K[_.Source]=_;const B=[];function $(){_.UseCount++,B.forEach(q=>{q.UseCount=_.UseCount})}_.Tokens={},_.Tokens.push=q=>{q.UseCountIncrease=$,q.UseCount=_.UseCount,q.Tokens=_.Tokens,B.push(q)},_.Tokens.get=()=>B,_.UseCountIncrease=$});break;case"LocalFunctionStat":const I=Ie.FunctionStat.NameChain;if(I.length===1){let $=function(){_.UseCount++,B.forEach(q=>{q.UseCount=_.UseCount})};var ke=$;const _=I[0];_.UseCount=0,_.Number=ce++,K[_.Source]=_;const B=[];_.Tokens={},_.Tokens.push=q=>{q.UseCountIncrease=$,q.UseCount=_.UseCount,q.Tokens=_.Tokens,B.push(q)},_.Tokens.get=()=>B,_.UseCountIncrease=$}break}const E=r();E.Type=="Symbol"&&E.Source==";"&&(D[N.length-1]=s())}let pe;return pe={Type:"StatList",StatementList:N,SemicolonList:D,GetFirstToken:function(){var ve;if(pe.StatementList.length!=0)return(ve=pe.StatementList[0])==null?void 0:ve.GetFirstToken()},GetLastToken:function(){if(pe.StatementList.length!=0)return pe.SemicolonList[pe.StatementList.length-1]?pe.SemicolonList[pe.StatementList.length-1]:pe.StatementList[pe.StatementList.length-1].GetLastToken()}},pe},c([],[])}function ei(i,t){const e={BinopExpr:!0,UnopExpr:!0,NumberLiteral:!0,StringLiteral:!0,NilLiteral:!0,BooleanLiteral:!0,VargLiteral:!0,HashLiteral:!0,FieldExpr:!0,IndexExpr:!0,MethodExpr:!0,CallExpr:!0,FunctionLiteral:!0,VariableExpr:!0,ParenExpr:!0,TableLiteral:!0},s={StatList:!0,BreakStat:!0,ContinueStat:!0,LabelStat:!0,GotoStat:!0,ReturnStat:!0,LocalVarStat:!0,LocalFunctionStat:!0,FunctionStat:!0,RepeatStat:!0,GenericForStat:!0,NumericForStat:!0,WhileStat:!0,DoStat:!0,IfStat:!0,CallExprStat:!0,AssignmentStat:!0,CompoundStat:!0};for(var[r,n]of Object.entries(t))if(!s[r]&&!e[r])throw`Invalid visitor target: \`${r}\``;function a(u){if(u!=null){const d=t[u.Type];if(typeof d=="function")return d(u);if(d&&d.Pre)return d.Pre(u)}}function o(u){const d=t[u.Type];if(d&&typeof d=="object"&&d.Post)return d.Post(u)}let l,h;l=function(u){if(!a(u)){if(u.Type=="BinopExpr")l(u.Lhs),l(u.Rhs);else if(u.Type=="UnopExpr")l(u.Rhs);else if(!(u.Type=="NumberLiteral"||u.Type=="StringLiteral"||u.Type=="NilLiteral"||u.Type=="BooleanLiteral"||u.Type=="VargLiteral"||u.Type=="HashLiteral")){if(u.Type=="FieldExpr")l(u.Base);else if(u.Type=="IndexExpr")l(u.Base),l(u.Index);else if(u.Type=="MethodExpr"||u.Type=="CallExpr")l(u.Base),u.FunctionArguments.CallType=="ArgCall"?u.FunctionArguments.ArgList.forEach((d,c)=>{l(d)}):u.FunctionArguments.CallType=="TableCall"&&l(u.FunctionArguments.TableExpr);else if(u.Type=="FunctionLiteral")h(u.Body);else if(u.Type!="VariableExpr")if(u.Type=="ParenExpr")l(u.Expression);else if(u.Type=="TableLiteral")u.EntryList.forEach((d,c)=>{if(d.EntryType=="Field")l(d.Value);else if(d.EntryType=="Index")l(d.Index),l(d.Value);else if(d.EntryType=="Value")l(d.Value);else throw"unreachable"});else if(u.Type=="CompoundStat")l(u.Lhs),l(u.Rhs);else throw`unreachable, type: ${u.Type}: ${u}`}o(u)}},h=function(u){if(!a(u)){if(u.Type=="StatList")u.StatementList.forEach((d,c)=>{if(d!=null){if(d===null||d.Type===null)return;d.Remove=()=>{u.StatementList[c]=null},h(d)}});else if(u.Type!="BreakStat"){if(u.Type!="ContinueStat"){if(u.Type!="GotoStat"){if(u.Type!="LabelStat")if(u.Type=="ReturnStat")u.ExprList.forEach((d,c)=>{l(d)});else if(u.Type=="LocalVarStat")u.Token_Equals&&u.ExprList.forEach((d,c)=>{l(d)});else if(u.Type=="LocalFunctionStat")h(u.FunctionStat.Body);else if(u.Type=="FunctionStat")h(u.Body);else if(u.Type=="RepeatStat")h(u.Body),l(u.Condition);else if(u.Type=="GenericForStat")u.GeneratorList.forEach((d,c)=>{l(d)}),h(u.Body);else if(u.Type=="NumericForStat")u.RangeList.forEach((d,c)=>{l(d)}),h(u.Body);else if(u.Type=="WhileStat")l(u.Condition),h(u.Body);else if(u.Type=="DoStat")h(u.Body);else if(u.Type=="IfStat")l(u.Condition),h(u.Body),u.ElseClauseList.forEach(d=>{d.Condition!=null&&l(d.Condition),h(d.Body)});else if(u.Type=="CallExprStat")l(u.Expression);else if(u.Type=="CompoundStat")l(u.Lhs),l(u.Rhs);else if(u.Type=="AssignmentStat")u.Lhs.forEach(d=>{l(d)}),u.Rhs.forEach(d=>{l(d)});else throw"unreachable"}}}o(u)}},s[i.Type]?h(i):l(i)}function Ac(i){const t=[];let e,s=0;function r(){return s++,s}function n(){e={ParentScope:e,ChildScopeList:[],VariableList:[],BeginLocation:r(),Depth:null,GetVar:null},e.ParentScope?(e.Depth=e.ParentScope.Depth+1,e.ParentScope.ChildScopeList.push(e)):e.Depth=1;const f=e;e.GetVar=function(p){for(const m of f.VariableList)if(m.Name==p)return m;if(f.ParentScope)return f.ParentScope.GetVar(p);for(const m of t)if(m.Name==p)return m}}function a(){const f=e;return f.EndLocation=r(),f.VariableList.forEach(p=>{p.ScopeEndLocation=f.EndLocation}),e=f.ParentScope,f}n();function o(f,p,m){lt(m,"MIssing localInfo"),lt(f,"Missing local var name");const b={Type:"Local",Name:f,RenameList:[p],AssignedTo:!1,Info:m,Scope:e,BeginLocation:r(),EndLocation:r(),ReferenceLocationList:[r()]};return b.Rename=function(P){b.Name=P,b.RenameList.forEach(A=>{A(P)})},e.VariableList.push(b),b}function l(f){for(const m of t)if(m.Name==f)return m;const p={Type:"Global",Name:f,RenameList:[],AssignedTo:!1,Scope:null,BeginLocation:r(),EndLocation:r(),ReferenceLocationList:[]};return p.Rename=function(m){p.Name=m,p.RenameList.forEach(b=>{b(m)})},t.push(p),p}function h(f,p){lt(f,"Missing var name");const m=l(f);return m.RenameList.push(p),m}function u(f,p){let m;for(m=f.VariableList.length-1;m>=0;m--)if(f.VariableList[m].Name==p)return f.VariableList[m];if(f.ParentScope){const b=u(f.ParentScope,p);if(b)return b}}function d(f,p){lt(f,"Missing var name");let m=u(e,f);m?m.RenameList.push(p):m=h(f,p);const b=r();return m.EndLocation=b,m.ReferenceLocationList.push(m.EndLocation),m}const c={};return c.FunctionLiteral={Pre:function(f){n(),f.ArgList.forEach((p,m)=>{const b=o(p.Source,function(P,A){A||(p.Source=P)},{Type:"Argument",Index:m});p.var=b})},Post:function(f){a()}},c.VariableExpr=function(f){f.Variable=d(f.Token.Source,function(p){f.Token.Source=p})},c.StatList={Pre:function(f){n()},Post:function(f){f.SkipPop||a()}},c.LocalVarStat={Post:function(f){f.VarList.forEach((p,m)=>{o(p.Source,function(b){f.VarList[m].Source=b},{Type:"Local"})})}},c.LocalFunctionStat={Pre:function(f){o(f.FunctionStat.NameChain[0].Source,function(p){f.FunctionStat.NameChain[0].Source=p},{Type:"LocalFunction"}),n(),f.FunctionStat.ArgList.forEach((p,m)=>{o(p.Source,function(b){p.Source=b},{Type:"Argument",Index:m})})},Post:function(){a()}},c.FunctionStat={Pre:function(f){const p=f.NameChain;let m;p.length==1?u(e,p[0].Source)?m=d(p[0].Source,function(b){p[0].Source=b}):m=h(p[0].Source,function(b){p[0].Source=b}):m=d(p[0].Source,function(b){p[0].Source=b}),m.AssignedTo=!0,n(),f.ArgList.forEach((b,P)=>{o(b.Source,function(A){b.Source=A},{Type:"Argument",Index:P})})},Post:function(){a()}},c.GenericForStat={Pre:function(f){return f.GeneratorList.forEach(p=>{ei(p,c)}),n(),f.VarList.forEach((p,m)=>{o(p.Source,function(b){p.Source=b},{Type:"ForRange",Index:m})}),ei(f.Body,c),a(),!0}},c.NumericForStat={Pre:function(f){return f.RangeList.forEach(p=>{ei(p,c)}),n(),f.VarList.forEach((p,m)=>{o(p.Source,function(b){p.Source=b},{Type:"ForRange",Index:m})}),ei(f.Body,c),a(),!0}},c.RepeatStat={Pre:function(f){f.Body.SkipPop=!0},Post:function(f){a()}},c.AssignmentStat={Post:function(f){f.Lhs.forEach(p=>{p.Variable!=null&&(p.Variable.AssignedTo=!0)})}},ei(i,c),[t,a()]}function wc(i){let t,e,s="";const r=a=>typeof(a==null?void 0:a.LeadingWhite)!="string"?" ":a.LeadingWhite;function n(a){if(a.LeadingWhite==null||a.Source==null)throw`Bad token: tk=${a} | lwhite=${a.LeadingWhite} | source=${a.Source}`;s=`${s}${a.LeadingWhite}${a.Source}`}return e=function(a){if(a.Type=="BinopExpr")e(a.Lhs),n(a.Token_Op),e(a.Rhs);else if(a.Type=="UnopExpr")n(a.Token_Op),e(a.Rhs);else if(a.Type=="NumberLiteral"||a.Type=="StringLiteral"||a.Type=="NilLiteral"||a.Type=="BooleanLiteral"||a.Type=="VargLiteral"||a.Type=="HashLiteral")n(a.Token);else if(a.Type=="FieldExpr")e(a.Base),n(a.Token_Dot),n(a.Field);else if(a.Type=="IndexExpr")e(a.Base),n(a.Token_OpenBracket),e(a.Index),n(a.Token_CloseBracket);else if(a.Type=="MethodExpr"||a.Type=="CallExpr")e(a.Base),a.Type=="MethodExpr"&&(n(a.Token_Colon),n(a.Method)),a.FunctionArguments.CallType=="StringCall"?n(a.FunctionArguments.Token):a.FunctionArguments.CallType=="ArgCall"?(n(a.FunctionArguments.Token_OpenParen),a.FunctionArguments.ArgList.forEach((o,l)=>{e(o);const h=a.FunctionArguments.Token_CommaList[l];h!=null&&n(h)}),n(a.FunctionArguments.Token_CloseParen)):a.FunctionArguments.CallType=="TableCall"&&e(a.FunctionArguments.TableExpr);else if(a.Type=="FunctionLiteral")n(a.Token_Function),n(a.Token_OpenParen),a.ArgList.forEach((o,l)=>{n(o);const h=a.Token_ArgCommaList[l];h!=null&&n(h)}),a.Token_Varg!=null&&n(a.Token_Varg),n(a.Token_CloseParen),t(a.Body),n(a.Token_End);else if(a.Type=="VariableExpr")n(a.Token);else if(a.Type=="ParenExpr")n(a.Token_OpenParen),e(a.Expression),n(a.Token_CloseParen);else if(a.Type=="TableLiteral")n(a.Token_OpenBrace),a.EntryList.forEach((o,l)=>{if(o.EntryType=="Field")n(o.Field),n(o.Token_Equals),e(o.Value);else if(o.EntryType=="Index")n(o.Token_OpenBracket),e(o.Index),n(o.Token_CloseBracket),n(o.Token_Equals),e(o.Value);else if(o.EntryType=="Value")e(o.Value);else throw"unreachable";const h=a.Token_SeperatorList[l];h!=null&&n(h)}),n(a.Token_CloseBrace);else if(a.Type=="CompoundStat")t(a);else throw`unreachable, type: ${a.Type}: ${a}`},t=function(a){if(a==null)throw`STAT IS NIL! ${a}`;if(!(a.Type==="StatList"&&a.StatementList.length===0)){if(a.WrapInDo){const o=r(a.GetFirstToken());a.GetFirstToken().LeadingWhite="",s+=`${o}do `}a.Type=="StatList"?a.StatementList.forEach((o,l)=>{o===null||o.Type===null||(o.Remove=()=>{a.StatementList[l]=null},t(o),a.SemicolonList[l]&&n(a.SemicolonList[l]))}):a.Type=="BreakStat"?n(a.Token_Break):a.Type=="ContinueStat"?n(a.Token_Continue):a.Type=="GotoStat"?(n(a.Token_Goto),n(a.Token_Label)):a.Type=="LabelStat"?(n(a.Token_ColonsLeft),n(a.Token_Label),n(a.Token_ColonsRight)):a.Type=="ReturnStat"?(n(a.Token_Return),a.ExprList.forEach((o,l)=>{e(o),a.Token_CommaList[l]&&n(a.Token_CommaList[l])})):a.Type=="LocalVarStat"?(n(a.Token_Local),a.VarList.forEach((o,l)=>{n(o),o.Attribute!=null&&n(o.Attribute);const h=a.Token_VarCommaList[l];h!=null&&n(h)}),a.Token_Equals!=null&&(n(a.Token_Equals),a.ExprList.forEach((o,l)=>{e(o);const h=a.Token_ExprCommaList[l];h!=null&&n(h)}))):a.Type=="LocalFunctionStat"?(n(a.Token_Local),n(a.FunctionStat.Token_Function),n(a.FunctionStat.NameChain[0]),n(a.FunctionStat.Token_OpenParen),a.FunctionStat.ArgList.forEach((o,l)=>{n(o);const h=a.FunctionStat.Token_ArgCommaList[l];h!=null&&n(h)}),a.FunctionStat.Token_Varg&&n(a.FunctionStat.Token_Varg),n(a.FunctionStat.Token_CloseParen),t(a.FunctionStat.Body),n(a.FunctionStat.Token_End)):a.Type=="FunctionStat"?(n(a.Token_Function),a.NameChain.forEach((o,l)=>{n(o);const h=a.Token_NameChainSeperator[l];h!=null&&n(h)}),n(a.Token_OpenParen),a.ArgList.forEach((o,l)=>{n(o);const h=a.Token_ArgCommaList[l];h!=null&&n(h)}),a.Token_Varg&&n(a.Token_Varg),n(a.Token_CloseParen),t(a.Body),n(a.Token_End)):a.Type=="RepeatStat"?(n(a.Token_Repeat),t(a.Body),n(a.Token_Until),e(a.Condition)):a.Type=="GenericForStat"?(n(a.Token_For),a.VarList.forEach((o,l)=>{n(o);const h=a.Token_VarCommaList[l];h!=null&&n(h)}),n(a.Token_In),a.GeneratorList.forEach((o,l)=>{e(o);const h=a.Token_GeneratorCommaList[l];h!=null&&n(h)}),n(a.Token_Do),t(a.Body),n(a.Token_End)):a.Type=="NumericForStat"?(n(a.Token_For),a.VarList.forEach((o,l)=>{n(o);const h=a.Token_VarCommaList[l];h!=null&&n(h)}),n(a.Token_Equals),a.RangeList.forEach((o,l)=>{e(o);const h=a.Token_RangeCommaList[l];h!=null&&n(h)}),n(a.Token_Do),t(a.Body),n(a.Token_End)):a.Type=="WhileStat"?(n(a.Token_While),e(a.Condition),n(a.Token_Do),t(a.Body),n(a.Token_End)):a.Type=="DoStat"?(n(a.Token_Do),t(a.Body),n(a.Token_End)):a.Type=="IfStat"?(n(a.Token_If),e(a.Condition),n(a.Token_Then),t(a.Body),a.ElseClauseList.forEach(o=>{n(o.Token),o.Condition!=null&&(e(o.Condition),n(o.Token_Then)),t(o.Body)}),n(a.Token_End)):a.Type=="CallExprStat"?e(a.Expression):a.Type=="CompoundStat"?(e(a.Lhs),n(a.Token_Compound),e(a.Rhs),a.Type="CompoundStat"):a.Type=="AssignmentStat"?(a.Lhs.forEach((o,l)=>{e(o);const h=a.Token_LhsSeperatorList[l];h!=null&&n(h)}),n(a.Token_Equals),a.Rhs.forEach((o,l)=>{e(o);const h=a.Token_RhsSeperatorList[l];h!=null&&n(h)})):lt(!1,"unreachable"),a.WrapInDo&&(s+=" end ")}},t(i),s}function Am(i){let t,e,s=0;function r(c){if(c===void 0)return;const f=` +${" ".repeat(s)}`;if(c.LeadingWhite==""||c.LeadingWhite.substr(-f.length,f.length)!=f){let p="",m;for(m=c.LeadingWhite.length;m>=0;m--){const b=c.LeadingWhite.substr(m,1);if(!(b==""||b.match(/\s/g))){p=c.LeadingWhite.substr(0,m+1);break}}c.LeadingWhite=`${p}${f}`}}function n(){s++}function a(){s--,lt(s>=0,"Undented too far")}function o(c){return c.LeadingWhite.length>0?c.LeadingWhite.substr(0,1):c.Source.toString().substr(0,1)}function l(c){c.LeadingWhite=c.LeadingWhite.trim()}function h(c){l(c),xc.includes(o(c))||(c.LeadingWhite=" "+c.LeadingWhite)}function u(c){h(c.GetFirstToken())}function d(c,f,p){n(),t(f),a(),r(p)}e=function(c){if(c.Type=="BinopExpr")e(c.Lhs),e(c.Rhs),u(c.Rhs),h(c.Token_Op);else if(c.Type=="UnopExpr")l(c.Token_Op),e(c.Rhs),c.Token_Op.Source[0]&&h(c.Rhs.GetFirstToken());else if(c.Type=="NumberLiteral"||c.Type=="StringLiteral"||c.Type=="NilLiteral"||c.Type=="BooleanLiteral"||c.Type=="VargLiteral"||c.Type=="HashLiteral")l(c.Token),c.Type=="HashLiteral"&&(c.Token.Source='"'+hm(`${c.Token.Source.substring(1,c.Token.Source.length-1)}`)+'"',c.Type="StringLiteral",c.Token.Type="String");else if(c.Type=="FieldExpr")e(c.Base);else if(c.Type=="IndexExpr")e(c.Base),e(c.Index);else if(c.Type=="MethodExpr"||c.Type=="CallExpr")e(c.Base),l(c.FunctionArguments.GetFirstToken()),l(c.FunctionArguments.GetLastToken()),c.Type=="MethodExpr",c.FunctionArguments.CallType=="StringCall"||(c.FunctionArguments.CallType=="ArgCall"?c.FunctionArguments.ArgList.forEach((f,p)=>{e(f),p>0&&u(f);const m=c.FunctionArguments.Token_CommaList[p];m!=null&&l(m)}):c.FunctionArguments.CallType=="TableCall"&&e(c.FunctionArguments.TableExpr));else if(c.Type=="FunctionLiteral")c.ArgList.forEach((f,p)=>{p>0&&h(f),c.Token_ArgCommaList[p]}),c.ArgList.length>0&&c.Token_Varg!=null&&h(c.Token_Varg),d(c.Token_CloseParen,c.Body,c.Token_End);else if(c.Type!="VariableExpr")if(c.Type=="ParenExpr")l(c.Token_OpenParen),l(c.Token_CloseParen),e(c.Expression);else if(c.Type=="TableLiteral"){if(c.EntryList.length!=0){n();const f=100;c.EntryList.forEach((p,m)=>{p.EntryType=="Field"?(c.EntryList.length>f?vn(p.Value):r(p.Field),h(p.Token_Equals),e(p.Value),u(p.Value)):p.EntryType=="Index"?(c.EntryList.length>f?l(p.Token_OpenBracket):r(p.Token_OpenBracket),e(p.Index),h(p.Token_Equals),e(p.Value),u(p.Value)):p.EntryType=="Value"?(e(p.Value),c.EntryList.length>f?vn(p.Value):r(p.Value.GetFirstToken())):lt(!1,"unreachable");const b=c.Token_SeperatorList[m];b!=null&&(c.EntryList.length>f?b.LeadingWhite="":l(b))}),a(),c.EntryList.length>f?c.Token_CloseBrace.LeadingWhite="":r(c.Token_CloseBrace)}}else if(c.Type=="CompoundStat")t(c);else throw Ms(c),`unreachable, type: ${c.Type}:`+c},t=function(c){if(c.Type=="StatList")c.StatementList.forEach((f,p)=>{f===null||f.Type===null||f.Type==="StatList"&&f.StatementList.length===0||(f.Remove=()=>{f.StatementList[p]=null},t(f),r(f.GetFirstToken()))});else if(c.Type!="BreakStat"){if(c.Type!="ContinueStat"){if(c.Type!="GotoStat"){if(c.Type!="LabelStat")if(c.Type=="ReturnStat")c.ExprList.forEach((f,p)=>{e(f),u(f),c.Token_CommaList[p]});else if(c.Type=="LocalVarStat"){if(c.VarList.forEach((f,p)=>{h(f),f.Attribute&&(f.Attribute.LeadingWhite=" "),c.Token_VarCommaList[p]}),c.Token_Equals){l(c.Token_Equals),h(c.Token_Equals);const f=[],p=[];c.ExprList.forEach((m,b)=>{m!=null&&(b{m!=null&&(e(m),u(m),c.Token_ExprCommaList[b]!=null&&c.ExprList.length-1==b&&(c.Token_ExprCommaList[b]=null))})}}else if(c.Type=="LocalFunctionStat")h(c.FunctionStat.Token_Function),h(c.FunctionStat.NameChain[0]),c.FunctionStat.ArgList.forEach((f,p)=>{p>0?h(f):l(f);const m=c.FunctionStat.Token_ArgCommaList[p];m&&l(m)}),c.FunctionStat.ArgList.length>0&&c.FunctionStat.Token_Varg?(l(c.FunctionStat.Token_Varg),h(c.FunctionStat.Token_Varg)):c.FunctionStat.Token_Varg&&l(c.FunctionStat.Token_Varg),l(c.FunctionStat.Token_OpenParen),l(c.FunctionStat.Token_CloseParen),d(c.FunctionStat.Token_CloseParen,c.FunctionStat.Body,c.FunctionStat.Token_End);else if(c.Type=="FunctionStat")c.NameChain.forEach((f,p)=>{p==0&&h(f),c.Token_NameChainSeperator[p]}),c.ArgList.forEach((f,p)=>{p>0&&h(f),c.Token_ArgCommaList[p]}),c.ArgList.length>0&&c.Token_Varg&&h(c.Token_Varg),d(c.Token_CloseParen,c.Body,c.Token_End);else if(c.Type=="RepeatStat")d(c.Token_Repeat,c.Body,c.Token_Until),e(c.Condition),u(c.Condition);else if(c.Type=="GenericForStat")c.VarList.forEach((f,p)=>{h(f),c.Token_VarCommaList[p]}),h(c.Token_In),c.GeneratorList.forEach((f,p)=>{e(f),u(f),c.Token_GeneratorCommaList[p]}),h(c.Token_Do),d(c.Token_Do,c.Body,c.Token_End);else if(c.Type=="NumericForStat")c.VarList.forEach((f,p)=>{h(f),c.Token_VarCommaList[p]}),h(c.Token_Equals),c.RangeList.forEach((f,p)=>{e(f),u(f),c.Token_RangeCommaList[p]}),h(c.Token_Do),d(c.Token_Do,c.Body,c.Token_End);else if(c.Type=="WhileStat")e(c.Condition),u(c.Condition),h(c.Token_Do),d(c.Token_Do,c.Body,c.Token_End);else if(c.Type=="DoStat")d(c.Token_Do,c.Body,c.Token_End);else if(c.Type=="IfStat"){e(c.Condition),u(c.Condition),h(c.Token_Then);let f=c.Token_Then,p=c.Body;c.ElseClauseList.forEach(m=>{d(f,p,m.Token),f=m.Token,m.Condition!=null&&(e(m.Condition),u(m.Condition),h(m.Token_Then),f=m.Token_Then),p=m.Body}),d(f,p,c.Token_End)}else c.Type=="CallExprStat"?e(c.Expression):c.Type=="CompoundStat"?(e(c.Lhs),e(c.Rhs),u(c.Lhs),u(c.Rhs),h(c.Token_Compound)):c.Type=="AssignmentStat"?(c.Lhs.forEach((f,p)=>{e(f),p>0&&u(f),c.Token_LhsSeperatorList[p]}),h(c.Token_Equals),c.Rhs.forEach((f,p)=>{e(f),u(f),c.Token_RhsSeperatorList[p]})):lt(!1,"Unreachable")}}}},t(i)}function vn(i){let t,e;function s(a){a&&(a.LeadingWhite="")}function r(a,o,l=!1){s(o);const h=(typeof a.Source=="string"?a.Source:a.Source.toString()).substr(a.Source.length-1,1),u=(typeof o.Source=="string"?o.Source:o.Source.toString()).substr(0,1);h=="-"&&u=="-"||kn.includes(h)&&kn.includes(u)||l&&h==")"&&u=="("?o.LeadingWhite=l?";":" ":o.LeadingWhite=""}function n(a,o,l){t(o),s(l);const h=o.GetFirstToken(),u=o.GetLastToken();h!=null?(r(a,h),r(u,l)):r(a,l)}e=function(a){if(a.Type==="BinopExpr")e(a.Lhs),e(a.Rhs),a.Lhs.Type=="NumberLiteral"&&a.Token_Op.Source==".."?a.Token_Op.LeadingWhite=" ":(s(a.Token_Op),r(a.Lhs.GetLastToken(),a.Token_Op)),r(a.Token_Op,a.Rhs.GetFirstToken());else if(a.Type==="UnopExpr")s(a.Token_Op),e(a.Rhs),r(a.Token_Op,a.Rhs.GetFirstToken());else if(a.Type==="NumberLiteral"||a.Type==="StringLiteral"||a.Type==="NilLiteral"||a.Type==="BooleanLiteral"||a.Type==="VargLiteral"||a.Type==="HashLiteral")s(a.Token);else if(a.Type=="FieldExpr")e(a.Base),s(a.Token_Dot),s(a.Field);else if(a.Type=="IndexExpr")e(a.Base),s(a.Token_OpenBracket),e(a.Index),s(a.Token_CloseBracket);else if(a.Type=="MethodExpr"||a.Type=="CallExpr")e(a.Base),a.Type=="MethodExpr"&&(s(a.Token_Colon),s(a.Method)),a.FunctionArguments.CallType=="StringCall"?s(a.FunctionArguments.Token):a.FunctionArguments.CallType=="ArgCall"?(s(a.FunctionArguments.Token_OpenParen),a.FunctionArguments.ArgList.forEach((o,l)=>{e(o);const h=a.FunctionArguments.Token_CommaList[l];h!=null&&s(h)}),s(a.FunctionArguments.Token_CloseParen)):a.FunctionArguments.CallType=="TableCall"&&e(a.FunctionArguments.TableExpr);else if(a.Type=="FunctionLiteral")s(a.Token_Function),s(a.Token_OpenParen),a.ArgList.forEach((o,l)=>{s(o);const h=a.Token_ArgCommaList[l];h!=null&&s(h)}),a.Token_Varg!=null&&s(a.Token_Varg),s(a.Token_CloseParen),n(a.Token_CloseParen,a.Body,a.Token_End);else if(a.Type=="VariableExpr")s(a.Token);else if(a.Type=="ParenExpr")s(a.Token_OpenParen),e(a.Expression),s(a.Token_CloseParen);else if(a.Type=="TableLiteral")s(a.Token_OpenBrace),a.EntryList.forEach((o,l)=>{o.EntryType=="Field"?(s(o.Field),s(o.Token_Equals),e(o.Value)):o.EntryType=="Index"?(s(o.Token_OpenBracket),e(o.Index),s(o.Token_CloseBracket),s(o.Token_Equals),e(o.Value)):o.EntryType=="Value"?e(o.Value):lt(!1,"unreachable");const h=a.Token_SeperatorList[l];h!=null&&s(h)}),a.Token_SeperatorList[a.EntryList.length-1]=null,s(a.Token_CloseBrace);else throw`unreachable, type: ${a.Type}:${a} ${console.trace()}`},t=function(a){if(a.Type=="StatList"){let o;for(o=0;o<=a.StatementList.length;o++){const l=a.StatementList[o];if(l==null)continue;t(l),s(l.GetFirstToken());const h=a.StatementList[o-1];if(h!=null){const u={")":["(","["],"]":["(","["]};if(a.SemicolonList[o-1]){const d=h.GetLastToken().Source,c=l.GetFirstToken().Source;(u[d]===null||u[d]===void 0||!u[d].includes(c))&&(a.SemicolonList[o-1]=null)}a.SemicolonList[o-1]||r(h.GetLastToken(),l.GetFirstToken(),!0)}}a.SemicolonList[a.StatementList.length-1]=null,a.StatementList.length>0&&s(a.StatementList[0].GetFirstToken())}else if(a.Type=="BreakStat")s(a.Token_Break);else if(a.Type=="ContinueStat")s(a.Token_Continue);else if(a.Type=="GotoStat")s(a.Token_Goto),r(a.Token_Goto,a.Token_Label);else if(a.Type=="LabelStat")s(a.Token_ColonsLeft),s(a.Token_Label),s(a.Token_ColonsRight);else if(a.Type=="ReturnStat")s(a.Token_Return),a.ExprList.forEach((o,l)=>{e(o),a.Token_CommaList[l]!=null&&s(a.Token_CommaList[l])}),a.ExprList.length>0&&r(a.Token_Return,a.ExprList[0].GetFirstToken());else if(a.Type=="LocalVarStat"){s(a.Token_Local);let o=!1;a.VarList.forEach((l,h)=>{h==0?r(a.Token_Local,l):s(l),l.Attribute&&(s(l.Attribute),h+1==a.VarList.length&&(o=!0));const u=a.Token_VarCommaList[h];u!=null&&s(u)}),a.Token_Equals!=null&&(o||s(a.Token_Equals),a.ExprList.forEach((l,h)=>{e(l);const u=a.Token_ExprCommaList[h];u!=null&&s(u)}))}else if(a.Type=="LocalFunctionStat")s(a.Token_Local),r(a.Token_Local,a.FunctionStat.Token_Function),r(a.FunctionStat.Token_Function,a.FunctionStat.NameChain[0]),r(a.FunctionStat.NameChain[0],a.FunctionStat.Token_OpenParen),a.FunctionStat.ArgList.forEach((o,l)=>{s(o);const h=a.FunctionStat.Token_ArgCommaList[l];h!=null&&s(h)}),a.FunctionStat.Token_Varg&&s(a.FunctionStat.Token_Varg),s(a.FunctionStat.Token_CloseParen),n(a.FunctionStat.Token_CloseParen,a.FunctionStat.Body,a.FunctionStat.Token_End);else if(a.Type=="FunctionStat")s(a.Token_Function),a.NameChain.forEach((o,l)=>{l==0?r(a.Token_Function,o):s(o);const h=a.Token_NameChainSeperator[l];h!=null&&s(h)}),s(a.Token_OpenParen),a.ArgList.forEach((o,l)=>{s(o);const h=a.Token_ArgCommaList[l];h!=null&&s(h)}),a.Token_Varg&&s(a.Token_Varg),s(a.Token_CloseParen),n(a.Token_CloseParen,a.Body,a.Token_End);else if(a.Type=="RepeatStat")s(a.Token_Repeat),n(a.Token_Repeat,a.Body,a.Token_Until),e(a.Condition),r(a.Token_Until,a.Condition.GetFirstToken());else if(a.Type=="GenericForStat")s(a.Token_For),a.VarList.forEach((o,l)=>{l==0?r(a.Token_For,o):s(o);const h=a.Token_VarCommaList[l];h!=null&&s(h)}),r(a.VarList[a.VarList.length-1],a.Token_In),a.GeneratorList.forEach((o,l)=>{e(o),l==0&&r(a.Token_In,o.GetFirstToken());const h=a.Token_GeneratorCommaList[l];h!=null&&s(h)}),r(a.GeneratorList[a.GeneratorList.length-1].GetLastToken(),a.Token_Do),n(a.Token_Do,a.Body,a.Token_End);else if(a.Type=="NumericForStat")s(a.Token_For),a.VarList.forEach((o,l)=>{l==0?r(a.Token_For,o):s(o);const h=a.Token_VarCommaList[l];h!=null&&s(h)}),r(a.VarList[a.VarList.length-1],a.Token_Equals),a.RangeList.forEach((o,l)=>{e(o),l==0&&r(a.Token_Equals,o.GetFirstToken());const h=a.Token_RangeCommaList[l];h!=null&&s(h)}),r(a.RangeList[a.RangeList.length-1].GetLastToken(),a.Token_Do),n(a.Token_Do,a.Body,a.Token_End);else if(a.Type=="WhileStat")s(a.Token_While),e(a.Condition),s(a.Token_Do),r(a.Token_While,a.Condition.GetFirstToken()),r(a.Condition.GetLastToken(),a.Token_Do),n(a.Token_Do,a.Body,a.Token_End);else if(a.Type=="DoStat")s(a.Token_Do),s(a.Token_End),n(a.Token_Do,a.Body,a.Token_End);else if(a.Type=="IfStat"){s(a.Token_If),e(a.Condition),r(a.Token_If,a.Condition.GetFirstToken()),r(a.Condition.GetLastToken(),a.Token_Then);let o=a.Token_Then,l=a.Body;a.ElseClauseList.forEach((h,u)=>{n(o,l,h.Token),o=h.Token,h.Condition!=null&&(e(h.Condition),r(h.Token,h.Condition.GetFirstToken()),r(h.Condition.GetLastToken(),h.Token_Then),o=h.Token_Then),t(h.Body),l=h.Body}),n(o,l,a.Token_End)}else if(a.Type=="CallExprStat")e(a.Expression);else if(a.Type=="CompoundStat")e(a.Lhs),s(a.Token_Compound),e(a.Rhs),r(a.Lhs.GetLastToken(),a.Token_Compound),r(a.Token_Compound,a.Rhs.GetFirstToken());else if(a.Type=="AssignmentStat")a.Lhs.forEach((o,l)=>{e(o);const h=a.Token_LhsSeperatorList[l];h!=null&&s(h)}),s(a.Token_Equals),a.Rhs.forEach((o,l)=>{e(o);const h=a.Token_RhsSeperatorList[l];h!=null&&s(h)});else return e(a)},t(i)}function Cc(i){let t,e;const s={NumberLiteral:!0,BooleanLiteral:!0,StringLiteral:!0,HashLiteral:!0,NilLiteral:!0,TableLiteral:!0,ParenExpr:!0,BinopExpr:!0};function r(c,f,p=null){let m;return m={Type:c,Token:{Type:p==null?"Number":p,LeadingWhite:"",Source:f},GetFirstToken:()=>m.Token,GetLastToken:()=>m.Token},m}function n(c,f,p){let m;return m={Type:"BinopExpr",Token_Op:{Type:"Symbol",LeadingWhite:"",Source:c},Lhs:f,Rhs:p,GetFirstToken:()=>m.Lhs.GetFirstToken(),GetLastToken:()=>m.Rhs.GetLastToken()},m}function a(c,f){let p;return p={Type:"UnopExpr",Token_Op:{Type:"Symbol",LeadingWhite:"",Source:c},Rhs:f,GetFirstToken:()=>p.Token_Op,GetLastToken:()=>p.Rhs.GetLastToken()},p}function o(c,f){if(f!=null)for(var[p,m]of Object.entries(f))c[p]=m}function l(c){if(c==null||c.substr==null)return;const f=c.substr(0,1);let p;if((f=='"'||f=="'")&&(p=c.substr(1,c.length-2)),f=="["){let P=0,A=1;for(;c.substr(A,1)=="=";)P++,A++;p=c.substr(2+P,c.length-4-P-2)}if(p==null)return"";let m="",b;for(b=0;b<=p.length;b++){const P=p.substr(b,1);P=="'"||P=='"'?m+=`\\${P}`:m+=P}return m}function h(c){if(typeof c=="object"&&c.Type=="ParenExpr")return o(c,c.Expression)}function u(c,f,p){let m=f,b=p;if(f&&f.Type=="ParenExpr"&&(m=f.Expression),p&&p.Type=="ParenExpr"&&(b=p.Expression),m==null||b==null||m.Type==null||b.Type==null||m.Type=="VariableExpr"||m.Type=="CallExpr"||m.Type=="BinopExpr"||b.Type=="CallExpr"||b.Type=="BinopExpr"||b.Type=="VariableExpr")return;const P=m.Token||m.Expression!=null&&m.Expression.Token||null,A=b.Token||b.Expression!=null&&b.Expression.Token||null,U=P!=null?P.Source:null,O=A!=null?A.Source:null;let S,W;if(m.Type=="BooleanLiteral"&&(S=U=="true"),b.Type=="BooleanLiteral"&&(W=O=="true"),!(m.Type=="NumberLiteral"&&(S=Tt(U),S==null))&&!(b.Type=="NumberLiteral"&&(W=Tt(O),W==null))&&((m.Type=="StringLiteral"||m.Type=="HashLiteral")&&(S=U.toString()),(b.Type=="StringLiteral"||b.Type=="HashLiteral")&&(W=O.toString()),S!=null&&W!=null)){if(c=="==")return S==W;if(c=="~=")return S!=W;if(c=="and")return S&&W;if(c=="or")return S||W;if(c==".."&&m.Type=="StringLiteral"&&b.Type=="StringLiteral")return`"${l(U)+l(O)}"`;if(m.Type=="StringLiteral"&&(S=Tt(l(S))),b.Type=="StringLiteral"&&(W=Tt(l(W))),S==null||W==null)return;let fe;if(c=="+"&&(fe=S+W),c=="-"&&(fe=S-W),c=="*"&&(fe=S*W),c=="/"&&(fe=S/W),c=="^"&&(fe=S**W),c=="%"&&(fe=S%W),c==">"&&(fe=S>W),c=="<"&&(fe=S="&&(fe=S>=W),c=="<="&&(fe=S<=W),fe==!1||fe==!0||isFinite(fe)&&fe>-(10**6)&&fe<10**6)return fe}}function d(c,f){const p=f.Token||f.Expression||f.EntryList||f;if(p==null||p.Source==null&&f.Type!="TableLiteral"||f.Type=="VariableExpr"||f.Type=="CallExpr"||f.Type=="BinopExpr")return;const m=p.Source;let b;if(f.Type=="TableLiteral"&&p!=null){const P=[];let A=0,U=!1,O=!1,S=0;if(p.forEach((W,fe)=>{if(U)P.push(W);else if(W.EntryType=="Value"||W.EntryType=="Index")if((W.Index==null||W.Index.Type=="NumberLiteral")&&W.Value){if((W.Index!=null&&W.Index.Token!=null&&W.Index.Token.Source!==null?W.Index.Token.Source:S+1).toString()!==(++S).toString())return U=!0,O=!0,P.push(W);W.Value.Type!="CallExpr"?A++:(U=!0,P.push(W))}else P.push(W)}),O)return;if(c=="#")return f.EntryList=P,f.EntryList.length<=0?r("NumberLiteral",A!==null?A:f.EntryList.length):A<=0?a("#",f):n("+",r("NumberLiteral",A),a("#",f))}if(f.Type=="BooleanLiteral"&&(b=m=="true"),!(f.Type=="NumberLiteral"&&(b=Tt(m),b===null))){if(f.Type=="StringLiteral"&&(b=m.substr(1,m.length-2)),c=="not"&&f.Type!==null)return f.Type=="NilLiteral"||f.Type=="BooleanLiteral"&&b===!1;if(b!=null){if(c=="#")return b.length;if(c=="-")return-b}}}e=function(c){if(c.Type=="BinopExpr"){if(e(c.Lhs),e(c.Rhs),c.Lhs!=null&&c.Rhs!=null){const f=c.Token_Op;if(f!=null&&f.Source!=null){const p=u(f.Source,c.Lhs,c.Rhs);if(p!=null){if(typeof p=="boolean"){const m=r("BooleanLiteral",p.toString(),"Keyword");o(c,m);return}else if(typeof p=="number"){if(isFinite(p)==!0){const m=r("NumberLiteral",p.toString(),"Number");o(c,m);return}}else if(typeof p=="string"){const m=r("StringLiteral",p,"String");o(c,m);return}else if(typeof p=="object"){o(c,p);return}return}}if(c.Lhs.Type=="ParenExpr"){const m=c.Lhs.Expression;m.Type=="NumberLiteral"||m.Type=="StringLiteral"||m.Type=="NilLiteral"||m.Type=="BooleanLiteral"||m.Type=="HashLiteral"}if(c.Rhs.Type=="ParenExpr"){const m=c.Rhs.Expression;m.Type=="NumberLiteral"||m.Type=="StringLiteral"||m.Type=="NilLiteral"||m.Type=="BooleanLiteral"||m.Type=="HashLiteral"}}}else if(c.Type=="UnopExpr"){if(e(c.Rhs),c.Rhs!=null&&s[c.Rhs.Type]==!0){const f=c.Token_Op;if(f!=null&&f.Source!=null){const p=c.Rhs.Expression!=null?c.Rhs.Expression:c.Rhs,m=d(f.Source,p);if(m!=null){if(typeof m=="boolean"){const b=r("BooleanLiteral",m.toString(),"Keyword");o(c,b);return}else if(typeof m=="number"){if(isFinite(m)==!0){const b=r("NumberLiteral",m,"Number");o(c,b);return}}else if(typeof m=="string"){const b=r("StringLiteral",m,"String");o(c,b);return}else if(typeof m=="object"){o(c,m);return}return}}}}else if(c.Type=="NumberLiteral"||c.Type=="StringLiteral"||c.Type=="NilLiteral"||c.Type=="BooleanLiteral"||c.Type=="VargLiteral"||c.Type=="HashLiteral"){const f=c.Token;if(f!=null){if(f.Type=="Number"){const p=f.Source.toString().split("e");if(p.length===2){const m=Tt(p[0]),b=Tt(p[1]);isFinite(m)&&isFinite(b)&&m**b<999999999&&!f.Source.includes("+")&&!!f.Source.includes(".")&&!f.Source.includes("-")&&(f.Source=(m**b).toString())}}f.Type=="String"&&(f.Source=f.Source.replace(/\\\d+/gi,p=>{const m=Tt(p.substr(1,p.length-1));return m&&isFinite(m)&&(m>=97&&m<=122||m>=65&&m<=90||m>=33&&m<=47||m>=58&&m<=64||m>=91&&m<=96||m>=123&&m<=126)&&m!==34&&m!==39&&m!==92?String.fromCharCode(m):p}))}}else if(c.Type=="FieldExpr")e(c.Base);else if(c.Type=="IndexExpr")e(c.Base),e(c.Index);else if(c.Type=="MethodExpr"||c.Type=="CallExpr"){if(e(c.Base),c.FunctionArguments.CallType=="ArgCall"?c.FunctionArguments.ArgList.forEach((f,p)=>{e(f)}):c.FunctionArguments.CallType=="TableCall"&&e(c.FunctionArguments.TableExpr),c.Base.Type==="ParenExpr"&&c.Base.Expression.Type==="FunctionLiteral"&&c.FunctionArguments.CallType==="ArgCall"){const f=c.Base.Expression;c.FunctionArguments.ArgList.forEach((p,m)=>{const b=c.FunctionArguments.ArgList[m];if(b!==void 0&&(b.Type=="NumberLiteral"||b.Type=="StringLiteral"||b.Type=="NilLiteral"||b.Type=="BooleanLiteral"||b.Type=="HashLiteral")){const P=f.ArgList[m];P&&P.var.RenameList.forEach(A=>{A(b.Token.Source,!0)})}})}}else if(c.Type=="FunctionLiteral")t(c.Body);else if(c.Type!="VariableExpr")if(c.Type=="ParenExpr"){const f=c.Expression;f!=null&&f.Type=="ParenExpr"&&(c.Expression=f.Expression),e(c.Expression),(c.Type=="NumberLiteral"||c.Type=="StringLiteral"||c.Type=="NilLiteral"||c.Type=="BooleanLiteral"||c.Type=="VargLiteral"||c.Type=="HashLiteral")&&h(c)}else c.Type=="TableLiteral"&&c.EntryList.forEach((f,p)=>{f.EntryType=="Field"?e(f.Value):f.EntryType=="Index"?(e(f.Index),e(f.Value)):f.EntryType=="Value"?e(f.Value):lt(!1,"unreachable")})},t=function(c){if(c.Type=="StatList")c.StatementList.forEach((f,p)=>{f===null||f.Type===null||(f.Remove=()=>{c.StatementList[p]=null},t(f))});else if(c.Type!="BreakStat"){if(c.Type!="ContinueStat")if(c.Type=="ReturnStat")c.ExprList.forEach((f,p)=>{e(f)});else if(c.Type=="LocalVarStat")c.Token_Equals!=null&&c.ExprList.forEach((f,p)=>{e(f)});else if(c.Type=="LocalFunctionStat")t(c.FunctionStat.Body),c.FunctionStat.NameChain.length===1&&c.FunctionStat.NameChain[0].UseCount;else if(c.Type=="FunctionStat")t(c.Body);else if(c.Type=="RepeatStat")t(c.Body),e(c.Condition),c.Body.Type=="StatList"&&c.Body.StatementList.length;else if(c.Type=="GenericForStat")c.GeneratorList.forEach((f,p)=>{e(f)}),t(c.Body);else if(c.Type=="NumericForStat"){c.RangeList.forEach((W,fe)=>{e(W)}),t(c.Body);const f=c.RangeList[0],p=c.RangeList[1],m=c.RangeList[2];if(f==null||p==null)return c.Remove();if(h(f),h(p),h(m),f.Type!="NumberLiteral"||p.Type!="NumberLiteral"||m!=null&&m.Type!="NumberLiteral"||m==null)return;const b=Tt(f.Token.Source),P=Tt(p.Token.Source),A=m!=null&&Tt(m.Token.Source)||1,U=A>0&&b<=P||A<0&&b>=P,O=(P-b+A)/A;if(!(U&&O>=0)||c.Body.Type=="StatList"&&c.Body.StatementList.length===0)return c.Remove()}else if(c.Type=="WhileStat"){e(c.Condition),t(c.Body);let f=c.Condition;switch(f.Type){case"ParenExpr":f=f.Expression;case"BooleanLiteral":if(f==null||f.Token==null||f.Token.Source!=="false")break;case"NilLiteral":c.Remove();break}}else if(c.Type=="DoStat"){if(t(c.Body),c.Body===null||c.Body.Type=="StatList"&&c.Body.StatementList.length===0)return c.Remove();if(c.Body.StatementList.length===1){const f=c.Body.StatementList[0];f.Type!=="ContinueStat"&&f.Type!=="BreakStat"&&f.Type!=="ReturnStat"&&o(c,f)}}else if(c.Type=="IfStat"){e(c.Condition),t(c.Body),c.ElseClauseList.forEach((p,m)=>{p.Condition!=null&&e(p.Condition),t(p.Body)});let f=c.Condition;switch(f.Type){case"ParenExpr":f=f.Expression;case"BooleanLiteral":if(c.ElseClauseList.length>=1||f==null||f.Token==null||f.Token.Source!=="false")break;case"NilLiteral":c.Remove();break}}else c.Type=="CallExprStat"?e(c.Expression):c.Type=="CompoundStat"?(e(c.Lhs),e(c.Rhs)):c.Type=="AssignmentStat"&&(c.Lhs.forEach((f,p)=>{e(f)}),c.Rhs.forEach((f,p)=>{e(f)}))}},t(i)}const Ss=[];let Ge;for(Ge="a".charCodeAt();Ge<="z".charCodeAt();Ge++)Ss.push(String.fromCharCode(Ge));for(Ge="A".charCodeAt();Ge<="Z".charCodeAt();Ge++)Ss.push(String.fromCharCode(Ge));for(Ge="0".charCodeAt();Ge<="9".charCodeAt();Ge++)Ss.push(String.fromCharCode(Ge));Ss.push("_");const yi=[];for(Ge="a".charCodeAt();Ge<="z".charCodeAt();Ge++)yi.push(String.fromCharCode(Ge));for(Ge="A".charCodeAt();Ge<="Z".charCodeAt();Ge++)yi.push(String.fromCharCode(Ge));function Lo(i){let t="";const e=i%yi.length;for(i=(i-e)/yi.length,t=`${t}${yi[e]}`;i>0;){const s=i%Ss.length;i=(i-s)/Ss.length,t=`${t}${Ss[s]}`}return t}function wm(i,t,e){const s=[];for(var[r,n]of Object.entries(Sc))s[r]=!0;const a=[];i.forEach(d=>{d.AssignedTo&&e?a.push(d):s[d.Name]=!0});function o(d){d.VariableList.forEach(c=>{a.push(c)}),d.ChildScopeList.forEach(c=>{o(c)})}o(t),a.forEach(d=>{d.UsedNameArray=[]}),a.sort((d,c)=>d-c);let l=0;const h=[];function u(d){let c=h[d];if(c==null){for(c=Lo(l),l++;s[c];)c=Lo(l),l++;h[d]=c}return c}a.forEach((d,c)=>{d.Renamed=!0;let f=0;for(;d.UsedNameArray[f];)f++;d.Rename(u(f)),d.Scope?a.forEach(p=>{p.Renamed||(!p.Scope||p.Scope.Depthm>=d.BeginLocation&&m<=d.ScopeEndLocation?(p.UsedNameArray[f]=!0,!0):!1):p.Scope.Depth>d.Scope.Depth?d.ReferenceLocationList.some(m=>m>=p.BeginLocation&&m<=p.ScopeEndLocation?(p.UsedNameArray[f]=!0,!0):!1):d.BeginLocationp.BeginLocation&&(p.UsedNameArray[f]=!0))}):a.forEach(p=>{if(!p.Renamed)if(p.Type=="Global")p.UsedNameArray[f]=!0;else if(p.Type=="Local")d.ReferenceLocationList.some(m=>m>=p.BeginLocation&&m<=p.ScopeEndLocation?(p.UsedNameArray[f]=!0,!0):!1);else throw"Unreachable"})})}function Cm(i,t,e){const s=[];i.forEach(l=>{(!l.AssignedTo||!e)&&(s[l.Name]=!0)});let r=1,n=1;function a(l,h){l.Name=h,l.RenameList.forEach(u=>{u(h)})}if(e){const l={};i.forEach(h=>{h.AssignedTo&&!h.ChangedName&&(l[h.Name]=l[h.Name]||`G_${n}_`,h.ChangedName=!0,a(h,l[h.Name]),n++)})}function o(l){l.VariableList.forEach(h=>{let u=`L_${r}_`;h.Info.Type=="Argument"?u=`${u}arg${h.Info.Index}`:h.Info.Type=="LocalFunction"?u=`${u}func`:h.Info.Type=="ForRange"&&(u=`${u}forvar${h.Info.Index}`),a(h,u),r++}),l.ChildScopeList.forEach(h=>{o(h)})}o(t)}const Ci={};Ci.Minify=function(i,t){const e=Ec(i),[s,r]=Ac(e);return t.RenameVariables==!0&&wm(s,r,t.RenameGlobals),t.SolveMath==!0&&Cc(e),vn(e),wc(e)};Ci.Beautify=function(i,t){const e=Ec(i),[s,r]=Ac(e);return t.RenameVariables&&Cm(s,r,t.RenameGlobals),t.SolveMath==!0&&Cc(e),Am(e),wc(e)};try{oi!=null&&oi.exports!=null&&(oi.exports.Beautify=Ci.Beautify,oi.exports.Minify=Ci.Minify)}catch{}const ys="_M",Re="__tmp",Io="esPairs",No="caseExp",Ln={debug:!0,tagArrayExpression:!0,importStatementHoisting:!0,transform$SymbolToDollar:!0,transformToString:!0,transformString:!0,transformJSONStringify:!0,transformJSONParse:!0,transformParseFloat:!0,transformParseInt:!0,transformNumber:!0,transformIsArray:!0,transformConsoleLog:!0,moduleExportsToReturn:!0,index0To1:!0,tryTranslateClass:!0,disableUpdateExpressionCallback:!0,renameCatchErrorIfNeeded:!0,disableClassCall:!0};function In(){console.log.apply(this,arguments)}function ti(i){return i.filter(t=>t.trim()!=="").join(` +`)}function Nn(i){return xd(i,{plugins:["typescript"],sourceType:"module"})}const km={and:"_and",break:"_break",do:"_do",else:"_else",elseif:"_elseif",end:"_end",false:"_false",for:"_for",function:"_function",if:"_if",in:"_in",local:"_local",nil:"_nil",not:"_not",or:"_or",repeat:"_repeat",return:"_return",then:"_then",true:"_true",until:"_until",while:"_while"},vt=i=>Object.prototype.hasOwnProperty.call(km,i),nn={"!":"not","&&":"and","||":"or","===":"==","==":"==","!==":"~=","!=":"~="},an=i=>i.length>0?"self,":"self",vm=i=>i&&typeof i=="object"&&i.type;function Jt(i,t,e){const s=e===void 0?void 0:e-1,r=e>0||e===void 0;if(Array.isArray(i)){if(r)for(const n of i)Jt(n,t,s)}else if(vm(i)){const n=t(i);if(n)return n;if(r)for(const a of Object.values(i))Jt(a,t,s)}else return}function Lm(i,t,e,s){Jt(i,r=>{r.type=="Identifier"&&r.name==t&&(r.name=e)},s)}function si(i,t,e){let s;return Jt(i,r=>{if(r.type=="Identifier"&&r.name==t)return s=r,!0},e),s}const Im=["pcall","xpcall","unpack"];function Nm(i){var s;if(i.type!=="VariableDeclaration"||i.declarations.length!==1)return!1;const t=i.declarations[0];if(t.id.type!=="ArrayPattern"||!t.id.elements.every(r=>r&&r.type==="Identifier")||((s=t.init)==null?void 0:s.type)!=="CallExpression")return!1;const e=t.init.callee.name;return Im.includes(e)}function _o(i){Jt(i,t=>{t.type=="ThisExpression"&&(t.type="Identifier",t.name="cls")})}function kc(i,t,e){let s;return Jt(i,n=>{if(t(n))return s=n,!0},e),s}function Hi(i){return gi(i,"ContinueStatement")?"::continue::":""}function gi(i,t,e){return kc(i,s=>s.type===t,e)}const on=i=>i=="ArrayPattern"||i=="ObjectPattern";function _m(i){const t=gi(i,"RestElement");return t?`local ${t.argument.name} = {...};`:""}function Mm(i){const t=[];let e=[];for(const[n,a]of i.cases.entries())a.test?(e.push(a),a.consequent.length>0&&(t.push(e),e=[])):t.push([a]);e.length>0&&t.push(e);const s=[];for(const n of t)if(n.length===1)s.push(n[0]);else{const a=n[n.length-1];a.testGroup=n.map(o=>o.test),s.push(a)}const r=s.findIndex(n=>!n.test);r!==-1&&r!==s.length-1?i.cases=[...s.slice(0,r),...s.slice(r+1),s[r]]:i.cases=s}function Om(i,t={}){var fe;t={...Ln,...t},t.debug&&In((fe=i==null?void 0:i.program)==null?void 0:fe.body);const e=[],s=[],r=[];let n="",a="",o=!1,l=!1,h=!1,u=!1;const d=g=>g.filter(se=>se.type=="AssignmentPattern").map(se=>`if ${S(se.left)} == nil then ${S(se.left)} = ${S(se.right)} end`).join(";"),c=g=>{const se=[];for(const[k,Y]of g.entries())on(Y.type)&&(se.push("local "+S(Y)({type:"Identifier",name:`__tmp${k}`})),g[k]={type:"Identifier",name:`__tmp${k}`});const ie=_m(g),T=d(g);return`${se.join(";")} + ${T} + ${ie}`},f=(g,se)=>(g=S(g),vt(g)?`["${g}"]`:se?`.${g}`:g),p=(g,se)=>{const ie=S(g.key);return g.computed||g.key.type=="StringLiteral"?`[${ie}]`:vt(ie)?`["${ie}"]`:se?`.${ie}`:ie},m=g=>{if(g.specifiers.length===1){const se=g.specifiers[0],ie=`require(${S(g.source)})`;return se.type=="ImportDefaultSpecifier"?`local ${S(se.local)} = ${ie}.default`:se.type=="ImportNamespaceSpecifier"?`local ${S(se.local)} = ${ie}`:`local ${S(se.local)} = ${ie}.${S(se.imported)}`}else{const se=g.specifiers.map(T=>S(T.local)).join(", "),ie=g.specifiers.map(T=>T.type=="ImportDefaultSpecifier"?`${S(T.local)} = _esModule.default`:T.type=="ImportNamespaceSpecifier"?`${S(T.local)} = _esModule`:`${S(T.local)} = _esModule.${S(T.imported)}`);return`local ${se}; + do + local _esModule = require(${S(g.source)}) + ${ie.join(";")} + end`}},b=g=>se=>{const ie=g.elements.map(k=>k.type=="RestElement"?S(k.argument):`${S(k)}`);if(!se)return ie.join(", ");const T=g.elements.map((k,Y)=>{if(k.type=="RestElement"){const z=S(k.argument);return`${z} = {}; + for __i=${ie.length}, #${Re} do + ${z}[#${z}+1] = ${Re}[__i] + end`}else return`${S(k)} = ${Re}[${Y+1}]`}).join(";");return`${ie.join(", ")};do local ${Re} = ${S(se)}; ${T} end`},P=g=>se=>{const ie=g.properties.map(k=>k.type=="RestElement"?S(k.argument):`${S(k.value)}`),T=g.properties.map(k=>{if(k.type=="RestElement"){const Y=S(k.argument),z=g.properties.slice(0,-1).map(ue=>`k ~= "${S(ue.key)}"`).join(" and ");return`${Y} = {}; + for k, v in pairs(${Re}) do + if ${z} then + ${Y}[k] = v + end + end`}else{const Y=S(k.key),z=vt(Y)?`${Re}["${Y}"]`:`${Re}.${Y}`;return`${S(k.value)} = ${z}`}}).join(";");return`${ie.join(", ")};do local ${Re} = ${S(se)}; ${T} end`},A=g=>{const se=S(g.callee),ie=O(g.arguments);if(g.callee.type=="MemberExpression"){const T=S(g.callee.object),k=S(g.callee.property);if(g.callee.object.type=="Super")return[`${T}.${k}`,`${an(g.arguments)}${ie}`];if(k=="call")return[T,ie];if(k=="apply"){const[Y,z]=g.arguments;return z?[T,`${S(Y)}, unpack(${S(z)})`]:[T,S(Y)]}else return vt(k)?[`${T}["${k}"]`,`${T}${g.arguments.length>0?",":""}${ie}`]:t.transformConsoleLog&&T=="console"&&k=="log"?["print",ie]:t.transformToString&&k=="toString"?["tostring",T]:t.transformIsArray&&T=="Array"&&k=="isArray"?(h=!0,["isarray",ie]):t.transformJSONParse&&T=="JSON"&&k=="parse"?(o=!0,["cjson.decode",ie]):t.transformJSONStringify&&T=="JSON"&&k=="stringify"?(o=!0,["cjson.encode",ie]):g.callee.computed?[`${T}[${k}]`,`${T}${g.arguments.length>0?",":""}${ie}`]:[`${T}:${k}`,ie]}else return t.transformParseInt&&se=="parseInt"?["math.floor",ie]:t.transformParseFloat&&se=="parseFloat"?["tonumber",ie]:t.transformNumber&&se=="Number"?["tonumber",ie]:t.transformString&&se=="String"?["tostring",ie]:[se,ie]},U=g=>{const se=[];let ie=g;for(;;){const{type:ue,object:L}=ie;if(ue=="OptionalMemberExpression")se.push(ie);else if(ue=="MemberExpression")se.push(ie);else{se.push(ie);break}ie=L}let T=!1,k="";const Y=[];for(let ue=se.length-1;ue>-1;ue--){const L=se[ue];if(k)if(se[ue].computed)k=`${k}[${S(L.property)}]`;else{const x=f(L.property,!0);k=`${k}${x}`}else k=S(L);ue==0?Y.push(`else return ${k} end`):se[ue-1].optional&&(T?Y.push(`elseif ${k} == nil then return nil`):(T=!0,Y.push(`if ${k} == nil then return nil`)))}return[`(function() ${Y.join(` +`)} end)()`,k]},O=(g,se=",")=>g.map(S).filter(ie=>ie).join(se);function S(g){var se,ie,T,k,Y,z,ue;switch(g.type){case"File":return O(g.program.body,`; +`);case"VariableDeclaration":{if(Nm(g)){const x=g.declarations[0];return`local ${x.id.elements.map(S).join(", ")} = ${S(x.init)}`}const L=g.noPrefix?"":"local ";return g.declarations.map(S).filter(x=>x).map(x=>`${L}${x}`).join(`; +`)}case"VariableDeclarator":if(g.init)if(g.init.type=="AssignmentExpression"){const L=[`${S(g.id)} = ${S(g.init.left)}`];let x=g.init;for(;x.type=="AssignmentExpression";){x.right.type=="AssignmentExpression"?L.unshift(`${S(x.left)} = ${S(x.right.left)}`):L.unshift(`${S(x.left)} = ${S(x.right)}`);x=x.right}return L.join(`; +local `)}else return g.id.type=="ArrayPattern"||g.id.type=="ObjectPattern"?S(g.id)(g.init):`${S(g.id)} = ${S(g.init)}`;else return on(g.id.type)?`${S(g.id)()}`:`${S(g.id)}`;case"Identifier":{const L=g.name;return L=="undefined"?"nil":L.startsWith("$")&&t.transform$SymbolToDollar?L.replace("$","_DOLLAR_"):L}case"NumericLiteral":return`${g.value}`;case"StringLiteral":return(se=g.extra)==null?void 0:se.raw;case"IfStatement":return`if ${S(g.test)} then ${S(g.consequent)} ${g.alternate?` else ${S(g.alternate)}`:""} end`;case"BlockStatement":return`${O(g.body,";")}`;case"CallExpression":if(g.callee.type=="MemberExpression"&&g.callee.object.type!=="MemberExpression"&&g.callee.object.type!=="Identifier"&&g.callee.object.type!=="Super"){const L=S(g.callee.object);return g.callee.object={type:"Identifier",name:Re},`(function() + local ${Re} = ${L} + return ${S(g)} + end)()`}else{const[L,x]=A(g);return g.callee.type=="ArrowFunctionExpression"||g.callee.type=="FunctionExpression"?`(${L})(${x})`:`${L}(${x})`}case"BinaryExpression":{const L=nn[g.operator]||g.operator,x=F=>F.type==="BinaryExpression"&&F.operator==="+",C=F=>F.type==="StringLiteral"?!0:x(F)?C(F.left)||C(F.right):!1,R=F=>x(F)?F.stringConcat?`${S(F.left)} .. ${S(F.right)}`:C(F.left)||C(F.right)?(Jt(F,N=>{x(N)&&(N.stringConcat=!0)}),`${S(F.left)} .. ${S(F.right)}`):`${S(F.left)} + ${S(F.right)}`:S(F);if(g.operator==="+")return R(g);const re=S(g.left),M=S(g.right);return g.operator=="instanceof"?`getmetatable(${re}) == ${M}`:g.operator==">>"?(l=!0,`bit.rshift(${re}, ${M})`):g.operator=="<<"?(l=!0,`bit.lshift(${re}, ${M})`):g.operator=="&"?(l=!0,`bit.band(${re}, ${M})`):g.operator=="|"?(l=!0,`bit.bor(${re}, ${M})`):g.operator=="^"?(l=!0,`bit.bxor(${re}, ${M})`):g.operator=="**"?`math.pow(${re}, ${M})`:`${re} ${L} ${M}`}case"UnaryExpression":{const L=nn[g.operator]||g.operator,x=S(g.argument);return g.operator=="typeof"?`type(${x})`:g.operator=="delete"?`${x} = nil`:g.operator=="~"?(l=!0,`bit.bnot(${x})`):`${L} ${x}`}case"ThisExpression":return"self";case"BooleanLiteral":return`${g.value}`;case"ObjectExpression":return gi(g.properties,"SpreadElement",1)?`(function() local ${Re} = {}; ${g.properties.map(L=>L.type=="SpreadElement"?`for k, v in pairs(${S(L.argument)}) do ${Re}[k] = v end`:L.type=="ObjectMethod"?(L.asMember=!0,`${Re}${S(L)}`):`${Re}${p(L,!0)} = ${S(L.value)}`).join(";")} return ${Re} end)()`:`{${O(g.properties)}}`;case"ObjectProperty":return`${p(g)} = ${S(g.value)}`;case"ArrayExpression":{const L=t.tagArrayExpression?"array":"";return gi(g.elements,"SpreadElement",1)?`(function() local ${Re} = ${L}{}; ${g.elements.map(C=>C.type=="SpreadElement"?`for _, v in ipairs(${S(C.argument)}) do ${Re}[#${Re} + 1] = v end`:`${Re}[#${Re} + 1] = ${S(C)}`).join(";")} return ${Re} end)()`:`${L}{${O(g.elements)}}`}case"ForOfStatement":{const L=Hi(g);if(g.left.noPrefix=!0,((ie=g.left.declarations[0])==null?void 0:ie.id.type)=="ArrayPattern"){const x=si(g.body,Io)?Re:Io;return ti([`for _, ${x} in ipairs(${S(g.right)}) do`,`local ${S(g.left)} = unpack(${x});`,S(g.body),L,"end"])}else return ti([`for _, ${S(g.left)} in ipairs(${S(g.right)}) do`,S(g.body),L,"end"])}case"ForInStatement":{const L=Hi(g);return g.left.noPrefix=!0,ti([`for ${S(g.left)}, __ in pairs(${S(g.right)}) do`,S(g.body),L,"end"])}case"LogicalExpression":{const L=nn[g.operator]||g.operator,x=S(g.left),C=S(g.right);let R;return L=="??"?R=`(function() + if ${x} == nil then + return ${C} + else + return ${x} + end + end)()`:R=`${x} ${L} ${C}`,(T=g.extra)!=null&&T.parenthesized?`(${R})`:`${R}`}case"ObjectMethod":{const L=p(g,g.asMember),x=c(g.params),C=S(g.body),R=O(g.params);return` ${L} = function (${R}) ${x} ${C} end`}case"FunctionDeclaration":{const L=S(g.id),x=c(g.params),C=S(g.body),R=O(g.params),re=g.params.length>0?", "+R:R;return t.tryTranslateClass&&L.match(/^[A-Z]/)&&gi(g.body,"ThisExpression")?`local ${L} = setmetatable({}, { + __call = function(t${re}) + local self = t:new(); + self:constructor(${R}); + return self; + end}) +${L}.__index = ${L} +function ${L}.new(cls) return setmetatable({}, cls) end +function ${L}:constructor(${R}) + ${x} + ${C} +end`:`local function ${L}(${R}) ${x} ${C} end`}case"ReturnStatement":return g.argument?`return ${S(g.argument)}`:"return;";case"ArrayPattern":return b(g);case"ObjectPattern":return P(g);case"ClassDeclaration":{const L=S(g.id),x=g.body.body.filter(N=>N.type==="ClassMethod"&&N.kind!=="constructor");g.superClass&&Jt(x,N=>{N.type==="MemberExpression"&&N.object.type=="Super"&&(N.object.superClass=g.superClass)});const C=x.map(N=>{const D=S(N.key),K=c(N.params),Q=vt(D)?`${L}["${D}"] = function`:`function ${L}:${D}`,Z=vt(D)?an(N.params):"";return`${Q}(${Z}${O(N.params)}) + ${K} + ${S(N.body)} + end`}).join(";"),R=g.body.body.filter(N=>N.type==="ClassProperty"&&N.static).map(N=>{const D=S(N.key);return vt(D)?`${L}["${D}"] = ${S(N.value)}`:`${L}.${D} = ${S(N.value)}`}).join(";"),re=g.body.body.filter(N=>N.type==="ClassProperty"&&!N.static).map(N=>{const D=S(N.key);return vt(D)?`["${D}"] = ${S(N.value)}`:`${D} = ${S(N.value)}`}).join(","),M=kc(g.body,N=>N.kind=="constructor"),F=g.superClass?`__index = ${S(g.superClass)},`:"";if(M){g.superClass&&Jt(M.body,Z=>{Z.type==="MemberExpression"&&Z.object.type=="Super"&&(Z.object.superClass=g.superClass),Z.type=="CallExpression"&&Z.callee.type=="Super"&&(Z.callee={type:"MemberExpression",object:{type:"Super",superClass:g.superClass},property:{type:"Identifier",name:"constructor"}})});const N=c(M.params),D=S(M.body),K=O(M.params),Q=M.params.length>0?", "+K:K;return` local ${L} = setmetatable({}, { + ${F} + __call = function(t${Q}) + local self = t:new(); + self:constructor(${K}); + return self; + end}) + ${L}.__index = ${L} + ${R} + function ${L}.new(cls) return setmetatable({${re}}, cls) end + function ${L}:constructor(${K}) + ${N} + ${D} + end + ${C}`}else return` local ${L} = setmetatable({}, { + ${F} + __call = function(t) + local self = t:new(); + self:constructor(); + return self; + end}) + ${L}.__index = ${L} + ${R} + function ${L}.new(cls) return setmetatable({${re}}, cls) end + function ${L}:constructor() end + ${C}`}case"ClassBody":return`${O(g.body,`, +`)}`;case"ClassProperty":return`${f(g.key)} = ${S(g.value)}`;case"ClassMethod":{const L=c(g.params);return g.params.unshift({type:"ThisExpression"}),g.static&&!si(g.body,"cls")&&!si(g.params,"cls")&&(_o(g.body),_o(g.params)),`${f(g.key)} = function(${O(g.params)}) + ${L} ${S(g.body)} end`}case"OptionalCallExpression":{let L,x,C,R;return g.callee.type=="OptionalMemberExpression"?([C,R]=A(g),[L,x]=U(g.callee),C=x):([C,R]=A(g),L=S(g.callee),x=L),L[0]=="#"&&(L=L.slice(1)+".length"),`(function() + local ${Re} = ${L} + if ${Re} == nil then + return nil + elseif type(${Re}) ~= 'function' then + error('${x} is not a function') + else + return ${C}(${R}) + end + end)()`}case"MemberExpression":{const L=S(g.object),x=S(g.property);return g.object.type=="Super"?`${L}.${x}`:x=="length"?"#"+L:vt(x)?`${L}["${x}"]`:g.computed?t.index0To1&&((k=g.property)==null?void 0:k.type)=="NumericLiteral"&&g.property.value===0?`${L}[1]`:`${L}[${x}]`:`${L}.${x}`}case"OptionalMemberExpression":return U(g)[0];case"ExpressionStatement":return g.expression.ExpressionStatement=!0,`${S(g.expression)}`;case"AssignmentExpression":{if(g.right.type=="FunctionExpression"&&g.left.type=="MemberExpression"&&g.left.object.type=="MemberExpression"&&((Y=g.left.object.property)==null?void 0:Y.name)=="prototype"){const x=c(g.right.params),C=S(g.left.property);if(vt(C)){const R=`${S(g.left.object.object)}["${C}"]`,re=an(g.right.params);return`${R} = function(${re}${O(g.right.params)}) + ${x} ${S(g.right.body)} end`}else return`function ${`${S(g.left.object.object)}:${C}`}(${O(g.right.params)}) + ${x} ${S(g.right.body)} end`}const L=S(g.left);if(t.moduleExportsToReturn&&g.left.type=="MemberExpression"&&(L=="module.exports"||L.startsWith("module.exports.")||L.startsWith("module.exports[")))return L=="module.exports"?a=`return ${S(g.right)}`:(u=!0,s.push(`${ys}${L.slice(14)} = ${S(g.right)}`)),"";if(g.right.type=="AssignmentExpression"){const x=S(g.left);return`${S(g.right)}; + local ${x} = ${S(g.right.left)}`}else{const x=g.operator;let C,R;return on(g.left.type)?(C=S(g.left)(),R=`unpack(${S(g.right)})`):(C=S(g.left),R=S(g.right)),x=="+="?`${C} = ${C} + ${R}`:x=="-="?`${C} = ${C} - ${R}`:x=="*="?`${C} = ${C} * ${R}`:x=="/="?`${C} = ${C} / ${R}`:x=="%="?`${C} = ${C} % ${R}`:x=="&&="?`${C} = ${C} and ${R}`:x=="||="?`${C} = ${C} or ${R}`:x=="&="?(l=!0,`${C} = bit.band(${C}, ${R})`):x=="|="?(l=!0,`${C} = bit.bor(${C}, ${R})`):x=="^="?(l=!0,`${C} = bit.bxor(${C}, ${R})`):x=="**="?`${C} = math.pow(${C}, ${R})`:x=="??="?`${C} = (function() + if ${C} == nil then + return ${R} + else + return ${C} + end + end)()`:`${C} ${x} ${R}`}}case"BreakStatement":return"break";case"ContinueStatement":return"goto continue";case"ThrowStatement":return g.argument.type=="NewExpression"?`error(${O(g.argument.arguments)})`:`error(${S(g.argument)})`;case"NewExpression":return`${S(g.callee)}(${O(g.arguments)})`;case"FunctionExpression":{const L=c(g.params);return`function(${O(g.params)}) ${L} ${S(g.body)} end`}case"TryStatement":return t.renameCatchErrorIfNeeded&&g.handler.param&&S(g.handler.param)==="error"&&(si(g.handler,"_err")||Lm(g.handler,"error","_err")),`local ok ${g.handler.param?" ,"+S(g.handler.param):""} = + pcall(function() ${S(g.block)} end); + if not ok then ${S(g.handler.body)} end`;case"UpdateExpression":{const L=S(g.argument),x=g.operator=="++"?"+":"-";return t.disableUpdateExpressionCallback&&g.ExpressionStatement?`${L} = ${L} ${x} 1`:`(function () ${L} = ${L} ${x} 1; return ${L} end)()`}case"WhileStatement":{const L=Hi(g);return ti([`while ${S(g.test)} do`,S(g.body),L,"end"])}case"ArrowFunctionExpression":{const L=c(g.params);return`function(${O(g.params)}) ${L} ${g.body.type=="BlockStatement"?"":"return"} ${S(g.body)} end`}case"RestElement":return"...";case"ConditionalExpression":return`(function() + if ${S(g.test)} then return ${S(g.consequent)}; + else return ${S(g.alternate)}; end end)()`;case"RegExpLiteral":return`[=[${g.pattern}]=]`;case"NullLiteral":return"nil";case"TemplateLiteral":return`string.format([=[${g.quasis.map(S).join("%s")}]=], ${O(g.expressions)})`;case"TemplateElement":return`${g.value.cooked}`;case"ForStatement":{const L=Hi(g);return((z=g.update)==null?void 0:z.type)=="UpdateExpression"&&(g.update.ExpressionStatement=!0),ti(["do",g.init?S(g.init):"",`while ${g.test?S(g.test):"1"} do`,S(g.body),L,g.update?S(g.update):"","end","end"])}case"AssignmentPattern":return`${S(g.left)}`;case"SpreadElement":return`unpack(${S(g.argument)})`;case"Super":return g.superClass?S(g.superClass):"super";case"SequenceExpression":return`{${O(g.expressions,";")}}`;case"SwitchStatement":{Mm(g);const L=si(g,No)?Re:No;return`repeat + local ${L} = ${S(g.discriminant)} + ${g.cases.map((x,C)=>{const R=O(x.consequent,";");if(x.test){const re=x.testGroup?`${x.testGroup.map(M=>`${L} == ${S(M)}`).join(" or ")}`:`${L} == ${S(x.test)}`;return C===0?`if ${re} then ${R}`:`elseif ${re} then ${R}`}else return`else ${R}`}).join(` +`)} + end + until (false)`}case"ExportDefaultDeclaration":return u=!0,s.push(`${ys}.default = ${S(g.declaration)}`),"";case"ExportNamedDeclaration":if(u=!0,g.declaration)if(g.declaration.type=="VariableDeclaration"){const L=g.declaration.declarations.map(S).filter(C=>C).map(C=>`local ${C}`).join(`; +`),x=g.declaration.declarations.map(C=>{const R=S(C.id);return`${ys}.${R} = ${R}`});return s.push(...x),`${L}`}else if(((ue=g.declaration)==null?void 0:ue.type)=="FunctionDeclaration"){const L=S(g.declaration.id);return s.push(`${ys}.${L} = ${L}`),`${S(g.declaration)}`}else return"";else if(g.specifiers.length>0){const L=x=>`${ys}.${S(x.exported)} = ${S(x.local)}`;return s.push(...g.specifiers.map(L)),""}else return"";case"ImportDeclaration":{const L=m(g);return t.importStatementHoisting?(r.push(L),""):L}case"AwaitExpression":return`${S(g.argument)}`;default:return t.debug&&In("unknow node",g.type,g),""}}const W=S(i);return u&&(n=`local ${ys} = {}`,a=`return ${ys}`),o&&r.unshift('local cjson = require("cjson")'),h&&r.unshift('local isarray = require("table.isarray")'),l&&r.unshift('local bit = require("bit")'),`${r.join(";")} + +${n} +${e.join(";")} +${W} +${s.join(";")} +${a}`}function Dm(i,t){let e="";return e=Om(Nn(i),t),t.debug&&In(e),Ci.Beautify(e,{})}var vc={exports:{}};(function(i,t){(function(e,s){s()})(Ut,function(){function e(h,u){return typeof u=="undefined"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob(["\uFEFF",h],{type:h.type}):h}function s(h,u,d){var c=new XMLHttpRequest;c.open("GET",h),c.responseType="blob",c.onload=function(){l(c.response,u,d)},c.onerror=function(){console.error("could not download file")},c.send()}function r(h){var u=new XMLHttpRequest;u.open("HEAD",h,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function n(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(u)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ut=="object"&&Ut.global===Ut?Ut:void 0,o=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(h,u,d){var c=a.URL||a.webkitURL,f=document.createElement("a");u=u||h.name||"download",f.download=u,f.rel="noopener",typeof h=="string"?(f.href=h,f.origin===location.origin?n(f):r(f.href)?s(h,u,d):n(f,f.target="_blank")):(f.href=c.createObjectURL(h),setTimeout(function(){c.revokeObjectURL(f.href)},4e4),setTimeout(function(){n(f)},0))}:"msSaveOrOpenBlob"in navigator?function(h,u,d){if(u=u||h.name||"download",typeof h!="string")navigator.msSaveOrOpenBlob(e(h,d),u);else if(r(h))s(h,u,d);else{var c=document.createElement("a");c.href=h,c.target="_blank",setTimeout(function(){n(c)})}}:function(h,u,d,c){if(c=c||open("","_blank"),c&&(c.document.title=c.document.body.innerText="downloading..."),typeof h=="string")return s(h,u,d);var f=h.type==="application/octet-stream",p=/constructor/i.test(a.HTMLElement)||a.safari,m=/CriOS\/[\d]+/.test(navigator.userAgent);if((m||f&&p||o)&&typeof FileReader!="undefined"){var b=new FileReader;b.onloadend=function(){var U=b.result;U=m?U:U.replace(/^data:[^;]*;/,"data:attachment/file;"),c?c.location.href=U:location=U,c=null},b.readAsDataURL(h)}else{var P=a.URL||a.webkitURL,A=P.createObjectURL(h);c?c.location=A:location.href=A,c=null,setTimeout(function(){P.revokeObjectURL(A)},4e4)}});a.saveAs=l.saveAs=l,i.exports=l})})(vc);var Fm=vc.exports;const Bm="@xiangnanscu/js2lua",Rm="0.45.0",$m="module",jm="Writing LuaJIT with the expressiveness of JavaScript.",Um="src/js2lua.mjs",Vm={js2lua:"bin/js2lua.js"},Hm={type:"git",url:"git+https://github.com/xiangnanscu/js2lua.git"},Gm="Nan Xiang",Wm="MIT",Km={url:"https://github.com/xiangnanscu/js2lua/issues"},qm="https://github.xnscu.com/js2lua/",zm={dev:"vite",build:"vite build",preview:"vite preview",commit:"git add . && git commit -am ",push:"yarn commit",postpush:"while true; do git push && { echo 'Git push succeeded'; break; } || echo 'Git push failed, retrying in 1 seconds'; sleep 1; done",pull:"while true; do git pull && { echo 'Git pull succeeded'; break; } || echo 'Git pull failed, retrying in 1 seconds'; sleep 1; done",prerelease:"npm --no-git-tag-version version minor",docs:"node makeDocs.js",release:"npm run docs && push_option=release npm run push",rc:"yarn release",replace:"find . -type d \\( -name .git -o -name node_modules \\) -prune -o -type f -exec sed -i s/js2lua/field/g {} \\;",test:"node test.mjs"},Jm={"@babel/parser":"^7.22.14","lua-fmt":"^2.6.0","lua-format":"^1.5.2","yargs-parser":"^21.1.1"},Xm={"@highlightjs/vue-plugin":"^2.1.0","@prettier/plugin-lua":"^0.0.3","@rushstack/eslint-patch":"^1.3.3","@vitejs/plugin-vue":"^2.3.3",bootstrap:"^5.1.3",eslint:"^8.47.0","eslint-plugin-vue":"^9.17.0","file-saver":"^2.0.5","highlight.js":"^11.5.1",prettier:"^2.8.8",sass:"^1.52.1","source-map-support":"^0.5.21",vite:"^2.9.9","vite-plugin-require-transform":"^1.0.21",vue:"^3.2.25","vue-eslint-parser":"^9.3.1",yargs:"^17.7.2"};var Mo={name:Bm,version:Rm,type:$m,description:jm,main:Um,bin:Vm,repository:Hm,author:Gm,license:Wm,bugs:Km,homepage:qm,scripts:zm,dependencies:Jm,devDependencies:Xm},Ym=`const { a, b: bAlias, ...rest } = { a: 1, b: 2, c: 3, d: 4 } +const [x, y, ...others] = [1, 2, 3, 4] +for (i = 0; i < 10; i = i + 2) { + if (i % 2) { + continue; + } + print(1); +} +// class +class Child extends Parent { + static myMethod(msg) { + super.myMethod(msg); + } + constructor(x, y) { + super(x); + this.y = y; + } + myMethod(msg) { + super.myMethod(msg); + } +} +// calling a function expression +(() => print(1))(); + +`;const Zm={style:{"margin-bottom":"1em","text-align":"center"}},Qm=["title"],ey={class:"row"},ty={class:"col-2"},sy={class:"form-check"},iy={class:"form-check"},ry=["id","value"],ny=["for"],ay={class:"col-3"},oy={key:0,class:"col"},ly={class:"form-check-inline"},cy={class:"form-check-label"},uy=["value"],hy={key:0},fy={key:1},py={class:"col"},dy={class:"table table-bordered"},my={colspan:"3"},yy=["href"],gy={colspan:"3"},Ty=["id"],by={class:"td-wrap"},xy=["onUpdate:modelValue"],Sy={__name:"App",setup(i){const t=gs(!1),e=gs(!1);function s(P,A){try{return Dm(P,A)}catch(U){return console.error(U),`-- ERROR: ${U.message}`}}function r(P,A){try{return Nn(P,A)}catch(U){return console.error(U),Nn(`throw new Error("ERROR: ${U.message}")`)}}const n=gs(Ym),a=Object.keys(Ln),o=gs(Object.entries(Ln).filter(([P,A])=>A).map(([P,A])=>P)),l=Ht(()=>Object.fromEntries(a.map(P=>[P,!!o.value.includes(P)]))),h={"../test/IIFE.mjs":`(() => { + print(1) +})(); + +(function() { + print(2) +})(); + +(() => { + print(1) +})() +(function() { + print(2) +})();`,"../test/assignment.mjs":`let u, v; +[u, v] = [1, 2] +const foo = 1 +const object = { o1: 'o1', o2: 'o2' }, array = [1, 2] +// eslint-disable-next-line no-undef +const h1 = h2 = h3 = 'title' +const { a, b: bAlias, ...rest } = { a: 1, b: 2, c: 3, d: 4 } +const [x, y, ...others] = [1, 2, 3, 4] +const e = 1, f = 'a', { o1, o2: o22 } = object, [a1, a2] = array`,"../test/class.mjs":`class BasePosition { + say(word = 'base haha') { + console.log(\`Base say: \${word}\`) + } +} +class Position extends BasePosition { + static insCount = 0 + start = 0 + end = 1; + constructor(name, x = 1, y = 2, ...numbers) { + super() + Position.insCount++ + this.name = name + this.x = x + this.y = y + this.numbers = numbers + } + static echoInsCount() { + console.log(this.insCount) + } + echoPosition() { + console.log(this.name, this.x, this.y) + } + echoNumbersLength() { + console.log('numbers length:', this.name, this.numbers.length) + } + say(word = 'haha') { + super.say(word) + console.log(\`\${this.name} say: \${word}, first number is \${this.numbers[0]}\`) + } +} + +const p1 = new Position('p1', 1, 2, 3, 4) +Position.echoInsCount() +const p2 = new Position('p2', 10, 20, 30, 40) +Position.echoInsCount() +p1.echoPosition() +p2.echoPosition() +p1.say('hello') +p1.say.call(p2) +p1.echoNumbersLength('a', 'b', 'c') +p1.echoNumbersLength.apply(p2, [1, 2])`,"../test/export.mjs":`module.exports.a = {} +module.exports['b'] = {} + +const c = 1 +const d = 2 +const e = 3 + +export default { c } +export { d } +export { e as f } +export const g = 1, h = 2; +export function foo() { }`,"../test/function.mjs":`const foo = { bar() { } } +const bar = 'bar' +// translate foo.bar() => foo:bar() +foo.bar() +foo[bar]() +foo[1]() +foo['bar']() +foo['bar' || 'foo'](); +[].concat([1, 2, 3]); +/a/.exec(); +foo.map(e => { return e.name }) +foo.map(e => e.name) +foo.map(function (e) { return e.name }) +const func1 = (x = 1, y = 2, ...args) => [x, y, ...args] + +function func2(x = [], y = {}, ...args) { + return { x, y, ...args } +} + +// first uppercase is treated as class +function Echo(x = 1, y = 2, ...args) { + this.x = x + this.y = y + this.args = args +} +// xx.prototype.yy => xx:yy +Echo.prototype.echoX = function () { + console.log(this.x) +} +Echo.prototype.echoY = function () { + console.log(this.y) +}`,"../test/if.mjs":`const a = 1 +if (a === 1) { + print(a) +} +if (a) { + print(a) +} +if (!a) { + print(a) +} +if (a === 1) { + print(a) +} else { + print(2) +} + +if (a === 1) { + print(a) +} else if (a == 2) { + print(2) +} else { + print(3) +}`,"../test/import.mjs":`import g from "bar" +import { foo } from "bar" +import { a as b } from "bar" +import * as c from "bar" +import d, { e as eAlias, f } from "bar"`,"../test/index0To1.mjs":`const a = [] +const i = a[0]`,"../test/keywords.mjs":`// lua keywords +const Obj = { and: 'real' } + +Obj.prototype.f1 = function () { } +Obj.prototype.end = function () { } +print(Obj.end) + +const arr = [true, false]`,"../test/loop.mjs":`const arr = []; +for (let i = 0; i <= arr.length; i++) { + print(i); +} +for (i = 0; i < 10; i = i + 2) { + print(1); +} +for (const e of arr) { + print(e); + break; +} +for (const [a, b] of arr) { + if (b === 1) { + continue; + } + print(a); +} + +for (const key in arr) { + print(key); +} + +while (1) { + print("a"); +} + +for(;;) { + +}`,"../test/multipleReturnForLuaFunction.mjs":`let [ok, res] = pcall(foo) +let [ok2, res2] = xpcall(foo) +let [e1, e2] = unpack(bar) +// comparision +let [ok3, res3] = pcall2(foo) +let [ok4, ...res4] = xpcall(foo) +`,"../test/object.mjs":`const foo = 'bar' +const d1 = { + foo: 1, + [foo]: 2, + "k3": 3, + [5]: 5, + // "true":7, + [true]: 6 +} +const d2 = { end: 1, end1: 2 } +const d3 = { end: 1, end1: 2, ...d2, and: 3 } +const a = { ["true"]: 1, [true]: 2 } +const d = { + ...d3, + foo: 1, + end() { }, + end2() { }, +}; + +// local a = { ["true"] = 1, [true] = 2 } +// print(a['true'], a[true])`,"../test/operator.mjs":`const obj = {} +let a = 1 +typeof a +print(a instanceof obj) +const x = a ? 1 : 2 +a = !!a +const k = obj?.b; +const o = a?.[k]?.['c']?.e; +obj.func?.(1, ...[1, 2, 3]); +a.b?.c?.(); +a ?? 'hello'; +obj.n ??= 100; +print(a && x || k) +print(a && (x || k)) +a += 1 +a -= 1 +a *= 1 +a /= 1 +a %= 1 +a &&= k +a ||= k +a >> 2 +2 << a +a & 2 +a &= 2 +a | 2 +a |= 2 +a ^ 2 +a ^= 2 +a ** 2 +a **= 2 +~a`,"../test/optionalNullish.mjs":` +// optional +const a = 1, b = 'foo', obj = {}, args = [] + +// basic +const m = a?.b; + +//chain +const o = a?.[b]['c']?.e; + +// optional call +obj.func?.(1, ...args); + +// chain optional call +a.b?.c.d?.(); + +// nullish +a ?? 'hello'; +const d = {} +d.n ??= 100;`,"../test/others.mjs":`const foo = {} +delete foo.bar +print(foo.length) +const URL_PATTERN = /^https?:\\/\\/.*?\\// + +const constraints = { + 'foo': 'baz', + foo: 'bar', + ...route.opts.constraints, + [httpMethodStrategy.name]: route.method +}`,"../test/smartAddition.mjs":`const s1 = b + c +const s2 = b + 'c' +const s3 = 'c' + b +const s4 = a + b + 'c' +const s7 = 'a' + b + c +const s5 = a + b + 'c' + d + f +const s6 = a + b + c + d + f +`,"../test/spread.mjs":`const a = [1, 2, 3] +const d = { x: 1, y: 2, z: 3 } +const [v1, v2, ...v] = [4, 5, ...a] +const { x: k1, y: k2, ...k } = { ...d, foo: 'bar' }`,"../test/stringTemplate.mjs":"const foo = 5\nconst s = `1.${2}.3.${'4'}.${foo}`","../test/switch.mjs":`const c = 'v2' + +switch (c) { + case 'v1': + print(1) + break; + default: + break; +} + +switch (c) { + case 'v1': + print(1) + break + case 'v2': + case 'v3': + print(2) + break + default: + break; +}`,"../test/throw.mjs":`const test = '' +if (test) { + throw new Error('!') +} +if (test) { + throw new CustomError({ message: "custom error" }) +} +if (test) { + throw '!!' +} +if (test) { + throw { message: 'bare object error' } +}`,"../test/transform.mjs":`const a = { b: '' } +String(1) +a.b.toString() +JSON.stringify({}) +JSON.parse('{}') +Number('2') +parseInt('2') +parseFloat('1') +Array.isArray(1)`,"../test/trycatch.mjs":`try { + const res = parseInt('fooo') + print(res) +} catch (error) { + // rename error to _err to prevent shadow lua's error function name + console.log(error) +} + +try { + const res = parseInt('fooo') + print(res) +} catch (error1) { + console.log(error1) +} +`,"../test/updateExpression.mjs":`// NOTE: both i++ and ++i means ++i to lua, don't use i++ in expression context! +// in statement context, use i = i ? 1 +i++; +--i; +// otherwise use a callback +let a = --i +let b = i++ +if (--i) { + print(i) +} + +`};for(const[P,A]of Object.entries(h))h[P]=gs(A);const u=xr([]);for(const P in h){const A=h[P],U=Ht(()=>s(A.value,l.value)),O=P.match(/\/(\w+)\.mjs$/)[1];u.push({name:O,jscode:A,luacode:U})}const d=Ht(()=>s(n.value,l.value)),c=Ht(()=>{var P;return(P=r(n.value,l.value))==null?void 0:P.program.body});function f(){m("luacode")}function p(){Fm.saveAs(new Blob([d.value]),"test11.lua")}function m(P){if(window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),document.selection){const A=document.body.createTextRange();A.moveToElementText(document.getElementById(P)),A.select().createTextRange(),document.execCommand("copy")}else if(window.getSelection){const A=document.createRange();A.selectNode(document.getElementById(P)),window.getSelection().addRange(A),document.execCommand("copy")}}const b=gs(!1);return pi(b,P=>{P?o.value=[...a]:o.value=[]}),(P,A)=>{const U=Th("highlightjs");return St(),Ct("div",null,[Ae("h1",Zm,[Ae("a",{href:"https://github.com/xiangnanscu/js2lua",title:Ki(Mo).version},Is(Ki(Mo).name),9,Qm),A[6]||(A[6]=Tn(" - Writing LuaJIT with the expressiveness of JavaScript. "))]),Ae("div",ey,[Ae("div",ty,[Ae("div",{class:bi({"error-wrapper":P.error})},[Ae("div",sy,[qs(Ae("input",{class:"form-check-input",type:"checkbox",id:"label-all","onUpdate:modelValue":A[0]||(A[0]=O=>e.value=O)},null,512),[[Xr,e.value]]),A[7]||(A[7]=Ae("label",{class:"form-check-label",for:"label-all",style:{color:"red"}}," show Js code ",-1))]),Ae("div",iy,[qs(Ae("input",{class:"form-check-input",type:"checkbox",id:"label-all","onUpdate:modelValue":A[1]||(A[1]=O=>b.value=O)},null,512),[[Xr,b.value]]),A[8]||(A[8]=Ae("label",{class:"form-check-label",for:"label-all",style:{color:"red"}}," all ",-1))]),(St(!0),Ct(dt,null,Hr(Ki(a),(O,S)=>(St(),Ct("div",{key:S,class:bi({"form-check":!0})},[qs(Ae("input",{class:"form-check-input",type:"checkbox",id:"label"+S,"onUpdate:modelValue":A[2]||(A[2]=W=>o.value=W),value:O},null,8,ry),[[Xr,o.value]]),Ae("label",{class:"form-check-label",for:"label"+S},Is(O),9,ny)]))),128))],2)]),Ae("div",ay,[Ae("button",{onClick:A[3]||(A[3]=O=>n.value="")},"clear textarea"),qs(Ae("textarea",{rows:"10",style:{height:"500px"},class:"form-control","onUpdate:modelValue":A[4]||(A[4]=O=>n.value=O)},null,512),[[no,n.value]])]),e.value?(St(),Ct("div",oy,[Ae("div",ly,[Ae("label",cy,[Ae("input",{onInput:A[5]||(A[5]=O=>t.value=!t.value),value:t.value,type:"checkbox",class:"form-check-input"},null,40,uy),A[9]||(A[9]=Tn("show js ast"))])]),t.value?(St(),Ct("div",hy,[Ae("pre",null,Is(c.value),1)])):(St(),Ct("div",fy,[Je(U,{language:"javascript",code:n.value},null,8,["code"])]))])):tf("",!0),Ae("div",py,[Ae("button",{onClick:f},"copy lua"),Ae("button",{onClick:p},"save as"),Je(U,{id:"luacode",language:"lua",code:d.value},null,8,["code"])])]),Ae("table",dy,[Ae("thead",null,[Ae("tr",null,[Ae("th",my,[A[10]||(A[10]=Ae("h1",null,"take a look at features:",-1)),(St(!0),Ct(dt,null,Hr(u,(O,S)=>(St(),Ct("div",{key:S},[Ae("a",{class:"link-block",href:`#${O.name}`},Is(O.name),9,yy)]))),128))])])]),Ae("tbody",null,[(St(!0),Ct(dt,null,Hr(u,(O,S)=>(St(),Ct(dt,{key:S},[Ae("tr",null,[Ae("td",gy,[Ae("h3",{id:O.name},Is(O.name),9,Ty)])]),Ae("tr",null,[Ae("td",by,[qs(Ae("textarea",{class:"td-textarea form-control","onUpdate:modelValue":W=>O.jscode=W},null,8,xy),[[no,O.jscode]])]),Ae("td",null,[Je(U,{language:"javascript",code:O.jscode,style:{width:"42em"}},null,8,["code"])]),Ae("td",null,[Je(U,{language:"lua",code:O.luacode,style:{width:"42em"}},null,8,["code"])])])],64))),128))])])])}}};function Lc(i){return i instanceof Map?i.clear=i.delete=i.set=function(){throw new Error("map is read-only")}:i instanceof Set&&(i.add=i.clear=i.delete=function(){throw new Error("set is read-only")}),Object.freeze(i),Object.getOwnPropertyNames(i).forEach(t=>{const e=i[t],s=typeof e;(s==="object"||s==="function")&&!Object.isFrozen(e)&&Lc(e)}),i}class Oo{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Ic(i){return i.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function ns(i,...t){const e=Object.create(null);for(const s in i)e[s]=i[s];return t.forEach(function(s){for(const r in s)e[r]=s[r]}),e}const Py="",Do=i=>!!i.scope,Ey=(i,{prefix:t})=>{if(i.startsWith("language:"))return i.replace("language:","language-");if(i.includes(".")){const e=i.split(".");return[`${t}${e.shift()}`,...e.map((s,r)=>`${s}${"_".repeat(r+1)}`)].join(" ")}return`${t}${i}`};class Ay{constructor(t,e){this.buffer="",this.classPrefix=e.classPrefix,t.walk(this)}addText(t){this.buffer+=Ic(t)}openNode(t){if(!Do(t))return;const e=Ey(t.scope,{prefix:this.classPrefix});this.span(e)}closeNode(t){!Do(t)||(this.buffer+=Py)}value(){return this.buffer}span(t){this.buffer+=``}}const Fo=(i={})=>{const t={children:[]};return Object.assign(t,i),t};class ya{constructor(){this.rootNode=Fo(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const e=Fo({scope:t});this.add(e),this.stack.push(e)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,e){return typeof e=="string"?t.addText(e):e.children&&(t.openNode(e),e.children.forEach(s=>this._walk(t,s)),t.closeNode(e)),t}static _collapse(t){typeof t!="string"&&(!t.children||(t.children.every(e=>typeof e=="string")?t.children=[t.children.join("")]:t.children.forEach(e=>{ya._collapse(e)})))}}class wy extends ya{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,e){const s=t.root;e&&(s.scope=`language:${e}`),this.add(s)}toHTML(){return new Ay(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function ki(i){return i?typeof i=="string"?i:i.source:null}function Nc(i){return Cs("(?=",i,")")}function Cy(i){return Cs("(?:",i,")*")}function ky(i){return Cs("(?:",i,")?")}function Cs(...i){return i.map(e=>ki(e)).join("")}function vy(i){const t=i[i.length-1];return typeof t=="object"&&t.constructor===Object?(i.splice(i.length-1,1),t):{}}function ga(...i){const t=vy(i);return"("+(t.capture?"":"?:")+i.map(s=>ki(s)).join("|")+")"}function _c(i){return new RegExp(i.toString()+"|").exec("").length-1}function Ly(i,t){const e=i&&i.exec(t);return e&&e.index===0}const Iy=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Ta(i,{joinWith:t}){let e=0;return i.map(s=>{e+=1;const r=e;let n=ki(s),a="";for(;n.length>0;){const o=Iy.exec(n);if(!o){a+=n;break}a+=n.substring(0,o.index),n=n.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?a+="\\"+String(Number(o[1])+r):(a+=o[0],o[0]==="("&&e++)}return a}).map(s=>`(${s})`).join(t)}const Ny=/\b\B/,Mc="[a-zA-Z]\\w*",ba="[a-zA-Z_]\\w*",Oc="\\b\\d+(\\.\\d+)?",Dc="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Fc="\\b(0b[01]+)",_y="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",My=(i={})=>{const t=/^#![ ]*\//;return i.binary&&(i.begin=Cs(t,/.*\b/,i.binary,/\b.*/)),ns({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,s)=>{e.index!==0&&s.ignoreMatch()}},i)},vi={begin:"\\\\[\\s\\S]",relevance:0},Oy={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[vi]},Dy={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[vi]},Fy={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},_r=function(i,t,e={}){const s=ns({scope:"comment",begin:i,end:t,contains:[]},e);s.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const r=ga("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return s.contains.push({begin:Cs(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),s},By=_r("//","$"),Ry=_r("/\\*","\\*/"),$y=_r("#","$"),jy={scope:"number",begin:Oc,relevance:0},Uy={scope:"number",begin:Dc,relevance:0},Vy={scope:"number",begin:Fc,relevance:0},Hy={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[vi,{begin:/\[/,end:/\]/,relevance:0,contains:[vi]}]},Gy={scope:"title",begin:Mc,relevance:0},Wy={scope:"title",begin:ba,relevance:0},Ky={begin:"\\.\\s*"+ba,relevance:0},qy=function(i){return Object.assign(i,{"on:begin":(t,e)=>{e.data._beginMatch=t[1]},"on:end":(t,e)=>{e.data._beginMatch!==t[1]&&e.ignoreMatch()}})};var Gi=Object.freeze({__proto__:null,APOS_STRING_MODE:Oy,BACKSLASH_ESCAPE:vi,BINARY_NUMBER_MODE:Vy,BINARY_NUMBER_RE:Fc,COMMENT:_r,C_BLOCK_COMMENT_MODE:Ry,C_LINE_COMMENT_MODE:By,C_NUMBER_MODE:Uy,C_NUMBER_RE:Dc,END_SAME_AS_BEGIN:qy,HASH_COMMENT_MODE:$y,IDENT_RE:Mc,MATCH_NOTHING_RE:Ny,METHOD_GUARD:Ky,NUMBER_MODE:jy,NUMBER_RE:Oc,PHRASAL_WORDS_MODE:Fy,QUOTE_STRING_MODE:Dy,REGEXP_MODE:Hy,RE_STARTERS_RE:_y,SHEBANG:My,TITLE_MODE:Gy,UNDERSCORE_IDENT_RE:ba,UNDERSCORE_TITLE_MODE:Wy});function zy(i,t){i.input[i.index-1]==="."&&t.ignoreMatch()}function Jy(i,t){i.className!==void 0&&(i.scope=i.className,delete i.className)}function Xy(i,t){!t||!i.beginKeywords||(i.begin="\\b("+i.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",i.__beforeBegin=zy,i.keywords=i.keywords||i.beginKeywords,delete i.beginKeywords,i.relevance===void 0&&(i.relevance=0))}function Yy(i,t){!Array.isArray(i.illegal)||(i.illegal=ga(...i.illegal))}function Zy(i,t){if(!!i.match){if(i.begin||i.end)throw new Error("begin & end are not supported with match");i.begin=i.match,delete i.match}}function Qy(i,t){i.relevance===void 0&&(i.relevance=1)}const eg=(i,t)=>{if(!i.beforeMatch)return;if(i.starts)throw new Error("beforeMatch cannot be used with starts");const e=Object.assign({},i);Object.keys(i).forEach(s=>{delete i[s]}),i.keywords=e.keywords,i.begin=Cs(e.beforeMatch,Nc(e.begin)),i.starts={relevance:0,contains:[Object.assign(e,{endsParent:!0})]},i.relevance=0,delete e.beforeMatch},tg=["of","and","for","in","not","or","if","then","parent","list","value"],sg="keyword";function Bc(i,t,e=sg){const s=Object.create(null);return typeof i=="string"?r(e,i.split(" ")):Array.isArray(i)?r(e,i):Object.keys(i).forEach(function(n){Object.assign(s,Bc(i[n],t,n))}),s;function r(n,a){t&&(a=a.map(o=>o.toLowerCase())),a.forEach(function(o){const l=o.split("|");s[l[0]]=[n,ig(l[0],l[1])]})}}function ig(i,t){return t?Number(t):rg(i)?0:1}function rg(i){return tg.includes(i.toLowerCase())}const Bo={},Ps=i=>{console.error(i)},Ro=(i,...t)=>{console.log(`WARN: ${i}`,...t)},Ls=(i,t)=>{Bo[`${i}/${t}`]||(console.log(`Deprecated as of ${i}. ${t}`),Bo[`${i}/${t}`]=!0)},fr=new Error;function Rc(i,t,{key:e}){let s=0;const r=i[e],n={},a={};for(let o=1;o<=t.length;o++)a[o+s]=r[o],n[o+s]=!0,s+=_c(t[o-1]);i[e]=a,i[e]._emit=n,i[e]._multi=!0}function ng(i){if(!!Array.isArray(i.begin)){if(i.skip||i.excludeBegin||i.returnBegin)throw Ps("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),fr;if(typeof i.beginScope!="object"||i.beginScope===null)throw Ps("beginScope must be object"),fr;Rc(i,i.begin,{key:"beginScope"}),i.begin=Ta(i.begin,{joinWith:""})}}function ag(i){if(!!Array.isArray(i.end)){if(i.skip||i.excludeEnd||i.returnEnd)throw Ps("skip, excludeEnd, returnEnd not compatible with endScope: {}"),fr;if(typeof i.endScope!="object"||i.endScope===null)throw Ps("endScope must be object"),fr;Rc(i,i.end,{key:"endScope"}),i.end=Ta(i.end,{joinWith:""})}}function og(i){i.scope&&typeof i.scope=="object"&&i.scope!==null&&(i.beginScope=i.scope,delete i.scope)}function lg(i){og(i),typeof i.beginScope=="string"&&(i.beginScope={_wrap:i.beginScope}),typeof i.endScope=="string"&&(i.endScope={_wrap:i.endScope}),ng(i),ag(i)}function cg(i){function t(a,o){return new RegExp(ki(a),"m"+(i.case_insensitive?"i":"")+(i.unicodeRegex?"u":"")+(o?"g":""))}class e{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,o]),this.matchAt+=_c(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const o=this.regexes.map(l=>l[1]);this.matcherRe=t(Ta(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(o);if(!l)return null;const h=l.findIndex((d,c)=>c>0&&d!==void 0),u=this.matchIndexes[h];return l.splice(0,h),Object.assign(l,u)}}class s{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];const l=new e;return this.rules.slice(o).forEach(([h,u])=>l.addRule(h,u)),l.compile(),this.multiRegexes[o]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,l){this.rules.push([o,l]),l.type==="begin"&&this.count++}exec(o){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let h=l.exec(o);if(this.resumingScanAtSamePosition()&&!(h&&h.index===this.lastIndex)){const u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,h=u.exec(o)}return h&&(this.regexIndex+=h.position+1,this.regexIndex===this.count&&this.considerAll()),h}}function r(a){const o=new s;return a.contains.forEach(l=>o.addRule(l.begin,{rule:l,type:"begin"})),a.terminatorEnd&&o.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&o.addRule(a.illegal,{type:"illegal"}),o}function n(a,o){const l=a;if(a.isCompiled)return l;[Jy,Zy,lg,eg].forEach(u=>u(a,o)),i.compilerExtensions.forEach(u=>u(a,o)),a.__beforeBegin=null,[Xy,Yy,Qy].forEach(u=>u(a,o)),a.isCompiled=!0;let h=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),h=a.keywords.$pattern,delete a.keywords.$pattern),h=h||/\w+/,a.keywords&&(a.keywords=Bc(a.keywords,i.case_insensitive)),l.keywordPatternRe=t(h,!0),o&&(a.begin||(a.begin=/\B|\b/),l.beginRe=t(l.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(l.endRe=t(l.end)),l.terminatorEnd=ki(l.end)||"",a.endsWithParent&&o.terminatorEnd&&(l.terminatorEnd+=(a.end?"|":"")+o.terminatorEnd)),a.illegal&&(l.illegalRe=t(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(u){return ug(u==="self"?a:u)})),a.contains.forEach(function(u){n(u,l)}),a.starts&&n(a.starts,o),l.matcher=r(l),l}if(i.compilerExtensions||(i.compilerExtensions=[]),i.contains&&i.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return i.classNameAliases=ns(i.classNameAliases||{}),n(i)}function $c(i){return i?i.endsWithParent||$c(i.starts):!1}function ug(i){return i.variants&&!i.cachedVariants&&(i.cachedVariants=i.variants.map(function(t){return ns(i,{variants:null},t)})),i.cachedVariants?i.cachedVariants:$c(i)?ns(i,{starts:i.starts?ns(i.starts):null}):Object.isFrozen(i)?ns(i):i}var hg="11.10.0";class fg extends Error{constructor(t,e){super(t),this.name="HTMLInjectionError",this.html=e}}const ln=Ic,$o=ns,jo=Symbol("nomatch"),pg=7,jc=function(i){const t=Object.create(null),e=Object.create(null),s=[];let r=!0;const n="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:wy};function l(x){return o.noHighlightRe.test(x)}function h(x){let C=x.className+" ";C+=x.parentNode?x.parentNode.className:"";const R=o.languageDetectRe.exec(C);if(R){const re=se(R[1]);return re||(Ro(n.replace("{}",R[1])),Ro("Falling back to no-highlight mode for this block.",x)),re?R[1]:"no-highlight"}return C.split(/\s+/).find(re=>l(re)||se(re))}function u(x,C,R){let re="",M="";typeof C=="object"?(re=x,R=C.ignoreIllegals,M=C.language):(Ls("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ls("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),M=x,re=C),R===void 0&&(R=!0);const F={code:re,language:M};ue("before:highlight",F);const N=F.result?F.result:d(F.language,F.code,R);return N.code=F.code,ue("after:highlight",N),N}function d(x,C,R,re){const M=Object.create(null);function F(J,ee){return J.keywords[ee]}function N(){if(!H.keywords){X.addText(G);return}let J=0;H.keywordPatternRe.lastIndex=0;let ee=H.keywordPatternRe.exec(G),le="";for(;ee;){le+=G.substring(J,ee.index);const xe=B.case_insensitive?ee[0].toLowerCase():ee[0],Pe=F(H,xe);if(Pe){const[_e,Ke]=Pe;if(X.addText(le),le="",M[xe]=(M[xe]||0)+1,M[xe]<=pg&&(ye+=Ke),_e.startsWith("_"))le+=ee[0];else{const ht=B.classNameAliases[_e]||_e;Q(ee[0],ht)}}else le+=ee[0];J=H.keywordPatternRe.lastIndex,ee=H.keywordPatternRe.exec(G)}le+=G.substring(J),X.addText(le)}function D(){if(G==="")return;let J=null;if(typeof H.subLanguage=="string"){if(!t[H.subLanguage]){X.addText(G);return}J=d(H.subLanguage,G,!0,te[H.subLanguage]),te[H.subLanguage]=J._top}else J=f(G,H.subLanguage.length?H.subLanguage:null);H.relevance>0&&(ye+=J.relevance),X.__addSublanguage(J._emitter,J.language)}function K(){H.subLanguage!=null?D():N(),G=""}function Q(J,ee){J!==""&&(X.startScope(ee),X.addText(J),X.endScope())}function Z(J,ee){let le=1;const xe=ee.length-1;for(;le<=xe;){if(!J._emit[le]){le++;continue}const Pe=B.classNameAliases[J[le]]||J[le],_e=ee[le];Pe?Q(_e,Pe):(G=_e,N(),G=""),le++}}function ce(J,ee){return J.scope&&typeof J.scope=="string"&&X.openNode(B.classNameAliases[J.scope]||J.scope),J.beginScope&&(J.beginScope._wrap?(Q(G,B.classNameAliases[J.beginScope._wrap]||J.beginScope._wrap),G=""):J.beginScope._multi&&(Z(J.beginScope,ee),G="")),H=Object.create(J,{parent:{value:H}}),H}function pe(J,ee,le){let xe=Ly(J.endRe,le);if(xe){if(J["on:end"]){const Pe=new Oo(J);J["on:end"](ee,Pe),Pe.isMatchIgnored&&(xe=!1)}if(xe){for(;J.endsParent&&J.parent;)J=J.parent;return J}}if(J.endsWithParent)return pe(J.parent,ee,le)}function ke(J){return H.matcher.regexIndex===0?(G+=J[0],1):(Te=!0,0)}function ve(J){const ee=J[0],le=J.rule,xe=new Oo(le),Pe=[le.__beforeBegin,le["on:begin"]];for(const _e of Pe)if(!!_e&&(_e(J,xe),xe.isMatchIgnored))return ke(ee);return le.skip?G+=ee:(le.excludeBegin&&(G+=ee),K(),!le.returnBegin&&!le.excludeBegin&&(G=ee)),ce(le,J),le.returnBegin?0:ee.length}function Ie(J){const ee=J[0],le=C.substring(J.index),xe=pe(H,J,le);if(!xe)return jo;const Pe=H;H.endScope&&H.endScope._wrap?(K(),Q(ee,H.endScope._wrap)):H.endScope&&H.endScope._multi?(K(),Z(H.endScope,J)):Pe.skip?G+=ee:(Pe.returnEnd||Pe.excludeEnd||(G+=ee),K(),Pe.excludeEnd&&(G=ee));do H.scope&&X.closeNode(),!H.skip&&!H.subLanguage&&(ye+=H.relevance),H=H.parent;while(H!==xe.parent);return xe.starts&&ce(xe.starts,J),Pe.returnEnd?0:ee.length}function E(){const J=[];for(let ee=H;ee!==B;ee=ee.parent)ee.scope&&J.unshift(ee.scope);J.forEach(ee=>X.openNode(ee))}let I={};function _(J,ee){const le=ee&&ee[0];if(G+=J,le==null)return K(),0;if(I.type==="begin"&&ee.type==="end"&&I.index===ee.index&&le===""){if(G+=C.slice(ee.index,ee.index+1),!r){const xe=new Error(`0 width match regex (${x})`);throw xe.languageName=x,xe.badRule=I.rule,xe}return 1}if(I=ee,ee.type==="begin")return ve(ee);if(ee.type==="illegal"&&!R){const xe=new Error('Illegal lexeme "'+le+'" for mode "'+(H.scope||"")+'"');throw xe.mode=H,xe}else if(ee.type==="end"){const xe=Ie(ee);if(xe!==jo)return xe}if(ee.type==="illegal"&&le==="")return 1;if(de>1e5&&de>ee.index*3)throw new Error("potential infinite loop, way more iterations than matches");return G+=le,le.length}const B=se(x);if(!B)throw Ps(n.replace("{}",x)),new Error('Unknown language: "'+x+'"');const $=cg(B);let q="",H=re||$;const te={},X=new o.__emitter(o);E();let G="",ye=0,ae=0,de=0,Te=!1;try{if(B.__emitTokens)B.__emitTokens(C,X);else{for(H.matcher.considerAll();;){de++,Te?Te=!1:H.matcher.considerAll(),H.matcher.lastIndex=ae;const J=H.matcher.exec(C);if(!J)break;const ee=C.substring(ae,J.index),le=_(ee,J);ae=J.index+le}_(C.substring(ae))}return X.finalize(),q=X.toHTML(),{language:x,value:q,relevance:ye,illegal:!1,_emitter:X,_top:H}}catch(J){if(J.message&&J.message.includes("Illegal"))return{language:x,value:ln(C),illegal:!0,relevance:0,_illegalBy:{message:J.message,index:ae,context:C.slice(ae-100,ae+100),mode:J.mode,resultSoFar:q},_emitter:X};if(r)return{language:x,value:ln(C),illegal:!1,relevance:0,errorRaised:J,_emitter:X,_top:H};throw J}}function c(x){const C={value:ln(x),illegal:!1,relevance:0,_top:a,_emitter:new o.__emitter(o)};return C._emitter.addText(x),C}function f(x,C){C=C||o.languages||Object.keys(t);const R=c(x),re=C.filter(se).filter(T).map(K=>d(K,x,!1));re.unshift(R);const M=re.sort((K,Q)=>{if(K.relevance!==Q.relevance)return Q.relevance-K.relevance;if(K.language&&Q.language){if(se(K.language).supersetOf===Q.language)return 1;if(se(Q.language).supersetOf===K.language)return-1}return 0}),[F,N]=M,D=F;return D.secondBest=N,D}function p(x,C,R){const re=C&&e[C]||R;x.classList.add("hljs"),x.classList.add(`language-${re}`)}function m(x){let C=null;const R=h(x);if(l(R))return;if(ue("before:highlightElement",{el:x,language:R}),x.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",x);return}if(x.children.length>0&&(o.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(x)),o.throwUnescapedHTML))throw new fg("One of your code blocks includes unescaped HTML.",x.innerHTML);C=x;const re=C.textContent,M=R?u(re,{language:R,ignoreIllegals:!0}):f(re);x.innerHTML=M.value,x.dataset.highlighted="yes",p(x,R,M.language),x.result={language:M.language,re:M.relevance,relevance:M.relevance},M.secondBest&&(x.secondBest={language:M.secondBest.language,relevance:M.secondBest.relevance}),ue("after:highlightElement",{el:x,result:M,text:re})}function b(x){o=$o(o,x)}const P=()=>{O(),Ls("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function A(){O(),Ls("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let U=!1;function O(){if(document.readyState==="loading"){U=!0;return}document.querySelectorAll(o.cssSelector).forEach(m)}function S(){U&&O()}typeof window!="undefined"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",S,!1);function W(x,C){let R=null;try{R=C(i)}catch(re){if(Ps("Language definition for '{}' could not be registered.".replace("{}",x)),r)Ps(re);else throw re;R=a}R.name||(R.name=x),t[x]=R,R.rawDefinition=C.bind(null,i),R.aliases&&ie(R.aliases,{languageName:x})}function fe(x){delete t[x];for(const C of Object.keys(e))e[C]===x&&delete e[C]}function g(){return Object.keys(t)}function se(x){return x=(x||"").toLowerCase(),t[x]||t[e[x]]}function ie(x,{languageName:C}){typeof x=="string"&&(x=[x]),x.forEach(R=>{e[R.toLowerCase()]=C})}function T(x){const C=se(x);return C&&!C.disableAutodetect}function k(x){x["before:highlightBlock"]&&!x["before:highlightElement"]&&(x["before:highlightElement"]=C=>{x["before:highlightBlock"](Object.assign({block:C.el},C))}),x["after:highlightBlock"]&&!x["after:highlightElement"]&&(x["after:highlightElement"]=C=>{x["after:highlightBlock"](Object.assign({block:C.el},C))})}function Y(x){k(x),s.push(x)}function z(x){const C=s.indexOf(x);C!==-1&&s.splice(C,1)}function ue(x,C){const R=x;s.forEach(function(re){re[R]&&re[R](C)})}function L(x){return Ls("10.7.0","highlightBlock will be removed entirely in v12.0"),Ls("10.7.0","Please use highlightElement now."),m(x)}Object.assign(i,{highlight:u,highlightAuto:f,highlightAll:O,highlightElement:m,highlightBlock:L,configure:b,initHighlighting:P,initHighlightingOnLoad:A,registerLanguage:W,unregisterLanguage:fe,listLanguages:g,getLanguage:se,registerAliases:ie,autoDetection:T,inherit:$o,addPlugin:Y,removePlugin:z}),i.debugMode=function(){r=!1},i.safeMode=function(){r=!0},i.versionString=hg,i.regex={concat:Cs,lookahead:Nc,either:ga,optional:ky,anyNumberOfTimes:Cy};for(const x in Gi)typeof Gi[x]=="object"&&Lc(Gi[x]);return Object.assign(i,Gi),i},Gs=jc({});Gs.newInstance=()=>jc({});var dg=Gs;Gs.HighlightJS=Gs;Gs.default=Gs;var Ti=dg;const Uo="[A-Za-z$_][0-9A-Za-z$_]*",mg=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],yg=["true","false","null","undefined","NaN","Infinity"],Uc=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Vc=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Hc=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],gg=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Tg=[].concat(Hc,Uc,Vc);function bg(i){const t=i.regex,e=(C,{after:R})=>{const re="",end:""},n=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(C,R)=>{const re=C[0].length+C.index,M=C.input[re];if(M==="<"||M===","){R.ignoreMatch();return}M===">"&&(e(C,{after:re})||R.ignoreMatch());let F;const N=C.input.substring(re);if(F=N.match(/^\s*=/)){R.ignoreMatch();return}if((F=N.match(/^\s+extends\s+/))&&F.index===0){R.ignoreMatch();return}}},o={$pattern:Uo,keyword:mg,literal:yg,built_in:Tg,"variable.language":gg},l="[0-9](_?[0-9])*",h=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${h})|\\.)?|(${h}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},c={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,c],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,c],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,c],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[i.BACKSLASH_ESCAPE,c]},P=i.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),A={className:"comment",variants:[P,i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE]},U=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,f,p,m,b,{match:/\$\d+/},d];c.contains=U.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(U)});const O=[].concat(A,c.contains),S=O.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(O)}]),W={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:S},fe={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,t.concat(s,"(",t.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},g={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Uc,...Vc]}},se={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},ie={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[W],illegal:/%/},T={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function k(C){return t.concat("(?!",C.join("|"),")")}const Y={match:t.concat(/\b/,k([...Hc,"super","import"].map(C=>`${C}\\s*\\(`)),s,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:t.concat(/\./,t.lookahead(t.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ue={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},W]},L="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+i.UNDERSCORE_IDENT_RE+")\\s*=>",x={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(L)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[W]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:S,CLASS_REFERENCE:g},illegal:/#(?![$_A-z])/,contains:[i.SHEBANG({label:"shebang",binary:"node",relevance:5}),se,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,f,p,m,b,A,{match:/\$\d+/},d,g,{className:"attr",begin:s+t.lookahead(":"),relevance:0},x,{begin:"("+i.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[A,i.REGEXP_MODE,{className:"function",begin:L,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:S}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:n},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},ie,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[W,i.inherit(i.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[W]},Y,T,fe,ue,{match:/\$[(.]/}]}}function xg(i){const t="\\[=*\\[",e="\\]=*\\]",s={begin:t,end:e,contains:["self"]},r=[i.COMMENT("--(?!"+t+")","$"),i.COMMENT("--"+t,e,{contains:[s],relevance:10})];return{name:"Lua",keywords:{$pattern:i.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:r.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[i.inherit(i.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:r}].concat(r)},i.C_NUMBER_MODE,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,{className:"string",begin:t,end:e,contains:[s],relevance:5}])}}var Vo=nh({props:{code:{type:String,required:!0},language:{type:String,default:""},autodetect:{type:Boolean,default:!0},ignoreIllegals:{type:Boolean,default:!0}},setup:function(i){var t=gs(i.language);pi(function(){return i.language},function(r){t.value=r});var e=Ht(function(){return i.autodetect||!t.value}),s=Ht(function(){return!e.value&&!Ti.getLanguage(t.value)});return{className:Ht(function(){return s.value?"":"hljs "+t.value}),highlightedCode:Ht(function(){var r;if(s.value)return console.warn('The language "'+t.value+'" you specified could not be found.'),i.code.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");if(e.value){var n=Ti.highlightAuto(i.code);return t.value=(r=n.language)!==null&&r!==void 0?r:"",n.value}return(n=Ti.highlight(i.code,{language:t.value,ignoreIllegals:i.ignoreIllegals})).value})}},render:function(){return Ka("pre",{},[Ka("code",{class:this.className,innerHTML:this.highlightedCode})])}}),Sg={install:function(i){i.component("highlightjs",Vo)},component:Vo};const Gc=Bf(Sy);Ti.registerLanguage("javascript",bg);Ti.registerLanguage("lua",xg);Gc.use(Sg);Gc.mount("#app")});export default Pg(); diff --git a/assets/index.39b4a8b0.js b/assets/index.39b4a8b0.js deleted file mode 100644 index 9ee00ad..0000000 --- a/assets/index.39b4a8b0.js +++ /dev/null @@ -1,546 +0,0 @@ -const jc=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const n of r)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function e(r){const n={};return r.integrity&&(n.integrity=r.integrity),r.referrerpolicy&&(n.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?n.credentials="include":r.crossorigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function s(r){if(r.ep)return;r.ep=!0;const n=e(r);fetch(r.href,n)}};jc();/** -* @vue/shared v3.5.11 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function Mn(i){const t=Object.create(null);for(const e of i.split(","))t[e]=1;return e=>e in t}const Je={},Gs=[],Ot=()=>{},Uc=()=>!1,gr=i=>i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&(i.charCodeAt(2)>122||i.charCodeAt(2)<97),On=i=>i.startsWith("onUpdate:"),ct=Object.assign,Dn=(i,t)=>{const e=i.indexOf(t);e>-1&&i.splice(e,1)},Vc=Object.prototype.hasOwnProperty,Ge=(i,t)=>Vc.call(i,t),Ie=Array.isArray,Ws=i=>Oi(i)==="[object Map]",Tr=i=>Oi(i)==="[object Set]",wa=i=>Oi(i)==="[object Date]",Oe=i=>typeof i=="function",nt=i=>typeof i=="string",Vt=i=>typeof i=="symbol",Ze=i=>i!==null&&typeof i=="object",Uo=i=>(Ze(i)||Oe(i))&&Oe(i.then)&&Oe(i.catch),Vo=Object.prototype.toString,Oi=i=>Vo.call(i),Hc=i=>Oi(i).slice(8,-1),Ho=i=>Oi(i)==="[object Object]",Fn=i=>nt(i)&&i!=="NaN"&&i[0]!=="-"&&""+parseInt(i,10)===i,mi=Mn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),br=i=>{const t=Object.create(null);return e=>t[e]||(t[e]=i(e))},Gc=/-(\w)/g,It=br(i=>i.replace(Gc,(t,e)=>e?e.toUpperCase():"")),Wc=/\B([A-Z])/g,Fs=br(i=>i.replace(Wc,"-$1").toLowerCase()),xr=br(i=>i.charAt(0).toUpperCase()+i.slice(1)),Vr=br(i=>i?`on${xr(i)}`:""),Ss=(i,t)=>!Object.is(i,t),Ji=(i,...t)=>{for(let e=0;e{Object.defineProperty(i,t,{configurable:!0,enumerable:!1,writable:s,value:e})},fn=i=>{const t=parseFloat(i);return isNaN(t)?i:t};let Ca;const Bn=()=>Ca||(Ca=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});function Rn(i){if(Ie(i)){const t={};for(let e=0;e{if(e){const s=e.split(qc);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function wi(i){let t="";if(nt(i))t=i;else if(Ie(i))for(let e=0;eSr(e,t))}const qo=i=>!!(i&&i.__v_isRef===!0),Us=i=>nt(i)?i:i==null?"":Ie(i)||Ze(i)&&(i.toString===Vo||!Oe(i.toString))?qo(i)?Us(i.value):JSON.stringify(i,zo,2):String(i),zo=(i,t)=>qo(t)?zo(i,t.value):Ws(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[s,r],n)=>(e[Hr(s,n)+" =>"]=r,e),{})}:Tr(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Hr(e))}:Vt(t)?Hr(t):Ze(t)&&!Ie(t)&&!Ho(t)?String(t):t,Hr=(i,t="")=>{var e;return Vt(i)?`Symbol(${(e=i.description)!=null?e:t})`:i};/** -* @vue/reactivity v3.5.11 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let At;class Qc{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=At,!t&&At&&(this.index=(At.scopes||(At.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,e;if(this.scopes)for(t=0,e=this.scopes.length;t0)return;if(gi){let t=gi;for(gi=void 0;t;){const e=t.next;t.next=void 0,t.flags&=-9,t=e}}let i;for(;yi;){let t=yi;for(yi=void 0;t;){const e=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){i||(i=s)}t=e}}if(i)throw i}function Zo(i){for(let t=i.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Qo(i){let t,e=i.depsTail,s=e;for(;s;){const r=s.prevDep;s.version===-1?(s===e&&(e=r),Un(s),tu(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}i.deps=t,i.depsTail=e}function pn(i){for(let t=i.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(el(t.dep.computed)||t.dep.version!==t.version))return!0;return!!i._dirty}function el(i){if(i.flags&4&&!(i.flags&16)||(i.flags&=-17,i.globalVersion===Ci))return;i.globalVersion=Ci;const t=i.dep;if(i.flags|=2,t.version>0&&!i.isSSR&&i.deps&&!pn(i)){i.flags&=-3;return}const e=Ye,s=Dt;Ye=i,Dt=!0;try{Zo(i);const r=i.fn(i._value);(t.version===0||Ss(r,i._value))&&(i._value=r,t.version++)}catch(r){throw t.version++,r}finally{Ye=e,Dt=s,Qo(i),i.flags&=-3}}function Un(i,t=!1){const{dep:e,prevSub:s,nextSub:r}=i;if(s&&(s.nextSub=r,i.prevSub=void 0),r&&(r.prevSub=s,i.nextSub=void 0),e.subs===i&&(e.subs=s),!e.subs&&e.computed){e.computed.flags&=-5;for(let n=e.computed.deps;n;n=n.nextDep)Un(n,!0)}!t&&!--e.sc&&e.map&&e.map.delete(e.key)}function tu(i){const{prevDep:t,nextDep:e}=i;t&&(t.nextDep=e,i.prevDep=void 0),e&&(e.prevDep=t,i.nextDep=void 0)}let Dt=!0;const tl=[];function Ps(){tl.push(Dt),Dt=!1}function Es(){const i=tl.pop();Dt=i===void 0?!0:i}function ka(i){const{cleanup:t}=i;if(i.cleanup=void 0,t){const e=Ye;Ye=void 0;try{t()}finally{Ye=e}}}let Ci=0;class su{constructor(t,e){this.sub=t,this.dep=e,this.version=e.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Vn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!Ye||!Dt||Ye===this.computed)return;let e=this.activeLink;if(e===void 0||e.sub!==Ye)e=this.activeLink=new su(Ye,this),Ye.deps?(e.prevDep=Ye.depsTail,Ye.depsTail.nextDep=e,Ye.depsTail=e):Ye.deps=Ye.depsTail=e,sl(e);else if(e.version===-1&&(e.version=this.version,e.nextDep)){const s=e.nextDep;s.prevDep=e.prevDep,e.prevDep&&(e.prevDep.nextDep=s),e.prevDep=Ye.depsTail,e.nextDep=void 0,Ye.depsTail.nextDep=e,Ye.depsTail=e,Ye.deps===e&&(Ye.deps=s)}return e}trigger(t){this.version++,Ci++,this.notify(t)}notify(t){$n();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{jn()}}}function sl(i){if(i.dep.sc++,i.sub.flags&4){const t=i.dep.computed;if(t&&!i.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)sl(s)}const e=i.dep.subs;e!==i&&(i.prevSub=e,e&&(e.nextSub=i)),i.dep.subs=i}}const dn=new WeakMap,_s=Symbol(""),mn=Symbol(""),ki=Symbol("");function dt(i,t,e){if(Dt&&Ye){let s=dn.get(i);s||dn.set(i,s=new Map);let r=s.get(e);r||(s.set(e,r=new Vn),r.map=s,r.key=e),r.track()}}function as(i,t,e,s,r,n){const a=dn.get(i);if(!a){Ci++;return}const o=l=>{l&&l.trigger()};if($n(),t==="clear")a.forEach(o);else{const l=Ie(i),h=l&&Fn(e);if(l&&e==="length"){const u=Number(s);a.forEach((b,P)=>{(P==="length"||P===ki||!Vt(P)&&P>=u)&&o(b)})}else switch(e!==void 0&&o(a.get(e)),h&&o(a.get(ki)),t){case"add":l?h&&o(a.get("length")):(o(a.get(_s)),Ws(i)&&o(a.get(mn)));break;case"delete":l||(o(a.get(_s)),Ws(i)&&o(a.get(mn)));break;case"set":Ws(i)&&o(a.get(_s));break}}jn()}function $s(i){const t=We(i);return t===i?t:(dt(t,"iterate",ki),Lt(i)?t:t.map(ht))}function Pr(i){return dt(i=We(i),"iterate",ki),i}const iu={__proto__:null,[Symbol.iterator](){return Wr(this,Symbol.iterator,ht)},concat(...i){return $s(this).concat(...i.map(t=>Ie(t)?$s(t):t))},entries(){return Wr(this,"entries",i=>(i[1]=ht(i[1]),i))},every(i,t){return qt(this,"every",i,t,void 0,arguments)},filter(i,t){return qt(this,"filter",i,t,e=>e.map(ht),arguments)},find(i,t){return qt(this,"find",i,t,ht,arguments)},findIndex(i,t){return qt(this,"findIndex",i,t,void 0,arguments)},findLast(i,t){return qt(this,"findLast",i,t,ht,arguments)},findLastIndex(i,t){return qt(this,"findLastIndex",i,t,void 0,arguments)},forEach(i,t){return qt(this,"forEach",i,t,void 0,arguments)},includes(...i){return Kr(this,"includes",i)},indexOf(...i){return Kr(this,"indexOf",i)},join(i){return $s(this).join(i)},lastIndexOf(...i){return Kr(this,"lastIndexOf",i)},map(i,t){return qt(this,"map",i,t,void 0,arguments)},pop(){return si(this,"pop")},push(...i){return si(this,"push",i)},reduce(i,...t){return va(this,"reduce",i,t)},reduceRight(i,...t){return va(this,"reduceRight",i,t)},shift(){return si(this,"shift")},some(i,t){return qt(this,"some",i,t,void 0,arguments)},splice(...i){return si(this,"splice",i)},toReversed(){return $s(this).toReversed()},toSorted(i){return $s(this).toSorted(i)},toSpliced(...i){return $s(this).toSpliced(...i)},unshift(...i){return si(this,"unshift",i)},values(){return Wr(this,"values",ht)}};function Wr(i,t,e){const s=Pr(i),r=s[t]();return s!==i&&!Lt(i)&&(r._next=r.next,r.next=()=>{const n=r._next();return n.value&&(n.value=e(n.value)),n}),r}const ru=Array.prototype;function qt(i,t,e,s,r,n){const a=Pr(i),o=a!==i&&!Lt(i),l=a[t];if(l!==ru[t]){const b=l.apply(i,n);return o?ht(b):b}let h=e;a!==i&&(o?h=function(b,P){return e.call(this,ht(b),P,i)}:e.length>2&&(h=function(b,P){return e.call(this,b,P,i)}));const u=l.call(a,h,s);return o&&r?r(u):u}function va(i,t,e,s){const r=Pr(i);let n=e;return r!==i&&(Lt(i)?e.length>3&&(n=function(a,o,l){return e.call(this,a,o,l,i)}):n=function(a,o,l){return e.call(this,a,ht(o),l,i)}),r[t](n,...s)}function Kr(i,t,e){const s=We(i);dt(s,"iterate",ki);const r=s[t](...e);return(r===-1||r===!1)&&Kn(e[0])?(e[0]=We(e[0]),s[t](...e)):r}function si(i,t,e=[]){Ps(),$n();const s=We(i)[t].apply(i,e);return jn(),Es(),s}const nu=Mn("__proto__,__v_isRef,__isVue"),il=new Set(Object.getOwnPropertyNames(Symbol).filter(i=>i!=="arguments"&&i!=="caller").map(i=>Symbol[i]).filter(Vt));function au(i){Vt(i)||(i=String(i));const t=We(this);return dt(t,"has",i),t.hasOwnProperty(i)}class rl{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,s){const r=this._isReadonly,n=this._isShallow;if(e==="__v_isReactive")return!r;if(e==="__v_isReadonly")return r;if(e==="__v_isShallow")return n;if(e==="__v_raw")return s===(r?n?bu:ll:n?ol:al).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const a=Ie(t);if(!r){let l;if(a&&(l=iu[e]))return l;if(e==="hasOwnProperty")return au}const o=Reflect.get(t,e,pt(t)?t:s);return(Vt(e)?il.has(e):nu(e))||(r||dt(t,"get",e),n)?o:pt(o)?a&&Fn(e)?o:o.value:Ze(o)?r?cl(o):Ar(o):o}}class nl extends rl{constructor(t=!1){super(!1,t)}set(t,e,s,r){let n=t[e];if(!this._isShallow){const l=Os(n);if(!Lt(s)&&!Os(s)&&(n=We(n),s=We(s)),!Ie(t)&&pt(n)&&!pt(s))return l?!1:(n.value=s,!0)}const a=Ie(t)&&Fn(e)?Number(e)i,Er=i=>Reflect.getPrototypeOf(i);function $i(i,t,e=!1,s=!1){i=i.__v_raw;const r=We(i),n=We(t);e||(Ss(t,n)&&dt(r,"get",t),dt(r,"get",n));const{has:a}=Er(r),o=s?Hn:e?qn:ht;if(a.call(r,t))return o(i.get(t));if(a.call(r,n))return o(i.get(n));i!==r&&i.get(t)}function ji(i,t=!1){const e=this.__v_raw,s=We(e),r=We(i);return t||(Ss(i,r)&&dt(s,"has",i),dt(s,"has",r)),i===r?e.has(i):e.has(i)||e.has(r)}function Ui(i,t=!1){return i=i.__v_raw,!t&&dt(We(i),"iterate",_s),Reflect.get(i,"size",i)}function La(i,t=!1){!t&&!Lt(i)&&!Os(i)&&(i=We(i));const e=We(this);return Er(e).has.call(e,i)||(e.add(i),as(e,"add",i,i)),this}function Ia(i,t,e=!1){!e&&!Lt(t)&&!Os(t)&&(t=We(t));const s=We(this),{has:r,get:n}=Er(s);let a=r.call(s,i);a||(i=We(i),a=r.call(s,i));const o=n.call(s,i);return s.set(i,t),a?Ss(t,o)&&as(s,"set",i,t):as(s,"add",i,t),this}function Na(i){const t=We(this),{has:e,get:s}=Er(t);let r=e.call(t,i);r||(i=We(i),r=e.call(t,i)),s&&s.call(t,i);const n=t.delete(i);return r&&as(t,"delete",i,void 0),n}function _a(){const i=We(this),t=i.size!==0,e=i.clear();return t&&as(i,"clear",void 0,void 0),e}function Vi(i,t){return function(s,r){const n=this,a=n.__v_raw,o=We(a),l=t?Hn:i?qn:ht;return!i&&dt(o,"iterate",_s),a.forEach((h,u)=>s.call(r,l(h),l(u),n))}}function Hi(i,t,e){return function(...s){const r=this.__v_raw,n=We(r),a=Ws(n),o=i==="entries"||i===Symbol.iterator&&a,l=i==="keys"&&a,h=r[i](...s),u=e?Hn:t?qn:ht;return!t&&dt(n,"iterate",l?mn:_s),{next(){const{value:b,done:P}=h.next();return P?{value:b,done:P}:{value:o?[u(b[0]),u(b[1])]:u(b),done:P}},[Symbol.iterator](){return this}}}}function hs(i){return function(...t){return i==="delete"?!1:i==="clear"?void 0:this}}function hu(){const i={get(n){return $i(this,n)},get size(){return Ui(this)},has:ji,add:La,set:Ia,delete:Na,clear:_a,forEach:Vi(!1,!1)},t={get(n){return $i(this,n,!1,!0)},get size(){return Ui(this)},has:ji,add(n){return La.call(this,n,!0)},set(n,a){return Ia.call(this,n,a,!0)},delete:Na,clear:_a,forEach:Vi(!1,!0)},e={get(n){return $i(this,n,!0)},get size(){return Ui(this,!0)},has(n){return ji.call(this,n,!0)},add:hs("add"),set:hs("set"),delete:hs("delete"),clear:hs("clear"),forEach:Vi(!0,!1)},s={get(n){return $i(this,n,!0,!0)},get size(){return Ui(this,!0)},has(n){return ji.call(this,n,!0)},add:hs("add"),set:hs("set"),delete:hs("delete"),clear:hs("clear"),forEach:Vi(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(n=>{i[n]=Hi(n,!1,!1),e[n]=Hi(n,!0,!1),t[n]=Hi(n,!1,!0),s[n]=Hi(n,!0,!0)}),[i,e,t,s]}const[fu,pu,du,mu]=hu();function Gn(i,t){const e=t?i?mu:du:i?pu:fu;return(s,r,n)=>r==="__v_isReactive"?!i:r==="__v_isReadonly"?i:r==="__v_raw"?s:Reflect.get(Ge(e,r)&&r in s?e:s,r,n)}const yu={get:Gn(!1,!1)},gu={get:Gn(!1,!0)},Tu={get:Gn(!0,!1)};const al=new WeakMap,ol=new WeakMap,ll=new WeakMap,bu=new WeakMap;function xu(i){switch(i){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Su(i){return i.__v_skip||!Object.isExtensible(i)?0:xu(Hc(i))}function Ar(i){return Os(i)?i:Wn(i,!1,lu,yu,al)}function Pu(i){return Wn(i,!1,uu,gu,ol)}function cl(i){return Wn(i,!0,cu,Tu,ll)}function Wn(i,t,e,s,r){if(!Ze(i)||i.__v_raw&&!(t&&i.__v_isReactive))return i;const n=r.get(i);if(n)return n;const a=Su(i);if(a===0)return i;const o=new Proxy(i,a===2?s:e);return r.set(i,o),o}function Ks(i){return Os(i)?Ks(i.__v_raw):!!(i&&i.__v_isReactive)}function Os(i){return!!(i&&i.__v_isReadonly)}function Lt(i){return!!(i&&i.__v_isShallow)}function Kn(i){return i?!!i.__v_raw:!1}function We(i){const t=i&&i.__v_raw;return t?We(t):i}function Eu(i){return!Ge(i,"__v_skip")&&Object.isExtensible(i)&&Go(i,"__v_skip",!0),i}const ht=i=>Ze(i)?Ar(i):i,qn=i=>Ze(i)?cl(i):i;function pt(i){return i?i.__v_isRef===!0:!1}function Ls(i){return Au(i,!1)}function Au(i,t){return pt(i)?i:new wu(i,t)}class wu{constructor(t,e){this.dep=new Vn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:We(t),this._value=e?t:ht(t),this.__v_isShallow=e}get value(){return this.dep.track(),this._value}set value(t){const e=this._rawValue,s=this.__v_isShallow||Lt(t)||Os(t);t=s?t:We(t),Ss(t,e)&&(this._rawValue=t,this._value=s?t:ht(t),this.dep.trigger())}}function Xi(i){return pt(i)?i.value:i}const Cu={get:(i,t,e)=>t==="__v_raw"?i:Xi(Reflect.get(i,t,e)),set:(i,t,e,s)=>{const r=i[t];return pt(r)&&!pt(e)?(r.value=e,!0):Reflect.set(i,t,e,s)}};function ul(i){return Ks(i)?i:new Proxy(i,Cu)}class ku{constructor(t,e,s){this.fn=t,this.setter=e,this._value=void 0,this.dep=new Vn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ci-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!e,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ye!==this)return Yo(this,!0),!0}get value(){const t=this.dep.track();return el(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function vu(i,t,e=!1){let s,r;return Oe(i)?s=i:(s=i.get,r=i.set),new ku(s,r,e)}const Gi={},nr=new WeakMap;let Is;function Lu(i,t=!1,e=Is){if(e){let s=nr.get(e);s||nr.set(e,s=[]),s.push(i)}}function Iu(i,t,e=Je){const{immediate:s,deep:r,once:n,scheduler:a,augmentJob:o,call:l}=e,h=W=>r?W:Lt(W)||r===!1||r===0?Qt(W,1):Qt(W);let u,b,P,I,A=!1,j=!1;if(pt(i)?(b=()=>i.value,A=Lt(i)):Ks(i)?(b=()=>h(i),A=!0):Ie(i)?(j=!0,A=i.some(W=>Ks(W)||Lt(W)),b=()=>i.map(W=>{if(pt(W))return W.value;if(Ks(W))return h(W);if(Oe(W))return l?l(W,2):W()})):Oe(i)?t?b=l?()=>l(i,2):i:b=()=>{if(P){Ps();try{P()}finally{Es()}}const W=Is;Is=u;try{return l?l(i,3,[I]):i(I)}finally{Is=W}}:b=Ot,t&&r){const W=b,k=r===!0?1/0:r;b=()=>Qt(W(),k)}const H=eu(),D=()=>{u.stop(),H&&Dn(H.effects,u)};if(n&&t){const W=t;t=(...k)=>{W(...k),D()}}let B=j?new Array(i.length).fill(Gi):Gi;const ie=W=>{if(!(!(u.flags&1)||!u.dirty&&!W))if(t){const k=u.run();if(r||A||(j?k.some((me,De)=>Ss(me,B[De])):Ss(k,B))){P&&P();const me=Is;Is=u;try{const De=[k,B===Gi?void 0:j&&B[0]===Gi?[]:B,I];l?l(t,3,De):t(...De),B=k}finally{Is=me}}}else u.run()};return o&&o(ie),u=new Jo(b),u.scheduler=a?()=>a(ie,!1):ie,I=W=>Lu(W,!1,u),P=u.onStop=()=>{const W=nr.get(u);if(W){if(l)l(W,4);else for(const k of W)k();nr.delete(u)}},t?s?ie(!0):B=u.run():a?a(ie.bind(null,!0),!0):u.run(),D.pause=u.pause.bind(u),D.resume=u.resume.bind(u),D.stop=D,D}function Qt(i,t=1/0,e){if(t<=0||!Ze(i)||i.__v_skip||(e=e||new Set,e.has(i)))return i;if(e.add(i),t--,pt(i))Qt(i.value,t,e);else if(Ie(i))for(let s=0;s{Qt(s,t,e)});else if(Ho(i)){for(const s in i)Qt(i[s],t,e);for(const s of Object.getOwnPropertySymbols(i))Object.prototype.propertyIsEnumerable.call(i,s)&&Qt(i[s],t,e)}return i}/** -* @vue/runtime-core v3.5.11 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Di(i,t,e,s){try{return s?i(...s):i()}catch(r){wr(r,t,e)}}function Ht(i,t,e,s){if(Oe(i)){const r=Di(i,t,e,s);return r&&Uo(r)&&r.catch(n=>{wr(n,t,e)}),r}if(Ie(i)){const r=[];for(let n=0;n>>1,r=xt[s],n=vi(r);n=vi(e)?xt.push(i):xt.splice(Mu(t),0,i),i.flags|=1,fl()}}function fl(){ar||(ar=hl.then(dl))}function Ou(i){Ie(i)?qs.push(...i):ys&&i.id===-1?ys.splice(Vs+1,0,i):i.flags&1||(qs.push(i),i.flags|=1),fl()}function Ma(i,t,e=jt+1){for(;evi(e)-vi(s));if(qs.length=0,ys){ys.push(...t);return}for(ys=t,Vs=0;Vsi.id==null?i.flags&2?-1:1/0:i.id;function dl(i){const t=Ot;try{for(jt=0;jt{s._d&&Va(-1);const n=or(t);let a;try{a=i(...r)}finally{or(n),s._d&&Va(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function ii(i,t){if(Ct===null)return i;const e=Ir(Ct),s=i.dirs||(i.dirs=[]);for(let r=0;ri.__isTeleport;function Jn(i,t){i.shapeFlag&6&&i.component?(i.transition=t,Jn(i.component.subTree,t)):i.shapeFlag&128?(i.ssContent.transition=t.clone(i.ssContent),i.ssFallback.transition=t.clone(i.ssFallback)):i.transition=t}/*! #__NO_SIDE_EFFECTS__ */function Ru(i,t){return Oe(i)?(()=>ct({name:i.name},t,{setup:i}))():i}function yl(i){i.ids=[i.ids[0]+i.ids[2]+++"-",0,0]}function yn(i,t,e,s,r=!1){if(Ie(i)){i.forEach((A,j)=>yn(A,t&&(Ie(t)?t[j]:t),e,s,r));return}if(Ti(s)&&!r)return;const n=s.shapeFlag&4?Ir(s.component):s.el,a=r?null:n,{i:o,r:l}=i,h=t&&t.r,u=o.refs===Je?o.refs={}:o.refs,b=o.setupState,P=We(b),I=b===Je?()=>!1:A=>Ge(P,A);if(h!=null&&h!==l&&(nt(h)?(u[h]=null,I(h)&&(b[h]=null)):pt(h)&&(h.value=null)),Oe(l))Di(l,o,12,[a,u]);else{const A=nt(l),j=pt(l);if(A||j){const H=()=>{if(i.f){const D=A?I(l)?b[l]:u[l]:l.value;r?Ie(D)&&Dn(D,n):Ie(D)?D.includes(n)||D.push(n):A?(u[l]=[n],I(l)&&(b[l]=u[l])):(l.value=[n],i.k&&(u[i.k]=l.value))}else A?(u[l]=a,I(l)&&(b[l]=a)):j&&(l.value=a,i.k&&(u[i.k]=a))};a?(H.id=-1,Et(H,e)):H()}}}const Ti=i=>!!i.type.__asyncLoader,gl=i=>i.type.__isKeepAlive;function $u(i,t){Tl(i,"a",t)}function ju(i,t){Tl(i,"da",t)}function Tl(i,t,e=ft){const s=i.__wdc||(i.__wdc=()=>{let r=e;for(;r;){if(r.isDeactivated)return;r=r.parent}return i()});if(Cr(t,s,e),e){let r=e.parent;for(;r&&r.parent;)gl(r.parent.vnode)&&Uu(s,t,e,r),r=r.parent}}function Uu(i,t,e,s){const r=Cr(t,i,s,!0);bl(()=>{Dn(s[t],r)},e)}function Cr(i,t,e=ft,s=!1){if(e){const r=e[i]||(e[i]=[]),n=t.__weh||(t.__weh=(...a)=>{Ps();const o=Fi(e),l=Ht(t,e,i,a);return o(),Es(),l});return s?r.unshift(n):r.push(n),n}}const cs=i=>(t,e=ft)=>{(!Lr||i==="sp")&&Cr(i,(...s)=>t(...s),e)},Vu=cs("bm"),Hu=cs("m"),Gu=cs("bu"),Wu=cs("u"),Ku=cs("bum"),bl=cs("um"),qu=cs("sp"),zu=cs("rtg"),Ju=cs("rtc");function Xu(i,t=ft){Cr("ec",i,t)}const xl="components";function Yu(i,t){return Qu(xl,i,!0,t)||i}const Zu=Symbol.for("v-ndc");function Qu(i,t,e=!0,s=!1){const r=Ct||ft;if(r){const n=r.type;if(i===xl){const o=Hh(n,!1);if(o&&(o===t||o===It(t)||o===xr(It(t))))return n}const a=Oa(r[i]||n[i],t)||Oa(r.appContext[i],t);return!a&&s?n:a}}function Oa(i,t){return i&&(i[t]||i[It(t)]||i[xr(It(t))])}function qr(i,t,e,s){let r;const n=e&&e[s],a=Ie(i);if(a||nt(i)){const o=a&&Ks(i);let l=!1;o&&(l=!Lt(i),i=Pr(i)),r=new Array(i.length);for(let h=0,u=i.length;ht(o,l,void 0,n&&n[l]));else{const o=Object.keys(i);r=new Array(o.length);for(let l=0,h=o.length;li?jl(i)?Ir(i):gn(i.parent):null,bi=ct(Object.create(null),{$:i=>i,$el:i=>i.vnode.el,$data:i=>i.data,$props:i=>i.props,$attrs:i=>i.attrs,$slots:i=>i.slots,$refs:i=>i.refs,$parent:i=>gn(i.parent),$root:i=>gn(i.root),$host:i=>i.ce,$emit:i=>i.emit,$options:i=>Xn(i),$forceUpdate:i=>i.f||(i.f=()=>{zn(i.update)}),$nextTick:i=>i.n||(i.n=_u.bind(i.proxy)),$watch:i=>Ph.bind(i)}),zr=(i,t)=>i!==Je&&!i.__isScriptSetup&&Ge(i,t),eh={get({_:i},t){if(t==="__v_skip")return!0;const{ctx:e,setupState:s,data:r,props:n,accessCache:a,type:o,appContext:l}=i;let h;if(t[0]!=="$"){const I=a[t];if(I!==void 0)switch(I){case 1:return s[t];case 2:return r[t];case 4:return e[t];case 3:return n[t]}else{if(zr(s,t))return a[t]=1,s[t];if(r!==Je&&Ge(r,t))return a[t]=2,r[t];if((h=i.propsOptions[0])&&Ge(h,t))return a[t]=3,n[t];if(e!==Je&&Ge(e,t))return a[t]=4,e[t];Tn&&(a[t]=0)}}const u=bi[t];let b,P;if(u)return t==="$attrs"&&dt(i.attrs,"get",""),u(i);if((b=o.__cssModules)&&(b=b[t]))return b;if(e!==Je&&Ge(e,t))return a[t]=4,e[t];if(P=l.config.globalProperties,Ge(P,t))return P[t]},set({_:i},t,e){const{data:s,setupState:r,ctx:n}=i;return zr(r,t)?(r[t]=e,!0):s!==Je&&Ge(s,t)?(s[t]=e,!0):Ge(i.props,t)||t[0]==="$"&&t.slice(1)in i?!1:(n[t]=e,!0)},has({_:{data:i,setupState:t,accessCache:e,ctx:s,appContext:r,propsOptions:n}},a){let o;return!!e[a]||i!==Je&&Ge(i,a)||zr(t,a)||(o=n[0])&&Ge(o,a)||Ge(s,a)||Ge(bi,a)||Ge(r.config.globalProperties,a)},defineProperty(i,t,e){return e.get!=null?i._.accessCache[t]=0:Ge(e,"value")&&this.set(i,t,e.value,null),Reflect.defineProperty(i,t,e)}};function Da(i){return Ie(i)?i.reduce((t,e)=>(t[e]=null,t),{}):i}let Tn=!0;function th(i){const t=Xn(i),e=i.proxy,s=i.ctx;Tn=!1,t.beforeCreate&&Fa(t.beforeCreate,i,"bc");const{data:r,computed:n,methods:a,watch:o,provide:l,inject:h,created:u,beforeMount:b,mounted:P,beforeUpdate:I,updated:A,activated:j,deactivated:H,beforeDestroy:D,beforeUnmount:B,destroyed:ie,unmounted:W,render:k,renderTracked:me,renderTriggered:De,errorCaptured:g,serverPrefetch:he,expose:fe,inheritAttrs:S,components:N,directives:le,filters:re}=t;if(h&&sh(h,s,null),a)for(const E in a){const L=a[E];Oe(L)&&(s[E]=L.bind(e))}if(r){const E=r.call(e,e);Ze(E)&&(i.data=Ar(E))}if(Tn=!0,n)for(const E in n){const L=n[E],q=Oe(L)?L.bind(e,e):Oe(L.get)?L.get.bind(e,e):Ot,pe=!Oe(L)&&Oe(L.set)?L.set.bind(e):Ot,Se=ss({get:q,set:pe});Object.defineProperty(s,E,{enumerable:!0,configurable:!0,get:()=>Se.value,set:Ce=>Se.value=Ce})}if(o)for(const E in o)Sl(o[E],s,e,E);if(l){const E=Oe(l)?l.call(e):l;Reflect.ownKeys(E).forEach(L=>{lh(L,E[L])})}u&&Fa(u,i,"c");function C(E,L){Ie(L)?L.forEach(q=>E(q.bind(e))):L&&E(L.bind(e))}if(C(Vu,b),C(Hu,P),C(Gu,I),C(Wu,A),C($u,j),C(ju,H),C(Xu,g),C(Ju,me),C(zu,De),C(Ku,B),C(bl,W),C(qu,he),Ie(fe))if(fe.length){const E=i.exposed||(i.exposed={});fe.forEach(L=>{Object.defineProperty(E,L,{get:()=>e[L],set:q=>e[L]=q})})}else i.exposed||(i.exposed={});k&&i.render===Ot&&(i.render=k),S!=null&&(i.inheritAttrs=S),N&&(i.components=N),le&&(i.directives=le),he&&yl(i)}function sh(i,t,e=Ot){Ie(i)&&(i=bn(i));for(const s in i){const r=i[s];let n;Ze(r)?"default"in r?n=Yi(r.from||s,r.default,!0):n=Yi(r.from||s):n=Yi(r),pt(n)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>n.value,set:a=>n.value=a}):t[s]=n}}function Fa(i,t,e){Ht(Ie(i)?i.map(s=>s.bind(t.proxy)):i.bind(t.proxy),t,e)}function Sl(i,t,e,s){let r=s.includes(".")?Dl(e,s):()=>e[s];if(nt(i)){const n=t[i];Oe(n)&&xi(r,n)}else if(Oe(i))xi(r,i.bind(e));else if(Ze(i))if(Ie(i))i.forEach(n=>Sl(n,t,e,s));else{const n=Oe(i.handler)?i.handler.bind(e):t[i.handler];Oe(n)&&xi(r,n,i)}}function Xn(i){const t=i.type,{mixins:e,extends:s}=t,{mixins:r,optionsCache:n,config:{optionMergeStrategies:a}}=i.appContext,o=n.get(t);let l;return o?l=o:!r.length&&!e&&!s?l=t:(l={},r.length&&r.forEach(h=>lr(l,h,a,!0)),lr(l,t,a)),Ze(t)&&n.set(t,l),l}function lr(i,t,e,s=!1){const{mixins:r,extends:n}=t;n&&lr(i,n,e,!0),r&&r.forEach(a=>lr(i,a,e,!0));for(const a in t)if(!(s&&a==="expose")){const o=ih[a]||e&&e[a];i[a]=o?o(i[a],t[a]):t[a]}return i}const ih={data:Ba,props:Ra,emits:Ra,methods:hi,computed:hi,beforeCreate:bt,created:bt,beforeMount:bt,mounted:bt,beforeUpdate:bt,updated:bt,beforeDestroy:bt,beforeUnmount:bt,destroyed:bt,unmounted:bt,activated:bt,deactivated:bt,errorCaptured:bt,serverPrefetch:bt,components:hi,directives:hi,watch:nh,provide:Ba,inject:rh};function Ba(i,t){return t?i?function(){return ct(Oe(i)?i.call(this,this):i,Oe(t)?t.call(this,this):t)}:t:i}function rh(i,t){return hi(bn(i),bn(t))}function bn(i){if(Ie(i)){const t={};for(let e=0;e1)return e&&Oe(t)?t.call(s&&s.proxy):t}}const El={},Al=()=>Object.create(El),wl=i=>Object.getPrototypeOf(i)===El;function ch(i,t,e,s=!1){const r={},n=Al();i.propsDefaults=Object.create(null),Cl(i,t,r,n);for(const a in i.propsOptions[0])a in r||(r[a]=void 0);e?i.props=s?r:Pu(r):i.type.props?i.props=r:i.props=n,i.attrs=n}function uh(i,t,e,s){const{props:r,attrs:n,vnode:{patchFlag:a}}=i,o=We(r),[l]=i.propsOptions;let h=!1;if((s||a>0)&&!(a&16)){if(a&8){const u=i.vnode.dynamicProps;for(let b=0;b{l=!0;const[P,I]=kl(b,t,!0);ct(a,P),I&&o.push(...I)};!e&&t.mixins.length&&t.mixins.forEach(u),i.extends&&u(i.extends),i.mixins&&i.mixins.forEach(u)}if(!n&&!l)return Ze(i)&&s.set(i,Gs),Gs;if(Ie(n))for(let u=0;ui[0]==="_"||i==="$stable",Yn=i=>Ie(i)?i.map(Ut):[Ut(i)],fh=(i,t,e)=>{if(t._n)return t;const s=Du((...r)=>Yn(t(...r)),e);return s._c=!1,s},Ll=(i,t,e)=>{const s=i._ctx;for(const r in i){if(vl(r))continue;const n=i[r];if(Oe(n))t[r]=fh(r,n,s);else if(n!=null){const a=Yn(n);t[r]=()=>a}}},Il=(i,t)=>{const e=Yn(t);i.slots.default=()=>e},Nl=(i,t,e)=>{for(const s in t)(e||s!=="_")&&(i[s]=t[s])},ph=(i,t,e)=>{const s=i.slots=Al();if(i.vnode.shapeFlag&32){const r=t._;r?(Nl(s,t,e),e&&Go(s,"_",r,!0)):Ll(t,s)}else t&&Il(i,t)},dh=(i,t,e)=>{const{vnode:s,slots:r}=i;let n=!0,a=Je;if(s.shapeFlag&32){const o=t._;o?e&&o===1?n=!1:Nl(r,t,e):(n=!t.$stable,Ll(t,r)),a=t}else t&&(Il(i,t),a={default:1});if(n)for(const o in r)!vl(o)&&a[o]==null&&delete r[o]};function mh(){typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__!="boolean"&&(Bn().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1)}const Et=Lh;function yh(i){return gh(i)}function gh(i,t){mh();const e=Bn();e.__VUE__=!0;const{insert:s,remove:r,patchProp:n,createElement:a,createText:o,createComment:l,setText:h,setElementText:u,parentNode:b,nextSibling:P,setScopeId:I=Ot,insertStaticContent:A}=i,j=(d,T,c,p=null,y=null,x=null,w=void 0,X=null,K=!!T.dynamicChildren)=>{if(d===T)return;d&&!ri(d,T)&&(p=R(d),Ce(d,y,x,!0),d=null),T.patchFlag===-2&&(K=!1,T.dynamicChildren=null);const{type:J,ref:Ee,shapeFlag:ne}=T;switch(J){case vr:H(d,T,c,p);break;case Ds:D(d,T,c,p);break;case Yr:d==null&&B(T,c,p,w);break;case wt:N(d,T,c,p,y,x,w,X,K);break;default:ne&1?k(d,T,c,p,y,x,w,X,K):ne&6?le(d,T,c,p,y,x,w,X,K):(ne&64||ne&128)&&J.process(d,T,c,p,y,x,w,X,K,U)}Ee!=null&&y&&yn(Ee,d&&d.ref,x,T||d,!T)},H=(d,T,c,p)=>{if(d==null)s(T.el=o(T.children),c,p);else{const y=T.el=d.el;T.children!==d.children&&h(y,T.children)}},D=(d,T,c,p)=>{d==null?s(T.el=l(T.children||""),c,p):T.el=d.el},B=(d,T,c,p)=>{[d.el,d.anchor]=A(d.children,T,c,p,d.el,d.anchor)},ie=({el:d,anchor:T},c,p)=>{let y;for(;d&&d!==T;)y=P(d),s(d,c,p),d=y;s(T,c,p)},W=({el:d,anchor:T})=>{let c;for(;d&&d!==T;)c=P(d),r(d),d=c;r(T)},k=(d,T,c,p,y,x,w,X,K)=>{T.type==="svg"?w="svg":T.type==="math"&&(w="mathml"),d==null?me(T,c,p,y,x,w,X,K):he(d,T,y,x,w,X,K)},me=(d,T,c,p,y,x,w,X)=>{let K,J;const{props:Ee,shapeFlag:ne,transition:oe,dirs:be}=d;if(K=d.el=a(d.type,x,Ee&&Ee.is,Ee),ne&8?u(K,d.children):ne&16&&g(d.children,K,null,p,y,Jr(d,x),w,X),be&&ws(d,null,p,"created"),De(K,d,d.scopeId,w,p),Ee){for(const ue in Ee)ue!=="value"&&!mi(ue)&&n(K,ue,null,Ee[ue],x,p);"value"in Ee&&n(K,"value",null,Ee.value,x),(J=Ee.onVnodeBeforeMount)&&Rt(J,p,d)}be&&ws(d,null,p,"beforeMount");const se=Th(y,oe);se&&oe.beforeEnter(K),s(K,T,c),((J=Ee&&Ee.onVnodeMounted)||se||be)&&Et(()=>{J&&Rt(J,p,d),se&&oe.enter(K),be&&ws(d,null,p,"mounted")},y)},De=(d,T,c,p,y)=>{if(c&&I(d,c),p)for(let x=0;x{for(let J=K;J{const X=T.el=d.el;let{patchFlag:K,dynamicChildren:J,dirs:Ee}=T;K|=d.patchFlag&16;const ne=d.props||Je,oe=T.props||Je;let be;if(c&&Cs(c,!1),(be=oe.onVnodeBeforeUpdate)&&Rt(be,c,T,d),Ee&&ws(T,d,c,"beforeUpdate"),c&&Cs(c,!0),(ne.innerHTML&&oe.innerHTML==null||ne.textContent&&oe.textContent==null)&&u(X,""),J?fe(d.dynamicChildren,J,X,c,p,Jr(T,y),x):w||L(d,T,X,null,c,p,Jr(T,y),x,!1),K>0){if(K&16)S(X,ne,oe,c,y);else if(K&2&&ne.class!==oe.class&&n(X,"class",null,oe.class,y),K&4&&n(X,"style",ne.style,oe.style,y),K&8){const se=T.dynamicProps;for(let ue=0;ue{be&&Rt(be,c,T,d),Ee&&ws(T,d,c,"updated")},p)},fe=(d,T,c,p,y,x,w)=>{for(let X=0;X{if(T!==c){if(T!==Je)for(const x in T)!mi(x)&&!(x in c)&&n(d,x,T[x],null,y,p);for(const x in c){if(mi(x))continue;const w=c[x],X=T[x];w!==X&&x!=="value"&&n(d,x,X,w,y,p)}"value"in c&&n(d,"value",T.value,c.value,y)}},N=(d,T,c,p,y,x,w,X,K)=>{const J=T.el=d?d.el:o(""),Ee=T.anchor=d?d.anchor:o("");let{patchFlag:ne,dynamicChildren:oe,slotScopeIds:be}=T;be&&(X=X?X.concat(be):be),d==null?(s(J,c,p),s(Ee,c,p),g(T.children||[],c,Ee,y,x,w,X,K)):ne>0&&ne&64&&oe&&d.dynamicChildren?(fe(d.dynamicChildren,oe,c,y,x,w,X),(T.key!=null||y&&T===y.subTree)&&_l(d,T,!0)):L(d,T,c,Ee,y,x,w,X,K)},le=(d,T,c,p,y,x,w,X,K)=>{T.slotScopeIds=X,d==null?T.shapeFlag&512?y.ctx.activate(T,c,p,w,K):re(T,c,p,y,x,w,K):Te(d,T,K)},re=(d,T,c,p,y,x,w)=>{const X=d.component=Rh(d,p,y);if(gl(d)&&(X.ctx.renderer=U),$h(X,!1,w),X.asyncDep){if(y&&y.registerDep(X,C,w),!d.el){const K=X.subTree=lt(Ds);D(null,K,T,c)}}else C(X,d,T,c,y,x,w)},Te=(d,T,c)=>{const p=T.component=d.component;if(kh(d,T,c))if(p.asyncDep&&!p.asyncResolved){E(p,T,c);return}else p.next=T,p.update();else T.el=d.el,p.vnode=T},C=(d,T,c,p,y,x,w)=>{const X=()=>{if(d.isMounted){let{next:ne,bu:oe,u:be,parent:se,vnode:ue}=d;{const it=Ml(d);if(it){ne&&(ne.el=ue.el,E(d,ne,w)),it.asyncDep.then(()=>{d.isUnmounted||X()});return}}let ye=ne,Le;Cs(d,!1),ne?(ne.el=ue.el,E(d,ne,w)):ne=ue,oe&&Ji(oe),(Le=ne.props&&ne.props.onVnodeBeforeUpdate)&&Rt(Le,se,ne,ue),Cs(d,!0);const Ne=Xr(d),je=d.subTree;d.subTree=Ne,j(je,Ne,b(je.el),R(je),d,y,x),ne.el=Ne.el,ye===null&&vh(d,Ne.el),be&&Et(be,y),(Le=ne.props&&ne.props.onVnodeUpdated)&&Et(()=>Rt(Le,se,ne,ue),y)}else{let ne;const{el:oe,props:be}=T,{bm:se,m:ue,parent:ye,root:Le,type:Ne}=d,je=Ti(T);if(Cs(d,!1),se&&Ji(se),!je&&(ne=be&&be.onVnodeBeforeMount)&&Rt(ne,ye,T),Cs(d,!0),oe&&F){const it=()=>{d.subTree=Xr(d),F(oe,d.subTree,d,y,null)};je&&Ne.__asyncHydrate?Ne.__asyncHydrate(oe,d,it):it()}else{Le.ce&&Le.ce._injectChildStyle(Ne);const it=d.subTree=Xr(d);j(null,it,c,p,d,y,x),T.el=it.el}if(ue&&Et(ue,y),!je&&(ne=be&&be.onVnodeMounted)){const it=T;Et(()=>Rt(ne,ye,it),y)}(T.shapeFlag&256||ye&&Ti(ye.vnode)&&ye.vnode.shapeFlag&256)&&d.a&&Et(d.a,y),d.isMounted=!0,T=c=p=null}};d.scope.on();const K=d.effect=new Jo(X);d.scope.off();const J=d.update=K.run.bind(K),Ee=d.job=K.runIfDirty.bind(K);Ee.i=d,Ee.id=d.uid,K.scheduler=()=>zn(Ee),Cs(d,!0),J()},E=(d,T,c)=>{T.component=d;const p=d.vnode.props;d.vnode=T,d.next=null,uh(d,T.props,p,c),dh(d,T.children,c),Ps(),Ma(d),Es()},L=(d,T,c,p,y,x,w,X,K=!1)=>{const J=d&&d.children,Ee=d?d.shapeFlag:0,ne=T.children,{patchFlag:oe,shapeFlag:be}=T;if(oe>0){if(oe&128){pe(J,ne,c,p,y,x,w,X,K);return}else if(oe&256){q(J,ne,c,p,y,x,w,X,K);return}}be&8?(Ee&16&&O(J,y,x),ne!==J&&u(c,ne)):Ee&16?be&16?pe(J,ne,c,p,y,x,w,X,K):O(J,y,x,!0):(Ee&8&&u(c,""),be&16&&g(ne,c,p,y,x,w,X,K))},q=(d,T,c,p,y,x,w,X,K)=>{d=d||Gs,T=T||Gs;const J=d.length,Ee=T.length,ne=Math.min(J,Ee);let oe;for(oe=0;oeEe?O(d,y,x,!0,!1,ne):g(T,c,p,y,x,w,X,K,ne)},pe=(d,T,c,p,y,x,w,X,K)=>{let J=0;const Ee=T.length;let ne=d.length-1,oe=Ee-1;for(;J<=ne&&J<=oe;){const be=d[J],se=T[J]=K?gs(T[J]):Ut(T[J]);if(ri(be,se))j(be,se,c,null,y,x,w,X,K);else break;J++}for(;J<=ne&&J<=oe;){const be=d[ne],se=T[oe]=K?gs(T[oe]):Ut(T[oe]);if(ri(be,se))j(be,se,c,null,y,x,w,X,K);else break;ne--,oe--}if(J>ne){if(J<=oe){const be=oe+1,se=beoe)for(;J<=ne;)Ce(d[J],y,x,!0),J++;else{const be=J,se=J,ue=new Map;for(J=se;J<=oe;J++){const at=T[J]=K?gs(T[J]):Ut(T[J]);at.key!=null&&ue.set(at.key,J)}let ye,Le=0;const Ne=oe-se+1;let je=!1,it=0;const mt=new Array(Ne);for(J=0;J=Ne){Ce(at,y,x,!0);continue}let Qe;if(at.key!=null)Qe=ue.get(at.key);else for(ye=se;ye<=oe;ye++)if(mt[ye-se]===0&&ri(at,T[ye])){Qe=ye;break}Qe===void 0?Ce(at,y,x,!0):(mt[Qe-se]=J+1,Qe>=it?it=Qe:je=!0,j(at,T[Qe],c,null,y,x,w,X,K),Le++)}const Wt=je?bh(mt):Gs;for(ye=Wt.length-1,J=Ne-1;J>=0;J--){const at=se+J,Qe=T[at],rt=at+1{const{el:x,type:w,transition:X,children:K,shapeFlag:J}=d;if(J&6){Se(d.component.subTree,T,c,p);return}if(J&128){d.suspense.move(T,c,p);return}if(J&64){w.move(d,T,c,U);return}if(w===wt){s(x,T,c);for(let ne=0;neX.enter(x),y);else{const{leave:ne,delayLeave:oe,afterLeave:be}=X,se=()=>s(x,T,c),ue=()=>{ne(x,()=>{se(),be&&be()})};oe?oe(x,se,ue):ue()}else s(x,T,c)},Ce=(d,T,c,p=!1,y=!1)=>{const{type:x,props:w,ref:X,children:K,dynamicChildren:J,shapeFlag:Ee,patchFlag:ne,dirs:oe,cacheIndex:be}=d;if(ne===-2&&(y=!1),X!=null&&yn(X,null,c,d,!0),be!=null&&(T.renderCache[be]=void 0),Ee&256){T.ctx.deactivate(d);return}const se=Ee&1&&oe,ue=!Ti(d);let ye;if(ue&&(ye=w&&w.onVnodeBeforeUnmount)&&Rt(ye,T,d),Ee&6)M(d.component,c,p);else{if(Ee&128){d.suspense.unmount(c,p);return}se&&ws(d,null,T,"beforeUnmount"),Ee&64?d.type.remove(d,T,c,U,p):J&&!J.hasOnce&&(x!==wt||ne>0&&ne&64)?O(J,T,c,!1,!0):(x===wt&&ne&384||!y&&Ee&16)&&O(K,T,c),p&&ee(d)}(ue&&(ye=w&&w.onVnodeUnmounted)||se)&&Et(()=>{ye&&Rt(ye,T,d),se&&ws(d,null,T,"unmounted")},c)},ee=d=>{const{type:T,el:c,anchor:p,transition:y}=d;if(T===wt){G(c,p);return}if(T===Yr){W(d);return}const x=()=>{r(c),y&&!y.persisted&&y.afterLeave&&y.afterLeave()};if(d.shapeFlag&1&&y&&!y.persisted){const{leave:w,delayLeave:X}=y,K=()=>w(c,x);X?X(d.el,x,K):K()}else x()},G=(d,T)=>{let c;for(;d!==T;)c=P(d),r(d),d=c;r(T)},M=(d,T,c)=>{const{bum:p,scope:y,job:x,subTree:w,um:X,m:K,a:J}=d;ja(K),ja(J),p&&Ji(p),y.stop(),x&&(x.flags|=8,Ce(w,d,T,c)),X&&Et(X,T),Et(()=>{d.isUnmounted=!0},T),T&&T.pendingBranch&&!T.isUnmounted&&d.asyncDep&&!d.asyncResolved&&d.suspenseId===T.pendingId&&(T.deps--,T.deps===0&&T.resolve())},O=(d,T,c,p=!1,y=!1,x=0)=>{for(let w=x;w{if(d.shapeFlag&6)return R(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const T=P(d.anchor||d.el),c=T&&T[Fu];return c?P(c):T};let V=!1;const f=(d,T,c)=>{d==null?T._vnode&&Ce(T._vnode,null,null,!0):j(T._vnode||null,d,T,null,null,null,c),T._vnode=d,V||(V=!0,Ma(),pl(),V=!1)},U={p:j,um:Ce,m:Se,r:ee,mt:re,mc:g,pc:L,pbc:fe,n:R,o:i};let $,F;return t&&([$,F]=t(U)),{render:f,hydrate:$,createApp:oh(f,$)}}function Jr({type:i,props:t},e){return e==="svg"&&i==="foreignObject"||e==="mathml"&&i==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:e}function Cs({effect:i,job:t},e){e?(i.flags|=32,t.flags|=4):(i.flags&=-33,t.flags&=-5)}function Th(i,t){return(!i||i&&!i.pendingBranch)&&t&&!t.persisted}function _l(i,t,e=!1){const s=i.children,r=t.children;if(Ie(s)&&Ie(r))for(let n=0;n>1,i[e[o]]0&&(t[s]=e[n-1]),e[n]=s)}}for(n=e.length,a=e[n-1];n-- >0;)e[n]=a,a=t[a];return e}function Ml(i){const t=i.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ml(t)}function ja(i){if(i)for(let t=0;tYi(xh);function xi(i,t,e){return Ol(i,t,e)}function Ol(i,t,e=Je){const{immediate:s,deep:r,flush:n,once:a}=e,o=ct({},e);let l;if(Lr)if(n==="sync"){const P=Sh();l=P.__watcherHandles||(P.__watcherHandles=[])}else if(!t||s)o.once=!0;else{const P=()=>{};return P.stop=Ot,P.resume=Ot,P.pause=Ot,P}const h=ft;o.call=(P,I,A)=>Ht(P,h,I,A);let u=!1;n==="post"?o.scheduler=P=>{Et(P,h&&h.suspense)}:n!=="sync"&&(u=!0,o.scheduler=(P,I)=>{I?P():zn(P)}),o.augmentJob=P=>{t&&(P.flags|=4),u&&(P.flags|=2,h&&(P.id=h.uid,P.i=h))};const b=Iu(i,t,o);return l&&l.push(b),b}function Ph(i,t,e){const s=this.proxy,r=nt(i)?i.includes(".")?Dl(s,i):()=>s[i]:i.bind(s,s);let n;Oe(t)?n=t:(n=t.handler,e=t);const a=Fi(this),o=Ol(r,n.bind(s),e);return a(),o}function Dl(i,t){const e=t.split(".");return()=>{let s=i;for(let r=0;rt==="modelValue"||t==="model-value"?i.modelModifiers:i[`${t}Modifiers`]||i[`${It(t)}Modifiers`]||i[`${Fs(t)}Modifiers`];function Ah(i,t,...e){if(i.isUnmounted)return;const s=i.vnode.props||Je;let r=e;const n=t.startsWith("update:"),a=n&&Eh(s,t.slice(7));a&&(a.trim&&(r=e.map(u=>nt(u)?u.trim():u)),a.number&&(r=e.map(fn)));let o,l=s[o=Vr(t)]||s[o=Vr(It(t))];!l&&n&&(l=s[o=Vr(Fs(t))]),l&&Ht(l,i,6,r);const h=s[o+"Once"];if(h){if(!i.emitted)i.emitted={};else if(i.emitted[o])return;i.emitted[o]=!0,Ht(h,i,6,r)}}function Fl(i,t,e=!1){const s=t.emitsCache,r=s.get(i);if(r!==void 0)return r;const n=i.emits;let a={},o=!1;if(!Oe(i)){const l=h=>{const u=Fl(h,t,!0);u&&(o=!0,ct(a,u))};!e&&t.mixins.length&&t.mixins.forEach(l),i.extends&&l(i.extends),i.mixins&&i.mixins.forEach(l)}return!n&&!o?(Ze(i)&&s.set(i,null),null):(Ie(n)?n.forEach(l=>a[l]=null):ct(a,n),Ze(i)&&s.set(i,a),a)}function kr(i,t){return!i||!gr(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ge(i,t[0].toLowerCase()+t.slice(1))||Ge(i,Fs(t))||Ge(i,t))}function Xr(i){const{type:t,vnode:e,proxy:s,withProxy:r,propsOptions:[n],slots:a,attrs:o,emit:l,render:h,renderCache:u,props:b,data:P,setupState:I,ctx:A,inheritAttrs:j}=i,H=or(i);let D,B;try{if(e.shapeFlag&4){const W=r||s,k=W;D=Ut(h.call(k,W,u,b,I,P,A)),B=o}else{const W=t;D=Ut(W.length>1?W(b,{attrs:o,slots:a,emit:l}):W(b,null)),B=t.props?o:wh(o)}}catch(W){Si.length=0,wr(W,i,1),D=lt(Ds)}let ie=D;if(B&&j!==!1){const W=Object.keys(B),{shapeFlag:k}=ie;W.length&&k&7&&(n&&W.some(On)&&(B=Ch(B,n)),ie=Zs(ie,B,!1,!0))}return e.dirs&&(ie=Zs(ie,null,!1,!0),ie.dirs=ie.dirs?ie.dirs.concat(e.dirs):e.dirs),e.transition&&Jn(ie,e.transition),D=ie,or(H),D}const wh=i=>{let t;for(const e in i)(e==="class"||e==="style"||gr(e))&&((t||(t={}))[e]=i[e]);return t},Ch=(i,t)=>{const e={};for(const s in i)(!On(s)||!(s.slice(9)in t))&&(e[s]=i[s]);return e};function kh(i,t,e){const{props:s,children:r,component:n}=i,{props:a,children:o,patchFlag:l}=t,h=n.emitsOptions;if(t.dirs||t.transition)return!0;if(e&&l>=0){if(l&1024)return!0;if(l&16)return s?Ua(s,a,h):!!a;if(l&8){const u=t.dynamicProps;for(let b=0;bi.__isSuspense;function Lh(i,t){t&&t.pendingBranch?Ie(i)?t.effects.push(...i):t.effects.push(i):Ou(i)}const wt=Symbol.for("v-fgt"),vr=Symbol.for("v-txt"),Ds=Symbol.for("v-cmt"),Yr=Symbol.for("v-stc"),Si=[];let kt=null;function _t(i=!1){Si.push(kt=i?null:[])}function Ih(){Si.pop(),kt=Si[Si.length-1]||null}let Li=1;function Va(i){Li+=i,i<0&&kt&&(kt.hasOnce=!0)}function Rl(i){return i.dynamicChildren=Li>0?kt||Gs:null,Ih(),Li>0&&kt&&kt.push(i),i}function Bt(i,t,e,s,r,n){return Rl(Fe(i,t,e,s,r,n,!0))}function Nh(i,t,e,s,r){return Rl(lt(i,t,e,s,r,!0))}function cr(i){return i?i.__v_isVNode===!0:!1}function ri(i,t){return i.type===t.type&&i.key===t.key}const $l=({key:i})=>i!=null?i:null,Zi=({ref:i,ref_key:t,ref_for:e})=>(typeof i=="number"&&(i=""+i),i!=null?nt(i)||pt(i)||Oe(i)?{i:Ct,r:i,k:t,f:!!e}:i:null);function Fe(i,t=null,e=null,s=0,r=null,n=i===wt?0:1,a=!1,o=!1){const l={__v_isVNode:!0,__v_skip:!0,type:i,props:t,key:t&&$l(t),ref:t&&Zi(t),scopeId:ml,slotScopeIds:null,children:e,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:n,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ct};return o?(Zn(l,e),n&128&&i.normalize(l)):e&&(l.shapeFlag|=nt(e)?8:16),Li>0&&!a&&kt&&(l.patchFlag>0||n&6)&&l.patchFlag!==32&&kt.push(l),l}const lt=_h;function _h(i,t=null,e=null,s=0,r=null,n=!1){if((!i||i===Zu)&&(i=Ds),cr(i)){const o=Zs(i,t,!0);return e&&Zn(o,e),Li>0&&!n&&kt&&(o.shapeFlag&6?kt[kt.indexOf(i)]=o:kt.push(o)),o.patchFlag=-2,o}if(Gh(i)&&(i=i.__vccOpts),t){t=Mh(t);let{class:o,style:l}=t;o&&!nt(o)&&(t.class=wi(o)),Ze(l)&&(Kn(l)&&!Ie(l)&&(l=ct({},l)),t.style=Rn(l))}const a=nt(i)?1:Bl(i)?128:Bu(i)?64:Ze(i)?4:Oe(i)?2:0;return Fe(i,t,e,s,r,a,n,!0)}function Mh(i){return i?Kn(i)||wl(i)?ct({},i):i:null}function Zs(i,t,e=!1,s=!1){const{props:r,ref:n,patchFlag:a,children:o,transition:l}=i,h=t?Dh(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:i.type,props:h,key:h&&$l(h),ref:t&&t.ref?e&&n?Ie(n)?n.concat(Zi(t)):[n,Zi(t)]:Zi(t):n,scopeId:i.scopeId,slotScopeIds:i.slotScopeIds,children:o,target:i.target,targetStart:i.targetStart,targetAnchor:i.targetAnchor,staticCount:i.staticCount,shapeFlag:i.shapeFlag,patchFlag:t&&i.type!==wt?a===-1?16:a|16:a,dynamicProps:i.dynamicProps,dynamicChildren:i.dynamicChildren,appContext:i.appContext,dirs:i.dirs,transition:l,component:i.component,suspense:i.suspense,ssContent:i.ssContent&&Zs(i.ssContent),ssFallback:i.ssFallback&&Zs(i.ssFallback),el:i.el,anchor:i.anchor,ctx:i.ctx,ce:i.ce};return l&&s&&Jn(u,l.clone(u)),u}function Sn(i=" ",t=0){return lt(vr,null,i,t)}function Oh(i="",t=!1){return t?(_t(),Nh(Ds,null,i)):lt(Ds,null,i)}function Ut(i){return i==null||typeof i=="boolean"?lt(Ds):Ie(i)?lt(wt,null,i.slice()):cr(i)?gs(i):lt(vr,null,String(i))}function gs(i){return i.el===null&&i.patchFlag!==-1||i.memo?i:Zs(i)}function Zn(i,t){let e=0;const{shapeFlag:s}=i;if(t==null)t=null;else if(Ie(t))e=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Zn(i,r()),r._c&&(r._d=!0));return}else{e=32;const r=t._;!r&&!wl(t)?t._ctx=Ct:r===3&&Ct&&(Ct.slots._===1?t._=1:(t._=2,i.patchFlag|=1024))}else Oe(t)?(t={default:t,_ctx:Ct},e=32):(t=String(t),s&64?(e=16,t=[Sn(t)]):e=8);i.children=t,i.shapeFlag|=e}function Dh(...i){const t={};for(let e=0;e{let r;return(r=i[e])||(r=i[e]=[]),r.push(s),n=>{r.length>1?r.forEach(a=>a(n)):r[0](n)}};ur=t("__VUE_INSTANCE_SETTERS__",e=>ft=e),Pn=t("__VUE_SSR_SETTERS__",e=>Lr=e)}const Fi=i=>{const t=ft;return ur(i),i.scope.on(),()=>{i.scope.off(),ur(t)}},Ha=()=>{ft&&ft.scope.off(),ur(null)};function jl(i){return i.vnode.shapeFlag&4}let Lr=!1;function $h(i,t=!1,e=!1){t&&Pn(t);const{props:s,children:r}=i.vnode,n=jl(i);ch(i,s,n,t),ph(i,r,e);const a=n?jh(i,t):void 0;return t&&Pn(!1),a}function jh(i,t){const e=i.type;i.accessCache=Object.create(null),i.proxy=new Proxy(i.ctx,eh);const{setup:s}=e;if(s){const r=i.setupContext=s.length>1?Vh(i):null,n=Fi(i);Ps();const a=Di(s,i,0,[i.props,r]);if(Es(),n(),Uo(a)){if(Ti(i)||yl(i),a.then(Ha,Ha),t)return a.then(o=>{Ga(i,o,t)}).catch(o=>{wr(o,i,0)});i.asyncDep=a}else Ga(i,a,t)}else Ul(i,t)}function Ga(i,t,e){Oe(t)?i.type.__ssrInlineRender?i.ssrRender=t:i.render=t:Ze(t)&&(i.setupState=ul(t)),Ul(i,e)}let Wa;function Ul(i,t,e){const s=i.type;if(!i.render){if(!t&&Wa&&!s.render){const r=s.template||Xn(i).template;if(r){const{isCustomElement:n,compilerOptions:a}=i.appContext.config,{delimiters:o,compilerOptions:l}=s,h=ct(ct({isCustomElement:n,delimiters:o},a),l);s.render=Wa(r,h)}}i.render=s.render||Ot}{const r=Fi(i);Ps();try{th(i)}finally{Es(),r()}}}const Uh={get(i,t){return dt(i,"get",""),i[t]}};function Vh(i){const t=e=>{i.exposed=e||{}};return{attrs:new Proxy(i.attrs,Uh),slots:i.slots,emit:i.emit,expose:t}}function Ir(i){return i.exposed?i.exposeProxy||(i.exposeProxy=new Proxy(ul(Eu(i.exposed)),{get(t,e){if(e in t)return t[e];if(e in bi)return bi[e](i)},has(t,e){return e in t||e in bi}})):i.proxy}function Hh(i,t=!0){return Oe(i)?i.displayName||i.name:i.name||t&&i.__name}function Gh(i){return Oe(i)&&"__vccOpts"in i}const ss=(i,t)=>vu(i,t,Lr);function Ka(i,t,e){const s=arguments.length;return s===2?Ze(t)&&!Ie(t)?cr(t)?lt(i,null,[t]):lt(i,t):lt(i,null,t):(s>3?e=Array.prototype.slice.call(arguments,2):s===3&&cr(e)&&(e=[e]),lt(i,t,e))}const Wh="3.5.11";/** -* @vue/runtime-dom v3.5.11 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let En;const qa=typeof window!="undefined"&&window.trustedTypes;if(qa)try{En=qa.createPolicy("vue",{createHTML:i=>i})}catch{}const Vl=En?i=>En.createHTML(i):i=>i,Kh="http://www.w3.org/2000/svg",qh="http://www.w3.org/1998/Math/MathML",Yt=typeof document!="undefined"?document:null,za=Yt&&Yt.createElement("template"),zh={insert:(i,t,e)=>{t.insertBefore(i,e||null)},remove:i=>{const t=i.parentNode;t&&t.removeChild(i)},createElement:(i,t,e,s)=>{const r=t==="svg"?Yt.createElementNS(Kh,i):t==="mathml"?Yt.createElementNS(qh,i):e?Yt.createElement(i,{is:e}):Yt.createElement(i);return i==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:i=>Yt.createTextNode(i),createComment:i=>Yt.createComment(i),setText:(i,t)=>{i.nodeValue=t},setElementText:(i,t)=>{i.textContent=t},parentNode:i=>i.parentNode,nextSibling:i=>i.nextSibling,querySelector:i=>Yt.querySelector(i),setScopeId(i,t){i.setAttribute(t,"")},insertStaticContent(i,t,e,s,r,n){const a=e?e.previousSibling:t.lastChild;if(r&&(r===n||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),e),!(r===n||!(r=r.nextSibling)););else{za.innerHTML=Vl(s==="svg"?`${i}`:s==="mathml"?`${i}`:i);const o=za.content;if(s==="svg"||s==="mathml"){const l=o.firstChild;for(;l.firstChild;)o.appendChild(l.firstChild);o.removeChild(l)}t.insertBefore(o,e)}return[a?a.nextSibling:t.firstChild,e?e.previousSibling:t.lastChild]}},Jh=Symbol("_vtc");function Xh(i,t,e){const s=i[Jh];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?i.removeAttribute("class"):e?i.setAttribute("class",t):i.className=t}const Ja=Symbol("_vod"),Yh=Symbol("_vsh"),Zh=Symbol(""),Qh=/(^|;)\s*display\s*:/;function ef(i,t,e){const s=i.style,r=nt(e);let n=!1;if(e&&!r){if(t)if(nt(t))for(const a of t.split(";")){const o=a.slice(0,a.indexOf(":")).trim();e[o]==null&&Qi(s,o,"")}else for(const a in t)e[a]==null&&Qi(s,a,"");for(const a in e)a==="display"&&(n=!0),Qi(s,a,e[a])}else if(r){if(t!==e){const a=s[Zh];a&&(e+=";"+a),s.cssText=e,n=Qh.test(e)}}else t&&i.removeAttribute("style");Ja in i&&(i[Ja]=n?s.display:"",i[Yh]&&(s.display="none"))}const Xa=/\s*!important$/;function Qi(i,t,e){if(Ie(e))e.forEach(s=>Qi(i,t,s));else if(e==null&&(e=""),t.startsWith("--"))i.setProperty(t,e);else{const s=tf(i,t);Xa.test(e)?i.setProperty(Fs(s),e.replace(Xa,""),"important"):i[s]=e}}const Ya=["Webkit","Moz","ms"],Zr={};function tf(i,t){const e=Zr[t];if(e)return e;let s=It(t);if(s!=="filter"&&s in i)return Zr[t]=s;s=xr(s);for(let r=0;rQr||(af.then(()=>Qr=0),Qr=Date.now());function lf(i,t){const e=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=e.attached)return;Ht(cf(s,e.value),t,5,[s])};return e.value=i,e.attached=of(),e}function cf(i,t){if(Ie(t)){const e=i.stopImmediatePropagation;return i.stopImmediatePropagation=()=>{e.call(i),i._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const io=i=>i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&i.charCodeAt(2)>96&&i.charCodeAt(2)<123,uf=(i,t,e,s,r,n)=>{const a=r==="svg";t==="class"?Xh(i,s,a):t==="style"?ef(i,e,s):gr(t)?On(t)||rf(i,t,e,s,n):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):hf(i,t,s,a))?(eo(i,t,s),!i.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Qa(i,t,s,a,n,t!=="value")):i._isVueCE&&(/[A-Z]/.test(t)||!nt(s))?eo(i,It(t),s):(t==="true-value"?i._trueValue=s:t==="false-value"&&(i._falseValue=s),Qa(i,t,s,a))};function hf(i,t,e,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in i&&io(t)&&Oe(e));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&i.tagName==="INPUT"||t==="type"&&i.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=i.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return io(t)&&nt(e)?!1:t in i}const hr=i=>{const t=i.props["onUpdate:modelValue"]||!1;return Ie(t)?e=>Ji(t,e):t};function ff(i){i.target.composing=!0}function ro(i){const t=i.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Js=Symbol("_assign"),no={created(i,{modifiers:{lazy:t,trim:e,number:s}},r){i[Js]=hr(r);const n=s||r.props&&r.props.type==="number";Ns(i,t?"change":"input",a=>{if(a.target.composing)return;let o=i.value;e&&(o=o.trim()),n&&(o=fn(o)),i[Js](o)}),e&&Ns(i,"change",()=>{i.value=i.value.trim()}),t||(Ns(i,"compositionstart",ff),Ns(i,"compositionend",ro),Ns(i,"change",ro))},mounted(i,{value:t}){i.value=t==null?"":t},beforeUpdate(i,{value:t,oldValue:e,modifiers:{lazy:s,trim:r,number:n}},a){if(i[Js]=hr(a),i.composing)return;const o=(n||i.type==="number")&&!/^0\d/.test(i.value)?fn(i.value):i.value,l=t==null?"":t;o!==l&&(document.activeElement===i&&i.type!=="range"&&(s&&t===e||r&&i.value.trim()===l)||(i.value=l))}},en={deep:!0,created(i,t,e){i[Js]=hr(e),Ns(i,"change",()=>{const s=i._modelValue,r=pf(i),n=i.checked,a=i[Js];if(Ie(s)){const o=Ko(s,r),l=o!==-1;if(n&&!l)a(s.concat(r));else if(!n&&l){const h=[...s];h.splice(o,1),a(h)}}else if(Tr(s)){const o=new Set(s);n?o.add(r):o.delete(r),a(o)}else a(Hl(i,n))})},mounted:ao,beforeUpdate(i,t,e){i[Js]=hr(e),ao(i,t,e)}};function ao(i,{value:t},e){i._modelValue=t;let s;Ie(t)?s=Ko(t,e.props.value)>-1:Tr(t)?s=t.has(e.props.value):s=Sr(t,Hl(i,!0)),i.checked!==s&&(i.checked=s)}function pf(i){return"_value"in i?i._value:i.value}function Hl(i,t){const e=t?"_trueValue":"_falseValue";return e in i?i[e]:t}const df=ct({patchProp:uf},zh);let oo;function mf(){return oo||(oo=yh(df))}const yf=(...i)=>{const t=mf().createApp(...i),{mount:e}=t;return t.mount=s=>{const r=Tf(s);if(!r)return;const n=t._component;!Oe(n)&&!n.render&&!n.template&&(n.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const a=e(r,!1,gf(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),a},t};function gf(i){if(i instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&i instanceof MathMLElement)return"mathml"}function Tf(i){return nt(i)?document.querySelector(i):i}var es=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Nr={};Object.defineProperty(Nr,"__esModule",{value:!0});function bf(i,t){if(i==null)return{};var e={};for(var s in i)if({}.hasOwnProperty.call(i,s)){if(t.includes(s))continue;e[s]=i[s]}return e}class bs{constructor(t,e,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=e,this.index=s}}class fr{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}}function St(i,t){const{line:e,column:s,index:r}=i;return new bs(e,s+t,r+t)}const lo="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";var xf={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:lo},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:lo}};const co={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},er=i=>i.type==="UpdateExpression"?co.UpdateExpression[`${i.prefix}`]:co[i.type];var Sf={AccessorIsGenerator:({kind:i})=>`A ${i}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:i})=>`Missing initializer in ${i} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:i})=>`\`${i}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:i})=>`'import.${i}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:i,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`. -- Did you mean \`export { '${i}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:i})=>`'${i==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:i})=>`Unsyntactic ${i==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:i})=>`A string literal cannot be used as an imported binding. -- Did you mean \`import { "${i}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:i})=>`\`import()\` requires exactly ${i===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:i})=>`Expected number in radix ${i}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:i})=>`Escape sequence in keyword ${i}.`,InvalidIdentifier:({identifierName:i})=>`Invalid identifier ${i}.`,InvalidLhs:({ancestor:i})=>`Invalid left-hand side in ${er(i)}.`,InvalidLhsBinding:({ancestor:i})=>`Binding invalid left-hand side in ${er(i)}.`,InvalidLhsOptionalChaining:({ancestor:i})=>`Invalid optional chaining in the left-hand side of ${er(i)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:i})=>`Unexpected character '${i}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:i})=>`Private name #${i} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:i})=>`Label '${i}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:i})=>`This experimental syntax requires enabling the parser plugin: ${i.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:i})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${i.map(t=>JSON.stringify(t)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:i})=>`Duplicate key "${i}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:i})=>`An export name cannot include a lone surrogate, found '\\u${i.toString(16)}'.`,ModuleExportUndefined:({localName:i})=>`Export '${i}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:i})=>`Private names are only allowed in property accesses (\`obj.#${i}\`) or in \`in\` expressions (\`#${i} in obj\`).`,PrivateNameRedeclaration:({identifierName:i})=>`Duplicate private name #${i}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:i})=>`Unexpected keyword '${i}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:i})=>`Unexpected reserved word '${i}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:i,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${i?`, expected "${i}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:i,onlyValidPropertyName:t})=>`The only valid meta property for ${i} is ${i}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:i})=>`Identifier '${i}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Pf={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:i})=>`Assigning to '${i}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:i})=>`Binding '${i}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."};const Ef=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]);var Af={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:i})=>`Invalid topic token ${i}. In order to use ${i} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${i}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:i})=>`Hack-style pipe body cannot be an unparenthesized ${er({type:i})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'};const wf=["message"];function uo(i,t,e){Object.defineProperty(i,t,{enumerable:!1,configurable:!0,value:e})}function Cf({toMessage:i,code:t,reasonCode:e,syntaxPlugin:s}){const r=e==="MissingPlugin"||e==="MissingOneOfPlugins";{const n={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};n[e]&&(e=n[e])}return function n(a,o){const l=new SyntaxError;return l.code=t,l.reasonCode=e,l.loc=a,l.pos=a.index,l.syntaxPlugin=s,r&&(l.missingPlugin=o.missingPlugin),uo(l,"clone",function(u={}){var b;const{line:P,column:I,index:A}=(b=u.loc)!=null?b:a;return n(new bs(P,I,A),Object.assign({},o,u.details))}),uo(l,"details",o),Object.defineProperty(l,"message",{configurable:!0,get(){const h=`${i(o)} (${a.line}:${a.column})`;return this.message=h,h},set(h){Object.defineProperty(this,"message",{value:h,writable:!0})}}),l}}function is(i,t){if(Array.isArray(i))return s=>is(s,i[0]);const e={};for(const s of Object.keys(i)){const r=i[s],n=typeof r=="string"?{message:()=>r}:typeof r=="function"?{message:r}:r,{message:a}=n,o=bf(n,wf),l=typeof a=="string"?()=>a:a;e[s]=Cf(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:l},t?{syntaxPlugin:t}:{},o))}return e}const v=Object.assign({},is(xf),is(Sf),is(Pf),is`pipelineOperator`(Af)),{defineProperty:kf}=Object,ho=(i,t)=>{i&&kf(i,t,{enumerable:!1,value:i[t]})};function ni(i){return ho(i.loc.start,"index"),ho(i.loc.end,"index"),i}var vf=i=>class extends i{parse(){const e=ni(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(ni)),e}parseRegExpLiteral({pattern:e,flags:s}){let r=null;try{r=new RegExp(e,s)}catch{}const n=this.estreeParseLiteral(r);return n.regex={pattern:e,flags:s},n}parseBigIntLiteral(e){let s;try{s=BigInt(e)}catch{s=null}const r=this.estreeParseLiteral(s);return r.bigint=String(r.value||e),r}parseDecimalLiteral(e){const r=this.estreeParseLiteral(null);return r.decimal=String(r.value||e),r}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){const s=e.value;delete e.value,s.type="Literal",s.raw=s.extra.raw,s.value=s.extra.expressionValue;const r=e;return r.type="ExpressionStatement",r.expression=s,r.directive=s.extra.rawValue,delete s.extra,r}initFunction(e,s){super.initFunction(e,s),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var s;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((s=e.expression.extra)!=null&&s.parenthesized)}parseBlockBody(e,s,r,n,a){super.parseBlockBody(e,s,r,n,a);const o=e.directives.map(l=>this.directiveToStmt(l));e.body=o.concat(e.body),delete e.directives}pushClassMethod(e,s,r,n,a,o){this.parseMethod(s,r,n,a,o,"ClassMethod",!0),s.typeParameters&&(s.value.typeParameters=s.typeParameters,delete s.typeParameters),e.body.push(s)}parsePrivateName(){const e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){const s=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=s,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?e.type==="PrivateIdentifier":super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,s){const r=super.parseLiteral(e,s);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(e,s,r=!1){super.parseFunctionBody(e,s,r),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,s,r,n,a,o,l=!1){let h=this.startNode();return h.kind=e.kind,h=super.parseMethod(h,s,r,n,a,o,l),h.type="FunctionExpression",delete h.kind,e.value=h,o==="ClassPrivateMethod"&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}nameIsConstructor(e){return e.type==="Literal"?e.value==="constructor":super.nameIsConstructor(e)}parseClassProperty(...e){const s=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition"),s}parseClassPrivateProperty(...e){const s=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition",s.computed=!1),s}parseObjectMethod(e,s,r,n,a){const o=super.parseObjectMethod(e,s,r,n,a);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(e,s,r,n){const a=super.parseObjectProperty(e,s,r,n);return a&&(a.kind="init",a.type="Property"),a}isValidLVal(e,s,r){return e==="Property"?"value":super.isValidLVal(e,s,r)}isAssignable(e,s){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,s):super.isAssignable(e,s)}toAssignable(e,s=!1){if(e!=null&&this.isObjectProperty(e)){const{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,s)}else super.toAssignable(e,s)}toAssignableObjectExpressionProp(e,s,r){e.type==="Property"&&(e.kind==="get"||e.kind==="set")?this.raise(v.PatternHasAccessor,e.key):e.type==="Property"&&e.method?this.raise(v.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,s,r)}finishCallExpression(e,s){const r=super.finishCallExpression(e,s);if(r.callee.type==="Import"){if(r.type="ImportExpression",r.source=r.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var n,a;r.options=(n=r.arguments[1])!=null?n:null,r.attributes=(a=r.arguments[1])!=null?a:null}delete r.arguments,delete r.callee}return r}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,s){const r=this.state.lastTokStartLoc,n=super.parseExport(e,s);switch(n.type){case"ExportAllDeclaration":n.exported=null;break;case"ExportNamedDeclaration":n.specifiers.length===1&&n.specifiers[0].type==="ExportNamespaceSpecifier"&&(n.type="ExportAllDeclaration",n.exported=n.specifiers[0].exported,delete n.specifiers);case"ExportDefaultDeclaration":{var a;const{declaration:o}=n;(o==null?void 0:o.type)==="ClassDeclaration"&&((a=o.decorators)==null?void 0:a.length)>0&&o.start===n.start&&this.resetStartLocation(n,r)}break}return n}parseSubscript(e,s,r,n){const a=super.parseSubscript(e,s,r,n);if(n.optionalChainMember){if((a.type==="OptionalMemberExpression"||a.type==="OptionalCallExpression")&&(a.type=a.type.substring(8)),n.stop){const o=this.startNodeAtNode(a);return o.expression=a,this.finishNode(o,"ChainExpression")}}else(a.type==="MemberExpression"||a.type==="CallExpression")&&(a.optional=!1);return a}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.type==="Property"&&(e.method||e.kind==="get"||e.kind==="set")}finishNodeAt(e,s,r){return ni(super.finishNodeAt(e,s,r))}resetStartLocation(e,s){super.resetStartLocation(e,s),ni(e)}resetEndLocation(e,s=this.state.lastTokEndLoc){super.resetEndLocation(e,s),ni(e)}};class fi{constructor(t,e){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!e}}const Ke={brace:new fi("{"),j_oTag:new fi("...",!0)};Ke.template=new fi("`",!0);const Re=!0,ge=!0,tn=!0,ai=!0,fs=!0,Lf=!0;class Gl{constructor(t,e={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop!=null?e.binop:null,this.updateContext=null}}const Qn=new Map;function $e(i,t={}){t.keyword=i;const e=ke(i,t);return Qn.set(i,e),e}function Tt(i,t){return ke(i,{beforeExpr:Re,binop:t})}let Pi=-1;const Zt=[],ea=[],ta=[],sa=[],ia=[],ra=[];function ke(i,t={}){var e,s,r,n;return++Pi,ea.push(i),ta.push((e=t.binop)!=null?e:-1),sa.push((s=t.beforeExpr)!=null?s:!1),ia.push((r=t.startsExpr)!=null?r:!1),ra.push((n=t.prefix)!=null?n:!1),Zt.push(new Gl(i,t)),Pi}function Be(i,t={}){var e,s,r,n;return++Pi,Qn.set(i,Pi),ea.push(i),ta.push((e=t.binop)!=null?e:-1),sa.push((s=t.beforeExpr)!=null?s:!1),ia.push((r=t.startsExpr)!=null?r:!1),ra.push((n=t.prefix)!=null?n:!1),Zt.push(new Gl("name",t)),Pi}const If={bracketL:ke("[",{beforeExpr:Re,startsExpr:ge}),bracketHashL:ke("#[",{beforeExpr:Re,startsExpr:ge}),bracketBarL:ke("[|",{beforeExpr:Re,startsExpr:ge}),bracketR:ke("]"),bracketBarR:ke("|]"),braceL:ke("{",{beforeExpr:Re,startsExpr:ge}),braceBarL:ke("{|",{beforeExpr:Re,startsExpr:ge}),braceHashL:ke("#{",{beforeExpr:Re,startsExpr:ge}),braceR:ke("}"),braceBarR:ke("|}"),parenL:ke("(",{beforeExpr:Re,startsExpr:ge}),parenR:ke(")"),comma:ke(",",{beforeExpr:Re}),semi:ke(";",{beforeExpr:Re}),colon:ke(":",{beforeExpr:Re}),doubleColon:ke("::",{beforeExpr:Re}),dot:ke("."),question:ke("?",{beforeExpr:Re}),questionDot:ke("?."),arrow:ke("=>",{beforeExpr:Re}),template:ke("template"),ellipsis:ke("...",{beforeExpr:Re}),backQuote:ke("`",{startsExpr:ge}),dollarBraceL:ke("${",{beforeExpr:Re,startsExpr:ge}),templateTail:ke("...`",{startsExpr:ge}),templateNonTail:ke("...${",{beforeExpr:Re,startsExpr:ge}),at:ke("@"),hash:ke("#",{startsExpr:ge}),interpreterDirective:ke("#!..."),eq:ke("=",{beforeExpr:Re,isAssign:ai}),assign:ke("_=",{beforeExpr:Re,isAssign:ai}),slashAssign:ke("_=",{beforeExpr:Re,isAssign:ai}),xorAssign:ke("_=",{beforeExpr:Re,isAssign:ai}),moduloAssign:ke("_=",{beforeExpr:Re,isAssign:ai}),incDec:ke("++/--",{prefix:fs,postfix:Lf,startsExpr:ge}),bang:ke("!",{beforeExpr:Re,prefix:fs,startsExpr:ge}),tilde:ke("~",{beforeExpr:Re,prefix:fs,startsExpr:ge}),doubleCaret:ke("^^",{startsExpr:ge}),doubleAt:ke("@@",{startsExpr:ge}),pipeline:Tt("|>",0),nullishCoalescing:Tt("??",1),logicalOR:Tt("||",1),logicalAND:Tt("&&",2),bitwiseOR:Tt("|",3),bitwiseXOR:Tt("^",4),bitwiseAND:Tt("&",5),equality:Tt("==/!=/===/!==",6),lt:Tt("/<=/>=",7),gt:Tt("/<=/>=",7),relational:Tt("/<=/>=",7),bitShift:Tt("<>/>>>",8),bitShiftL:Tt("<>/>>>",8),bitShiftR:Tt("<>/>>>",8),plusMin:ke("+/-",{beforeExpr:Re,binop:9,prefix:fs,startsExpr:ge}),modulo:ke("%",{binop:10,startsExpr:ge}),star:ke("*",{binop:10}),slash:Tt("/",10),exponent:ke("**",{beforeExpr:Re,binop:11,rightAssociative:!0}),_in:$e("in",{beforeExpr:Re,binop:7}),_instanceof:$e("instanceof",{beforeExpr:Re,binop:7}),_break:$e("break"),_case:$e("case",{beforeExpr:Re}),_catch:$e("catch"),_continue:$e("continue"),_debugger:$e("debugger"),_default:$e("default",{beforeExpr:Re}),_else:$e("else",{beforeExpr:Re}),_finally:$e("finally"),_function:$e("function",{startsExpr:ge}),_if:$e("if"),_return:$e("return",{beforeExpr:Re}),_switch:$e("switch"),_throw:$e("throw",{beforeExpr:Re,prefix:fs,startsExpr:ge}),_try:$e("try"),_var:$e("var"),_const:$e("const"),_with:$e("with"),_new:$e("new",{beforeExpr:Re,startsExpr:ge}),_this:$e("this",{startsExpr:ge}),_super:$e("super",{startsExpr:ge}),_class:$e("class",{startsExpr:ge}),_extends:$e("extends",{beforeExpr:Re}),_export:$e("export"),_import:$e("import",{startsExpr:ge}),_null:$e("null",{startsExpr:ge}),_true:$e("true",{startsExpr:ge}),_false:$e("false",{startsExpr:ge}),_typeof:$e("typeof",{beforeExpr:Re,prefix:fs,startsExpr:ge}),_void:$e("void",{beforeExpr:Re,prefix:fs,startsExpr:ge}),_delete:$e("delete",{beforeExpr:Re,prefix:fs,startsExpr:ge}),_do:$e("do",{isLoop:tn,beforeExpr:Re}),_for:$e("for",{isLoop:tn}),_while:$e("while",{isLoop:tn}),_as:Be("as",{startsExpr:ge}),_assert:Be("assert",{startsExpr:ge}),_async:Be("async",{startsExpr:ge}),_await:Be("await",{startsExpr:ge}),_defer:Be("defer",{startsExpr:ge}),_from:Be("from",{startsExpr:ge}),_get:Be("get",{startsExpr:ge}),_let:Be("let",{startsExpr:ge}),_meta:Be("meta",{startsExpr:ge}),_of:Be("of",{startsExpr:ge}),_sent:Be("sent",{startsExpr:ge}),_set:Be("set",{startsExpr:ge}),_source:Be("source",{startsExpr:ge}),_static:Be("static",{startsExpr:ge}),_using:Be("using",{startsExpr:ge}),_yield:Be("yield",{startsExpr:ge}),_asserts:Be("asserts",{startsExpr:ge}),_checks:Be("checks",{startsExpr:ge}),_exports:Be("exports",{startsExpr:ge}),_global:Be("global",{startsExpr:ge}),_implements:Be("implements",{startsExpr:ge}),_intrinsic:Be("intrinsic",{startsExpr:ge}),_infer:Be("infer",{startsExpr:ge}),_is:Be("is",{startsExpr:ge}),_mixins:Be("mixins",{startsExpr:ge}),_proto:Be("proto",{startsExpr:ge}),_require:Be("require",{startsExpr:ge}),_satisfies:Be("satisfies",{startsExpr:ge}),_keyof:Be("keyof",{startsExpr:ge}),_readonly:Be("readonly",{startsExpr:ge}),_unique:Be("unique",{startsExpr:ge}),_abstract:Be("abstract",{startsExpr:ge}),_declare:Be("declare",{startsExpr:ge}),_enum:Be("enum",{startsExpr:ge}),_module:Be("module",{startsExpr:ge}),_namespace:Be("namespace",{startsExpr:ge}),_interface:Be("interface",{startsExpr:ge}),_type:Be("type",{startsExpr:ge}),_opaque:Be("opaque",{startsExpr:ge}),name:ke("name",{startsExpr:ge}),string:ke("string",{startsExpr:ge}),num:ke("num",{startsExpr:ge}),bigint:ke("bigint",{startsExpr:ge}),decimal:ke("decimal",{startsExpr:ge}),regexp:ke("regexp",{startsExpr:ge}),privateName:ke("#name",{startsExpr:ge}),eof:ke("eof"),jsxName:ke("jsxName"),jsxText:ke("jsxText",{beforeExpr:!0}),jsxTagStart:ke("jsxTagStart",{startsExpr:!0}),jsxTagEnd:ke("jsxTagEnd"),placeholder:ke("%%",{startsExpr:!0})};function He(i){return i>=93&&i<=132}function Nf(i){return i<=92}function Mt(i){return i>=58&&i<=132}function Wl(i){return i>=58&&i<=136}function _f(i){return sa[i]}function An(i){return ia[i]}function Mf(i){return i>=29&&i<=33}function fo(i){return i>=129&&i<=131}function Of(i){return i>=90&&i<=92}function na(i){return i>=58&&i<=92}function Df(i){return i>=39&&i<=59}function Ff(i){return i===34}function Bf(i){return ra[i]}function Rf(i){return i>=121&&i<=123}function $f(i){return i>=124&&i<=130}function xs(i){return ea[i]}function tr(i){return ta[i]}function jf(i){return i===57}function pr(i){return i>=24&&i<=25}function Xt(i){return Zt[i]}Zt[8].updateContext=i=>{i.pop()},Zt[5].updateContext=Zt[7].updateContext=Zt[23].updateContext=i=>{i.push(Ke.brace)},Zt[22].updateContext=i=>{i[i.length-1]===Ke.template?i.pop():i.push(Ke.template)},Zt[142].updateContext=i=>{i.push(Ke.j_expr,Ke.j_oTag)};let aa="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Kl="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";const Uf=new RegExp("["+aa+"]"),Vf=new RegExp("["+aa+Kl+"]");aa=Kl=null;const ql=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Hf=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];function wn(i,t){let e=65536;for(let s=0,r=t.length;si)return!1;if(e+=t[s+1],e>=i)return!0}return!1}function ts(i){return i<65?i===36:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&Uf.test(String.fromCharCode(i)):wn(i,ql)}function Xs(i){return i<48?i===36:i<58?!0:i<65?!1:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&Vf.test(String.fromCharCode(i)):wn(i,ql)||wn(i,Hf)}const oa={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Gf=new Set(oa.keyword),Wf=new Set(oa.strict),Kf=new Set(oa.strictBind);function zl(i,t){return t&&i==="await"||i==="enum"}function Jl(i,t){return zl(i,t)||Wf.has(i)}function Xl(i){return Kf.has(i)}function Yl(i,t){return Jl(i,t)||Xl(i)}function qf(i){return Gf.has(i)}function zf(i,t,e){return i===64&&t===64&&ts(e)}const Jf=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Xf(i){return Jf.has(i)}class la{constructor(t){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=t}}class ca{constructor(t,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=e}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){const t=this.currentThisScopeFlags();return(t&64)>0&&(t&2)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(e&128)return!0;if(e&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new la(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&130||!this.parser.inModule&&t.flags&1)}declareName(t,e,s){let r=this.currentScope();if(e&8||e&16){this.checkRedeclarationInScope(r,t,e,s);let n=r.names.get(t)||0;e&16?n=n|4:(r.firstLexicalName||(r.firstLexicalName=t),n=n|2),r.names.set(t,n),e&8&&this.maybeExportDefined(r,t)}else if(e&4)for(let n=this.scopeStack.length-1;n>=0&&(r=this.scopeStack[n],this.checkRedeclarationInScope(r,t,e,s),r.names.set(t,(r.names.get(t)||0)|1),this.maybeExportDefined(r,t),!(r.flags&387));--n);this.parser.inModule&&r.flags&1&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.parser.inModule&&t.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,r){this.isRedeclaredInScope(t,e,s)&&this.parser.raise(v.VarRedeclaration,r,{identifierName:e})}isRedeclaredInScope(t,e,s){if(!(s&1))return!1;if(s&8)return t.names.has(e);const r=t.names.get(e);return s&16?(r&2)>0||!this.treatFunctionsAsVarInScope(t)&&(r&1)>0:(r&2)>0&&!(t.flags&8&&t.firstLexicalName===e)||!this.treatFunctionsAsVarInScope(t)&&(r&4)>0}checkLocalExport(t){const{name:e}=t;this.scopeStack[0].names.has(e)||this.undefinedExports.set(e,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(e&387)return e}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(e&451&&!(e&4))return e}}}class Yf extends la{constructor(...t){super(...t),this.declareFunctions=new Set}}class Zf extends ca{createScope(t){return new Yf(t)}declareName(t,e,s){const r=this.currentScope();if(e&2048){this.checkRedeclarationInScope(r,t,e,s),this.maybeExportDefined(r,t),r.declareFunctions.add(t);return}super.declareName(t,e,s)}isRedeclaredInScope(t,e,s){if(super.isRedeclaredInScope(t,e,s))return!0;if(s&2048&&!t.declareFunctions.has(e)){const r=t.names.get(e);return(r&4)>0||(r&2)>0}return!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}}class Qf{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){if(typeof t=="string")return this.plugins.has(t);{const[e,s]=t;if(!this.hasPlugin(e))return!1;const r=this.plugins.get(e);for(const n of Object.keys(s))if((r==null?void 0:r[n])!==s[n])return!1;return!0}}getPluginOption(t,e){var s;return(s=this.plugins.get(t))==null?void 0:s[e]}}function Zl(i,t){i.trailingComments===void 0?i.trailingComments=t:i.trailingComments.unshift(...t)}function ep(i,t){i.leadingComments===void 0?i.leadingComments=t:i.leadingComments.unshift(...t)}function Ii(i,t){i.innerComments===void 0?i.innerComments=t:i.innerComments.unshift(...t)}function oi(i,t,e){let s=null,r=t.length;for(;s===null&&r>0;)s=t[--r];s===null||s.start>e.start?Ii(i,e.comments):Zl(s,e.comments)}class tp extends Qf{addComment(t){this.filename&&(t.loc.filename=this.filename);const{commentsLen:e}=this.state;this.comments.length!==e&&(this.comments.length=e),this.comments.push(t),this.state.commentsLen++}processComment(t){const{commentStack:e}=this.state,s=e.length;if(s===0)return;let r=s-1;const n=e[r];n.start===t.end&&(n.leadingNode=t,r--);const{start:a}=t;for(;r>=0;r--){const o=e[r],l=o.end;if(l>a)o.containingNode=t,this.finalizeComment(o),e.splice(r,1);else{l===a&&(o.trailingNode=t);break}}}finalizeComment(t){const{comments:e}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&Zl(t.leadingNode,e),t.trailingNode!==null&&ep(t.trailingNode,e);else{const{containingNode:s,start:r}=t;if(this.input.charCodeAt(r-1)===44)switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":oi(s,s.properties,t);break;case"CallExpression":case"OptionalCallExpression":oi(s,s.arguments,t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":oi(s,s.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":oi(s,s.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":oi(s,s.specifiers,t);break;default:Ii(s,e)}else Ii(s,e)}}finalizeRemainingComments(){const{commentStack:t}=this.state;for(let e=t.length-1;e>=0;e--)this.finalizeComment(t[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){const{commentStack:e}=this.state,{length:s}=e;if(s===0)return;const r=e[s-1];r.leadingNode===t&&(r.leadingNode=null)}resetPreviousIdentifierLeadingComments(t){const{commentStack:e}=this.state,{length:s}=e;s!==0&&(e[s-1].trailingNode===t?e[s-1].trailingNode=null:s>=2&&e[s-2].trailingNode===t&&(e[s-2].trailingNode=null))}takeSurroundingComments(t,e,s){const{commentStack:r}=this.state,n=r.length;if(n===0)return;let a=n-1;for(;a>=0;a--){const o=r[a],l=o.end;if(o.start===s)o.leadingNode=t;else if(l===e)o.trailingNode=t;else if(l0}set strict(t){t?this.flags|=1:this.flags&=-2}init({strictMode:t,sourceType:e,startLine:s,startColumn:r}){this.strict=t===!1?!1:t===!0?!0:e==="module",this.curLine=s,this.lineStart=-r,this.startLoc=this.endLoc=new bs(s,r,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(t){t?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(t){t?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(t){t?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(t){t?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(t){t?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(t){t?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(t){t?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(t){t?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(t){t?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(t){t?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(t){t?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(t){t?this.flags|=4096:this.flags&=-4097}curPosition(){return new bs(this.curLine,this.pos-this.lineStart,this.pos)}clone(){const t=new ua;return t.flags=this.flags,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}}var rp=function(t){return t>=48&&t<=57};const mo={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Ki={bin:i=>i===48||i===49,oct:i=>i>=48&&i<=55,dec:i=>i>=48&&i<=57,hex:i=>i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102};function yo(i,t,e,s,r,n){const a=e,o=s,l=r;let h="",u=null,b=e;const{length:P}=t;for(;;){if(e>=P){n.unterminated(a,o,l),h+=t.slice(b,e);break}const I=t.charCodeAt(e);if(np(i,I,t,e)){h+=t.slice(b,e);break}if(I===92){h+=t.slice(b,e);const A=ap(t,e,s,r,i==="template",n);A.ch===null&&!u?u={pos:e,lineStart:s,curLine:r}:h+=A.ch,{pos:e,lineStart:s,curLine:r}=A,b=e}else I===8232||I===8233?(++e,++r,s=e):I===10||I===13?i==="template"?(h+=t.slice(b,e)+` -`,++e,I===13&&t.charCodeAt(e)===10&&++e,++r,b=s=e):n.unterminated(a,o,l):++e}return{pos:e,str:h,firstInvalidLoc:u,lineStart:s,curLine:r,containsInvalid:!!u}}function np(i,t,e,s){return i==="template"?t===96||t===36&&e.charCodeAt(s+1)===123:t===(i==="double"?34:39)}function ap(i,t,e,s,r,n){const a=!r;t++;const o=h=>({pos:t,ch:h,lineStart:e,curLine:s}),l=i.charCodeAt(t++);switch(l){case 110:return o(` -`);case 114:return o("\r");case 120:{let h;return{code:h,pos:t}=Cn(i,t,e,s,2,!1,a,n),o(h===null?null:String.fromCharCode(h))}case 117:{let h;return{code:h,pos:t}=ec(i,t,e,s,a,n),o(h===null?null:String.fromCodePoint(h))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:i.charCodeAt(t)===10&&++t;case 10:e=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);n.strictNumericEscape(t-1,e,s);default:if(l>=48&&l<=55){const h=t-1;let b=/^[0-7]+/.exec(i.slice(h,t+2))[0],P=parseInt(b,8);P>255&&(b=b.slice(0,-1),P=parseInt(b,8)),t+=b.length-1;const I=i.charCodeAt(t);if(b!=="0"||I===56||I===57){if(r)return o(null);n.strictNumericEscape(h,e,s)}return o(String.fromCharCode(P))}return o(String.fromCharCode(l))}}function Cn(i,t,e,s,r,n,a,o){const l=t;let h;return{n:h,pos:t}=Ql(i,t,e,s,16,r,n,!1,o,!a),h===null&&(a?o.invalidEscapeSequence(l,e,s):t=l-1),{code:h,pos:t}}function Ql(i,t,e,s,r,n,a,o,l,h){const u=t,b=r===16?mo.hex:mo.decBinOct,P=r===16?Ki.hex:r===10?Ki.dec:r===8?Ki.oct:Ki.bin;let I=!1,A=0;for(let j=0,H=n==null?1/0:n;j=97?B=D-97+10:D>=65?B=D-65+10:rp(D)?B=D-48:B=1/0,B>=r){if(B<=9&&h)return{n:null,pos:t};if(B<=9&&l.invalidDigit(t,e,s,r))B=0;else if(a)B=0,I=!0;else break}++t,A=A*r+B}return t===u||n!=null&&t-u!==n||I?{n:null,pos:t}:{n:A,pos:t}}function ec(i,t,e,s,r,n){const a=i.charCodeAt(t);let o;if(a===123){if(++t,{code:o,pos:t}=Cn(i,t,e,s,i.indexOf("}",t)-t,!0,r,n),++t,o!==null&&o>1114111)if(r)n.invalidCodePoint(t,e,s);else return{code:null,pos:t}}else({code:o,pos:t}=Cn(i,t,e,s,4,!1,r,n));return{code:o,pos:t}}function li(i,t,e){return new bs(e,i-t,i)}const op=new Set([103,109,115,105,121,117,100,118]);class ds{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new fr(t.startLoc,t.endLoc)}}class lp extends tp{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(s,r,n,a)=>this.options.errorRecovery?(this.raise(v.InvalidDigit,li(s,r,n),{radix:a}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(v.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(v.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(v.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(v.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(s,r,n)=>{this.recordStrictModeErrors(v.StrictNumericEscape,li(s,r,n))},unterminated:(s,r,n)=>{throw this.raise(v.UnterminatedString,li(s-1,r,n))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(v.StrictNumericEscape),unterminated:(s,r,n)=>{throw this.raise(v.UnterminatedTemplate,li(s,r,n))}}),this.state=new ua,this.state.init(t),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new ds(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){const t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return sn.lastIndex=t,sn.test(this.input)?sn.lastIndex:t}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return rn.lastIndex=t,rn.test(this.input)?rn.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if((e&64512)===55296&&++tthis.raise(e,s)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let e;this.isLookahead||(e=this.state.curPosition());const s=this.state.pos,r=this.input.indexOf(t,s+2);if(r===-1)throw this.raise(v.UnterminatedComment,this.state.curPosition());for(this.state.pos=r+t.length,Wi.lastIndex=s+2;Wi.test(this.input)&&Wi.lastIndex<=r;)++this.state.curLine,this.state.lineStart=Wi.lastIndex;if(this.isLookahead)return;const n={type:"CommentBlock",value:this.input.slice(s+2,r),start:s,end:r+t.length,loc:new fr(e,this.state.curPosition())};return this.options.tokens&&this.pushToken(n),n}skipLineComment(t){const e=this.state.pos;let s;this.isLookahead||(s=this.state.curPosition());let r=this.input.charCodeAt(this.state.pos+=t);if(this.state.post)){const n=this.skipLineComment(3);n!==void 0&&(this.addComment(n),this.options.attachComment&&e.push(n))}else break e}else if(s===60&&!this.inModule&&this.options.annexB){const r=this.state.pos;if(this.input.charCodeAt(r+1)===33&&this.input.charCodeAt(r+2)===45&&this.input.charCodeAt(r+3)===45){const n=this.skipLineComment(4);n!==void 0&&(this.addComment(n),this.options.attachComment&&e.push(n))}else break e}else break e}}if(e.length>0){const s=this.state.pos,r={start:t,end:s,comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}finishToken(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||this.updateContext(s)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;const t=this.state.pos+1,e=this.codePointAtPos(t);if(e>=48&&e<=57)throw this.raise(v.UnexpectedDigitAfterHash,this.state.curPosition());if(e===123||e===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(e===123?v.RecordExpressionHashIncorrectStartSyntaxType:v.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else ts(e)?(++this.state.pos,this.finishToken(138,this.readWord1(e))):e===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){const t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57){this.readNumber(!0);return}t===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(t!==33)return!1;const e=this.state.pos;for(this.state.pos+=1;!Ys(t)&&++this.state.pos=48&&e<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(t){switch(t){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(v.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(v.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{const e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(t);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(t);return;case 124:case 38:this.readToken_pipe_amp(t);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(t);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(t);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(ts(t)){this.readWord(t);return}}throw this.raise(v.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(t)})}finishOp(t,e){const s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}readRegexp(){const t=this.state.startLoc,e=this.state.start+1;let s,r,{pos:n}=this.state;for(;;++n){if(n>=this.length)throw this.raise(v.UnterminatedRegExp,St(t,1));const h=this.input.charCodeAt(n);if(Ys(h))throw this.raise(v.UnterminatedRegExp,St(t,1));if(s)s=!1;else{if(h===91)r=!0;else if(h===93&&r)r=!1;else if(h===47&&!r)break;s=h===92}}const a=this.input.slice(e,n);++n;let o="";const l=()=>St(t,n+2-e);for(;n=2&&this.input.charCodeAt(e)===48;if(l){const I=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(v.StrictOctalLiteral,s),!this.state.strict){const A=I.indexOf("_");A>0&&this.raise(v.ZeroDigitNumericSeparator,St(s,A))}o=l&&!/[89]/.test(I)}let h=this.input.charCodeAt(this.state.pos);if(h===46&&!o&&(++this.state.pos,this.readInt(10),r=!0,h=this.input.charCodeAt(this.state.pos)),(h===69||h===101)&&!o&&(h=this.input.charCodeAt(++this.state.pos),(h===43||h===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(v.InvalidOrMissingExponent,s),r=!0,a=!0,h=this.input.charCodeAt(this.state.pos)),h===110&&((r||l)&&this.raise(v.InvalidBigIntLiteral,s),++this.state.pos,n=!0),h===109){this.expectPlugin("decimal",this.state.curPosition()),(a||l)&&this.raise(v.InvalidDecimal,s),++this.state.pos;var u=!0}if(ts(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,this.state.curPosition());const b=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(n){this.finishToken(135,b);return}if(u){this.finishToken(136,b);return}const P=o?parseInt(b,8):parseFloat(b);this.finishToken(134,P)}readCodePoint(t){const{code:e,pos:s}=ec(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=s,e}readString(t){const{str:e,pos:s,curLine:r,lineStart:n}=yo(t===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=s+1,this.state.lineStart=n,this.state.curLine=r,this.finishToken(133,e)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){const t=this.input[this.state.pos],{str:e,firstInvalidLoc:s,pos:r,curLine:n,lineStart:a}=yo("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=r+1,this.state.lineStart=a,this.state.curLine=n,s&&(this.state.firstInvalidTemplateEscapePos=new bs(s.curLine,s.pos-s.lineStart,s.pos)),this.input.codePointAt(r)===96?this.finishToken(24,s?null:t+e+"`"):(this.state.pos++,this.finishToken(25,s?null:t+e+"${"))}recordStrictModeErrors(t,e){const s=e.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(t,e):this.state.strictErrors.set(s,[t,e])}readWord1(t){this.state.containsEsc=!1;let e="";const s=this.state.pos;let r=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos=0;o--){const l=a[o];if(l.loc.index===n)return a[o]=t(r,s);if(l.loc.indexthis.hasPlugin(e)))throw this.raise(v.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:t})}errorBuilder(t){return(e,s,r)=>{this.raise(t,li(e,s,r))}}}class cp{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class up{constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new cp)}exit(){const t=this.stack.pop(),e=this.current();for(const[s,r]of Array.from(t.undefinedPrivateNames))e?e.undefinedPrivateNames.has(s)||e.undefinedPrivateNames.set(s,r):this.parser.raise(v.InvalidPrivateFieldResolution,r,{identifierName:s})}declarePrivateName(t,e,s){const{privateNames:r,loneAccessors:n,undefinedPrivateNames:a}=this.current();let o=r.has(t);if(e&3){const l=o&&n.get(t);if(l){const h=l&4,u=e&4,b=l&3,P=e&3;o=b===P||h!==u,o||n.delete(t)}else o||n.set(t,e)}o&&this.parser.raise(v.PrivateNameRedeclaration,s,{identifierName:t}),r.add(t),a.delete(t)}usePrivateName(t,e){let s;for(s of this.stack)if(s.privateNames.has(t))return;s?s.undefinedPrivateNames.set(t,e):this.parser.raise(v.InvalidPrivateFieldResolution,e,{identifierName:t})}}class _r{constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}}class tc extends _r{constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,e){const s=e.index;this.declarationErrors.set(s,[t,e])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}}class hp{constructor(t){this.parser=void 0,this.stack=[new _r],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,e){const s=e.loc.start,{stack:r}=this;let n=r.length-1,a=r[n];for(;!a.isCertainlyParameterDeclaration();){if(a.canBeArrowParameterDeclaration())a.recordDeclarationError(t,s);else return;a=r[--n]}this.parser.raise(t,s)}recordArrowParameterBindingError(t,e){const{stack:s}=this,r=s[s.length-1],n=e.loc.start;if(r.isCertainlyParameterDeclaration())this.parser.raise(t,n);else if(r.canBeArrowParameterDeclaration())r.recordDeclarationError(t,n);else return}recordAsyncArrowParametersError(t){const{stack:e}=this;let s=e.length-1,r=e[s];for(;r.canBeArrowParameterDeclaration();)r.type===2&&r.recordDeclarationError(v.AwaitBindingIdentifier,t),r=e[--s]}validateAsPattern(){const{stack:t}=this,e=t[t.length-1];!e.canBeArrowParameterDeclaration()||e.iterateErrors(([s,r])=>{this.parser.raise(s,r);let n=t.length-2,a=t[n];for(;a.canBeArrowParameterDeclaration();)a.clearDeclarationError(r.index),a=t[--n]})}}function fp(){return new _r(3)}function pp(){return new tc(1)}function dp(){return new tc(2)}function sc(){return new _r}class mp{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}}function sr(i,t){return(i?2:0)|(t?1:0)}class yp extends lp{addExtra(t,e,s,r=!0){if(!t)return;let{extra:n}=t;n==null&&(n={},t.extra=n),r?n[e]=s:Object.defineProperty(n,e,{enumerable:r,value:s})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,e){const s=t+e.length;if(this.input.slice(t,s)===e){const r=this.input.charCodeAt(s);return!(Xs(r)||(r&64512)===55296)}return!1}isLookaheadContextual(t){const e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return this.isContextual(t)?(this.next(),!0):!1}expectContextual(t,e){if(!this.eatContextual(t)){if(e!=null)throw this.raise(e,this.state.startLoc);this.unexpected(null,t)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return po(this.input,this.state.lastTokEndLoc.index,this.state.start)}hasFollowingLineBreak(){return po(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(v.MissingSemicolon,this.state.lastTokEndLoc)}expect(t,e){this.eat(t)||this.unexpected(e,t)}tryParse(t,e=this.state.clone()){const s={node:null};try{const r=t((n=null)=>{throw s.node=n,s});if(this.state.errors.length>e.errors.length){const n=this.state;return this.state=e,this.state.tokensLength=n.tokensLength,{node:r,error:n.errors[e.errors.length],thrown:!1,aborted:!1,failState:n}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(r){const n=this.state;if(this.state=e,r instanceof SyntaxError)return{node:null,error:r,thrown:!0,aborted:!1,failState:n};if(r===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:n};throw r}}checkExpressionErrors(t,e){if(!t)return!1;const{shorthandAssignLoc:s,doubleProtoLoc:r,privateKeyLoc:n,optionalParametersLoc:a}=t,o=!!s||!!r||!!a||!!n;if(!e)return o;s!=null&&this.raise(v.InvalidCoverInitializedName,s),r!=null&&this.raise(v.DuplicateProto,r),n!=null&&this.raise(v.UnexpectedPrivateField,n),a!=null&&this.unexpected(a)}isLiteralPropertyName(){return Wl(this.state.type)}isPrivateName(t){return t.type==="PrivateName"}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return(t.type==="MemberExpression"||t.type==="OptionalMemberExpression")&&this.isPrivateName(t.property)}isObjectProperty(t){return t.type==="ObjectProperty"}isObjectMethod(t){return t.type==="ObjectMethod"}initializeScopes(t=this.options.sourceType==="module"){const e=this.state.labels;this.state.labels=[];const s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const r=this.inModule;this.inModule=t;const n=this.scope,a=this.getScopeHandler();this.scope=new a(this,t);const o=this.prodParam;this.prodParam=new mp;const l=this.classScope;this.classScope=new up(this);const h=this.expressionScope;return this.expressionScope=new hp(this),()=>{this.state.labels=e,this.exportedIdentifiers=s,this.inModule=r,this.scope=n,this.prodParam=o,this.classScope=l,this.expressionScope=h}}enterInitialScopes(){let t=0;this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t)}checkDestructuringPrivate(t){const{privateKeyLoc:e}=t;e!==null&&this.expectPlugin("destructuringPrivate",e)}}class ir{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}}class dr{constructor(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new fr(s),t!=null&&t.options.ranges&&(this.range=[e,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}}const ha=dr.prototype;ha.__clone=function(){const i=new dr(void 0,this.start,this.loc.start),t=Object.keys(this);for(let e=0,s=t.length;e`Cannot overwrite reserved type ${i}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:i,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${i} = true,\` or \`${i} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:i,enumName:t})=>`Enum member names need to be unique, but the name \`${i}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:i})=>`Enum \`${i}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:i,enumName:t})=>`Enum type \`${i}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:i})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${i}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:i,memberName:t,explicitType:e})=>`Enum \`${i}\` has type \`${e}\`, so the initializer of \`${t}\` needs to be a ${e} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:i,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${i}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:i,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${i}\`.`,EnumInvalidMemberName:({enumName:i,memberName:t,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${e}\`, in enum \`${i}\`.`,EnumNumberMemberNotInitialized:({enumName:i,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${i}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:i})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${i}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:i})=>`Unexpected reserved type ${i}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:i,suggestion:t})=>`\`declare export ${i}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Sp(i){return i.type==="DeclareExportAllDeclaration"||i.type==="DeclareExportDeclaration"&&(!i.declaration||i.declaration.type!=="TypeAlias"&&i.declaration.type!=="InterfaceDeclaration")}function go(i){return i.importKind==="type"||i.importKind==="typeof"}const Pp={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function Ep(i,t){const e=[],s=[];for(let r=0;rclass extends i{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return Zf}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(e,s){e!==133&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,s)}addComment(e){if(this.flowPragma===void 0){const s=Ap.exec(e.value);if(s)if(s[1]==="flow")this.flowPragma="flow";else if(s[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){const s=this.state.inType;this.state.inType=!0,this.expect(e||14);const r=this.flowParseType();return this.state.inType=s,r}flowParsePredicate(){const e=this.startNode(),s=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>s.index+1&&this.raise(ve.UnexpectedSpaceBetweenModuloChecks,s),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const e=this.state.inType;this.state.inType=!0,this.expect(14);let s=null,r=null;return this.match(54)?(this.state.inType=e,r=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=e,this.match(54)&&(r=this.flowParsePredicate())),[s,r]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();const s=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(10);const a=this.flowParseFunctionTypeParams();return r.params=a.params,r.rest=a.rest,r.this=a._this,this.expect(11),[r.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),s.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.resetEndLocation(s),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,s){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(s&&this.raise(ve.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,s);this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(133)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();const s=e.body=this.startNode(),r=s.body=[];for(this.expect(5);!this.match(8);){let o=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(ve.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(o)):(this.expectContextual(125,ve.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),r.push(o)}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");let n=null,a=!1;return r.forEach(o=>{Sp(o)?(n==="CommonJS"&&this.raise(ve.AmbiguousDeclareModuleKind,o),n="ES"):o.type==="DeclareModuleExports"&&(a&&this.raise(ve.DuplicateDeclareModuleExports,o),n==="ES"&&this.raise(ve.AmbiguousDeclareModuleKind,o),n="CommonJS",a=!0)}),e.kind=n||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,s){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!s){const r=this.state.value;throw this.raise(ve.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:r,suggestion:Pp[r]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();const s=this.flowParseTypeAlias(e);return s.type="DeclareTypeAlias",s}flowParseDeclareOpaqueType(e){this.next();const s=this.flowParseOpaqueType(e,!0);return s.type="DeclareOpaqueType",s}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,s){if(e.id=this.flowParseRestrictedIdentifier(!s,!0),this.scope.declareName(e.id.name,s?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!s&&this.eat(12));if(s){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:s,allowExact:!1,allowSpread:!1,allowProto:s,allowInexact:!1})}flowParseInterfaceExtends(){const e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(ve.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,s,r){!xp.has(e)||this.raise(r?ve.AssignReservedType:ve.UnexpectedReservedType,s,{reservedType:e})}flowParseRestrictedIdentifier(e,s){return this.checkReservedType(this.state.value,this.state.startLoc,s),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,s){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,s||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){const s=this.state.startLoc,r=this.startNode(),n=this.flowParseVariance(),a=this.flowParseTypeAnnotatableIdentifier();return r.name=a.name,r.variance=n,r.bound=a.typeAnnotation,this.match(29)?(this.eat(29),r.default=this.flowParseType()):e&&this.raise(ve.MissingTypeParamDefault,s),this.finishNode(r,"TypeParameter")}flowParseTypeParameterDeclaration(){const e=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let r=!1;do{const n=this.flowParseTypeParameter(r);s.params.push(n),n.default&&(r=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(s,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){const e=this.startNode(),s=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);const r=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=r,this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){const e=this.startNode(),s=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){const e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,s,r){return e.static=s,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,s){return e.static=s,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,s){const r=this.startNode();return e.static=s,e.value=this.flowParseObjectTypeMethodish(r),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:s,allowSpread:r,allowProto:n,allowInexact:a}){const o=this.state.inType;this.state.inType=!0;const l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];let h,u,b=!1;for(s&&this.match(6)?(this.expect(6),h=9,u=!0):(this.expect(5),h=8,u=!1),l.exact=u;!this.match(h);){let I=!1,A=null,j=null;const H=this.startNode();if(n&&this.isContextual(118)){const B=this.lookahead();B.type!==14&&B.type!==17&&(this.next(),A=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){const B=this.lookahead();B.type!==14&&B.type!==17&&(this.next(),I=!0)}const D=this.flowParseVariance();if(this.eat(0))A!=null&&this.unexpected(A),this.eat(0)?(D&&this.unexpected(D.loc.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(H,I))):l.indexers.push(this.flowParseObjectTypeIndexer(H,I,D));else if(this.match(10)||this.match(47))A!=null&&this.unexpected(A),D&&this.unexpected(D.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(H,I));else{let B="init";if(this.isContextual(99)||this.isContextual(104)){const W=this.lookahead();Wl(W.type)&&(B=this.state.value,this.next())}const ie=this.flowParseObjectTypeProperty(H,I,A,D,B,r,a!=null?a:!u);ie===null?(b=!0,j=this.state.lastTokStartLoc):l.properties.push(ie)}this.flowObjectTypeSemicolon(),j&&!this.match(8)&&!this.match(9)&&this.raise(ve.UnexpectedExplicitInexactInObject,j)}this.expect(h),r&&(l.inexact=b);const P=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=o,P}flowParseObjectTypeProperty(e,s,r,n,a,o,l){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?l||this.raise(ve.InexactInsideExact,this.state.lastTokStartLoc):this.raise(ve.InexactInsideNonObject,this.state.lastTokStartLoc),n&&this.raise(ve.InexactVariance,n),null):(o||this.raise(ve.UnexpectedSpreadType,this.state.lastTokStartLoc),r!=null&&this.unexpected(r),n&&this.raise(ve.SpreadVariance,n),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=s,e.proto=r!=null,e.kind=a;let h=!1;return this.match(47)||this.match(10)?(e.method=!0,r!=null&&this.unexpected(r),n&&this.unexpected(n.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(a==="get"||a==="set")&&this.flowCheckGetterSetterParams(e),!o&&e.key.name==="constructor"&&e.value.this&&this.raise(ve.ThisParamBannedInConstructor,e.value.this)):(a!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(h=!0),e.value=this.flowParseTypeInitialiser(),e.variance=n),e.optional=h,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){const s=e.kind==="get"?0:1,r=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?ve.GetterMayNotHaveThisParam:ve.SetterMayNotHaveThisParam,e.value.this),r!==s&&this.raise(e.kind==="get"?v.BadGetterArity:v.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(v.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,s){var r;(r=e)!=null||(e=this.state.startLoc);let n=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){const a=this.startNodeAt(e);a.qualification=n,a.id=this.flowParseRestrictedIdentifier(!0),n=this.finishNode(a,"QualifiedTypeIdentifier")}return n}flowParseGenericType(e,s){const r=this.startNodeAt(e);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,s),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){const e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){const e=this.startNode();for(e.types=[],this.expect(0);this.state.possuper.parseFunctionBody(e,!0,r));return}super.parseFunctionBody(e,!1,r)}parseFunctionBodyAndFinish(e,s,r=!1){if(this.match(14)){const n=this.startNode();[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=n.typeAnnotation?this.finishNode(n,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,s,r)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){const r=this.lookahead();if(Mt(r.type)){const n=this.startNode();return this.next(),this.flowParseInterface(n)}}else if(this.plugins.get("flow").enums&&this.isContextual(126)){const r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}const s=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(s)&&(this.flowPragma=null),s}parseExpressionStatement(e,s,r){if(s.type==="Identifier"){if(s.name==="declare"){if(this.match(80)||He(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(He(this.state.type)){if(s.name==="interface")return this.flowParseInterface(e);if(s.name==="type")return this.flowParseTypeAlias(e);if(s.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,s,r)}shouldParseExportDeclaration(){const{type:e}=this.state;return fo(e)||this.plugins.get("flow").enums&&e===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:e}=this.state;return fo(e)||this.plugins.get("flow").enums&&e===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.plugins.get("flow").enums&&this.isContextual(126)){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,s,r){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){const P=this.lookaheadCharCode();if(P===44||P===61||P===58||P===41)return this.setOptionalParametersError(r),e}this.expect(17);const n=this.state.clone(),a=this.state.noArrowAt,o=this.startNodeAt(s);let{consequent:l,failed:h}=this.tryParseConditionalConsequent(),[u,b]=this.getArrowLikeExpressions(l);if(h||b.length>0){const P=[...a];if(b.length>0){this.state=n,this.state.noArrowAt=P;for(let I=0;I1&&this.raise(ve.AmbiguousConditionalArrow,n.startLoc),h&&u.length===1&&(this.state=n,P.push(u[0].start),this.state.noArrowAt=P,{consequent:l,failed:h}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=a,this.expect(14),o.test=e,o.consequent=l,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const e=this.parseMaybeAssignAllowIn(),s=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:s}}getArrowLikeExpressions(e,s){const r=[e],n=[];for(;r.length!==0;){const a=r.pop();a.type==="ArrowFunctionExpression"&&a.body.type!=="BlockStatement"?(a.typeParameters||!a.returnType?this.finishArrowValidation(a):n.push(a),r.push(a.body)):a.type==="ConditionalExpression"&&(r.push(a.consequent),r.push(a.alternate))}return s?(n.forEach(a=>this.finishArrowValidation(a)),[n,[]]):Ep(n,a=>a.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(e){var s;this.toAssignableList(e.params,(s=e.extra)==null?void 0:s.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,s){let r;return this.state.noArrowParamsConversionAt.includes(e.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),r=s(),this.state.noArrowParamsConversionAt.pop()):r=s(),r}parseParenItem(e,s){const r=super.parseParenItem(e,s);if(this.eat(17)&&(r.optional=!0,this.resetEndLocation(e)),this.match(14)){const n=this.startNodeAt(s);return n.expression=r,n.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(n,"TypeCastExpression")}return r}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";const s=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(s)}else if(this.isContextual(131)){e.exportKind="type";const s=this.startNode();return this.next(),this.flowParseOpaqueType(s,!1)}else if(this.isContextual(129)){e.exportKind="type";const s=this.startNode();return this.next(),this.flowParseInterface(s)}else if(this.plugins.get("flow").enums&&this.isContextual(126)){e.exportKind="value";const s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){const{startLoc:s}=this.state,r=super.maybeParseExportNamespaceSpecifier(e);return r&&e.exportKind==="type"&&this.unexpected(s),r}parseClassId(e,s,r){super.parseClassId(e,s,r),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,s,r){const{startLoc:n}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,s))return;s.declare=!0}super.parseClassMember(e,s,r),s.declare&&(s.type!=="ClassProperty"&&s.type!=="ClassPrivateProperty"&&s.type!=="PropertyDefinition"?this.raise(ve.DeclareClassElement,n):s.value&&this.raise(ve.DeclareClassFieldInitializer,s.value))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){const e=super.readWord1(),s="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(v.InvalidIdentifier,this.state.curPosition(),{identifierName:s}),this.finishToken(132,s)}getTokenFromCode(e){const s=this.input.charCodeAt(this.state.pos+1);e===123&&s===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?s===46?this.finishOp(18,2):this.finishOp(17,1):zf(e,s,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,s){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,s):super.isAssignable(e,s)}toAssignable(e,s=!1){!s&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,s)}toAssignableList(e,s,r){for(let n=0;n1||!s)&&this.raise(ve.TypeCastInPattern,a.typeAnnotation)}return e}parseArrayLike(e,s,r,n){const a=super.parseArrayLike(e,s,r,n);return s&&!this.state.maybeInArrowParameters&&this.toReferencedList(a.elements),a}isValidLVal(e,s,r){return e==="TypeCastExpression"||super.isValidLVal(e,s,r)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,s,r,n,a,o){if(s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,s,r,n,a,o),s.params&&a){const l=s.params;l.length>0&&this.isThisParam(l[0])&&this.raise(ve.ThisParamBannedInConstructor,s)}else if(s.type==="MethodDefinition"&&a&&s.value.params){const l=s.value.params;l.length>0&&this.isThisParam(l[0])&&this.raise(ve.ThisParamBannedInConstructor,s)}}pushClassPrivateMethod(e,s,r,n){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,s,r,n)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();const s=e.implements=[];do{const r=this.startNode();r.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,s.push(this.finishNode(r,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);const s=this.getObjectOrClassMethodParams(e);if(s.length>0){const r=s[0];this.isThisParam(r)&&e.kind==="get"?this.raise(ve.GetterMayNotHaveThisParam,r):this.isThisParam(r)&&this.raise(ve.SetterMayNotHaveThisParam,r)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,s,r,n,a,o,l){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let h;this.match(47)&&!o&&(h=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());const u=super.parseObjPropValue(e,s,r,n,a,o,l);return h&&((u.value||u).typeParameters=h),u}parseFunctionParamType(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(ve.PatternIsOptional,e),this.isThisParam(e)&&this.raise(ve.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(ve.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(ve.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,s){const r=super.parseMaybeDefault(e,s);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.startsuper.parseMaybeAssign(e,s),n),!a.error)return a.node;const{context:h}=this.state,u=h[h.length-1];(u===Ke.j_oTag||u===Ke.j_expr)&&h.pop()}if((r=a)!=null&&r.error||this.match(47)){var o,l;n=n||this.state.clone();let h;const u=this.tryParse(P=>{var I;h=this.flowParseTypeParameterDeclaration();const A=this.forwardNoArrowParamsConversionAt(h,()=>{const H=super.parseMaybeAssign(e,s);return this.resetStartLocationFromNode(H,h),H});(I=A.extra)!=null&&I.parenthesized&&P();const j=this.maybeUnwrapTypeCastExpression(A);return j.type!=="ArrowFunctionExpression"&&P(),j.typeParameters=h,this.resetStartLocationFromNode(j,h),A},n);let b=null;if(u.node&&this.maybeUnwrapTypeCastExpression(u.node).type==="ArrowFunctionExpression"){if(!u.error&&!u.aborted)return u.node.async&&this.raise(ve.UnexpectedTypeParameterBeforeAsyncArrowFunction,h),u.node;b=u.node}if((o=a)!=null&&o.node)return this.state=a.failState,a.node;if(b)return this.state=u.failState,b;throw(l=a)!=null&&l.thrown?a.error:u.thrown?u.error:this.raise(ve.UnexpectedTokenAfterTypeParameter,h)}return super.parseMaybeAssign(e,s)}parseArrow(e){if(this.match(14)){const s=this.tryParse(()=>{const r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const n=this.startNode();return[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=r,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),n});if(s.thrown)return null;s.error&&(this.state=s.failState),e.returnType=s.node.typeAnnotation?this.finishNode(s.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,s){this.state.noArrowParamsConversionAt.includes(e.start)?e.params=s:super.setArrowFunctionParameters(e,s)}checkParams(e,s,r,n=!0){if(!(r&&this.state.noArrowParamsConversionAt.includes(e.start))){for(let a=0;a0&&this.raise(ve.ThisParamMustBeFirst,e.params[a]);super.checkParams(e,s,r,n)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&!this.state.noArrowAt.includes(this.state.start))}parseSubscripts(e,s,r){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.includes(s.index)){this.next();const n=this.startNodeAt(s);n.callee=e,n.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(n,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){const n=this.state.clone(),a=this.tryParse(l=>this.parseAsyncArrowWithTypeParameters(s)||l(),n);if(!a.error&&!a.aborted)return a.node;const o=this.tryParse(()=>super.parseSubscripts(e,s,r),n);if(o.node&&!o.error)return o.node;if(a.node)return this.state=a.failState,a.node;if(o.node)return this.state=o.failState,o.node;throw a.error||o.error}return super.parseSubscripts(e,s,r)}parseSubscript(e,s,r,n){if(this.match(18)&&this.isLookaheadToken_lt()){if(n.optionalChainMember=!0,r)return n.stop=!0,e;this.next();const a=this.startNodeAt(s);return a.callee=e,a.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),a.arguments=this.parseCallExpressionArguments(11,!1),a.optional=!0,this.finishCallExpression(a,!0)}else if(!r&&this.shouldParseTypes()&&this.match(47)){const a=this.startNodeAt(s);a.callee=e;const o=this.tryParse(()=>(a.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),a.arguments=super.parseCallExpressionArguments(11,!1),n.optionalChainMember&&(a.optional=!1),this.finishCallExpression(a,n.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(e,s,r,n)}parseNewCallee(e){super.parseNewCallee(e);let s=null;this.shouldParseTypes()&&this.match(47)&&(s=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=s}parseAsyncArrowWithTypeParameters(e){const s=this.startNodeAt(e);if(this.parseFunctionParams(s,!1),!!this.parseArrow(s))return super.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(e){const s=this.input.charCodeAt(this.state.pos+1);if(e===42&&s===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){const s=this.input.charCodeAt(this.state.pos+1);if(e===124&&s===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,s){const r=super.parseTopLevel(e,s);return this.state.hasFlowComment&&this.raise(ve.UnterminatedFlowComment,this.state.curPosition()),r}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(ve.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();const e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){const{pos:e}=this.state;let s=2;for(;[32,9].includes(this.input.charCodeAt(e+s));)s++;const r=this.input.charCodeAt(s+e),n=this.input.charCodeAt(s+e+1);return r===58&&n===58?s+2:this.input.slice(s+e,s+e+12)==="flow-include"?s+12:r===58&&n!==58?s:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(v.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:s,memberName:r}){this.raise(ve.EnumBooleanMemberNotInitialized,e,{memberName:r,enumName:s})}flowEnumErrorInvalidMemberInitializer(e,s){return this.raise(s.explicitType?s.explicitType==="symbol"?ve.EnumInvalidMemberInitializerSymbolType:ve.EnumInvalidMemberInitializerPrimaryType:ve.EnumInvalidMemberInitializerUnknownType,e,s)}flowEnumErrorNumberMemberNotInitialized(e,s){this.raise(ve.EnumNumberMemberNotInitialized,e,s)}flowEnumErrorStringMemberInconsistentlyInitialized(e,s){this.raise(ve.EnumStringMemberInconsistentlyInitialized,e,s)}flowEnumMemberInit(){const e=this.state.startLoc,s=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{const r=this.parseNumericLiteral(this.state.value);return s()?{type:"number",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 133:{const r=this.parseStringLiteral(this.state.value);return s()?{type:"string",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 85:case 86:{const r=this.parseBooleanLiteral(this.match(85));return s()?{type:"boolean",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){const e=this.state.startLoc,s=this.parseIdentifier(!0),r=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:s,init:r}}flowEnumCheckExplicitTypeMismatch(e,s,r){const{explicitType:n}=s;n!==null&&n!==r&&this.flowEnumErrorInvalidMemberInitializer(e,s)}flowEnumMembers({enumName:e,explicitType:s}){const r=new Set,n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let a=!1;for(;!this.match(8);){if(this.eat(21)){a=!0;break}const o=this.startNode(),{id:l,init:h}=this.flowEnumMemberRaw(),u=l.name;if(u==="")continue;/^[a-z]/.test(u)&&this.raise(ve.EnumInvalidMemberName,l,{memberName:u,suggestion:u[0].toUpperCase()+u.slice(1),enumName:e}),r.has(u)&&this.raise(ve.EnumDuplicateMemberName,l,{memberName:u,enumName:e}),r.add(u);const b={enumName:e,explicitType:s,memberName:u};switch(o.id=l,h.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(h.loc,b,"boolean"),o.init=h.value,n.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(h.loc,b,"number"),o.init=h.value,n.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(h.loc,b,"string"),o.init=h.value,n.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(h.loc,b);case"none":switch(s){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(h.loc,b);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(h.loc,b);break;default:n.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:n,hasUnknownMembers:a}}flowEnumStringMembers(e,s,{enumName:r}){if(e.length===0)return s;if(s.length===0)return e;if(s.length>e.length){for(const n of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:r});return s}else{for(const n of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:r});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!He(this.state.type))throw this.raise(ve.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});const{value:s}=this.state;return this.next(),s!=="boolean"&&s!=="number"&&s!=="string"&&s!=="symbol"&&this.raise(ve.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:s}),s}flowEnumBody(e,s){const r=s.name,n=s.loc.start,a=this.flowEnumParseExplicitType({enumName:r});this.expect(5);const{members:o,hasUnknownMembers:l}=this.flowEnumMembers({enumName:r,explicitType:a});switch(e.hasUnknownMembers=l,a){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{const h=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;const u=o.booleanMembers.length,b=o.numberMembers.length,P=o.stringMembers.length,I=o.defaultedMembers.length;if(!u&&!b&&!P&&!I)return h();if(!u&&!b)return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!b&&!P&&u>=I){for(const A of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(A.loc.start,{enumName:r,memberName:A.id.name});return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!u&&!P&&b>=I){for(const A of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(A.loc.start,{enumName:r,memberName:A.id.name});return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(ve.EnumInconsistentMemberValues,n,{enumName:r}),h()}}}flowParseEnumDeclaration(e){const s=this.parseIdentifier();return e.id=s,e.body=this.flowEnumBody(this.startNode(),s),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){const e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){const s=this.input.charCodeAt(e+1);return s!==60&&s!==61}return!1}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}};const Cp={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},ks=is`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:i})=>`Expected corresponding JSX closing tag for <${i}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:i,HTMLEntity:t})=>`Unexpected token \`${i}\`. Did you mean \`${t}\` or \`{'${i}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?"});function ps(i){return i?i.type==="JSXOpeningFragment"||i.type==="JSXClosingFragment":!1}function Hs(i){if(i.type==="JSXIdentifier")return i.name;if(i.type==="JSXNamespacedName")return i.namespace.name+":"+i.name.name;if(i.type==="JSXMemberExpression")return Hs(i.object)+"."+Hs(i.property);throw new Error("Node had unexpected type: "+i.type)}var kp=i=>class extends i{jsxReadToken(){let e="",s=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(ks.UnterminatedJsxContent,this.state.startLoc);const r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:if(this.state.pos===this.state.start){r===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(r);return}e+=this.input.slice(s,this.state.pos),this.finishToken(141,e);return;case 38:e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos;break;case 62:case 125:default:Ys(r)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){const s=this.input.charCodeAt(this.state.pos);let r;return++this.state.pos,s===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,r=e?` -`:`\r -`):r=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,r}jsxReadString(e){let s="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(v.UnterminatedString,this.state.startLoc);const n=this.input.charCodeAt(this.state.pos);if(n===e)break;n===38?(s+=this.input.slice(r,this.state.pos),s+=this.jsxReadEntity(),r=this.state.pos):Ys(n)?(s+=this.input.slice(r,this.state.pos),s+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}s+=this.input.slice(r,this.state.pos++),this.finishToken(133,s)}jsxReadEntity(){const e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);const r=this.readInt(s,void 0,!1,"bail");if(r!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(r)}else{let s=0,r=!1;for(;s++<10&&this.state.pos1){for(let r=0;r0){if(s&256){const n=!!(s&512),a=(r&4)>0;return n!==a}return!0}return s&128&&(r&8)>0?t.names.get(e)&2?!!(s&1):!1:s&2&&(r&1)>0?!0:super.isRedeclaredInScope(t,e,s)}checkLocalExport(t){const{name:e}=t;if(this.hasImport(e))return;const s=this.scopeStack.length;for(let r=s-1;r>=0;r--){const a=this.scopeStack[r].tsNames.get(e);if((a&1)>0||(a&16)>0)return}super.checkLocalExport(t)}}const ic=i=>i.type==="ParenthesizedExpression"?ic(i.expression):i;class Ip extends bp{toAssignable(t,e=!1){var s,r;let n;switch((t.type==="ParenthesizedExpression"||(s=t.extra)!=null&&s.parenthesized)&&(n=ic(t),e?n.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(v.InvalidParenthesizedAssignment,t):n.type!=="MemberExpression"&&!this.isOptionalMemberExpression(n)&&this.raise(v.InvalidParenthesizedAssignment,t):this.raise(v.InvalidParenthesizedAssignment,t)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern";for(let o=0,l=t.properties.length,h=l-1;or.type!=="ObjectMethod"&&(n===s||r.type!=="SpreadElement")&&this.isAssignable(r))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(s=>s===null||this.isAssignable(s));case"AssignmentExpression":return t.operator==="=";case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(const s of t)(s==null?void 0:s.type)==="ArrayExpression"&&this.toReferencedListDeep(s.elements)}parseSpread(t){const e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){const t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,1),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(t,e,s){const r=s&1,n=[];let a=!0;for(;!this.eat(t);)if(a?a=!1:this.expect(12),r&&this.match(12))n.push(null);else{if(this.eat(t))break;if(this.match(21)){let o=this.parseRestBinding();if((this.hasPlugin("flow")||s&2)&&(o=this.parseFunctionParamType(o)),n.push(o),!this.checkCommaAfterRest(e)){this.expect(t);break}}else{const o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(v.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());n.push(this.parseAssignableListItem(s,o))}}return n}parseBindingRestProperty(t){return this.next(),t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){const{type:t,startLoc:e}=this.state;if(t===21)return this.parseBindingRestProperty(this.startNode());const s=this.startNode();return t===138?(this.expectPlugin("destructuringPrivate",e),this.classScope.usePrivateName(this.state.value,e),s.key=this.parsePrivateName()):this.parsePropertyName(s),s.method=!1,this.parseObjPropValue(s,e,!1,!1,!0,!1)}parseAssignableListItem(t,e){const s=this.parseMaybeDefault();(this.hasPlugin("flow")||t&2)&&this.parseFunctionParamType(s);const r=this.parseMaybeDefault(s.loc.start,s);return e.length&&(s.decorators=e),r}parseFunctionParamType(t){return t}parseMaybeDefault(t,e){var s,r;if((s=t)!=null||(t=this.state.startLoc),e=(r=e)!=null?r:this.parseBindingAtom(),!this.eat(29))return e;const n=this.startNodeAt(t);return n.left=e,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}isValidLVal(t,e,s){switch(t){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties"}return!1}isOptionalMemberExpression(t){return t.type==="OptionalMemberExpression"}checkLVal(t,e,s=64,r=!1,n=!1,a=!1){var o;const l=t.type;if(this.isObjectMethod(t))return;const h=this.isOptionalMemberExpression(t);if(h||l==="MemberExpression"){h&&(this.expectPlugin("optionalChainingAssign",t.loc.start),e.type!=="AssignmentExpression"&&this.raise(v.InvalidLhsOptionalChaining,t,{ancestor:e})),s!==64&&this.raise(v.InvalidPropertyBindingPattern,t);return}if(l==="Identifier"){this.checkIdentifier(t,s,n);const{name:j}=t;r&&(r.has(j)?this.raise(v.ParamDupe,t):r.add(j));return}const u=this.isValidLVal(l,!(a||(o=t.extra)!=null&&o.parenthesized)&&e.type==="AssignmentExpression",s);if(u===!0)return;if(u===!1){const j=s===64?v.InvalidLhs:v.InvalidLhsBinding;this.raise(j,t,{ancestor:e});return}let b,P;typeof u=="string"?(b=u,P=l==="ParenthesizedExpression"):[b,P]=u;const I=l==="ArrayPattern"||l==="ObjectPattern"?{type:l}:e,A=t[b];if(Array.isArray(A))for(const j of A)j&&this.checkLVal(j,I,s,r,n,P);else A&&this.checkLVal(A,I,s,r,n,P)}checkIdentifier(t,e,s=!1){this.state.strict&&(s?Yl(t.name,this.inModule):Xl(t.name))&&(e===64?this.raise(v.StrictEvalArguments,t,{referenceName:t.name}):this.raise(v.StrictEvalArgumentsBinding,t,{bindingName:t.name})),e&8192&&t.name==="let"&&this.raise(v.LetInLexicalBinding,t),e&64||this.declareNameFromIdentifier(t,e)}declareNameFromIdentifier(t,e){this.scope.declareName(t.name,e,t.loc.start)}checkToRestConversion(t,e){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(v.InvalidRestAssignmentPattern,t)}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?v.RestTrailingComma:v.ElementAfterRest,this.state.startLoc),!0):!1}}function Np(i){if(i==null)throw new Error(`Unexpected ${i} value.`);return i}function To(i){if(!i)throw new Error("Assert fail")}const Ae=is`typescript`({AbstractMethodHasImplementation:({methodName:i})=>`Method '${i}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:i})=>`Property '${i}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:i})=>`'declare' is not allowed in ${i}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:i})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:i})=>`Duplicate modifier: '${i}'.`,EmptyHeritageClauseType:({token:i})=>`'${i}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:i})=>`'${i[0]}' modifier cannot be used with '${i[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:i})=>`Index signatures cannot have an accessibility modifier ('${i}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:i})=>`'${i}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:i})=>`'${i}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:i})=>`'${i}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:i})=>`'${i[0]}' modifier must precede '${i[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:i})=>`Private elements cannot have an accessibility modifier ('${i}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:i})=>`Single type parameter ${i} should have a trailing comma. Example usage: <${i},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:i})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${i}.`});function _p(i){switch(i){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function bo(i){return i==="private"||i==="public"||i==="protected"}function Mp(i){return i==="in"||i==="out"}var Op=i=>class extends i{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:Ae.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:Ae.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:Ae.InvalidModifierOnTypeParameter})}getScopeHandler(){return Lp}tsIsIdentifier(){return He(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(e,s){if(!He(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;const r=this.state.value;if(e.includes(r)){if(s&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:s,stopOnStartOfClassStaticBlock:r,errorTemplate:n=Ae.InvalidModifierOnTypeMember},a){const o=(h,u,b,P)=>{u===b&&a[P]&&this.raise(Ae.InvalidModifiersOrder,h,{orderedModifiers:[b,P]})},l=(h,u,b,P)=>{(a[b]&&u===P||a[P]&&u===b)&&this.raise(Ae.IncompatibleModifiers,h,{modifiers:[b,P]})};for(;;){const{startLoc:h}=this.state,u=this.tsParseModifier(e.concat(s!=null?s:[]),r);if(!u)break;bo(u)?a.accessibility?this.raise(Ae.DuplicateAccessibilityModifier,h,{modifier:u}):(o(h,u,u,"override"),o(h,u,u,"static"),o(h,u,u,"readonly"),a.accessibility=u):Mp(u)?(a[u]&&this.raise(Ae.DuplicateModifier,h,{modifier:u}),a[u]=!0,o(h,u,"in","out")):(hasOwnProperty.call(a,u)?this.raise(Ae.DuplicateModifier,h,{modifier:u}):(o(h,u,"static","readonly"),o(h,u,"static","override"),o(h,u,"override","readonly"),o(h,u,"abstract","override"),l(h,u,"declare","override"),l(h,u,"static","abstract")),a[u]=!0),s!=null&&s.includes(u)&&this.raise(n,h,{modifier:u})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,s){const r=[];for(;!this.tsIsListTerminator(e);)r.push(s());return r}tsParseDelimitedList(e,s,r){return Np(this.tsParseDelimitedListWorker(e,s,!0,r))}tsParseDelimitedListWorker(e,s,r,n){const a=[];let o=-1;for(;!this.tsIsListTerminator(e);){o=-1;const l=s();if(l==null)return;if(a.push(l),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;r&&this.expect(12);return}return n&&(n.value=o),a}tsParseBracketedList(e,s,r,n,a){n||(r?this.expect(0):this.expect(47));const o=this.tsParseDelimitedList(e,s,a);return r?this.expect(3):this.expect(48),o}tsParseImportType(){const e=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(Ae.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(e.options=null),this.eat(12)&&(this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes"),this.match(11)||(e.options=super.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let s=this.parseIdentifier(e);for(;this.eat(16);){const r=this.startNodeAtNode(s);r.left=s,r.right=this.parseIdentifier(e),s=this.finishNode(r,"TSQualifiedName")}return s}tsParseTypeReference(){const e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();const s=this.startNodeAtNode(e);return s.parameterName=e,s.typeAnnotation=this.tsParseTypeAnnotation(!1),s.asserts=!1,this.finishNode(s,"TSTypePredicate")}tsParseThisTypeNode(){const e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){const e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){const s=this.startNode();return e(s),s.name=this.tsParseTypeParameterName(),s.constraint=this.tsEatThenParseType(81),s.default=this.tsEatThenParseType(29),this.finishNode(s,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){const s=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();const r={value:-1};return s.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,r),s.params.length===0&&this.raise(Ae.EmptyTypeParameters,s),r.value!==-1&&this.addExtra(s,"trailingComma",r.value),this.finishNode(s,"TSTypeParameterDeclaration")}tsFillSignature(e,s){const r=e===19,n="parameters",a="typeAnnotation";s.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),s[n]=this.tsParseBindingListForSignature(),r?s[a]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(s[a]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){const e=super.parseBindingList(11,41,2);for(const s of e){const{type:r}=s;(r==="AssignmentPattern"||r==="TSParameterProperty")&&this.raise(Ae.UnsupportedSignatureParameterKind,s,{type:r})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,s){return this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon(),this.finishNode(s,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),He(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);const s=this.parseIdentifier();s.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(s),this.expect(3),e.parameters=[s];const r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,s){this.eat(17)&&(e.optional=!0);const r=e;if(this.match(10)||this.match(47)){s&&this.raise(Ae.ReadonlyForMethodSignature,e);const n=r;n.kind&&this.match(47)&&this.raise(Ae.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon();const a="parameters",o="typeAnnotation";if(n.kind==="get")n[a].length>0&&(this.raise(v.BadGetterArity,this.state.curPosition()),this.isThisParam(n[a][0])&&this.raise(Ae.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(n.kind==="set"){if(n[a].length!==1)this.raise(v.BadSetterArity,this.state.curPosition());else{const l=n[a][0];this.isThisParam(l)&&this.raise(Ae.AccessorCannotDeclareThisParameter,this.state.curPosition()),l.type==="Identifier"&&l.optional&&this.raise(Ae.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),l.type==="RestElement"&&this.raise(Ae.SetAccessorCannotHaveRestParameter,this.state.curPosition())}n[o]&&this.raise(Ae.SetAccessorCannotHaveReturnType,n[o])}else n.kind="method";return this.finishNode(n,"TSMethodSignature")}else{const n=r;s&&(n.readonly=!0);const a=this.tsTryParseTypeAnnotation();return a&&(n.typeAnnotation=a),this.tsParseTypeMemberSemicolon(),this.finishNode(n,"TSPropertySignature")}}tsParseTypeMember(){const e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){const r=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(r,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);const s=this.tsTryParseIndexSignature(e);return s||(super.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){const e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){const e=this.startNode();this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0);{const s=this.startNode();s.name=this.tsParseTypeParameterName(),s.constraint=this.tsExpectThenParseType(58),e.typeParameter=this.finishNode(s,"TSTypeParameter")}return e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){const e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let s=!1;return e.elementTypes.forEach(r=>{const{type:n}=r;s&&n!=="TSRestType"&&n!=="TSOptionalType"&&!(n==="TSNamedTupleMember"&&r.optional)&&this.raise(Ae.OptionalTypeBeforeRequired,r),s||(s=n==="TSNamedTupleMember"&&r.optional||n==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){const{startLoc:e}=this.state,s=this.eat(21);let r,n,a,o;const h=Mt(this.state.type)?this.lookaheadCharCode():null;if(h===58)r=!0,a=!1,n=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(h===63){a=!0;const u=this.state.startLoc,b=this.state.value,P=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(r=!0,n=this.createIdentifier(this.startNodeAt(u),b),this.expect(17),this.expect(14),o=this.tsParseType()):(r=!1,o=P,this.expect(17))}else o=this.tsParseType(),a=this.eat(17),r=this.eat(14);if(r){let u;n?(u=this.startNodeAtNode(n),u.optional=a,u.label=n,u.elementType=o,this.eat(17)&&(u.optional=!0,this.raise(Ae.TupleOptionalAfterType,this.state.lastTokStartLoc))):(u=this.startNodeAtNode(o),u.optional=a,this.raise(Ae.InvalidTupleMemberLabel,o),u.label=o,u.elementType=this.tsParseType()),o=this.finishNode(u,"TSNamedTupleMember")}else if(a){const u=this.startNodeAtNode(o);u.typeAnnotation=o,o=this.finishNode(u,"TSOptionalType")}if(s){const u=this.startNodeAt(e);u.typeAnnotation=o,o=this.finishNode(u,"TSRestType")}return o}tsParseParenthesizedType(){const e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,s){const r=this.startNode();return e==="TSConstructorType"&&(r.abstract=!!s,s&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,r)),this.finishNode(r,e)}tsParseLiteralTypeNode(){const e=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){const e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){const e=this.startNode(),s=this.lookahead();return s.type!==134&&s.type!==135&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{const{type:e}=this.state;if(He(e)||e===88||e===84){const s=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":_p(this.state.value);if(s!==void 0&&this.lookaheadCharCode()!==46){const r=this.startNode();return this.next(),this.finishNode(r,s)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){const s=this.startNodeAtNode(e);s.elementType=e,this.expect(3),e=this.finishNode(s,"TSArrayType")}else{const s=this.startNodeAtNode(e);s.objectType=e,s.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(s,"TSIndexedAccessType")}return e}tsParseTypeOperator(){const e=this.startNode(),s=this.state.value;return this.next(),e.operator=s,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),s==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(Ae.UnexpectedReadonly,e)}}tsParseInferType(){const e=this.startNode();this.expectContextual(115);const s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(s,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){const e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return Rf(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,s,r){const n=this.startNode(),a=this.eat(r),o=[];do o.push(s());while(this.eat(r));return o.length===1&&!a?o[0]:(n.types=o,this.finishNode(n,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(He(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){const{errors:e}=this.state,s=e.length;try{return this.parseObjectLike(8,!0),e.length===s}catch{return!1}}if(this.match(0)){this.next();const{errors:e}=this.state,s=e.length;try{return super.parseBindingList(3,93,1),e.length===s}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{const s=this.startNode();this.expect(e);const r=this.startNode(),n=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(78)){let l=this.tsParseThisTypeOrThisTypePredicate();return l.type==="TSThisType"?(r.parameterName=l,r.asserts=!0,r.typeAnnotation=null,l=this.finishNode(r,"TSTypePredicate")):(this.resetStartLocationFromNode(l,r),l.asserts=!0),s.typeAnnotation=l,this.finishNode(s,"TSTypeAnnotation")}const a=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!a)return n?(r.parameterName=this.parseIdentifier(),r.asserts=n,r.typeAnnotation=null,s.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,s);const o=this.tsParseTypeAnnotation(!1);return r.parameterName=a,r.typeAnnotation=o,r.asserts=n,s.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){const e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;const e=this.state.containsEsc;return this.next(),!He(this.state.type)&&!this.match(78)?!1:(e&&this.raise(v.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,s=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),s.typeAnnotation=this.tsParseType()}),this.finishNode(s,"TSTypeAnnotation")}tsParseType(){To(this.state.inType);const e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;const s=this.startNodeAtNode(e);return s.checkType=e,s.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),s.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),s.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(s,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Ae.ReservedTypeAssertion,this.state.startLoc);const e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){const s=this.state.startLoc,r=this.tsParseDelimitedList("HeritageClauseElement",()=>{const n=this.startNode();return n.expression=this.tsParseEntityName(),this.match(47)&&(n.typeParameters=this.tsParseTypeArguments()),this.finishNode(n,"TSExpressionWithTypeArguments")});return r.length||this.raise(Ae.EmptyHeritageClauseType,s,{token:e}),r}tsParseInterfaceDeclaration(e,s={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),s.declare&&(e.declare=!0),He(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(Ae.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));const r=this.startNode();return r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(r,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){const s=this.startNode();return this.next(),this.finishNode(s,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){const s=this.state.context;this.state.context=[s[0]];try{return e()}finally{this.state.context=s}}tsInType(e){const s=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=s}}tsInDisallowConditionalTypesContext(e){const s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsInAllowConditionalTypesContext(e){const s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){const e=this.startNode();return e.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,s={}){return s.const&&(e.const=!0),s.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){const e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,s=!1){if(e.id=this.parseIdentifier(),s||this.checkIdentifier(e.id,1024),this.eat(16)){const r=this.startNode();this.tsParseModuleOrNamespaceDeclaration(r,!0),e.body=r}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.global=!0,e.id=this.parseIdentifier()):this.match(133)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,s,r){e.isExport=r||!1,e.id=s||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);const n=this.tsParseModuleReference();return e.importKind==="type"&&n.type!=="TSExternalModuleReference"&&this.raise(Ae.ImportAliasHasImportType,n),e.moduleReference=n,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){const e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){const s=this.state.clone(),r=e();return this.state=s,r}tsTryParseAndCatch(e){const s=this.tryParse(r=>e()||r());if(!(s.aborted||!s.node))return s.error&&(this.state=s.failState),s.node}tsTryParse(e){const s=this.state.clone(),r=e();if(r!==void 0&&r!==!1)return r;this.state=s}tsTryParseDeclare(e){if(this.isLineTerminator())return;let s=this.state.type,r;return this.isContextual(100)&&(s=74,r="let"),this.tsInAmbientContext(()=>{switch(s){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,r||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 129:{const n=this.tsParseInterfaceDeclaration(e,{declare:!0});if(n)return n}default:if(He(s))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,s,r){switch(s.name){case"declare":{const n=this.tsTryParseDeclare(e);return n&&(n.declare=!0),n}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);const n=e;return n.global=!0,n.id=s,n.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(n,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,s.name,!1,r)}}tsParseDeclaration(e,s,r,n){switch(s){case"abstract":if(this.tsCheckLineTerminator(r)&&(this.match(80)||He(this.state.type)))return this.tsParseAbstractDeclaration(e,n);break;case"module":if(this.tsCheckLineTerminator(r)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(e);if(He(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(r)&&He(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(r)&&He(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;const s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const r=this.tsTryParseAndCatch(()=>{const n=this.startNodeAt(e);return n.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(n),n.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),n});if(this.state.maybeInArrowParameters=s,!!r)return super.parseArrowExpression(r,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){const e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(Ae.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===Ke.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return $f(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,s){const r=this.state.startLoc,n={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},n);const a=n.accessibility,o=n.override,l=n.readonly;!(e&4)&&(a||l||o)&&this.raise(Ae.UnexpectedParameterModifier,r);const h=this.parseMaybeDefault();e&2&&this.parseFunctionParamType(h);const u=this.parseMaybeDefault(h.loc.start,h);if(a||l||o){const b=this.startNodeAt(r);return s.length&&(b.decorators=s),a&&(b.accessibility=a),l&&(b.readonly=l),o&&(b.override=o),u.type!=="Identifier"&&u.type!=="AssignmentPattern"&&this.raise(Ae.UnsupportedParameterPropertyKind,b),b.parameter=u,this.finishNode(b,"TSParameterProperty")}return s.length&&(h.decorators=s),u}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(const s of e.params)s.type!=="Identifier"&&s.optional&&!this.state.isAmbientContext&&this.raise(Ae.PatternIsOptional,s)}setArrowFunctionParameters(e,s,r){super.setArrowFunctionParameters(e,s,r),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,s,r=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));const n=s==="FunctionDeclaration"?"TSDeclareFunction":s==="ClassMethod"||s==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return n&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,n):n==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(Ae.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,n,r):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,s,r))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(s=>{(s==null?void 0:s.type)==="TSTypeCastExpression"&&this.raise(Ae.UnexpectedTypeAnnotation,s.typeAnnotation)})}toReferencedList(e,s){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,s,r,n){const a=super.parseArrayLike(e,s,r,n);return a.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(a.elements),a}parseSubscript(e,s,r,n){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();const o=this.startNodeAt(s);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let a=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(r)return n.stop=!0,e;n.optionalChainMember=a=!0,this.next()}if(this.match(47)||this.match(51)){let o;const l=this.tsTryParseAndCatch(()=>{if(!r&&this.atPossibleAsyncArrow(e)){const P=this.tsTryParseGenericAsyncArrowFunction(s);if(P)return P}const h=this.tsParseTypeArgumentsInExpression();if(!h)return;if(a&&!this.match(10)){o=this.state.curPosition();return}if(pr(this.state.type)){const P=super.parseTaggedTemplateExpression(e,s,n);return P.typeParameters=h,P}if(!r&&this.eat(10)){const P=this.startNodeAt(s);return P.callee=e,P.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(P.arguments),P.typeParameters=h,n.optionalChainMember&&(P.optional=a),this.finishCallExpression(P,n.optionalChainMember)}const u=this.state.type;if(u===48||u===52||u!==10&&An(u)&&!this.hasPrecedingLineBreak())return;const b=this.startNodeAt(s);return b.expression=e,b.typeParameters=h,this.finishNode(b,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),l)return l.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(Ae.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),l}return super.parseSubscript(e,s,r,n)}parseNewCallee(e){var s;super.parseNewCallee(e);const{callee:r}=e;r.type==="TSInstantiationExpression"&&!((s=r.extra)!=null&&s.parenthesized)&&(e.typeParameters=r.typeParameters,e.callee=r.expression)}parseExprOp(e,s,r){let n;if(tr(58)>r&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(n=this.isContextual(120)))){const a=this.startNodeAt(s);return a.expression=e,a.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(n&&this.raise(v.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(a,n?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(a,s,r)}return super.parseExprOp(e,s,r)}checkReservedWord(e,s,r,n){this.state.isAmbientContext||super.checkReservedWord(e,s,r,n)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(Ae.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){const s=this.lookaheadCharCode();return e?s===123||s===42:s!==61}return!e&&this.isContextual(87)}applyImportPhase(e,s,r,n){super.applyImportPhase(e,s,r,n),s?e.exportKind=r==="type"?"type":"value":e.importKind=r==="type"||r==="typeof"?r:"value"}parseImport(e){if(this.match(133))return e.importKind="value",super.parseImport(e);let s;if(He(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){const r=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,r);s=super.parseImportSpecifiersAndAfter(e,r)}else s=super.parseImport(e);return s.importKind==="type"&&s.specifiers.length>1&&s.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(Ae.TypeImportCannotSpecifyDefaultAndNamed,s),s}parseExport(e,s){if(this.match(83)){this.next();const r=e;let n=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?n=this.parseMaybeImportPhase(r,!1):r.importKind="value",this.tsParseImportEqualsDeclaration(r,n,!0)}else if(this.eat(29)){const r=e;return r.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(r,"TSExportAssignment")}else if(this.eatContextual(93)){const r=e;return this.expectContextual(128),r.id=this.parseIdentifier(),this.semicolon(),this.finishNode(r,"TSNamespaceExportDeclaration")}else return super.parseExport(e,s)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){const e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,s,r=!1){const{isAmbientContext:n}=this.state,a=super.parseVarStatement(e,s,r||n);if(!n)return a;for(const{id:o,init:l}of a.declarations)!l||(s!=="const"||!!o.typeAnnotation?this.raise(Ae.InitializerNotAllowedInAmbientContext,l):Fp(l,this.hasPlugin("estree"))||this.raise(Ae.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,l));return a}parseStatementContent(e,s){if(this.match(75)&&this.isLookaheadContextual("enum")){const r=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(r,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){const r=this.tsParseInterfaceDeclaration(this.startNode());if(r)return r}return super.parseStatementContent(e,s)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,s){return s.some(r=>bo(r)?e.accessibility===r:!!e[r])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,s,r){const n=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:n,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:Ae.InvalidModifierOnTypeParameterPositions},s);const a=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(s,n)&&this.raise(Ae.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,s)):this.parseClassMemberWithIsStatic(e,s,r,!!s.static)};s.declare?this.tsInAmbientContext(a):a()}parseClassMemberWithIsStatic(e,s,r,n){const a=this.tsTryParseIndexSignature(s);if(a){e.body.push(a),s.abstract&&this.raise(Ae.IndexSignatureHasAbstract,s),s.accessibility&&this.raise(Ae.IndexSignatureHasAccessibility,s,{modifier:s.accessibility}),s.declare&&this.raise(Ae.IndexSignatureHasDeclare,s),s.override&&this.raise(Ae.IndexSignatureHasOverride,s);return}!this.state.inAbstractClass&&s.abstract&&this.raise(Ae.NonAbstractClassHasAbstractMethod,s),s.override&&(r.hadSuperClass||this.raise(Ae.OverrideNotInSubClass,s)),super.parseClassMemberWithIsStatic(e,s,r,n)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(Ae.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(Ae.ClassMethodHasDeclare,e)}parseExpressionStatement(e,s,r){return(s.type==="Identifier"?this.tsParseExpressionStatement(e,s,r):void 0)||super.parseExpressionStatement(e,s,r)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,s,r){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,s,r);const n=this.tryParse(()=>super.parseConditional(e,s));return n.node?(n.error&&(this.state=n.failState),n.node):(n.error&&super.setOptionalParametersError(r,n.error),e)}parseParenItem(e,s){const r=super.parseParenItem(e,s);if(this.eat(17)&&(r.optional=!0,this.resetEndLocation(e)),this.match(14)){const n=this.startNodeAt(s);return n.expression=e,n.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(n,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));const s=this.state.startLoc,r=this.eatContextual(125);if(r&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(Ae.ExpectedAmbientAfterExportDeclare,this.state.startLoc);const a=He(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return a?((a.type==="TSInterfaceDeclaration"||a.type==="TSTypeAliasDeclaration"||r)&&(e.exportKind="type"),r&&(this.resetStartLocation(a,s),a.declare=!0),a):null}parseClassId(e,s,r,n){if((!s||r)&&this.isContextual(113))return;super.parseClassId(e,s,r,e.declare?1024:8331);const a=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);a&&(e.typeParameters=a)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));const s=this.tsTryParseTypeAnnotation();s&&(e.typeAnnotation=s)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(Ae.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){const{key:s}=e;this.raise(Ae.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:s.type==="Identifier"&&!e.computed?s.name:`[${this.input.slice(s.start,s.end)}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(Ae.PrivateElementHasAbstract,e),e.accessibility&&this.raise(Ae.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(Ae.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,s,r,n,a,o){const l=this.tsTryParseTypeParameters(this.tsParseConstModifier);l&&a&&this.raise(Ae.ConstructorHasTypeParameters,l);const{declare:h=!1,kind:u}=s;h&&(u==="get"||u==="set")&&this.raise(Ae.DeclareAccessor,s,{kind:u}),l&&(s.typeParameters=l),super.pushClassMethod(e,s,r,n,a,o)}pushClassPrivateMethod(e,s,r,n){const a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(s.typeParameters=a),super.pushClassPrivateMethod(e,s,r,n)}declareClassPrivateMethodInScope(e,s){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!hasOwnProperty.call(e.value,"body")||super.declareClassPrivateMethodInScope(e,s))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,s,r,n,a,o,l){const h=this.tsTryParseTypeParameters(this.tsParseConstModifier);return h&&(e.typeParameters=h),super.parseObjPropValue(e,s,r,n,a,o,l)}parseFunctionParams(e,s){const r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(e.typeParameters=r),super.parseFunctionParams(e,s)}parseVarId(e,s){super.parseVarId(e,s),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);const r=this.tsTryParseTypeAnnotation();r&&(e.id.typeAnnotation=r,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,s){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,s)}parseMaybeAssign(e,s){var r,n,a,o,l;let h,u,b;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(h=this.state.clone(),u=this.tryParse(()=>super.parseMaybeAssign(e,s),h),!u.error)return u.node;const{context:A}=this.state,j=A[A.length-1];(j===Ke.j_oTag||j===Ke.j_expr)&&A.pop()}if(!((r=u)!=null&&r.error)&&!this.match(47))return super.parseMaybeAssign(e,s);(!h||h===this.state)&&(h=this.state.clone());let P;const I=this.tryParse(A=>{var j,H;P=this.tsParseTypeParameters(this.tsParseConstModifier);const D=super.parseMaybeAssign(e,s);return(D.type!=="ArrowFunctionExpression"||(j=D.extra)!=null&&j.parenthesized)&&A(),((H=P)==null?void 0:H.params.length)!==0&&this.resetStartLocationFromNode(D,P),D.typeParameters=P,D},h);if(!I.error&&!I.aborted)return P&&this.reportReservedArrowTypeParam(P),I.node;if(!u&&(To(!this.hasPlugin("jsx")),b=this.tryParse(()=>super.parseMaybeAssign(e,s),h),!b.error))return b.node;if((n=u)!=null&&n.node)return this.state=u.failState,u.node;if(I.node)return this.state=I.failState,P&&this.reportReservedArrowTypeParam(P),I.node;if((a=b)!=null&&a.node)return this.state=b.failState,b.node;throw((o=u)==null?void 0:o.error)||I.error||((l=b)==null?void 0:l.error)}reportReservedArrowTypeParam(e){var s;e.params.length===1&&!e.params[0].constraint&&!((s=e.extra)!=null&&s.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Ae.ReservedArrowTypeParam,e)}parseMaybeUnary(e,s){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,s)}parseArrow(e){if(this.match(14)){const s=this.tryParse(r=>{const n=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&r(),n});if(s.aborted)return;s.thrown||(s.error&&(this.state=s.failState),e.returnType=s.node)}return super.parseArrow(e)}parseFunctionParamType(e){this.eat(17)&&(e.optional=!0);const s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),this.resetEndLocation(e),e}isAssignable(e,s){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,s);case"TSParameterProperty":return!0;default:return super.isAssignable(e,s)}}toAssignable(e,s=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,s);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":s?this.expressionScope.recordArrowParameterBindingError(Ae.UnexpectedTypeCastInParameter,e):this.raise(Ae.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,s);break;case"AssignmentExpression":!s&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,s)}}toAssignableParenthesizedExpression(e,s){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,s);break;default:super.toAssignable(e,s)}}checkToRestConversion(e,s){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,s)}}isValidLVal(e,s,r){switch(e){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":case"TSInstantiationExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(r!==64||!s)&&["expression",!0];default:return super.isValidLVal(e,s,r)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){const s=this.tsParseTypeArgumentsInExpression();if(this.match(10)){const r=super.parseMaybeDecoratorArguments(e);return r.typeParameters=s,r}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,s){const r=super.parseMaybeDefault(e,s);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.startthis.isAssignable(s,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){const s=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());s&&(e.typeParameters=s)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){const s=super.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e)[0];return n&&this.isThisParam(n)?s+1:s}parseCatchClauseParam(){const e=super.parseCatchClauseParam(),s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s,this.resetEndLocation(e)),e}tsInAmbientContext(e){const{isAmbientContext:s,strict:r}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return e()}finally{this.state.isAmbientContext=s,this.state.strict=r}}parseClass(e,s,r){const n=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,s,r)}finally{this.state.inAbstractClass=n}}tsParseAbstractDeclaration(e,s){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(s,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(Ae.NonClassMethodPropertyHasAbstractModifer,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,s,r,n,a,o,l){const h=super.parseMethod(e,s,r,n,a,o,l);if(h.abstract&&(this.hasPlugin("estree")?!!h.value.body:!!h.body)){const{key:b}=h;this.raise(Ae.AbstractMethodHasImplementation,h,{methodName:b.type==="Identifier"&&!h.computed?b.name:`[${this.input.slice(b.start,b.end)}]`})}return h}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,s,r,n){return!s&&n?(this.parseTypeOnlyImportExportSpecifier(e,!1,r),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,s,r,n))}parseImportSpecifier(e,s,r,n,a){return!s&&n?(this.parseTypeOnlyImportExportSpecifier(e,!0,r),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,s,r,n,r?4098:4096))}parseTypeOnlyImportExportSpecifier(e,s,r){const n=s?"imported":"local",a=s?"local":"exported";let o=e[n],l,h=!1,u=!0;const b=o.loc.start;if(this.isContextual(93)){const I=this.parseIdentifier();if(this.isContextual(93)){const A=this.parseIdentifier();Mt(this.state.type)?(h=!0,o=I,l=s?this.parseIdentifier():this.parseModuleExportName(),u=!1):(l=A,u=!1)}else Mt(this.state.type)?(u=!1,l=s?this.parseIdentifier():this.parseModuleExportName()):(h=!0,o=I)}else Mt(this.state.type)&&(h=!0,s?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());h&&r&&this.raise(s?Ae.TypeModifierIsUsedInTypeImports:Ae.TypeModifierIsUsedInTypeExports,b),e[n]=o,e[a]=l;const P=s?"importKind":"exportKind";e[P]=h?"type":"value",u&&this.eatContextual(93)&&(e[a]=s?this.parseIdentifier():this.parseModuleExportName()),e[a]||(e[a]=os(e[n])),s&&this.checkIdentifier(e[a],h?4098:4096)}};function Dp(i){if(i.type!=="MemberExpression")return!1;const{computed:t,property:e}=i;return t&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:nc(i.object)}function Fp(i,t){var e;const{type:s}=i;if((e=i.extra)!=null&&e.parenthesized)return!1;if(t){if(s==="Literal"){const{value:r}=i;if(typeof r=="string"||typeof r=="boolean")return!0}}else if(s==="StringLiteral"||s==="BooleanLiteral")return!0;return!!(rc(i,t)||Bp(i,t)||s==="TemplateLiteral"&&i.expressions.length===0||Dp(i))}function rc(i,t){return t?i.type==="Literal"&&(typeof i.value=="number"||"bigint"in i):i.type==="NumericLiteral"||i.type==="BigIntLiteral"}function Bp(i,t){if(i.type==="UnaryExpression"){const{operator:e,argument:s}=i;if(e==="-"&&rc(s,t))return!0}return!1}function nc(i){return i.type==="Identifier"?!0:i.type!=="MemberExpression"||i.computed?!1:nc(i.object)}const xo=is`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."});var Rp=i=>class extends i{parsePlaceholder(e){if(this.match(144)){const s=this.startNode();return this.next(),this.assertNoSpace(),s.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(s,e)}}finishPlaceholder(e,s){let r=e;return(!r.expectedNode||!r.type)&&(r=this.finishNode(r,"Placeholder")),r.expectedNode=s,r}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,s,r,n){e!==void 0&&super.checkReservedWord(e,s,r,n)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,s,r){return e==="Placeholder"||super.isValidLVal(e,s,r)}toAssignable(e,s){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,s)}chStartsBindingIdentifier(e,s){return!!(super.chStartsBindingIdentifier(e,s)||this.lookahead().type===144)}verifyBreakContinue(e,s){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,s)}parseExpressionStatement(e,s){var r;if(s.type!=="Placeholder"||(r=s.extra)!=null&&r.parenthesized)return super.parseExpressionStatement(e,s);if(this.match(14)){const a=e;return a.label=this.finishPlaceholder(s,"Identifier"),this.next(),a.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(a,"LabeledStatement")}this.semicolon();const n=e;return n.name=s.name,this.finishPlaceholder(n,"Statement")}parseBlock(e,s,r){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,s,r)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,s,r){const n=s?"ClassDeclaration":"ClassExpression";this.next();const a=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(144)||this.match(5))e.id=o;else{if(r||!s)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,n);throw this.raise(xo.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(e,s,r);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,a),this.finishNode(e,n)}parseExport(e,s){const r=this.parsePlaceholder("Identifier");if(!r)return super.parseExport(e,s);const n=e;if(!this.isContextual(98)&&!this.match(12))return n.specifiers=[],n.source=null,n.declaration=this.finishPlaceholder(r,"Declaration"),this.finishNode(n,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const a=this.startNode();return a.exported=r,n.specifiers=[this.finishNode(a,"ExportDefaultSpecifier")],super.parseExport(n,s)}isExportDefaultSpecifier(){if(this.match(65)){const e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(xs(144),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,s){var r;return(r=e.specifiers)!=null&&r.length?!0:super.maybeParseExportDefaultSpecifier(e,s)}checkExport(e){const{specifiers:s}=e;s!=null&&s.length&&(e.specifiers=s.filter(r=>r.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=s}parseImport(e){const s=this.parsePlaceholder("Identifier");if(!s)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(s,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");const r=this.startNodeAtNode(s);return r.local=s,e.specifiers.push(this.finishNode(r,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(xo.UnexpectedSpace,this.state.lastTokEndLoc)}},$p=i=>class extends i{parseV8Intrinsic(){if(this.match(54)){const e=this.state.startLoc,s=this.startNode();if(this.next(),He(this.state.type)){const r=this.parseIdentifierName(),n=this.createIdentifier(s,r);if(n.type="V8IntrinsicIdentifier",this.match(10))return n}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}};const So=["minimal","fsharp","hack","smart"],Po=["^^","@@","^","%","#"];function jp(i){if(i.has("decorators")){if(i.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const e=i.get("decorators").decoratorsBeforeExport;if(e!=null&&typeof e!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");const s=i.get("decorators").allowCallParenthesized;if(s!=null&&typeof s!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(i.has("flow")&&i.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(i.has("placeholders")&&i.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(i.has("pipelineOperator")){var t;const e=i.get("pipelineOperator").proposal;if(!So.includes(e)){const r=So.map(n=>`"${n}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${r}.`)}const s=((t=i.get("recordAndTuple"))==null?void 0:t.syntaxType)==="hash";if(e==="hack"){if(i.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(i.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const r=i.get("pipelineOperator").topicToken;if(!Po.includes(r)){const n=Po.map(a=>`"${a}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${n}.`)}if(r==="#"&&s)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",i.get("recordAndTuple")])}\`.`)}else if(e==="smart"&&s)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",i.get("recordAndTuple")])}\`.`)}if(i.has("moduleAttributes")){if(i.has("importAttributes")||i.has("importAssertions"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(i.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(i.has("importAssertions")&&i.has("importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(i.has("recordAndTuple")){const e=i.get("recordAndTuple").syntaxType;if(e!=null){const s=["hash","bar"];if(!s.includes(e))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+s.map(r=>`'${r}'`).join(", "))}}if(i.has("asyncDoExpressions")&&!i.has("doExpressions")){const e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(i.has("optionalChainingAssign")&&i.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}const ac={estree:vf,jsx:kp,flow:wp,typescript:Op,v8intrinsic:$p,placeholders:Rp},Up=Object.keys(ac),nn={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function Vp(i){if(i==null)return Object.assign({},nn);if(i.annexB!=null&&i.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");const t={};for(const s of Object.keys(nn)){var e;t[s]=(e=i[s])!=null?e:nn[s]}return t}class Hp extends Ip{checkProto(t,e,s,r){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return;const n=t.key;if((n.type==="Identifier"?n.name:n.value)==="__proto__"){if(e){this.raise(v.RecordNoProto,n);return}s.used&&(r?r.doubleProtoLoc===null&&(r.doubleProtoLoc=n.loc.start):this.raise(v.DuplicateProto,n)),s.used=!0}}shouldExitDescending(t,e){return t.type==="ArrowFunctionExpression"&&t.start===e}getExpression(){this.enterInitialScopes(),this.nextToken();const t=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),t.comments=this.comments,t.errors=this.state.errors,this.options.tokens&&(t.tokens=this.tokens),t}parseExpression(t,e){return t?this.disallowInAnd(()=>this.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(t){const e=this.state.startLoc,s=this.parseMaybeAssign(t);if(this.match(12)){const r=this.startNodeAt(e);for(r.expressions=[s];this.eat(12);)r.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(r.expressions),this.finishNode(r,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(t,e){return this.disallowInAnd(()=>this.parseMaybeAssign(t,e))}parseMaybeAssignAllowIn(t,e){return this.allowInAnd(()=>this.parseMaybeAssign(t,e))}setOptionalParametersError(t,e){var s;t.optionalParametersLoc=(s=e==null?void 0:e.loc)!=null?s:this.state.startLoc}parseMaybeAssign(t,e){const s=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let o=this.parseYield();return e&&(o=e.call(this,o,s)),o}let r;t?r=!1:(t=new ir,r=!0);const{type:n}=this.state;(n===10||He(n))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(t);if(e&&(a=e.call(this,a,s)),Mf(this.state.type)){const o=this.startNodeAt(s),l=this.state.value;if(o.operator=l,this.match(29)){this.toAssignable(a,!0),o.left=a;const h=s.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=h&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=h&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=h&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null)}else o.left=a;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(a,this.finishNode(o,"AssignmentExpression")),o}else r&&this.checkExpressionErrors(t,!0);return a}parseMaybeConditional(t){const e=this.state.startLoc,s=this.state.potentialArrowAt,r=this.parseExprOps(t);return this.shouldExitDescending(r,s)?r:this.parseConditional(r,e,t)}parseConditional(t,e,s){if(this.eat(17)){const r=this.startNodeAt(e);return r.test=t,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){const e=this.state.startLoc,s=this.state.potentialArrowAt,r=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(r,s)?r:this.parseExprOp(r,e,-1)}parseExprOp(t,e,s){if(this.isPrivateName(t)){const n=this.getPrivateNameSV(t);(s>=tr(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(v.PrivateInExpectedIn,t,{identifierName:n}),this.classScope.usePrivateName(n,t.loc.start)}const r=this.state.type;if(Df(r)&&(this.prodParam.hasIn||!this.match(58))){let n=tr(r);if(n>s){if(r===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,e)}const a=this.startNodeAt(e);a.left=t,a.operator=this.state.value;const o=r===41||r===42,l=r===40;if(l&&(n=tr(42)),this.next(),r===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(v.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);a.right=this.parseExprOpRightExpr(r,n);const h=this.finishNode(a,o||l?"LogicalExpression":"BinaryExpression"),u=this.state.type;if(l&&(u===41||u===42)||o&&u===40)throw this.raise(v.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(h,e,s)}}return t}parseExprOpRightExpr(t,e){const s=this.state.startLoc;switch(t){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(v.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,e),s)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}default:return this.parseExprOpBaseRightExpr(t,e)}}parseExprOpBaseRightExpr(t,e){const s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,jf(t)?e-1:e)}parseHackPipeBody(){var t;const{startLoc:e}=this.state,s=this.parseMaybeAssign();return Ef.has(s.type)&&!((t=s.extra)!=null&&t.parenthesized)&&this.raise(v.PipeUnparenthesizedBody,e,{type:s.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipeTopicUnused,e),s}checkExponentialAfterUnary(t){this.match(57)&&this.raise(v.UnexpectedTokenUnaryExponentiation,t.argument)}parseMaybeUnary(t,e){const s=this.state.startLoc,r=this.isContextual(96);if(r&&this.recordAwaitIfAllowed()){this.next();const l=this.parseAwait(s);return e||this.checkExponentialAfterUnary(l),l}const n=this.match(34),a=this.startNode();if(Bf(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");const l=this.match(89);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&l){const h=a.argument;h.type==="Identifier"?this.raise(v.StrictDelete,a):this.hasPropertyAsPrivateName(h)&&this.raise(v.DeletePrivateField,a)}if(!n)return e||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}const o=this.parseUpdate(a,n,t);if(r){const{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?An(l):An(l)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(v.AwaitNotInAsyncContext,s),this.parseAwait(s)}return o}parseUpdate(t,e,s){if(e){const a=t;return this.checkLVal(a.argument,this.finishNode(a,"UpdateExpression")),t}const r=this.state.startLoc;let n=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return n;for(;Ff(this.state.type)&&!this.canInsertSemicolon();){const a=this.startNodeAt(r);a.operator=this.state.value,a.prefix=!1,a.argument=n,this.next(),this.checkLVal(n,n=this.finishNode(a,"UpdateExpression"))}return n}parseExprSubscripts(t){const e=this.state.startLoc,s=this.state.potentialArrowAt,r=this.parseExprAtom(t);return this.shouldExitDescending(r,s)?r:this.parseSubscripts(r,e)}parseSubscripts(t,e,s){const r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do t=this.parseSubscript(t,e,s,r),r.maybeAsyncArrow=!1;while(!r.stop);return t}parseSubscript(t,e,s,r){const{type:n}=this.state;if(!s&&n===15)return this.parseBind(t,e,s,r);if(pr(n))return this.parseTaggedTemplateExpression(t,e,r);let a=!1;if(n===18){if(s&&(this.raise(v.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return r.stop=!0,t;r.optionalChainMember=a=!0,this.next()}if(!s&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,e,r,a);{const o=this.eat(0);return o||a||this.eat(16)?this.parseMember(t,e,r,o,a):(r.stop=!0,t)}}parseMember(t,e,s,r,n){const a=this.startNodeAt(e);return a.object=t,a.computed=r,r?(a.property=this.parseExpression(),this.expect(3)):this.match(138)?(t.type==="Super"&&this.raise(v.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),s.optionalChainMember?(a.optional=n,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(t,e,s,r){const n=this.startNodeAt(e);return n.object=t,this.next(),n.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(n,"BindExpression"),e,s)}parseCoverCallAndAsyncArrowHead(t,e,s,r){const n=this.state.maybeInArrowParameters;let a=null;this.state.maybeInArrowParameters=!0,this.next();const o=this.startNodeAt(e);o.callee=t;const{maybeAsyncArrow:l,optionalChainMember:h}=s;l&&(this.expressionScope.enter(dp()),a=new ir),h&&(o.optional=r),r?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,t.type==="Import",t.type!=="Super",o,a);let u=this.finishCallExpression(o,h);return l&&this.shouldParseAsyncArrow()&&!r?(s.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),u=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),u)):(l&&(this.checkExpressionErrors(a,!0),this.expressionScope.exit()),this.toReferencedArguments(u)),this.state.maybeInArrowParameters=n,u}toReferencedArguments(t,e){this.toReferencedListDeep(t.arguments,e)}parseTaggedTemplateExpression(t,e,s){const r=this.startNodeAt(e);return r.tag=t,r.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(v.OptionalChainingNoTemplate,e),this.finishNode(r,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return t.type==="Identifier"&&t.name==="async"&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}finishCallExpression(t,e){if(t.callee.type==="Import")if(t.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")),t.arguments.length===0||t.arguments.length>2)this.raise(v.ImportCallArity,t,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(const s of t.arguments)s.type==="SpreadElement"&&this.raise(v.ImportCallSpreadArgument,s);return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s,r,n){const a=[];let o=!0;const l=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){e&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(v.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),r&&this.addTrailingCommaExtraToNode(r),this.next();break}a.push(this.parseExprListItem(!1,n,s))}return this.state.inFSharpPipelineDirectBody=l,a}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(t,e.arguments,!0,(s=e.extra)==null?void 0:s.trailingCommaLoc),e.innerComments&&Ii(t,e.innerComments),e.callee.trailingComments&&Ii(t,e.callee.trailingComments),t}parseNoCallExpr(){const t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let e,s=null;const{type:r}=this.state;switch(r){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):this.match(10)?this.options.createImportExpressions?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(v.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(e,"Import"));case 78:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{const n=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(n)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,t);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:s=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(s,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;const n=e.callee=this.parseNoCallExpr();if(n.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(v.UnsupportedBind,n)}case 138:return this.raise(v.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{const n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.parseTopicReference(n);this.unexpected();break}case 47:{const n=this.input.codePointAt(this.nextTokenStart());ts(n)||n===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(r===136)return this.parseDecimalLiteral(this.state.value);if(He(r)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();const n=this.state.potentialArrowAt===this.state.start,a=this.state.containsEsc,o=this.parseIdentifier();if(!a&&o.name==="async"&&!this.canInsertSemicolon()){const{type:l}=this.state;if(l===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(He(l))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(l===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return n&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else this.unexpected()}}parseTopicReferenceThenEqualsSign(t,e){const s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=t,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=St(this.state.endLoc,-1),this.parseTopicReference(s);this.unexpected()}parseTopicReference(t){const e=this.startNode(),s=this.state.startLoc,r=this.state.type;return this.next(),this.finishTopicReference(e,s,t,r)}finishTopicReference(t,e,s,r){if(this.testTopicReferenceConfiguration(s,e,r)){const n=s==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(s==="smart"?v.PrimaryTopicNotAllowed:v.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(t,n)}else throw this.raise(v.PipeTopicUnconfiguredToken,e,{token:xs(r)})}testTopicReferenceConfiguration(t,e,s){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:xs(s)}]);case"smart":return s===27;default:throw this.raise(v.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(sr(!0,this.prodParam.hasYield));const e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(v.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(t,e,!0)}parseDo(t,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),t.async=e,this.next();const s=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=s,this.finishNode(t,"DoExpression")}parseSuper(){const t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(v.SuperNotAllowed,t):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(v.UnexpectedSuper,t),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(v.UnsupportedSuper,t),this.finishNode(t,"Super")}parsePrivateName(){const t=this.startNode(),e=this.startNodeAt(St(this.state.startLoc,1)),s=this.state.value;return this.next(),t.id=this.createIdentifier(e,s),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){const t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){const e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e;const r=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||r)&&this.raise(v.UnsupportedMetaProperty,t.property,{target:e.name,onlyValidPropertyName:s}),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){const e=this.createIdentifier(this.startNodeAtNode(t),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(v.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){const s=this.isContextual(105);if(s||this.unexpected(),this.expectPlugin(s?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(v.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),t.phase=s?"source":"defer",this.parseImportCall(t)}return this.parseMetaProperty(t,e,"meta")}parseLiteralAtNode(t,e,s){return this.addExtra(s,"rawValue",t),this.addExtra(s,"raw",this.input.slice(s.start,this.state.end)),s.value=t,this.next(),this.finishNode(s,e)}parseLiteral(t,e){const s=this.startNode();return this.parseLiteralAtNode(t,e,s)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){const e=this.startNode();return this.addExtra(e,"raw",this.input.slice(e.start,this.state.end)),e.pattern=t.pattern,e.flags=t.flags,this.next(),this.finishNode(e,"RegExpLiteral")}parseBooleanLiteral(t){const e=this.startNode();return e.value=t,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){const t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){const e=this.state.startLoc;let s;this.next(),this.expressionScope.enter(pp());const r=this.state.maybeInArrowParameters,n=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const a=this.state.startLoc,o=[],l=new ir;let h=!0,u,b;for(;!this.match(11);){if(h)h=!1;else if(this.expect(12,l.optionalParametersLoc===null?null:l.optionalParametersLoc),this.match(11)){b=this.state.startLoc;break}if(this.match(21)){const A=this.state.startLoc;if(u=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),A)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}const P=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=r,this.state.inFSharpPipelineDirectBody=n;let I=this.startNodeAt(e);return t&&this.shouldParseArrow(o)&&(I=this.parseArrow(I))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(I,o,!1),I):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),b&&this.unexpected(b),u&&this.unexpected(u),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(o,!0),o.length>1?(s=this.startNodeAt(a),s.expressions=o,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,P)):s=o[0],this.wrapParenthesis(e,s))}wrapParenthesis(t,e){if(!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",t.index),this.takeSurroundingComments(e,t.index,this.state.lastTokEndLoc.index),e;const s=this.startNodeAt(t);return s.expression=e,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,e){return t}parseNewOrNewTarget(){const t=this.startNode();if(this.next(),this.match(16)){const e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();const s=this.parseMetaProperty(t,e,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(v.UnexpectedNewTarget,s),s}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){const e=this.parseExprList(11);this.toReferencedList(e),t.arguments=e}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){const e=this.match(83),s=this.parseNoCallExpr();t.callee=s,e&&(s.type==="Import"||s.type==="ImportExpression")&&this.raise(v.ImportCallNotNewExpression,s)}parseTemplateElement(t){const{start:e,startLoc:s,end:r,value:n}=this.state,a=e+1,o=this.startNodeAt(St(s,1));n===null&&(t||this.raise(v.InvalidEscapeSequenceTemplate,St(this.state.firstInvalidTemplateEscapePos,1)));const l=this.match(24),h=l?-1:-2,u=r+h;o.value={raw:this.input.slice(a,u).replace(/\r\n?/g,` -`),cooked:n===null?null:n.slice(1,h)},o.tail=l,this.next();const b=this.finishNode(o,"TemplateElement");return this.resetEndLocation(b,St(this.state.lastTokEndLoc,h)),b}parseTemplate(t){const e=this.startNode();let s=this.parseTemplateElement(t);const r=[s],n=[];for(;!s.tail;)n.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.push(s=this.parseTemplateElement(t));return e.expressions=n,e.quasis=r,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,r){s&&this.expectPlugin("recordAndTuple");const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=Object.create(null);let o=!0;const l=this.startNode();for(l.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(l);break}let u;e?u=this.parseBindingProperty():(u=this.parsePropertyDefinition(r),this.checkProto(u,s,a,r)),s&&!this.isObjectProperty(u)&&u.type!=="SpreadElement"&&this.raise(v.InvalidRecordProperty,u),u.shorthand&&this.addExtra(u,"shorthand",!0),l.properties.push(u)}this.next(),this.state.inFSharpPipelineDirectBody=n;let h="ObjectExpression";return e?h="ObjectPattern":s&&(h="RecordExpression"),this.finishNode(l,h)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(v.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());const s=this.startNode();let r=!1,n=!1,a;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(a=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);const l=this.state.containsEsc;if(this.parsePropertyName(s,t),!o&&!l&&this.maybeAsyncOrAccessorProp(s)){const{key:h}=s,u=h.name;u==="async"&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(h),o=this.eat(55),this.parsePropertyName(s)),(u==="get"||u==="set")&&(n=!0,this.resetPreviousNodeTrailingComments(h),s.kind=u,this.match(55)&&(o=!0,this.raise(v.AccessorIsGenerator,this.state.curPosition(),{kind:u}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,a,o,r,!1,n,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;const s=this.getGetterSetterExpectedParamCount(t),r=this.getObjectOrClassMethodParams(t);r.length!==s&&this.raise(t.kind==="get"?v.BadGetterArity:v.BadSetterArity,t),t.kind==="set"&&((e=r[r.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(v.BadSetterRestParameter,t)}parseObjectMethod(t,e,s,r,n){if(n){const a=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(s||e||this.match(10))return r&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,r){if(t.shorthand=!1,this.eat(14))return t.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(r),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),s)t.value=this.parseMaybeDefault(e,os(t.key));else if(this.match(29)){const n=this.state.startLoc;r!=null?r.shorthandAssignLoc===null&&(r.shorthandAssignLoc=n):this.raise(v.InvalidCoverInitializedName,n),t.value=this.parseMaybeDefault(e,os(t.key))}else t.value=os(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,e,s,r,n,a,o){const l=this.parseObjectMethod(t,s,r,n,a)||this.parseObjectProperty(t,e,n,o);return l||this.unexpected(),l}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:s,value:r}=this.state;let n;if(Mt(s))n=this.parseIdentifier(!0);else switch(s){case 134:n=this.parseNumericLiteral(r);break;case 133:n=this.parseStringLiteral(r);break;case 135:n=this.parseBigIntLiteral(r);break;case 138:{const a=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=a):this.raise(v.UnexpectedPrivateField,a),n=this.parsePrivateName();break}default:if(s===136){n=this.parseDecimalLiteral(r);break}this.unexpected()}t.key=n,s!==138&&(t.computed=!1)}}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,s,r,n,a,o=!1){this.initFunction(t,s),t.generator=e,this.scope.enter(18|(o?64:0)|(n?32:0)),this.prodParam.enter(sr(s,t.generator)),this.parseFunctionParams(t,r);const l=this.parseFunctionBodyAndFinish(t,a,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(t,e,s,r){s&&this.expectPlugin("recordAndTuple");const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=this.startNode();return this.next(),a.elements=this.parseExprList(t,!s,r,a),this.state.inFSharpPipelineDirectBody=n,this.finishNode(a,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,s,r){this.scope.enter(6);let n=sr(s,!1);!this.match(5)&&this.prodParam.hasIn&&(n|=8),this.prodParam.enter(n),this.initFunction(t,s);const a=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,s){this.toAssignableList(e,s,!1),t.params=e}parseFunctionBodyAndFinish(t,e,s=!1){return this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}parseFunctionBody(t,e,s=!1){const r=e&&!this.match(5);if(this.expressionScope.enter(sc()),r)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{const n=this.state.strict,a=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,o=>{const l=!this.isSimpleParamList(t.params);o&&l&&this.raise(v.IllegalLanguageModeDirective,(t.kind==="method"||t.kind==="constructor")&&!!t.key?t.key.loc.end:t);const h=!n&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!s&&!l,e,h),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,h)}),this.prodParam.exit(),this.state.labels=a}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let e=0,s=t.length;e10||!Xf(t))return;if(s&&qf(t)){this.raise(v.UnexpectedKeyword,e,{keyword:t});return}if((this.state.strict?r?Yl:Jl:zl)(t,this.inModule)){this.raise(v.UnexpectedReservedWord,e,{reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(v.YieldBindingIdentifier,e);return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(v.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(v.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(v.ArgumentsInClass,e);return}}recordAwaitIfAllowed(){const t=this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction;return t&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),t}parseAwait(t){const e=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(v.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(v.ObsoleteAwaitStar,e),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;const{type:t}=this.state;return t===53||t===10||t===0||pr(t)||t===102&&!this.state.containsEsc||t===137||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){const t=this.startNode();this.expressionScope.recordParameterInitializerError(v.YieldInParameter,t),this.next();let e=!1,s=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:s=this.parseMaybeAssign()}return t.delegate=e,t.argument=s,this.finishNode(t,"YieldExpression")}parseImportCall(t){return this.next(),t.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(t.options=null),this.eat(12)&&(this.hasPlugin("moduleAttributes")||this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes"),this.match(11)||(t.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(v.PipelineHeadSequenceExpression,e)}parseSmartPipelineBodyInStyle(t,e){if(this.isSimpleReference(t)){const s=this.startNodeAt(e);return s.callee=t,this.finishNode(s,"PipelineBareFunction")}else{const s=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),s.expression=t,this.finishNode(s,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(v.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipelineTopicUnused,t)}withTopicBindingContext(t){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}else return t()}withSoloAwaitPermittingContext(t){const e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){const e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){const e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){const e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const r=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,t);return this.state.inFSharpPipelineDirectBody=s,r}parseModuleExpression(){this.expectPlugin("moduleBlocks");const t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);const e=this.startNodeAt(this.state.endLoc);this.next();const s=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(e,8,"module")}finally{s()}return this.finishNode(t,"ModuleExpression")}parsePropertyNamePrefixOperator(t){}}const an={kind:1},Gp={kind:2},Wp=/[\uD800-\uDFFF]/u,on=/in(?:stanceof)?/y;function Kp(i,t){for(let e=0;e0)for(const[n,a]of Array.from(this.scope.undefinedExports))this.raise(v.ModuleExportUndefined,a,{localName:n});this.addExtra(t,"topLevelAwait",this.state.hasTopLevelAwait)}let r;return e===139?r=this.finishNode(t,"Program"):r=this.finishNodeAt(t,"Program",St(this.state.startLoc,-1)),r}stmtToDirective(t){const e=t;e.type="Directive",e.value=e.expression,delete e.expression;const s=e.value,r=s.value,n=this.input.slice(s.start,s.end),a=s.value=n.slice(1,-1);return this.addExtra(s,"raw",n),this.addExtra(s,"rawValue",a),this.addExtra(s,"expressionValue",r),s.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;const t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(t,e){if(ts(t)){if(on.lastIndex=e,on.test(this.input)){const s=this.codePointAtPos(on.lastIndex);if(!Xs(s)&&s!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){const t=this.nextTokenStart(),e=this.codePointAtPos(t);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,t)}hasInLineFollowingBindingIdentifierOrBrace(){const t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return e===123||this.chStartsBindingIdentifier(e,t)}startsUsingForOf(){const{type:t,containsEsc:e}=this.lookahead();if(t===102&&!e)return!1;if(He(t)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);const e=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(e,t))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,t&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(t,e)}parseStatementContent(t,e){const s=this.state.type,r=this.startNode(),n=!!(t&2),a=!!(t&4),o=t&1;switch(s){case 60:return this.parseBreakContinueStatement(r,!0);case 63:return this.parseBreakContinueStatement(r,!1);case 64:return this.parseDebuggerStatement(r);case 90:return this.parseDoWhileStatement(r);case 91:return this.parseForStatement(r);case 68:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?v.StrictFunction:this.options.annexB?v.SloppyFunctionAnnexB:v.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(r,!1,!n&&a);case 80:return n||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,r),!0);case 69:return this.parseIfStatement(r);case 70:return this.parseReturnStatement(r);case 71:return this.parseSwitchStatement(r);case 72:return this.parseThrowStatement(r);case 73:return this.parseTryStatement(r);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?n||this.raise(v.UnexpectedLexicalDeclaration,r):this.raise(v.AwaitUsingNotInAsyncContext,r),this.next(),this.parseVarStatement(r,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(v.UnexpectedUsingDeclaration,this.state.startLoc):n||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(r,"using");case 100:{if(this.state.containsEsc)break;const u=this.nextTokenStart(),b=this.codePointAtPos(u);if(b!==91&&(!n&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(b,u)&&b!==123))break}case 75:n||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{const u=this.state.value;return this.parseVarStatement(r,u)}case 92:return this.parseWhileStatement(r);case 76:return this.parseWithStatement(r);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(r);case 83:{const u=this.lookaheadCharCode();if(u===40||u===46)break}case 82:{!this.options.allowImportExportEverywhere&&!o&&this.raise(v.UnexpectedImportExport,this.state.startLoc),this.next();let u;return s===83?(u=this.parseImport(r),u.type==="ImportDeclaration"&&(!u.importKind||u.importKind==="value")&&(this.sawUnambiguousESM=!0)):(u=this.parseExport(r,e),(u.type==="ExportNamedDeclaration"&&(!u.exportKind||u.exportKind==="value")||u.type==="ExportAllDeclaration"&&(!u.exportKind||u.exportKind==="value")||u.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(u),u}default:if(this.isAsyncFunction())return n||this.raise(v.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,!n&&a)}const l=this.state.value,h=this.parseExpression();return He(s)&&h.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(r,l,h,t):this.parseExpressionStatement(r,h,e)}assertModuleNodeAllowed(t){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(v.ImportOutsideModule,t)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,e,s){return t&&(e.decorators&&e.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(v.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...t)):e.decorators=t,this.resetStartLocationFromNode(e,t[0]),s&&this.resetStartLocationFromNode(s,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){const e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(v.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(v.UnexpectedLeadingDecorator,this.state.startLoc);return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const t=this.startNode();if(this.next(),this.hasPlugin("decorators")){const e=this.state.startLoc;let s;if(this.match(10)){const r=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(11),s=this.wrapParenthesis(r,s);const n=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(s),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==s&&this.raise(v.DecoratorArgumentsOutsideParentheses,n)}else{for(s=this.parseIdentifier(!1);this.eat(16);){const r=this.startNodeAt(e);r.object=s,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),r.property=this.parsePrivateName()):r.property=this.parseIdentifier(!0),r.computed=!1,s=this.finishNode(r,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(s)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(10)){const e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}parseBreakContinueStatement(t,e){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){let s;for(s=0;sthis.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(an);let e=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(e=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return e!==null&&this.unexpected(e),this.parseFor(t,null);const s=this.isContextual(100);{const l=this.isContextual(96)&&this.startsAwaitUsing(),h=l||this.isContextual(107)&&this.startsUsingForOf(),u=s&&this.hasFollowingBindingAtom()||h;if(this.match(74)||this.match(75)||u){const b=this.startNode();let P;l?(P="await using",this.recordAwaitIfAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):P=this.state.value,this.next(),this.parseVar(b,!0,P);const I=this.finishNode(b,"VariableDeclaration"),A=this.match(58);return A&&h&&this.raise(v.ForInUsing,I),(A||this.isContextual(102))&&I.declarations.length===1?this.parseForIn(t,I,e):(e!==null&&this.unexpected(e),this.parseFor(t,I))}}const r=this.isContextual(95),n=new ir,a=this.parseExpression(!0,n),o=this.isContextual(102);if(o&&(s&&this.raise(v.ForOfLet,a),e===null&&r&&a.type==="Identifier"&&this.raise(v.ForOfAsync,a)),o||this.match(58)){this.checkDestructuringPrivate(n),this.toAssignable(a,!0);const l=o?"ForOfStatement":"ForInStatement";return this.checkLVal(a,{type:l}),this.parseForIn(t,a,e)}else this.checkExpressionErrors(n,!0);return e!==null&&this.unexpected(e),this.parseFor(t,a)}parseFunctionStatement(t,e,s){return this.next(),this.parseFunction(t,1|(s?2:0)|(e?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(v.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();const e=t.cases=[];this.expect(5),this.state.labels.push(Gp),this.scope.enter(0);let s;for(let r;!this.match(8);)if(this.match(61)||this.match(65)){const n=this.match(61);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),n?s.test=this.parseExpression():(r&&this.raise(v.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),r=!0,s.test=null),this.expect(14)}else s?s.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(v.NewlineAfterThrow,this.state.lastTokEndLoc),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){const t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{type:"CatchClause"},9),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){const e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(v.NoCatchOrFinally,t),this.finishNode(t,"TryStatement")}parseVarStatement(t,e,s=!1){return this.next(),this.parseVar(t,!1,e,s),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(an),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(v.StrictWith,this.state.startLoc),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,s,r){for(const a of this.state.labels)a.name===e&&this.raise(v.LabelRedeclaration,s,{labelName:e});const n=Of(this.state.type)?1:this.match(71)?2:null;for(let a=this.state.labels.length-1;a>=0;a--){const o=this.state.labels[a];if(o.statementStart===t.start)o.statementStart=this.state.start,o.kind=n;else break}return this.state.labels.push({name:e,kind:n,statementStart:this.state.start}),t.body=r&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e,s){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,s){const r=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(r,t,!1,8,s),e&&this.scope.exit(),this.finishNode(r,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,e,s,r,n){const a=t.body=[],o=t.directives=[];this.parseBlockOrModuleBlockBody(a,e?o:void 0,s,r,n)}parseBlockOrModuleBlockBody(t,e,s,r,n){const a=this.state.strict;let o=!1,l=!1;for(;!this.match(r);){const h=s?this.parseModuleItem():this.parseStatementListItem();if(e&&!l){if(this.isValidDirective(h)){const u=this.stmtToDirective(h);e.push(u),!o&&u.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}t.push(h)}n==null||n.call(this,o),a||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,s){const r=this.match(58);return this.next(),r?s!==null&&this.unexpected(s):t.await=s!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!r||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(v.ForInOfLoopInitializer,e,{type:r?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(v.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),t.left=e,t.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,r?"ForInStatement":"ForOfStatement")}parseVar(t,e,s,r=!1){const n=t.declarations=[];for(t.kind=s;;){const a=this.startNode();if(this.parseVarId(a,s),a.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,a.init===null&&!r&&(a.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(s==="const"||s==="using"||s==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:s})),n.push(this.finishNode(a,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,e){const s=this.parseBindingAtom();(e==="using"||e==="await using")&&(s.type==="ArrayPattern"||s.type==="ObjectPattern")&&this.raise(v.UsingDeclarationHasBindingPattern,s.loc.start),this.checkLVal(s,{type:"VariableDeclarator"},e==="var"?5:8201),t.id=s}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,e=0){const s=e&2,r=!!(e&1),n=r&&!(e&4),a=!!(e&8);this.initFunction(t,a),this.match(55)&&(s&&this.raise(v.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),t.generator=!0),r&&(t.id=this.parseFunctionId(n));const o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(sr(a,t.generator)),r||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,r?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),r&&!s&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,t}parseFunctionId(t){return t||He(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(10),this.expressionScope.enter(fp()),t.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){!t.id||this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,e,s){this.next();const r=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,r),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(t){return t.type==="Identifier"&&t.name==="constructor"||t.type==="StringLiteral"&&t.value==="constructor"}isNonstaticConstructor(t){return!t.computed&&!t.static&&this.nameIsConstructor(t.key)}parseClassBody(t,e){this.classScope.enter();const s={hadConstructor:!1,hadSuperClass:t};let r=[];const n=this.startNode();if(n.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(r.length>0)throw this.raise(v.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){r.push(this.parseDecorator());continue}const a=this.startNode();r.length&&(a.decorators=r,this.resetStartLocationFromNode(a,r[0]),r=[]),this.parseClassMember(n,a,s),a.kind==="constructor"&&a.decorators&&a.decorators.length>0&&this.raise(v.DecoratorConstructor,a)}}),this.state.strict=e,this.next(),r.length)throw this.raise(v.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(n,"ClassBody")}parseClassMemberFromModifier(t,e){const s=this.parseIdentifier(!0);if(this.isClassMethod()){const r=e;return r.kind="method",r.computed=!1,r.key=s,r.static=!1,this.pushClassMethod(t,r,!1,!1,!1,!1),!0}else if(this.isClassProperty()){const r=e;return r.computed=!1,r.key=s,r.static=!1,t.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(t,e,s){const r=this.isContextual(106);if(r){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(5)){this.parseClassStaticBlock(t,e);return}}this.parseClassMemberWithIsStatic(t,e,s,r)}parseClassMemberWithIsStatic(t,e,s,r){const n=e,a=e,o=e,l=e,h=e,u=n,b=n;if(e.static=r,this.parsePropertyNamePrefixOperator(e),this.eat(55)){u.kind="method";const D=this.match(138);if(this.parseClassElementName(u),D){this.pushClassPrivateMethod(t,a,!0,!1);return}this.isNonstaticConstructor(n)&&this.raise(v.ConstructorIsGenerator,n.key),this.pushClassMethod(t,n,!0,!1,!1,!1);return}const P=!this.state.containsEsc&&He(this.state.type),I=this.parseClassElementName(e),A=P?I.name:null,j=this.isPrivateName(I),H=this.state.startLoc;if(this.parsePostMemberNameModifiers(b),this.isClassMethod()){if(u.kind="method",j){this.pushClassPrivateMethod(t,a,!1,!1);return}const D=this.isNonstaticConstructor(n);let B=!1;D&&(n.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(v.DuplicateConstructor,I),D&&this.hasPlugin("typescript")&&e.override&&this.raise(v.OverrideOnConstructor,I),s.hadConstructor=!0,B=s.hadSuperClass),this.pushClassMethod(t,n,!1,!1,D,B)}else if(this.isClassProperty())j?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o);else if(A==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(I);const D=this.eat(55);b.optional&&this.unexpected(H),u.kind="method";const B=this.match(138);this.parseClassElementName(u),this.parsePostMemberNameModifiers(b),B?this.pushClassPrivateMethod(t,a,D,!0):(this.isNonstaticConstructor(n)&&this.raise(v.ConstructorIsAsync,n.key),this.pushClassMethod(t,n,D,!0,!1,!1))}else if((A==="get"||A==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(I),u.kind=A;const D=this.match(138);this.parseClassElementName(n),D?this.pushClassPrivateMethod(t,a,!1,!1):(this.isNonstaticConstructor(n)&&this.raise(v.ConstructorIsAccessor,n.key),this.pushClassMethod(t,n,!1,!1,!1,!1)),this.checkGetterSetterParams(n)}else if(A==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(I);const D=this.match(138);this.parseClassElementName(o),this.pushClassAccessorProperty(t,h,D)}else this.isLineTerminator()?j?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o):this.unexpected()}parseClassElementName(t){const{type:e,value:s}=this.state;if((e===132||e===133)&&t.static&&s==="prototype"&&this.raise(v.StaticPrototype,this.state.startLoc),e===138){s==="constructor"&&this.raise(v.ConstructorClassPrivateField,this.state.startLoc);const r=this.parsePrivateName();return t.key=r,r}return this.parsePropertyName(t),t.key}parseClassStaticBlock(t,e){var s;this.scope.enter(208);const r=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const n=e.body=[];this.parseBlockOrModuleBlockBody(n,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=r,t.body.push(this.finishNode(e,"StaticBlock")),(s=e.decorators)!=null&&s.length&&this.raise(v.DecoratorStaticBlock,e)}pushClassProperty(t,e){!e.computed&&this.nameIsConstructor(e.key)&&this.raise(v.ConstructorClassField,e.key),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){const s=this.parseClassPrivateProperty(e);t.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassAccessorProperty(t,e,s){!s&&!e.computed&&this.nameIsConstructor(e.key)&&this.raise(v.ConstructorClassField,e.key);const r=this.parseClassAccessorProperty(e);t.body.push(r),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassMethod(t,e,s,r,n,a){t.body.push(this.parseMethod(e,s,r,n,a,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,r){const n=this.parseMethod(e,s,r,!1,!1,"ClassPrivateMethod",!0);t.body.push(n);const a=n.kind==="get"?n.static?6:2:n.kind==="set"?n.static?5:1:0;this.declareClassPrivateMethodInScope(n,a)}declareClassPrivateMethodInScope(t,e){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),e,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(sc()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,e,s,r=8331){if(He(this.state.type))t.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(t.id,r);else if(s||!e)t.id=null;else throw this.raise(v.MissingClassName,this.state.startLoc)}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,e){const s=this.parseMaybeImportPhase(t,!0),r=this.maybeParseExportDefaultSpecifier(t,s),n=!r||this.eat(12),a=n&&this.eatExportStar(t),o=a&&this.maybeParseExportNamespaceSpecifier(t),l=n&&(!o||this.eat(12)),h=r||a;if(a&&!o){if(r&&this.unexpected(),e)throw this.raise(v.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}const u=this.maybeParseExportNamedSpecifiers(t);r&&n&&!a&&!u&&this.unexpected(null,5),o&&l&&this.unexpected(null,98);let b;if(h||u){if(b=!1,e)throw this.raise(v.UnsupportedDecoratorExport,t);this.parseExportFrom(t,h)}else b=this.maybeParseExportDeclaration(t);if(h||u||b){var P;const I=t;if(this.checkExport(I,!0,!1,!!I.source),((P=I.declaration)==null?void 0:P.type)==="ClassDeclaration")this.maybeTakeDecorators(e,I.declaration,I);else if(e)throw this.raise(v.UnsupportedDecoratorExport,t);return this.finishNode(I,"ExportNamedDeclaration")}if(this.eat(65)){const I=t,A=this.parseExportDefaultExpression();if(I.declaration=A,A.type==="ClassDeclaration")this.maybeTakeDecorators(e,A,I);else if(e)throw this.raise(v.UnsupportedDecoratorExport,t);return this.checkExport(I,!0,!0),this.finishNode(I,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e==null?void 0:e.loc.start);const s=e||this.parseIdentifier(!0),r=this.startNodeAtNode(s);return r.exported=s,t.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){var e,s;(s=(e=t).specifiers)!=null||(e.specifiers=[]);const r=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),r.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(r,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){const e=t;e.specifiers||(e.specifiers=[]);const s=e.exportKind==="type";return e.specifiers.push(...this.parseExportSpecifiers(s)),e.source=null,e.declaration=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;const t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){const t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(v.UnsupportedDefaultExport,this.state.startLoc);const e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:t}=this.state;if(He(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){const{type:r}=this.lookahead();if(He(r)&&r!==98||r===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const e=this.nextTokenStart(),s=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||He(this.state.type)&&s)return!0;if(this.match(65)&&s){const r=this.input.charCodeAt(this.nextTokenStartSince(e+4));return r===34||r===39}return!1}parseExportFrom(t,e){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(v.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(v.UsingDeclarationExport,this.state.startLoc),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,e,s,r){if(e){var n;if(s){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var a;const o=t.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((a=o.extra)!=null&&a.parenthesized)&&this.raise(v.ExportDefaultFromAsIdentifier,o)}}else if((n=t.specifiers)!=null&&n.length)for(const o of t.specifiers){const{exported:l}=o,h=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(o,h),!r&&o.local){const{local:u}=o;u.type!=="Identifier"?this.raise(v.ExportBindingIsString,o,{localName:u.value,exportName:h}):(this.checkReservedWord(u.name,u.loc.start,!0,!1),this.scope.checkLocalExport(u))}}else if(t.declaration){const o=t.declaration;if(o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"){const{id:l}=o;if(!l)throw new Error("Assertion failure");this.checkDuplicateExports(t,l.name)}else if(o.type==="VariableDeclaration")for(const l of o.declarations)this.checkDeclaration(l.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(const e of t.properties)this.checkDeclaration(e);else if(t.type==="ArrayPattern")for(const e of t.elements)e&&this.checkDeclaration(e);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(v.DuplicateDefaultExport,t):this.raise(v.DuplicateExport,t,{exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(t){const e=[];let s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else if(this.expect(12),this.eat(8))break;const r=this.isContextual(130),n=this.match(133),a=this.startNode();a.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(a,n,t,r))}return e}parseExportSpecifier(t,e,s,r){return this.eatContextual(93)?t.exported=this.parseModuleExportName():e?t.exported=Tp(t.local):t.exported||(t.exported=os(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){const t=this.parseStringLiteral(this.state.value),e=Wp.exec(t.value);return e&&this.raise(v.ModuleExportNameHasLoneSurrogate,t,{surrogateCharCode:e[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:e,value:s})=>s.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(t){const{specifiers:e}=t,s=e.length===1?e[0].type:null;if(t.phase==="source")s!=="ImportDefaultSpecifier"&&this.raise(v.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(t.phase==="defer")s!=="ImportNamespaceSpecifier"&&this.raise(v.DeferImportRequiresNamespace,e[0].loc.start);else if(t.module){var r;s!=="ImportDefaultSpecifier"&&this.raise(v.ImportReflectionNotBinding,e[0].loc.start),((r=t.assertions)==null?void 0:r.length)>0&&this.raise(v.ImportReflectionHasAssertion,e[0].loc.start)}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){const{specifiers:e}=t;if(e!=null){const s=e.find(r=>{let n;if(r.type==="ExportSpecifier"?n=r.local:r.type==="ImportSpecifier"&&(n=r.imported),n!==void 0)return n.type==="Identifier"?n.name!=="default":n.value!=="default"});s!==void 0&&this.raise(v.ImportJSONBindingNotDefault,s.loc.start)}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,e,s,r){e||(s==="module"?(this.expectPlugin("importReflection",r),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),s==="source"?(this.expectPlugin("sourcePhaseImports",r),t.phase="source"):s==="defer"?(this.expectPlugin("deferredImportEvaluation",r),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(t,e,null),null;const s=this.parseIdentifier(!0),{type:r}=this.state;return(Mt(r)?r!==98||this.lookaheadCharCode()===102:r!==12)?(this.resetPreviousIdentifierLeadingComments(s),this.applyImportPhase(t,e,s.name,s.loc.start),null):(this.applyImportPhase(t,e,null),s)}isPrecedingIdImportPhase(t){const{type:e}=this.state;return He(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(t){return this.match(133)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,e){t.specifiers=[];const r=!this.maybeParseDefaultImportSpecifier(t,e)||this.eat(12),n=r&&this.maybeParseStarImportSpecifier(t);return r&&!n&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var e;return(e=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,e,s){e.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(e,s))}finishImportSpecifier(t,e,s=8201){return this.checkLVal(t.local,{type:e},s),this.finishNode(t,e)}parseImportAttributes(){this.expect(5);const t=[],e=new Set;do{if(this.match(8))break;const s=this.startNode(),r=this.state.value;if(e.has(r)&&this.raise(v.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:r}),e.add(r),this.match(133)?s.key=this.parseStringLiteral(r):s.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){const t=[],e=new Set;do{const s=this.startNode();if(s.key=this.parseIdentifier(!0),s.key.name!=="type"&&this.raise(v.ModuleAttributeDifferentFromType,s.key),e.has(s.key.name)&&this.raise(v.ModuleAttributesWithDuplicateKeys,s.key,{key:s.key.name}),e.add(s.key.name),this.expect(14),!this.match(133))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let e;var s=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():(this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes"),e=this.parseImportAttributes()),s=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(v.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(t,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),e=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))e=[];else if(this.hasPlugin("moduleAttributes"))e=[];else return;!s&&this.hasPlugin("importAssertions")?t.assertions=e:t.attributes=e}maybeParseDefaultImportSpecifier(t,e){if(e){const s=this.startNodeAtNode(e);return s.local=e,t.specifiers.push(this.finishImportSpecifier(s,"ImportDefaultSpecifier")),!0}else if(Mt(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){const e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(v.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}const s=this.startNode(),r=this.match(133),n=this.isContextual(130);s.imported=this.parseModuleExportName();const a=this.parseImportSpecifier(s,r,t.importKind==="type"||t.importKind==="typeof",n,void 0);t.specifiers.push(a)}}parseImportSpecifier(t,e,s,r,n){if(this.eatContextual(93))t.local=this.parseIdentifier();else{const{imported:a}=t;if(e)throw this.raise(v.ImportBindingIsString,t,{importName:a.value});this.checkReservedWord(a.name,t.loc.start,!0,!0),t.local||(t.local=os(a))}return this.finishImportSpecifier(t,"ImportSpecifier",n)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}}class oc extends qp{constructor(t,e,s){t=Vp(t),super(t,e),this.options=t,this.initializeScopes(),this.plugins=s,this.filename=t.sourceFilename}getScopeHandler(){return ca}parse(){this.enterInitialScopes();const t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t.comments.length=this.state.commentsLen,t}}function zp(i,t){var e;if(((e=t)==null?void 0:e.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";const s=pi(t,i),r=s.parse();if(s.sawUnambiguousESM)return r;if(s.ambiguousScriptDifferentAst)try{return t.sourceType="script",pi(t,i).parse()}catch{}else r.program.sourceType="script";return r}catch(s){try{return t.sourceType="script",pi(t,i).parse()}catch{}throw s}}else return pi(t,i).parse()}function Jp(i,t){const e=pi(t,i);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function Xp(i){const t={};for(const e of Object.keys(i))t[e]=Xt(i[e]);return t}const Yp=Xp(If);function pi(i,t){let e=oc;const s=new Map;if(i!=null&&i.plugins){for(const r of i.plugins){let n,a;typeof r=="string"?n=r:[n,a]=r,s.has(n)||s.set(n,a||{})}jp(s),e=Zp(s)}return new e(i,t,s)}const Eo=new Map;function Zp(i){const t=[];for(const r of Up)i.has(r)&&t.push(r);const e=t.join("|");let s=Eo.get(e);if(!s){s=oc;for(const r of t)s=ac[r](s);Eo.set(e,s)}return s}var Qp=Nr.parse=zp;Nr.parseExpression=Jp;Nr.tokTypes=Yp;var Bi={},As={},vt={};Object.defineProperty(vt,"__esModule",{value:!0});function lc(i){return{type:"concat",parts:i}}vt.concat=lc;function ed(i,t){const e=[];return t.forEach((s,r)=>{r>0&&e.push(i),e.push(s)}),lc(e)}vt.join=ed;vt.line={type:"line",hard:!1,soft:!1};vt.hardline={type:"line",hard:!0,soft:!1};vt.softline={type:"line",hard:!1,soft:!0};function td(i){return{type:"indent",content:i}}vt.indent=td;function sd(i){return{type:"lineSuffix",content:i}}vt.lineSuffix=sd;function id(i,t=!1){return{type:"group",content:i,willBreak:t}}vt.group=id;vt.breakParent={type:"breakParent"};function rd(i){return typeof i=="string"&&i.length===0}vt.isEmpty=rd;var ut={};Object.defineProperty(ut,"__esModule",{value:!0});function nd(i){return i.range[0]}ut.locStart=nd;function ad(i){return i.range[1]}ut.locEnd=ad;function od(i){if(!i||typeof i.type!="string")return!1;switch(i.type){case"LabelStatement":case"BreakStatement":case"GotoStatement":case"ReturnStatement":case"IfStatement":case"IfClause":case"ElseifClause":case"ElseClause":case"WhileStatement":case"DoStatement":case"RepeatStatement":case"LocalStatement":case"AssignmentStatement":case"CallStatement":case"FunctionDeclaration":case"ForNumericStatement":case"ForGenericStatement":case"Chunk":case"Identifier":case"BooleanLiteral":case"NilLiteral":case"NumericLiteral":case"StringLiteral":case"VarargLiteral":case"TableKey":case"TableKeyString":case"TableValue":case"TableConstructorExpression":case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"MemberExpression":case"IndexExpression":case"CallExpression":case"TableCallExpression":case"StringCallExpression":case"Comment":return!0;default:return!1}}ut.isNode=od;function fa(i,t,e,s={}){let r=0;return e.forEach(n=>{if((s.searchBackwards?i.substring(t-n.length,t):i.substring(t,t+n.length))===n){r=n.length;return}}),t+(s.searchBackwards?-r:r)}ut.skipOnce=fa;function pa(i,t,e,s={}){let r=null;for(;r!==t;)r=t,t=fa(i,t,e,s);return t}ut.skipMany=pa;function Ni(i,t,e={}){return fa(i,t,[` -`,`\r -`],e)}ut.skipNewLine=Ni;function Qs(i,t,e={}){return pa(i,t,[" "," "],e)}ut.skipSpaces=Qs;function cc(i,t,e={}){return pa(i,Qs(i,t),[";"],e)}ut.skipToLineEnd=cc;function uc(i,t,e={}){const s=Qs(i,t,e),r=Ni(i,s,e);return s!==r}ut.hasNewLine=uc;function ld(i,t,e){return i.substr(t,e-t).indexOf(` -`)!==-1}ut.hasNewLineInRange=ld;function cd(i,t){t=Qs(i,t,{searchBackwards:!0}),t=Ni(i,t,{searchBackwards:!0}),t=Qs(i,t,{searchBackwards:!0});const e=Ni(i,t,{searchBackwards:!0});return t!==e}ut.isPreviousLineEmpty=cd;function hc(i,t){if(i.charAt(t)==="-"&&i.charAt(t+1)==="-")for(t+=2;t>=0&&t=0&&!(tt.locStart(e[n])<=tt.locStart(r)&&tt.locEnd(e[n])<=tt.locEnd(i));--n);e.splice(n+1,0,r)}}for(const r of t){const n=i[r];Array.isArray(n)?n.forEach(s):n&&s(n)}return e}function fd(i,t){for(const e of i.comments){fc(i,e);const s=e.precedingNode,r=e.enclosingNode,n=e.followingNode;tt.hasNewLine(t.sourceText,tt.locStart(e),{searchBackwards:!0})?bd(r,e)||xd(s,r,e)||Sd(s,r,n,e)||(n?Ao(n,e):s?wo(s,e):rs(r||i,e)):Pd(s,r,e)||Ed(s,r,e)||(s?wo(s,e):n?Ao(n,e):rs(r||i,e))}}As.attachComments=fd;function pd(i,t){if(!t.sourceText.startsWith("#!"))return;const e=t.sourceText.indexOf(` -`),s=t.sourceText.slice(0,e),r=t.sourceText.slice(2,e);i.comments.push({type:"Comment",loc:{start:{line:1,column:0},end:{line:1,column:e}},range:[0,e],raw:s,value:r})}As.injectShebang=pd;function dd(i,t=!1){const e=i.getValue();if(!e||!e.attachedComments)return"";const s=[];return i.forEach(r=>{const n=r.getValue();n.commentType===Gt.Dangling&&s.push(n.raw)},"attachedComments"),s.length===0?"":t?st.join(st.hardline,s):st.indent(st.concat([st.hardline,st.join(st.hardline,s)]))}As.printDanglingComments=dd;function md(i){const t=i.getValue();if(!t||!t.attachedComments)return"";const e=[];return i.forEach(s=>{const r=s.getValue();r.commentType===Gt.DanglingStatement&&(e.push(" "),e.push(r.raw))},"attachedComments"),e.length===0?"":st.concat(e)}As.printDanglingStatementComments=md;function yd(i,t){const e=i.getValue();if(e.raw.startsWith("--[["))return st.concat([e.raw,tt.hasNewLine(t.sourceText,tt.locEnd(e))?st.hardline:" "]);const r=[];return r.push(e.raw),r.push(st.hardline),tt.isNextLineEmpty(t.sourceText,tt.locEnd(e))&&r.push(st.hardline),st.concat(r)}function gd(i,t){const e=i.getValue();if(tt.hasNewLine(t.sourceText,tt.locStart(e),{searchBackwards:!0})){const r=tt.isPreviousLineEmpty(t.sourceText,tt.locStart(e));return st.concat([st.hardline,r?st.hardline:"",e.raw])}if(e.raw.startsWith("--[["))return st.concat([" ",e.raw]);const s=[];return tt.isNextLineEmpty(t.sourceText,tt.locStart(e),{searchBackwards:!0})&&s.push(st.hardline),s.push(" "),s.push(e.raw),s.push(st.breakParent),st.lineSuffix(st.concat(s))}function Td(i,t,e){const s=i.getValue(),r=e(i),n=s.attachedComments;if(!n||n.length===0)return r;const a=[],o=[r];return i.forEach(l=>{switch(l.getValue().commentType){case Gt.Leading:a.push(yd(i,t));break;case Gt.Trailing:o.push(gd(i,t));break}},"attachedComments"),st.concat(a.concat(o))}As.printComments=Td;function fc(i,t){const e=hd(i);let s=null,r=null,n=0,a=e.length;for(;n0?!1:t.parameters.length>0&&t.parameters[t.parameters.length-1]===i||i&&i.type==="Identifier"?(rs(t,e),!0):!1}function Sd(i,t,e,s){return!t||t.type!=="IfStatement"?!1:e&&(e.type==="ElseifClause"||e.type==="ElseClause")||i&&i.type==="ElseClause"?(rs(i,s),!0):!1}function Pd(i,t,e){if(e.raw.startsWith("--[[")||!t)return!1;switch(t.type){case"WhileStatement":if(i===t.condition)return ms(t,e),!0;break;case"DoStatement":case"RepeatStatement":if(i==null)return ms(t,e),!0;break;case"FunctionDeclaration":if(t.parameters.length&&i===t.parameters[t.parameters.length-1]||i===t.identifier)return ms(t,e),!0;break;case"ForNumericStatement":if(i===t.end||i===t.step)return ms(t,e),!0;break;case"ForGenericStatement":if(i===t.iterators[t.iterators.length-1])return ms(t,e),!0;break;case"IfClause":case"ElseifClause":if(i===t.condition&&e.loc.start.column>i.loc.start.column)return ms(t,e),!0;break;case"ElseClause":if(i==null)return ms(t,e),!0;break}return!1}function Ed(i,t,e){if(!i||!t||t.type!=="IfStatement")return!1;switch(i.type){case"IfClause":case"ElseifClause":case"ElseClause":if(i.body.length===0)return ms(i,e),!0;break}return!1}var da={},ma={};Object.defineProperty(ma,"__esModule",{value:!0});const Ad=ut;class wd{constructor(t){this.stack=[t]}getValue(){return this.stack[this.stack.length-1]}getNodeAtDepth(t){for(let e=this.stack.length-1;e>=0;e-=2){const s=this.stack[e];if(Ad.isNode(s)&&--t<0)return s}return null}getParent(t=0){return this.getNodeAtDepth(t+1)}call(t,e){const s=this.getValue(),r=this.stack.length;this.stack.push(e,s[e]);const n=t(this);return this.stack.length=r,n}forEach(t,e=null){let s=this.getValue();const r=this.stack.length;e&&(s=s[e],this.stack.push(s));for(let n=0;n{this.stack.push(o,a),r.push(t(this,o)),this.stack.length-=2}),this.stack.length=n,r}needsParens(){const t=this.getParent(),e=this.getValue();let s=!1;switch(e.type){case"FunctionDeclaration":case"Chunk":case"Identifier":case"BooleanLiteral":case"NilLiteral":case"NumericLiteral":case"StringLiteral":case"VarargLiteral":case"TableConstructorExpression":case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"MemberExpression":case"IndexExpression":case"CallExpression":case"TableCallExpression":case"StringCallExpression":s=e.inParens||!1}return t&&e.type==="UnaryExpression"&&t.type==="UnaryExpression"&&(s=!0),s}}ma.FastPath=wd;var Or={};Object.defineProperty(Or,"__esModule",{value:!0});function pc(i,t,e){let s=!1;const r=n=>{if(t(n)){s=!0;return}if(!s&&typeof n!="string"){switch(n.type){case"concat":n.parts.forEach(r);break;case"indent":case"group":case"lineSuffix":r(n.content);break}e&&e(n)}};r(i)}function Cd(i,t){let e=!1;return pc(i,s=>t(s)?(e=!0,!0):!1),e}function kd(i){return Cd(i,t=>{if(typeof t=="string")return!1;switch(t.type){case"line":if(t.hard)return!0;break;case"group":if(t.willBreak)return!0}return!1})}Or.willBreak=kd;function Co(i){i.length>0&&(i[i.length-1].willBreak=!0)}function vd(i){const t=[];pc(i,e=>{if(typeof e=="string")return!1;switch(e.type){case"breakParent":Co(t);break;case"group":t.push(e);break}return!1},e=>{if(typeof e=="string")return!1;if(e.type==="group"){const s=t.pop();s&&s.willBreak&&Co(t)}return!1})}Or.propagateBreaks=vd;var Dr={};(function(i){Object.defineProperty(i,"__esModule",{value:!0});var t;(function(r){r.StdOut="stdout",r.Replace="replace",r.Diff="diff"})(t=i.WriteMode||(i.WriteMode={})),i.defaultOptions={sourceText:"",lineWidth:120,indentCount:4,useTabs:!1,linebreakMultipleAssignments:!1,quotemark:"double",writeMode:t.StdOut};function e(r){return r==="single"?"'":'"'}i.getStringQuotemark=e;function s(r){return r==="single"?'"':"'"}i.getAlternativeStringQuotemark=s})(Dr);Object.defineProperty(da,"__esModule",{value:!0});const Ld=ma,Q=vt,dc=Or,mr=As,kn=ut,vn=Dr;function mc(i,t,e){const s=[];return i.forEach(r=>{const n=[e(r)];kn.isNextLineEmpty(t.sourceText,kn.locEnd(r.getValue()))&&!_d(i)&&n.push(Q.hardline),s.push(Q.concat(n))}),Q.join(Q.hardline,s)}function zt(i,t,e,s){const r=i.call(n=>mc(n,t,e),s);return Q.indent(Q.concat([Q.hardline,r]))}function Jt(i){return i.getValue().attachedComments?Q.concat([mr.printDanglingStatementComments(i),mr.printDanglingComments(i)]):""}function Id(i,t){const e=vn.getStringQuotemark(t),s=vn.getAlternativeStringQuotemark(t==="single"?"single":"double"),r=i.replace(/\\([\s\S])|(['"])/g,(n,a,o)=>a===s?a:o===e?"\\"+o:n);return e+r+e}function Nd(i,t){const e=i.getValue();if(e.type!=="StringLiteral")throw new Error("printStringLiteral: Expected StringLiteral, got "+e.type);if(e.raw.startsWith("[[")||e.raw.startsWith("[="))return e.raw;const s=e.raw.slice(1,-1);let r=t.quotemark;const n=vn.getStringQuotemark(r);return s.includes(n)&&(r=r==="single"?"double":"single"),Id(s,r)}function _d(i){const t=i.getParent(),e=i.getValue(),s=t.body;return s&&s[s.length-1]===e}function Md(i,t,e){const s=i.getValue();if(!s)return"";const r=[],n=s;switch(n.type){case"Chunk":return r.push(i.call(A=>mc(A,t,e),"body")),r.push(mr.printDanglingComments(i,!0)),(n.body.length||n.attachedComments)&&r.push(Q.hardline),Q.concat(r);case"LabelStatement":return Q.concat(["::",i.call(e,"label"),"::"]);case"GotoStatement":return Q.concat(["goto ",i.call(e,"label")]);case"BreakStatement":return"break";case"ReturnStatement":return r.push("return"),n.arguments.length>0&&(r.push(" "),r.push(Q.join(", ",i.map(e,"arguments")))),Q.concat(r);case"WhileStatement":return r.push("while "),r.push(i.call(e,"condition")),r.push(" do"),r.push(Jt(i)),n.body.length&&r.push(zt(i,t,e,"body")),r.push(Q.concat([Q.hardline,"end"])),Q.concat(r);case"DoStatement":return r.push("do"),r.push(Jt(i)),n.body.length&&r.push(zt(i,t,e,"body")),r.push(Q.concat([Q.hardline,"end"])),Q.concat(r);case"RepeatStatement":return r.push("repeat"),r.push(Jt(i)),n.body.length&&r.push(zt(i,t,e,"body")),r.push(Q.concat([Q.hardline,"until "])),r.push(i.call(e,"condition")),Q.concat(r);case"LocalStatement":case"AssignmentStatement":{const A=[];n.type==="LocalStatement"&&A.push("local ");const j=t.linebreakMultipleAssignments;A.push(Q.indent(Q.join(Q.concat([",",j?Q.hardline:Q.line]),i.map(e,"variables"))));let H="";const D=[];n.init.length&&(H=" =",n.init.length>1?D.push(Q.indent(Q.join(Q.concat([",",Q.line]),i.map(e,"init")))):D.push(Q.join(Q.concat([",",Q.line]),i.map(e,"init"))));const B=n.init.some(ie=>ie!=null&&ie.type!=="TableConstructorExpression"&&ie.type!=="FunctionDeclaration");return Q.group(Q.concat([Q.group(Q.concat(A)),Q.group(Q.concat([H,B?Q.indent(Q.line):" ",Q.concat(D)]))]))}case"CallStatement":return i.call(e,"expression");case"FunctionDeclaration":return n.isLocal&&r.push("local "),r.push("function"),n.identifier&&r.push(" ",i.call(e,"identifier")),r.push(Q.concat(["(",Q.group(Q.indent(Q.concat([Q.softline,Q.join(Q.concat([",",Q.line]),i.map(e,"parameters"))]))),")"])),r.push(Jt(i)),n.body.length&&r.push(zt(i,t,e,"body")),r.push(Q.hardline,"end"),Q.concat(r);case"ForNumericStatement":return r.push("for "),r.push(i.call(e,"variable")),r.push(" = "),r.push(i.call(e,"start")),r.push(", "),r.push(i.call(e,"end")),n.step&&(r.push(", "),r.push(i.call(e,"step"))),r.push(" do"),r.push(Jt(i)),n.body.length&&r.push(zt(i,t,e,"body")),r.push(Q.concat([Q.hardline,"end"])),Q.concat(r);case"ForGenericStatement":return r.push("for "),r.push(Q.join(", ",i.map(e,"variables"))),r.push(" in "),r.push(Q.join(", ",i.map(e,"iterators"))),r.push(" do"),r.push(Jt(i)),n.body.length&&r.push(zt(i,t,e,"body")),r.push(Q.concat([Q.hardline,"end"])),Q.concat(r);case"IfStatement":const a=[];return i.forEach(A=>{a.push(e(A))},"clauses"),r.push(Q.join(Q.hardline,a)),r.push(Q.concat([Q.hardline,"end"])),Q.concat(r);case"IfClause":return r.push(Q.concat(["if ",Q.group(Q.concat([Q.indent(Q.concat([Q.softline,i.call(e,"condition")])),Q.softline]))," then"])),r.push(Jt(i)),n.body.length&&r.push(zt(i,t,e,"body")),Q.concat(r);case"ElseifClause":return r.push(Q.concat(["elseif ",Q.group(Q.concat([Q.indent(Q.concat([Q.softline,i.call(e,"condition")])),Q.softline]))," then"])),r.push(Jt(i)),n.body.length&&r.push(zt(i,t,e,"body")),Q.concat(r);case"ElseClause":return r.push("else"),r.push(Jt(i)),n.body.length&&r.push(zt(i,t,e,"body")),Q.concat(r);case"BooleanLiteral":return n.raw;case"NilLiteral":return"nil";case"NumericLiteral":return n.raw;case"StringLiteral":return Nd(i,t);case"VarargLiteral":return"...";case"Identifier":return n.name;case"BinaryExpression":case"LogicalExpression":const l=i.getParent().type!==n.type&&n.left.type!==n.type&&n.right.type!==n.type,h=Q.concat([n.operator,Q.line,i.call(e,"right")]);return Q.group(Q.concat([i.call(e,"left"),Q.indent(Q.concat([" ",l?Q.group(h):h]))]));case"UnaryExpression":return r.push(n.operator),n.operator==="not"&&r.push(" "),r.push(i.call(e,"argument")),Q.concat(r);case"MemberExpression":return Q.concat([i.call(e,"base"),n.indexer,i.call(e,"identifier")]);case"IndexExpression":return Q.concat([i.call(e,"base"),"[",Q.group(Q.concat([Q.indent(Q.concat([Q.softline,i.call(e,"index")])),Q.softline])),"]"]);case"CallExpression":const u=i.map(e,"arguments");return Q.concat([i.call(e,"base"),Q.group(Q.concat(["(",Q.indent(Q.concat([Q.softline,Q.join(Q.concat([",",Q.line]),u)])),Q.softline,")"]),u.some(dc.willBreak))]);case"TableCallExpression":return r.push(i.call(e,"base")),r.push(" "),r.push(i.call(e,"arguments")),Q.concat(r);case"StringCallExpression":return r.push(i.call(e,"base")),r.push(" "),r.push(i.call(e,"argument")),Q.concat(r);case"TableConstructorExpression":if(n.fields.length===0)return"{}";const b=[];let P=[];i.forEach(A=>{b.push(Q.concat(P)),b.push(Q.group(e(A))),P=[",",Q.line]},"fields");const I=kn.hasNewLineInRange(t.sourceText,n.range[0],n.range[1]);return Q.group(Q.concat(["{",Q.indent(Q.concat([Q.softline,Q.concat(b)])),Q.softline,"}"]),I);case"TableKeyString":return Q.concat([i.call(e,"key")," = ",i.call(e,"value")]);case"TableKey":return Q.concat(["[",i.call(e,"key"),"]"," = ",i.call(e,"value")]);case"TableValue":return i.call(e,"value")}throw new Error("Unhandled AST node: "+n.type)}function Od(i,t,e){const s=Md(i,t,e),r=[],n=i.needsParens();return n&&r.push("("),r.push(s),n&&r.push(")"),Q.concat(r)}function Dd(i,t){const e=r=>mr.printComments(r,t,n=>Od(n,t,e)),s=e(new Ld.FastPath(i));return dc.propagateBreaks(s),s}da.buildDocFromAst=Dd;var ya={};Object.defineProperty(ya,"__esModule",{value:!0});var ns;(function(i){i[i.Flat=0]="Flat",i[i.Break=1]="Break"})(ns||(ns={}));function Fd(i,t){const e={options:t,indentation:0,currentLineLength:0,mode:ns.Break,lineSuffixes:[],renderedText:""};return di(i,e),e.renderedText}ya.printDocToString=Fd;function rr(i,t){function e(s){return t.currentLineLength+s.length<=t.options.lineWidth?(t.currentLineLength+=s.length,!0):!1}if(typeof i=="string")return e(i);switch(i.type){case"concat":return i.parts.every(s=>rr(s,t));case"indent":return t.indentation++,rr(i.content,t)?(t.indentation--,!0):(t.indentation--,!1);case"group":return i.willBreak&&(t.mode=ns.Break),rr(i.content,t);case"line":return t.mode===ns.Flat&&!i.hard?i.soft?!0:e(" "):(t.currentLineLength=t.indentation,!0);case"lineSuffix":return!0}return!1}function di(i,t){if(typeof i=="string")t.renderedText+=i,t.currentLineLength+=i.length;else switch(i.type){case"concat":for(const n of i.parts)di(n,t);break;case"line":if(t.mode===ns.Flat&&!i.hard){i.soft||(t.renderedText+=" ",t.currentLineLength+=1);break}if(t.lineSuffixes.length>0){const n=[...t.lineSuffixes];t.lineSuffixes.length=0;for(const a of n)di(a.content,t)}t.renderedText.length>0&&(t.renderedText=t.renderedText.replace(/[^\S\n]*$/,""));const e=t.options.useTabs?" ".repeat(t.indentation):" ".repeat(t.indentation*t.options.indentCount);t.renderedText+=` -`+e,t.currentLineLength=e.length;break;case"indent":{t.indentation++,di(i.content,t),t.indentation--;break}case"lineSuffix":t.lineSuffixes.push(i);break;case"group":const s=rr(i,Object.assign({},t,{mode:ns.Flat})),r=t.mode;!i.willBreak&&s?t.mode=ns.Flat:t.mode=ns.Break,di(i.content,t),t.mode=r;break}}var Ln={exports:{}};(function(i,t){(function(e,s,r){var n=t&&!t.nodeType&&t,a=i&&!i.nodeType&&i,o=n&&a&&typeof es=="object"&&es,l=a&&a.exports===n&&n;o&&(o.global===o||o.window===o||o.self===o)&&(e=o),r(n&&a?l?a.exports:n:e[s]={})})(es,"luaparse",function(e){e.version="0.2.1";var s,r,n,a=e.defaultOptions={wait:!1,comments:!0,scope:!1,locations:!1,ranges:!1,onCreateNode:null,onCreateScope:null,onDestroyScope:null,onLocalDeclaration:null,luaVersion:"5.1"},o=1,l=2,h=4,u=8,b=16,P=32,I=64,A=128,j=256;e.tokenTypes={EOF:o,StringLiteral:l,Keyword:h,Identifier:u,NumericLiteral:b,Punctuator:P,BooleanLiteral:I,NilLiteral:A,VarargLiteral:j};var H=e.errors={unexpected:"unexpected %1 '%2' near '%3'",expected:"'%1' expected near '%2'",expectedToken:"%1 expected near '%2'",unfinishedString:"unfinished string near '%1'",malformedNumber:"malformed number near '%1'",invalidVar:"invalid left-hand side of assignment near '%1'",decimalEscapeTooLarge:"decimal escape too large near '%1'",invalidEscape:"invalid escape sequence near '%1'",hexadecimalDigitExpected:"hexadecimal digit expected near '%1'",braceExpected:"missing '%1' near '%2'",tooLargeCodepoint:"UTF-8 value too large near '%1'",unfinishedLongString:"unfinished long string (starting at line %1) near '%2'",unfinishedLongComment:"unfinished long comment (starting at line %1) near '%2'"},D=e.ast={labelStatement:function(m){return{type:"LabelStatement",label:m}},breakStatement:function(){return{type:"BreakStatement"}},gotoStatement:function(m){return{type:"GotoStatement",label:m}},returnStatement:function(m){return{type:"ReturnStatement",arguments:m}},ifStatement:function(m){return{type:"IfStatement",clauses:m}},ifClause:function(m,_){return{type:"IfClause",condition:m,body:_}},elseifClause:function(m,_){return{type:"ElseifClause",condition:m,body:_}},elseClause:function(m){return{type:"ElseClause",body:m}},whileStatement:function(m,_){return{type:"WhileStatement",condition:m,body:_}},doStatement:function(m){return{type:"DoStatement",body:m}},repeatStatement:function(m,_){return{type:"RepeatStatement",condition:m,body:_}},localStatement:function(m,_){return{type:"LocalStatement",variables:m,init:_}},assignmentStatement:function(m,_){return{type:"AssignmentStatement",variables:m,init:_}},callStatement:function(m){return{type:"CallStatement",expression:m}},functionStatement:function(m,_,Z,de){return{type:"FunctionDeclaration",identifier:m,isLocal:Z,parameters:_,body:de}},forNumericStatement:function(m,_,Z,de,Me){return{type:"ForNumericStatement",variable:m,start:_,end:Z,step:de,body:Me}},forGenericStatement:function(m,_,Z){return{type:"ForGenericStatement",variables:m,iterators:_,body:Z}},chunk:function(m){return{type:"Chunk",body:m}},identifier:function(m){return{type:"Identifier",name:m}},literal:function(m,_,Z){return m=m===l?"StringLiteral":m===b?"NumericLiteral":m===I?"BooleanLiteral":m===A?"NilLiteral":"VarargLiteral",{type:m,value:_,raw:Z}},tableKey:function(m,_){return{type:"TableKey",key:m,value:_}},tableKeyString:function(m,_){return{type:"TableKeyString",key:m,value:_}},tableValue:function(m){return{type:"TableValue",value:m}},tableConstructorExpression:function(m){return{type:"TableConstructorExpression",fields:m}},binaryExpression:function(m,_,Z){var de=m==="and"||m==="or"?"LogicalExpression":"BinaryExpression";return{type:de,operator:m,left:_,right:Z}},unaryExpression:function(m,_){return{type:"UnaryExpression",operator:m,argument:_}},memberExpression:function(m,_,Z){return{type:"MemberExpression",indexer:_,identifier:Z,base:m}},indexExpression:function(m,_){return{type:"IndexExpression",base:m,index:_}},callExpression:function(m,_){return{type:"CallExpression",base:m,arguments:_}},tableCallExpression:function(m,_){return{type:"TableCallExpression",base:m,arguments:_}},stringCallExpression:function(m,_){return{type:"StringCallExpression",base:m,argument:_}},comment:function(m,_){return{type:"Comment",value:m,raw:_}}};function B(m){if(rt){var _=Qe.pop();_.complete(),_.bless(m)}return r.onCreateNode&&r.onCreateNode(m),m}var ie=Array.prototype.slice,W=function(_,Z){for(var de=0,Me=_.length;de=n)return{type:o,value:"",line:E,lineStart:L,range:[S,S]};var m=s.charCodeAt(S),_=s.charCodeAt(S+1);if(C=S,J(m))return Ce();switch(m){case 39:case 34:return M();case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return R();case 46:return X(_)?R():_===46?s.charCodeAt(S+2)===46?G():ee(".."):ee(".");case 61:return ee(_===61?"==":"=");case 62:return r.luaVersion==="5.3"&&_===62?ee(">>"):ee(_===61?">=":">");case 60:return r.luaVersion==="5.3"&&_===60?ee("<<"):ee(_===61?"<=":"<");case 126:if(_===61)return ee("~=");if(r.luaVersion==="5.1"||r.luaVersion==="5.2")break;return ee("~");case 58:return(r.luaVersion==="5.2"||r.luaVersion==="5.3")&&_===58?ee("::"):ee(":");case 91:return _===91||_===61?O():ee("[");case 47:return r.luaVersion==="5.3"&&_===47?ee("//"):ee("/");case 38:case 124:if(r.luaVersion==="5.1"||r.luaVersion==="5.2")break;case 42:case 94:case 37:case 44:case 123:case 125:case 93:case 40:case 41:case 59:case 35:case 45:case 43:return ee(s.charAt(S))}return fe(s.charAt(S))}function pe(){var m=s.charCodeAt(S),_=s.charCodeAt(S+1);return w(m)?(m===10&&_===13&&++S,m===13&&_===10&&++S,++E,L=++S,!0):!1}function Se(){for(;S=n||w(Ue))&&(Me+=s.slice(de,S-1),g({},H.unfinishedString,Me+String.fromCharCode(Ue)));return Me+=s.slice(de,S-1),{type:l,value:Me,line:_,lineStart:Z,lastLine:E,lastLineStart:L,range:[C,S]}}function O(){var m=E,_=L,Z=T(!1);return Z===!1&&g(N,H.expected,"[",N.value),{type:l,value:Z,line:m,lineStart:_,lastLine:E,lastLineStart:L,range:[C,S]}}function R(){var m=s.charAt(S),_=s.charAt(S+1),Z=m==="0"&&"xX".indexOf(_||null)>=0?V():f();return{type:b,value:Z,line:E,lineStart:L,range:[C,S]}}function V(){var m=0,_=1,Z=1,de,Me,Ue,gt;for(gt=S+=2,K(s.charCodeAt(S))||g({},H.malformedNumber,s.slice(C,S));K(s.charCodeAt(S));)++S;if(de=parseInt(s.slice(gt,S),16),s.charAt(S)==="."){for(Me=++S;K(s.charCodeAt(S));)++S;m=s.slice(Me,S),m=Me===S?0:parseInt(m,16)/Math.pow(16,S-Me)}if("pP".indexOf(s.charAt(S)||null)>=0){for(++S,"+-".indexOf(s.charAt(S)||null)>=0&&(Z=s.charAt(S++)==="+"?1:-1),Ue=S,X(s.charCodeAt(S))||g({},H.malformedNumber,s.slice(C,S));X(s.charCodeAt(S));)++S;_=s.slice(Ue,S),_=Math.pow(2,_*Z)}return(de+m)*_}function f(){for(;X(s.charCodeAt(S));)++S;if(s.charAt(S)===".")for(++S;X(s.charCodeAt(S));)++S;if("eE".indexOf(s.charAt(S)||null)>=0)for(++S,"+-".indexOf(s.charAt(S)||null)>=0&&++S,X(s.charCodeAt(S))||g({},H.malformedNumber,s.slice(C,S));X(s.charCodeAt(S));)++S;return parseFloat(s.slice(C,S))}function U(m){return m<128?String.fromCharCode(m):m<2048?String.fromCharCode(192|m>>6,128|m&63):m<65536?String.fromCharCode(224|m>>12,128|m>>6&63,128|m&63):m<1114112?String.fromCharCode(240|m>>18,128|m>>12&63,128|m>>6&63,128|m&63):null}function $(){var m=S++;for(s.charAt(S++)!=="{"&&g({},H.braceExpected,"{","\\"+s.slice(m,S)),K(s.charCodeAt(S))||g({},H.hexadecimalDigitExpected,"\\"+s.slice(m,S));s.charCodeAt(S)===48;)++S;for(var _=S;K(s.charCodeAt(S));)++S,S-_>6&&g({},H.tooLargeCodepoint,"\\"+s.slice(m,S));var Z=s.charAt(S++);Z!=="}"&&(Z==='"'||Z==="'"?g({},H.braceExpected,"}","\\"+s.slice(m,S--)):g({},H.hexadecimalDigitExpected,"\\"+s.slice(m,S)));var de=parseInt(s.slice(_,S-1),16);return de=U(de),de===null&&g({},H.tooLargeCodepoint,"\\"+s.slice(m,S)),de}function F(){var m=S;switch(s.charAt(S)){case"a":return++S,"\x07";case"n":return++S,` -`;case"r":return++S,"\r";case"t":return++S," ";case"v":return++S,"\v";case"b":return++S,"\b";case"f":return++S,"\f";case"\r":case` -`:return pe(),` -`;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;X(s.charCodeAt(S))&&S-m<3;)++S;var _=parseInt(s.slice(m,S),10);return _>255&&g({},H.decimalEscapeTooLarge,"\\"+_),String.fromCharCode(_);case"z":if(r.luaVersion==="5.2"||r.luaVersion==="5.3")return++S,Se(),"";case"x":if(r.luaVersion==="5.2"||r.luaVersion==="5.3"){if(K(s.charCodeAt(S+1))&&K(s.charCodeAt(S+2)))return S+=3,String.fromCharCode(parseInt(s.slice(m+1,S),16));g({},H.hexadecimalDigitExpected,"\\"+s.slice(m,S+2))}case"u":if(r.luaVersion==="5.3")return $();default:(r.luaVersion==="5.2"||r.luaVersion==="5.3")&&g({},H.invalidEscape,"\\"+s.slice(m,S+1));case"\\":case'"':case"'":return s.charAt(S++)}}function d(){C=S,S+=2;var m=s.charAt(S),_="",Z=!1,de=S,Me=L,Ue=E;if(m==="["&&(_=T(!0),_===!1?_=m:Z=!0),!Z){for(;S")}function c(){le=N,N=re,re=q()}function p(m){return m===N.value?(c(),!0):!1}function y(m){m===N.value?c():g(N,H.expected,m,N.value)}function x(m){return m===9||m===32||m===11||m===12}function w(m){return m===10||m===13}function X(m){return m>=48&&m<=57}function K(m){return m>=48&&m<=57||m>=97&&m<=102||m>=65&&m<=70}function J(m){return m>=65&&m<=90||m>=97&&m<=122||m===95}function Ee(m){return m>=65&&m<=90||m>=97&&m<=122||m===95||m>=48&&m<=57}function ne(m){switch(m.length){case 2:return m==="do"||m==="if"||m==="in"||m==="or";case 3:return m==="and"||m==="end"||m==="for"||m==="not";case 4:return m==="else"||m==="then"?!0:r.luaVersion==="5.2"||r.luaVersion==="5.3"?m==="goto":!1;case 5:return m==="break"||m==="local"||m==="until"||m==="while";case 6:return m==="elseif"||m==="repeat"||m==="return";case 8:return m==="function"}return!1}function oe(m){return P===m.type?"#-~".indexOf(m.value)>=0:h===m.type?m.value==="not":!1}function be(m){switch(m.type){case"CallExpression":case"TableCallExpression":case"StringCallExpression":return!0}return!1}function se(m){if(o===m.type)return!0;if(h!==m.type)return!1;switch(m.value){case"else":case"elseif":case"end":case"until":return!0;default:return!1}}var ue,ye,Le;function Ne(){var m=Array.apply(null,ue[ye++]);ue.push(m),r.onCreateScope&&r.onCreateScope()}function je(){ue.pop(),ye--,r.onDestroyScope&&r.onDestroyScope()}function it(m){r.onLocalDeclaration&&r.onLocalDeclaration(m),W(ue[ye],m)===-1&&ue[ye].push(m)}function mt(m){it(m.name),Wt(m,!0)}function Wt(m,_){!_&&k(Le,"name",m.name)===-1&&Le.push(m),m.isLocal=_}function at(m){return W(ue[ye],m)!==-1}var Qe=[],rt;function Ft(){return new te(N)}function te(m){r.locations&&(this.loc={start:{line:m.line,column:m.range[0]-m.lineStart},end:{line:0,column:0}}),r.ranges&&(this.range=[m.range[0],0])}te.prototype.complete=function(){r.locations&&(this.loc.end.line=le.lastLine||le.line,this.loc.end.column=le.range[1]-(le.lastLineStart||le.lineStart)),r.ranges&&(this.range[1]=le.range[1])},te.prototype.bless=function(m){if(this.loc){var _=this.loc;m.loc={start:{line:_.start.line,column:_.start.column},end:{line:_.end.line,column:_.end.column}}}this.range&&(m.range=[this.range[0],this.range[1]])};function ae(){rt&&Qe.push(Ft())}function Y(m){rt&&Qe.push(m)}function z(){c(),ae(),r.scope&&Ne();var m=ce();return r.scope&&je(),o!==N.type&&fe(N),rt&&!m.length&&(le=N),B(D.chunk(m))}function ce(m){for(var _=[],Z;!se(N);){if(N.value==="return"){_.push(Pe());break}Z=Pe(),p(";"),Z&&_.push(Z)}return _}function Pe(){if(ae(),h===N.type)switch(N.value){case"local":return c(),Nt();case"if":return c(),Rs();case"return":return c(),us();case"function":c();var m=Bc();return Br(m);case"while":return c(),ze();case"for":return c(),Ve();case"repeat":return c(),qe();case"break":return c(),we();case"do":return c(),et();case"goto":return c(),_e()}if(P===N.type&&p("::"))return xe();if(rt&&Qe.pop(),!((r.luaVersion==="5.2"||r.luaVersion==="5.3")&&p(";")))return yt()}function xe(){var m=N.value,_=Pt();return r.scope&&(it("::"+m+"::"),Wt(_,!0)),y("::"),B(D.labelStatement(_))}function we(){return B(D.breakStatement())}function _e(){N.value;var m=Pt();return B(D.gotoStatement(m))}function et(){r.scope&&Ne();var m=ce();return r.scope&&je(),y("end"),B(D.doStatement(m))}function ze(){var m=ot();y("do"),r.scope&&Ne();var _=ce();return r.scope&&je(),y("end"),B(D.whileStatement(m,_))}function qe(){r.scope&&Ne();var m=ce();y("until");var _=ot();return r.scope&&je(),B(D.repeatStatement(_,m))}function us(){var m=[];if(N.value!=="end"){var _=Ri();for(_!=null&&m.push(_);p(",");)_=ot(),m.push(_);p(";")}return B(D.returnStatement(m))}function Rs(){var m=[],_,Z,de;for(rt&&(de=Qe[Qe.length-1],Qe.push(de)),_=ot(),y("then"),r.scope&&Ne(),Z=ce(),r.scope&&je(),m.push(B(D.ifClause(_,Z))),rt&&(de=Ft());p("elseif");)Y(de),_=ot(),y("then"),r.scope&&Ne(),Z=ce(),r.scope&&je(),m.push(B(D.elseifClause(_,Z))),rt&&(de=Ft());return p("else")&&(rt&&(de=new te(le),Qe.push(de)),r.scope&&Ne(),Z=ce(),r.scope&&je(),m.push(B(D.elseClause(Z)))),y("end"),B(D.ifStatement(m))}function Ve(){var m=Pt(),_;if(r.scope&&(Ne(),mt(m)),p("=")){var Z=ot();y(",");var de=ot(),Me=p(",")?ot():null;return y("do"),_=ce(),y("end"),r.scope&&je(),B(D.forNumericStatement(m,Z,de,Me,_))}else{for(var Ue=[m];p(",");)m=Pt(),r.scope&&mt(m),Ue.push(m);y("in");var gt=[];do{var ti=ot();gt.push(ti)}while(p(","));return y("do"),_=ce(),y("end"),r.scope&&je(),B(D.forGenericStatement(Ue,gt,_))}}function Nt(){var m;if(u===N.type){var _=[],Z=[];do m=Pt(),_.push(m);while(p(","));if(p("="))do{var de=ot();Z.push(de)}while(p(","));if(r.scope)for(var Me=0,Ue=_.length;Me",N)}function Kt(m){(m.inParens||["Identifier","MemberExpression","IndexExpression"].indexOf(m.type)===-1)&&g(N,H.invalidVar,N.value)}function yt(){var m=N,_,Z;if(rt&&(Z=Ft()),_=$r(),_==null)return fe(N);if(",=".indexOf(N.value)>=0){var de=[_],Me=[],Ue;for(Kt(_);p(",");)Ue=$r(),Ue==null&&he("",N),Kt(Ue),de.push(Ue);y("=");do Ue=ot(),Me.push(Ue);while(p(","));return Y(Z),B(D.assignmentStatement(de,Me))}return be(_)?(Y(Z),B(D.callStatement(_))):fe(m)}function Pt(){ae();var m=N.value;return u!==N.type&&he("",N),c(),B(D.identifier(m))}function Br(m,_){var Z=[];if(y("("),!p(")"))for(;;)if(u===N.type){var de=Pt();if(r.scope&&mt(de),Z.push(de),p(","))continue;if(p(")"))break}else if(j===N.type){Z.push(Ur()),y(")");break}else he(" or '...'",N);var Me=ce();return y("end"),r.scope&&je(),_=_||!1,B(D.functionStatement(m,Z,_,Me))}function Bc(){var m,_,Z;for(rt&&(Z=Ft()),m=Pt(),r.scope&&(Wt(m,at(m.name)),Ne());p(".");)Y(Z),_=Pt(),m=B(D.memberExpression(m,".",_));return p(":")&&(Y(Z),_=Pt(),m=B(D.memberExpression(m,":",_)),r.scope&&it("self")),m}function Pa(){for(var m=[],_,Z;;){if(ae(),P===N.type&&p("["))_=ot(),y("]"),y("="),Z=ot(),m.push(B(D.tableKey(_,Z)));else if(u===N.type)re.value==="="?(_=Pt(),c(),Z=ot(),m.push(B(D.tableKeyString(_,Z)))):(Z=ot(),m.push(B(D.tableValue(Z))));else{if((Z=Ri())==null){Qe.pop();break}m.push(B(D.tableValue(Z)))}if(",;".indexOf(N.value)>=0){c();continue}break}return y("}"),B(D.tableConstructorExpression(m))}function Ri(){var m=Rr(0);return m}function ot(){var m=Ri();if(m==null)he("",N);else return m}function Rc(m){var _=m.charCodeAt(0),Z=m.length;if(Z===1)switch(_){case 94:return 12;case 42:case 47:case 37:return 10;case 43:case 45:return 9;case 38:return 6;case 126:return 5;case 124:return 4;case 60:case 62:return 3}else if(Z===2)switch(_){case 47:return 10;case 46:return 8;case 60:case 62:return m==="<<"||m===">>"?7:3;case 61:case 126:return 3;case 111:return 1}else if(_===97&&m==="and")return 2;return 0}function Rr(m){var _=N.value,Z,de;if(rt&&(de=Ft()),oe(N)){ae(),c();var Me=Rr(10);Me==null&&he("",N),Z=B(D.unaryExpression(_,Me))}if(Z==null&&(Z=Ur(),Z==null&&(Z=$r())),Z==null)return null;for(var Ue;_=N.value,Ue=P===N.type||h===N.type?Rc(_):0,!(Ue===0||Ue<=m);){(_==="^"||_==="..")&&Ue--,c();var gt=Rr(Ue);gt==null&&he("",N),rt&&Qe.push(de),Z=B(D.binaryExpression(_,Z,gt))}return Z}function $r(){var m,_,Z;if(rt&&(Z=Ft()),u===N.type)_=N.value,m=Pt(),r.scope&&Wt(m,at(_));else if(p("("))m=ot(),y(")"),m.inParens=!0;else return null;for(var de,Me;;)if(P===N.type)switch(N.value){case"[":Y(Z),c(),de=ot(),y("]"),m=B(D.indexExpression(m,de));break;case".":Y(Z),c(),Me=Pt(),m=B(D.memberExpression(m,".",Me));break;case":":Y(Z),c(),Me=Pt(),m=B(D.memberExpression(m,":",Me)),Y(Z),m=jr(m);break;case"(":case"{":Y(Z),m=jr(m);break;default:return m}else if(l===N.type)Y(Z),m=jr(m);else break;return m}function jr(m){if(P===N.type)switch(N.value){case"(":c();var _=[],Z=Ri();for(Z!=null&&_.push(Z);p(",");)Z=ot(),_.push(Z);return y(")"),B(D.callExpression(m,_));case"{":ae(),c();var de=Pa();return B(D.tableCallExpression(m,de))}else if(l===N.type)return B(D.stringCallExpression(m,Ur()));he("function arguments",N)}function Ur(){var m=l|b|I|A|j,_=N.value,Z=N.type,de;if(rt&&(de=Ft()),Z&m){Y(de);var Me=s.slice(N.range[0],N.range[1]);return c(),B(D.literal(Z,_,Me))}else{if(h===Z&&_==="function")return Y(de),c(),r.scope&&Ne(),Br(null);if(p("{"))return Y(de),Pa()}}e.parse=$c;function $c(m,_){if(typeof _=="undefined"&&typeof m=="object"&&(_=m,m=void 0),_||(_={}),s=m||"",r=De(a,_),S=0,E=1,L=0,n=s.length,ue=[[]],ye=0,Le=[],Qe=[],!(r.luaVersion==="5.1"||r.luaVersion==="5.2"||r.luaVersion==="5.3"))throw new Error(me("Lua version '%1' not supported",r.luaVersion));return r.comments&&(Te=[]),r.wait?e:Aa()}e.write=Ea;function Ea(m){return s+=String(m),n=s.length,e}e.end=Aa;function Aa(m){typeof m!="undefined"&&Ea(m),s&&s.substr(0,2)==="#!"&&(s=s.replace(/^.*/,function(Z){return Z.replace(/./g," ")})),n=s.length,rt=r.locations||r.ranges,re=q();var _=z();if(r.comments&&(_.comments=Te),r.scope&&(_.globals=Le),Qe.length>0)throw new Error("Location tracking failed. This is most likely a bug in luaparse");return _}})})(Ln,Ln.exports);var yc={exports:{}};/*! - - diff v3.5.0 - -Software License Agreement (BSD License) - -Copyright (c) 2009-2015, Kevin Decker - -All rights reserved. - -Redistribution and use of this software in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - -* Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - -* Neither the name of Kevin Decker nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@license -*/(function(i,t){(function(s,r){i.exports=r()})(es,function(){return function(e){var s={};function r(n){if(s[n])return s[n].exports;var a=s[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}return r.m=e,r.c=s,r.p="",r(0)}([function(e,s,r){s.__esModule=!0,s.canonicalize=s.convertChangesToXML=s.convertChangesToDMP=s.merge=s.parsePatch=s.applyPatches=s.applyPatch=s.createPatch=s.createTwoFilesPatch=s.structuredPatch=s.diffArrays=s.diffJson=s.diffCss=s.diffSentences=s.diffTrimmedLines=s.diffLines=s.diffWordsWithSpace=s.diffWords=s.diffChars=s.Diff=void 0;var n=r(1),a=W(n),o=r(2),l=r(3),h=r(5),u=r(6),b=r(7),P=r(8),I=r(9),A=r(10),j=r(11),H=r(13),D=r(14),B=r(16),ie=r(17);function W(k){return k&&k.__esModule?k:{default:k}}s.Diff=a.default,s.diffChars=o.diffChars,s.diffWords=l.diffWords,s.diffWordsWithSpace=l.diffWordsWithSpace,s.diffLines=h.diffLines,s.diffTrimmedLines=h.diffTrimmedLines,s.diffSentences=u.diffSentences,s.diffCss=b.diffCss,s.diffJson=P.diffJson,s.diffArrays=I.diffArrays,s.structuredPatch=D.structuredPatch,s.createTwoFilesPatch=D.createTwoFilesPatch,s.createPatch=D.createPatch,s.applyPatch=A.applyPatch,s.applyPatches=A.applyPatches,s.parsePatch=j.parsePatch,s.merge=H.merge,s.convertChangesToDMP=B.convertChangesToDMP,s.convertChangesToXML=ie.convertChangesToXML,s.canonicalize=P.canonicalize},function(e,s){s.__esModule=!0,s.default=r;function r(){}r.prototype={diff:function(l,h){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},b=u.callback;typeof u=="function"&&(b=u,u={}),this.options=u;var P=this;function I(me){return b?(setTimeout(function(){b(void 0,me)},0),!0):me}l=this.castInput(l),h=this.castInput(h),l=this.removeEmpty(this.tokenize(l)),h=this.removeEmpty(this.tokenize(h));var A=h.length,j=l.length,H=1,D=A+j,B=[{newPos:-1,components:[]}],ie=this.extractCommon(B[0],h,l,0);if(B[0].newPos+1>=A&&ie+1>=j)return I([{value:this.join(h),count:h.length}]);function W(){for(var me=-1*H;me<=H;me+=2){var De=void 0,g=B[me-1],he=B[me+1],fe=(he?he.newPos:0)-me;g&&(B[me-1]=void 0);var S=g&&g.newPos+1=A&&fe+1>=j)return I(n(P,De.components,h,l,P.useLongestToken));B[me]=De}H++}if(b)(function me(){setTimeout(function(){if(H>D)return b();W()||me()},0)})();else for(;H<=D;){var k=W();if(k)return k}},pushComponent:function(l,h,u){var b=l[l.length-1];b&&b.added===h&&b.removed===u?l[l.length-1]={count:b.count+1,added:h,removed:u}:l.push({count:1,added:h,removed:u})},extractCommon:function(l,h,u,b){for(var P=h.length,I=u.length,A=l.newPos,j=A-b,H=0;A+1W.length?me:W}),H.value=o.join(D)}else H.value=o.join(h.slice(A,A+H.count));A+=H.count,H.added||(j+=H.count)}}var ie=l[I-1];return I>1&&typeof ie.value=="string"&&(ie.added||ie.removed)&&o.equals("",ie.value)&&(l[I-2].value+=ie.value,l.pop()),l}function a(o){return{newPos:o.newPos,components:o.components.slice(0)}}},function(e,s,r){s.__esModule=!0,s.characterDiff=void 0,s.diffChars=h;var n=r(1),a=o(n);function o(u){return u&&u.__esModule?u:{default:u}}var l=s.characterDiff=new a.default;function h(u,b,P){return l.diff(u,b,P)}},function(e,s,r){s.__esModule=!0,s.wordDiff=void 0,s.diffWords=P,s.diffWordsWithSpace=I;var n=r(1),a=l(n),o=r(4);function l(A){return A&&A.__esModule?A:{default:A}}var h=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,u=/\S/,b=s.wordDiff=new a.default;b.equals=function(A,j){return this.options.ignoreCase&&(A=A.toLowerCase(),j=j.toLowerCase()),A===j||this.options.ignoreWhitespace&&!u.test(A)&&!u.test(j)},b.tokenize=function(A){for(var j=A.split(/(\s+|\b)/),H=0;H2&&arguments[2]!==void 0?arguments[2]:{};if(typeof P=="string"&&(P=(0,n.parsePatch)(P)),Array.isArray(P)){if(P.length>1)throw new Error("applyPatch only works with a single input.");P=P[0]}var A=b.split(/\r\n|[\n\v\f\r\x85]/),j=b.match(/\r\n|[\n\v\f\r\x85]/g)||[],H=P.hunks,D=I.compareLine||function(O,R,V,f){return R===f},B=0,ie=I.fuzzFactor||0,W=0,k=0,me=void 0,De=void 0;function g(O,R){for(var V=0;V0?f[0]:" ",$=f.length>0?f.substr(1):f;if(U===" "||U==="-"){if(!D(R+1,A[R],U,$)&&(B++,B>ie))return!1;R++}}return!0}for(var he=0;he0?pe[0]:" ",Ce=pe.length>0?pe.substr(1):pe,ee=E.linedelimiters[q];if(Se===" ")L++;else if(Se==="-")A.splice(L,1),j.splice(L,1);else if(Se==="+")A.splice(L,0,Ce),j.splice(L,0,ee),L++;else if(Se==="\\"){var G=E.lines[q-1]?E.lines[q-1][0]:null;G==="+"?me=!0:G==="-"&&(De=!0)}}}if(me)for(;!A[A.length-1];)A.pop(),j.pop();else De&&(A.push(""),j.push(` -`));for(var M=0;M1&&arguments[1]!==void 0?arguments[1]:{},o=n.split(/\r\n|[\n\v\f\r\x85]/),l=n.match(/\r\n|[\n\v\f\r\x85]/g)||[],h=[],u=0;function b(){var A={};for(h.push(A);u0?B(C.lines.slice(-H.context)):[],W-=me.length,k-=me.length)}(Te=me).push.apply(Te,a(re.map(function(ee){return(le.added?"+":"-")+ee}))),le.added?g+=re.length:De+=re.length}else{if(W)if(re.length<=H.context*2&&N=D.length-2&&re.length<=H.context){var Se=/\n$/.test(P),Ce=/\n$/.test(I);re.length==0&&!Se?me.splice(pe.oldLines,0,"\\ No newline at end of file"):(!Se||!Ce)&&me.push("\\ No newline at end of file")}ie.push(pe),W=0,k=0,me=[]}De+=re.length,g+=re.length}},fe=0;fea.length)return!1;for(var l=0;l"):h.removed&&o.push(""),o.push(n(h.value)),h.added?o.push(""):h.removed&&o.push("")}return o.join("")}function n(a){var o=a;return o=o.replace(/&/g,"&"),o=o.replace(//g,">"),o=o.replace(/"/g,"""),o}}])})})(yc);Object.defineProperty(Bi,"__esModule",{value:!0});const ko=As,Bd=da,Rd=ya,$d=Dr,jd=Ln.exports,Ud=yc.exports;var gc=Dr;Bi.defaultOptions=gc.defaultOptions;Bi.WriteMode=gc.WriteMode;function Vd(i,t){const e=jd.parse(i,{comments:!0,locations:!0,ranges:!0,luaVersion:"5.3"});e.range[0]=0,e.range[1]=i.length;const s=Object.assign({},$d.defaultOptions,t),r=Object.assign({},s,{sourceText:i});ko.injectShebang(e,r),ko.attachComments(e,r);const n=Bd.buildDocFromAst(e,r);return Rd.printDocToString(n,r)}Bi.formatText=Vd;function Hd(i,t,e){return Ud.createPatch(i,t,e,"original","formatted")}Bi.producePatch=Hd;var Tc={exports:{}};(function(i){function t(ee){for(var G=0,M=ee.length;M--;)G+=ee.charCodeAt(M),G+=G<<10,G^=G>>6;return G+=G<<3,G^=G>>11,G+=G<<15,G}const e=console.log,s=function(ee,G){if(!ee)throw G};function r(ee,G){if(!ee)return 0;var M=ee.toString().split(".");return M.length>1?parseInt(M[0],G)+parseInt(M[1],G)/Math.pow(G,M[1].length):parseInt(M[0],G)}let n=[" ",` -`," ","\r"],a={r:"\r",n:` -`,t:" ",'"':'"',"'":"'","\\":"\\"};const o=new Proxy(a,{get(ee,G){return r(G)}});let l=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","_","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],h=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","_","a","b","c","d","e","f","g","t","u","v","w","h","i","j","k","l","m","n","o","p","q","r","s","x","y","z"],u=["0","1","2","3","4","5","6","7","8","9"],b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","A","B","C","D","E","F"],P=["0","1"],I=["+","-","*",")",";","/","^","%","#",",","{","}",":","[","]","(",".","`"],A=["~","=",">","<"],j=["+","-","*","/","^","..","%","//"],H=["+=","-=","*=","/=","^=","..=","%=","//="],D=["and","break","do","else","elseif","end","false","for","function","goto","if","in","local","nil","not","or","repeat","return","then","true","until","while","continue"],B=["else","elseif","until","end"],ie=["-","not","#","~"],W=["+","-","*","/","%","^","#","//","&","|","~","<<",">>","..",".",":",">","<","<=",">=","~=","==","+=","-=","*=","/=","%=","^=","..=","//=","and","or"],k=11,me={"^":[13,12],"%":[10,10],"//":[10,10],"/":[10,10],"*":[10,10],"+":[9,9],"-":[9,9],"..":[8,7],">>":[7,7],"<<":[7,7],"&":[6,6],"~":[5,5],"|":[4,4],"==":[3,3],"~=":[3,3],">=":[3,3],"<=":[3,3],">":[3,3],"<":[3,3],"+=":[3,3],"-=":[3,3],"*=":[3,3],"/=":[3,3],"^=":[3,3],"%=":[3,3],"..=":[3,3],"//=":[3,3],and:[2,2],or:[1,1]};function De(ee){let G=0,M=ee.length,O=[];function R(c){return c=c||0,G<=M?ee.substr(G+c,1):""}function V(){if(G<=M){let c=ee.substr(G,1);return G++,c}else return""}function f(c){let p=0,y=1,x=1;for(;p<=G;)ee.substr(p,1)==` -`?(y++,x=1):x++;let w;for(w=0;w`)}throw`file<${y}:${x}>: ${c}`}function U(c){for(;;){let p=V();if(p=="")f("Unfinished long string.");else if(p=="]"){let y=!0,x;for(x=1;x<=c;x++)if(R()=="=")G++;else{y=!1;break}if(y&&V()=="]")return}}}function $(){let c=G;for(;R()=="=";)G++;if(R()=="[")return G++,G-c-1;G=c}let F=0,d=0;function T(c){let p=ee.substr(d,G-d),y=null;c=="Number"&&(p.substr(0,2).toLowerCase()=="0x"?(y="hex",parseInt(p,16)<999999999999&&(p=parseInt(p,16))):p.substr(0,2).toLowerCase()=="0b"&&(y="bin",parseInt(p.substr(2),2)<999999999999&&(p=parseInt(p.substr(2),2))));let x={Type:c,LeadingWhite:ee.substr(F,d-F),Source:p};return y!==null&&(x.NType=y),O.push(x),F=G,d=G,x}for(;;){for(F=G;;){let p=R();if(p=="")break;if(p=="-")if(R(1)=="-")if(G+=2,R()=="["){G++;let y=$();if(y!=null)U(y),F=G;else for(;;){let x=V();if(x==""||x==` -`)break}}else for(;;){let y=V();if(y==""||y==` -`)break}else break;else if(n.includes(p))G++;else break}ee.substr(F,G-F),d=G;let c=V();if(c==""){T("Eof");break}else if(c=="'"||c=='"'){for(;;){let p=V();if(p=="\\"){let y=V();if(o[y]==null)throw`Invalid Escape Sequence \`${y}\`.`}else{if(p==c)break;if(p=="")throw"Unfinished string!"}}T("String")}else if(c=="`"){for(;;){let p=V();if(p=="\\"){let y=V();if(o[y]==null)throw`Invalid Escape Sequence \`${y}\`.`}else{if(p==c)break;if(p=="")throw"Unfinished string!"}}T("Hash")}else if(l.includes(c)){for(;h.includes(R());)G++;D.includes(ee.substr(d,G-d))?T("Keyword"):T("Ident")}else if(u.includes(c)||c=="."&&u.includes(R())){if(c=="0"&&R().toLowerCase()=="x")for(G++;b.includes(R())||R()==="_";)G++;else if(c=="0"&&R().toLowerCase()=="b")for(G++;P.includes(R())||R()==="_";)G++;else{for(;u.includes(R())||R()==="_";)G++;if(R()==".")for(G++;u.includes(R());)G++;if(R()=="e"||R()=="E")for(G++,(R()=="-"||R()=="+")&&G++;u.includes(R());)G++}T("Number")}else if(c=="["){let p=$();p!=null?(U(p),T("String")):T("Symbol")}else if(c==".")R()=="."&&(V(),(R()=="."||R()=="=")&&V()),T("Symbol");else if(c+R()=="//")V(),R()=="="&&V(),T("Symbol");else if(c+R()=="::")V(),T("Symbol");else if(W.includes(c+R()))V(),T("Symbol");else if(A.includes(c))R()=="="&&G++,T("Symbol");else if(j.includes(c)&&R()=="=")V(),T("Symbol");else if(I.includes(c))T("Symbol");else throw`Bad symbol \`${c}\` in source. ${G}`}return O}function g(ee){let G=De(ee),M=0;function O(){let te=G[M];return M at: ${V(te)}`}function U(){let te=R();return te.Type=="Eof"||te.Type=="Keyword"&&B.includes(te.Source)}function $(){return ie.includes(R().Source)||!1}function F(){return W.includes(R().Source)||!1}function d(te,ae){let Y=R();if(Y.Type==te&&(ae==null||Y.Source==ae))return O();{let z;for(z=-3;z<=3;z++)e(`Tokens[${z}] = \`${R(z).Source}\``);throw ae?`${V(Y)}: \`${ae}\` expected.`:`${V(Y)}: ${te} expected.`}}function T(te){let ae=te.GetFirstToken,Y=te.GetLastToken,z=te;return te.GetFirstToken=function(){let ce=ae(z);return s(ce),ce},te.GetLastToken=function(){let ce=Y(z);return s(ce),ce},te}let c,p;function y(te,ae){let Y=[p(te,ae)],z=[];for(;R().Source==",";)z.push(O()),Y.push(p(te,ae));return[Y,z]}function x(te,ae){var z,ce,Pe,xe;let Y=R();if(Y.Source=="("){let we=O(),_e=p(te,ae),et=d("Symbol",")"),ze;return ze=T({Type:"ParenExpr",Expression:_e,Token_OpenParen:we,Token_CloseParen:et,GetFirstToken:()=>ze.Token_OpenParen,GetLastToken:()=>ze.Token_CloseParen}),ze}else if(Y.Type=="Ident"){let we;return we=T({Type:"VariableExpr",Token:O(),GetFirstToken:()=>we.Token,GetLastToken:()=>we.Token}),te[we.Token.Source]!=null&&((ce=(z=te[we.Token.Source])==null?void 0:z.Tokens)==null?void 0:ce.push)!=null?(te[we.Token.Source].Tokens.push(we.Token),te[we.Token.Source].UseCountIncrease()):ae[we.Token.Source]!=null&&((xe=(Pe=ae[we.Token.Source])==null?void 0:Pe.Tokens)==null?void 0:xe.push)!=null&&(ae[we.Token.Source].Tokens.push(we.Token),ae[we.Token.Source].UseCountIncrease()),we}else throw e(f()),`${V(Y)}: Unexpected symbol. ${Y.Type} ${Y.Source}`}function w(te,ae){let Y=d("Symbol","{"),z=[],ce=[];for(;R().Source!="}";){if(R().Source=="["){let we=O(),_e=p(te,ae),et=d("Symbol","]"),ze=d("Symbol","="),qe=p(te,ae);_e.Token&&_e.Token.Source,z.push({EntryType:"Index",Index:_e,Value:qe,Token_OpenBracket:we,Token_CloseBracket:et,Token_Equals:ze})}else if(R().Type=="Ident"&&R(1).Source=="="){let we=O(),_e=O(),et=p(te,ae);z.push({EntryType:"Field",Field:we,Value:et,Token_Equals:_e})}else{let we=p(te,ae);z.push({EntryType:"Value",Value:we})}if(R().Source==","||R().Source==";")ce.push(O());else break}let Pe=d("Symbol","}"),xe;return xe=T({Type:"TableLiteral",EntryList:z,Token_SeperatorList:ce,Token_OpenBrace:Y,Token_CloseBrace:Pe,GetFirstToken:()=>xe.Token_OpenBrace,GetLastToken:()=>xe.Token_CloseBrace}),xe}function X(te,ae){let Y=[],z=[];if(R().Type=="Ident"){let ce=O();if(ae&&R().Source=="<"&&R(2).Source==">"){let Pe=R(1).Source;ce.Attribute={LeadingWhite:R().LeadingWhite,Source:`<${Pe}>`},O(),O(),O()}Y.push(ce)}else if(R().Source=="..."&&te)return[Y,z,O()];for(;R().Source==",";){if(z.push(O()),R().Source=="..."&&te)return[Y,z,O()];{let ce=d("Ident");if(ae&&R().Source=="<"&&R(2).Source==">"){let Pe=R(1).Source;ce.Attribute={LeadingWhite:R().LeadingWhite,Source:`<${Pe}>`},O(),O(),O()}Y.push(ce)}}return[Y,z]}function K(te,ae,Y){let z=c(ae,Y),ce=R();if(ce.Type=="Keyword"&&ce.Source==te)return O(),[z,ce];throw e(ce.Type,ce.Source),`${V(ce)}: ${te} expected.`}function J(te,ae,Y,z){let ce=O(),Pe,xe;if(!te){Pe=[],xe=[];let Nt=d("Ident");for(Pe.push(Nt);R().Source==".";)xe.push(O()),Pe.push(d("Ident"));R().Source==":"&&(xe.push(O()),Pe.push(d("Ident")))}let we=d("Symbol","("),[_e,et,ze]=X(!0),qe=d("Symbol",")"),[us,Rs]=K("end",ae,Y),Ve;return Ve=T({Type:te==!0?"FunctionLiteral":"FunctionStat",NameChain:Pe,ArgList:_e,Body:us,Token_Function:ce,Token_NameChainSeperator:xe,Token_OpenParen:we,Token_Varg:ze,Token_ArgCommaList:et,Token_CloseParen:qe,Token_End:Rs,GetFirstToken:()=>Ve.Token_Function,GetLastToken:()=>Ve.Token_End}),Ve}function Ee(te,ae){let Y=R();if(Y.Source=="("){let z=O(),ce=[],Pe=[];for(;R().Source!=")"&&(ce.push(p(te,ae)),R().Source==",");)Pe.push(O());let xe=d("Symbol",")"),we;return we=T({CallType:"ArgCall",ArgList:ce,Token_CommaList:Pe,Token_OpenParen:z,Token_CloseParen:xe,GetFirstToken:()=>we.Token_OpenParen,GetLastToken:()=>we.Token_CloseParen}),we}else if(Y.Source=="{"){let z;return z=T({CallType:"TableCall",TableExpr:p(te,ae),GetFirstToken:()=>z.TableExpr.GetFirstToken(),GetLastToken:()=>z.TableExpr.GetLastToken()}),z}else if(Y.Type=="String"){let z;return z=T({CallType:"StringCall",Token:O(),GetFirstToken:()=>z.Token,GetLastToken:()=>z.Token}),z}else throw"Function arguments expected."}function ne(te,ae){let Y=x(te,ae);for(s(Y,"nil prefixexpr");;){let z=R();if(z.Source=="."){let ce=O(),Pe=d("Ident"),xe;xe=T({Type:"FieldExpr",Base:Y,Field:Pe,Token_Dot:ce,GetFirstToken:()=>xe.Base.GetFirstToken(),GetLastToken:()=>xe.Field}),Y=xe}else if(z.Source==":"){let ce=O(),Pe=d("Ident"),xe=Ee(te,ae),we;we=T({Type:"MethodExpr",Base:Y,Method:Pe,FunctionArguments:xe,Token_Colon:ce,GetFirstToken:()=>we.Base.GetFirstToken(),GetLastToken:()=>we.FunctionArguments.GetLastToken()}),Y=we}else if(z.Source=="["){let ce=O(),Pe=p(te,ae),xe=d("Symbol","]"),we;we=T({Type:"IndexExpr",Base:Y,Index:Pe,Token_OpenBracket:ce,Token_CloseBracket:xe,GetFirstToken:()=>we.Base.GetFirstToken(),GetLastToken:()=>we.Token_CloseBracket}),Y=we}else if(z.Source=="{"||z.Source=="("||z.Type=="String"){let ce;ce=T({Type:"CallExpr",Base:Y,FunctionArguments:Ee(te,ae),GetFirstToken:()=>ce.Base.GetFirstToken(),GetLastToken:()=>ce.FunctionArguments.GetLastToken()}),Y=ce}else if(H.includes(z.Source)){let ce=O(),Pe=p(te,ae),xe;xe=T({Type:"CompoundStat",Base:Y,Token_Compound:ce,Rhs:Pe,Lhs:Y,GetFirstToken:()=>xe.Base.GetFirstToken(),GetLastToken:()=>xe.Rhs.GetLastToken()}),Y=xe}else return Y}}function oe(te,ae){let Y=R();if(Y.Type=="Number"){let z;return z=T({Type:"NumberLiteral",Token:O(),GetFirstToken:()=>z.Token,GetLastToken:()=>z.Token}),z}else if(Y.Type=="String"){let z;return z=T({Type:"StringLiteral",Token:O(),GetFirstToken:()=>z.Token,GetLastToken:()=>z.Token}),z}else if(Y.Type=="Hash"){let z;return z=T({Type:"HashLiteral",Token:O(),GetFirstToken:()=>z.Token,GetLastToken:()=>z.Token}),z}else if(Y.Source=="nil"){let z;return z=T({Type:"NilLiteral",Token:O(),GetFirstToken:()=>z.Token,GetLastToken:()=>z.Token}),z}else if(Y.Source=="true"||Y.Source=="false"){let z;return z=T({Type:"BooleanLiteral",Token:O(),GetFirstToken:()=>z.Token,GetLastToken:()=>z.Token}),z}else if(Y.Source=="..."){let z;return z=T({Type:"VargLiteral",Token:O(),GetFirstToken:()=>z.Token,GetLastToken:()=>z.Token}),z}else return Y.Source=="{"?w(te,ae):Y.Source=="function"?J(!0,te,ae):ne(te,ae)}function be(te,ae,Y){let z;if($()){let ce=O(),Pe=be(k,ae,Y),xe;xe=T({Type:"UnopExpr",Token_Op:ce,Rhs:Pe,GetFirstToken:()=>xe.Token_Op,GetLastToken:()=>xe.Rhs.GetLastToken()}),z=xe}else z=oe(ae,Y),s(z,"nil sipleexpr");for(;F()&&me[R().Source]!=null&&me[R().Source][0]>te;){let ce=O(),Pe=be(me[ce.Source][1],ae,Y);s(Pe,"RhsNeeded");let xe;xe=T({Type:"BinopExpr",Lhs:z,Rhs:Pe,Token_Op:ce,GetFirstToken:()=>xe.Lhs.GetFirstToken(),GetLastToken:()=>xe.Rhs.GetLastToken()}),z=xe}return z}p=(te,ae)=>be(0,te,ae);function se(te,ae){let Y=ne(te,ae);if(Y.Type=="MethodExpr"||Y.Type=="CallExpr"){let z;return z=T({Type:"CallExprStat",Expression:Y,GetFirstToken:()=>z.Expression.GetFirstToken(),GetLastToken:()=>z.Expression.GetLastToken()}),z}else{if(Y.Type=="CompoundStat")return Y;{let z=[Y],ce=[];for(;R().Source==",";){ce.push(O());let et=ne(te,ae);if(et.Type=="MethodExpr"||et.Type=="CallExpr")throw"Bad left hand side of asignment";z.push(et)}let Pe=d("Symbol","="),xe=[p(te,ae)],we=[];for(;R().Source==",";)we.push(O()),xe.push(p(te,ae));let _e;return _e=T({Type:"AssignmentStat",Rhs:xe,Lhs:z,Token_Equals:Pe,Token_LhsSeperatorList:ce,Token_RhsSeperatorList:we,GetFirstToken:()=>_e.Lhs[0].GetFirstToken(),GetLastToken:()=>_e.Rhs[_e.Rhs.length-1].GetLastToken()}),_e}}}function ue(te,ae){let Y=O(),z=p(te,ae),ce=d("Keyword","then"),Pe=c(te,ae),xe=[];for(;R().Source=="elseif"||R().Source=="else";){let et=O(),ze,qe;et.Source=="elseif"&&(ze=p(te,ae),qe=d("Keyword","then"));let us=c(te,ae);if(xe.push({Condition:ze,Body:us,ClauseType:et.Source,Token:et,Token_Then:qe}),et.Source=="else")break}let we=d("Keyword","end"),_e;return _e=T({Type:"IfStat",Condition:z,Body:Pe,ElseClauseList:xe,Token_If:Y,Token_Then:ce,Token_End:we,GetFirstToken:()=>_e.Token_If,GetLastToken:()=>_e.Token_End}),_e}function ye(te,ae){let Y=O(),[z,ce]=K("end",te,ae),Pe;return Pe=T({Type:"DoStat",Body:z,Token_Do:Y,Token_End:ce,GetFirstToken:()=>Pe.Token_Do,GetLastToken:()=>Pe.Token_End}),Pe}function Le(te,ae){let Y=O(),z=p(te,ae),ce=d("Keyword","do"),[Pe,xe]=K("end",te,ae),we;return we=T({Type:"WhileStat",Condition:z,Body:Pe,Token_While:Y,Token_Do:ce,Token_End:xe,GetFirstToken:()=>we.Token_While,GetLastToken:()=>we.Token_End}),we}function Ne(te,ae){let Y=O(),[z,ce]=X();if(R().Source=="="){let Pe=O(),[xe,we]=y(te,ae);if(xe.length<2||xe.length>3)throw"Expected 2 or 3 values for range bounds";let _e=d("Keyword","do"),[et,ze]=K("end",te,ae),qe;return qe=T({Type:"NumericForStat",VarList:z,RangeList:xe,Body:et,Token_For:Y,Token_VarCommaList:ce,Token_Equals:Pe,Token_RangeCommaList:we,Token_Do:_e,Token_End:ze,GetFirstToken:()=>qe.Token_For,GetLastToken:()=>qe.Token_End}),qe}else if(R().Source=="in"){let Pe=O(),[xe,we]=y(te,ae),_e=d("Keyword","do"),[et,ze]=K("end",te,ae),qe;return qe=T({Type:"GenericForStat",VarList:z,GeneratorList:xe,Body:et,Token_For:Y,Token_VarCommaList:ce,Token_In:Pe,Token_GeneratorCommaList:we,Token_Do:_e,Token_End:ze,GetFirstToken:()=>qe.Token_For,GetLastToken:()=>qe.Token_End}),qe}}function je(te,ae){let Y=O(),[z,ce]=K("until",te),Pe=p(te,ae),xe;return xe=T({Type:"RepeatStat",Body:z,Condition:Pe,Token_Repeat:Y,Token_Until:ce,GetFirstToken:()=>xe.Token_Repeat,GetLastToken:()=>xe.Condition.GetLastToken()}),xe}function it(te,ae){let Y=O();if(R().Source=="function"){let z=J(!1,te,ae);if(z.NameChain.length>1)throw V(z.Token_NameChainSeperator[0])+": `(` expected.";let ce;return ce=T({Type:"LocalFunctionStat",FunctionStat:z,Token_Local:Y,GetFirstToken:()=>ce.Token_Local,GetLastToken:()=>ce.FunctionStat.GetLastToken()}),ce}else if(R().Type=="Ident"){let[z,ce]=X(!1,!0),Pe=[],xe=[],we;if(R().Source=="="){we=O();let[et,ze]=y(te,ae);Pe=et,xe=ze}let _e;return _e=T({Type:"LocalVarStat",VarList:z,ExprList:Pe,Token_Local:Y,Token_Equals:we,Token_VarCommaList:ce,Token_ExprCommaList:xe,GetFirstToken:()=>_e.Token_Local,GetLastToken:function(){return _e.ExprList.length>0?_e.ExprList[_e.ExprList.length-1].GetLastToken():_e.VarList[_e.VarList.length-1]}}),_e}else throw"`function` or ident expected"}function mt(te,ae){let Y=O(),z,ce;U()||R().Source==";"?(z=[],ce=[]):[z,ce]=y(te,ae);let Pe;return Pe={Type:"ReturnStat",ExprList:z,Token_Return:Y,Token_CommaList:ce,GetFirstToken:()=>Pe.Token_Return,GetLastToken:function(){return Pe.ExprList.length>0?Pe.ExprList[Pe.ExprList.length-1].GetLastToken():Pe.Token_Return}},Pe}function Wt(te,ae){let Y=O(),z;return z={Type:"BreakStat",Token_Break:Y,GetFirstToken:()=>z.Token_Break,GetLastToken:()=>z.Token_Break},z}function at(te,ae){let Y=O(),z;return z={Type:"ContinueStat",Token_Continue:Y,GetFirstToken:()=>z.Token_Continue,GetLastToken:()=>z.Token_Continue},z}function Qe(){let te=O(),ae;R().Type=="Keyword"?ae=d("Keyword"):ae=d("Ident");let Y;return Y={Type:"GotoStat",Token_Goto:te,Token_Label:ae,GetFirstToken:()=>Y.Token_Goto,GetLastToken:()=>Y.Token_Label},Y}function rt(){let te=O(),ae;R().Type=="Keyword"?ae=d("Keyword"):ae=d("Ident");let Y=d("Symbol","::"),z;return z={Type:"LabelStat",Token_ColonsLeft:te,Token_Label:ae,Token_ColonsRight:Y,GetFirstToken:()=>z.Token_ColonsLeft,GetLastToken:()=>z.Token_ColonsRight},z}function Ft(te,ae){let Y=R();return Y.Source=="if"?[!1,ue(te,ae)]:Y.Source=="while"?[!1,Le(te,ae)]:Y.Source=="do"?[!1,ye(te,ae)]:Y.Source=="for"?[!1,Ne(te,ae)]:Y.Source=="repeat"?[!1,je(te,ae)]:Y.Source=="function"?[!1,J(!1,te,ae)]:Y.Source=="local"?[!1,it(te,ae)]:Y.Source=="return"?[!0,mt(te,ae)]:Y.Source=="break"?[!0,Wt()]:Y.Source=="continue"?[!0,at()]:Y.Source=="goto"?[!1,Qe()]:Y.Source=="::"?[!1,rt()]:[!1,se(te,ae)]}return c=function(te,ae){let Y=[],z=[],ce={},Pe={};if(ae!=null)for(let[ze,qe]of Object.entries(ae))Pe[ze]=qe;if(te!=null)for(let[ze,qe]of Object.entries(te))Pe[ze]=qe;let xe,we=0;for(;!U();){xe&&xe==R()&&e(`INFINITE LOOP POSSIBLE ON STATEMENT ${xe.Source} :`,xe),xe=R();let[ze,qe]=Ft(ce,Pe);if(qe)switch(Y.push(qe),qe.Type){case"LocalVarStat":qe.VarList.forEach(Ve=>{Ve.UseCount=0,Ve.Number=we++,ce[Ve.Source]=Ve;let Nt=[];function Kt(){Ve.UseCount++,Nt.forEach(yt=>{yt.UseCount=Ve.UseCount})}Ve.Tokens={},Ve.Tokens.push=yt=>{yt.UseCountIncrease=Kt,yt.UseCount=Ve.UseCount,yt.Tokens=Ve.Tokens,Nt.push(yt)},Ve.Tokens.get=()=>Nt,Ve.UseCountIncrease=Kt});break;case"LocalFunctionStat":let Rs=qe.FunctionStat.NameChain;if(Rs.length===1){let Kt=function(){Ve.UseCount++,Nt.forEach(yt=>{yt.UseCount=Ve.UseCount})};var et=Kt;let Ve=Rs[0];Ve.UseCount=0,Ve.Number=we++,ce[Ve.Source]=Ve;let Nt=[];Ve.Tokens={},Ve.Tokens.push=yt=>{yt.UseCountIncrease=Kt,yt.UseCount=Ve.UseCount,yt.Tokens=Ve.Tokens,Nt.push(yt)},Ve.Tokens.get=()=>Nt,Ve.UseCountIncrease=Kt}break}let us=R();us.Type=="Symbol"&&us.Source==";"&&(z[Y.length-1]=O())}let _e;return _e={Type:"StatList",StatementList:Y,SemicolonList:z,GetFirstToken:function(){var ze;if(_e.StatementList.length!=0)return(ze=_e.StatementList[0])==null?void 0:ze.GetFirstToken()},GetLastToken:function(){if(_e.StatementList.length!=0)return _e.SemicolonList[_e.StatementList.length-1]?_e.SemicolonList[_e.StatementList.length-1]:_e.StatementList[_e.StatementList.length-1].GetLastToken()}},_e},c([],[])}function he(ee,G){let M={BinopExpr:!0,UnopExpr:!0,NumberLiteral:!0,StringLiteral:!0,NilLiteral:!0,BooleanLiteral:!0,VargLiteral:!0,HashLiteral:!0,FieldExpr:!0,IndexExpr:!0,MethodExpr:!0,CallExpr:!0,FunctionLiteral:!0,VariableExpr:!0,ParenExpr:!0,TableLiteral:!0},O={StatList:!0,BreakStat:!0,ContinueStat:!0,LabelStat:!0,GotoStat:!0,ReturnStat:!0,LocalVarStat:!0,LocalFunctionStat:!0,FunctionStat:!0,RepeatStat:!0,GenericForStat:!0,NumericForStat:!0,WhileStat:!0,DoStat:!0,IfStat:!0,CallExprStat:!0,AssignmentStat:!0,CompoundStat:!0};for(var[R,V]of Object.entries(G))if(!O[R]&&!M[R])throw`Invalid visitor target: \`${R}\``;function f(d){if(d!=null){let T=G[d.Type];if(typeof T=="function")return T(d);if(T&&T.Pre)return T.Pre(d)}}function U(d){let T=G[d.Type];if(T&&typeof T=="object"&&T.Post)return T.Post(d)}let $,F;$=function(d){if(!f(d)){if(d.Type=="BinopExpr")$(d.Lhs),$(d.Rhs);else if(d.Type=="UnopExpr")$(d.Rhs);else if(!(d.Type=="NumberLiteral"||d.Type=="StringLiteral"||d.Type=="NilLiteral"||d.Type=="BooleanLiteral"||d.Type=="VargLiteral"||d.Type=="HashLiteral")){if(d.Type=="FieldExpr")$(d.Base);else if(d.Type=="IndexExpr")$(d.Base),$(d.Index);else if(d.Type=="MethodExpr"||d.Type=="CallExpr")$(d.Base),d.FunctionArguments.CallType=="ArgCall"?d.FunctionArguments.ArgList.forEach((T,c)=>{$(T)}):d.FunctionArguments.CallType=="TableCall"&&$(d.FunctionArguments.TableExpr);else if(d.Type=="FunctionLiteral")F(d.Body);else if(d.Type!="VariableExpr")if(d.Type=="ParenExpr")$(d.Expression);else if(d.Type=="TableLiteral")d.EntryList.forEach((T,c)=>{if(T.EntryType=="Field")$(T.Value);else if(T.EntryType=="Index")$(T.Index),$(T.Value);else if(T.EntryType=="Value")$(T.Value);else throw"unreachable"});else if(d.Type=="CompoundStat")$(d.Lhs),$(d.Rhs);else throw`unreachable, type: ${d.Type}: ${d}`}U(d)}},F=function(d){if(!f(d)){if(d.Type=="StatList")d.StatementList.forEach((T,c)=>{if(T!=null){if(T===null||T.Type===null)return;T.Remove=()=>{d.StatementList[c]=null},F(T)}});else if(d.Type!="BreakStat"){if(d.Type!="ContinueStat"){if(d.Type!="GotoStat"){if(d.Type!="LabelStat")if(d.Type=="ReturnStat")d.ExprList.forEach((T,c)=>{$(T)});else if(d.Type=="LocalVarStat")d.Token_Equals&&d.ExprList.forEach((T,c)=>{$(T)});else if(d.Type=="LocalFunctionStat")F(d.FunctionStat.Body);else if(d.Type=="FunctionStat")F(d.Body);else if(d.Type=="RepeatStat")F(d.Body),$(d.Condition);else if(d.Type=="GenericForStat")d.GeneratorList.forEach((T,c)=>{$(T)}),F(d.Body);else if(d.Type=="NumericForStat")d.RangeList.forEach((T,c)=>{$(T)}),F(d.Body);else if(d.Type=="WhileStat")$(d.Condition),F(d.Body);else if(d.Type=="DoStat")F(d.Body);else if(d.Type=="IfStat")$(d.Condition),F(d.Body),d.ElseClauseList.forEach(T=>{T.Condition!=null&&$(T.Condition),F(T.Body)});else if(d.Type=="CallExprStat")$(d.Expression);else if(d.Type=="CompoundStat")$(d.Lhs),$(d.Rhs);else if(d.Type=="AssignmentStat")d.Lhs.forEach(T=>{$(T)}),d.Rhs.forEach(T=>{$(T)});else throw"unreachable"}}}U(d)}},O[ee.Type]?F(ee):$(ee)}function fe(ee){let G=[],M,O=0;function R(){return O++,O}function V(){M={ParentScope:M,ChildScopeList:[],VariableList:[],BeginLocation:R(),Depth:null,GetVar:null},M.ParentScope?(M.Depth=M.ParentScope.Depth+1,M.ParentScope.ChildScopeList.push(M)):M.Depth=1;let p=M;M.GetVar=function(y){for(const x of p.VariableList)if(x.Name==y)return x;if(p.ParentScope)return p.ParentScope.GetVar(y);for(const x of G)if(x.Name==y)return x}}function f(){let p=M;return p.EndLocation=R(),p.VariableList.forEach(y=>{y.ScopeEndLocation=p.EndLocation}),M=p.ParentScope,p}V();function U(p,y,x){s(x,"MIssing localInfo"),s(p,"Missing local var name");let w={Type:"Local",Name:p,RenameList:[y],AssignedTo:!1,Info:x,Scope:M,BeginLocation:R(),EndLocation:R(),ReferenceLocationList:[R()]};return w.Rename=function(X){w.Name=X,w.RenameList.forEach(K=>{K(X)})},M.VariableList.push(w),w}function $(p){for(const x of G)if(x.Name==p)return x;let y={Type:"Global",Name:p,RenameList:[],AssignedTo:!1,Scope:null,BeginLocation:R(),EndLocation:R(),ReferenceLocationList:[]};return y.Rename=function(x){y.Name=x,y.RenameList.forEach(w=>{w(x)})},G.push(y),y}function F(p,y){s(p,"Missing var name");let x=$(p);return x.RenameList.push(y),x}function d(p,y){let x;for(x=p.VariableList.length-1;x>=0;x--)if(p.VariableList[x].Name==y)return p.VariableList[x];if(p.ParentScope){let w=d(p.ParentScope,y);if(w)return w}}function T(p,y){s(p,"Missing var name");let x=d(M,p);x?x.RenameList.push(y):x=F(p,y);let w=R();return x.EndLocation=w,x.ReferenceLocationList.push(x.EndLocation),x}let c={};return c.FunctionLiteral={Pre:function(p){V(),p.ArgList.forEach((y,x)=>{let w=U(y.Source,function(X,K){K||(y.Source=X)},{Type:"Argument",Index:x});y.var=w})},Post:function(p){f()}},c.VariableExpr=function(p){p.Variable=T(p.Token.Source,function(y){p.Token.Source=y})},c.StatList={Pre:function(p){V()},Post:function(p){p.SkipPop||f()}},c.LocalVarStat={Post:function(p){p.VarList.forEach((y,x)=>{U(y.Source,function(w){p.VarList[x].Source=w},{Type:"Local"})})}},c.LocalFunctionStat={Pre:function(p){U(p.FunctionStat.NameChain[0].Source,function(y){p.FunctionStat.NameChain[0].Source=y},{Type:"LocalFunction"}),V(),p.FunctionStat.ArgList.forEach((y,x)=>{U(y.Source,function(w){y.Source=w},{Type:"Argument",Index:x})})},Post:function(){f()}},c.FunctionStat={Pre:function(p){let y=p.NameChain,x;y.length==1?d(M,y[0].Source)?x=T(y[0].Source,function(w){y[0].Source=w}):x=F(y[0].Source,function(w){y[0].Source=w}):x=T(y[0].Source,function(w){y[0].Source=w}),x.AssignedTo=!0,V(),p.ArgList.forEach((w,X)=>{U(w.Source,function(K){w.Source=K},{Type:"Argument",Index:X})})},Post:function(){f()}},c.GenericForStat={Pre:function(p){return p.GeneratorList.forEach(y=>{he(y,c)}),V(),p.VarList.forEach((y,x)=>{U(y.Source,function(w){y.Source=w},{Type:"ForRange",Index:x})}),he(p.Body,c),f(),!0}},c.NumericForStat={Pre:function(p){return p.RangeList.forEach(y=>{he(y,c)}),V(),p.VarList.forEach((y,x)=>{U(y.Source,function(w){y.Source=w},{Type:"ForRange",Index:x})}),he(p.Body,c),f(),!0}},c.RepeatStat={Pre:function(p){p.Body.SkipPop=!0},Post:function(p){f()}},c.AssignmentStat={Post:function(p){p.Lhs.forEach(y=>{y.Variable!=null&&(y.Variable.AssignedTo=!0)})}},he(ee,c),[G,f()]}function S(ee){let G,M,O="",R=f=>typeof(f==null?void 0:f.LeadingWhite)!="string"?" ":f.LeadingWhite;function V(f){if(f.LeadingWhite==null||f.Source==null)throw`Bad token: tk=${f} | lwhite=${f.LeadingWhite} | source=${f.Source}`;O=`${O}${f.LeadingWhite}${f.Source}`}return M=function(f){if(f.Type=="BinopExpr")M(f.Lhs),V(f.Token_Op),M(f.Rhs);else if(f.Type=="UnopExpr")V(f.Token_Op),M(f.Rhs);else if(f.Type=="NumberLiteral"||f.Type=="StringLiteral"||f.Type=="NilLiteral"||f.Type=="BooleanLiteral"||f.Type=="VargLiteral"||f.Type=="HashLiteral")V(f.Token);else if(f.Type=="FieldExpr")M(f.Base),V(f.Token_Dot),V(f.Field);else if(f.Type=="IndexExpr")M(f.Base),V(f.Token_OpenBracket),M(f.Index),V(f.Token_CloseBracket);else if(f.Type=="MethodExpr"||f.Type=="CallExpr")M(f.Base),f.Type=="MethodExpr"&&(V(f.Token_Colon),V(f.Method)),f.FunctionArguments.CallType=="StringCall"?V(f.FunctionArguments.Token):f.FunctionArguments.CallType=="ArgCall"?(V(f.FunctionArguments.Token_OpenParen),f.FunctionArguments.ArgList.forEach((U,$)=>{M(U);let F=f.FunctionArguments.Token_CommaList[$];F!=null&&V(F)}),V(f.FunctionArguments.Token_CloseParen)):f.FunctionArguments.CallType=="TableCall"&&M(f.FunctionArguments.TableExpr);else if(f.Type=="FunctionLiteral")V(f.Token_Function),V(f.Token_OpenParen),f.ArgList.forEach((U,$)=>{V(U);let F=f.Token_ArgCommaList[$];F!=null&&V(F)}),f.Token_Varg!=null&&V(f.Token_Varg),V(f.Token_CloseParen),G(f.Body),V(f.Token_End);else if(f.Type=="VariableExpr")V(f.Token);else if(f.Type=="ParenExpr")V(f.Token_OpenParen),M(f.Expression),V(f.Token_CloseParen);else if(f.Type=="TableLiteral")V(f.Token_OpenBrace),f.EntryList.forEach((U,$)=>{if(U.EntryType=="Field")V(U.Field),V(U.Token_Equals),M(U.Value);else if(U.EntryType=="Index")V(U.Token_OpenBracket),M(U.Index),V(U.Token_CloseBracket),V(U.Token_Equals),M(U.Value);else if(U.EntryType=="Value")M(U.Value);else throw"unreachable";let F=f.Token_SeperatorList[$];F!=null&&V(F)}),V(f.Token_CloseBrace);else if(f.Type=="CompoundStat")G(f);else throw`unreachable, type: ${f.Type}: ${f}`},G=function(f){if(f==null)throw`STAT IS NIL! ${f}`;if(!(f.Type==="StatList"&&f.StatementList.length===0)){if(f.WrapInDo){let U=R(f.GetFirstToken());f.GetFirstToken().LeadingWhite="",O+=`${U}do `}f.Type=="StatList"?f.StatementList.forEach((U,$)=>{U===null||U.Type===null||(U.Remove=()=>{f.StatementList[$]=null},G(U),f.SemicolonList[$]&&V(f.SemicolonList[$]))}):f.Type=="BreakStat"?V(f.Token_Break):f.Type=="ContinueStat"?V(f.Token_Continue):f.Type=="GotoStat"?(V(f.Token_Goto),V(f.Token_Label)):f.Type=="LabelStat"?(V(f.Token_ColonsLeft),V(f.Token_Label),V(f.Token_ColonsRight)):f.Type=="ReturnStat"?(V(f.Token_Return),f.ExprList.forEach((U,$)=>{M(U),f.Token_CommaList[$]&&V(f.Token_CommaList[$])})):f.Type=="LocalVarStat"?(V(f.Token_Local),f.VarList.forEach((U,$)=>{V(U),U.Attribute!=null&&V(U.Attribute);let F=f.Token_VarCommaList[$];F!=null&&V(F)}),f.Token_Equals!=null&&(V(f.Token_Equals),f.ExprList.forEach((U,$)=>{M(U);let F=f.Token_ExprCommaList[$];F!=null&&V(F)}))):f.Type=="LocalFunctionStat"?(V(f.Token_Local),V(f.FunctionStat.Token_Function),V(f.FunctionStat.NameChain[0]),V(f.FunctionStat.Token_OpenParen),f.FunctionStat.ArgList.forEach((U,$)=>{V(U);let F=f.FunctionStat.Token_ArgCommaList[$];F!=null&&V(F)}),f.FunctionStat.Token_Varg&&V(f.FunctionStat.Token_Varg),V(f.FunctionStat.Token_CloseParen),G(f.FunctionStat.Body),V(f.FunctionStat.Token_End)):f.Type=="FunctionStat"?(V(f.Token_Function),f.NameChain.forEach((U,$)=>{V(U);let F=f.Token_NameChainSeperator[$];F!=null&&V(F)}),V(f.Token_OpenParen),f.ArgList.forEach((U,$)=>{V(U);let F=f.Token_ArgCommaList[$];F!=null&&V(F)}),f.Token_Varg&&V(f.Token_Varg),V(f.Token_CloseParen),G(f.Body),V(f.Token_End)):f.Type=="RepeatStat"?(V(f.Token_Repeat),G(f.Body),V(f.Token_Until),M(f.Condition)):f.Type=="GenericForStat"?(V(f.Token_For),f.VarList.forEach((U,$)=>{V(U);let F=f.Token_VarCommaList[$];F!=null&&V(F)}),V(f.Token_In),f.GeneratorList.forEach((U,$)=>{M(U);let F=f.Token_GeneratorCommaList[$];F!=null&&V(F)}),V(f.Token_Do),G(f.Body),V(f.Token_End)):f.Type=="NumericForStat"?(V(f.Token_For),f.VarList.forEach((U,$)=>{V(U);let F=f.Token_VarCommaList[$];F!=null&&V(F)}),V(f.Token_Equals),f.RangeList.forEach((U,$)=>{M(U);let F=f.Token_RangeCommaList[$];F!=null&&V(F)}),V(f.Token_Do),G(f.Body),V(f.Token_End)):f.Type=="WhileStat"?(V(f.Token_While),M(f.Condition),V(f.Token_Do),G(f.Body),V(f.Token_End)):f.Type=="DoStat"?(V(f.Token_Do),G(f.Body),V(f.Token_End)):f.Type=="IfStat"?(V(f.Token_If),M(f.Condition),V(f.Token_Then),G(f.Body),f.ElseClauseList.forEach(U=>{V(U.Token),U.Condition!=null&&(M(U.Condition),V(U.Token_Then)),G(U.Body)}),V(f.Token_End)):f.Type=="CallExprStat"?M(f.Expression):f.Type=="CompoundStat"?(M(f.Lhs),V(f.Token_Compound),M(f.Rhs),f.Type="CompoundStat"):f.Type=="AssignmentStat"?(f.Lhs.forEach((U,$)=>{M(U);let F=f.Token_LhsSeperatorList[$];F!=null&&V(F)}),V(f.Token_Equals),f.Rhs.forEach((U,$)=>{M(U);let F=f.Token_RhsSeperatorList[$];F!=null&&V(F)})):s(!1,"unreachable"),f.WrapInDo&&(O+=" end ")}},G(ee),O}function N(ee){let G,M,O=0;function R(c){if(c===void 0)return;let p=` -${" ".repeat(O)}`;if(c.LeadingWhite==""||c.LeadingWhite.substr(-p.length,p.length)!=p){let y="",x;for(x=c.LeadingWhite.length;x>=0;x--){let w=c.LeadingWhite.substr(x,1);if(!(w==""||w.match(/\s/g))){y=c.LeadingWhite.substr(0,x+1);break}}c.LeadingWhite=`${y}${p}`}}function V(){O++}function f(){O--,s(O>=0,"Undented too far")}function U(c){return c.LeadingWhite.length>0?c.LeadingWhite.substr(0,1):c.Source.toString().substr(0,1)}function $(c){c.LeadingWhite=c.LeadingWhite.trim()}function F(c){$(c),n.includes(U(c))||(c.LeadingWhite=" "+c.LeadingWhite)}function d(c){F(c.GetFirstToken())}function T(c,p,y){V(),G(p),f(),R(y)}M=function(c){if(c.Type=="BinopExpr")M(c.Lhs),M(c.Rhs),d(c.Rhs),F(c.Token_Op);else if(c.Type=="UnopExpr")$(c.Token_Op),M(c.Rhs),c.Token_Op.Source[0]&&F(c.Rhs.GetFirstToken());else if(c.Type=="NumberLiteral"||c.Type=="StringLiteral"||c.Type=="NilLiteral"||c.Type=="BooleanLiteral"||c.Type=="VargLiteral"||c.Type=="HashLiteral")$(c.Token),c.Type=="HashLiteral"&&(c.Token.Source='"'+t(`${c.Token.Source.substring(1,c.Token.Source.length-1)}`)+'"',c.Type="StringLiteral",c.Token.Type="String");else if(c.Type=="FieldExpr")M(c.Base);else if(c.Type=="IndexExpr")M(c.Base),M(c.Index);else if(c.Type=="MethodExpr"||c.Type=="CallExpr")M(c.Base),$(c.FunctionArguments.GetFirstToken()),$(c.FunctionArguments.GetLastToken()),c.Type=="MethodExpr",c.FunctionArguments.CallType=="StringCall"||(c.FunctionArguments.CallType=="ArgCall"?c.FunctionArguments.ArgList.forEach((p,y)=>{M(p),y>0&&d(p);let x=c.FunctionArguments.Token_CommaList[y];x!=null&&$(x)}):c.FunctionArguments.CallType=="TableCall"&&M(c.FunctionArguments.TableExpr));else if(c.Type=="FunctionLiteral")c.ArgList.forEach((p,y)=>{y>0&&F(p),c.Token_ArgCommaList[y]}),c.ArgList.length>0&&c.Token_Varg!=null&&F(c.Token_Varg),T(c.Token_CloseParen,c.Body,c.Token_End);else if(c.Type!="VariableExpr")if(c.Type=="ParenExpr")$(c.Token_OpenParen),$(c.Token_CloseParen),M(c.Expression);else if(c.Type=="TableLiteral"){if(c.EntryList.length!=0){V();let p=100;c.EntryList.forEach((y,x)=>{y.EntryType=="Field"?(c.EntryList.length>p?le(y.Value):R(y.Field),F(y.Token_Equals),M(y.Value),d(y.Value)):y.EntryType=="Index"?(c.EntryList.length>p?$(y.Token_OpenBracket):R(y.Token_OpenBracket),M(y.Index),F(y.Token_Equals),M(y.Value),d(y.Value)):y.EntryType=="Value"?(M(y.Value),c.EntryList.length>p?le(y.Value):R(y.Value.GetFirstToken())):s(!1,"unreachable");let w=c.Token_SeperatorList[x];w!=null&&(c.EntryList.length>p?w.LeadingWhite="":$(w))}),f(),c.EntryList.length>p?c.Token_CloseBrace.LeadingWhite="":R(c.Token_CloseBrace)}}else if(c.Type=="CompoundStat")G(c);else throw e(c),`unreachable, type: ${c.Type}:`+c},G=function(c){if(c.Type=="StatList")c.StatementList.forEach((p,y)=>{p===null||p.Type===null||p.Type==="StatList"&&p.StatementList.length===0||(p.Remove=()=>{p.StatementList[y]=null},G(p),R(p.GetFirstToken()))});else if(c.Type!="BreakStat"){if(c.Type!="ContinueStat"){if(c.Type!="GotoStat"){if(c.Type!="LabelStat")if(c.Type=="ReturnStat")c.ExprList.forEach((p,y)=>{M(p),d(p),c.Token_CommaList[y]});else if(c.Type=="LocalVarStat"){if(c.VarList.forEach((p,y)=>{F(p),p.Attribute&&(p.Attribute.LeadingWhite=" "),c.Token_VarCommaList[y]}),c.Token_Equals){$(c.Token_Equals),F(c.Token_Equals);let p=[],y=[];c.ExprList.forEach((x,w)=>{x!=null&&(w{x!=null&&(M(x),d(x),c.Token_ExprCommaList[w]!=null&&c.ExprList.length-1==w&&(c.Token_ExprCommaList[w]=null))})}}else if(c.Type=="LocalFunctionStat")F(c.FunctionStat.Token_Function),F(c.FunctionStat.NameChain[0]),c.FunctionStat.ArgList.forEach((p,y)=>{y>0?F(p):$(p);let x=c.FunctionStat.Token_ArgCommaList[y];x&&$(x)}),c.FunctionStat.ArgList.length>0&&c.FunctionStat.Token_Varg?($(c.FunctionStat.Token_Varg),F(c.FunctionStat.Token_Varg)):c.FunctionStat.Token_Varg&&$(c.FunctionStat.Token_Varg),$(c.FunctionStat.Token_OpenParen),$(c.FunctionStat.Token_CloseParen),T(c.FunctionStat.Token_CloseParen,c.FunctionStat.Body,c.FunctionStat.Token_End);else if(c.Type=="FunctionStat")c.NameChain.forEach((p,y)=>{y==0&&F(p),c.Token_NameChainSeperator[y]}),c.ArgList.forEach((p,y)=>{y>0&&F(p),c.Token_ArgCommaList[y]}),c.ArgList.length>0&&c.Token_Varg&&F(c.Token_Varg),T(c.Token_CloseParen,c.Body,c.Token_End);else if(c.Type=="RepeatStat")T(c.Token_Repeat,c.Body,c.Token_Until),M(c.Condition),d(c.Condition);else if(c.Type=="GenericForStat")c.VarList.forEach((p,y)=>{F(p),c.Token_VarCommaList[y]}),F(c.Token_In),c.GeneratorList.forEach((p,y)=>{M(p),d(p),c.Token_GeneratorCommaList[y]}),F(c.Token_Do),T(c.Token_Do,c.Body,c.Token_End);else if(c.Type=="NumericForStat")c.VarList.forEach((p,y)=>{F(p),c.Token_VarCommaList[y]}),F(c.Token_Equals),c.RangeList.forEach((p,y)=>{M(p),d(p),c.Token_RangeCommaList[y]}),F(c.Token_Do),T(c.Token_Do,c.Body,c.Token_End);else if(c.Type=="WhileStat")M(c.Condition),d(c.Condition),F(c.Token_Do),T(c.Token_Do,c.Body,c.Token_End);else if(c.Type=="DoStat")T(c.Token_Do,c.Body,c.Token_End);else if(c.Type=="IfStat"){M(c.Condition),d(c.Condition),F(c.Token_Then);let p=c.Token_Then,y=c.Body;c.ElseClauseList.forEach(x=>{T(p,y,x.Token),p=x.Token,x.Condition!=null&&(M(x.Condition),d(x.Condition),F(x.Token_Then),p=x.Token_Then),y=x.Body}),T(p,y,c.Token_End)}else c.Type=="CallExprStat"?M(c.Expression):c.Type=="CompoundStat"?(M(c.Lhs),M(c.Rhs),d(c.Lhs),d(c.Rhs),F(c.Token_Compound)):c.Type=="AssignmentStat"?(c.Lhs.forEach((p,y)=>{M(p),y>0&&d(p),c.Token_LhsSeperatorList[y]}),F(c.Token_Equals),c.Rhs.forEach((p,y)=>{M(p),d(p),c.Token_RhsSeperatorList[y]})):s(!1,"Unreachable")}}}},G(ee)}function le(ee){let G,M;function O(f){f&&(f.LeadingWhite="")}function R(f,U,$=!1){O(U);let F=(typeof f.Source=="string"?f.Source:f.Source.toString()).substr(f.Source.length-1,1),d=(typeof U.Source=="string"?U.Source:U.Source.toString()).substr(0,1);F=="-"&&d=="-"||h.includes(F)&&h.includes(d)||$&&F==")"&&d=="("?U.LeadingWhite=$?";":" ":U.LeadingWhite=""}function V(f,U,$){G(U),O($);let F=U.GetFirstToken(),d=U.GetLastToken();F!=null?(R(f,F),R(d,$)):R(f,$)}M=function(f){if(f.Type==="BinopExpr")M(f.Lhs),M(f.Rhs),f.Lhs.Type=="NumberLiteral"&&f.Token_Op.Source==".."?f.Token_Op.LeadingWhite=" ":(O(f.Token_Op),R(f.Lhs.GetLastToken(),f.Token_Op)),R(f.Token_Op,f.Rhs.GetFirstToken());else if(f.Type==="UnopExpr")O(f.Token_Op),M(f.Rhs),R(f.Token_Op,f.Rhs.GetFirstToken());else if(f.Type==="NumberLiteral"||f.Type==="StringLiteral"||f.Type==="NilLiteral"||f.Type==="BooleanLiteral"||f.Type==="VargLiteral"||f.Type==="HashLiteral")O(f.Token);else if(f.Type=="FieldExpr")M(f.Base),O(f.Token_Dot),O(f.Field);else if(f.Type=="IndexExpr")M(f.Base),O(f.Token_OpenBracket),M(f.Index),O(f.Token_CloseBracket);else if(f.Type=="MethodExpr"||f.Type=="CallExpr")M(f.Base),f.Type=="MethodExpr"&&(O(f.Token_Colon),O(f.Method)),f.FunctionArguments.CallType=="StringCall"?O(f.FunctionArguments.Token):f.FunctionArguments.CallType=="ArgCall"?(O(f.FunctionArguments.Token_OpenParen),f.FunctionArguments.ArgList.forEach((U,$)=>{M(U);let F=f.FunctionArguments.Token_CommaList[$];F!=null&&O(F)}),O(f.FunctionArguments.Token_CloseParen)):f.FunctionArguments.CallType=="TableCall"&&M(f.FunctionArguments.TableExpr);else if(f.Type=="FunctionLiteral")O(f.Token_Function),O(f.Token_OpenParen),f.ArgList.forEach((U,$)=>{O(U);let F=f.Token_ArgCommaList[$];F!=null&&O(F)}),f.Token_Varg!=null&&O(f.Token_Varg),O(f.Token_CloseParen),V(f.Token_CloseParen,f.Body,f.Token_End);else if(f.Type=="VariableExpr")O(f.Token);else if(f.Type=="ParenExpr")O(f.Token_OpenParen),M(f.Expression),O(f.Token_CloseParen);else if(f.Type=="TableLiteral")O(f.Token_OpenBrace),f.EntryList.forEach((U,$)=>{U.EntryType=="Field"?(O(U.Field),O(U.Token_Equals),M(U.Value)):U.EntryType=="Index"?(O(U.Token_OpenBracket),M(U.Index),O(U.Token_CloseBracket),O(U.Token_Equals),M(U.Value)):U.EntryType=="Value"?M(U.Value):s(!1,"unreachable");let F=f.Token_SeperatorList[$];F!=null&&O(F)}),f.Token_SeperatorList[f.EntryList.length-1]=null,O(f.Token_CloseBrace);else throw`unreachable, type: ${f.Type}:${f} ${console.trace()}`},G=function(f){if(f.Type=="StatList"){let U;for(U=0;U<=f.StatementList.length;U++){let $=f.StatementList[U];if($==null)continue;G($),O($.GetFirstToken());let F=f.StatementList[U-1];if(F!=null){let d={")":["(","["],"]":["(","["]};if(f.SemicolonList[U-1]){let T=F.GetLastToken().Source,c=$.GetFirstToken().Source;(d[T]===null||d[T]===void 0||!d[T].includes(c))&&(f.SemicolonList[U-1]=null)}f.SemicolonList[U-1]||R(F.GetLastToken(),$.GetFirstToken(),!0)}}f.SemicolonList[f.StatementList.length-1]=null,f.StatementList.length>0&&O(f.StatementList[0].GetFirstToken())}else if(f.Type=="BreakStat")O(f.Token_Break);else if(f.Type=="ContinueStat")O(f.Token_Continue);else if(f.Type=="GotoStat")O(f.Token_Goto),R(f.Token_Goto,f.Token_Label);else if(f.Type=="LabelStat")O(f.Token_ColonsLeft),O(f.Token_Label),O(f.Token_ColonsRight);else if(f.Type=="ReturnStat")O(f.Token_Return),f.ExprList.forEach((U,$)=>{M(U),f.Token_CommaList[$]!=null&&O(f.Token_CommaList[$])}),f.ExprList.length>0&&R(f.Token_Return,f.ExprList[0].GetFirstToken());else if(f.Type=="LocalVarStat"){O(f.Token_Local);let U=!1;f.VarList.forEach(($,F)=>{F==0?R(f.Token_Local,$):O($),$.Attribute&&(O($.Attribute),F+1==f.VarList.length&&(U=!0));let d=f.Token_VarCommaList[F];d!=null&&O(d)}),f.Token_Equals!=null&&(U||O(f.Token_Equals),f.ExprList.forEach(($,F)=>{M($);let d=f.Token_ExprCommaList[F];d!=null&&O(d)}))}else if(f.Type=="LocalFunctionStat")O(f.Token_Local),R(f.Token_Local,f.FunctionStat.Token_Function),R(f.FunctionStat.Token_Function,f.FunctionStat.NameChain[0]),R(f.FunctionStat.NameChain[0],f.FunctionStat.Token_OpenParen),f.FunctionStat.ArgList.forEach((U,$)=>{O(U);let F=f.FunctionStat.Token_ArgCommaList[$];F!=null&&O(F)}),f.FunctionStat.Token_Varg&&O(f.FunctionStat.Token_Varg),O(f.FunctionStat.Token_CloseParen),V(f.FunctionStat.Token_CloseParen,f.FunctionStat.Body,f.FunctionStat.Token_End);else if(f.Type=="FunctionStat")O(f.Token_Function),f.NameChain.forEach((U,$)=>{$==0?R(f.Token_Function,U):O(U);let F=f.Token_NameChainSeperator[$];F!=null&&O(F)}),O(f.Token_OpenParen),f.ArgList.forEach((U,$)=>{O(U);let F=f.Token_ArgCommaList[$];F!=null&&O(F)}),f.Token_Varg&&O(f.Token_Varg),O(f.Token_CloseParen),V(f.Token_CloseParen,f.Body,f.Token_End);else if(f.Type=="RepeatStat")O(f.Token_Repeat),V(f.Token_Repeat,f.Body,f.Token_Until),M(f.Condition),R(f.Token_Until,f.Condition.GetFirstToken());else if(f.Type=="GenericForStat")O(f.Token_For),f.VarList.forEach((U,$)=>{$==0?R(f.Token_For,U):O(U);let F=f.Token_VarCommaList[$];F!=null&&O(F)}),R(f.VarList[f.VarList.length-1],f.Token_In),f.GeneratorList.forEach((U,$)=>{M(U),$==0&&R(f.Token_In,U.GetFirstToken());let F=f.Token_GeneratorCommaList[$];F!=null&&O(F)}),R(f.GeneratorList[f.GeneratorList.length-1].GetLastToken(),f.Token_Do),V(f.Token_Do,f.Body,f.Token_End);else if(f.Type=="NumericForStat")O(f.Token_For),f.VarList.forEach((U,$)=>{$==0?R(f.Token_For,U):O(U);let F=f.Token_VarCommaList[$];F!=null&&O(F)}),R(f.VarList[f.VarList.length-1],f.Token_Equals),f.RangeList.forEach((U,$)=>{M(U),$==0&&R(f.Token_Equals,U.GetFirstToken());let F=f.Token_RangeCommaList[$];F!=null&&O(F)}),R(f.RangeList[f.RangeList.length-1].GetLastToken(),f.Token_Do),V(f.Token_Do,f.Body,f.Token_End);else if(f.Type=="WhileStat")O(f.Token_While),M(f.Condition),O(f.Token_Do),R(f.Token_While,f.Condition.GetFirstToken()),R(f.Condition.GetLastToken(),f.Token_Do),V(f.Token_Do,f.Body,f.Token_End);else if(f.Type=="DoStat")O(f.Token_Do),O(f.Token_End),V(f.Token_Do,f.Body,f.Token_End);else if(f.Type=="IfStat"){O(f.Token_If),M(f.Condition),R(f.Token_If,f.Condition.GetFirstToken()),R(f.Condition.GetLastToken(),f.Token_Then);let U=f.Token_Then,$=f.Body;f.ElseClauseList.forEach((F,d)=>{V(U,$,F.Token),U=F.Token,F.Condition!=null&&(M(F.Condition),R(F.Token,F.Condition.GetFirstToken()),R(F.Condition.GetLastToken(),F.Token_Then),U=F.Token_Then),G(F.Body),$=F.Body}),V(U,$,f.Token_End)}else if(f.Type=="CallExprStat")M(f.Expression);else if(f.Type=="CompoundStat")M(f.Lhs),O(f.Token_Compound),M(f.Rhs),R(f.Lhs.GetLastToken(),f.Token_Compound),R(f.Token_Compound,f.Rhs.GetFirstToken());else if(f.Type=="AssignmentStat")f.Lhs.forEach((U,$)=>{M(U);let F=f.Token_LhsSeperatorList[$];F!=null&&O(F)}),O(f.Token_Equals),f.Rhs.forEach((U,$)=>{M(U);let F=f.Token_RhsSeperatorList[$];F!=null&&O(F)});else return M(f)},G(ee)}function re(ee){let G,M,O={NumberLiteral:!0,BooleanLiteral:!0,StringLiteral:!0,HashLiteral:!0,NilLiteral:!0,TableLiteral:!0,ParenExpr:!0,BinopExpr:!0};function R(c,p,y=null){let x;return x={Type:c,Token:{Type:y==null?"Number":y,LeadingWhite:"",Source:p},GetFirstToken:()=>x.Token,GetLastToken:()=>x.Token},x}function V(c,p,y){let x;return x={Type:"BinopExpr",Token_Op:{Type:"Symbol",LeadingWhite:"",Source:c},Lhs:p,Rhs:y,GetFirstToken:()=>x.Lhs.GetFirstToken(),GetLastToken:()=>x.Rhs.GetLastToken()},x}function f(c,p){let y;return y={Type:"UnopExpr",Token_Op:{Type:"Symbol",LeadingWhite:"",Source:c},Rhs:p,GetFirstToken:()=>y.Token_Op,GetLastToken:()=>y.Rhs.GetLastToken()},y}function U(c,p){if(p!=null)for(var[y,x]of Object.entries(p))c[y]=x}function $(c){if(c==null||c.substr==null)return;let p=c.substr(0,1),y;if((p=='"'||p=="'")&&(y=c.substr(1,c.length-2)),p=="["){let X=0,K=1;for(;c.substr(K,1)=="=";)X++,K++;y=c.substr(2+X,c.length-4-X-2)}if(y==null)return"";let x="",w;for(w=0;w<=y.length;w++){let X=y.substr(w,1);X=="'"||X=='"'?x+=`\\${X}`:x+=X}return x}function F(c){if(typeof c=="object"&&c.Type=="ParenExpr")return U(c,c.Expression)}function d(c,p,y){let x=p,w=y;if(p&&p.Type=="ParenExpr"&&(x=p.Expression),y&&y.Type=="ParenExpr"&&(w=y.Expression),x==null||w==null||x.Type==null||w.Type==null||x.Type=="VariableExpr"||x.Type=="CallExpr"||x.Type=="BinopExpr"||w.Type=="CallExpr"||w.Type=="BinopExpr"||w.Type=="VariableExpr")return;let X=x.Token||x.Expression!=null&&x.Expression.Token||null,K=w.Token||w.Expression!=null&&w.Expression.Token||null,J=X!=null?X.Source:null,Ee=K!=null?K.Source:null,ne,oe;if(x.Type=="BooleanLiteral"&&(ne=J=="true"),w.Type=="BooleanLiteral"&&(oe=Ee=="true"),!(x.Type=="NumberLiteral"&&(ne=r(J),ne==null))&&!(w.Type=="NumberLiteral"&&(oe=r(Ee),oe==null))&&((x.Type=="StringLiteral"||x.Type=="HashLiteral")&&(ne=J.toString()),(w.Type=="StringLiteral"||w.Type=="HashLiteral")&&(oe=Ee.toString()),ne!=null&&oe!=null)){if(c=="==")return ne==oe;if(c=="~=")return ne!=oe;if(c=="and")return ne&&oe;if(c=="or")return ne||oe;if(c==".."&&x.Type=="StringLiteral"&&w.Type=="StringLiteral")return`"${$(J)+$(Ee)}"`;if(x.Type=="StringLiteral"&&(ne=r($(ne))),w.Type=="StringLiteral"&&(oe=r($(oe))),ne==null||oe==null)return;let be;if(c=="+"&&(be=ne+oe),c=="-"&&(be=ne-oe),c=="*"&&(be=ne*oe),c=="/"&&(be=ne/oe),c=="^"&&(be=ne**oe),c=="%"&&(be=ne%oe),c==">"&&(be=ne>oe),c=="<"&&(be=ne="&&(be=ne>=oe),c=="<="&&(be=ne<=oe),be==!1||be==!0||isFinite(be)&&be>-(10**6)&&be<10**6)return be}}function T(c,p){let y=p.Token||p.Expression||p.EntryList||p;if(y==null||y.Source==null&&p.Type!="TableLiteral"||p.Type=="VariableExpr"||p.Type=="CallExpr"||p.Type=="BinopExpr")return;let x=y.Source,w;if(p.Type=="TableLiteral"&&y!=null){let X=[],K=0,J=!1,Ee=!1,ne=0;if(y.forEach((oe,be)=>{if(J)X.push(oe);else if(oe.EntryType=="Value"||oe.EntryType=="Index")if((oe.Index==null||oe.Index.Type=="NumberLiteral")&&oe.Value){if((oe.Index!=null&&oe.Index.Token!=null&&oe.Index.Token.Source!==null?oe.Index.Token.Source:ne+1).toString()!==(++ne).toString())return J=!0,Ee=!0,X.push(oe);oe.Value.Type!="CallExpr"?K++:(J=!0,X.push(oe))}else X.push(oe)}),Ee)return;if(c=="#")return p.EntryList=X,p.EntryList.length<=0?R("NumberLiteral",K!==null?K:p.EntryList.length):K<=0?f("#",p):V("+",R("NumberLiteral",K),f("#",p))}if(p.Type=="BooleanLiteral"&&(w=x=="true"),!(p.Type=="NumberLiteral"&&(w=r(x),w===null))){if(p.Type=="StringLiteral"&&(w=x.substr(1,x.length-2)),c=="not"&&p.Type!==null)return p.Type=="NilLiteral"||p.Type=="BooleanLiteral"&&w===!1;if(w!=null){if(c=="#")return w.length;if(c=="-")return-w}}}M=function(c){if(c.Type=="BinopExpr"){if(M(c.Lhs),M(c.Rhs),c.Lhs!=null&&c.Rhs!=null){let p=c.Token_Op;if(p!=null&&p.Source!=null){let y=d(p.Source,c.Lhs,c.Rhs);if(y!=null){if(typeof y=="boolean"){let x=R("BooleanLiteral",y.toString(),"Keyword");U(c,x);return}else if(typeof y=="number"){if(isFinite(y)==!0){let x=R("NumberLiteral",y.toString(),"Number");U(c,x);return}}else if(typeof y=="string"){let x=R("StringLiteral",y,"String");U(c,x);return}else if(typeof y=="object"){U(c,y);return}return}}if(c.Lhs.Type=="ParenExpr"){let x=c.Lhs.Expression;x.Type=="NumberLiteral"||x.Type=="StringLiteral"||x.Type=="NilLiteral"||x.Type=="BooleanLiteral"||x.Type=="HashLiteral"}if(c.Rhs.Type=="ParenExpr"){let x=c.Rhs.Expression;x.Type=="NumberLiteral"||x.Type=="StringLiteral"||x.Type=="NilLiteral"||x.Type=="BooleanLiteral"||x.Type=="HashLiteral"}}}else if(c.Type=="UnopExpr"){if(M(c.Rhs),c.Rhs!=null&&O[c.Rhs.Type]==!0){let p=c.Token_Op;if(p!=null&&p.Source!=null){let y=c.Rhs.Expression!=null?c.Rhs.Expression:c.Rhs,x=T(p.Source,y);if(x!=null){if(typeof x=="boolean"){let w=R("BooleanLiteral",x.toString(),"Keyword");U(c,w);return}else if(typeof x=="number"){if(isFinite(x)==!0){let w=R("NumberLiteral",x,"Number");U(c,w);return}}else if(typeof x=="string"){let w=R("StringLiteral",x,"String");U(c,w);return}else if(typeof x=="object"){U(c,x);return}return}}}}else if(c.Type=="NumberLiteral"||c.Type=="StringLiteral"||c.Type=="NilLiteral"||c.Type=="BooleanLiteral"||c.Type=="VargLiteral"||c.Type=="HashLiteral"){let p=c.Token;if(p!=null){if(p.Type=="Number"){let y=p.Source.toString().split("e");if(y.length===2){let x=r(y[0]),w=r(y[1]);isFinite(x)&&isFinite(w)&&x**w<999999999&&!p.Source.includes("+")&&!!p.Source.includes(".")&&!p.Source.includes("-")&&(p.Source=(x**w).toString())}}p.Type=="String"&&(p.Source=p.Source.replace(/\\\d+/gi,y=>{let x=r(y.substr(1,y.length-1));return x&&isFinite(x)&&(x>=97&&x<=122||x>=65&&x<=90||x>=33&&x<=47||x>=58&&x<=64||x>=91&&x<=96||x>=123&&x<=126)&&x!==34&&x!==39&&x!==92?String.fromCharCode(x):y}))}}else if(c.Type=="FieldExpr")M(c.Base);else if(c.Type=="IndexExpr")M(c.Base),M(c.Index);else if(c.Type=="MethodExpr"||c.Type=="CallExpr"){if(M(c.Base),c.FunctionArguments.CallType=="ArgCall"?c.FunctionArguments.ArgList.forEach((p,y)=>{M(p)}):c.FunctionArguments.CallType=="TableCall"&&M(c.FunctionArguments.TableExpr),c.Base.Type==="ParenExpr"&&c.Base.Expression.Type==="FunctionLiteral"&&c.FunctionArguments.CallType==="ArgCall"){let p=c.Base.Expression;c.FunctionArguments.ArgList.forEach((y,x)=>{let w=c.FunctionArguments.ArgList[x];if(w!==void 0&&(w.Type=="NumberLiteral"||w.Type=="StringLiteral"||w.Type=="NilLiteral"||w.Type=="BooleanLiteral"||w.Type=="HashLiteral")){let X=p.ArgList[x];X&&X.var.RenameList.forEach(K=>{K(w.Token.Source,!0)})}})}}else if(c.Type=="FunctionLiteral")G(c.Body);else if(c.Type!="VariableExpr")if(c.Type=="ParenExpr"){let p=c.Expression;p!=null&&p.Type=="ParenExpr"&&(c.Expression=p.Expression),M(c.Expression),(c.Type=="NumberLiteral"||c.Type=="StringLiteral"||c.Type=="NilLiteral"||c.Type=="BooleanLiteral"||c.Type=="VargLiteral"||c.Type=="HashLiteral")&&F(c)}else c.Type=="TableLiteral"&&c.EntryList.forEach((p,y)=>{p.EntryType=="Field"?M(p.Value):p.EntryType=="Index"?(M(p.Index),M(p.Value)):p.EntryType=="Value"?M(p.Value):s(!1,"unreachable")})},G=function(c){if(c.Type=="StatList")c.StatementList.forEach((p,y)=>{p===null||p.Type===null||(p.Remove=()=>{c.StatementList[y]=null},G(p))});else if(c.Type!="BreakStat"){if(c.Type!="ContinueStat")if(c.Type=="ReturnStat")c.ExprList.forEach((p,y)=>{M(p)});else if(c.Type=="LocalVarStat")c.Token_Equals!=null&&c.ExprList.forEach((p,y)=>{M(p)});else if(c.Type=="LocalFunctionStat")G(c.FunctionStat.Body),c.FunctionStat.NameChain.length===1&&c.FunctionStat.NameChain[0].UseCount;else if(c.Type=="FunctionStat")G(c.Body);else if(c.Type=="RepeatStat")G(c.Body),M(c.Condition),c.Body.Type=="StatList"&&c.Body.StatementList.length;else if(c.Type=="GenericForStat")c.GeneratorList.forEach((p,y)=>{M(p)}),G(c.Body);else if(c.Type=="NumericForStat"){c.RangeList.forEach((oe,be)=>{M(oe)}),G(c.Body);let p=c.RangeList[0],y=c.RangeList[1],x=c.RangeList[2];if(p==null||y==null)return c.Remove();if(F(p),F(y),F(x),p.Type!="NumberLiteral"||y.Type!="NumberLiteral"||x!=null&&x.Type!="NumberLiteral"||x==null)return;let w=r(p.Token.Source),X=r(y.Token.Source),K=x!=null&&r(x.Token.Source)||1,J=K>0&&w<=X||K<0&&w>=X,Ee=(X-w+K)/K;if(!(J&&Ee>=0)||c.Body.Type=="StatList"&&c.Body.StatementList.length===0)return c.Remove()}else if(c.Type=="WhileStat"){M(c.Condition),G(c.Body);let p=c.Condition;switch(p.Type){case"ParenExpr":p=p.Expression;case"BooleanLiteral":if(p==null||p.Token==null||p.Token.Source!=="false")break;case"NilLiteral":c.Remove();break}}else if(c.Type=="DoStat"){if(G(c.Body),c.Body===null||c.Body.Type=="StatList"&&c.Body.StatementList.length===0)return c.Remove();if(c.Body.StatementList.length===1){let p=c.Body.StatementList[0];p.Type!=="ContinueStat"&&p.Type!=="BreakStat"&&p.Type!=="ReturnStat"&&U(c,p)}}else if(c.Type=="IfStat"){M(c.Condition),G(c.Body),c.ElseClauseList.forEach((y,x)=>{y.Condition!=null&&M(y.Condition),G(y.Body)});let p=c.Condition;switch(p.Type){case"ParenExpr":p=p.Expression;case"BooleanLiteral":if(c.ElseClauseList.length>=1||p==null||p.Token==null||p.Token.Source!=="false")break;case"NilLiteral":c.Remove();break}}else c.Type=="CallExprStat"?M(c.Expression):c.Type=="CompoundStat"?(M(c.Lhs),M(c.Rhs)):c.Type=="AssignmentStat"&&(c.Lhs.forEach((p,y)=>{M(p)}),c.Rhs.forEach((p,y)=>{M(p)}))}},G(ee)}let Te=[],C;for(C="a".charCodeAt();C<="z".charCodeAt();C++)Te.push(String.fromCharCode(C));for(C="A".charCodeAt();C<="Z".charCodeAt();C++)Te.push(String.fromCharCode(C));for(C="0".charCodeAt();C<="9".charCodeAt();C++)Te.push(String.fromCharCode(C));Te.push("_");let E=[];for(C="a".charCodeAt();C<="z".charCodeAt();C++)E.push(String.fromCharCode(C));for(C="A".charCodeAt();C<="Z".charCodeAt();C++)E.push(String.fromCharCode(C));function L(ee){let G="",M=ee%E.length;for(ee=(ee-M)/E.length,G=`${G}${E[M]}`;ee>0;){let O=ee%Te.length;ee=(ee-O)/Te.length,G=`${G}${Te[O]}`}return G}function q(ee,G,M){let O=[];for(var[R,V]of Object.entries(D))O[R]=!0;let f=[];ee.forEach(T=>{T.AssignedTo&&M?f.push(T):O[T.Name]=!0});function U(T){T.VariableList.forEach(c=>{f.push(c)}),T.ChildScopeList.forEach(c=>{U(c)})}U(G),f.forEach(T=>{T.UsedNameArray=[]}),f.sort((T,c)=>T-c);let $=0,F=[];function d(T){let c=F[T];if(c==null){for(c=L($),$++;O[c];)c=L($),$++;F[T]=c}return c}f.forEach((T,c)=>{T.Renamed=!0;let p=0;for(;T.UsedNameArray[p];)p++;T.Rename(d(p)),T.Scope?f.forEach(y=>{y.Renamed||(!y.Scope||y.Scope.Depthx>=T.BeginLocation&&x<=T.ScopeEndLocation?(y.UsedNameArray[p]=!0,!0):!1):y.Scope.Depth>T.Scope.Depth?T.ReferenceLocationList.some(x=>x>=y.BeginLocation&&x<=y.ScopeEndLocation?(y.UsedNameArray[p]=!0,!0):!1):T.BeginLocationy.BeginLocation&&(y.UsedNameArray[p]=!0))}):f.forEach(y=>{if(!y.Renamed)if(y.Type=="Global")y.UsedNameArray[p]=!0;else if(y.Type=="Local")T.ReferenceLocationList.some(x=>x>=y.BeginLocation&&x<=y.ScopeEndLocation?(y.UsedNameArray[p]=!0,!0):!1);else throw"Unreachable"})})}function pe(ee,G,M){let O=[];ee.forEach($=>{(!$.AssignedTo||!M)&&(O[$.Name]=!0)});let R=1,V=1;function f($,F){$.Name=F,$.RenameList.forEach(d=>{d(F)})}if(M){let $={};ee.forEach(F=>{F.AssignedTo&&!F.ChangedName&&($[F.Name]=$[F.Name]||`G_${V}_`,F.ChangedName=!0,f(F,$[F.Name]),V++)})}function U($){$.VariableList.forEach(F=>{let d=`L_${R}_`;F.Info.Type=="Argument"?d=`${d}arg${F.Info.Index}`:F.Info.Type=="LocalFunction"?d=`${d}func`:F.Info.Type=="ForRange"&&(d=`${d}forvar${F.Info.Index}`),f(F,d),R++}),$.ChildScopeList.forEach(F=>{U(F)})}U(G)}let Se=`--[[ - Code generated using github.com/Herrtt/luamin.js - An open source Lua beautifier and minifier. ---]] - -`,Ce={};Ce.Minify=function(ee,G){let M=g(ee),[O,R]=fe(M);G.RenameVariables==!0&&q(O,R,G.RenameGlobals),G.SolveMath==!0&&re(M),le(M);let V=S(M);return V=`${Se} - -${V}`,V},Ce.Beautify=function(ee,G){let M=g(ee),[O,R]=fe(M);G.RenameVariables&&pe(O,R,G.RenameGlobals),G.SolveMath==!0&&re(M),N(M);let V=S(M);return V=`${Se} - -${V}`,V};try{i!=null&&i.exports!=null&&(i.exports.Beautify=Ce.Beautify,i.exports.Minify=Ce.Minify)}catch{}})(Tc);const ga=Tc.exports;var Gd=ga.Beautify;ga.Minify;ga.Uglify;const vs="_M",Xe="__tmp",vo="esPairs",Lo="caseExp",In={debug:!0,tagArrayExpression:!0,importStatementHoisting:!0,transform$SymbolToDollar:!0,transformToString:!0,transformString:!0,transformJSONStringify:!0,transformJSONParse:!0,transformParseFloat:!0,transformParseInt:!0,transformNumber:!0,transformIsArray:!0,transformConsoleLog:!0,moduleExportsToReturn:!0,index0To1:!0,tryTranslateClass:!0,disableUpdateExpressionCallback:!0,renameCatchErrorIfNeeded:!0,disableClassCall:!0};function Nn(){console.log.apply(this,arguments)}function ci(i){return i.filter(t=>t.trim()!=="").join(` -`)}function _n(i){return Qp(i,{plugins:["typescript"],sourceType:"module"})}const Wd={and:"_and",break:"_break",do:"_do",else:"_else",elseif:"_elseif",end:"_end",false:"_false",for:"_for",function:"_function",if:"_if",in:"_in",local:"_local",nil:"_nil",not:"_not",or:"_or",repeat:"_repeat",return:"_return",then:"_then",true:"_true",until:"_until",while:"_while"},$t=i=>Object.prototype.hasOwnProperty.call(Wd,i),ln={"!":"not","&&":"and","||":"or","===":"==","==":"==","!==":"~=","!=":"~="},cn=i=>i.length>0?"self,":"self",Kd=i=>i&&typeof i=="object"&&i.type;function ls(i,t,e){const s=e===void 0?void 0:e-1,r=e>0||e===void 0;if(Array.isArray(i)){if(r)for(const n of i)ls(n,t,s)}else if(Kd(i)){const n=t(i);if(n)return n;if(r)for(const a of Object.values(i))ls(a,t,s)}else return}function qd(i,t,e,s){ls(i,r=>{r.type=="Identifier"&&r.name==t&&(r.name=e)},s)}function ui(i,t,e){let s;return ls(i,r=>{if(r.type=="Identifier"&&r.name==t)return s=r,!0},e),s}const zd=["pcall","xpcall","unpack"];function Jd(i){var s;if(i.type!=="VariableDeclaration"||i.declarations.length!==1)return!1;const t=i.declarations[0];if(t.id.type!=="ArrayPattern"||!t.id.elements.every(r=>r&&r.type==="Identifier")||((s=t.init)==null?void 0:s.type)!=="CallExpression")return!1;const e=t.init.callee.name;return zd.includes(e)}function Io(i){ls(i,t=>{t.type=="ThisExpression"&&(t.type="Identifier",t.name="cls")})}function bc(i,t,e){let s;return ls(i,n=>{if(t(n))return s=n,!0},e),s}function qi(i){return Ei(i,"ContinueStatement")?"::continue::":""}function Ei(i,t,e){return bc(i,s=>s.type===t,e)}const un=i=>i=="ArrayPattern"||i=="ObjectPattern";function Xd(i){const t=Ei(i,"RestElement");return t?`local ${t.argument.name} = {...};`:""}function Yd(i){const t=[];let e=[];for(const[n,a]of i.cases.entries())a.test?(e.push(a),a.consequent.length>0&&(t.push(e),e=[])):t.push([a]);e.length>0&&t.push(e);const s=[];for(const n of t)if(n.length===1)s.push(n[0]);else{const a=n[n.length-1];a.testGroup=n.map(o=>o.test),s.push(a)}const r=s.findIndex(n=>!n.test);r!==-1&&r!==s.length-1?i.cases=[...s.slice(0,r),...s.slice(r+1),s[r]]:i.cases=s}function Zd(i,t={}){var De;t={...In,...t},t.debug&&Nn((De=i==null?void 0:i.program)==null?void 0:De.body);const e=[],s=[],r=[];let n="",a="",o=!1,l=!1,h=!1,u=!1;const b=g=>g.filter(he=>he.type=="AssignmentPattern").map(he=>`if ${k(he.left)} == nil then ${k(he.left)} = ${k(he.right)} end`).join(";"),P=g=>{const he=[];for(const[N,le]of g.entries())un(le.type)&&(he.push("local "+k(le)({type:"Identifier",name:`__tmp${N}`})),g[N]={type:"Identifier",name:`__tmp${N}`});const fe=Xd(g),S=b(g);return`${he.join(";")} - ${S} - ${fe}`},I=(g,he)=>(g=k(g),$t(g)?`["${g}"]`:he?`.${g}`:g),A=(g,he)=>{const fe=k(g.key);return g.computed||g.key.type=="StringLiteral"?`[${fe}]`:$t(fe)?`["${fe}"]`:he?`.${fe}`:fe},j=g=>{if(g.specifiers.length===1){const he=g.specifiers[0],fe=`require(${k(g.source)})`;return he.type=="ImportDefaultSpecifier"?`local ${k(he.local)} = ${fe}.default`:he.type=="ImportNamespaceSpecifier"?`local ${k(he.local)} = ${fe}`:`local ${k(he.local)} = ${fe}.${k(he.imported)}`}else{const he=g.specifiers.map(S=>k(S.local)).join(", "),fe=g.specifiers.map(S=>S.type=="ImportDefaultSpecifier"?`${k(S.local)} = _esModule.default`:S.type=="ImportNamespaceSpecifier"?`${k(S.local)} = _esModule`:`${k(S.local)} = _esModule.${k(S.imported)}`);return`local ${he}; - do - local _esModule = require(${k(g.source)}) - ${fe.join(";")} - end`}},H=g=>he=>{const fe=g.elements.map(N=>N.type=="RestElement"?k(N.argument):`${k(N)}`);if(!he)return fe.join(", ");const S=g.elements.map((N,le)=>{if(N.type=="RestElement"){const re=k(N.argument);return`${re} = {}; - for __i=${fe.length}, #${Xe} do - ${re}[#${re}+1] = ${Xe}[__i] - end`}else return`${k(N)} = ${Xe}[${le+1}]`}).join(";");return`${fe.join(", ")};do local ${Xe} = ${k(he)}; ${S} end`},D=g=>he=>{const fe=g.properties.map(N=>N.type=="RestElement"?k(N.argument):`${k(N.value)}`),S=g.properties.map(N=>{if(N.type=="RestElement"){const le=k(N.argument),re=g.properties.slice(0,-1).map(Te=>`k ~= "${k(Te.key)}"`).join(" and ");return`${le} = {}; - for k, v in pairs(${Xe}) do - if ${re} then - ${le}[k] = v - end - end`}else{const le=k(N.key),re=$t(le)?`${Xe}["${le}"]`:`${Xe}.${le}`;return`${k(N.value)} = ${re}`}}).join(";");return`${fe.join(", ")};do local ${Xe} = ${k(he)}; ${S} end`},B=g=>{const he=k(g.callee),fe=W(g.arguments);if(g.callee.type=="MemberExpression"){const S=k(g.callee.object),N=k(g.callee.property);if(g.callee.object.type=="Super")return[`${S}.${N}`,`${cn(g.arguments)}${fe}`];if(N=="call")return[S,fe];if(N=="apply"){const[le,re]=g.arguments;return re?[S,`${k(le)}, unpack(${k(re)})`]:[S,k(le)]}else return $t(N)?[`${S}["${N}"]`,`${S}${g.arguments.length>0?",":""}${fe}`]:t.transformConsoleLog&&S=="console"&&N=="log"?["print",fe]:t.transformToString&&N=="toString"?["tostring",S]:t.transformIsArray&&S=="Array"&&N=="isArray"?(h=!0,["isarray",fe]):t.transformJSONParse&&S=="JSON"&&N=="parse"?(o=!0,["cjson.decode",fe]):t.transformJSONStringify&&S=="JSON"&&N=="stringify"?(o=!0,["cjson.encode",fe]):g.callee.computed?[`${S}[${N}]`,`${S}${g.arguments.length>0?",":""}${fe}`]:[`${S}:${N}`,fe]}else return t.transformParseInt&&he=="parseInt"?["math.floor",fe]:t.transformParseFloat&&he=="parseFloat"?["tonumber",fe]:t.transformNumber&&he=="Number"?["tonumber",fe]:t.transformString&&he=="String"?["tostring",fe]:[he,fe]},ie=g=>{const he=[];let fe=g;for(;;){const{type:Te,object:C}=fe;if(Te=="OptionalMemberExpression")he.push(fe);else if(Te=="MemberExpression")he.push(fe);else{he.push(fe);break}fe=C}let S=!1,N="";const le=[];for(let Te=he.length-1;Te>-1;Te--){const C=he[Te];if(N)if(he[Te].computed)N=`${N}[${k(C.property)}]`;else{const E=I(C.property,!0);N=`${N}${E}`}else N=k(C);Te==0?le.push(`else return ${N} end`):he[Te-1].optional&&(S?le.push(`elseif ${N} == nil then return nil`):(S=!0,le.push(`if ${N} == nil then return nil`)))}return[`(function() ${le.join(` -`)} end)()`,N]},W=(g,he=",")=>g.map(k).filter(fe=>fe).join(he);function k(g){var he,fe,S,N,le,re,Te;switch(g.type){case"File":return W(g.program.body,`; -`);case"VariableDeclaration":{if(Jd(g)){const E=g.declarations[0];return`local ${E.id.elements.map(k).join(", ")} = ${k(E.init)}`}const C=g.noPrefix?"":"local ";return g.declarations.map(k).filter(E=>E).map(E=>`${C}${E}`).join(`; -`)}case"VariableDeclarator":if(g.init)if(g.init.type=="AssignmentExpression"){const C=[`${k(g.id)} = ${k(g.init.left)}`];let E=g.init;for(;E.type=="AssignmentExpression";){E.right.type=="AssignmentExpression"?C.unshift(`${k(E.left)} = ${k(E.right.left)}`):C.unshift(`${k(E.left)} = ${k(E.right)}`);E=E.right}return C.join(`; -local `)}else return g.id.type=="ArrayPattern"||g.id.type=="ObjectPattern"?k(g.id)(g.init):`${k(g.id)} = ${k(g.init)}`;else return un(g.id.type)?`${k(g.id)()}`:`${k(g.id)}`;case"Identifier":{const C=g.name;return C=="undefined"?"nil":C.startsWith("$")&&t.transform$SymbolToDollar?C.replace("$","_DOLLAR_"):C}case"NumericLiteral":return`${g.value}`;case"StringLiteral":return(he=g.extra)==null?void 0:he.raw;case"IfStatement":return`if ${k(g.test)} then ${k(g.consequent)} ${g.alternate?` else ${k(g.alternate)}`:""} end`;case"BlockStatement":return`${W(g.body,";")}`;case"CallExpression":if(g.callee.type=="MemberExpression"&&g.callee.object.type!=="MemberExpression"&&g.callee.object.type!=="Identifier"&&g.callee.object.type!=="Super"){const C=k(g.callee.object);return g.callee.object={type:"Identifier",name:Xe},`(function() - local ${Xe} = ${C} - return ${k(g)} - end)()`}else{const[C,E]=B(g);return g.callee.type=="ArrowFunctionExpression"||g.callee.type=="FunctionExpression"?`(${C})(${E})`:`${C}(${E})`}case"BinaryExpression":{const C=ln[g.operator]||g.operator,E=Ce=>Ce.type==="BinaryExpression"&&Ce.operator==="+",L=Ce=>Ce.type==="StringLiteral"?!0:E(Ce)?L(Ce.left)||L(Ce.right):!1,q=Ce=>E(Ce)?Ce.stringConcat?`${k(Ce.left)} .. ${k(Ce.right)}`:L(Ce.left)||L(Ce.right)?(ls(Ce,ee=>{E(ee)&&(ee.stringConcat=!0)}),`${k(Ce.left)} .. ${k(Ce.right)}`):`${k(Ce.left)} + ${k(Ce.right)}`:k(Ce);if(g.operator==="+")return q(g);const pe=k(g.left),Se=k(g.right);return g.operator=="instanceof"?`getmetatable(${pe}) == ${Se}`:g.operator==">>"?(l=!0,`bit.rshift(${pe}, ${Se})`):g.operator=="<<"?(l=!0,`bit.lshift(${pe}, ${Se})`):g.operator=="&"?(l=!0,`bit.band(${pe}, ${Se})`):g.operator=="|"?(l=!0,`bit.bor(${pe}, ${Se})`):g.operator=="^"?(l=!0,`bit.bxor(${pe}, ${Se})`):g.operator=="**"?`math.pow(${pe}, ${Se})`:`${pe} ${C} ${Se}`}case"UnaryExpression":{const C=ln[g.operator]||g.operator,E=k(g.argument);return g.operator=="typeof"?`type(${E})`:g.operator=="delete"?`${E} = nil`:g.operator=="~"?(l=!0,`bit.bnot(${E})`):`${C} ${E}`}case"ThisExpression":return"self";case"BooleanLiteral":return`${g.value}`;case"ObjectExpression":return Ei(g.properties,"SpreadElement",1)?`(function() local ${Xe} = {}; ${g.properties.map(C=>C.type=="SpreadElement"?`for k, v in pairs(${k(C.argument)}) do ${Xe}[k] = v end`:C.type=="ObjectMethod"?(C.asMember=!0,`${Xe}${k(C)}`):`${Xe}${A(C,!0)} = ${k(C.value)}`).join(";")} return ${Xe} end)()`:`{${W(g.properties)}}`;case"ObjectProperty":return`${A(g)} = ${k(g.value)}`;case"ArrayExpression":{const C=t.tagArrayExpression?"array":"";return Ei(g.elements,"SpreadElement",1)?`(function() local ${Xe} = ${C}{}; ${g.elements.map(L=>L.type=="SpreadElement"?`for _, v in ipairs(${k(L.argument)}) do ${Xe}[#${Xe} + 1] = v end`:`${Xe}[#${Xe} + 1] = ${k(L)}`).join(";")} return ${Xe} end)()`:`${C}{${W(g.elements)}}`}case"ForOfStatement":{const C=qi(g);if(g.left.noPrefix=!0,((fe=g.left.declarations[0])==null?void 0:fe.id.type)=="ArrayPattern"){const E=ui(g.body,vo)?Xe:vo;return ci([`for _, ${E} in ipairs(${k(g.right)}) do`,`local ${k(g.left)} = unpack(${E});`,k(g.body),C,"end"])}else return ci([`for _, ${k(g.left)} in ipairs(${k(g.right)}) do`,k(g.body),C,"end"])}case"ForInStatement":{const C=qi(g);return g.left.noPrefix=!0,ci([`for ${k(g.left)}, __ in pairs(${k(g.right)}) do`,k(g.body),C,"end"])}case"LogicalExpression":{const C=ln[g.operator]||g.operator,E=k(g.left),L=k(g.right);let q;return C=="??"?q=`(function() - if ${E} == nil then - return ${L} - else - return ${E} - end - end)()`:q=`${E} ${C} ${L}`,(S=g.extra)!=null&&S.parenthesized?`(${q})`:`${q}`}case"ObjectMethod":{const C=A(g,g.asMember),E=P(g.params),L=k(g.body),q=W(g.params);return` ${C} = function (${q}) ${E} ${L} end`}case"FunctionDeclaration":{const C=k(g.id),E=P(g.params),L=k(g.body),q=W(g.params),pe=g.params.length>0?", "+q:q;return t.tryTranslateClass&&C.match(/^[A-Z]/)&&Ei(g.body,"ThisExpression")?`local ${C} = setmetatable({}, { - __call = function(t${pe}) - local self = t:new(); - self:constructor(${q}); - return self; - end}) -${C}.__index = ${C} -function ${C}.new(cls) return setmetatable({}, cls) end -function ${C}:constructor(${q}) - ${E} - ${L} -end`:`local function ${C}(${q}) ${E} ${L} end`}case"ReturnStatement":return g.argument?`return ${k(g.argument)}`:"return;";case"ArrayPattern":return H(g);case"ObjectPattern":return D(g);case"ClassDeclaration":{const C=k(g.id),E=g.body.body.filter(ee=>ee.type==="ClassMethod"&&ee.kind!=="constructor");g.superClass&&ls(E,ee=>{ee.type==="MemberExpression"&&ee.object.type=="Super"&&(ee.object.superClass=g.superClass)});const L=E.map(ee=>{const G=k(ee.key),M=P(ee.params),O=$t(G)?`${C}["${G}"] = function`:`function ${C}:${G}`,R=$t(G)?cn(ee.params):"";return`${O}(${R}${W(ee.params)}) - ${M} - ${k(ee.body)} - end`}).join(";"),q=g.body.body.filter(ee=>ee.type==="ClassProperty"&&ee.static).map(ee=>{const G=k(ee.key);return $t(G)?`${C}["${G}"] = ${k(ee.value)}`:`${C}.${G} = ${k(ee.value)}`}).join(";"),pe=g.body.body.filter(ee=>ee.type==="ClassProperty"&&!ee.static).map(ee=>{const G=k(ee.key);return $t(G)?`["${G}"] = ${k(ee.value)}`:`${G} = ${k(ee.value)}`}).join(","),Se=bc(g.body,ee=>ee.kind=="constructor"),Ce=g.superClass?`__index = ${k(g.superClass)},`:"";if(Se){g.superClass&&ls(Se.body,R=>{R.type==="MemberExpression"&&R.object.type=="Super"&&(R.object.superClass=g.superClass),R.type=="CallExpression"&&R.callee.type=="Super"&&(R.callee={type:"MemberExpression",object:{type:"Super",superClass:g.superClass},property:{type:"Identifier",name:"constructor"}})});const ee=P(Se.params),G=k(Se.body),M=W(Se.params),O=Se.params.length>0?", "+M:M;return` local ${C} = setmetatable({}, { - ${Ce} - __call = function(t${O}) - local self = t:new(); - self:constructor(${M}); - return self; - end}) - ${C}.__index = ${C} - ${q} - function ${C}.new(cls) return setmetatable({${pe}}, cls) end - function ${C}:constructor(${M}) - ${ee} - ${G} - end - ${L}`}else return` local ${C} = setmetatable({}, { - ${Ce} - __call = function(t) - local self = t:new(); - self:constructor(); - return self; - end}) - ${C}.__index = ${C} - ${q} - function ${C}.new(cls) return setmetatable({${pe}}, cls) end - function ${C}:constructor() end - ${L}`}case"ClassBody":return`${W(g.body,`, -`)}`;case"ClassProperty":return`${I(g.key)} = ${k(g.value)}`;case"ClassMethod":{const C=P(g.params);return g.params.unshift({type:"ThisExpression"}),g.static&&!ui(g.body,"cls")&&!ui(g.params,"cls")&&(Io(g.body),Io(g.params)),`${I(g.key)} = function(${W(g.params)}) - ${C} ${k(g.body)} end`}case"OptionalCallExpression":{let C,E,L,q;return g.callee.type=="OptionalMemberExpression"?([L,q]=B(g),[C,E]=ie(g.callee),L=E):([L,q]=B(g),C=k(g.callee),E=C),C[0]=="#"&&(C=C.slice(1)+".length"),`(function() - local ${Xe} = ${C} - if ${Xe} == nil then - return nil - elseif type(${Xe}) ~= 'function' then - error('${E} is not a function') - else - return ${L}(${q}) - end - end)()`}case"MemberExpression":{const C=k(g.object),E=k(g.property);return g.object.type=="Super"?`${C}.${E}`:E=="length"?"#"+C:$t(E)?`${C}["${E}"]`:g.computed?t.index0To1&&((N=g.property)==null?void 0:N.type)=="NumericLiteral"&&g.property.value===0?`${C}[1]`:`${C}[${E}]`:`${C}.${E}`}case"OptionalMemberExpression":return ie(g)[0];case"ExpressionStatement":return g.expression.ExpressionStatement=!0,`${k(g.expression)}`;case"AssignmentExpression":{if(g.right.type=="FunctionExpression"&&g.left.type=="MemberExpression"&&g.left.object.type=="MemberExpression"&&((le=g.left.object.property)==null?void 0:le.name)=="prototype"){const E=P(g.right.params),L=k(g.left.property);if($t(L)){const q=`${k(g.left.object.object)}["${L}"]`,pe=cn(g.right.params);return`${q} = function(${pe}${W(g.right.params)}) - ${E} ${k(g.right.body)} end`}else return`function ${`${k(g.left.object.object)}:${L}`}(${W(g.right.params)}) - ${E} ${k(g.right.body)} end`}const C=k(g.left);if(t.moduleExportsToReturn&&g.left.type=="MemberExpression"&&(C=="module.exports"||C.startsWith("module.exports.")||C.startsWith("module.exports[")))return C=="module.exports"?a=`return ${k(g.right)}`:(u=!0,s.push(`${vs}${C.slice(14)} = ${k(g.right)}`)),"";if(g.right.type=="AssignmentExpression"){const E=k(g.left);return`${k(g.right)}; - local ${E} = ${k(g.right.left)}`}else{const E=g.operator;let L,q;return un(g.left.type)?(L=k(g.left)(),q=`unpack(${k(g.right)})`):(L=k(g.left),q=k(g.right)),E=="+="?`${L} = ${L} + ${q}`:E=="-="?`${L} = ${L} - ${q}`:E=="*="?`${L} = ${L} * ${q}`:E=="/="?`${L} = ${L} / ${q}`:E=="%="?`${L} = ${L} % ${q}`:E=="&&="?`${L} = ${L} and ${q}`:E=="||="?`${L} = ${L} or ${q}`:E=="&="?(l=!0,`${L} = bit.band(${L}, ${q})`):E=="|="?(l=!0,`${L} = bit.bor(${L}, ${q})`):E=="^="?(l=!0,`${L} = bit.bxor(${L}, ${q})`):E=="**="?`${L} = math.pow(${L}, ${q})`:E=="??="?`${L} = (function() - if ${L} == nil then - return ${q} - else - return ${L} - end - end)()`:`${L} ${E} ${q}`}}case"BreakStatement":return"break";case"ContinueStatement":return"goto continue";case"ThrowStatement":return g.argument.type=="NewExpression"?`error(${W(g.argument.arguments)})`:`error(${k(g.argument)})`;case"NewExpression":return`${k(g.callee)}(${W(g.arguments)})`;case"FunctionExpression":{const C=P(g.params);return`function(${W(g.params)}) ${C} ${k(g.body)} end`}case"TryStatement":return t.renameCatchErrorIfNeeded&&g.handler.param&&k(g.handler.param)==="error"&&(ui(g.handler,"_err")||qd(g.handler,"error","_err")),`local ok ${g.handler.param?" ,"+k(g.handler.param):""} = - pcall(function() ${k(g.block)} end); - if not ok then ${k(g.handler.body)} end`;case"UpdateExpression":{const C=k(g.argument),E=g.operator=="++"?"+":"-";return t.disableUpdateExpressionCallback&&g.ExpressionStatement?`${C} = ${C} ${E} 1`:`(function () ${C} = ${C} ${E} 1; return ${C} end)()`}case"WhileStatement":{const C=qi(g);return ci([`while ${k(g.test)} do`,k(g.body),C,"end"])}case"ArrowFunctionExpression":{const C=P(g.params);return`function(${W(g.params)}) ${C} ${g.body.type=="BlockStatement"?"":"return"} ${k(g.body)} end`}case"RestElement":return"...";case"ConditionalExpression":return`(function() - if ${k(g.test)} then return ${k(g.consequent)}; - else return ${k(g.alternate)}; end end)()`;case"RegExpLiteral":return`[=[${g.pattern}]=]`;case"NullLiteral":return"nil";case"TemplateLiteral":return`string.format([=[${g.quasis.map(k).join("%s")}]=], ${W(g.expressions)})`;case"TemplateElement":return`${g.value.cooked}`;case"ForStatement":{const C=qi(g);return((re=g.update)==null?void 0:re.type)=="UpdateExpression"&&(g.update.ExpressionStatement=!0),ci(["do",g.init?k(g.init):"",`while ${g.test?k(g.test):"1"} do`,k(g.body),C,g.update?k(g.update):"","end","end"])}case"AssignmentPattern":return`${k(g.left)}`;case"SpreadElement":return`unpack(${k(g.argument)})`;case"Super":return g.superClass?k(g.superClass):"super";case"SequenceExpression":return`{${W(g.expressions,";")}}`;case"SwitchStatement":{Yd(g);const C=ui(g,Lo)?Xe:Lo;return`repeat - local ${C} = ${k(g.discriminant)} - ${g.cases.map((E,L)=>{const q=W(E.consequent,";");if(E.test){const pe=E.testGroup?`${E.testGroup.map(Se=>`${C} == ${k(Se)}`).join(" or ")}`:`${C} == ${k(E.test)}`;return L===0?`if ${pe} then ${q}`:`elseif ${pe} then ${q}`}else return`else ${q}`}).join(` -`)} - end - until (false)`}case"ExportDefaultDeclaration":return u=!0,s.push(`${vs}.default = ${k(g.declaration)}`),"";case"ExportNamedDeclaration":if(u=!0,g.declaration)if(g.declaration.type=="VariableDeclaration"){const C=g.declaration.declarations.map(k).filter(L=>L).map(L=>`local ${L}`).join(`; -`),E=g.declaration.declarations.map(L=>{const q=k(L.id);return`${vs}.${q} = ${q}`});return s.push(...E),`${C}`}else if(((Te=g.declaration)==null?void 0:Te.type)=="FunctionDeclaration"){const C=k(g.declaration.id);return s.push(`${vs}.${C} = ${C}`),`${k(g.declaration)}`}else return"";else if(g.specifiers.length>0){const C=E=>`${vs}.${k(E.exported)} = ${k(E.local)}`;return s.push(...g.specifiers.map(C)),""}else return"";case"ImportDeclaration":{const C=j(g);return t.importStatementHoisting?(r.push(C),""):C}case"AwaitExpression":return`${k(g.argument)}`;default:return t.debug&&Nn("unknow node",g.type,g),""}}const me=k(i);return u&&(n=`local ${vs} = {}`,a=`return ${vs}`),o&&r.unshift('local cjson = require("cjson")'),h&&r.unshift('local isarray = require("table.isarray")'),l&&r.unshift('local bit = require("bit")'),`${r.join(";")} - -${n} -${e.join(";")} -${me} -${s.join(";")} -${a}`}const Qd=i=>i.replace(/^\s*--\[\[(?:[\s\S]*?)\s*--\]\]\s*/,"");function em(i,t){let e="";return e=Zd(_n(i),t),t.debug&&Nn(e),Qd(Gd(e,{}))}var xc={exports:{}};(function(i,t){(function(e,s){s()})(es,function(){function e(h,u){return typeof u=="undefined"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob(["\uFEFF",h],{type:h.type}):h}function s(h,u,b){var P=new XMLHttpRequest;P.open("GET",h),P.responseType="blob",P.onload=function(){l(P.response,u,b)},P.onerror=function(){console.error("could not download file")},P.send()}function r(h){var u=new XMLHttpRequest;u.open("HEAD",h,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function n(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(u)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof es=="object"&&es.global===es?es:void 0,o=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(h,u,b){var P=a.URL||a.webkitURL,I=document.createElement("a");u=u||h.name||"download",I.download=u,I.rel="noopener",typeof h=="string"?(I.href=h,I.origin===location.origin?n(I):r(I.href)?s(h,u,b):n(I,I.target="_blank")):(I.href=P.createObjectURL(h),setTimeout(function(){P.revokeObjectURL(I.href)},4e4),setTimeout(function(){n(I)},0))}:"msSaveOrOpenBlob"in navigator?function(h,u,b){if(u=u||h.name||"download",typeof h!="string")navigator.msSaveOrOpenBlob(e(h,b),u);else if(r(h))s(h,u,b);else{var P=document.createElement("a");P.href=h,P.target="_blank",setTimeout(function(){n(P)})}}:function(h,u,b,P){if(P=P||open("","_blank"),P&&(P.document.title=P.document.body.innerText="downloading..."),typeof h=="string")return s(h,u,b);var I=h.type==="application/octet-stream",A=/constructor/i.test(a.HTMLElement)||a.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||I&&A||o)&&typeof FileReader!="undefined"){var H=new FileReader;H.onloadend=function(){var ie=H.result;ie=j?ie:ie.replace(/^data:[^;]*;/,"data:attachment/file;"),P?P.location.href=ie:location=ie,P=null},H.readAsDataURL(h)}else{var D=a.URL||a.webkitURL,B=D.createObjectURL(h);P?P.location=B:location.href=B,P=null,setTimeout(function(){D.revokeObjectURL(B)},4e4)}});a.saveAs=l.saveAs=l,i.exports=l})})(xc);var tm=xc.exports;const sm="@xiangnanscu/js2lua",im="0.45.0",rm="module",nm="Writing LuaJIT with the expressiveness of JavaScript.",am="src/js2lua.mjs",om={js2lua:"bin/js2lua.js"},lm={type:"git",url:"git+https://github.com/xiangnanscu/js2lua.git"},cm="Nan Xiang",um="MIT",hm={url:"https://github.com/xiangnanscu/js2lua/issues"},fm="https://github.xnscu.com/js2lua/",pm={dev:"vite",build:"vite build",preview:"vite preview",commit:"git add . && git commit -am ",push:"yarn commit",postpush:"while true; do git push && { echo 'Git push succeeded'; break; } || echo 'Git push failed, retrying in 1 seconds'; sleep 1; done",pull:"while true; do git pull && { echo 'Git pull succeeded'; break; } || echo 'Git pull failed, retrying in 1 seconds'; sleep 1; done",prerelease:"npm --no-git-tag-version version minor",docs:"node makeDocs.js",release:"npm run docs && push_option=release npm run push",rc:"yarn release",replace:"find . -type d \\( -name .git -o -name node_modules \\) -prune -o -type f -exec sed -i s/js2lua/field/g {} \\;",test:"node test.mjs"},dm={"@babel/parser":"^7.22.14","lua-fmt":"^2.6.0","lua-format":"^1.5.2","yargs-parser":"^21.1.1"},mm={"@highlightjs/vue-plugin":"^2.1.0","@prettier/plugin-lua":"^0.0.3","@rushstack/eslint-patch":"^1.3.3","@vitejs/plugin-vue":"^2.3.3",bootstrap:"^5.1.3",eslint:"^8.47.0","eslint-plugin-vue":"^9.17.0","file-saver":"^2.0.5","highlight.js":"^11.5.1",prettier:"^2.8.8",sass:"^1.52.1","source-map-support":"^0.5.21",vite:"^2.9.9","vite-plugin-require-transform":"^1.0.21",vue:"^3.2.25","vue-eslint-parser":"^9.3.1",yargs:"^17.7.2"};var No={name:sm,version:im,type:rm,description:nm,main:am,bin:om,repository:lm,author:cm,license:um,bugs:hm,homepage:fm,scripts:pm,dependencies:dm,devDependencies:mm},ym=`const { a, b: bAlias, ...rest } = { a: 1, b: 2, c: 3, d: 4 } -const [x, y, ...others] = [1, 2, 3, 4] -for (i = 0; i < 10; i = i + 2) { - if (i % 2) { - continue; - } - print(1); -} -// class -class Child extends Parent { - static myMethod(msg) { - super.myMethod(msg); - } - constructor(x, y) { - super(x); - this.y = y; - } - myMethod(msg) { - super.myMethod(msg); - } -} -// calling a function expression -(() => print(1))(); - -`;const gm={style:{"margin-bottom":"1em","text-align":"center"}},Tm=["title"],bm={class:"row"},xm={class:"col-2"},Sm={class:"form-check"},Pm={class:"form-check"},Em=["id","value"],Am=["for"],wm={class:"col-3"},Cm={key:0,class:"col"},km={class:"form-check-inline"},vm={class:"form-check-label"},Lm=["value"],Im={key:0},Nm={key:1},_m={class:"col"},Mm={class:"table table-bordered"},Om={colspan:"3"},Dm=["href"],Fm={colspan:"3"},Bm=["id"],Rm={class:"td-wrap"},$m=["onUpdate:modelValue"],jm={__name:"App",setup(i){const t=Ls(!1),e=Ls(!1);function s(D,B){try{return em(D,B)}catch(ie){return console.error(ie),`-- ERROR: ${ie.message}`}}function r(D,B){try{return _n(D,B)}catch(ie){return console.error(ie),_n(`throw new Error("ERROR: ${ie.message}")`)}}const n=Ls(ym),a=Object.keys(In),o=Ls(Object.entries(In).filter(([D,B])=>B).map(([D,B])=>D)),l=ss(()=>Object.fromEntries(a.map(D=>[D,!!o.value.includes(D)]))),h={"../test/IIFE.mjs":`(() => { - print(1) -})(); - -(function() { - print(2) -})(); - -(() => { - print(1) -})() -(function() { - print(2) -})();`,"../test/assignment.mjs":`let u, v; -[u, v] = [1, 2] -const foo = 1 -const object = { o1: 'o1', o2: 'o2' }, array = [1, 2] -// eslint-disable-next-line no-undef -const h1 = h2 = h3 = 'title' -const { a, b: bAlias, ...rest } = { a: 1, b: 2, c: 3, d: 4 } -const [x, y, ...others] = [1, 2, 3, 4] -const e = 1, f = 'a', { o1, o2: o22 } = object, [a1, a2] = array`,"../test/class.mjs":`class BasePosition { - say(word = 'base haha') { - console.log(\`Base say: \${word}\`) - } -} -class Position extends BasePosition { - static insCount = 0 - start = 0 - end = 1; - constructor(name, x = 1, y = 2, ...numbers) { - super() - Position.insCount++ - this.name = name - this.x = x - this.y = y - this.numbers = numbers - } - static echoInsCount() { - console.log(this.insCount) - } - echoPosition() { - console.log(this.name, this.x, this.y) - } - echoNumbersLength() { - console.log('numbers length:', this.name, this.numbers.length) - } - say(word = 'haha') { - super.say(word) - console.log(\`\${this.name} say: \${word}, first number is \${this.numbers[0]}\`) - } -} - -const p1 = new Position('p1', 1, 2, 3, 4) -Position.echoInsCount() -const p2 = new Position('p2', 10, 20, 30, 40) -Position.echoInsCount() -p1.echoPosition() -p2.echoPosition() -p1.say('hello') -p1.say.call(p2) -p1.echoNumbersLength('a', 'b', 'c') -p1.echoNumbersLength.apply(p2, [1, 2])`,"../test/export.mjs":`module.exports.a = {} -module.exports['b'] = {} - -const c = 1 -const d = 2 -const e = 3 - -export default { c } -export { d } -export { e as f } -export const g = 1, h = 2; -export function foo() { }`,"../test/function.mjs":`const foo = { bar() { } } -const bar = 'bar' -// translate foo.bar() => foo:bar() -foo.bar() -foo[bar]() -foo[1]() -foo['bar']() -foo['bar' || 'foo'](); -[].concat([1, 2, 3]); -/a/.exec(); -foo.map(e => { return e.name }) -foo.map(e => e.name) -foo.map(function (e) { return e.name }) -const func1 = (x = 1, y = 2, ...args) => [x, y, ...args] - -function func2(x = [], y = {}, ...args) { - return { x, y, ...args } -} - -// first uppercase is treated as class -function Echo(x = 1, y = 2, ...args) { - this.x = x - this.y = y - this.args = args -} -// xx.prototype.yy => xx:yy -Echo.prototype.echoX = function () { - console.log(this.x) -} -Echo.prototype.echoY = function () { - console.log(this.y) -}`,"../test/if.mjs":`const a = 1 -if (a === 1) { - print(a) -} -if (a) { - print(a) -} -if (!a) { - print(a) -} -if (a === 1) { - print(a) -} else { - print(2) -} - -if (a === 1) { - print(a) -} else if (a == 2) { - print(2) -} else { - print(3) -}`,"../test/import.mjs":`import g from "bar" -import { foo } from "bar" -import { a as b } from "bar" -import * as c from "bar" -import d, { e as eAlias, f } from "bar"`,"../test/index0To1.mjs":`const a = [] -const i = a[0]`,"../test/keywords.mjs":`// lua keywords -const Obj = { and: 'real' } - -Obj.prototype.f1 = function () { } -Obj.prototype.end = function () { } -print(Obj.end) - -const arr = [true, false]`,"../test/loop.mjs":`const arr = []; -for (let i = 0; i <= arr.length; i++) { - print(i); -} -for (i = 0; i < 10; i = i + 2) { - print(1); -} -for (const e of arr) { - print(e); - break; -} -for (const [a, b] of arr) { - if (b === 1) { - continue; - } - print(a); -} - -for (const key in arr) { - print(key); -} - -while (1) { - print("a"); -} - -for(;;) { - -}`,"../test/multipleReturnForLuaFunction.mjs":`let [ok, res] = pcall(foo) -let [ok2, res2] = xpcall(foo) -let [e1, e2] = unpack(bar) -// comparision -let [ok3, res3] = pcall2(foo) -let [ok4, ...res4] = xpcall(foo) -`,"../test/object.mjs":`const foo = 'bar' -const d1 = { - foo: 1, - [foo]: 2, - "k3": 3, - [5]: 5, - // "true":7, - [true]: 6 -} -const d2 = { end: 1, end1: 2 } -const d3 = { end: 1, end1: 2, ...d2, and: 3 } -const a = { ["true"]: 1, [true]: 2 } -const d = { - ...d3, - foo: 1, - end() { }, - end2() { }, -}; - -// local a = { ["true"] = 1, [true] = 2 } -// print(a['true'], a[true])`,"../test/operator.mjs":`const obj = {} -let a = 1 -typeof a -print(a instanceof obj) -const x = a ? 1 : 2 -a = !!a -const k = obj?.b; -const o = a?.[k]?.['c']?.e; -obj.func?.(1, ...[1, 2, 3]); -a.b?.c?.(); -a ?? 'hello'; -obj.n ??= 100; -print(a && x || k) -print(a && (x || k)) -a += 1 -a -= 1 -a *= 1 -a /= 1 -a %= 1 -a &&= k -a ||= k -a >> 2 -2 << a -a & 2 -a &= 2 -a | 2 -a |= 2 -a ^ 2 -a ^= 2 -a ** 2 -a **= 2 -~a`,"../test/optionalNullish.mjs":` -// optional -const a = 1, b = 'foo', obj = {}, args = [] - -// basic -const m = a?.b; - -//chain -const o = a?.[b]['c']?.e; - -// optional call -obj.func?.(1, ...args); - -// chain optional call -a.b?.c.d?.(); - -// nullish -a ?? 'hello'; -const d = {} -d.n ??= 100;`,"../test/others.mjs":`const foo = {} -delete foo.bar -print(foo.length) -const URL_PATTERN = /^https?:\\/\\/.*?\\// - -const constraints = { - 'foo': 'baz', - foo: 'bar', - ...route.opts.constraints, - [httpMethodStrategy.name]: route.method -}`,"../test/smartAddition.mjs":`const s1 = b + c -const s2 = b + 'c' -const s3 = 'c' + b -const s4 = a + b + 'c' -const s7 = 'a' + b + c -const s5 = a + b + 'c' + d + f -const s6 = a + b + c + d + f -`,"../test/spread.mjs":`const a = [1, 2, 3] -const d = { x: 1, y: 2, z: 3 } -const [v1, v2, ...v] = [4, 5, ...a] -const { x: k1, y: k2, ...k } = { ...d, foo: 'bar' }`,"../test/stringTemplate.mjs":"const foo = 5\nconst s = `1.${2}.3.${'4'}.${foo}`","../test/switch.mjs":`const c = 'v2' - -switch (c) { - case 'v1': - print(1) - break; - default: - break; -} - -switch (c) { - case 'v1': - print(1) - break - case 'v2': - case 'v3': - print(2) - break - default: - break; -}`,"../test/throw.mjs":`const test = '' -if (test) { - throw new Error('!') -} -if (test) { - throw new CustomError({ message: "custom error" }) -} -if (test) { - throw '!!' -} -if (test) { - throw { message: 'bare object error' } -}`,"../test/transform.mjs":`const a = { b: '' } -String(1) -a.b.toString() -JSON.stringify({}) -JSON.parse('{}') -Number('2') -parseInt('2') -parseFloat('1') -Array.isArray(1)`,"../test/trycatch.mjs":`try { - const res = parseInt('fooo') - print(res) -} catch (error) { - // rename error to _err to prevent shadow lua's error function name - console.log(error) -} - -try { - const res = parseInt('fooo') - print(res) -} catch (error1) { - console.log(error1) -} -`,"../test/updateExpression.mjs":`// NOTE: both i++ and ++i means ++i to lua, don't use i++ in expression context! -// in statement context, use i = i ? 1 -i++; ---i; -// otherwise use a callback -let a = --i -let b = i++ -if (--i) { - print(i) -} - -`};for(const[D,B]of Object.entries(h))h[D]=Ls(B);const u=Ar([]);for(const D in h){const B=h[D],ie=ss(()=>s(B.value,l.value)),W=D.match(/\/(\w+)\.mjs$/)[1];u.push({name:W,jscode:B,luacode:ie})}const b=ss(()=>s(n.value,l.value)),P=ss(()=>{var D;return(D=r(n.value,l.value))==null?void 0:D.program.body});function I(){j("luacode")}function A(){tm.saveAs(new Blob([b.value]),"test11.lua")}function j(D){if(window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),document.selection){const B=document.body.createTextRange();B.moveToElementText(document.getElementById(D)),B.select().createTextRange(),document.execCommand("copy")}else if(window.getSelection){const B=document.createRange();B.selectNode(document.getElementById(D)),window.getSelection().addRange(B),document.execCommand("copy")}}const H=Ls(!1);return xi(H,D=>{D?o.value=[...a]:o.value=[]}),(D,B)=>{const ie=Yu("highlightjs");return _t(),Bt("div",null,[Fe("h1",gm,[Fe("a",{href:"https://github.com/xiangnanscu/js2lua",title:Xi(No).version},Us(Xi(No).name),9,Tm),B[6]||(B[6]=Sn(" - Writing LuaJIT with the expressiveness of JavaScript. "))]),Fe("div",bm,[Fe("div",xm,[Fe("div",{class:wi({"error-wrapper":D.error})},[Fe("div",Sm,[ii(Fe("input",{class:"form-check-input",type:"checkbox",id:"label-all","onUpdate:modelValue":B[0]||(B[0]=W=>e.value=W)},null,512),[[en,e.value]]),B[7]||(B[7]=Fe("label",{class:"form-check-label",for:"label-all",style:{color:"red"}}," show Js code ",-1))]),Fe("div",Pm,[ii(Fe("input",{class:"form-check-input",type:"checkbox",id:"label-all","onUpdate:modelValue":B[1]||(B[1]=W=>H.value=W)},null,512),[[en,H.value]]),B[8]||(B[8]=Fe("label",{class:"form-check-label",for:"label-all",style:{color:"red"}}," all ",-1))]),(_t(!0),Bt(wt,null,qr(Xi(a),(W,k)=>(_t(),Bt("div",{key:k,class:wi({"form-check":!0})},[ii(Fe("input",{class:"form-check-input",type:"checkbox",id:"label"+k,"onUpdate:modelValue":B[2]||(B[2]=me=>o.value=me),value:W},null,8,Em),[[en,o.value]]),Fe("label",{class:"form-check-label",for:"label"+k},Us(W),9,Am)]))),128))],2)]),Fe("div",wm,[Fe("button",{onClick:B[3]||(B[3]=W=>n.value="")},"clear textarea"),ii(Fe("textarea",{rows:"10",style:{height:"500px"},class:"form-control","onUpdate:modelValue":B[4]||(B[4]=W=>n.value=W)},null,512),[[no,n.value]])]),e.value?(_t(),Bt("div",Cm,[Fe("div",km,[Fe("label",vm,[Fe("input",{onInput:B[5]||(B[5]=W=>t.value=!t.value),value:t.value,type:"checkbox",class:"form-check-input"},null,40,Lm),B[9]||(B[9]=Sn("show js ast"))])]),t.value?(_t(),Bt("div",Im,[Fe("pre",null,Us(P.value),1)])):(_t(),Bt("div",Nm,[lt(ie,{language:"javascript",code:n.value},null,8,["code"])]))])):Oh("",!0),Fe("div",_m,[Fe("button",{onClick:I},"copy lua"),Fe("button",{onClick:A},"save as"),lt(ie,{id:"luacode",language:"lua",code:b.value},null,8,["code"])])]),Fe("table",Mm,[Fe("thead",null,[Fe("tr",null,[Fe("th",Om,[B[10]||(B[10]=Fe("h1",null,"take a look at features:",-1)),(_t(!0),Bt(wt,null,qr(u,(W,k)=>(_t(),Bt("div",{key:k},[Fe("a",{class:"link-block",href:`#${W.name}`},Us(W.name),9,Dm)]))),128))])])]),Fe("tbody",null,[(_t(!0),Bt(wt,null,qr(u,(W,k)=>(_t(),Bt(wt,{key:k},[Fe("tr",null,[Fe("td",Fm,[Fe("h3",{id:W.name},Us(W.name),9,Bm)])]),Fe("tr",null,[Fe("td",Rm,[ii(Fe("textarea",{class:"td-textarea form-control","onUpdate:modelValue":me=>W.jscode=me},null,8,$m),[[no,W.jscode]])]),Fe("td",null,[lt(ie,{language:"javascript",code:W.jscode,style:{width:"42em"}},null,8,["code"])]),Fe("td",null,[lt(ie,{language:"lua",code:W.luacode,style:{width:"42em"}},null,8,["code"])])])],64))),128))])])])}}};function Sc(i){return i instanceof Map?i.clear=i.delete=i.set=function(){throw new Error("map is read-only")}:i instanceof Set&&(i.add=i.clear=i.delete=function(){throw new Error("set is read-only")}),Object.freeze(i),Object.getOwnPropertyNames(i).forEach(t=>{const e=i[t],s=typeof e;(s==="object"||s==="function")&&!Object.isFrozen(e)&&Sc(e)}),i}class _o{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Pc(i){return i.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Ts(i,...t){const e=Object.create(null);for(const s in i)e[s]=i[s];return t.forEach(function(s){for(const r in s)e[r]=s[r]}),e}const Um="",Mo=i=>!!i.scope,Vm=(i,{prefix:t})=>{if(i.startsWith("language:"))return i.replace("language:","language-");if(i.includes(".")){const e=i.split(".");return[`${t}${e.shift()}`,...e.map((s,r)=>`${s}${"_".repeat(r+1)}`)].join(" ")}return`${t}${i}`};class Hm{constructor(t,e){this.buffer="",this.classPrefix=e.classPrefix,t.walk(this)}addText(t){this.buffer+=Pc(t)}openNode(t){if(!Mo(t))return;const e=Vm(t.scope,{prefix:this.classPrefix});this.span(e)}closeNode(t){!Mo(t)||(this.buffer+=Um)}value(){return this.buffer}span(t){this.buffer+=``}}const Oo=(i={})=>{const t={children:[]};return Object.assign(t,i),t};class Ta{constructor(){this.rootNode=Oo(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const e=Oo({scope:t});this.add(e),this.stack.push(e)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,e){return typeof e=="string"?t.addText(e):e.children&&(t.openNode(e),e.children.forEach(s=>this._walk(t,s)),t.closeNode(e)),t}static _collapse(t){typeof t!="string"&&(!t.children||(t.children.every(e=>typeof e=="string")?t.children=[t.children.join("")]:t.children.forEach(e=>{Ta._collapse(e)})))}}class Gm extends Ta{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,e){const s=t.root;e&&(s.scope=`language:${e}`),this.add(s)}toHTML(){return new Hm(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function _i(i){return i?typeof i=="string"?i:i.source:null}function Ec(i){return Bs("(?=",i,")")}function Wm(i){return Bs("(?:",i,")*")}function Km(i){return Bs("(?:",i,")?")}function Bs(...i){return i.map(e=>_i(e)).join("")}function qm(i){const t=i[i.length-1];return typeof t=="object"&&t.constructor===Object?(i.splice(i.length-1,1),t):{}}function ba(...i){const t=qm(i);return"("+(t.capture?"":"?:")+i.map(s=>_i(s)).join("|")+")"}function Ac(i){return new RegExp(i.toString()+"|").exec("").length-1}function zm(i,t){const e=i&&i.exec(t);return e&&e.index===0}const Jm=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function xa(i,{joinWith:t}){let e=0;return i.map(s=>{e+=1;const r=e;let n=_i(s),a="";for(;n.length>0;){const o=Jm.exec(n);if(!o){a+=n;break}a+=n.substring(0,o.index),n=n.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?a+="\\"+String(Number(o[1])+r):(a+=o[0],o[0]==="("&&e++)}return a}).map(s=>`(${s})`).join(t)}const Xm=/\b\B/,wc="[a-zA-Z]\\w*",Sa="[a-zA-Z_]\\w*",Cc="\\b\\d+(\\.\\d+)?",kc="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",vc="\\b(0b[01]+)",Ym="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Zm=(i={})=>{const t=/^#![ ]*\//;return i.binary&&(i.begin=Bs(t,/.*\b/,i.binary,/\b.*/)),Ts({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,s)=>{e.index!==0&&s.ignoreMatch()}},i)},Mi={begin:"\\\\[\\s\\S]",relevance:0},Qm={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Mi]},ey={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Mi]},ty={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Fr=function(i,t,e={}){const s=Ts({scope:"comment",begin:i,end:t,contains:[]},e);s.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const r=ba("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return s.contains.push({begin:Bs(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),s},sy=Fr("//","$"),iy=Fr("/\\*","\\*/"),ry=Fr("#","$"),ny={scope:"number",begin:Cc,relevance:0},ay={scope:"number",begin:kc,relevance:0},oy={scope:"number",begin:vc,relevance:0},ly={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Mi,{begin:/\[/,end:/\]/,relevance:0,contains:[Mi]}]},cy={scope:"title",begin:wc,relevance:0},uy={scope:"title",begin:Sa,relevance:0},hy={begin:"\\.\\s*"+Sa,relevance:0},fy=function(i){return Object.assign(i,{"on:begin":(t,e)=>{e.data._beginMatch=t[1]},"on:end":(t,e)=>{e.data._beginMatch!==t[1]&&e.ignoreMatch()}})};var zi=Object.freeze({__proto__:null,APOS_STRING_MODE:Qm,BACKSLASH_ESCAPE:Mi,BINARY_NUMBER_MODE:oy,BINARY_NUMBER_RE:vc,COMMENT:Fr,C_BLOCK_COMMENT_MODE:iy,C_LINE_COMMENT_MODE:sy,C_NUMBER_MODE:ay,C_NUMBER_RE:kc,END_SAME_AS_BEGIN:fy,HASH_COMMENT_MODE:ry,IDENT_RE:wc,MATCH_NOTHING_RE:Xm,METHOD_GUARD:hy,NUMBER_MODE:ny,NUMBER_RE:Cc,PHRASAL_WORDS_MODE:ty,QUOTE_STRING_MODE:ey,REGEXP_MODE:ly,RE_STARTERS_RE:Ym,SHEBANG:Zm,TITLE_MODE:cy,UNDERSCORE_IDENT_RE:Sa,UNDERSCORE_TITLE_MODE:uy});function py(i,t){i.input[i.index-1]==="."&&t.ignoreMatch()}function dy(i,t){i.className!==void 0&&(i.scope=i.className,delete i.className)}function my(i,t){!t||!i.beginKeywords||(i.begin="\\b("+i.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",i.__beforeBegin=py,i.keywords=i.keywords||i.beginKeywords,delete i.beginKeywords,i.relevance===void 0&&(i.relevance=0))}function yy(i,t){!Array.isArray(i.illegal)||(i.illegal=ba(...i.illegal))}function gy(i,t){if(!!i.match){if(i.begin||i.end)throw new Error("begin & end are not supported with match");i.begin=i.match,delete i.match}}function Ty(i,t){i.relevance===void 0&&(i.relevance=1)}const by=(i,t)=>{if(!i.beforeMatch)return;if(i.starts)throw new Error("beforeMatch cannot be used with starts");const e=Object.assign({},i);Object.keys(i).forEach(s=>{delete i[s]}),i.keywords=e.keywords,i.begin=Bs(e.beforeMatch,Ec(e.begin)),i.starts={relevance:0,contains:[Object.assign(e,{endsParent:!0})]},i.relevance=0,delete e.beforeMatch},xy=["of","and","for","in","not","or","if","then","parent","list","value"],Sy="keyword";function Lc(i,t,e=Sy){const s=Object.create(null);return typeof i=="string"?r(e,i.split(" ")):Array.isArray(i)?r(e,i):Object.keys(i).forEach(function(n){Object.assign(s,Lc(i[n],t,n))}),s;function r(n,a){t&&(a=a.map(o=>o.toLowerCase())),a.forEach(function(o){const l=o.split("|");s[l[0]]=[n,Py(l[0],l[1])]})}}function Py(i,t){return t?Number(t):Ey(i)?0:1}function Ey(i){return xy.includes(i.toLowerCase())}const Do={},Ms=i=>{console.error(i)},Fo=(i,...t)=>{console.log(`WARN: ${i}`,...t)},js=(i,t)=>{Do[`${i}/${t}`]||(console.log(`Deprecated as of ${i}. ${t}`),Do[`${i}/${t}`]=!0)},yr=new Error;function Ic(i,t,{key:e}){let s=0;const r=i[e],n={},a={};for(let o=1;o<=t.length;o++)a[o+s]=r[o],n[o+s]=!0,s+=Ac(t[o-1]);i[e]=a,i[e]._emit=n,i[e]._multi=!0}function Ay(i){if(!!Array.isArray(i.begin)){if(i.skip||i.excludeBegin||i.returnBegin)throw Ms("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),yr;if(typeof i.beginScope!="object"||i.beginScope===null)throw Ms("beginScope must be object"),yr;Ic(i,i.begin,{key:"beginScope"}),i.begin=xa(i.begin,{joinWith:""})}}function wy(i){if(!!Array.isArray(i.end)){if(i.skip||i.excludeEnd||i.returnEnd)throw Ms("skip, excludeEnd, returnEnd not compatible with endScope: {}"),yr;if(typeof i.endScope!="object"||i.endScope===null)throw Ms("endScope must be object"),yr;Ic(i,i.end,{key:"endScope"}),i.end=xa(i.end,{joinWith:""})}}function Cy(i){i.scope&&typeof i.scope=="object"&&i.scope!==null&&(i.beginScope=i.scope,delete i.scope)}function ky(i){Cy(i),typeof i.beginScope=="string"&&(i.beginScope={_wrap:i.beginScope}),typeof i.endScope=="string"&&(i.endScope={_wrap:i.endScope}),Ay(i),wy(i)}function vy(i){function t(a,o){return new RegExp(_i(a),"m"+(i.case_insensitive?"i":"")+(i.unicodeRegex?"u":"")+(o?"g":""))}class e{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,o]),this.matchAt+=Ac(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const o=this.regexes.map(l=>l[1]);this.matcherRe=t(xa(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(o);if(!l)return null;const h=l.findIndex((b,P)=>P>0&&b!==void 0),u=this.matchIndexes[h];return l.splice(0,h),Object.assign(l,u)}}class s{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];const l=new e;return this.rules.slice(o).forEach(([h,u])=>l.addRule(h,u)),l.compile(),this.multiRegexes[o]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,l){this.rules.push([o,l]),l.type==="begin"&&this.count++}exec(o){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let h=l.exec(o);if(this.resumingScanAtSamePosition()&&!(h&&h.index===this.lastIndex)){const u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,h=u.exec(o)}return h&&(this.regexIndex+=h.position+1,this.regexIndex===this.count&&this.considerAll()),h}}function r(a){const o=new s;return a.contains.forEach(l=>o.addRule(l.begin,{rule:l,type:"begin"})),a.terminatorEnd&&o.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&o.addRule(a.illegal,{type:"illegal"}),o}function n(a,o){const l=a;if(a.isCompiled)return l;[dy,gy,ky,by].forEach(u=>u(a,o)),i.compilerExtensions.forEach(u=>u(a,o)),a.__beforeBegin=null,[my,yy,Ty].forEach(u=>u(a,o)),a.isCompiled=!0;let h=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),h=a.keywords.$pattern,delete a.keywords.$pattern),h=h||/\w+/,a.keywords&&(a.keywords=Lc(a.keywords,i.case_insensitive)),l.keywordPatternRe=t(h,!0),o&&(a.begin||(a.begin=/\B|\b/),l.beginRe=t(l.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(l.endRe=t(l.end)),l.terminatorEnd=_i(l.end)||"",a.endsWithParent&&o.terminatorEnd&&(l.terminatorEnd+=(a.end?"|":"")+o.terminatorEnd)),a.illegal&&(l.illegalRe=t(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(u){return Ly(u==="self"?a:u)})),a.contains.forEach(function(u){n(u,l)}),a.starts&&n(a.starts,o),l.matcher=r(l),l}if(i.compilerExtensions||(i.compilerExtensions=[]),i.contains&&i.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return i.classNameAliases=Ts(i.classNameAliases||{}),n(i)}function Nc(i){return i?i.endsWithParent||Nc(i.starts):!1}function Ly(i){return i.variants&&!i.cachedVariants&&(i.cachedVariants=i.variants.map(function(t){return Ts(i,{variants:null},t)})),i.cachedVariants?i.cachedVariants:Nc(i)?Ts(i,{starts:i.starts?Ts(i.starts):null}):Object.isFrozen(i)?Ts(i):i}var Iy="11.10.0";class Ny extends Error{constructor(t,e){super(t),this.name="HTMLInjectionError",this.html=e}}const hn=Pc,Bo=Ts,Ro=Symbol("nomatch"),_y=7,_c=function(i){const t=Object.create(null),e=Object.create(null),s=[];let r=!0;const n="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Gm};function l(E){return o.noHighlightRe.test(E)}function h(E){let L=E.className+" ";L+=E.parentNode?E.parentNode.className:"";const q=o.languageDetectRe.exec(L);if(q){const pe=he(q[1]);return pe||(Fo(n.replace("{}",q[1])),Fo("Falling back to no-highlight mode for this block.",E)),pe?q[1]:"no-highlight"}return L.split(/\s+/).find(pe=>l(pe)||he(pe))}function u(E,L,q){let pe="",Se="";typeof L=="object"?(pe=E,q=L.ignoreIllegals,Se=L.language):(js("10.7.0","highlight(lang, code, ...args) has been deprecated."),js("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),Se=E,pe=L),q===void 0&&(q=!0);const Ce={code:pe,language:Se};Te("before:highlight",Ce);const ee=Ce.result?Ce.result:b(Ce.language,Ce.code,q);return ee.code=Ce.code,Te("after:highlight",ee),ee}function b(E,L,q,pe){const Se=Object.create(null);function Ce(se,ue){return se.keywords[ue]}function ee(){if(!w.keywords){K.addText(J);return}let se=0;w.keywordPatternRe.lastIndex=0;let ue=w.keywordPatternRe.exec(J),ye="";for(;ue;){ye+=J.substring(se,ue.index);const Le=p.case_insensitive?ue[0].toLowerCase():ue[0],Ne=Ce(w,Le);if(Ne){const[je,it]=Ne;if(K.addText(ye),ye="",Se[Le]=(Se[Le]||0)+1,Se[Le]<=_y&&(Ee+=it),je.startsWith("_"))ye+=ue[0];else{const mt=p.classNameAliases[je]||je;O(ue[0],mt)}}else ye+=ue[0];se=w.keywordPatternRe.lastIndex,ue=w.keywordPatternRe.exec(J)}ye+=J.substring(se),K.addText(ye)}function G(){if(J==="")return;let se=null;if(typeof w.subLanguage=="string"){if(!t[w.subLanguage]){K.addText(J);return}se=b(w.subLanguage,J,!0,X[w.subLanguage]),X[w.subLanguage]=se._top}else se=I(J,w.subLanguage.length?w.subLanguage:null);w.relevance>0&&(Ee+=se.relevance),K.__addSublanguage(se._emitter,se.language)}function M(){w.subLanguage!=null?G():ee(),J=""}function O(se,ue){se!==""&&(K.startScope(ue),K.addText(se),K.endScope())}function R(se,ue){let ye=1;const Le=ue.length-1;for(;ye<=Le;){if(!se._emit[ye]){ye++;continue}const Ne=p.classNameAliases[se[ye]]||se[ye],je=ue[ye];Ne?O(je,Ne):(J=je,ee(),J=""),ye++}}function V(se,ue){return se.scope&&typeof se.scope=="string"&&K.openNode(p.classNameAliases[se.scope]||se.scope),se.beginScope&&(se.beginScope._wrap?(O(J,p.classNameAliases[se.beginScope._wrap]||se.beginScope._wrap),J=""):se.beginScope._multi&&(R(se.beginScope,ue),J="")),w=Object.create(se,{parent:{value:w}}),w}function f(se,ue,ye){let Le=zm(se.endRe,ye);if(Le){if(se["on:end"]){const Ne=new _o(se);se["on:end"](ue,Ne),Ne.isMatchIgnored&&(Le=!1)}if(Le){for(;se.endsParent&&se.parent;)se=se.parent;return se}}if(se.endsWithParent)return f(se.parent,ue,ye)}function U(se){return w.matcher.regexIndex===0?(J+=se[0],1):(be=!0,0)}function $(se){const ue=se[0],ye=se.rule,Le=new _o(ye),Ne=[ye.__beforeBegin,ye["on:begin"]];for(const je of Ne)if(!!je&&(je(se,Le),Le.isMatchIgnored))return U(ue);return ye.skip?J+=ue:(ye.excludeBegin&&(J+=ue),M(),!ye.returnBegin&&!ye.excludeBegin&&(J=ue)),V(ye,se),ye.returnBegin?0:ue.length}function F(se){const ue=se[0],ye=L.substring(se.index),Le=f(w,se,ye);if(!Le)return Ro;const Ne=w;w.endScope&&w.endScope._wrap?(M(),O(ue,w.endScope._wrap)):w.endScope&&w.endScope._multi?(M(),R(w.endScope,se)):Ne.skip?J+=ue:(Ne.returnEnd||Ne.excludeEnd||(J+=ue),M(),Ne.excludeEnd&&(J=ue));do w.scope&&K.closeNode(),!w.skip&&!w.subLanguage&&(Ee+=w.relevance),w=w.parent;while(w!==Le.parent);return Le.starts&&V(Le.starts,se),Ne.returnEnd?0:ue.length}function d(){const se=[];for(let ue=w;ue!==p;ue=ue.parent)ue.scope&&se.unshift(ue.scope);se.forEach(ue=>K.openNode(ue))}let T={};function c(se,ue){const ye=ue&&ue[0];if(J+=se,ye==null)return M(),0;if(T.type==="begin"&&ue.type==="end"&&T.index===ue.index&&ye===""){if(J+=L.slice(ue.index,ue.index+1),!r){const Le=new Error(`0 width match regex (${E})`);throw Le.languageName=E,Le.badRule=T.rule,Le}return 1}if(T=ue,ue.type==="begin")return $(ue);if(ue.type==="illegal"&&!q){const Le=new Error('Illegal lexeme "'+ye+'" for mode "'+(w.scope||"")+'"');throw Le.mode=w,Le}else if(ue.type==="end"){const Le=F(ue);if(Le!==Ro)return Le}if(ue.type==="illegal"&&ye==="")return 1;if(oe>1e5&&oe>ue.index*3)throw new Error("potential infinite loop, way more iterations than matches");return J+=ye,ye.length}const p=he(E);if(!p)throw Ms(n.replace("{}",E)),new Error('Unknown language: "'+E+'"');const y=vy(p);let x="",w=pe||y;const X={},K=new o.__emitter(o);d();let J="",Ee=0,ne=0,oe=0,be=!1;try{if(p.__emitTokens)p.__emitTokens(L,K);else{for(w.matcher.considerAll();;){oe++,be?be=!1:w.matcher.considerAll(),w.matcher.lastIndex=ne;const se=w.matcher.exec(L);if(!se)break;const ue=L.substring(ne,se.index),ye=c(ue,se);ne=se.index+ye}c(L.substring(ne))}return K.finalize(),x=K.toHTML(),{language:E,value:x,relevance:Ee,illegal:!1,_emitter:K,_top:w}}catch(se){if(se.message&&se.message.includes("Illegal"))return{language:E,value:hn(L),illegal:!0,relevance:0,_illegalBy:{message:se.message,index:ne,context:L.slice(ne-100,ne+100),mode:se.mode,resultSoFar:x},_emitter:K};if(r)return{language:E,value:hn(L),illegal:!1,relevance:0,errorRaised:se,_emitter:K,_top:w};throw se}}function P(E){const L={value:hn(E),illegal:!1,relevance:0,_top:a,_emitter:new o.__emitter(o)};return L._emitter.addText(E),L}function I(E,L){L=L||o.languages||Object.keys(t);const q=P(E),pe=L.filter(he).filter(S).map(M=>b(M,E,!1));pe.unshift(q);const Se=pe.sort((M,O)=>{if(M.relevance!==O.relevance)return O.relevance-M.relevance;if(M.language&&O.language){if(he(M.language).supersetOf===O.language)return 1;if(he(O.language).supersetOf===M.language)return-1}return 0}),[Ce,ee]=Se,G=Ce;return G.secondBest=ee,G}function A(E,L,q){const pe=L&&e[L]||q;E.classList.add("hljs"),E.classList.add(`language-${pe}`)}function j(E){let L=null;const q=h(E);if(l(q))return;if(Te("before:highlightElement",{el:E,language:q}),E.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",E);return}if(E.children.length>0&&(o.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(E)),o.throwUnescapedHTML))throw new Ny("One of your code blocks includes unescaped HTML.",E.innerHTML);L=E;const pe=L.textContent,Se=q?u(pe,{language:q,ignoreIllegals:!0}):I(pe);E.innerHTML=Se.value,E.dataset.highlighted="yes",A(E,q,Se.language),E.result={language:Se.language,re:Se.relevance,relevance:Se.relevance},Se.secondBest&&(E.secondBest={language:Se.secondBest.language,relevance:Se.secondBest.relevance}),Te("after:highlightElement",{el:E,result:Se,text:pe})}function H(E){o=Bo(o,E)}const D=()=>{W(),js("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function B(){W(),js("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let ie=!1;function W(){if(document.readyState==="loading"){ie=!0;return}document.querySelectorAll(o.cssSelector).forEach(j)}function k(){ie&&W()}typeof window!="undefined"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",k,!1);function me(E,L){let q=null;try{q=L(i)}catch(pe){if(Ms("Language definition for '{}' could not be registered.".replace("{}",E)),r)Ms(pe);else throw pe;q=a}q.name||(q.name=E),t[E]=q,q.rawDefinition=L.bind(null,i),q.aliases&&fe(q.aliases,{languageName:E})}function De(E){delete t[E];for(const L of Object.keys(e))e[L]===E&&delete e[L]}function g(){return Object.keys(t)}function he(E){return E=(E||"").toLowerCase(),t[E]||t[e[E]]}function fe(E,{languageName:L}){typeof E=="string"&&(E=[E]),E.forEach(q=>{e[q.toLowerCase()]=L})}function S(E){const L=he(E);return L&&!L.disableAutodetect}function N(E){E["before:highlightBlock"]&&!E["before:highlightElement"]&&(E["before:highlightElement"]=L=>{E["before:highlightBlock"](Object.assign({block:L.el},L))}),E["after:highlightBlock"]&&!E["after:highlightElement"]&&(E["after:highlightElement"]=L=>{E["after:highlightBlock"](Object.assign({block:L.el},L))})}function le(E){N(E),s.push(E)}function re(E){const L=s.indexOf(E);L!==-1&&s.splice(L,1)}function Te(E,L){const q=E;s.forEach(function(pe){pe[q]&&pe[q](L)})}function C(E){return js("10.7.0","highlightBlock will be removed entirely in v12.0"),js("10.7.0","Please use highlightElement now."),j(E)}Object.assign(i,{highlight:u,highlightAuto:I,highlightAll:W,highlightElement:j,highlightBlock:C,configure:H,initHighlighting:D,initHighlightingOnLoad:B,registerLanguage:me,unregisterLanguage:De,listLanguages:g,getLanguage:he,registerAliases:fe,autoDetection:S,inherit:Bo,addPlugin:le,removePlugin:re}),i.debugMode=function(){r=!1},i.safeMode=function(){r=!0},i.versionString=Iy,i.regex={concat:Bs,lookahead:Ec,either:ba,optional:Km,anyNumberOfTimes:Wm};for(const E in zi)typeof zi[E]=="object"&&Sc(zi[E]);return Object.assign(i,zi),i},ei=_c({});ei.newInstance=()=>_c({});var My=ei;ei.HighlightJS=ei;ei.default=ei;var Ai=My;const $o="[A-Za-z$_][0-9A-Za-z$_]*",Oy=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],Dy=["true","false","null","undefined","NaN","Infinity"],Mc=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Oc=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Dc=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Fy=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],By=[].concat(Dc,Mc,Oc);function Ry(i){const t=i.regex,e=(L,{after:q})=>{const pe="",end:""},n=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(L,q)=>{const pe=L[0].length+L.index,Se=L.input[pe];if(Se==="<"||Se===","){q.ignoreMatch();return}Se===">"&&(e(L,{after:pe})||q.ignoreMatch());let Ce;const ee=L.input.substring(pe);if(Ce=ee.match(/^\s*=/)){q.ignoreMatch();return}if((Ce=ee.match(/^\s+extends\s+/))&&Ce.index===0){q.ignoreMatch();return}}},o={$pattern:$o,keyword:Oy,literal:Dy,built_in:By,"variable.language":Fy},l="[0-9](_?[0-9])*",h=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",b={className:"number",variants:[{begin:`(\\b(${u})((${h})|\\.)?|(${h}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},P={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},I={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,P],subLanguage:"xml"}},A={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,P],subLanguage:"css"}},j={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,P],subLanguage:"graphql"}},H={className:"string",begin:"`",end:"`",contains:[i.BACKSLASH_ESCAPE,P]},D=i.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),B={className:"comment",variants:[D,i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE]},ie=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,I,A,j,H,{match:/\$\d+/},b];P.contains=ie.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(ie)});const W=[].concat(B,P.contains),k=W.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(W)}]),me={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:k},De={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,t.concat(s,"(",t.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},g={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Mc,...Oc]}},he={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},fe={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[me],illegal:/%/},S={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function N(L){return t.concat("(?!",L.join("|"),")")}const le={match:t.concat(/\b/,N([...Dc,"super","import"].map(L=>`${L}\\s*\\(`)),s,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},re={begin:t.concat(/\./,t.lookahead(t.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Te={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},me]},C="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+i.UNDERSCORE_IDENT_RE+")\\s*=>",E={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(C)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[me]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:g},illegal:/#(?![$_A-z])/,contains:[i.SHEBANG({label:"shebang",binary:"node",relevance:5}),he,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,I,A,j,H,B,{match:/\$\d+/},b,g,{className:"attr",begin:s+t.lookahead(":"),relevance:0},E,{begin:"("+i.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[B,i.REGEXP_MODE,{className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:n},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},fe,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[me,i.inherit(i.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},re,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[me]},le,S,De,Te,{match:/\$[(.]/}]}}function $y(i){const t="\\[=*\\[",e="\\]=*\\]",s={begin:t,end:e,contains:["self"]},r=[i.COMMENT("--(?!"+t+")","$"),i.COMMENT("--"+t,e,{contains:[s],relevance:10})];return{name:"Lua",keywords:{$pattern:i.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:r.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[i.inherit(i.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:r}].concat(r)},i.C_NUMBER_MODE,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,{className:"string",begin:t,end:e,contains:[s],relevance:5}])}}var jo=Ru({props:{code:{type:String,required:!0},language:{type:String,default:""},autodetect:{type:Boolean,default:!0},ignoreIllegals:{type:Boolean,default:!0}},setup:function(i){var t=Ls(i.language);xi(function(){return i.language},function(r){t.value=r});var e=ss(function(){return i.autodetect||!t.value}),s=ss(function(){return!e.value&&!Ai.getLanguage(t.value)});return{className:ss(function(){return s.value?"":"hljs "+t.value}),highlightedCode:ss(function(){var r;if(s.value)return console.warn('The language "'+t.value+'" you specified could not be found.'),i.code.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");if(e.value){var n=Ai.highlightAuto(i.code);return t.value=(r=n.language)!==null&&r!==void 0?r:"",n.value}return(n=Ai.highlight(i.code,{language:t.value,ignoreIllegals:i.ignoreIllegals})).value})}},render:function(){return Ka("pre",{},[Ka("code",{class:this.className,innerHTML:this.highlightedCode})])}}),jy={install:function(i){i.component("highlightjs",jo)},component:jo};const Fc=yf(jm);Ai.registerLanguage("javascript",Ry);Ai.registerLanguage("lua",$y);Fc.use(jy);Fc.mount("#app"); diff --git a/index.html b/index.html index 65ca1e0..7602ce9 100644 --- a/index.html +++ b/index.html @@ -15,7 +15,7 @@ gtag('config', 'G-FEYV3C3QK5'); - +